/* English Lesson Studio — v5 "Calm Studio" (2026-10-28).
   Goals: less text on first sight (details collapse the extras), colour = meaning
   (teal story · amber joke · indigo words · rose check · green talk),
   cards with soft elevation instead of borders-in-borders, interactive subtitles. */
:root {
  --paper: #F6F3ED;
  --card: #FFFFFF;
  --ink: #1E1A15;
  --soft: #6A6156;
  --faint: #9B9286;
  --line: #E9E3D8;
  --shadow: 0 1px 2px rgba(40, 30, 15, .05), 0 4px 14px rgba(40, 30, 15, .05);

  --story: #0F766E;  --story-bg: #E7F2F0;
  --joke: #B45309;   --joke-bg: #FFF5DD;  --joke-deep: #3B2A12;
  --words: #4338CA;  --words-bg: #EEF0FD;
  --check: #BE185D;  --check-bg: #FCEEF4;
  --talk: #15803D;   --talk-bg: #EAF6EE;

  --accent: var(--story);
  --vi: #8A6232;
  --mark: #FDE68A;
  --ok: #15803D;
  --bad: #B91C1C;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131210; --card: #1D1B18; --ink: #EEE9E0; --soft: #A69D90; --faint: #7D756A; --line: #2D2924;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    --story: #4FBFB1; --story-bg: #17302D;
    --joke: #F0A84A; --joke-bg: #2C2414; --joke-deep: #FBE7C2;
    --words: #A5ADFF; --words-bg: #1E2140;
    --check: #F27AAE; --check-bg: #351A27;
    --talk: #5BD08A; --talk-bg: #16301F;
    --vi: #DDB27C; --mark: #5E4C14; --ok: #4ADE80; --bad: #F87171;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.6 "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
p { margin: 0 0 8px; }
::selection { background: var(--story-bg); }

/* ── TOP BAR ── */
.bar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1320px; margin: 0 auto; padding: 0 14px; height: 48px; display: flex; align-items: center; gap: 10px; }
.back {
  text-decoration: none; color: var(--ink); font-size: 17px; width: 32px; height: 32px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--card); box-shadow: var(--shadow);
}
.bar-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.bar-show { font-weight: 600; }
.bar-sep { margin: 0 6px; color: var(--faint); }
.bar-step { color: var(--soft); }
.bar-actions { display: flex; gap: 5px; flex-shrink: 0; }
.pill-toggle, .pill-link {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
  font-size: 12.5px; font-weight: 600; color: var(--soft); text-decoration: none; white-space: nowrap;
}
.pill-toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
#viToggle[aria-pressed="true"] { background: var(--vi); border-color: var(--vi); color: #fff; }

.step-rail { max-width: 1320px; margin: 0 auto; padding: 0 14px 8px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.step-rail::-webkit-scrollbar { display: none; }
.rail-pill {
  border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 500; white-space: nowrap;
  color: var(--soft); background: transparent; border: 1px solid transparent;
}
.rail-pill:hover { color: var(--ink); background: var(--card); }
.rail-pill.visited:not(.active) { color: var(--ink); }
.rail-pill.active { background: var(--ink); color: var(--paper); font-weight: 600; }
.progress { height: 2px; background: var(--line); }
.progress i { display: block; height: 100%; width: 0; background: var(--story); transition: width .25s ease-out; }

/* ── LAYOUT ── */
.wrap { max-width: 700px; margin: 0 auto; padding: 14px 16px 100px; }
@media (min-width: 960px) {
  .wrap.studio-grid {
    max-width: 1320px; display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
    gap: 40px; align-items: start; padding: 24px 28px 110px;
  }
  .stage-col { position: sticky; top: 100px; display: block !important; }
  .content-col { max-width: 780px; }
}

/* ── VIDEO + INTERACTIVE SUBTITLES ── */
.video-frame { margin-bottom: 14px; }
.video-box { position: relative; container-type: inline-size; border-radius: 14px; overflow: hidden; background: #000; }
.video-box video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-box:fullscreen { border-radius: 0; display: flex; align-items: center; }
.video-box:fullscreen video { height: 100vh; aspect-ratio: auto; }

.cc {
  position: absolute; left: 4%; right: 4%; bottom: 17%; text-align: center; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.cc[hidden] { display: none !important; }
.cc-line, .cc-vi {
  display: inline-block; max-width: 100%; padding: .15em .55em; border-radius: 6px;
  background: rgba(10, 8, 6, .72); color: #fff; line-height: 1.35;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.cc-line { font-size: clamp(13px, 3.7cqi, 30px); font-weight: 500; }
.cc-vi { font-size: clamp(11px, 3cqi, 24px); color: #FCE7B2; }
.cc-vi:empty { display: none; }
.cc-who { color: #7DD3C8; font-weight: 700; margin-right: .35em; font-size: .82em; text-transform: uppercase; letter-spacing: .03em; }
.cc-who:empty { display: none; }
.cc-term {
  pointer-events: auto; cursor: pointer; background: transparent; color: #FDE047; font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: rgba(253,224,71,.55);
  padding: 0;
}
.cc-term:hover { color: #fff; text-decoration-color: #FDE047; }
.cc.en-only .cc-vi { display: none; }
.cc.empty { display: none; }
.video-box.is-paused .cc { bottom: 25%; }

/* Phone: subtitles sit in a strip UNDER the picture (no clash with controls) */
@media (max-width: 959px) {
  .video-box:not(:fullscreen) .cc {
    position: static; display: flex; padding: 9px 12px 10px; gap: 2px; min-height: 4.6em;
    background: #15120E; justify-content: center;
  }
  .video-box:not(:fullscreen) .cc.empty .cc-line, .video-box:not(:fullscreen) .cc.empty .cc-vi { visibility: hidden; }
  .video-box:not(:fullscreen) .cc-line, .video-box:not(:fullscreen) .cc-vi { background: transparent; padding: 0; }
  .video-box:not(:fullscreen) .cc-line { font-size: 15.5px; }
  .video-box:not(:fullscreen) .cc-vi { font-size: 13.5px; }
  .video-box:not(:fullscreen) .cc-vi:empty { display: block; }
  #replayBitBtn { display: none; }
}

.cc-pop {
  position: absolute; left: 50%; top: 8%; transform: translateX(-50%); width: min(88%, 420px);
  background: var(--card); color: var(--ink); border-radius: 12px; padding: 12px 14px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: 14.5px; z-index: 5;
}
.cc-pop[hidden] { display: none; }
.cc-pop-x { position: absolute; top: 4px; right: 8px; font-size: 22px; color: var(--soft); line-height: 1; padding: 4px; }
.cc-pop-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 22px; }
.cc-pop-head b { font-family: Literata, Georgia, serif; font-size: 19px; color: var(--words); }
.cc-pop-vi { color: var(--vi); font-weight: 600; margin: 4px 0 2px; }
.cc-pop-en { color: var(--soft); margin: 0; font-size: 13.5px; }

.stage-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tool-chip {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; flex-shrink: 0;
}
.tool-chip:hover { border-color: var(--story); color: var(--story); }
.tool-chip.on { background: var(--story); border-color: var(--story); color: #fff; }
.stage-col.locked #subBtn { opacity: .45; pointer-events: none; }
.stage-hint { font-size: 12.5px; color: var(--faint); margin: 6px 2px 0; }

/* Live transcript (desktop) */
.live-transcript { display: none; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.live-transcript-head { padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lt-title { font-size: 13px; font-weight: 700; color: var(--story); }
.lt-hint { font-size: 12px; color: var(--faint); }
.live-transcript-list { max-height: calc(100dvh - 470px); min-height: 180px; overflow-y: auto; padding: 4px 10px 12px; }
.lt-group-label { position: sticky; top: 0; z-index: 2; background: var(--card); color: var(--faint); font-size: 11.5px; font-weight: 600; padding: 8px 6px 4px; }
.lt-line { border-radius: 8px; padding: 7px 6px !important; border-top: 0 !important; }
.lt-line:hover { background: var(--paper); }
.lt-line.active { background: var(--joke-bg); }
.lt-line .vi { font-size: 13.5px; }
@media (min-width: 960px) {
  .live-transcript { display: block; }
  .beat .lines { display: none; }
}

/* ── TYPOGRAPHY ── */
.screen { display: none; }
.screen.on { display: block; animation: fadein .18s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.kicker { font-size: 12.5px; font-weight: 600; color: var(--faint); margin: 2px 0 4px; letter-spacing: .02em; }
h1 { font-family: Literata, Georgia, serif; font-weight: 600; font-size: 25px; line-height: 1.22; letter-spacing: -.015em; margin: 0 0 6px; text-wrap: balance; }
@media (min-width: 960px) { h1 { font-size: 30px; } }
.lead-vi { font-size: 15px; margin-bottom: 14px; }
.lead { font-size: 16.5px; color: var(--soft); }
.muted { color: var(--soft); }
.body-en { font-size: 16px; margin-bottom: 4px; }
.vi { color: var(--vi); font-size: 14.5px; line-height: 1.55; }
.vi-inline { color: var(--faint); font-weight: 500; font-size: 13px; margin-left: 4px; }
body.no-vi .vi, body.no-vi .vi-inline { display: none !important; }

.sec { display: flex; align-items: baseline; gap: 8px; font-size: 16px; font-weight: 700; margin: 30px 0 10px; letter-spacing: -.005em; }
.sec-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; transform: translateY(-1px); background: var(--story); }
.sec--joke .sec-dot { background: var(--joke); }
.sec--words .sec-dot { background: var(--words); }
.sec--check .sec-dot { background: var(--check); }
.sec--talk .sec-dot { background: var(--talk); }

/* ── COACH (collapsed by default) ── */
.coach { margin: 10px 0 6px; border-radius: 10px; background: var(--story-bg); }
.coach summary {
  list-style: none; cursor: pointer; padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: var(--story);
  display: flex; align-items: center; gap: 8px;
}
.coach summary::-webkit-details-marker { display: none; }
.coach summary::after { content: "Mở"; margin-left: auto; font-size: 12px; font-weight: 500; opacity: .75; }
.coach[open] summary::after { content: "Đóng"; }
.coach-ico { width: 18px; height: 18px; border-radius: 50%; background: var(--story); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-style: italic; font-family: Georgia, serif; }
.coach-body { padding: 0 14px 12px 38px; font-size: 14.5px; line-height: 1.6; }

/* ── "MORE" disclosure ── */
.more { margin-top: 8px; font-size: 14px; }
.more summary { cursor: pointer; color: var(--soft); font-weight: 600; font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; border-radius: 50%; background: var(--paper); font-weight: 700; }
.more[open] summary::before { content: "−"; }
.more > :not(summary) { margin-top: 8px; }
.more--block { background: var(--card); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); margin-top: 22px; }
.ex-film, .ex-work { font-size: 14px; margin-bottom: 4px; }
.ex-film { color: var(--soft); font-style: italic; }
.ex-tag { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--story); background: var(--story-bg); border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.ex-tag--work { color: var(--words); background: var(--words-bg); }
.ex-vi { font-size: 13.5px; }

/* ── WORD CARDS ── */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.wcard {
  position: relative; background: var(--card); border-radius: 14px; padding: 13px 15px 12px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.wcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.wcard-term { font-family: Literata, Georgia, serif; font-size: 18.5px; font-weight: 600; color: var(--words); line-height: 1.3; }
.ipa { font-size: 13px; color: var(--faint); margin-top: 1px; }
.wcard-vi { font-weight: 600; margin: 6px 0 2px; font-size: 14.5px; }
.wcard-en { font-size: 14px; color: var(--soft); margin: 0; }
.wcard-line { font-size: 14px; font-style: italic; color: var(--ink); margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--words-bg); }
.wcard-kind { margin-top: 10px; align-self: flex-start; font-size: 11px; color: var(--faint); }
.tts-btn {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; background: var(--paper); color: var(--soft);
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
}
.tts-btn:hover { background: var(--words-bg); color: var(--words); }
.deck-hide-vi .rcard-vi, .deck-hide-vi .exec-vi { filter: blur(6px); cursor: pointer; transition: filter .15s; }
.deck-hide-vi .wcard:hover .rcard-vi, .deck-hide-vi .wcard:active .rcard-vi { filter: none; }

/* Warm-up decks */
.deck { margin-top: 26px; }
.deck-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.deck-badge { font-size: 12px; font-weight: 600; color: var(--words); }
.deck-title { font-family: Literata, Georgia, serif; font-size: 19px; font-weight: 600; margin: 2px 0 0; line-height: 1.3; }

/* Talk prompts */
.talk { background: var(--talk-bg); border-radius: 14px; padding: 13px 15px; margin-top: 10px; }
.talk-tag { font-size: 12px; font-weight: 700; color: var(--talk); }
.talk-en { font-size: 16px; font-weight: 500; margin: 4px 0; }

/* ── START ── */
.story-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 8px; }
.story-steps li { counter-increment: s; position: relative; background: var(--card); box-shadow: var(--shadow); border-radius: 12px; padding: 11px 14px 11px 46px; font-size: 15px; }
.story-steps li::before { content: counter(s); position: absolute; left: 14px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--story-bg); color: var(--story); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.cast-card { background: var(--card); border-radius: 12px; padding: 10px 13px; box-shadow: var(--shadow); display: flex; flex-direction: column; font-size: 13.5px; color: var(--soft); }
.cast-card b { color: var(--ink); font-size: 15px; }
.cast-card .vi { font-size: 13px; }
.kw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-chip { background: var(--words-bg); color: var(--words); border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.kw-chip .vi { font-size: 13px; }

/* ── BEAT ── */
.beat-actions { display: flex; gap: 8px; margin: 14px 0 8px; }
.play-big {
  flex: 1; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px; background: var(--story); color: #fff; font-weight: 600; font-size: 15px;
}
.play-big span { font-weight: 400; opacity: .8; font-variant-numeric: tabular-nums; }
.play-secondary { padding: 12px 14px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font-weight: 600; font-size: 14.5px; }
.play-secondary:hover { color: var(--story); }

.joke { background: var(--joke-bg); border-radius: 16px; padding: 16px 16px 14px; }
.joke .vi { color: color-mix(in srgb, var(--vi) 85%, var(--joke)); }
.map { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.map li { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; background: color-mix(in srgb, var(--card) 70%, transparent); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.map-eq { color: var(--joke); font-weight: 700; }
.map-b { font-weight: 600; }
.punch { margin-top: 14px; background: var(--joke-deep); color: #FFF7E6; border-radius: 12px; padding: 14px 16px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .punch { color: #1E1A15; } }
.punch-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.punch-line { font-family: Literata, Georgia, serif; font-size: 20px; line-height: 1.35; margin: 4px 0 8px; }
.punch-foot { display: flex; align-items: center; gap: 8px; }
.punch-who { font-weight: 600; font-size: 14px; opacity: .85; margin-right: auto; }
.punch-play { background: rgba(255,255,255,.14); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.punch .tts-btn { background: rgba(255,255,255,.14); color: inherit; }
.punch-note { font-size: 13.5px; opacity: .85; margin: 10px 0 0; }
.punch .vi { color: #F7D9A0; }

.culture { margin-top: 10px; background: var(--card); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 14.5px; }
.culture-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--story); background: var(--story-bg); border-radius: 4px; padding: 1px 6px; margin-right: 8px; }
.culture .vi { margin: 4px 0 0; font-size: 13.5px; }

.ln { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.ln-time { background: var(--story-bg); color: var(--story); border-radius: 6px; font-size: 12px; font-weight: 600; height: 24px; font-variant-numeric: tabular-nums; }
.who { font-weight: 700; color: var(--story); margin-right: 4px; }
.ln .vi { margin-top: 2px; font-size: 13.5px; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ── OXFORD UNITS ── */
.unit { margin-top: 34px; }
.unit-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.unit-num { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: var(--words); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.unit-title { font-family: Literata, Georgia, serif; font-size: 19px; font-weight: 600; margin: 0; line-height: 1.25; }
.unit-sub { font-size: 13px; color: var(--faint); margin: 2px 0 0; }
.unit-sub .vi { font-size: 13px; }
.ox-bridge { font-size: 14.5px; background: var(--joke-bg); border-radius: 10px; padding: 10px 13px; margin: 0 0 10px; }

/* ── GRAMMAR ── */
.gram-grid { display: grid; gap: 10px; margin-top: 16px; }
.gcard { background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); border-top: 4px solid var(--words); }
.gcard--1 { border-top-color: var(--check); }
.gcard--2 { border-top-color: var(--story); }
.gcard--3 { border-top-color: var(--joke); }
.gcard-badge { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--faint); }
.gpattern { font-family: Literata, Georgia, serif; font-size: 20px; font-weight: 600; margin: 2px 0; }
.gquote { font-size: 14.5px; font-style: italic; margin: 8px 0 2px; }
.contrast { background: var(--card); border-radius: 14px; padding: 12px 14px; margin: 14px 0; box-shadow: var(--shadow); display: grid; gap: 6px; }
.contrast-row { font-size: 15px; display: flex; gap: 10px; align-items: baseline; }
.contrast-k { flex-shrink: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--story); background: var(--story-bg); padding: 2px 7px; border-radius: 4px; }
.contrast-k--b { color: var(--joke); background: var(--joke-bg); }
.tip { background: var(--check-bg); border-radius: 12px; padding: 12px 14px; margin: 18px 0 0; font-size: 14.5px; }
.tip .vi { display: block; margin-top: 4px; }

/* ── QUESTIONS ── */
.q { background: var(--card); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); border-left: 4px solid var(--check); }
.q-num { font-size: 12px; font-weight: 600; color: var(--faint); margin-bottom: 4px; }
.q-text { font-weight: 600; font-size: 15.5px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: var(--paper);
  border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; margin-top: 7px; font-size: 14.5px; transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--check); }
.opt-k { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--card); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: var(--soft); }
.opt.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--card)); font-weight: 600; }
.opt.right .opt-k { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, var(--card)); }
.opt.wrong .opt-k { background: var(--bad); color: #fff; }
.q.done .opt { pointer-events: none; }
.fb { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14.5px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.chip:hover { border-color: var(--story); color: var(--story); }
.chip.on { background: var(--story); border-color: var(--story); color: #fff; }
.reveal { display: none; }
.revealed .reveal { display: block; }
.revealed span.reveal { display: inline; }
.pairs { padding-left: 18px; }
.order-lines { padding-left: 20px; font-size: 14.5px; }
.catch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.catch .reveal { flex-basis: 100%; margin: 4px 0 0; }

/* ── DONE ── */
.recap { display: grid; gap: 6px; }
.recap-row { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 10px; padding: 7px 12px; box-shadow: var(--shadow); font-size: 15px; }
.recap-row .vi { margin-left: auto; font-size: 13.5px; text-align: right; }
.rate-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.done-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ── BOTTOM NAV ── */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 10px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
}
.nav button { border-radius: 12px; padding: 11px 16px; font-size: 14.5px; font-weight: 600; }
.nav-prev { background: var(--card); box-shadow: var(--shadow); flex: 0 0 auto; }
.nav-next { background: var(--ink); color: var(--paper); flex: 1; max-width: 420px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav button:disabled { opacity: .35; }
