:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #efefea;
  --text: #1b1d22;
  --muted: #6b6f78;
  --line: #e2e2dc;
  --accent: #f5c84c;
  --accent-ink: #2a2108;
  --me: #3f5ee8;
  --me-bg: #e8ecff;
  --other: #c2571a;
  --other-bg: #fdeee4;
  --danger: #c23636;
  --good: #2f8a4c;
  --rec: #e23b3b;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161c;
    --surface: #1d2028;
    --surface-2: #262a34;
    --text: #eceef3;
    --muted: #9aa0ad;
    --line: #2f3440;
    --accent: #f5c84c;
    --accent-ink: #2a2108;
    --me: #8ea2ff;
    --me-bg: #232a47;
    --other: #f2a271;
    --other-bg: #3a2a20;
    --danger: #ff7b7b;
    --good: #6fd08f;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 680px; margin: 0 auto; padding: 0 16px 120px; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 20px; margin: 0; letter-spacing: -0.02em; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.tab {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px;
  padding: 6px 14px; border-radius: 999px;
}
.tab.active { background: var(--surface); color: var(--text); font-weight: 600; }

.view { display: none; padding-top: 16px; }
.view.active { display: block; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
input, select {
  display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.row { display: flex; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.fine { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }

.notice { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px; font-size: 14px; }
.notice.error { background: var(--other-bg); color: var(--text); border: 1px solid var(--other); }

.status-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
#timer { font-size: 22px; font-weight: 600; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--rec); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.speaker-pad { margin-bottom: 12px; }
.speaker-pad p { margin: 0 0 6px; }
.speakers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.speaker {
  font: inherit; font-size: 18px; font-weight: 600; padding: 22px 8px; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--surface); color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.speaker[data-speaker="me"].active { border-color: var(--me); background: var(--me-bg); color: var(--me); }
.speaker[data-speaker="other"].active { border-color: var(--other); background: var(--other-bg); color: var(--other); }

.transcript { display: flex; flex-direction: column; gap: 8px; }
.transcript.live { max-height: 42vh; overflow-y: auto; }
.seg { padding: 8px 12px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--me); }
.seg.other { border-left-color: var(--other); }
.seg .who { font-size: 12px; font-weight: 600; color: var(--me); margin-right: 6px; }
.seg.other .who { color: var(--other); }
.seg .ts { font-size: 11px; color: var(--muted); float: right; font-variant-numeric: tabular-nums; }
#dTranscript .seg { cursor: pointer; }
.interim { color: var(--muted); font-style: italic; min-height: 1.4em; margin: 8px 2px; }

.controls {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 30%);
  max-width: 680px; margin: 0 auto;
}
.btn {
  font: inherit; font-weight: 600; border-radius: 12px; padding: 10px 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.big { flex: 1; padding: 16px; font-size: 17px; }
.btn.stop { background: var(--rec); border-color: var(--rec); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.link { border: 0; background: none; padding: 4px 0; color: var(--accent); }
.btn:disabled { opacity: 0.55; }

.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; text-align: left; font: inherit; color: inherit; width: 100%;
}
.card h4 { margin: 0 0 4px; font-size: 16px; }
.card .meta { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--me-bg); color: var(--me); margin-left: 6px; }

.progress { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.progress h3 { margin: 0 0 10px; font-size: 15px; }

h2 { margin: 8px 0 2px; font-size: 22px; letter-spacing: -0.01em; }
h3 { font-size: 15px; margin: 22px 0 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.metric .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric .l { font-size: 12px; color: var(--muted); }
.metric .h { font-size: 12px; margin-top: 4px; }
.metric .h.warn { color: var(--other); }
.metric .h.ok { color: var(--good); }
.bar { height: 8px; border-radius: 4px; background: var(--other-bg); overflow: hidden; margin-top: 6px; display: flex; }
.bar span { background: var(--me); display: block; }

.ai { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 16px; }
.ai h3 { margin-top: 14px; }
.ai h3:first-child { margin-top: 0; }
.ai ul { padding-left: 18px; margin: 6px 0; }
.ai li { margin-bottom: 10px; }
.ai .ev { display: block; font-size: 13px; color: var(--muted); font-style: italic; margin-top: 2px; }
.ai .sg { display: block; font-size: 14px; margin-top: 4px; }
.scores { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; text-align: center; }
.scores div { background: var(--surface-2); border-radius: 10px; padding: 8px 2px; }
.scores b { display: block; font-size: 20px; }
.scores span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 10;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px;
  max-width: calc(100% - 32px);
}
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.topbar h1 { display: flex; align-items: center; gap: 8px; }
.logo { width: 30px; height: 30px; border-radius: 8px; display: block; }
.btn.link, .notice a { color: var(--link); }
:root { --link: #8a6400; }
@media (prefers-color-scheme: dark) { :root { --link: #f5c84c; } }
.notice.hint { background: var(--surface); border: 1px dashed var(--line); font-size: 13px; margin-top: -4px; }

.auto-pad {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px;
}
.detected { font-size: 18px; font-weight: 700; color: var(--muted); }
.detected.me { color: var(--me); }
.detected.other { color: var(--other); }
.seg.pending { opacity: 0.7; border-left-color: var(--line); }
.seg.pending .who { color: var(--muted); }

.card.static { cursor: default; }
.train { margin-top: 14px; }
.passage {
  margin: 10px 0 14px; padding: 12px 14px; border-left: 4px solid var(--accent);
  background: var(--surface-2); border-radius: 10px; font-size: 18px; line-height: 1.55;
}
.meter, .progressbar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-bottom: 8px; }
.meter span, .progressbar span { display: block; height: 100%; width: 0; transition: width 0.1s linear; }
.meter span { background: var(--good); }
.progressbar span { background: var(--accent); }
.row.between { justify-content: space-between; align-items: center; }
.test-result { min-height: 1.4em; }
.good { color: var(--good); }
.warn { color: var(--other); }
.explain li { margin-bottom: 8px; }

/* ---------- accounts & plans ---------- */
.acct-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); flex: none;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 700;
}
.acct-btn.pro { width: auto; padding: 0 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 11px; letter-spacing: 0.05em; }
.topbar { gap: 8px; }
@media (max-width: 430px) { .topbar h1 .brand-text { display: none; } .tab { padding: 6px 9px; font-size: 13px; } }
@media (max-width: 370px) { .tab { padding: 6px 6px; } .tabs { gap: 2px; } }
body.signed-out .tabs, body.signed-out .acct-btn { display: none; }

.auth { max-width: 420px; margin: 8px auto 0; text-align: center; }
.auth-logo { border-radius: 22px; margin: 8px auto 12px; display: block; }
.auth h2 { font-size: 24px; margin-bottom: 8px; }
.auth form { text-align: left; margin-top: 16px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-top: 18px; }
.auth-tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 9px; border-radius: 9px; }
.auth-tab.active { background: var(--surface); color: var(--text); }
.error-text { color: var(--danger); font-size: 14px; min-height: 1.2em; margin: 0 0 10px; }
.btn.full { width: 100%; display: block; }

.quota { margin: 10px 0 0; color: var(--muted); }
.quota a { color: var(--link); font-weight: 600; }
.pill { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-right: 4px; vertical-align: 1px; }
.pill.pro { background: var(--accent); color: var(--accent-ink); }

.plan { margin-top: 12px; }
.plan.is-pro { border-color: var(--accent); }
.plan-head { display: flex; align-items: center; gap: 6px; font-size: 17px; }
.plan p { margin: 8px 0 0; }
.pitch { margin-top: 12px; border: 2px solid var(--accent); }
.pitch h3 { margin: 0; }
.price { margin: 6px 0 4px; }
.price b { font-size: 32px; letter-spacing: -0.02em; }
.price span { color: var(--muted); margin-left: 2px; }
.perks { padding-left: 0; list-style: none; margin: 10px 0 14px; text-align: left; }
.perks li { padding-left: 24px; position: relative; margin-bottom: 6px; }
.perks li::before { content: "✓"; position: absolute; left: 2px; color: var(--good); font-weight: 800; }
.pitch .btn.big { width: 100%; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 480px; background: var(--bg); border-radius: 20px 20px 0 0; text-align: center;
  padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); animation: rise 0.22s ease-out;
}
.sheet img { border-radius: 14px; }
.sheet h2 { font-size: 21px; }
.sheet .perks { max-width: 300px; margin-left: auto; margin-right: auto; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.info-text { color: var(--good); font-size: 14px; margin: 0 0 10px; }
.info-text:empty, .error-text:empty { display: none; }
#resetForm { text-align: left; margin-top: 16px; }
#forgotBtn { margin-top: 8px; }

/* ---------- skill game ---------- */
body.onboarding .tabs, body.onboarding .acct-btn { display: none; }
.xpbar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; margin: 8px 0 6px; }
.xpbar span { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width 0.5s ease; }
.xpbar.thin { height: 5px; margin: 6px 0 0; }

/* quiz */
.quiz { max-width: 480px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.quiz-dots { display: flex; gap: 5px; margin-left: auto; }
.quiz-dots span { width: 22px; height: 5px; border-radius: 3px; background: var(--surface-2); }
.quiz-dots span.done { background: var(--accent); opacity: 0.55; }
.quiz-dots span.on { background: var(--accent); }
.quiz-intro { text-align: center; padding-top: 12px; }
.quiz-emoji { font-size: 48px; line-height: 1; margin: 6px 0 10px; }
.quiz-q { font-size: 22px; line-height: 1.3; margin: 6px 0 16px; }
.quiz-answers { display: flex; flex-direction: column; gap: 10px; }
.quiz-a {
  text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; transition: border-color 0.12s, background 0.12s;
}
.quiz-a.sel, .quiz-a:active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.skill-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 16px 0 22px; }
.skill-chips span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 13px; }
.pick-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.pick {
  display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
.pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.pick-emoji { font-size: 24px; }
.pick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 800; flex: none; }
.pick.on .pick-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* missions */
.mission-banner { margin-bottom: 14px; }
.mission { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.mission-banner .mission { margin: 0; }
.mission.done { border-color: var(--good); }
.mission-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.mission-xp { color: var(--link); white-space: nowrap; }
.mission p { margin: 4px 0 0; }

/* progress */
.hero { margin-top: 4px; }
.hero-row { display: flex; justify-content: space-between; align-items: center; }
.hero-level { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.hero-streak { display: flex; align-items: center; gap: 6px; color: var(--muted); filter: grayscale(1); opacity: 0.6; }
.hero-streak.lit { filter: none; opacity: 1; color: var(--text); }
.hero-streak span:first-child { font-size: 26px; }
.hero-streak b { font-size: 24px; }
.skill-cards { display: flex; flex-direction: column; gap: 10px; }
.skill-head { display: flex; align-items: center; gap: 10px; }
.skill-emoji { font-size: 26px; }
.skill-head > div { flex: 1; min-width: 0; }
.lvl { background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.skill-foot { display: flex; justify-content: space-between; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 8px; }
.spark span { flex: 1; max-width: 18px; background: color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 3px 3px 0 0; min-height: 3px; }
.other-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.other-skills div { display: flex; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.badge-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; opacity: 0.5; filter: grayscale(1); }
.badge-tile.earned { opacity: 1; filter: none; border-color: var(--accent); }
.badge-tile .badge-emoji { font-size: 26px; }
.badge-tile .muted { font-size: 10.5px; line-height: 1.25; }

/* skill scores on a conversation */
.skill-scores { display: flex; flex-direction: column; gap: 6px; }
.sk { display: grid; grid-template-columns: 9.5em 1fr auto; align-items: center; gap: 8px; font-size: 14px; }
.sk.focus .sk-name { font-weight: 700; }
.sk .xpbar { margin: 0; height: 8px; }
.sk-val { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 1.5em; text-align: right; }
.sk-ai { font-size: 11px; font-weight: 700; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--me-bg); color: var(--me); }
.focus-fb { margin-bottom: 8px; }
.focus-fb .fb { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.focus-fb p { margin: 4px 0 0; font-size: 14px; }
.fb-tip { font-weight: 600; }
.coach-model { margin: 10px 0 0; }

/* rewards sheet */
.sheet.rewards { padding-top: 26px; }
.reward-burst { font-size: 54px; line-height: 1; animation: pop 0.45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }
.reward-total { font-size: 34px; font-weight: 800; color: var(--link); margin: 6px 0 10px; }
.reward-lines { max-width: 300px; margin: 0 auto 10px; text-align: left; }
.reward-lines div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.reward-level { font-weight: 600; }
.reward-badge { display: flex; gap: 10px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; margin: 8px auto; max-width: 320px; }
.reward-badge span { font-size: 30px; }
.reward-streak { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .reward-burst, .xpbar span { animation: none; transition: none; } }

/* ---------- pocket mode ---------- */
.pocket-btn { margin-top: 2px; background: #15171d; color: #f2f2ee; border-color: #15171d; }
@media (prefers-color-scheme: dark) { .pocket-btn { background: var(--surface-2); border-color: var(--line); color: var(--text); } }
.pocket-rules li { margin-bottom: 10px; font-size: 14px; }
.pocket-rules li::before { content: "•"; color: var(--muted); }
.notice.consent { background: var(--other-bg); border: 1px solid var(--other); font-size: 13px; text-align: left; }
.pocket {
  position: fixed; inset: 0; z-index: 50; background: #000; color: #5b5b5b;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  user-select: none; -webkit-user-select: none; touch-action: none; cursor: default;
}
.pocket-top { display: flex; align-items: center; gap: 8px; font-size: 12px; width: 100%; }
.pocket-top #pocketBattery { margin-left: auto; }
.pocket-dot { width: 8px; height: 8px; border-radius: 50%; background: #7a1d1d; animation: pulse 2.4s infinite; }
.pocket.paused .pocket-dot { background: #444; animation: none; }
.pocket-mid { text-align: center; }
.pocket-clock { font-size: 44px; font-weight: 300; color: #4a4a4a; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.pocket-sub { font-size: 13px; margin-top: 6px; }
.pocket-note { font-size: 12px; margin-top: 14px; color: #7a6a3a; min-height: 1.2em; max-width: 280px; }
.pocket-hint { font-size: 11px; color: #333; }
.pocket-controls {
  position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; background: #111; border: 1px solid #222; border-radius: 18px; padding: 14px;
}
.pocket-controls .btn { background: #1d1d1d; color: #ddd; border-color: #333; }
.pocket-controls .btn.stop { background: #5a1414; border-color: #5a1414; color: #fff; }
.pocket-controls .btn.link { background: none; border: 0; color: #888; }
.day-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.day-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; }
.day-stats b { display: block; font-size: 22px; }
.day-stats span { font-size: 12px; color: var(--muted); }
.toast { z-index: 60; } /* stay visible above the pocket screen */

/* ---------- Training ---------- */
.train-h { margin: 0 0 4px; }
.quiz-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.quiz-card { display: flex; flex-direction: column; gap: 3px; padding: 12px 10px; cursor: pointer; }
.quiz-card b { font-size: 14px; line-height: 1.25; }
.qc-emoji { font-size: 26px; }
.qc-best { margin-top: auto; padding-top: 6px; color: var(--accent-ink); font-weight: 600; }
@media (prefers-color-scheme: dark) { .qc-best { color: var(--accent); } }
@media (max-width: 420px) { .quiz-cards { grid-template-columns: 1fr; } .quiz-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; } .quiz-card .muted { flex-basis: 100%; } .qc-best { margin: 0; padding: 0; } }
.unit-list, .step-list, .lesson { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.unit-card, .step { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.unit-card.complete { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.unit-emoji { font-size: 28px; flex: none; }
.unit-emoji.big { font-size: 40px; }
.unit-text, .step-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.unit-meta { margin-top: 4px; color: var(--muted); }
.unit-focus { color: var(--text); font-weight: 600; }
.unit-count { flex: none; font-weight: 700; color: var(--muted); }
.unit-card.complete .unit-count { color: var(--good); }
.unit-hero { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.unit-hero h2 { margin: 0; }
.step-icon { font-size: 22px; flex: none; width: 30px; text-align: center; }
.step.done .pick-check { background: var(--good); border-color: var(--good); color: #fff; }
.idea { display: flex; gap: 12px; }
.idea p { margin: 4px 0 0; line-height: 1.5; }
.idea-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.situation { background: var(--surface-2); border: 0; margin: 8px 0 14px; line-height: 1.5; }
.quiz-a:disabled { opacity: 1; }
.quiz-a.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.quiz-a.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.feedback { border-radius: var(--radius); padding: 12px 14px; margin: 14px 0 12px; line-height: 1.5; border: 1px solid var(--line); background: var(--surface); }
.feedback.good { border-color: var(--good); }
.feedback.bad { border-color: var(--danger); }
.write-inputs label { color: var(--text); font-size: 14px; }
.tr-input { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; }
.checks, .examples { padding-left: 0; list-style: none; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.checks li { font-size: 14px; }
.checks li.pass { color: var(--good); }
.examples li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; line-height: 1.45; }
.speak-box { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 10px 0 14px; }
.speak-timer { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.speak-timer.low { color: var(--rec); }
.speak-text { text-align: left; line-height: 1.5; min-height: 1em; }
.checklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.check-item { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 15px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.check-item input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
#view-train .btn.big.full + .btn.big.full { margin-top: 8px; }
