/* Fluent. Clean, precise product UI in the OpenRouter design language:
   near-white canvas, ink text, hairline borders, 8px cards, 6px controls, one violet accent. */
:root {
  --bg: #fcfcfe; --bg-2: #f6f6f9;
  --surface: #ffffff; --surface-2: rgba(3, 8, 10, .031); --surface-3: rgba(3, 8, 10, .06); --surface-4: rgba(3, 8, 10, .09);
  --line: rgba(3, 8, 10, .078); --line-strong: rgba(3, 8, 10, .14);
  --text: #03080a; --text-2: #505456; --text-3: #6b7073;
  --primary: #7624f4; --primary-hover: #6519e0; --on-primary: #fcfcfe; --primary-soft: rgba(118, 36, 244, .078); --primary-line: rgba(118, 36, 244, .35);
  --live: #e5372b; --live-soft: rgba(229, 55, 43, .12);
  --good: #0f9d63; --good-soft: rgba(15, 157, 99, .09);
  --bad: #d93a2b; --bad-soft: rgba(217, 58, 43, .08);
  --shadow-pop: 0 1px 2px rgba(3, 8, 10, .06), 0 12px 32px -8px rgba(3, 8, 10, .16);
  --r-lg: 12px; --r: 8px; --r-sm: 6px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --top: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0f; --bg-2: #111116;
    --surface: #131318; --surface-2: rgba(255, 255, 255, .04); --surface-3: rgba(255, 255, 255, .07); --surface-4: rgba(255, 255, 255, .1);
    --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .14);
    --text: #f4f4f6; --text-2: #b0b3b8; --text-3: #8b8f96;
    --primary: #9a63ff; --primary-hover: #a978ff; --on-primary: #0b0b0f; --primary-soft: rgba(154, 99, 255, .12); --primary-line: rgba(154, 99, 255, .45);
    --live: #ff5a4e; --live-soft: rgba(255, 90, 78, .16);
    --good: #34d399; --good-soft: rgba(52, 211, 153, .12);
    --bad: #ff7a6b; --bad-soft: rgba(255, 122, 107, .12);
    --shadow-pop: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -10px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 450 14px/1.625 var(--font); -webkit-font-smoothing: antialiased; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
body.focus { padding-bottom: 0; }
body.focus .topbar, body.focus .nav { display: none; }
::selection { background: var(--primary-soft); color: var(--text); }
input, textarea { caret-color: var(--primary); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
a { color: inherit; text-decoration: none; }
a.link, .link { color: var(--primary); font-weight: 500; }
a.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
.ic { flex: 0 0 auto; display: block; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.04em; }
h2 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; }
h3 { font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0; }
.lead { font-size: 16px; line-height: 1.7; color: var(--text-2); max-width: 62ch; }
.body { color: var(--text-2); max-width: 68ch; }
.meta { font-size: 13px; line-height: 1.5; color: var(--text-3); font-weight: 450; }
.sm { font-size: 13px; } .xs { font-size: 12px; }
.muted { color: var(--text-3); }
.num { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.center { justify-content: center; } .row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: calc(var(--top) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 20px 0; display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: -.035em; color: var(--text); }
.wordmark::before { content: ""; width: 26px; height: 26px; border-radius: 8px; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21'/%3E%3C/svg%3E") center / 16px no-repeat; }
.wordmark b { font-weight: 700; color: var(--text); }
.readouts { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.readout-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 6px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.readout-chip .num { color: var(--text); }
.readout-chip.hot, .readout-chip.hot .num { color: var(--primary); }
.readout-chip:hover { background: var(--surface-2); }

.lamp { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .02em; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.lamp i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.lamp .lamp-on { display: none; }
body.on-air .lamp { background: var(--live); border-color: var(--live); color: #fff; }
body.on-air .lamp i { background: #fff; animation: blink 1s infinite; }
body.on-air .lamp .lamp-on { display: inline; } body.on-air .lamp .lamp-off { display: none; }

.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--line); }
.nav a { flex: 1; max-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 6px; color: var(--text-3); font-size: 11px; font-weight: 500; }
.nav a .ic { width: 20px; height: 20px; }
.nav a.on { color: var(--primary); }
@media (min-width: 900px) {
  body { padding-bottom: 48px; }
  .nav { top: env(safe-area-inset-top); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); height: var(--top); padding: 0; gap: 2px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; align-items: center; }
  .nav a { flex-direction: row; gap: 6px; max-width: none; height: 32px; padding: 0 10px; font-size: 14px; color: var(--text-2); }
  .nav a .ic { width: 16px; height: 16px; }
  .nav a:hover { background: var(--surface-2); color: var(--text); }
  .nav a.on { color: var(--text); background: var(--surface-3); }
}

.page { max-width: 760px; margin: 0 auto; padding: 40px 20px 56px; }
.page.wide { max-width: 1080px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head p { margin-top: 2px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel.tight { padding: 14px 16px; }
@media (min-width: 700px) { .panel { padding: 24px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; line-height: 1; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; -webkit-tap-highlight-color: transparent; text-align: center; }
.btn:hover { background: var(--bg-2); border-color: var(--line-strong); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { background: transparent; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--text-2); padding: 0 10px; }
.btn.quiet:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 8px; }
.btn.lg .ic { width: 18px; height: 18px; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.block { display: flex; width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); cursor: pointer; transition: background .15s, color .15s; flex: 0 0 auto; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn .ic { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.center { justify-content: center; }

/* ---------- meters ---------- */
.vu { display: inline-flex; gap: 2px; align-items: center; }
.vu i { width: 5px; height: 14px; border-radius: 2px; background: var(--surface-4); transition: background .3s; }
.vu i.on { background: var(--primary); }
.vu.full i.on { background: var(--good); }
.vu.wide { display: flex; } .vu.wide i { flex: 1; width: auto; height: 6px; border-radius: 3px; }
.progress { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); border-radius: 4px; transition: width .5s var(--ease); }
.score { display: flex; align-items: center; gap: 14px; }
.score-num { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.04em; }
.score-num.great { color: var(--good); } .score-num.low { color: var(--bad); }
.score-text { display: flex; flex-direction: column; gap: 6px; }
.readout { display: flex; flex-direction: column; gap: 2px; }
.readout .num { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; }
.readout span:last-child { font-size: 13px; color: var(--text-3); }
.readout.good .num { color: var(--good); } .readout.bad .num { color: var(--bad); }
.readouts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.readouts-grid > .readout { background: var(--surface); padding: 14px 16px; }

/* ---------- board ---------- */
.hello .meta { margin-top: 10px; }
.next-up { margin-top: 28px; }
.next-up h2 { font-size: clamp(22px, 3.4vw, 28px); font-weight: 700; letter-spacing: -.03em; margin: 6px 0 6px; }
.next-up .goal-line { color: var(--text-2); }
.next-up .btn-row { margin-top: 20px; align-items: center; gap: 14px; }
.goal-meter { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.goal-meter .vu { flex: 1; }
.goal-meter .meta { white-space: nowrap; }
.standup { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.standup div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.standup div:first-child { border-top: 0; }
.standup dt { color: var(--text-3); font-size: 13px; }
.standup dd { margin: 0; color: var(--text-2); }
.standup dd b { color: var(--text); font-weight: 600; }

.sprint { margin-top: 40px; }
.rundown-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rundown-head h2 { font-size: 17px; }
.rundown-head p { margin-top: 2px; }
.rundown { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.seg { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); transition: background .15s; }
.seg:first-child { border-top: 0; }
a.seg:hover { background: var(--bg-2); }
.seg-no { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; font-family: var(--mono); }
.seg-title { font-weight: 500; font-size: 14px; color: var(--text); }
.seg-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; display: flex; align-items: center; gap: 5px; }
.seg-sub .ic { width: 13px; height: 13px; }
.seg-state { display: flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 13px; font-weight: 500; }
.seg-state .ic { width: 15px; height: 15px; }
.seg.next { background: var(--primary-soft); }
.seg.next .seg-no, .seg.next .seg-state { color: var(--primary); }
.seg.done .seg-title { color: var(--text-2); }
.seg.locked { color: var(--text-3); } .seg.locked .seg-title { color: var(--text-3); }
.stars { display: inline-flex; gap: 1px; color: #f5a524; }
.stars .off { color: var(--surface-4); }
.stars .ic { fill: currentColor; stroke: none; }
.grad { display: flex; align-items: center; gap: 14px; margin-top: 36px; color: var(--text); }
.grad .ic:first-child { color: var(--primary); }
a.panel:hover { border-color: var(--line-strong); }

/* ---------- onboarding ---------- */
.onboard { max-width: 520px; margin: 0 auto; padding: 56px 20px 40px; }
.onboard h1 { font-size: clamp(34px, 6.5vw, 52px); }
.onboard .lead { margin-top: 16px; }
.promises { list-style: none; padding: 0; margin: 28px 0 32px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.promises li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--text-2); }
.promises li:first-child { border-top: 0; }
.promises .ic { color: var(--primary); margin-top: 3px; width: 18px; height: 18px; }
.steps { display: flex; gap: 6px; margin-bottom: 32px; }
.steps i { height: 4px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.steps i.on { background: var(--primary); }
.field { width: 100%; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 450 16px var(--font); transition: border-color .15s, box-shadow .15s; }
.field::placeholder { color: var(--text-3); }
.field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field.search { height: 40px; font-size: 14px; padding-left: 38px; }
.search-wrap { position: relative; }
.search-wrap > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; width: 16px; height: 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 20px 0 28px; }
.choice-grid.one { grid-template-columns: 1fr; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--line-strong); }
.choice.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary) inset; }
.choice b { font-weight: 600; } .choice small { color: var(--text-3); font-size: 13px; }
.choice .num { font-size: 18px; }

/* ---------- player ---------- */
.player { max-width: 680px; margin: 0 auto; padding: 0 20px 150px; min-height: 100vh; }
.player-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 60px; background: linear-gradient(var(--bg) 75%, transparent); }
.player-top .progress { flex: 1; }
.combo { min-width: 48px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; color: var(--primary); font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s; }
.combo .ic { width: 14px; height: 14px; }
.combo.show { opacity: 1; }
.combo.bump { animation: bump .32s var(--ease); }
@keyframes bump { 40% { transform: scale(1.2); } }
.stage { position: relative; padding-top: 20px; animation: stageIn .4s var(--ease); }
@keyframes stageIn { from { opacity: 0; transform: translateY(8px); } }
.float-xp { position: absolute; right: 0; top: 0; color: var(--good); font-size: 14px; font-weight: 600; animation: floatUp 1.1s var(--ease) forwards; pointer-events: none; }
@keyframes floatUp { to { transform: translateY(-24px); opacity: 0; } }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; transform: translateY(105%); transition: transform .35s var(--ease); background: var(--surface); border-top: 1px solid var(--line); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px -18px rgba(3, 8, 10, .25); }
.sheet.show { transform: none; }
.sheet.good { background: color-mix(in srgb, var(--good) 7%, var(--surface)); border-top-color: color-mix(in srgb, var(--good) 40%, transparent); }
.sheet.bad { background: color-mix(in srgb, var(--bad) 6%, var(--surface)); border-top-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.sheet-inner { max-width: 680px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sheet-msg { display: flex; gap: 12px; align-items: flex-start; }
.sheet-msg .badge-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; color: #fff; }
.sheet-msg .badge-ic .ic { width: 15px; height: 15px; }
.sheet.good .badge-ic { background: var(--good); } .sheet.bad .badge-ic { background: var(--bad); }
.sheet-msg b { font-size: 15px; font-weight: 600; display: block; } .sheet.good .sheet-msg b { color: var(--good); } .sheet.bad .sheet-msg b { color: var(--bad); }
.sheet-msg p { color: var(--text-2); margin-top: 2px; max-width: 60ch; }
@media (max-width: 560px) { .sheet-inner { flex-direction: column; align-items: stretch; } .sheet-inner .btn { width: 100%; } }

/* briefing */
.brief h1 { margin-top: 6px; }
.done-when { margin-top: 16px; display: flex; gap: 10px; color: var(--text-2); font-size: 15px; }
.done-when .ic { color: var(--primary); margin-top: 3px; width: 18px; height: 18px; }
.tip { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tip h3 { margin-bottom: 6px; }
.ex { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.ex:first-of-type { margin-top: 14px; }
.ex-wrong { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
.ex-right { display: flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
.boss-note { margin-top: 20px; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--primary-soft); color: var(--text); }
.boss-note .ic { color: var(--primary); margin-top: 3px; width: 18px; height: 18px; }

/* practice */
.prompter { font-size: clamp(24px, 4.2vw, 32px); line-height: 1.35; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.prompter .w { transition: color .3s; }
.prompter .w.ok { color: var(--good); }
.prompter .w.miss { color: var(--bad); text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.prompt { font-size: clamp(19px, 3vw, 22px); line-height: 1.4; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; color: var(--text-2); }
.hint .ic { color: var(--primary); margin-top: 4px; width: 16px; height: 16px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; margin-top: 12px; }
.tag-chip .ic { width: 13px; height: 13px; }

.booth { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.meter-live { width: 100%; max-width: 420px; height: 48px; display: block; }
.mic { width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(3, 8, 10, .12), 0 8px 24px -8px var(--primary-line); transition: background .2s, box-shadow .3s var(--ease), transform .12s; }
.mic:hover { background: var(--primary-hover); }
.mic:active { transform: scale(.96); }
.mic .ic { width: 28px; height: 28px; }
.mic.live { background: var(--live); color: #fff; box-shadow: 0 0 0 8px var(--live-soft); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 14px rgba(229, 55, 43, .06); } }
.mic-label { font-size: 13px; color: var(--text-3); font-weight: 500; min-height: 20px; text-align: center; }
.heard { min-height: 22px; margin-top: 14px; color: var(--text-3); text-align: center; }
.heard.live { color: var(--text-2); }
.heard.box { min-height: 88px; text-align: left; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.heard audio { width: 100%; max-width: 360px; }
.result { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.result .btn-row { margin-top: 18px; }
.self-rate { margin-top: 16px; text-align: center; }
.self-rate .btn-row { justify-content: center; margin-top: 10px; }

.options { display: grid; gap: 8px; margin-top: 20px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 14px; text-align: left; font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--text); border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.opt:hover:not(:disabled) { border-color: var(--line-strong); background: var(--bg-2); }
.opt:disabled { cursor: default; }
.opt .key { flex: 0 0 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; border: 1px solid var(--line-strong); font-size: 11px; font-weight: 600; color: var(--text-3); font-family: var(--mono); }
.opt.right { border-color: var(--good); background: var(--good-soft); box-shadow: 0 0 0 1px var(--good) inset; } .opt.right .key { background: var(--good); border-color: var(--good); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); box-shadow: 0 0 0 1px var(--bad) inset; animation: shake .3s; } .opt.wrong .key { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt.dim { opacity: .55; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.listen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.transcript { margin-top: 12px; color: var(--text-2); }

.pair-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 12px; }
.big-play { width: 88px; height: 88px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 24px -8px var(--primary-line); transition: transform .12s, background .2s; }
.big-play:hover { background: var(--primary-hover); } .big-play:active { transform: scale(.96); }
.big-play .ic { width: 34px; height: 34px; }
.pair-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.opt.word { justify-content: center; font-size: clamp(22px, 4.5vw, 28px); font-weight: 700; letter-spacing: -.03em; min-height: 88px; }
.stress-word { font-size: clamp(32px, 6.5vw, 44px); font-weight: 700; letter-spacing: -.04em; text-align: center; margin-top: 4px; }
.syllables { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.syl { min-width: 64px; height: 56px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 20px; font-weight: 600; cursor: pointer; transition: transform .2s var(--ease), border-color .15s, background .15s; }
.syl:hover:not(:disabled) { border-color: var(--line-strong); background: var(--bg-2); }
.syl.right { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.syl.stressed { transform: scale(1.12); font-weight: 800; }
.syl.wrong { border-color: var(--bad); background: var(--bad-soft); }
.answer-line { min-height: 64px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 0; margin-top: 16px; border-bottom: 1px solid var(--line-strong); }
.answer-line.right { border-color: var(--good); } .answer-line.wrong { border-color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 20px 0; min-height: 40px; }
.chip { height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity .15s, background .15s; box-shadow: 0 1px 1px rgba(3, 8, 10, .04); }
.chip:hover:not(:disabled) { background: var(--bg-2); }
.chip.used { opacity: .2; } .chip.on { border-color: var(--primary-line); background: var(--primary-soft); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.kw-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--line-strong); color: var(--text-3); font-size: 13px; font-weight: 500; transition: all .25s var(--ease); }
.kw-chip.on { border: 1px solid var(--good); background: var(--good-soft); color: var(--good); }
label.kw-chip { cursor: pointer; border-style: solid; }
.timer { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.timer .progress { flex: 1; height: 4px; }
.timer .num { font-size: 14px; min-width: 40px; text-align: right; color: var(--text-2); }
details.peek { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
details.peek summary { cursor: pointer; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 6px; list-style: none; }
details.peek summary .ic { width: 16px; height: 16px; }
details.peek summary::-webkit-details-marker { display: none; }
details.peek p { margin: 10px 0; color: var(--text-2); max-width: 68ch; }

/* roleplay + rehearsal */
.caller { display: flex; gap: 12px; align-items: center; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 16px; font-weight: 700; flex: 0 0 auto; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.shake { animation: shake .4s; }
.caller b { font-size: 16px; font-weight: 600; display: block; }
.caller .meta { display: block; }
.rapport { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.scene { margin-top: 16px; color: var(--text-2); padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.chat { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.5; animation: rise .3s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.bubble .who { display: block; font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 1px; }
.bubble.npc { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 4px; }
.bubble.script { background: transparent; border: 1px dashed var(--primary-line); color: var(--text); }
.bubble.coach { align-self: stretch; max-width: none; background: var(--primary-soft); color: var(--text); font-size: 14px; border-radius: 8px; display: flex; gap: 8px; align-items: flex-start; }
.bubble.coach .ic { color: var(--primary); margin-top: 3px; width: 16px; height: 16px; }
.bubble .icon-btn { display: inline-grid; vertical-align: middle; margin-left: 2px; }
.bubble.me .icon-btn { color: inherit; }
.bubble .w.ok { color: var(--good); } .bubble .w.miss { color: var(--bad); text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bubble.me:not(.script) .w.ok, .bubble.me:not(.script) .w.miss { color: inherit; }
.bubble.me:not(.script) .w.miss { opacity: .7; }
.take-score { display: inline-block; margin-left: 6px; font-size: 12px; opacity: .75; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.type-reply { display: flex; gap: 8px; margin-top: 12px; }
.wrap-up { margin-top: 20px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.wrap-up h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.wrap-up .btn-row { justify-content: center; margin-top: 16px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.toggle input { accent-color: var(--primary); width: 15px; height: 15px; }

/* done */
.done { max-width: 480px; margin: 0 auto; padding: 64px 20px 40px; text-align: center; }
.done .meta { margin-bottom: 8px; }
.done h1 { font-size: clamp(32px, 6vw, 44px); }
.done .stars { margin: 16px 0 0; justify-content: center; gap: 4px; }
.done .stars .ic { width: 28px; height: 28px; }
.done .readouts-grid { margin: 28px 0 28px; text-align: left; }
.done .btn { margin-top: 8px; }
.mega { font-size: clamp(64px, 14vw, 96px); line-height: 1; font-weight: 700; letter-spacing: -.05em; color: var(--primary); margin-top: 12px; }

/* lists: arcade, grammar */
.list { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); transition: background .15s; }
.list-row:first-child { border-top: 0; }
a.list-row:hover { background: var(--bg-2); }
.list-row .glyph { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; }
.list-row .glyph .ic { width: 18px; height: 18px; }
.list-row b { display: block; font-size: 14px; font-weight: 600; }
.list-row .meta { display: block; }
.list-row .best { text-align: right; color: var(--text-3); } .list-row .best .num { font-size: 18px; display: block; line-height: 1.2; color: var(--text); }
.glyph { display: inline-grid; place-items: center; }
.focus-sound + .focus-sound { margin-top: 10px; }
.focus-sound h3 { margin-bottom: 4px; }
.focus-sound .btn-row { margin-top: 14px; }
.mouth { margin-top: 12px; display: flex; gap: 8px; color: var(--text-2); padding: 10px 12px; border-radius: 6px; background: var(--surface-2); }
.mouth .ic { color: var(--primary); margin-top: 4px; width: 16px; height: 16px; }
.rules { list-style: none; counter-reset: r; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 28px 1fr; gap: 8px; color: var(--text-2); }
.rules li::before { content: counter(r); width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; margin-top: 1px; }
.rules b { color: var(--text); font-weight: 600; }
select { height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 13px var(--font); }

/* profile */
.me-head { display: flex; gap: 16px; align-items: center; }
.me-head h1 { font-size: clamp(26px, 4vw, 34px); }
.level-line { margin-top: 20px; }
.level-line .row { margin-bottom: 8px; }
.fluency { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
@media (max-width: 560px) { .fluency { grid-template-columns: 1fr; } }
.fluency-total .num { font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -.05em; color: var(--primary); }
.meter-row { display: grid; grid-template-columns: 104px 1fr 32px; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; color: var(--text-2); }
.meter-row b { text-align: right; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.heat { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 3px; margin-top: 12px; }
.heat i { border-radius: 3px; background: var(--surface-3); }
.heat .l1 { background: color-mix(in srgb, var(--primary) 25%, transparent); } .heat .l2 { background: color-mix(in srgb, var(--primary) 50%, transparent); } .heat .l3 { background: color-mix(in srgb, var(--primary) 75%, transparent); } .heat .l4 { background: var(--primary); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1px; margin-top: 12px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.badge { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface); }
.badge .medal { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); flex: 0 0 auto; }
.badge .medal .ic { width: 16px; height: 16px; }
.badge b { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--text-3); } .badge small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.35; margin-top: 1px; }
.badge.on b { color: var(--text); } .badge.on .medal { background: var(--primary-soft); color: var(--primary); }
.gitlog { display: none; margin: 12px 0 0; font: 12.5px/1.8 var(--mono); color: var(--text-2); background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; border-radius: var(--r); overflow-x: auto; white-space: pre; }
.gitlog .h { color: var(--primary); } .gitlog .x { color: var(--good); }
.settings { margin-top: 8px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.setting:first-child { border-top: 0; }
.setting input[type=range] { accent-color: var(--primary); width: 150px; }
.setting input[type=checkbox] { accent-color: var(--primary); width: 16px; height: 16px; }
.capsule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
@media (max-width: 560px) { .capsule-grid { grid-template-columns: 1fr; } }
.cap-box { padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.cap-box.locked { opacity: .6; } .cap-box audio { width: 100%; }
.capsule-rec { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 24px 0; }

/* playbook */
.cat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; margin-top: 20px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.cat .ic { width: 14px; height: 14px; }
.cat:hover { color: var(--text); border-color: var(--line-strong); }
.cat.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sit-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 760px) { .sit-grid { grid-template-columns: 1fr 1fr; } }
.page.wide .sit-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sit { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .2s; }
.sit:hover { border-color: var(--line-strong); box-shadow: 0 4px 16px -8px rgba(3, 8, 10, .12); }
.sit-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sit b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.sit p { color: var(--text-2); font-size: 13px; line-height: 1.55; }
.sides { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--text-3); font-weight: 500; }
.sides .ic { color: var(--text-3); width: 13px; height: 13px; }
.side-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-4); display: inline-block; }
.side-dot.on { background: var(--good); }
.pin-mark { color: var(--primary); }
.cat-head { display: flex; align-items: center; gap: 8px; margin: 32px 0 12px; }
.cat-head .ic { color: var(--primary); width: 16px; height: 16px; }
.case { margin-top: 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.case summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.case summary .ic { color: var(--primary); width: 16px; height: 16px; }
.case summary::-webkit-details-marker { display: none; }
.case p { margin-top: 10px; color: var(--text-2); max-width: 68ch; }
.takeaway { color: var(--text) !important; font-weight: 600; }
.culture { margin-top: 14px; display: flex; gap: 8px; color: var(--text-2); }
.culture .ic { color: var(--primary); margin-top: 4px; width: 16px; height: 16px; }
.side-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 28px; padding: 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.side-tab { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 7px; color: var(--text-2); transition: background .15s, color .15s; }
.side-tab:hover { color: var(--text); }
.side-tab.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(3, 8, 10, .08), 0 0 0 1px var(--line); }
.side-tab b { font-weight: 600; }
.side-tab small { font-size: 12px; color: var(--text-3); }
.side-tab .side-k { font-size: 11px; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 4px; }
.side-tab .side-k .ic { width: 12px; height: 12px; }
.framework { list-style: none; counter-reset: f; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.framework li { counter-increment: f; display: grid; grid-template-columns: 28px 1fr; gap: 8px; }
.framework li::before { content: counter(f); width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; margin-top: 1px; }
.framework b { display: block; font-weight: 600; } .framework span span { color: var(--text-2); }
.phrases { display: grid; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.phrase { padding: 12px 14px; border-top: 1px solid var(--line); }
.phrase:first-child { border-top: 0; }
.phrase .say { display: flex; gap: 6px; align-items: flex-start; font-weight: 600; color: var(--text); }
.phrase .say .icon-btn { margin-top: -4px; color: var(--primary); }
.phrase .avoid { margin: 2px 0 0 38px; color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; font-size: 13px; }
.phrase .why { margin: 2px 0 0 38px; color: var(--text-3); font-size: 13px; }
.phrase .src { display: inline-flex; align-items: center; gap: 3px; margin: 6px 0 0 38px; font-size: 12px; color: var(--text-3); font-weight: 500; }
.phrase .src .ic { width: 12px; height: 12px; }
.phrase .src:hover { color: var(--primary); }
.script-view { display: grid; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.sline { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.sline:first-child { border-top: 0; }
.sline:hover { background: var(--bg-2); }
.sline b { font-size: 12px; font-weight: 600; color: var(--text-3); padding-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sline.you b { color: var(--primary); }
.sline span { color: var(--text-2); } .sline.you span { color: var(--text); }
.sline.now { background: var(--primary-soft); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 560px) { .cta-grid { grid-template-columns: 1fr; } }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .2s, background .15s; }
.cta:hover { border-color: var(--line-strong); box-shadow: 0 4px 16px -8px rgba(3, 8, 10, .12); }
.cta.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.cta.primary:hover { background: var(--primary-hover); }
.cta b { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .cta b .ic { width: 18px; height: 18px; }
.cta span { font-size: 13px; color: var(--text-2); } .cta.primary span { color: inherit; opacity: .85; }
.switch-side { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--text-2); font-weight: 500; }
.switch-side .ic { width: 16px; height: 16px; }
.switch-side:hover { color: var(--primary); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 13px; font-weight: 500; margin-bottom: 20px; }
.back .ic { width: 14px; height: 14px; }
.back:hover { color: var(--text); }

/* misc */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(3, 8, 10, .4); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: 100%; max-width: 380px; padding: 28px 24px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: center; box-shadow: var(--shadow-pop); animation: rise .3s var(--ease); }
.modal-card > .ic { margin: 0 auto 10px; color: var(--primary); }
.modal-card p { color: var(--text-2); margin: 8px 0 20px; }
.toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); z-index: 70; transform: translate(-50%, -160%); max-width: calc(100% - 32px); display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-pop); transition: transform .4s var(--ease); }
.toast .ic { color: var(--primary); width: 16px; height: 16px; }
.toast.show { transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }
.empty { text-align: center; color: var(--text-3); padding: 28px 0; }
.cert { margin: 24px 0; padding: 48px 28px; border-radius: 12px; text-align: center; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 0 6px var(--primary-soft); }
.cert .wordmark { justify-content: center; font-size: 22px; }
.cert h1 { font-size: clamp(36px, 7vw, 56px); margin: 24px 0 10px; }
.cert p { color: var(--text-2); max-width: 46ch; margin: 0 auto; }
.cert .readouts-grid { max-width: 480px; margin: 28px auto 0; text-align: left; }

/* word card */
.prompter, .prompt, .bubble, .phrase .say span, .tip p, .ex-right, .case p, .sline span, .scene, .sheet-msg p, .framework span, .goal-line, .body, .lead, .examples span, .cmp span { cursor: text; }
.wordcard { position: fixed; z-index: 75; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); animation: rise .2s var(--ease); max-height: calc(100vh - 120px); overflow: auto; }
.wc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wc-word { font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.wc-say { display: block; font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 1px; font-family: var(--mono); }
.wc-simple { margin-top: 8px; font-size: 14px; color: var(--text); }
.wc-native { margin-top: 6px; font-size: 15px; color: var(--text); }
.wc-native .meta { margin-right: 6px; }
.wc-example { margin-top: 8px; color: var(--text-2); font-style: italic; }
.wc-remember, .wc-avoid { margin-top: 8px; display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.wc-remember .ic { color: var(--primary); margin-top: 3px; width: 14px; height: 14px; } .wc-avoid .ic { color: var(--bad); margin-top: 3px; width: 14px; height: 14px; }
.wordcard .btn { margin-top: 12px; }

/* grammar */
.rule { margin-top: 14px; font-size: clamp(18px, 2.8vw, 21px); line-height: 1.45; font-weight: 600; letter-spacing: -.02em; color: var(--text); max-width: 40ch; text-wrap: balance; }
.points { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.point { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 18px 16px; border-top: 1px solid var(--line); }
.point:first-child { border-top: 0; }
.point-no { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.examples { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 0; }
.examples li { display: flex; align-items: center; gap: 4px; color: var(--text); font-weight: 500; }
.examples .icon-btn { color: var(--primary); }
.compare { display: grid; gap: 8px; margin-top: 10px; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.cmp-a, .cmp-b { display: flex; gap: 4px; align-items: center; font-weight: 500; }
.cmp .icon-btn { color: var(--primary); }
.cmp-note { grid-column: 1 / -1; }
@media (max-width: 560px) { .cmp { grid-template-columns: 1fr; } }

/* coach hub + idioms */
.cta-grid.hub { grid-template-columns: 1fr; }
@media (min-width: 700px) { .cta-grid.hub { grid-template-columns: 1fr 1fr; } .cta-grid.hub .cta.primary { grid-column: 1 / -1; } }
.idioms { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.idiom { border-top: 1px solid var(--line); }
.idiom:first-child { border-top: 0; }
section > .idiom { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.idiom summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; transition: background .15s; }
.idiom summary:hover { background: var(--bg-2); }
.idiom summary::-webkit-details-marker { display: none; }
.idiom summary b { display: block; font-size: 14px; font-weight: 600; }
.idiom summary .meta { display: block; margin-top: 1px; }
.idiom-chev { color: var(--text-3); transition: transform .2s var(--ease); width: 16px; height: 16px; }
.idiom[open] .idiom-chev { transform: rotate(90deg); }
.idiom-body { padding: 0 16px 16px; }
.ex-line { display: flex; gap: 4px; align-items: flex-start; margin-top: 10px; color: var(--text); font-weight: 500; }
.ex-line .icon-btn { color: var(--primary); margin-top: -4px; }
.ex-line.reply { color: var(--text-2); font-weight: 450; }
.ex-line.reply .meta { display: block; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { body { background: #fff; padding: 0; } .topbar, .nav, .noprint { display: none !important; } }

/* ---------- walkthrough tour ---------- */
.tour { position: fixed; inset: 0; z-index: 90; }
.tour-scrim { position: absolute; inset: 0; }
.tour-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(3, 8, 10, .55); outline: 2px solid var(--primary); outline-offset: 0; transition: left .35s var(--ease), top .35s var(--ease), width .35s var(--ease), height .35s var(--ease); pointer-events: none; }
.tour-card { position: fixed; z-index: 2; width: 380px; max-width: calc(100vw - 24px); padding: 18px 18px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); transition: top .35s var(--ease), left .35s var(--ease); animation: rise .25s var(--ease); }
.tour-card.centered { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tour-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.tour-card .body { margin-top: 6px; }
.tour-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 10px; }
.tour-dots { display: flex; gap: 4px; margin-top: 14px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-4); }
.tour-dots i.on { background: var(--primary); width: 16px; border-radius: 3px; }
.tour-actions { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }

/* ---------- pronunciation check ---------- */
.pron-card { margin-top: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.pron-card > .row b, .pron-card > b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pron-card .ic { color: var(--primary); }
.pron-score { font-size: 22px; } .pron-score.great { color: var(--good); } .pron-score.low { color: var(--bad); }
.pron-words { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.pron-words li { display: flex; gap: 6px; align-items: flex-start; }
.pron-words .icon-btn { color: var(--primary); margin-top: -3px; }
.pron-words .pron-tip { color: var(--text-2); font-size: 13px; }
.prompter .w.pron-flag { text-decoration: underline dotted var(--primary); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.allowance { margin-top: 8px; display: flex; align-items: center; gap: 12px; }
.allowance .vu { flex: 1; max-width: 260px; }
.activity { list-style: none; padding: 0; margin: 12px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.activity li:first-child { border-top: 0; }
.activity li .meta { white-space: nowrap; }

/* ---------- today's plan ---------- */
.today-plan { margin-top: 28px; }
.today-plan h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.status-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.status-chip.good { background: var(--good-soft); color: var(--good); }
.status-chip.warn { background: color-mix(in srgb, #f5a524 16%, transparent); color: #b26b00; }
@media (prefers-color-scheme: dark) { .status-chip.warn { color: #f5c26b; } }
.plan-list { list-style: none; padding: 0; margin: 16px 0 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.plan-list li + li { border-top: 1px solid var(--line); }
.plan-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; transition: background .15s; }
.plan-list a:hover { background: var(--bg-2); }
.plan-list b { display: block; font-weight: 600; }
.plan-list .meta { display: block; }
.plan-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: 0 0 auto; color: #fff; }
.plan-list li.done .plan-check { background: var(--good); border-color: var(--good); }
.plan-list li.done b { color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.plan-min { white-space: nowrap; }
.plan-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.plan-foot .meta { display: inline-flex; align-items: center; gap: 6px; }
.testout { margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); }
.testout .ic { color: var(--primary); margin-top: 3px; }

/* ---------- resources ---------- */
.routine { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.routine li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: baseline; }
.routine-min { font-size: 24px; color: var(--primary); } .routine-min small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.routine b { display: block; font-weight: 600; } .routine li > span:last-child > span { color: var(--text-2); }
.res-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .res-list { grid-template-columns: 1fr 1fr; } }
.res { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .2s; }
.res:hover { border-color: var(--line-strong); box-shadow: 0 4px 16px -8px rgba(3, 8, 10, .12); }
.res b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.res-out { color: var(--text-3); transform: rotate(-45deg); }
.res:hover .res-out { color: var(--primary); }
.res-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.res-tags span:not(.meta) { height: 22px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.res-why { color: var(--text-2); font-size: 14px; }
.res-how { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--text); font-weight: 500; }
.res-how .ic { color: var(--primary); margin-top: 3px; }

/* ---------- word bank kinds ---------- */
.kind-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-right: 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; }
.kind-chip.fix { background: color-mix(in srgb, #f5a524 16%, transparent); color: #b26b00; }
.kind-chip.pron { background: var(--primary-soft); color: var(--primary); }
@media (prefers-color-scheme: dark) { .kind-chip.fix { color: #f5c26b; } }
