/* ==========================================================
   Verhaaltjes — light theme by default, dark only on request
   ========================================================== */
:root {
  --bg: #fffaf3;
  --bg-2: #fff3e4;
  --surface: #ffffff;
  --surface-2: #f7f5ff;
  --text: #22264a;
  --text-2: #4b5075;
  --muted: #7a7f9a;
  --line: #ece7f6;
  --primary: #ff6b3d;
  --primary-2: #ff8f5c;
  --primary-soft: #fff0e8;
  --accent: #6c5ce7;
  --accent-soft: #efecff;
  --green: #1fa57a;
  --red: #e5484d;
  --now: #ffd84d;
  --now-text: #22264a;
  --past: #8a8fb0;
  --saved-line: #6c5ce7;
  --bubble-a: #ffffff;
  --bubble-b: #f1eeff;
  --shadow-sm: 0 1px 2px rgba(34, 38, 74, 0.06), 0 2px 8px rgba(34, 38, 74, 0.05);
  --shadow: 0 6px 24px rgba(34, 38, 74, 0.08), 0 2px 6px rgba(34, 38, 74, 0.05);
  --shadow-lg: 0 24px 60px rgba(34, 38, 74, 0.16);
  --radius: 18px;
  --radius-s: 12px;
  --font: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-read: 'Literata', Georgia, 'Times New Roman', serif;
  --player-h: 84px;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #14162b;
  --bg-2: #1a1d38;
  --surface: #1f2342;
  --surface-2: #262a4f;
  --text: #eef0ff;
  --text-2: #c7cae8;
  --muted: #9599bd;
  --line: #2f3460;
  --primary: #ff7f57;
  --primary-2: #ff9b70;
  --primary-soft: #3a2a33;
  --accent: #9d8fff;
  --accent-soft: #2d2b55;
  --now: #ffd84d;
  --now-text: #1a1d38;
  --past: #7d82ab;
  --bubble-a: #1f2342;
  --bubble-b: #2a2a55;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}
img, svg { display: block; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 850; }
h3 { font-size: 1.15rem; font-weight: 800; }
p { margin: 0 0 0.8em; }
kbd {
  font-family: ui-monospace, monospace;
  font-size: 0.78em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  margin: 0 1px;
}
.muted { color: var(--muted); }
.tiny { font-size: 0.8rem; }
.center { text-align: center; justify-content: center; }
.nowrap { white-space: nowrap; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap-s { gap: 8px; }
.gap-m { gap: 14px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.card-surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 999px; padding: 10px 18px;
  font-weight: 800; font-size: 0.95rem; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn.big { padding: 14px 24px; font-size: 1.02rem; }
.btn.small { padding: 7px 13px; font-size: 0.85rem; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 8px 20px rgba(255, 107, 61, 0.3); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(255, 107, 61, 0.38); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft.saved { background: var(--accent); color: #fff; }
.btn-light { background: #fff; color: var(--primary); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: transparent; border: 1.5px solid transparent; color: var(--text-2); transition: background 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.bordered { border-color: var(--line); background: var(--surface); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--accent); font-weight: 700; padding: 4px 0; }
.link-btn.small { font-size: 0.85rem; }
.round-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.round-btn:hover { background: var(--accent); color: #fff; }
.mini-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.mini-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.mini-btn.on { color: #f5a623; opacity: 1; }
.mini-btn.danger:hover { color: var(--red); border-color: var(--red); }

/* ---------- chips & pills ---------- */
.chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 0.8rem; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 6px; }
.level-pill { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 900; color: #fff; letter-spacing: 0.02em; }
.level-A1 { background: #ff7a59; }
.level-A2 { background: #7b5cff; }
.level-B1 { background: #1fa57a; }
.level-B2 { background: #a86b3c; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 800; color: var(--primary); background: var(--primary-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.eyebrow.small { font-size: 0.72rem; padding: 3px 9px; margin-bottom: 6px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand.small { font-size: 1.1rem; margin-bottom: 8px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--primary), #ffb347); color: #fff; box-shadow: 0 6px 14px rgba(255, 107, 61, 0.35); transform: rotate(-6deg); }
.brand-text span { color: var(--primary); }
.main-nav { display: flex; gap: 2px; margin-left: auto; }
.main-nav a { color: var(--text-2); font-weight: 750; padding: 8px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav-badge, .dot-badge { background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 900; border-radius: 999px; padding: 1px 7px; }
.dot-badge { position: absolute; top: 0; right: -2px; padding: 0 5px; }
.header-actions { display: flex; gap: 4px; }
.hide-desktop { display: none; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 36px 0; background: var(--bg-2); }
.app.with-player .site-footer { padding-bottom: calc(36px + var(--player-h)); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.footer-inner p { max-width: 420px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--text-2); font-weight: 700; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 50px 0 30px;
  background: radial-gradient(circle at 10% 20%, rgba(255, 179, 71, 0.18), transparent 40%), radial-gradient(circle at 90% 10%, rgba(108, 92, 231, 0.12), transparent 40%);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 .hl { background: linear-gradient(120deg, var(--primary), #ffb347); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 560px; }
.hero-stats { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.7rem; font-weight: 900; }
.hero-stats span { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.hero-art { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(34, 38, 74, 0.12)); }
.hero-art .blades { animation: spin 9s linear infinite; transform-box: fill-box; transform-origin: center; }
.hero-art .cloud { animation: drift 18s ease-in-out infinite alternate; }
.hero-art .cloud.slow { animation-duration: 26s; }
.hero-art .wave { animation: wave 4s ease-in-out infinite alternate; }
.hero-art .wave.slow { animation-duration: 6s; }
.hero-art .float { animation: bob 4s ease-in-out infinite; }
.hero-art .float.b { animation-delay: -1.3s; }
.hero-art .float.c { animation-delay: -2.6s; }
.hero-art .sun { animation: pulse 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { to { transform: translateX(40px); } }
@keyframes wave { to { transform: translateX(-20px); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes pulse { 50% { transform: scale(1.08); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */
.section { padding: 46px 0 10px; }
.section-title { margin-bottom: 22px; }
.section-title.center { text-align: center; }
.section-title p { max-width: 720px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin-bottom: 2px; }
.section-head p { margin: 0; }
.page { padding-top: 34px; animation: fade-up 0.35s ease; }
.page.narrow { max-width: 820px; }
.page-head { margin-bottom: 22px; }

/* dashboard */
.dash { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 10px; }
.continue { display: flex; gap: 16px; align-items: center; padding: 14px; color: var(--text); transition: transform 0.15s, box-shadow 0.15s; }
.continue:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.continue > div:last-child { flex: 1; }
.continue h3 { margin: 0; }
.continue p { margin: 2px 0 8px; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-tiles.wide { margin-bottom: 18px; }
.stat-tile { border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.stat-tile strong { font-size: 1.7rem; font-weight: 900; line-height: 1; }
.stat-tile span { font-size: 0.82rem; font-weight: 800; opacity: 0.85; }
.stat-tile.orange { background: #fff0e6; color: #d4521f; }
.stat-tile.purple { background: #efecff; color: #5a49d6; }
.stat-tile.green { background: #e3f7ef; color: #17845f; }
[data-theme='dark'] .stat-tile.orange { background: #3a2a2a; color: #ffad8a; }
[data-theme='dark'] .stat-tile.purple { background: #2d2b55; color: #b8adff; }
[data-theme='dark'] .stat-tile.green { background: #1d3a33; color: #7fe0b9; }

/* level cards */
.level-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.level-card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; color: var(--text); display: flex; flex-direction: column; gap: 6px; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.level-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: var(--lvl); }
.level-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--lvl); }
.level-card p { color: var(--text-2); font-size: 0.92rem; }
.level-big { font-size: 2.4rem; font-weight: 900; color: var(--lvl); line-height: 1; }
.level-count { margin-top: auto; padding-top: 10px; font-weight: 800; color: var(--lvl); }

/* story cards */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.story-grid.one { grid-template-columns: minmax(260px, 420px); }
.story-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--text); transition: transform 0.2s, box-shadow 0.2s; animation: fade-up 0.4s ease both;
}
.story-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.story-card:hover .cover-emoji, .story-card:hover .duo-topic { transform: scale(1.12) rotate(-6deg); }
.story-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.story-card h3 { margin: 4px 0 0; font-size: 1.25rem; }
.en-title { margin: 0 0 8px; font-size: 0.9rem; }
.story-summary { font-size: 0.92rem; color: var(--text-2); flex: 1; }
.story-card-meta { display: flex; justify-content: space-between; align-items: center; }
.topic { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.done-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 800; color: var(--green); background: #e3f7ef; padding: 2px 8px; border-radius: 999px; }
.story-card-foot { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.story-card-foot span { display: inline-flex; align-items: center; gap: 4px; }
.mini-progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.mini-progress div { height: 100%; background: linear-gradient(90deg, var(--primary), #ffb347); border-radius: 999px; }

/* covers */
.cover { position: relative; overflow: hidden; aspect-ratio: 5 / 3; flex-shrink: 0; }
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.6rem; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18)); transition: transform 0.3s; }
.cover-duo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.duo-face {
  display: grid; place-items: center; width: 34%; max-width: 92px; aspect-ratio: 1; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85); font-size: clamp(1.6rem, 4vw, 2.6rem); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
.duo-face:last-child { transform: translateY(8px); }
.duo-topic { font-size: clamp(1.5rem, 3.5vw, 2.2rem); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2)); transition: transform 0.3s; margin-top: -26px; }
.cover .level-pill { position: absolute; top: 12px; left: 12px; background: rgba(255, 255, 255, 0.92); color: #22264a; }
.kind-pill { position: absolute; top: 12px; right: 12px; background: rgba(34, 38, 74, 0.72); color: #fff; font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.cover-sm { width: 92px; border-radius: 14px; aspect-ratio: 1; }
.cover-sm .cover-emoji { font-size: 2.1rem; }
.cover-sm .level-pill, .cover-sm .kind-pill { display: none; }
.cover-sm .duo-face { width: 40%; font-size: 1.2rem; }
.cover-sm .duo-topic { display: none; }
.cover-lg { border-radius: 26px; box-shadow: var(--shadow-lg); transform: rotate(2deg); }
.cover-lg .cover-emoji { font-size: 6rem; }

/* how it works */
.how { background: linear-gradient(180deg, transparent, var(--bg-2)); padding-bottom: 50px; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.how-grid.five { grid-template-columns: repeat(5, 1fr); }
.how-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.how-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.how-step:nth-child(2) .how-icon { background: var(--accent-soft); color: var(--accent); }
.how-step:nth-child(3) .how-icon { background: #e3f7ef; color: var(--green); }
.how-step:nth-child(4) .how-icon { background: #ffe8f1; color: #d63a74; }
.how-step:nth-child(5) .how-icon { background: #fff6d6; color: #c28a00; }
.how-num { position: absolute; top: 16px; right: 18px; font-size: 2.2rem; font-weight: 900; color: var(--line); }
.cta-box {
  display: flex; align-items: center; gap: 22px; padding: 30px; border-radius: 26px; color: #fff;
  background: linear-gradient(120deg, var(--primary), #ff9f43 55%, #ffc658); box-shadow: 0 20px 40px rgba(255, 107, 61, 0.28);
}
.cta-box h2 { margin: 0; }
.cta-box p { margin: 4px 0 0; opacity: 0.95; }
.cta-box > div { flex: 1; }

/* ---------- library ---------- */
.filters { display: flex; flex-direction: column; gap: 14px; padding: 16px; margin-bottom: 24px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 4px 6px 4px 14px; color: var(--muted); border: 1.5px solid transparent; }
.search:focus-within { border-color: var(--accent); background: var(--surface); }
.search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--text); padding: 10px 0; outline: none; min-width: 0; }
.search.small { flex: 1; max-width: 340px; }
.search.small input { padding: 7px 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: 0.88rem; color: var(--text-2); }
.chip-btn:hover { border-color: var(--lvl, var(--accent)); }
.chip-btn.on { background: var(--lvl, var(--text)); border-color: var(--lvl, var(--text)); color: #fff; }
[data-theme='dark'] .chip-btn.on:not([style]) { color: var(--bg); }
.chip-count { opacity: 0.7; font-weight: 700; margin-left: 2px; }
select { font: inherit; font-weight: 700; font-size: 0.9rem; color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.empty { text-align: center; padding: 50px 24px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty-emoji { font-size: 3rem; margin-bottom: 6px; }
.empty p { max-width: 460px; }

/* ---------- story page ---------- */
.story-hero {
  padding: 30px 0 34px;
  background: radial-gradient(circle at 85% 30%, rgba(108, 92, 231, 0.1), transparent 45%), radial-gradient(circle at 5% 0%, rgba(255, 179, 71, 0.16), transparent 40%);
}
.story-hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.story-hero h1 { margin: 12px 0 0; }
.en-sub { color: var(--muted); font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--muted); margin-bottom: 12px; }
.back-link:hover { color: var(--accent); }
.story-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-2); font-weight: 700; margin-bottom: 20px; }
.story-meta span { display: inline-flex; align-items: center; gap: 6px; }
.story-layout, .story-hero .container { max-width: 960px; }

/* cast (conversation speakers) */
.cast { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 16px; }
.cast-member { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 16px 5px 5px; }
.cast-member div { display: flex; flex-direction: column; line-height: 1.25; }
.cast-member .muted { font-size: 0.78rem; font-weight: 700; }
.avatar { display: grid; place-items: center; border-radius: 50%; flex-shrink: 0; background: #fff0e6; box-shadow: inset 0 0 0 2px rgba(255, 107, 61, 0.25); }
.avatar.side-1 { background: #efecff; box-shadow: inset 0 0 0 2px rgba(108, 92, 231, 0.25); }
[data-theme='dark'] .avatar { background: #3a2a33; }
[data-theme='dark'] .avatar.side-1 { background: #2d2b55; }

/* role-play */
.roleplay { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 16px; margin-bottom: 12px; border-left: 5px solid #d63a74; }
.roleplay-text { display: flex; flex-direction: column; }
.roleplay-text strong { display: inline-flex; align-items: center; gap: 6px; }
.roleplay-text .muted { font-size: 0.86rem; }

/* tip */
.tip-box {
  display: flex; gap: 16px; align-items: flex-start; margin: 30px 0 10px; padding: 20px 22px; border-radius: var(--radius);
  background: linear-gradient(120deg, #fff4e9, #f1eeff); border: 1px solid var(--line);
}
[data-theme='dark'] .tip-box { background: linear-gradient(120deg, #2a2433, #24264a); }
.tip-box h2 { font-size: 1.2rem; margin-bottom: 4px; }
.tip-box p { margin: 0; color: var(--text-2); }
.tip-icon { font-size: 2rem; line-height: 1; }

/* vocab slider */
.vocab-slider { margin: 10px 0 22px; }
.vocab-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 14px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.vocab-card {
  --c: hsl(var(--hue) 85% 96%); --d: hsl(var(--hue) 55% 42%);
  position: relative; flex: 0 0 190px; scroll-snap-align: start; border-radius: 16px; background: var(--c);
  border: 1px solid hsl(var(--hue) 60% 88%); transition: transform 0.2s;
}
[data-theme='dark'] .vocab-card { --c: hsl(var(--hue) 30% 20%); --d: hsl(var(--hue) 80% 78%); border-color: hsl(var(--hue) 30% 28%); }
.vocab-card:hover { transform: translateY(-3px); }
.vocab-face { width: 100%; min-height: 132px; text-align: left; background: none; border: 0; padding: 14px 14px 40px; display: flex; flex-direction: column; gap: 4px; }
.vocab-type { font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: var(--d); opacity: 0.85; }
.vocab-nl { font-size: 1.12rem; font-weight: 900; color: var(--text); line-height: 1.2; }
.vocab-en { font-size: 0.9rem; color: var(--text-2); transition: filter 0.25s, opacity 0.25s; }
.vocab-card:not(.flipped) .vocab-en { filter: blur(5px); opacity: 0.6; }
.vocab-actions { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 6px; }
.vocab-actions .mini-btn { width: 28px; height: 28px; background: rgba(255, 255, 255, 0.7); border-color: transparent; }
[data-theme='dark'] .vocab-actions .mini-btn { background: rgba(0, 0, 0, 0.2); }

/* reader tools */
.reader-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 12px 16px; position: sticky; top: 74px; z-index: 20; margin-bottom: 12px; }
.font-size { display: flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); }
.font-size button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 3px 9px; font-weight: 900; font-size: 0.85rem; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-weight: 750; font-size: 0.9rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line); transition: background 0.2s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch-label { display: inline-flex; align-items: center; gap: 5px; }
.notice { background: #fff8e1; border: 1px solid #ffe08a; color: #7a5b00; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }
[data-theme='dark'] .notice { background: #3a3320; border-color: #5c4f22; color: #ffe08a; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 6px 0 10px; }

/* paragraphs & words */
.story-text { display: flex; flex-direction: column; gap: 6px; }
.para { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 18px 18px 14px 10px; border-radius: var(--radius); border: 1.5px solid transparent; transition: background 0.25s, border-color 0.25s, box-shadow 0.25s; }
.para:hover { background: var(--surface); }
.para.current { background: var(--surface); border-color: var(--line); }
.para.active { background: var(--surface); border-color: color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: 0 10px 30px rgba(255, 107, 61, 0.12); }
.para-side { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.para-play { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--primary-soft); color: var(--primary); transition: transform 0.15s, background 0.15s; flex-shrink: 0; }
.para-play:hover { transform: scale(1.08); background: var(--primary); color: #fff; }
.para-play.playing { background: var(--primary); color: #fff; box-shadow: 0 0 0 0 rgba(255, 107, 61, 0.5); animation: ring 1.6s infinite; }
@keyframes ring { 70% { box-shadow: 0 0 0 10px rgba(255, 107, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 61, 0); } }
.para-num { font-size: 0.75rem; font-weight: 900; color: var(--muted); }
.para-text { font-family: var(--font-read); font-size: calc(1.22rem * var(--font-scale, 1)); line-height: 1.85; margin: 0 0 6px; color: var(--text); }
.w {
  display: inline; font: inherit; color: inherit; background: none; border: 0; padding: 1px 1px; margin: 0 -1px; border-radius: 5px;
  cursor: pointer; transition: background 0.12s, color 0.12s, box-shadow 0.12s; -webkit-tap-highlight-color: transparent;
}
.w:hover { background: var(--accent-soft); color: var(--accent); }
.w.saved { text-decoration: underline dotted var(--saved-line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.w.sel { background: var(--accent); color: #fff; }
.karaoke .w.past { color: var(--past); }
.w.now { background: var(--now); color: var(--now-text); box-shadow: 0 0 0 2px var(--now); }
.para-en { font-size: calc(0.98rem * var(--font-scale, 1)); color: var(--text-2); background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 10px 14px; margin: 6px 0 8px; animation: fade-up 0.25s ease; }
.story-end { text-align: center; padding: 26px; color: var(--muted); font-weight: 800; }
.story-end span { font-size: 2rem; }

/* chat bubbles (conversations) */
.story-text.chat { gap: 14px; }
.para.bubble-row { display: flex; align-items: flex-end; gap: 10px; padding: 0; border: 0; background: none !important; box-shadow: none !important; }
.bubble-row.side-1 { flex-direction: row-reverse; }
.bubble-avatar { flex-shrink: 0; padding-bottom: 4px; }
.bubble {
  max-width: min(640px, 84%); background: var(--bubble-a); border: 1.5px solid var(--line); border-radius: 20px 20px 20px 6px;
  padding: 10px 16px 8px; box-shadow: var(--shadow-sm); transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.bubble-row.side-1 .bubble { background: var(--bubble-b); border-radius: 20px 20px 6px 20px; }
.bubble-row.active .bubble { border-color: color-mix(in srgb, var(--primary) 55%, transparent); box-shadow: 0 10px 30px rgba(255, 107, 61, 0.15); transform: translateY(-1px); }
.bubble-row.mine .bubble { border-style: dashed; border-color: #d63a74; }
.bubble-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.bubble-head strong { font-size: 0.92rem; }
.bubble-role { font-size: 0.72rem; font-weight: 800; color: var(--muted); background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }
.bubble-head .para-play { width: 30px; height: 30px; margin-left: auto; }
.your-turn { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 900; color: #d63a74; background: #ffe8f1; padding: 1px 8px; border-radius: 999px; }
.bubble .para-text { font-size: calc(1.14rem * var(--font-scale, 1)); line-height: 1.7; }
.bubble .para-en { margin-top: 2px; }

/* word popup */
.word-pop { position: absolute; z-index: 60; width: min(360px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px; animation: pop 0.16s ease-out; outline: none; }
.pop-arrow { position: absolute; top: -8px; width: 16px; height: 16px; margin-left: -8px; background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.word-pop.above .pop-arrow { top: auto; bottom: -8px; transform: rotate(225deg); }
.pop-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 34px; }
.pop-word { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.pop-base { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.pop-translation { font-size: 1.15rem; font-weight: 800; color: var(--accent); margin: 10px 0 8px; }
.pop-vocab { font-size: 0.86rem; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.pop-sentence { font-family: var(--font-read); font-style: italic; color: var(--text-2); font-size: 0.95rem; border-left: 3px solid var(--line); padding-left: 10px; margin-bottom: 14px; }
.pop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pop-actions .btn { padding: 9px 14px; font-size: 0.88rem; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(20, 22, 43, 0.35); z-index: 59; animation: fade-up 0.2s; }
.word-pop.sheet { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; border-radius: 24px 24px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: sheet 0.22s ease-out; max-height: 80vh; overflow: auto; }
.word-pop.sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 999px; background: var(--line); }

/* grammar */
.grammar { margin: 40px 0 26px; }
.grammar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grammar-grid.compact { margin: 16px 0; }
.grammar-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grammar-card h3 { font-size: 1.02rem; }
.grammar-card p { font-size: 0.92rem; color: var(--text-2); }
.grammar-ex { font-family: var(--font-read); font-style: italic; background: var(--primary-soft); color: var(--text) !important; border-radius: 10px; padding: 8px 12px; margin: 0; }

/* quiz */
.quiz { padding: 22px; margin: 26px 0 30px; }
.quiz-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; counter-reset: q; }
.quiz-question { font-weight: 800; margin-bottom: 8px; }
.quiz-q { counter-increment: q; }
.quiz-question::before { content: counter(q) '. '; color: var(--primary); }
.quiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quiz-opt { display: flex; align-items: center; gap: 10px; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; font-weight: 700; transition: border-color 0.15s, background 0.15s; }
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); }
.quiz-opt:disabled { opacity: 1; cursor: default; }
.opt-letter { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); font-size: 0.8rem; font-weight: 900; flex-shrink: 0; }
.opt-icon { margin-left: auto; }
.quiz-opt.correct { border-color: var(--green); background: #e3f7ef; color: #11684b; }
.quiz-opt.wrong { border-color: var(--red); background: #fdecec; color: #a02a2e; }
[data-theme='dark'] .quiz-opt.correct { background: #1d3a33; color: #7fe0b9; }
[data-theme='dark'] .quiz-opt.wrong { background: #3d2228; color: #ff9da0; }
.quiz-result { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px; border-radius: 14px; background: var(--accent-soft); font-weight: 800; }
.quiz-result.perfect { background: linear-gradient(120deg, #e3f7ef, #fff6d6); color: #17845f; }
.quiz-score { font-size: 1.8rem; font-weight: 900; }
.next-up { margin-bottom: 20px; }

/* player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(34, 38, 74, 0.08); padding-bottom: env(safe-area-inset-bottom);
}
.player-progress { position: absolute; top: -5px; left: 0; right: 0; height: 10px; cursor: pointer; }
.player-progress::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 3px; background: var(--line); }
.player-progress-para { position: absolute; left: 0; top: 4px; height: 3px; background: linear-gradient(90deg, var(--primary), #ffb347); transition: width 0.12s linear; }
.player-overall { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); opacity: 0.5; transition: width 0.3s; }
.player-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; height: var(--player-h); }
.player-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.player-text strong, .player-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-text .muted { font-size: 0.8rem; font-weight: 700; }
.src { font-weight: 800; }
.src-recorded { color: var(--green); }
.src-voice { color: #c28a00; }
.src-silent { color: var(--muted); }
.src-you { color: #d63a74; }
.player-controls { display: flex; align-items: center; gap: 8px; }
.ctrl { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--text); }
.ctrl:hover:not(:disabled) { background: var(--surface-2); }
.ctrl.ghost { color: var(--muted); }
.ctrl.main { width: 56px; height: 56px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 8px 20px rgba(255, 107, 61, 0.35); }
.ctrl.main:hover { background: linear-gradient(135deg, var(--primary), var(--primary-2)); transform: scale(1.05); }
.ctrl.main.loading { animation: ring 1.2s infinite; }
.player-extra { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }

/* speed control: −  1.00×  + */
.speed { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.speed-label { font-size: 0.8rem; font-weight: 800; color: var(--muted); padding: 0 6px; }
.speed-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.speed-btn:hover:not(:disabled) { background: var(--accent); color: #fff; }
.speed-value { min-width: 62px; border: 0; background: none; font-weight: 900; font-variant-numeric: tabular-nums; font-size: 0.98rem; color: var(--text); padding: 4px 2px; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(20, 22, 43, 0.45); display: grid; place-items: center; padding: 20px; animation: fade-up 0.2s; }
.modal { width: min(760px, 100%); max-height: 85vh; overflow: auto; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -20px; background: var(--surface); padding: 4px 0 10px; }
.vocab-table { width: 100%; border-collapse: collapse; }
.vocab-table th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.vocab-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vocab-table td .mini-btn + .mini-btn { margin-left: 6px; }

/* ---------- tabs / flashcards page ---------- */
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button, .tabs a, .seg button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-weight: 800; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.tabs button.on, .tabs a.on, .seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.review { max-width: 620px; margin: 0 auto; }
.review-tools { margin-bottom: 16px; }
.flashcard { perspective: 1200px; height: 280px; margin: 8px 0 14px; cursor: pointer; }
.fc-inner { position: relative; width: 100%; height: 100%; transition: transform 0.5s cubic-bezier(0.3, 1.2, 0.4, 1); transform-style: preserve-3d; }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; box-shadow: var(--shadow); }
.fc-front { background: linear-gradient(140deg, #fff, #fff4ea); border: 1px solid var(--line); }
[data-theme='dark'] .fc-front { background: linear-gradient(140deg, var(--surface), var(--surface-2)); }
.fc-back { background: linear-gradient(140deg, var(--accent), #8f7cff); color: #fff; transform: rotateY(180deg); }
.fc-label { font-size: 0.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }
.fc-word { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 900; line-height: 1.15; }
.fc-sentence { font-family: var(--font-read); font-style: italic; opacity: 0.92; font-size: 0.95rem; max-width: 460px; }
.grade-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.grade { border: 0; border-radius: 16px; padding: 14px 10px; font-weight: 900; font-size: 1rem; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; transition: transform 0.15s; }
.grade span { font-size: 0.75rem; font-weight: 700; opacity: 0.85; }
.grade:hover { transform: translateY(-2px); }
.grade.again { background: #ef6461; }
.grade.good { background: #1fa57a; }
.grade.easy { background: #3a8dde; }
.word-list { padding: 16px; }
.word-list ul { list-style: none; margin: 12px 0 0; padding: 0; }
.word-list li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.word-list li:last-child { border-bottom: 0; }
.wl-main { flex: 1; min-width: 0; }
.wl-story { display: inline-block; margin-left: 8px; font-size: 0.75rem; font-weight: 800; background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }
.box-dots { display: inline-flex; gap: 3px; }
.box-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.box-dots i.on { background: var(--green); }

/* ---------- levels page ---------- */
.levels-list { display: flex; flex-direction: column; gap: 20px; }
.level-row { padding: 22px; border-top: 6px solid var(--lvl); }
.level-row-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 12px; }
.level-row-head p { color: var(--text-2); margin: 0; }
.level-stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.level-story { display: flex; align-items: center; gap: 12px; color: var(--text); background: var(--surface-2); border-radius: 16px; padding: 8px; }
.level-story .cover-sm { width: 60px; }
.level-story .cover-sm .cover-emoji { font-size: 1.6rem; }
.level-story div:last-child { display: flex; flex-direction: column; }
.level-story:hover { outline: 2px solid var(--lvl); }
.more-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px; background: var(--surface); font-size: 1.8rem; }

/* prose */
.prose { padding: 26px; }
.prose h2 { font-size: 1.25rem; margin-top: 22px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 0; list-style: none; }
.prose li { padding: 4px 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .main-nav a { padding: 8px 9px; font-size: 0.92rem; }
  .how-grid.five { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1020px) {
  .level-grid, .how-grid { grid-template-columns: repeat(2, 1fr); }
  .player-inner { grid-template-columns: 1fr auto; }
  .player-info { display: none; }
  .player-controls { justify-content: flex-start; }
}
@media (max-width: 920px) {
  .main-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; font-size: 1rem; }
  .header-actions { margin-left: auto; }
  .hide-desktop { display: inline-grid; }
}
@media (max-width: 860px) {
  .hero-inner, .story-hero-inner, .dash { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; margin: 0 auto; order: -1; }
  .story-hero-inner .cover-lg { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .reader-tools { top: 66px; border-radius: 14px; }
}
@media (max-width: 640px) {
  :root { --player-h: 128px; }
  .container { padding: 0 14px; }
  .hero { padding-top: 20px; }
  .hero-stats { gap: 16px; }
  .level-grid, .how-grid, .how-grid.five, .grammar-grid, .quiz-options { grid-template-columns: 1fr; }
  .stat-tiles { gap: 8px; }
  .cta-box { flex-direction: column; text-align: center; }
  .para { grid-template-columns: 1fr; padding: 14px 12px; }
  .para-side { flex-direction: row; }
  .para-text { font-size: calc(1.12rem * var(--font-scale, 1)); line-height: 1.8; }
  .bubble { max-width: 100%; padding: 9px 13px 7px; }
  .bubble-avatar .avatar { width: 34px !important; height: 34px !important; font-size: 19px !important; }
  .bubble .para-text { font-size: calc(1.06rem * var(--font-scale, 1)); }
  .reader-tools { position: static; gap: 10px 16px; }
  .font-size { margin-left: 0; }
  .player-inner { grid-template-columns: 1fr; height: auto; gap: 8px; padding-top: 12px; padding-bottom: 10px; }
  .player-controls { justify-content: center; }
  .player-extra { justify-content: space-between; }
  .vocab-card { flex-basis: 160px; }
  .section-head .row { width: 100%; flex-wrap: wrap; }
  .grade-row { gap: 6px; }
  .flashcard { height: 240px; }
  .wl-story { display: none; }
  .cast-member { flex: 1 1 100%; }
  .tabs { flex-wrap: nowrap; }
  .tabs a, .tabs button { padding: 7px 11px; font-size: 0.86rem; white-space: nowrap; }
  .roleplay .seg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

