/* 자동 생성 — scripts/체험판/build-css.py ← src/components/VocabStudy.css. 손으로 고치지 마라. */
/* 어휘 학습 화면(암기·리콜·스펠·스피킹·매칭·크래시·테스트) 시각 정본 — 2026-10-23.
   클래스카드 대조·결정 근거 = docs/설계_어휘카드_디자인_클래스카드대조_20261023.md
   색은 전부 토큰: 과목 강조 = --study-*(국어 버건디 · .theme-en 틸) · 알아요/맞음 = --ok-* · 몰라요/틀림 = --danger-* ·
   경고(힌트·급함) = --warn-* · 캔버스 = --cream*. 과목색을 여기 직접 쓰지 않는다. */

.vs {
  --vs-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --vs-ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --vs-shadow: 0 12px 32px -16px rgba(55, 30, 69, 0.28), 0 2px 6px rgba(55, 30, 69, 0.06);
  --vs-ac-soft: color-mix(in srgb, var(--study-ac) 18%, transparent);
  --vs-ac-glow: color-mix(in srgb, var(--study-ac) 55%, transparent);
  --vs-ok-light: #a9e48c; /* 검은 무대 위 «통과» 글자 */
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  color: var(--t-title);
  -webkit-tap-highlight-color: transparent;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.vs :is(button, input, select) {
  font: inherit;
  touch-action: manipulation;
}
.vs :is(button, input, select, label):focus-visible {
  outline: 2px solid var(--study-ac);
  outline-offset: 2px;
}
.vs button {
  cursor: pointer;
}
.vs button:disabled {
  cursor: default;
}

/* ── 머리: 제목 · 탭 ─────────────────────────────────────────────── */
.vs-head {
  display: flex;
  align-items: baseline;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.vs-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--t-title);
}
.vs-title small {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--t-sub);
}
/* 탭은 어느 폭에서도 «줄을 바꿔» 다 보인다 — 숨은 가로 스크롤은 마지막 탭(확인 시험)이 잘려 보였다(원장 10/25 캡처 · 결-286 으로 이름이 길어짐) */
.vs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 -4px;
  padding: 2px 4px 4px;
}
.vs-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--cream-line);
  background: var(--cream-card);
  color: var(--t-title);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  scroll-snap-align: start;
  transition:
    transform 160ms var(--vs-ease),
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}
.vs-tab svg {
  flex-shrink: 0;
}
.vs-tab:active {
  transform: scale(0.97);
}
.vs-tab.is-on {
  background: var(--study-ac);
  border-color: var(--study-ac);
  color: #fff;
  box-shadow: 0 6px 16px -8px var(--vs-ac-glow);
}
.vs-tabs--sets .vs-tab {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}
.vs-tabs--sets .vs-tab.is-on {
  background: var(--study-tint);
  color: var(--study-ac);
  border-color: var(--study-ac);
  box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  .vs-tab:not(.is-on):hover {
    border-color: var(--study-ac);
    color: var(--study-ac);
  }
}

/* ── 설정 줄 ─────────────────────────────────────────────────────── */
.vs-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t-sub);
}
.vs-opts > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vs-select {
  min-height: 36px;
  padding: 0 28px 0 10px;
  border-radius: 9px;
  border: 1.5px solid var(--cream-line);
  background: var(--cream-card)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23706876' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>")
    no-repeat right 9px center;
  color: var(--t-title);
  font-size: 13px;
  font-weight: 700;
  appearance: none;
}
.vs-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #f1ebe0;
  border: 1px solid var(--cream-line);
}
.vs-seg > button {
  min-height: 34px; /* 2026-10-23: 폰 터치 — 30px 은 너무 얕다 */
  padding: 0 12px;
  border-radius: 999px;
  color: var(--t-sub);
  font-size: 12.5px;
  font-weight: 700;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}
.vs-seg > button.is-on {
  background: var(--cream-card);
  color: var(--study-ac);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.vs-switch {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.vs-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.vs-switch i {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d9d0c3;
  transition: background-color 160ms ease;
  vertical-align: middle;
}
.vs-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 160ms var(--vs-ease);
}
.vs-switch input:checked + i {
  background: var(--study-ac);
}
.vs-switch input:checked + i::after {
  transform: translateX(14px);
}
.vs-switch input:focus-visible + i {
  outline: 2px solid var(--study-ac);
  outline-offset: 2px;
}

/* ── 진행(클래스카드 study-top) ───────────────────────────────────── */
.vs-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--t-sub);
  font-variant-numeric: tabular-nums;
}
.vs-top > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.vs-top-known {
  color: var(--ok-ink);
}
.vs-top-unknown {
  color: var(--danger-ink);
}
.vs-bar {
  flex: 1;
  min-width: 40px;
  height: 8px;
  border-radius: 999px;
  background: #ece4d6;
  overflow: hidden;
}
.vs-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--study-ac),
    color-mix(in srgb, var(--study-ac) 65%, #fff)
  );
  transition: width 240ms var(--vs-ease);
}
.vs-bar--time {
  height: 6px;
}
.vs-bar--time > i {
  transition: width 120ms linear;
}
.vs-bar.is-warn > i {
  background: var(--danger-ink);
}
.vs-bar.is-hint > i {
  background: var(--warn-ink);
}

/* ── 무대(한 카드 묶음) ───────────────────────────────────────────── */
.vs-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: vs-in 220ms var(--vs-ease);
}
@keyframes vs-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ── 카드 ────────────────────────────────────────────────────────── */
.vs-card {
  position: relative;
  border-radius: 18px;
  background: var(--cream-card);
  border: 1.5px solid var(--cream-line);
  box-shadow: var(--vs-shadow);
  padding: 44px 22px 28px;
  min-height: 190px;
  display: grid;
  place-items: center;
  text-align: center;
}
.vs-card-label {
  position: absolute;
  top: 12px;
  left: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--study-tint);
  color: var(--study-ac);
  font-size: 12px; /* 2026-10-23 실측: 11px → 본문 최소 12px */
  font-weight: 800;
  letter-spacing: 0.02em;
}
.vs-card-count {
  position: absolute;
  top: 13px;
  right: 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--t-sub);
  font-variant-numeric: tabular-nums;
}
.vs-word {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--t-title);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.vs-sense {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--t-title);
}
.vs-example {
  font-family: "Noto Serif KR", serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.8;
  text-align: left;
  color: var(--t-title);
  width: 100%;
}
.vs-speaker {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--study-tint);
  color: var(--study-ac);
  flex-shrink: 0;
  transition:
    transform 160ms var(--vs-ease),
    background-color 160ms ease;
}
.vs-speaker:active {
  transform: scale(0.92);
}
.vs-speaker:disabled {
  opacity: 0.35;
}
.vs-speaker--big {
  width: 84px;
  height: 84px;
  background: var(--study-ac);
  color: #fff;
  box-shadow: 0 12px 28px -12px var(--vs-ac-glow);
}
.vs-speaker--big::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--study-ac);
  opacity: 0;
  animation: vs-ring-pulse 1.8s ease-out infinite;
}
.vs-speaker--big {
  position: relative;
}

/* 암기 카드: 위 = 제시 · 아래 = 정답 + 커버(들어 올리기) */
.vs-flip {
  position: relative;
  border-radius: 18px;
  background: var(--cream-card);
  border: 1.5px solid var(--cream-line);
  box-shadow: var(--vs-shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr 1fr;
  min-height: 320px;
  aspect-ratio: 3 / 2;
  max-height: 440px;
  perspective: 1200px;
}
.vs-flip-top,
.vs-flip-bottom {
  display: grid;
  place-items: center;
  padding: 40px 22px 18px;
  text-align: center;
  overflow: auto;
}
.vs-flip-bottom {
  position: relative;
  padding: 18px 22px 20px;
  border-top: 1px solid var(--cream-line);
  background: var(--study-tint);
}
.vs-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 12px;
  background: linear-gradient(160deg, var(--study-ac), var(--study-dp));
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  text-align: center;
  transform-origin: top center;
  backface-visibility: hidden;
  transition:
    transform 320ms var(--vs-ease),
    opacity 240ms ease;
}
.vs-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.2), transparent 60%);
  pointer-events: none;
}
.vs-cover small {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}
.vs-cover > span {
  position: relative;
}
.vs-cover.is-open {
  transform: rotateX(-92deg);
  opacity: 0;
  pointer-events: none;
}
.vs-kbd {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 5px;
  font:
    700 11.5px/1 ui-monospace,
    "SF Mono",
    Menlo,
    monospace;
  /* 2026-10-23 실측: 흰 알파 배경은 초록 «이제 알아요» 위에서 흰 글자 3.6:1 — 어두운 알파로 바꿔 글자 대비를 올린다 */
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: inherit;
  vertical-align: middle;
}
.vs-btn--ghost .vs-kbd,
.vs-btn--no .vs-kbd,
.vs-hint .vs-kbd {
  background: #f1ebe0;
  border-color: var(--cream-line);
  color: var(--t-sub);
}

/* ── 단추 ────────────────────────────────────────────────────────── */
.vs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
  user-select: none;
  transition:
    transform 160ms var(--vs-ease),
    background-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}
.vs-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.vs-btn:disabled {
  opacity: 0.45;
}
.vs-btn--primary {
  background: var(--study-ac);
  color: #fff;
  box-shadow: 0 8px 18px -10px var(--vs-ac-glow);
}
.vs-btn--ok {
  background: var(--ok-ink);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(39, 120, 87, 0.6);
}
.vs-btn--no {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border-color: var(--danger-line);
}
.vs-btn--ghost {
  background: var(--cream-card);
  color: var(--t-title);
  border-color: var(--cream-line);
}
.vs-btn--lg {
  min-height: 54px;
  padding: 0 26px;
  font-size: 16px;
}
@media (hover: hover) and (pointer: fine) {
  .vs-btn--primary:hover:not(:disabled),
  .vs-btn--ok:hover:not(:disabled) {
    filter: brightness(1.06);
  }
  .vs-btn--ghost:hover:not(:disabled) {
    border-color: var(--study-ac);
    color: var(--study-ac);
  }
}
.vs-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.vs-actions > .vs-btn {
  flex: 1 1 170px;
  max-width: 300px;
}
.vs-hint {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t-sub);
  text-align: center;
}

/* ── 보기 타일(리콜·테스트) ───────────────────────────────────────── */
.vs-opts-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 560px) {
  .vs-opts-grid {
    grid-template-columns: 1fr;
  }
}
.vs-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px 12px 12px;
  border-radius: 14px;
  background: var(--cream-card);
  border: 1.5px solid var(--cream-line);
  color: var(--t-title);
  text-align: left;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.55;
  transition:
    transform 160ms var(--vs-ease),
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 160ms ease,
    opacity 200ms ease;
}
.vs-opt:not(:disabled):active {
  transform: scale(0.98);
}
@media (hover: hover) and (pointer: fine) {
  .vs-opt:not(:disabled):hover {
    border-color: var(--study-ac);
    box-shadow: 0 0 0 3px var(--vs-ac-soft);
  }
}
.vs-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 800;
  background: var(--study-tint);
  color: var(--study-ac);
  transition:
    background-color 120ms ease,
    color 120ms ease;
}
.vs-opt-mark {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
}
.vs-opt.is-dim {
  opacity: 0.5;
}
.vs-opt.is-right {
  background: var(--ok-bg);
  border-color: var(--ok-ink);
  color: var(--ok-ink);
  animation: vs-pop 340ms var(--vs-ease);
}
.vs-opt.is-right .vs-num {
  background: var(--ok-ink);
  color: #fff;
}
.vs-opt.is-wrong {
  background: var(--danger-bg);
  border-color: var(--danger-ink);
  color: var(--danger-ink);
  animation: vs-shake 380ms ease;
}
.vs-opt.is-wrong .vs-num {
  background: var(--danger-ink);
  color: #fff;
}
@keyframes vs-pop {
  40% {
    transform: scale(1.03);
  }
}
@keyframes vs-shake {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}
.vs-verdict {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-height: 24px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}
.vs-verdict.is-ok {
  color: var(--ok-ink);
}
.vs-verdict.is-no {
  color: var(--danger-ink);
}

/* ── 스펠: 글자 칸 ────────────────────────────────────────────────── */
.vs-spell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.vs-slots {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  padding: 8px;
  border-radius: 12px;
  cursor: text;
}
.vs-slot {
  width: 38px;
  height: 48px;
  border-radius: 9px;
  border: 1.5px solid var(--cream-line);
  background: var(--cream-card);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--t-title);
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease;
}
.vs-slot--gap {
  width: 14px;
  border: 0;
  background: transparent;
}
.vs-slot.is-cur {
  border-color: var(--study-ac);
  box-shadow: 0 0 0 3px var(--vs-ac-soft);
}
.vs-slot.is-cur:empty::after {
  content: "";
  width: 2px;
  height: 22px;
  background: var(--study-ac);
  animation: vs-blink 1s steps(2) infinite;
}
.vs-slots.is-ok .vs-slot:not(.vs-slot--gap) {
  border-color: var(--ok-ink);
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.vs-slots.is-no .vs-slot:not(.vs-slot--gap) {
  border-color: var(--danger-ink);
  background: var(--danger-bg);
  color: var(--danger-ink);
}
.vs-slots > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 16px; /* 폰 확대 방지 */
  cursor: text;
}
.vs-slots:focus-within {
  outline: 0;
}
@media (max-width: 420px) {
  .vs-slot {
    width: 32px;
    height: 42px;
    font-size: 19px;
  }
}
.vs-input {
  width: 100%;
  max-width: 460px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--cream-line);
  background: var(--cream-card);
  color: var(--t-title);
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.vs-input:focus {
  border-color: var(--study-ac);
  box-shadow: 0 0 0 3px var(--vs-ac-soft);
  outline: 0;
}
.vs-input.is-ok {
  border-color: var(--ok-ink);
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.vs-input.is-no {
  border-color: var(--danger-ink);
  background: var(--danger-bg);
  color: var(--danger-ink);
}
.vs-input::placeholder {
  font-weight: 600;
  color: #b3a893;
}
@keyframes vs-blink {
  to {
    opacity: 0;
  }
}

/* ── 시작 · 끝 화면 ───────────────────────────────────────────────── */
.vs-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 20px;
  border-radius: 18px;
  background: var(--cream-card);
  border: 1.5px solid var(--cream-line);
  box-shadow: var(--vs-shadow);
  text-align: center;
  animation: vs-in 220ms var(--vs-ease);
}
.vs-start-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--study-tint);
  color: var(--study-ac);
}
.vs-start-title {
  font-size: 19px;
  font-weight: 800;
}
.vs-rules {
  display: grid;
  gap: 6px;
  max-width: 540px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--t-sub);
}
.vs-rules > div {
  display: flex;
  gap: 8px;
}
.vs-rules > div::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--study-ac);
}
.vs-end {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px 24px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(180deg, var(--study-tint), var(--cream-card) 70%);
  border: 1.5px solid color-mix(in srgb, var(--study-ac) 25%, var(--cream-line));
  box-shadow: var(--vs-shadow);
  animation: vs-in 240ms var(--vs-ease);
}
.vs-end-title {
  font-size: 20px;
  font-weight: 800;
}
.vs-end-big {
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--study-ac);
  font-variant-numeric: tabular-nums;
  animation: vs-pop-in 460ms var(--vs-ease);
}
.vs-end-big small {
  font-size: 16px;
  font-weight: 800;
  color: var(--t-sub);
  letter-spacing: 0;
}
.vs-end-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--t-sub);
}
.vs-end-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
}
.vs-end-badge.is-ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.vs-end-badge.is-no {
  background: var(--danger-bg);
  color: var(--danger-ink);
}
.vs-end .vs-actions {
  margin-top: 8px;
  width: 100%;
}
@keyframes vs-pop-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
}
.vs-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.vs-confetti i {
  position: absolute;
  top: -14px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: vs-fall 1700ms cubic-bezier(0.25, 0.8, 0.4, 1) forwards;
}
@keyframes vs-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(280px) rotate(560deg);
  }
}
.vs-ring {
  position: relative;
  width: 128px;
  height: 128px;
}
.vs-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.vs-ring circle {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
}
.vs-ring .track {
  stroke: #ece4d6;
}
.vs-ring .fill {
  stroke: var(--study-ac);
  animation: vs-ring 900ms var(--vs-ease);
}
.vs-ring .fill.is-ok {
  stroke: var(--ok-ink);
}
@keyframes vs-ring {
  from {
    stroke-dashoffset: var(--c);
  }
}
.vs-ring-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.vs-ring-num small {
  font-size: 13px;
  font-weight: 800;
  color: var(--t-sub);
  letter-spacing: 0;
}
.vs-wrong-list {
  width: 100%;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--cream-card);
  border: 1.5px solid var(--cream-line);
  text-align: left;
  font-size: 13.5px;
  line-height: 1.7;
}
.vs-wrong-list > b {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--danger-ink);
}
.vs-wrong-list > div {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px dashed var(--cream-line);
}
.vs-wrong-list > div > b {
  flex-shrink: 0;
}
.vs-wrong-list > div > span {
  color: var(--t-sub);
}

/* ── 게임 HUD(점수·시간·플래시) ───────────────────────────────────── */
.vs-hud {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}
.vs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--cream-card);
  border: 1.5px solid var(--cream-line);
  color: var(--t-title);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vs-chip b {
  font-size: 14px;
}
.vs-chip--ac {
  background: var(--study-tint);
  color: var(--study-ac);
  border-color: transparent;
}
.vs-chip--ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: var(--ok-line);
}
.vs-chip--warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-color: var(--warn-line);
}
.vs-chip--no {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border-color: var(--danger-line);
}
.vs-chip.is-pulse {
  animation: vs-pulse 1s ease-in-out infinite;
}
@keyframes vs-pulse {
  50% {
    transform: scale(1.05);
  }
}
.vs-hud-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vs-flash {
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  animation: vs-flash 900ms var(--vs-ease) forwards;
}
.vs-flash.is-ok {
  color: var(--ok-ink);
}
.vs-flash.is-no {
  color: var(--danger-ink);
}
@keyframes vs-flash {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: none;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ── 매칭 ────────────────────────────────────────────────────────── */
.vs-match {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.vs-match-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.vs-tile {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--cream-card);
  border: 2px solid var(--cream-line);
  color: var(--t-title);
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(55, 30, 69, 0.05);
  transition:
    transform 160ms var(--vs-ease),
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 160ms ease,
    opacity 260ms ease;
}
.vs-tile--r {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t-body);
}
.vs-tile:not(:disabled):active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  .vs-tile:not(:disabled):hover {
    border-color: color-mix(in srgb, var(--study-ac) 55%, var(--cream-line));
  }
}
.vs-tile.is-sel {
  border-color: var(--study-ac);
  background: var(--study-tint);
  box-shadow: 0 0 0 3px var(--vs-ac-soft);
  transform: translateY(-1px);
}
.vs-tile.is-hint {
  border-style: dashed;
  border-color: var(--warn-ink);
  background: var(--warn-bg);
}
.vs-tile.is-hint::after {
  content: "힌트";
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--warn-ink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.vs-tile.is-gone {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  border-color: var(--ok-ink);
  background: var(--ok-bg);
}
.vs-tile.is-empty {
  visibility: hidden;
}
@media (max-width: 480px) {
  .vs-tile {
    min-height: 56px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 13px;
  }
  .vs-tile--r {
    font-size: 12.5px;
  }
}
.vs-hurry {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-size: clamp(34px, 8vw, 68px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--danger-ink);
  text-shadow:
    0 2px 0 #fff,
    0 10px 30px rgba(138, 32, 32, 0.3);
  animation: vs-hurry 1500ms var(--vs-ease) forwards;
}
@keyframes vs-hurry {
  0% {
    opacity: 0;
    transform: translateX(60%) scale(0.8);
  }
  25% {
    opacity: 1;
    transform: none;
  }
  75% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateX(-40%) scale(0.9);
  }
}

/* ── 크래시(떨어지는 낱말 · 어두운 무대) ───────────────────────────── */
.vs-field {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, #2b1836 0%, var(--purple) 100%);
  border: 1.5px solid var(--plum-light);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: border-color 200ms ease;
}
.vs-field.is-hurry {
  border-color: var(--danger-ink);
}
.vs-field-band {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(200, 176, 224, 0.22);
  pointer-events: none;
}
.vs-field-band > span {
  position: absolute;
  right: 14px;
  top: 6px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  color: rgba(200, 176, 224, 0.16);
  font-variant-numeric: tabular-nums;
}
.vs-field-band--top {
  border-top: 0;
}
.vs-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 2px dashed rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, rgba(168, 24, 43, 0.08), rgba(168, 24, 43, 0.32));
  pointer-events: none;
}
.vs-ground > span {
  position: absolute;
  right: 14px;
  top: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}
.vs-drop {
  position: absolute;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--cream-card);
  border: 2px solid transparent;
  color: var(--t-title);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.65);
  transition: border-color 160ms ease;
}
.vs-drop.is-near {
  border-color: var(--warn-ink);
}
.vs-drop.is-floor {
  border-color: var(--danger-ink);
  background: var(--danger-bg);
  color: var(--danger-ink);
  animation: vs-shake 420ms ease;
}
.vs-crash-form {
  display: flex;
  gap: 8px;
}
.vs-crash-form .vs-input {
  flex: 1;
  min-width: 0;
  max-width: none;
  text-align: left;
  font-size: 16px;
}

/* ── 테스트 ──────────────────────────────────────────────────────── */
.vs-qhead {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.vs-qnum {
  font-size: 13px;
  font-weight: 800;
  color: var(--study-ac);
  font-variant-numeric: tabular-nums;
}
.vs-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.vs-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2d9ca;
  transition:
    transform 160ms var(--vs-ease),
    background-color 160ms ease;
}
.vs-dots i.is-ok {
  background: var(--ok-ink);
}
.vs-dots i.is-no {
  background: var(--danger-ink);
}
.vs-dots i.is-cur {
  background: var(--study-ac);
  transform: scale(1.3);
}

/* ── 스피킹(검은 무대 · 흰 카드 · 마이크) ───────────────────────────── */
.vs-dark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 16px 24px;
  border-radius: 18px;
  background: #141416;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.vs-dark-tabs .vs-tab {
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
  color: #e8e2ef;
}
.vs-dark-tabs .vs-tab.is-on {
  background: #fff;
  color: var(--study-ac);
  box-shadow: none;
}
.vs-dark-counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #cfc7d8;
  font-variant-numeric: tabular-nums;
}
.vs-dark-counter b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--vs-ok-light);
}
.vs-dark-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  min-height: 230px;
  padding: 24px 22px 22px;
  border-radius: 16px;
  background: #fff;
  color: var(--t-title);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  animation: vs-in 220ms var(--vs-ease);
}
.vs-dark-card .vs-speaker {
  position: absolute;
  top: 12px;
  left: 12px;
}
.vs-dark-card .vs-card-count {
  top: 18px;
}
.vs-dark-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--t-sub);
  text-align: center;
}
.vs-dark-msg.is-ok {
  color: var(--ok-ink);
}
.vs-dark-msg.is-no {
  color: var(--danger-ink);
}
.vs-dark-msg.is-live {
  color: var(--study-ac);
}
.vs-dark-note {
  max-width: 540px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  color: #a79fb3;
}
.vs-dark .vs-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.vs-dark .vs-select {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.vs-dark .vs-opts {
  color: #cfc7d8;
  justify-content: center;
}
.vs-dark .vs-switch i {
  background: rgba(255, 255, 255, 0.25);
}
.vs-dark .vs-switch input:checked + i {
  background: var(--vs-ok-light);
}
.vs-dark .vs-kbd {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}
.vs-mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #cfc7d8;
  letter-spacing: 0.06em;
}
.vs-mic {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--study-ac);
  color: #fff;
  box-shadow: 0 14px 34px -12px var(--vs-ac-glow);
  transition:
    transform 160ms var(--vs-ease),
    background-color 160ms ease,
    opacity 160ms ease;
}
.vs-mic:active:not(:disabled) {
  transform: scale(0.94);
}
.vs-mic:disabled {
  opacity: 0.4;
}
.vs-mic::before,
.vs-mic::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--study-ac);
  opacity: 0;
  pointer-events: none;
}
.vs-mic.is-listening {
  background: var(--danger-ink);
  box-shadow: 0 14px 34px -12px rgba(138, 32, 32, 0.7);
}
.vs-mic.is-listening::before,
.vs-mic.is-listening::after {
  border-color: var(--danger-ink);
}
.vs-mic.is-listening::before {
  animation: vs-ring-pulse 1.4s ease-out infinite;
}
.vs-mic.is-listening::after {
  animation: vs-ring-pulse 1.4s ease-out 0.5s infinite;
}
@keyframes vs-ring-pulse {
  0% {
    transform: scale(0.92);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}
.vs-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
}
.vs-wave i {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--study-ac);
  animation: vs-wave 900ms ease-in-out infinite;
  animation-delay: calc(var(--i) * 90ms);
}
.vs-wave.is-speaking i {
  background: var(--lav-soft);
}
@keyframes vs-wave {
  0%,
  100% {
    height: 6px;
  }
  50% {
    height: 26px;
  }
}
.vs-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vs-rec::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6b6b;
  animation: vs-blink 1s steps(2) infinite;
}
.vs-aloud {
  width: 100%;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.vs-aloud-item {
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  text-align: left;
  transition:
    transform 160ms var(--vs-ease),
    background-color 160ms ease;
}
.vs-aloud-item:not(:disabled):active {
  transform: scale(0.97);
}
.vs-aloud-item b {
  display: block;
  font-size: 15px;
  font-weight: 800;
}
.vs-aloud-item span {
  display: block;
  font-size: 12px;
  color: #bdb4c8;
}
.vs-dark audio {
  width: 100%;
  max-width: 420px;
}
.vs-dark-warn {
  width: 100%;
  max-width: 600px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.vs-dark-warn small {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t-sub);
}

/* ── Dialog 높이(폰 100vh 함정 회피) ─────────────────────────────── */
.vs-dialog {
  max-height: 94vh;
  max-height: 94dvh;
}

/* ── 움직임 줄이기 ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .vs *,
  .vs *::before,
  .vs *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .vs-cover {
    transition: opacity 160ms ease !important;
  }
  .vs-cover.is-open {
    transform: none;
  }
  .vs-confetti,
  .vs-hurry {
    display: none;
  }
  .vs-wave i {
    height: 14px;
  }
}
