/* Session screen — question card + answer chrome + footer */
.session {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

.session__topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.session__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
}

.session__progress { flex: 1; }

.session__hearts {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--warn);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.session__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.session__qcard {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  gap: 24px;
}

.session__qhead {
  display: flex;
  flex-direction: column;
}

.session__qhead-label {
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.session__qhead-kr {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.session__qhead-kr-text {
  font-family: var(--font-kr-display);
  font-size: 56px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.session__qhead-en {
  font-size: 28px;
  margin-top: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  font-family: var(--font-en);
}

.session__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session__opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  min-height: 60px;
  background: var(--surface);
  border: 2px solid var(--hairline-2);
  border-radius: var(--r-md);
  color: var(--ink);
  text-align: left;
  transition: all 0.15s;
  position: relative;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.session__opt--picked   { background: var(--accent-soft); border-color: var(--accent); }
.session__opt--correct  { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); position: relative; }
.session__opt--wrong    { background: var(--warn-soft);   border-color: var(--warn);   color: var(--warn); }

.session__opt-tick {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  animation: opt-tick-pop 0.34s cubic-bezier(0.16, 1.2, 0.3, 1) forwards;
}
.session__opt-tick svg { stroke: var(--surface) !important; }
@keyframes opt-tick-pop {
  0%   { transform: translateY(-50%) scale(0.4); opacity: 0; }
  60%  { transform: translateY(-50%) scale(1.1); opacity: 1; }
  100% { transform: translateY(-50%) scale(1.0); opacity: 1; }
}

.session__opt-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.session__opt--picked .session__opt-num {
  background: var(--accent);
  color: var(--accent-ink);
}

.session__opt-label {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

.session__opt--kr .session__opt-label {
  font-family: var(--font-kr);
  font-size: 22px;
  font-weight: 600;
}

/* Fill blank chips */
.session__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.session__chip {
  padding: 12px 18px;
  background: var(--surface);
  border: 2px solid var(--hairline-2);
  border-radius: var(--r-pill);
  font-family: var(--font-kr);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.session__chip--picked  { background: var(--accent-soft); border-color: var(--accent); }
.session__chip--correct { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.session__chip--wrong   { background: var(--warn-soft);   border-color: var(--warn);   color: var(--warn); }

.session__fill-sentence {
  font-family: var(--font-kr);
  font-size: 36px;
  margin-top: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.session__fill-blank {
  display: inline-block;
  min-width: 80px;
  padding: 0 8px;
  border-bottom: 3px solid var(--accent);
  color: var(--ink-4);
}

.session__fill-blank--filled { color: var(--accent); }

.session__fill-en {
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 12px;
  font-style: italic;
}

/* Listen card (audio + waveform) */
.session__listen-card {
  margin-top: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: 16px;
}

.session__waveform {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 32px;
}

.session__waveform-bar {
  width: 3px;
  background: var(--accent);
  opacity: 0.5;
  border-radius: 1.5px;
}

/* Type-input box */
.session__input-box {
  min-height: 100px;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--hairline-2);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.session__input-box--correct { border-color: var(--accent); }
.session__input-box--wrong   { border-color: var(--warn); }

.session__input-text {
  font-family: var(--font-kr);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  min-height: 40px;
}

.session__input-text--placeholder { color: var(--ink-4); }

.session__input-cursor {
  display: inline-block;
  width: 2px;
  height: 28px;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.4;
  animation: input-caret-fade 1.6s ease-in-out infinite;
}

@keyframes input-caret-fade {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.6; }
}

/* Footer with check button */
.session__footer {
  padding: 20px;
  border-top: 1px solid var(--hairline);
}

/* ── Hangul keyboard ─────────────────────────────────────────
   Class names match the runtime DOM the v1 keyboard.js creates:
   .hangul-kb > .kb-row > .kb-key (variants: .kb-fn, .kb-vowel,
   .kb-cons, .kb-space). Track B's earlier BEM names didn't match
   the JS, leaving the keyboard unstyled. */
.hangul-kb {
  background: var(--bg-2, #ece4d3);
  padding: 10px 6px 14px;
  user-select: none;
  width: 100%;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.hangul-kb .kb-row {
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: 3px 4px;
}

.hangul-kb .kb-key {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  background: var(--surface, #fff);
  border: 1px solid var(--hairline, rgba(0,0,0,0.08));
  border-radius: 8px;
  font-family: var(--font-kr, system-ui);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink, #1d2120);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 60ms ease, background 60ms ease;
}

.hangul-kb .kb-key:active {
  transform: translateY(1px);
  background: var(--surface-2, #f3eddd);
}

.hangul-kb .kb-key.kb-fn {
  flex: 1.4 1 0;
  background: var(--surface-2, #f3eddd);
  color: var(--ink-2, #5a615e);
  font-size: 16px;
}

.hangul-kb .kb-key.kb-fn.active {
  background: var(--accent, #2f5d4a);
  color: var(--accent-ink, #fff);
}

.hangul-kb .kb-key.kb-vowel {
  background: var(--surface, #fff);
}

.hangul-kb .kb-space-row {
  margin-top: 6px;
}

.hangul-kb .kb-key.kb-space {
  flex: 6 1 0;
  background: var(--surface, #fff);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2, #5a615e);
}
