/* ---------- tokens ---------- */
:root {
  --bg: #f6f4fb;
  --surface: #ffffff;
  --surface-2: #f0edf7;
  --ink: #1d1b2e;
  --ink-soft: #3b3852;
  --muted: #6f6b85;
  --line: #e7e3f1;
  --primary: #1d1b2e;
  --primary-ink: #ffffff;
  --accent: #7b6cf0;

  /* pastels: background tint + readable ink */
  --mint: #d3f2e4;   --mint-ink: #1d7552;
  --sky: #d7e8fc;    --sky-ink: #2b5f9e;
  --lav: #e5defc;    --lav-ink: #5a45b8;
  --peach: #ffe0d0;  --peach-ink: #ae4f25;
  --pink: #fcdbe8;   --pink-ink: #a3375f;
  --butter: #fcf0c4; --butter-ink: #85660a;

  --green: #2f9a6b; --green-soft: #d8f3e6;
  --red: #d2496a;   --red-soft: #fde0e7;
  --shadow-sm: 0 1px 2px rgba(45, 35, 90, .05);
  --shadow: 0 1px 2px rgba(45, 35, 90, .04), 0 8px 24px rgba(45, 35, 90, .07);
  --shadow-lg: 0 12px 40px rgba(45, 35, 90, .14);
  --radius: 24px;
  --radius-sm: 16px;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #13121a;
  --surface: #1d1c27;
  --surface-2: #272533;
  --ink: #f2f0fa;
  --ink-soft: #d6d2e8;
  --muted: #9e9ab4;
  --line: #2e2c3c;
  --primary: #f2f0fa;
  --primary-ink: #13121a;
  --accent: #a99ff7;
  --mint: #1c3a2f;   --mint-ink: #94e4c1;
  --sky: #1c2d43;    --sky-ink: #9fc7f5;
  --lav: #2b2547;    --lav-ink: #c2b6fb;
  --peach: #3e2a20;  --peach-ink: #ffbd9a;
  --pink: #3e2232;   --pink-ink: #f7a9c7;
  --butter: #3a3219; --butter-ink: #f3d77a;
  --green: #6cd3a3; --green-soft: #1b3a2d;
  --red: #f08aa2;   --red-soft: #3f2029;
  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* level colours */
.lv-a1 { --lv: var(--mint);   --lv-ink: var(--mint-ink);   --lv-2: var(--sky); }
.lv-a2 { --lv: var(--sky);    --lv-ink: var(--sky-ink);    --lv-2: var(--lav); }
.lv-b1 { --lv: var(--lav);    --lv-ink: var(--lav-ink);    --lv-2: var(--pink); }
.lv-b2 { --lv: var(--peach);  --lv-ink: var(--peach-ink);  --lv-2: var(--butter); }
.lv-c1 { --lv: var(--pink);   --lv-ink: var(--pink-ink);   --lv-2: var(--lav); }
.lv-c2 { --lv: var(--butter); --lv-ink: var(--butter-ink); --lv-2: var(--peach); }
.mint  { --tint: var(--mint);   --tint-ink: var(--mint-ink); }
.sky   { --tint: var(--sky);    --tint-ink: var(--sky-ink); }
.lav   { --tint: var(--lav);    --tint-ink: var(--lav-ink); }
.peach { --tint: var(--peach);  --tint-ink: var(--peach-ink); }

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { font-weight: 800; margin: 0; line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.2rem; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
em { font-style: normal; color: var(--accent); font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

#app { min-height: 100dvh; }
.page {
  max-width: 600px; margin: 0 auto;
  padding: 8px 20px calc(110px + env(safe-area-inset-bottom));
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px;
  max-width: 600px; margin: 0 auto;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
}
.topbar.large { grid-template-columns: 1fr auto; padding: calc(18px + env(safe-area-inset-top)) 20px 10px; }
.page-title { font-size: 1.9rem; }
.topbar-title { text-align: center; font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; justify-content: flex-end; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink);
}
.icon-btn:active { transform: scale(.94); }
.icon-btn[aria-pressed="true"] { background: var(--lav); color: var(--lav-ink); }
.logo { width: 28px; height: 28px; stroke: none; }

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(420px, calc(100% - 32px));
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-lg);
}
.tab {
  display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 20px;
  font-size: .7rem; font-weight: 700; color: var(--muted);
}
.tab.on { background: var(--lav); color: var(--lav-ink); }
.tab:active { transform: scale(.95); }

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: 16px;
  background: var(--surface-2); font-weight: 700; text-align: center;
  transition: transform .12s;
}
.btn.primary, .btn.dark { background: var(--primary); color: var(--primary-ink); }
.btn.big { width: 100%; min-height: 56px; font-size: 1.02rem; border-radius: 18px; }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: .88rem; border-radius: 12px; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.danger { color: var(--red); }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 15px; border-radius: 999px; background: var(--surface);
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-sm); border: 1.5px solid var(--line);
}
.chip[aria-pressed="true"] { background: var(--lav); color: var(--lav-ink); border-color: transparent; }
.chip.ghost { border-style: dashed; color: var(--lv-ink, var(--accent)); border-color: currentColor; background: transparent; }
.chip.static { cursor: default; background: var(--lav); color: var(--lav-ink); border-color: transparent; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px;
  border-radius: 8px; background: var(--lv, var(--surface-2)); color: var(--lv-ink, var(--muted)); white-space: nowrap;
}
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.mint, .card.sky, .card.lav, .card.peach { background: var(--tint); color: var(--tint-ink); box-shadow: none; }
.card.mint .muted { color: inherit; opacity: .8; }
.section-title { margin: 30px 0 12px; font-size: 1.05rem; font-weight: 800; }
.notice { background: var(--butter); color: var(--butter-ink); border-radius: 14px; padding: 10px 14px; font-size: .88rem; font-weight: 600; }
.empty { padding: 20px 4px; list-style: none; }

/* ---------- welcome ---------- */
.welcome { padding-top: calc(36px + env(safe-area-inset-top)); padding-bottom: 40px; }
.hero { text-align: center; margin-bottom: 30px; position: relative; }
.hero::before {
  content: ''; position: absolute; inset: -40px -20px auto; height: 220px; z-index: -1;
  background: radial-gradient(closest-side at 30% 50%, var(--lav), transparent),
              radial-gradient(closest-side at 70% 40%, var(--mint), transparent),
              radial-gradient(closest-side at 50% 70%, var(--peach), transparent);
  filter: blur(10px); opacity: .9;
}
.hero .logo { width: 68px; height: 68px; margin-bottom: 14px; filter: drop-shadow(0 8px 18px rgba(90, 70, 180, .25)); }
.hero h1 { font-size: 2.4rem; }
.lede { color: var(--muted); margin: 8px 0 0; font-weight: 500; }
.stack { display: grid; gap: 26px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.field input {
  font: inherit; font-size: 1.05rem; padding: 14px 16px; border-radius: 16px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--lav); }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.level-opt {
  display: grid; gap: 2px; padding: 14px 6px; border-radius: 18px; text-align: center;
  background: var(--surface); border: 2px solid transparent; box-shadow: var(--shadow-sm);
  transition: transform .12s;
}
.level-opt b { font-size: 1.35rem; font-weight: 800; color: var(--lv-ink); }
.level-opt span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.level-opt[aria-pressed="true"] { background: var(--lv); border-color: var(--lv-ink); }
.level-opt[aria-pressed="true"] span { color: var(--lv-ink); }
.level-opt:active { transform: scale(.96); }
.hint { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

/* ---------- home ---------- */
.home { padding-top: calc(18px + env(safe-area-inset-top)); }
.home-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.hello { margin: 0; color: var(--muted); font-weight: 600; font-size: .95rem; }
.home-head h1 { font-size: 2rem; }
.avatar {
  width: 60px; height: 60px; border-radius: 20px; flex: none;
  background: linear-gradient(135deg, var(--lav), var(--pink)); color: var(--lav-ink);
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 800;
}
.avatar.small { width: 48px; height: 48px; border-radius: 16px; font-size: 1.2rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini {
  display: grid; gap: 0; padding: 12px 12px 10px; border-radius: var(--radius-sm);
  background: var(--tint); color: var(--tint-ink);
}
.mini-icon svg { width: 18px; height: 18px; }
.mini b { font-size: 1.45rem; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.mini b small { font-size: .8rem; opacity: .7; font-weight: 700; }
.mini > span:last-child { font-size: .72rem; font-weight: 600; opacity: .85; }

.hero-card {
  position: relative; overflow: hidden; margin-top: 16px; padding: 22px 20px 20px;
  border-radius: 28px; color: var(--ink);
  background: linear-gradient(145deg, var(--lv) 0%, var(--lv-2) 100%);
}
.hero-card::after {
  content: ''; position: absolute; width: 180px; height: 180px; right: -50px; top: -60px;
  border-radius: 50%; background: rgba(255, 255, 255, .35);
}
[data-theme="dark"] .hero-card::after { background: rgba(255, 255, 255, .05); }
.hero-card > * { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.badge {
  font-size: .75rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink-soft);
}
.level-badge {
  display: inline-flex; align-items: center; gap: 2px;
  font-weight: 800; font-size: .9rem; padding: 6px 8px 6px 12px; border-radius: 12px;
  background: var(--surface); color: var(--lv-ink); box-shadow: var(--shadow-sm);
}
.level-badge svg { width: 18px; height: 18px; stroke-width: 2.4; }
.level-badge:active { transform: scale(.95); }
.hero-kicker { margin: 18px 0 6px; font-size: .78rem; font-weight: 700; color: var(--lv-ink); text-transform: uppercase; letter-spacing: .05em; }
.hero-title { font-size: 1.75rem; font-weight: 800; }
.hero-sub { margin: 8px 0 18px; color: var(--ink-soft); font-size: .95rem; }

.path { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.path-step {
  display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 12px; transition: transform .12s;
  padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow);
}
.path-step b { display: block; font-weight: 700; }
.path-step div span { font-size: .84rem; color: var(--muted); }
.path-dot {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; background: var(--surface-2); color: var(--muted);
}
.path-step.now .path-dot { background: var(--lv); color: var(--lv-ink); }
.path-step.done .path-dot { background: var(--green-soft); color: var(--green); }
.path-step.done .path-dot svg { stroke-width: 2.6; width: 20px; }
.path-step.soon { opacity: .8; }
.path-step:active { transform: scale(.98); }
.path-step .chev { color: var(--muted); display: grid; }
.path-step .chev svg { width: 18px; height: 18px; }
.path-step:not(:has(.soon-tag)) > div { grid-column: 2 / 4; }
.scenarios { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.scenarios li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.scenarios b { display: block; }
.scenarios .muted { display: block; font-style: italic; }
.sc-emoji { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--sky); font-size: 1.4rem; flex: none; }
.card.sky p { color: var(--ink-soft); }
.soon-tag { font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-item {
  display: grid; align-content: start; gap: 2px; padding: 16px; min-height: 132px;
  border-radius: var(--radius); background: var(--tint); color: var(--tint-ink);
  transition: transform .12s;
}
.menu-item b { font-size: 1.02rem; font-weight: 800; margin-top: 18px; }
.menu-item > span:last-child { font-size: .8rem; font-weight: 600; opacity: .8; }
.menu-icon {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}
.menu-item.disabled { opacity: .6; }
.menu-item:active:not(.disabled) { transform: scale(.97); }

/* ---------- lesson list ---------- */
.level-tabs {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 20px;
}
.level-tabs a {
  position: relative; text-align: center; padding: 10px 0 14px; border-radius: 14px;
  font-weight: 800; font-size: .92rem; color: var(--muted); background: var(--surface); box-shadow: var(--shadow-sm);
}
.level-tabs a[aria-selected="true"] { background: var(--lv); color: var(--lv-ink); box-shadow: none; }
.level-tabs a i {
  position: absolute; left: 22%; right: 22%; bottom: 6px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--lv-ink) calc(var(--p) * 100%), var(--line) 0);
}
.level-tabs a[aria-selected="true"] i { background: linear-gradient(90deg, var(--lv-ink) calc(var(--p) * 100%), color-mix(in srgb, var(--lv-ink) 22%, transparent) 0); }
.level-head {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 20px; border-radius: var(--radius);
  background: linear-gradient(145deg, var(--lv), var(--lv-2));
}
.level-head h1 { font-size: 2rem; color: var(--lv-ink); }
.level-head h1 .muted { font-size: 1rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0; }
.level-head p { margin: 6px 0 0; color: var(--ink-soft); }
.ring {
  --size: 68px; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--lv-ink) calc(var(--p) * 360deg), color-mix(in srgb, var(--surface) 60%, transparent) 0);
}
.ring span {
  width: calc(var(--size) - 12px); height: calc(var(--size) - 12px); border-radius: 50%;
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
}
.ring small { font-weight: 600; color: var(--muted); font-size: .68rem; margin-left: 1px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 12px; }
.filter .chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.lessons { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.lesson {
  display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 14px 12px 12px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow);
  border: 2px solid transparent; transition: transform .12s;
}
.lesson:active { transform: scale(.98); }
.lesson .num {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); font-weight: 800; font-size: .92rem; color: var(--muted);
}
.lesson.done .num { background: var(--green-soft); color: var(--green); }
.lesson.done .num svg { width: 20px; height: 20px; stroke-width: 2.6; }
.lesson.next { border-color: var(--lv-ink); }
.lesson.next .num { background: var(--lv); color: var(--lv-ink); }
.lesson-main { min-width: 0; }
.lesson-main b { display: block; font-weight: 700; font-size: 1rem; line-height: 1.25; }
.lesson-main .muted { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-meta { display: grid; justify-items: end; gap: 3px; }
.lesson-meta .tag { background: var(--surface-2); color: var(--muted); }
@media (max-width: 400px) { .lesson-meta .muted { display: none; } }

/* ---------- reader ---------- */
.reader { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  margin: 10px 0 12px; padding: 5px 11px; border-radius: 999px; background: var(--lv); color: var(--lv-ink);
}
.story-title { font-size: 2.05rem; }
.story-sub { margin: 6px 0 0; font-weight: 500; }
.tip {
  display: flex; gap: 8px; align-items: center;
  font-size: .82rem; font-weight: 500; color: var(--sky-ink); background: var(--sky);
  padding: 10px 14px; border-radius: 14px; margin: 18px 0 8px;
}
.story-text { font-family: var(--serif); font-size: 1.32rem; line-height: 1.7; color: var(--ink); }
.story-text p { margin: 20px 0; }
.story-text .line {
  display: grid; gap: 4px; margin: 12px 0; padding: 12px 16px;
  background: var(--surface); border-radius: 20px 20px 20px 6px; box-shadow: var(--shadow-sm);
}
.story-text .line:nth-of-type(even) { border-radius: 20px 20px 6px 20px; margin-left: 28px; background: var(--lv); }
.story-text .line:nth-of-type(odd) { margin-right: 28px; }
.speaker { font-family: var(--sans); font-size: .72rem; font-weight: 800; color: var(--lv-ink); text-transform: uppercase; letter-spacing: .06em; }
.story-text .line:nth-of-type(odd) .speaker { color: var(--muted); }
.s { border-radius: 6px; transition: background .2s, box-shadow .2s; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.s.playing { background: var(--butter); box-shadow: 0 0 0 3px var(--butter); }
.w { cursor: pointer; border-radius: 5px; }
.w.new { background: color-mix(in srgb, var(--lv) 55%, transparent); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--lv) 55%, transparent); }
[data-theme="dark"] .w.new { background: color-mix(in srgb, var(--lv-ink) 20%, transparent); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--lv-ink) 20%, transparent); }
.w:active, .w.active { background: var(--lav); color: var(--lav-ink); box-shadow: 0 0 0 2px var(--lav); }
.w.saved { text-decoration: underline 2.5px var(--accent); text-decoration-style: dotted; text-underline-offset: 5px; }
.tr { display: none; }
.show-tr .tr {
  display: block; font-family: var(--sans); font-size: .88rem; line-height: 1.45; color: var(--muted);
  margin: 4px 0 12px;
}

.quiz { margin-top: 40px; }
.quiz h2 { margin-bottom: 4px; font-size: 1.35rem; }
.q { padding: 16px 0 6px; }
.q-text { font-weight: 700; margin: 0 0 10px; }
.opts { display: grid; gap: 8px; }
.opt {
  text-align: left; padding: 14px 16px; border-radius: 16px; font-weight: 600;
  background: var(--surface-2); border: 2px solid transparent; transition: transform .12s;
}
.opt:active { transform: scale(.98); }
.q.answered .opt { pointer-events: none; }
.q.answered .opt:not(.right):not(.wrong) { opacity: .5; }
.opt.right { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.result {
  display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 18px;
  border-radius: 20px; background: linear-gradient(135deg, var(--mint), var(--sky));
}
.result p { margin: 2px 0 0; color: var(--ink-soft); }
.result-score { font-size: 2rem; font-weight: 800; color: var(--mint-ink); letter-spacing: -.03em; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.result-actions .btn:only-child { grid-column: span 2; }

.player {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 20;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 6px; padding: 7px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: 26px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.player .icon-btn { box-shadow: none; background: transparent; }
.player .play {
  width: 56px; height: 56px; border-radius: 20px; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink);
}
.player .play svg { width: 24px; height: 24px; }
.player .rate { min-width: 54px; height: 40px; border-radius: 14px; background: var(--lav); color: var(--lav-ink); font-weight: 800; font-size: .85rem; }

/* ---------- bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(25, 20, 50, .3); opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  max-width: 600px; margin: 0 auto; max-height: 78dvh; overflow-y: auto;
  background: var(--surface); border-radius: 30px 30px 0 0;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .9, .3, 1);
  box-shadow: var(--shadow-lg);
}
.sheet-open .sheet { transform: none; }
.sheet-open .sheet-backdrop { opacity: 1; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; }
.sheet h3 { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; letter-spacing: -.01em; }
.sheet-head p { margin: 2px 0 0; }
.sheet-head .icon-btn { background: var(--lav); color: var(--lav-ink); }
.meaning { font-size: 1.2rem; font-weight: 700; margin: 12px 0 6px; }
.gram { font-size: .82rem; font-weight: 600; color: var(--peach-ink); background: var(--peach); display: inline-block; padding: 4px 11px; border-radius: 10px; margin: 2px 0 0; }
.ex { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); }
.ex .label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.ex .es { font-family: var(--serif); font-size: 1.12rem; margin: 0; }
.ex .en { color: var(--muted); font-size: .88rem; margin: 4px 0 0; }
.ex mark { background: var(--butter); color: inherit; border-radius: 4px; padding: 0 3px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.saved-note {
  display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem;
  color: var(--mint-ink); background: var(--mint); padding: 8px 12px; border-radius: 12px;
}
.saved-note svg { width: 18px; height: 18px; stroke-width: 2.6; }

/* level picker */
.sheet-title { font-family: var(--sans) !important; font-size: 1.4rem !important; font-weight: 800 !important; }
.sheet-title + p { margin: 6px 0 14px; }
.level-list { display: grid; gap: 8px; }
.level-row {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 14px 10px 10px; border-radius: 18px; text-align: left;
  background: var(--surface-2); border: 2px solid transparent;
}
.level-row[aria-pressed="true"] { background: var(--lv); border-color: var(--lv-ink); }
.level-row:active { transform: scale(.98); }
.lr-badge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; background: var(--lv); color: var(--lv-ink); }
.level-row[aria-pressed="true"] .lr-badge { background: var(--surface); }
.lr-main { min-width: 0; }
.lr-main b { display: block; font-weight: 700; }
.lr-main span { display: block; font-size: .8rem; color: var(--muted); line-height: 1.35; }
.lr-tag { font-size: .72rem; font-weight: 800; color: var(--lv-ink); background: var(--lv); padding: 4px 9px; border-radius: 999px; }
.level-row[aria-pressed="true"] .lr-tag { background: var(--surface); }
.lr-prog { display: grid; justify-items: end; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.lr-prog i { display: block; width: 44px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--lv-ink) calc(var(--p) * 100%), var(--line) 0); }

/* ---------- review ---------- */
[hidden] { display: none !important; }
.soon-card h2 { color: inherit; }
.soon-card p { margin: 6px 0 0; }
.wordlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wordlist li { background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
.wordlist li.empty { background: none; box-shadow: none; }
.wl-head { display: flex; align-items: baseline; gap: 8px; }
.wl-head b { font-size: 1.05rem; }
.wl-head .tag { margin-left: auto; }
.wordlist p { margin: 6px 0 0; font-family: var(--serif); font-size: 1.02rem; color: var(--ink-soft); }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; margin: 4px 0 20px; }
.profile-head h1 { font-size: 1.6rem; }
.profile-head p { margin: 4px 0 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--tint); color: var(--tint-ink); border-radius: var(--radius-sm); padding: 16px; }
.stat b { display: block; font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }
.stat span { font-size: .8rem; font-weight: 600; opacity: .85; }
.level-progress { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.level-progress a {
  display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px;
  padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.lp-level {
  width: 44px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; background: var(--lv); color: var(--lv-ink);
}
.lp-level.current { box-shadow: 0 0 0 2px var(--lv-ink); }
.lp-bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.lp-bar i { display: block; height: 100%; min-width: 0; background: var(--lv-ink); border-radius: 5px; }
.lp-num { text-align: right; font-weight: 700; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.lp-bars { display: grid; gap: 6px; }
.lp-row { display: grid; grid-template-columns: 1fr 92px; align-items: center; gap: 10px; }
.lp-bar.words { position: relative; height: 6px; }
.lp-bar.words i { opacity: .55; }
.lp-bar.words em { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--muted); opacity: .5; }
.known-note { margin: 10px 4px 0; }
.voice-row { display: flex; gap: 8px; align-items: center; }
.voice-row select {
  flex: 1; min-width: 0; font: inherit; font-weight: 600; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
}
.voice-tip { margin: 14px 0 0; line-height: 1.5; }
.voice-intro { margin: 0 0 6px; }
.voice-label { display: block; font-weight: 700; font-size: .85rem; margin: 12px 0 6px; }
.voice-missing { flex: 1; font-size: .82rem; color: var(--muted); background: var(--surface-2); padding: 9px 12px; border-radius: 12px; }
.profile-actions { display: grid; gap: 10px; margin-top: 32px; }

@media (min-width: 700px) {
  .story-text { font-size: 1.4rem; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Loco-loco, the robot ---------- */
.robot { display: block; flex: none; overflow: visible; stroke: none; width: auto; height: auto; }
.robot .r-bob { animation: r-bob 3.2s ease-in-out infinite; }
.robot .r-shadow { animation: r-shadow 3.2s ease-in-out infinite; transform-origin: 50px 108px; transform-box: view-box; }
.robot .r-wave { animation: r-wave 1.6s ease-in-out infinite; transform-origin: 69px 83px; transform-box: view-box; }
.robot .r-eyes { animation: r-blink 4.5s infinite; transform-origin: 50px 45px; transform-box: view-box; }
.robot .r-bulb { animation: r-glow 2.4s ease-in-out infinite; }
@keyframes r-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes r-shadow { 0%, 100% { transform: scaleX(1); opacity: .08; } 50% { transform: scaleX(.88); opacity: .05; } }
@keyframes r-wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 75% { transform: rotate(12deg); } }
@keyframes r-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes r-glow { 0%, 100% { fill: #ffd35a; } 50% { fill: #fff1b8; } }
@media (prefers-reduced-motion: reduce) { .robot * { animation: none !important; } }

.loco { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 16px; }
.loco .robot { margin-bottom: -2px; }
.bubble {
  position: relative; padding: 10px 14px; border-radius: 18px 18px 18px 6px;
  background: var(--surface); box-shadow: var(--shadow); margin-bottom: 26px; min-width: 0;
}
.bubble::before {
  content: ''; position: absolute; left: -7px; bottom: 6px; width: 14px; height: 14px;
  background: var(--surface); transform: rotate(45deg); border-radius: 3px;
}
.bubble p { margin: 0; position: relative; }
.bubble-es { font-weight: 700; }
.bubble-en { font-size: .8rem; color: var(--muted); margin-top: 2px !important; }
.loco.center { justify-content: center; margin-bottom: 8px; }
.hero .loco .bubble { text-align: left; }
.empty .loco { margin-top: 8px; }
.result .robot { margin: -6px 0 -10px; }
.result-score { line-height: 1; margin-bottom: 4px; }

/* ---------- review ---------- */
.review-stats { margin-top: 18px; }
.review-stats .stat b { font-size: 1.5rem; }
.dots { display: inline-flex; gap: 3px; margin-left: auto; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--green); }
.wl-head .dots + .tag { margin-left: 6px; }
.rs-progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 6px 0 14px; }
.rs-progress i { display: block; height: 100%; background: var(--lv-ink); border-radius: 4px; transition: width .3s; }
.cloze-card { padding: 22px 20px; }
.cloze { font-family: var(--serif); font-size: 1.45rem; line-height: 1.6; margin: 0; }
.gap {
  display: inline-block; min-width: 88px; padding: 0 8px; margin: 0 2px; text-align: center;
  border-bottom: 3px dashed var(--lv-ink); background: var(--lv); border-radius: 8px 8px 2px 2px; color: var(--lv-ink); font-weight: 600;
}
.gap.ok { background: var(--green-soft); color: var(--green); border-bottom: 3px solid var(--green); animation: pop .3s; }
.gap.no { background: var(--red-soft); color: var(--red); border-bottom: 3px solid var(--red); animation: shake .35s; }
.cloze-en { margin: 12px 0 0; color: var(--muted); font-size: .92rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.choice {
  padding: 16px 10px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow);
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600; border: 2px solid transparent; transition: transform .12s;
}
.choice:active:not(:disabled) { transform: scale(.97); }
.choice:disabled { cursor: default; opacity: .55; }
.choice.right { opacity: 1; border-color: var(--green); background: var(--green-soft); color: var(--green); }
.choice.wrong { opacity: 1; border-color: var(--red); background: var(--red-soft); color: var(--red); }
.fb { margin-top: 16px; padding: 14px; border-radius: 22px; display: grid; gap: 12px; animation: rise .25s ease-out; }
.fb.ok { background: var(--green-soft); }
.fb.no { background: var(--peach); }
.fb-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.fb-head p { margin: 2px 0 0; }
.fb .icon-btn { background: var(--surface); }
.gap.hint { font-family: var(--sans); font-size: .95rem; font-weight: 600; font-style: italic; opacity: .85; }
.target { background: var(--lv); color: var(--lv-ink); padding: 0 6px; border-radius: 8px; font-weight: 600; }
.target.ok { background: var(--green-soft); color: var(--green); }
.target.no { background: var(--red-soft); color: var(--red); }
.ask { margin: 16px 2px 0; font-weight: 600; }
.ask b { font-family: var(--serif); font-size: 1.15rem; }
.choices.wide .choice { font-family: inherit; font-size: 1rem; text-align: left; padding: 14px 16px; }
.conj-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.conj-line > * { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .85rem; font-weight: 700; }
.conj-line b { background: var(--lv); color: var(--lv-ink); font-family: var(--serif); font-size: 1rem; }
.prompt-en { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin: 0 0 10px; }
.letters { font-family: var(--serif); font-size: 1.4rem; letter-spacing: .08em; margin: 14px 0 0; color: var(--lv-ink); }
.letters.ok { color: var(--green); letter-spacing: 0; }
.letters.no { color: var(--red); letter-spacing: 0; }
.produce-sentence { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.small-cloze { font-size: 1.1rem; }
.type-form { display: grid; gap: 10px; margin-top: 16px; }
.type-input {
  width: 100%; min-height: 56px; padding: 12px 16px; border-radius: 18px; border: 2px solid var(--line);
  background: var(--surface); color: var(--ink); font-family: var(--serif); font-size: 1.3rem; box-shadow: var(--shadow-sm);
}
.type-input:focus { outline: none; border-color: var(--lv-ink); }
.type-input:disabled { opacity: .6; }
.accents { display: flex; flex-wrap: wrap; gap: 6px; }
.accents button { min-width: 40px; min-height: 40px; border-radius: 12px; background: var(--surface-2); font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.accents button:disabled { opacity: .5; }
.type-form.answered .accents, .type-form.answered .type-actions { display: none; }
.type-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.fb-note { margin: 0; }
.fb .btn.ghost { justify-self: start; }
.order-en { margin: 0 0 14px; font-size: 1rem; color: var(--ink-soft); }
.order-line {
  display: flex; flex-wrap: wrap; gap: 8px; min-height: 54px; padding: 8px; align-items: center;
  border-radius: 14px; border: 2px dashed var(--line);
}
.order-line.ok { border: 2px solid var(--green); background: var(--green-soft); }
.order-line.no { border: 2px solid var(--red); background: var(--red-soft); }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.tile {
  padding: 9px 13px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); border: 1.5px solid var(--line);
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--ink);
}
.order-pool .tile:disabled { opacity: .25; box-shadow: none; }
.order-line .tile { background: var(--lv); color: var(--lv-ink); border-color: transparent; }
@keyframes pop { 50% { transform: scale(1.12); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---------- day complete ---------- */
.done-link { float: right; font-size: .85rem; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 4px 10px; border-radius: 999px; }
.done-page { padding-top: calc(28px + env(safe-area-inset-top)); }
.done-hero { text-align: center; display: grid; justify-items: center; gap: 6px; margin-bottom: 22px; }
.done-hero h1 { font-size: 2.2rem; margin-top: 6px; }
.done-hero p { margin: 0; }
.done-talk { margin-top: 14px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.confetti i {
  position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; border-radius: 3px;
  background: var(--c); transform: rotate(var(--r)); animation: fall 2.8s var(--d) cubic-bezier(.3, .6, .5, 1) forwards; opacity: 0;
}
@keyframes fall {
  0% { opacity: 1; transform: translateY(0) rotate(var(--r)); }
  100% { opacity: 0; transform: translateY(105vh) rotate(calc(var(--r) + 540deg)); }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .gap, .fb { animation: none !important; } }

/* ---------- install ---------- */
.install-card { display: flex; gap: 14px; align-items: flex-start; }
.install-card b { display: flex; align-items: center; gap: 6px; font-size: 1.02rem; }
.install-card p { margin: 6px 0 0; color: var(--ink-soft); font-size: .9rem; }
.install-card .btn { margin-top: 12px; }
.install-steps { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: .9rem; display: grid; gap: 4px; }
.share-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface); color: #2f7bf6; font-size: .8rem; }

/* ---------- placement test ---------- */
.test-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 9px 14px;
  border-radius: 12px; background: var(--butter); color: var(--butter-ink); font-weight: 700; font-size: .88rem;
}
.sheet .test-link { margin-top: 14px; }
.test-skip { display: block; margin: 16px auto 0; color: var(--muted); font-weight: 600; font-size: .9rem; padding: 8px 12px; }
.choices.wide { grid-template-columns: 1fr; }
.level-badge.big { font-size: 1.6rem; padding: 8px 18px; border-radius: 16px; background: var(--lv); color: var(--lv-ink); margin-top: 4px; box-shadow: none; }
.done-hero h1 { text-align: center; }

/* ---------- listen-first mode ---------- */
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-top: 16px; background: var(--surface-2); border-radius: 16px; }
.mode-toggle button { padding: 10px 6px; border-radius: 12px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.mode-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.story-wrap { position: relative; }
.listen-cover { display: none; }
.listen-mode .tip { display: none; }
.listen-mode .story-text {
  filter: blur(7px); opacity: .55; user-select: none; pointer-events: none;
  max-height: 420px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
}
.listen-mode .listen-cover {
  display: grid; justify-items: center; text-align: center; gap: 6px;
  position: absolute; left: 0; right: 0; top: 24px; margin: 0 auto; max-width: 340px;
  padding: 20px 18px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg);
}
.cover-title { font-size: 1.25rem; font-weight: 800; }
.cover-text { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.cover-actions { display: grid; gap: 8px; width: 100%; }

/* ---------- quiz retry ---------- */
.result.retry { background: linear-gradient(135deg, var(--peach), var(--butter)); }
.result.retry .result-score { color: var(--peach-ink); }
.result.retry p { color: var(--ink-soft); }
.retry-note { margin: 4px 0 0; font-size: .85rem; font-weight: 600; color: var(--peach-ink); }
.suggest {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px;
  padding: 12px 14px; border-radius: 16px; background: var(--butter); color: var(--butter-ink); font-size: .88rem; font-weight: 600;
}
.suggest .btn { flex: none; background: var(--surface); }

/* ---------- known words ---------- */
.known { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.known.easy { background: var(--green-soft); color: var(--green); }
.known.ok { background: var(--butter); color: var(--butter-ink); }
.known.hard { background: var(--peach); color: var(--peach-ink); }
.known-line { margin: 6px 0 0; font-size: .85rem; color: var(--lv-ink); }
.known-gain { margin: 2px 0 0; font-size: .8rem; font-weight: 700; color: var(--green); }
.levelup {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 16px;
  border-radius: var(--radius); background: var(--lv); color: var(--lv-ink);
}
.levelup .robot { flex: none; }
.levelup-main b { display: block; font-size: 1rem; }
.levelup-main p { margin: 4px 0 12px; color: var(--ink-soft); }
.levelup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.levelup-actions .btn:not(.dark) { background: var(--surface); }
.theme-toggle { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.theme-note { margin: 8px 4px 0; }

/* ---------- notice this (grammar focus) ---------- */
.gbox { margin-top: 32px; padding: 20px; display: grid; gap: 6px; }
.gbox h2 { font-size: 1.3rem; margin: 2px 0 0; }
.gbox-es { margin: 0; font-family: var(--serif); font-style: italic; color: var(--muted); }
.gbox-text { margin: 6px 0 0; color: var(--ink-soft); font-size: .95rem; }
.gbox-pattern {
  margin: 6px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--lv); color: var(--lv-ink);
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600;
}
.gbox-sub { margin: 12px 0 0; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gbox-ex { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.gbox-ex li { padding-left: 12px; border-left: 3px solid var(--line); }
.nx-es { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.45; }
.nx-en { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.focus-on .w.new:not(.fx) { background: none; box-shadow: none; }
.focus-on .w.fx { font-weight: 700; }
.gbox mark, .focus-on .w.fx { background: var(--butter); color: var(--butter-ink); border-radius: 5px; padding: 0 2px; box-shadow: none; }
.gbox .btn { justify-self: start; margin-top: 8px; }
.listen-mode .gbox { display: none; }

/* ---------- course ---------- */
.see-all { float: right; font-size: .85rem; font-weight: 700; color: var(--lv-ink, var(--accent)); }
.units { margin-top: 0; }
.unit-row .lesson-main .muted { white-space: normal; }
.pips { display: flex; gap: 4px; }
.pips i { width: 18px; height: 6px; border-radius: 3px; background: var(--surface-2); }
.pips i.f { background: var(--green); }
.pips i.h { background: var(--butter-ink); opacity: .6; }
.pips i.na { background: transparent; border: 1.5px dashed var(--line); }
.text-btn { font-weight: 700; font-size: .9rem; color: var(--lv-ink, var(--accent)); padding: 8px 4px; }

.unit-page .eyebrow { margin-top: 4px; }
.unit-title { font-size: 1.75rem; font-weight: 800; margin: 4px 0 0; line-height: 1.2; }
.unit-es { margin: 4px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); }
.unit-goal { margin: 12px 0 20px; color: var(--ink-soft); }
.unit-steps div.path-step { cursor: default; }
.unit-actions { display: grid; gap: 10px; margin: 18px 0 8px; }
.unit-actions .result-actions { margin-top: 0; }
.summary-card { margin-top: 22px; }
.summary-card h2 { font-size: 1.05rem; margin: 0 0 8px; }
.summary-card ul, .summary-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-soft); font-size: .95rem; }
.summary-list { margin: 8px 0 16px; }

.lesson-page .card { margin-bottom: 14px; }
.lcard { display: grid; gap: 10px; }
.lcard h2 { font-size: 1.3rem; margin: 0; }
.lcard p { margin: 0; color: var(--ink-soft); }
.llist { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-soft); }
.lnote { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: .92rem; }
.lt-wrap { overflow-x: auto; }
.lt { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lt th { text-align: left; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.lt td { padding: 8px; border-bottom: 1px solid var(--line); }
.lt td:not(:first-child) { font-family: var(--serif); font-size: 1.05rem; }
.lex { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lex li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding-left: 12px; border-left: 3px solid var(--lv); }
.lex .icon-btn, .fb .say { background: var(--surface-2); }
mark.m1, mark.m2 { border-radius: 5px; padding: 0 3px; font-weight: 700; }
mark.m1 { background: var(--sky); color: var(--sky-ink); }
mark.m2 { background: var(--butter); color: var(--butter-ink); }
.lcheck { margin-top: 6px; padding-top: 14px; border-top: 1.5px dashed var(--line); }
.lcheck-label { font-size: .75rem !important; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted) !important; margin-bottom: 8px !important; }
.lcheck .choices { margin-top: 12px; }
.lcheck-why { margin-top: 10px !important; font-size: .92rem; }
.fb-why { margin: 0; }

.hl-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.hl-bar .text-btn { padding: 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--butter); vertical-align: -1px; margin: 0 4px 0 2px; }
.sw.imp, .sw.perf { background: var(--sky); }
.sw.pret { background: var(--butter); }
.focus-on .w.fx-imp, .focus-on .w.fx-perf { background: var(--sky); color: var(--sky-ink); }
.focus-on .w.fx-pret { background: var(--butter); color: var(--butter-ink); }
.listen-mode .hl-bar { display: none; }
.q-label { margin: 0 0 4px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--lv-ink, var(--accent)); }
.q-why { margin: 8px 0 0; font-size: .88rem; color: var(--ink-soft); }
.topbar:has(.topbar-right > :nth-child(2)) { grid-template-columns: 96px 1fr 96px; }
.topbar-right { gap: 6px; }
