html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.krec {
  --c1: #4d659d;
  --c2: #9d4d54;
  --c3: #4d9d61;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 420px;
}

.krec__hint {
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  line-height: 1.35;
  color: #17141a;
}

.krec__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.krec__field {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: clamp(176px, 46vw, 232px);
  height: clamp(176px, 46vw, 232px);
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.05);
  box-shadow: inset 0 0 0 1px rgba(23, 20, 26, 0.16);
  cursor: crosshair;
  touch-action: none;
}

.krec__field:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.krec__cv {
  display: block;
  width: 100%;
  height: 100%;
}

.krec__side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.krec__btn {
  width: 100%;
  margin: 0;
  padding: 4px 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.4;
  color: #17141a;
  background: rgba(23, 20, 26, 0.06);
  border: 1px solid rgba(23, 20, 26, 0.32);
  border-radius: 12px;
  cursor: pointer;
}

.krec__btn:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.krec__bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.14);
  overflow: hidden;
}

.krec__fill {
  height: 100%;
  width: 0%;
  background: #17141a;
  border-radius: 999px;
}

.krec__meta {
  margin: 0;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.5;
  color: rgba(23, 20, 26, 0.82);
}

.krec__meta b {
  font-weight: 700;
  color: #17141a;
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}

@media (max-width: 340px) {
  .krec {
    gap: 4px;
  }
  .krec__field {
    width: 150px;
    height: 150px;
  }
  .krec__meta {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .krec.is-still .krec__field {
    cursor: default !important;
  }
  .krec.is-still .krec__btn {
    pointer-events: none !important;
  }
}
