/* Pia Learning OS — V1 design system: "Learning Signal" visual identity
   (product_spec V1, Notion PIA SOURCE OF TRUTH §Visual Identity). Cold
   white / misty black / silver-gray base, electric-blue / ice-cyan as the
   primary accent, a small amount of misty violet for tertiary signals.
   Thin-line tracks, status dots, low-contrast grid, glass/frosted layers,
   restrained scan feel, monospace digital labels. Not a traditional
   "教辅蓝" nor a playful children's-app palette. Hand-written (no
   Tailwind — see PROGRESS.md for why); still a single consistent token
   set, just retuned. */

:root {
  /* cold white / silver-gray base */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eaeef3;
  --border: #dde3ea;
  --text: #10151d;
  --text-muted: #5b6472;
  --text-faint: #8b93a3;

  /* electric blue / ice cyan accent (replaces the old brand-purple) */
  --signal: #0d6efd;
  --signal-strong: #063f9e;
  --signal-soft: #e7f0ff;
  --ice: #22d3ee;
  --ice-soft: #e3fbff;
  --mist-violet: #8b7bd8;
  --mist-violet-soft: #efecfc;

  --good: #12a56a;
  --good-soft: #e5f9f0;
  --warn: #c9820a;
  --warn-soft: #fdf2e0;
  --bad: #d5384f;
  --bad-soft: #fdeaee;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10,20,40,0.04), 0 10px 28px rgba(10,20,40,0.07);
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Low-contrast background grid — the "restrained scan" texture. Fixed so
   it doesn't scroll with content; purely decorative, never carries data. */
body {
  background-image:
    linear-gradient(rgba(13,110,253,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,110,253,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 84px;
}

.app__content {
  flex: 1;
  padding: 20px 16px 8px;
}

/* Task 13: a single consolidated brand header across every authenticated
   page — "OpenSchool AI｜智能办学网" (temporary Alpha brand; the internal
   engineering project name "Pia Learning OS" stays in code/docs). */
.appbar {
  padding: 10px 16px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

/* ---- Bottom nav -------------------------------------------------------- */

.bottomnav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  display: flex;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 16px rgba(10,20,40,0.06);
}

.navitem {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  font-size: 11px;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}

.navitem__icon { font-size: 19px; line-height: 1; }
.navitem--active { color: var(--signal-strong); background: var(--signal-soft); }

/* ---- Cards / sections — glass / frosted layer --------------------------- */

.card {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card--tight { padding: 14px 16px; }

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-family: var(--mono);
}

.eyebrow {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}

.h1 { font-size: 22px; font-weight: 700; margin: 4px 0 0; letter-spacing: -0.01em; }
.h2 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: 13px; }

/* ---- Status dots (状态灯) — used anywhere a discrete state needs a
   glanceable, non-verbal signal (knowledge-map states, nav badges). ------ */

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot--unlearned { background: #c3cad4; }
.dot--learning { background: var(--ice); box-shadow: 0 0 0 3px var(--ice-soft); }
.dot--weak { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot--mastered { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.dot--review-due { background: var(--mist-violet); box-shadow: 0 0 0 3px var(--mist-violet-soft); }

/* ---- NEXT hero card — the Learning Signal focal point -------------------
   A thin animated "signal track" runs along the top edge: a quiet nod to
   the Learning Signal motif without being decorative-only — it is the
   same track style reused literally in the Data page trail, so it reads
   as one system rather than a one-off flourish. */

.next-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, var(--signal-strong) 0%, #082257 55%, #051636 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 26px 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 16px 40px rgba(6,63,158,0.32);
}
.next-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ice), var(--signal), transparent);
  opacity: 0.85;
}
.next-card .eyebrow { color: rgba(226,240,255,0.78); }
.next-card .h1 { color: white; }
.next-card .mission-title { font-size: 24px; font-weight: 800; margin: 12px 0 4px; letter-spacing: -0.01em; }
.next-card .mission-meta { font-size: 12.5px; color: var(--ice); font-family: var(--mono); margin-bottom: 14px; }
.next-card .mission-why {
  font-size: 13px; color: rgba(255,255,255,0.92); line-height: 1.6;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms var(--ease), background 150ms var(--ease), opacity 150ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: white; color: var(--signal-strong); }
.btn--primary:hover { background: var(--ice-soft); }
.btn--ghost { background: rgba(255,255,255,0.14); color: white; }
.btn--block { width: 100%; }
.btn--solid { background: var(--signal); color: white; }
.btn--solid:hover { background: var(--signal-strong); }
.btn--outline { background: transparent; color: var(--signal); border: 1.5px solid var(--signal); }
.btn--muted { background: var(--surface-2); color: var(--text); }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Progress stats row ------------------------------------------------- */

.stat-row { display: flex; gap: 12px; }
.stat {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  text-align: center;
}
.stat__value { font-size: 20px; font-weight: 800; font-family: var(--mono); }
.stat__label { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.01em; }

/* ---- Question / learning UI --------------------------------------------- */

.question-stem { font-size: 17px; font-weight: 600; line-height: 1.6; margin-bottom: 16px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 150ms var(--ease);
}
.choice:hover { border-color: var(--signal); }
.choice input { accent-color: var(--signal); width: 18px; height: 18px; }
.choice--correct { border-color: var(--good); background: var(--good-soft); }
.choice--incorrect { border-color: var(--bad); background: var(--bad-soft); }

.fill-blank-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  margin-bottom: 16px;
}

.feedback-banner {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.6;
}
.feedback-banner--correct { background: var(--good-soft); color: #0b6e46; }
.feedback-banner--incorrect { background: var(--bad-soft); color: #921f34; }

.error-tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.error-tag {
  font-size: 11.5px;
  font-family: var(--mono);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.08);
}

.hint-box {
  background: var(--warn-soft);
  color: #6b4506;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.solution-box {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }

/* ---- Sliders (session review) ------------------------------------------- */

.slider-group { margin-bottom: 20px; }
.slider-group label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.slider-group input[type="range"] { width: 100%; accent-color: var(--signal); }
.slider-hint { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-faint); }

/* ---- Knowledge map --------------------------------------------------------
   Five discrete states (未学/学习中/薄弱/掌握/待复习) rendered as a status
   dot + label, not just a continuous bar — product_spec requires the state
   to be legible at a glance, with the bar as supporting detail. Rows are
   click-to-expand (native <details>, no client JS needed) to show why:
   prerequisites and most recent evidence. */

.chapter-block { margin-bottom: 18px; }
.chapter-title { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; font-family: var(--mono); letter-spacing: 0.02em; }

.node-details { margin-bottom: 8px; }
.node-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.node-details > summary::-webkit-details-marker { display: none; }
.node-details[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.node-row__left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.node-row__name { font-size: 14px; font-weight: 600; }
.node-row__sub { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; font-family: var(--mono); }
.mastery-bar { width: 76px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; flex: none; }
.mastery-bar__fill { height: 100%; background: linear-gradient(90deg, var(--signal), var(--ice)); }
.mastery-pct { font-size: 12px; font-weight: 700; color: var(--signal-strong); min-width: 34px; text-align: right; font-family: var(--mono); }

.node-detail-panel {
  border: 1px solid var(--border);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  background: var(--surface-2);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.7;
}
.node-detail-panel__row { display: flex; gap: 6px; }
.node-detail-panel__row + .node-detail-panel__row { margin-top: 4px; }
.node-detail-panel__label { font-family: var(--mono); color: var(--text-faint); flex: none; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 16px; }
.legend__item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }

/* ---- Data page — Learning Signal trail ------------------------------------
   A row of small signal dots, one per recent session, brightness/size
   scaled by that session's real effective-learning-seconds — literally the
   "learning signal" motif rather than decoration: fog-gray for a light/short
   session, ice-cyan and larger for a strong one. No fabricated data — a
   session with zero recorded time renders as the dimmest dot, never hidden. */

.signal-trail { display: flex; align-items: flex-end; gap: 6px; height: 40px; margin: 4px 0 6px; }
.signal-trail__bar {
  flex: 1;
  min-width: 4px;
  max-width: 14px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--ice), var(--signal));
  opacity: 0.9;
}
.signal-trail__empty { color: var(--text-faint); font-size: 12.5px; }

.weak-node { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.weak-node:last-child { border-bottom: none; }

/* ---- AI Tutor quick actions ------------------------------------------------ */

.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.quick-action-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease), background 150ms var(--ease);
}
.quick-action-btn:hover { border-color: var(--signal); color: var(--signal-strong); }
.quick-action-btn--active { border-color: var(--signal); background: var(--signal-soft); color: var(--signal-strong); }
.quick-action-btn:disabled { opacity: 0.55; cursor: default; }

.tutor-advice { transition: opacity 220ms var(--ease); }
.tutor-advice--loading { opacity: 0.45; }

/* ---- Misc ------------------------------------------------------------------ */

.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-weight: 600; font-family: var(--mono); }
.badge--sample { background: var(--warn-soft); color: #6b4506; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.link-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.link-row:last-child { border-bottom: none; }

/* ---- Trusted vocabulary --------------------------------------------------- */

.vocabulary-intro { margin: 6px 0 16px; }
.vocabulary-library-tabs { display: flex; gap: 8px; margin: 14px 0 10px; }
.vocabulary-kind-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.vocabulary-kind-tabs .badge { text-decoration: none; padding: 7px 11px; }
.vocabulary-kind--active { background: var(--signal-soft); color: var(--signal-strong); }
.vocabulary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.vocabulary-stats .card { padding: 14px; display: grid; gap: 3px; }
.vocabulary-stats strong { font-size: 22px; }
.vocabulary-stats span { color: var(--text-muted); font-size: 12px; }
.vocabulary-card { margin-bottom: 14px; }
.vocabulary-card__top,
.vocabulary-word-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vocabulary-card__top { margin-bottom: 20px; }
.vocabulary-trust { background: var(--good-soft); color: var(--good); }
.vocabulary-word { font-size: clamp(34px, 9vw, 54px); font-weight: 750; letter-spacing: -0.035em; }
.vocabulary-word--sentence { font-size: clamp(20px, 5vw, 30px); line-height: 1.35; letter-spacing: -0.015em; }
.vocabulary-phonetic { color: var(--text-muted); margin-top: 4px; }
.vocabulary-recall { margin-top: 22px; border-radius: 12px; background: var(--surface-2); padding: 12px 14px; }
.vocabulary-recall summary { cursor: pointer; font-weight: 650; color: var(--signal-strong); }
.vocabulary-definition { font-size: 20px; font-weight: 650; margin-top: 24px; }
.vocabulary-example { margin-top: 12px; line-height: 1.65; color: var(--text-muted); }
.vocabulary-memory-tip { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--ice-soft); line-height: 1.55; font-size: 13px; }
.vocabulary-source { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; font-size: 12px; }
.vocabulary-source summary { cursor: pointer; font-weight: 650; margin-bottom: 8px; }
.vocabulary-source a { color: var(--signal-strong); display: block; margin-bottom: 6px; }
.vocabulary-source code { display: block; overflow-wrap: anywhere; margin-top: 8px; color: var(--text-faint); }
.vocabulary-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 22px; }
.vocabulary-actions .button { min-width: 0; padding-inline: 8px; }
.vocabulary-save-state { margin-top: 12px; text-align: center; }
.vocabulary-audit p { line-height: 1.6; }
.vocabulary-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.vocabulary-pager span { color: var(--text-muted); font-family: var(--mono); font-size: 12px; }
.vocabulary-pager [aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

@media (max-width: 520px) {
  .vocabulary-actions { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Podcast Lab -------------------------------------------------------- */

.podcast-app { max-width: 760px; }
.podcast-app .app__content { padding-top: 12px; }
.podcast-app .bottomnav { justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; }
.podcast-app .bottomnav::-webkit-scrollbar { display: none; }
.podcast-app .navitem { flex: 0 0 72px; }
.podcast-hero {
  color: white;
  background:
    radial-gradient(circle at 82% 12%, rgba(34,211,238,0.34), transparent 32%),
    radial-gradient(circle at 12% 88%, rgba(139,123,216,0.3), transparent 30%),
    linear-gradient(145deg, #06142f 0%, #0a2f6d 58%, #094d73 100%);
  border-radius: 26px;
  padding: 24px 22px;
  box-shadow: 0 22px 60px rgba(6,31,75,0.3);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}
.podcast-hero .eyebrow { color: #9deeff; }
.podcast-hero .h1 { font-size: clamp(25px, 7vw, 38px); line-height: 1.15; max-width: 560px; }
.podcast-hero p { color: rgba(255,255,255,0.78); line-height: 1.7; margin: 12px 0 0; font-size: 14px; }
.podcast-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 8px 11px;
  color: rgba(255,255,255,0.85);
  font: 11px var(--mono);
  white-space: nowrap;
}
.podcast-status__dot { width: 7px; height: 7px; border-radius: 50%; background: #8590a5; }
.podcast-status[data-state="connecting"] .podcast-status__dot,
.podcast-status[data-state="thinking"] .podcast-status__dot { background: #f7bd4a; box-shadow: 0 0 0 4px rgba(247,189,74,0.15); }
.podcast-status[data-state="listening"] .podcast-status__dot { background: #35e6a2; box-shadow: 0 0 0 4px rgba(53,230,162,0.14); }
.podcast-status[data-state="speaking"] .podcast-status__dot { background: #49d9ff; box-shadow: 0 0 0 4px rgba(73,217,255,0.16); }
.podcast-status[data-state="error"] .podcast-status__dot { background: #ff7288; }

.podcast-stage {
  margin: 18px 0;
  min-height: 330px;
  border: 1px solid rgba(13,110,253,0.13);
  border-radius: 26px;
  background: rgba(255,255,255,0.76);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 20px;
  overflow: hidden;
  position: relative;
}
.podcast-stage::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(34,211,238,0.11), transparent 68%);
  pointer-events: none;
}
.podcast-orb { height: 92px; display: flex; align-items: center; gap: 7px; margin-bottom: 18px; position: relative; z-index: 1; }
.podcast-orb span {
  display: block;
  width: 8px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ice), var(--signal));
  opacity: 0.64;
  transition: height 300ms var(--ease), opacity 300ms var(--ease);
}
.podcast-orb span:nth-child(2), .podcast-orb span:nth-child(4) { height: 54px; }
.podcast-orb span:nth-child(3) { height: 74px; }
.podcast-orb[data-state="listening"] span { animation: podcast-wave 1.2s ease-in-out infinite alternate; }
.podcast-orb[data-state="listening"] span:nth-child(2) { animation-delay: -0.7s; }
.podcast-orb[data-state="listening"] span:nth-child(3) { animation-delay: -0.3s; }
.podcast-orb[data-state="speaking"] span { animation: podcast-wave .48s ease-in-out infinite alternate; opacity: 1; }
.podcast-orb[data-state="thinking"] { animation: podcast-breathe 1.4s ease-in-out infinite; }
@keyframes podcast-wave { to { height: 18px; opacity: 0.35; } }
@keyframes podcast-breathe { 50% { transform: scale(.86); opacity: .55; } }
.podcast-stage__copy { display: grid; gap: 6px; position: relative; z-index: 1; }
.podcast-stage__copy strong { font-size: 19px; }
.podcast-stage__copy span { color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.podcast-main-button {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  border: none;
  border-radius: 999px;
  background: var(--signal);
  color: white;
  font-size: 16px;
  font-weight: 750;
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(13,110,253,0.28);
}
.podcast-main-button__icon { color: #ff7890; margin-right: 8px; }
.podcast-main-button:disabled { opacity: .56; cursor: wait; }

.podcast-controls { display: grid; gap: 22px; }
.podcast-control-group { display: grid; gap: 9px; }
.podcast-control-group .section-title { margin: 0; }
.podcast-control-group .section-title span { text-transform: none; letter-spacing: 0; font-family: inherit; font-weight: 500; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block;
  text-align: center;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  background: var(--surface);
}
.segmented input:checked + span { color: var(--signal-strong); background: var(--signal-soft); border-color: rgba(13,110,253,.45); }
.segmented input:focus-visible + span { outline: 3px solid rgba(13,110,253,.2); outline-offset: 2px; }
.podcast-select { width: 100%; border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; background: var(--surface); color: var(--text); font-size: 14px; }
.podcast-controls--locked .segmented,
.podcast-controls--locked .podcast-select { opacity: .55; pointer-events: none; }
.podcast-listen-button { border: 1px solid var(--mist-violet); color: var(--mist-violet); background: var(--mist-violet-soft); border-radius: 999px; padding: 11px 16px; font-weight: 700; cursor: pointer; }
.podcast-listen-button--active { color: white; background: var(--mist-violet); }

.podcast-transcript-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.podcast-transcript-head p { margin: 0 0 14px; color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.podcast-transcript { max-height: 430px; overflow-y: auto; display: grid; gap: 12px; }
.podcast-empty { text-align: center; color: var(--text-faint); font-size: 13px; padding: 24px 10px; }
.podcast-line { max-width: 88%; }
.podcast-line--me { justify-self: end; text-align: right; }
.podcast-line--ai { justify-self: start; }
.podcast-line--system { justify-self: center; text-align: center; max-width: 100%; }
.podcast-line__meta { color: var(--text-faint); font: 10px var(--mono); margin: 0 5px 5px; }
.podcast-line__body { background: var(--surface-2); border-radius: 15px 15px 15px 4px; padding: 11px 13px; line-height: 1.65; font-size: 14px; text-align: left; }
.podcast-line--me .podcast-line__body { color: white; background: var(--signal); border-radius: 15px 15px 4px 15px; }
.podcast-line--system .podcast-line__body { color: var(--bad); background: var(--bad-soft); border-radius: 10px; }
.podcast-downloads { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.podcast-plain-language summary { cursor: pointer; font-weight: 700; }
.podcast-plain-language p { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

@media (max-width: 560px) {
  .podcast-hero { grid-template-columns: 1fr; }
  .podcast-status { justify-self: start; }
  .podcast-stage { min-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

@media (prefers-color-scheme: dark) {
  :root {
    /* misty black base for dark mode, per spec (雾黑) rather than pure OLED black */
    --bg: #0b0e14;
    --surface: #12161f;
    --surface-2: #1a2029;
    --border: #232a36;
    --text: #eef1f6;
    --text-muted: #9aa3b5;
    --text-faint: #6d7688;
    --signal-soft: #16233f;
    --ice-soft: #0f2c33;
    --mist-violet-soft: #241f3d;
    --good-soft: #0e2a20;
    --warn-soft: #2c2008;
    --bad-soft: #301019;
  }
  body {
    background-image:
      linear-gradient(rgba(34,211,238,0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(34,211,238,0.045) 1px, transparent 1px);
  }
  .bottomnav { background: rgba(18,22,31,0.82); }
  .card { background: rgba(18,22,31,0.86); }
}

/* Student experience refresh: mobile-first, four destinations, quiet hierarchy. */
html { overflow-x: hidden; }
body {
  overflow-x: hidden;
  background: #fbfbfa;
  background-image: none;
  color: #111318;
  font-size: 16px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { max-width: 100%; }
.app {
  width: 100%;
  max-width: 860px;
  min-height: 100svh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}
.appbar {
  height: 52px;
  padding: 18px 20px 0;
  color: #111318;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: -.02em;
}
.app__content {
  width: 100%;
  min-width: 0;
  padding: 18px 20px 24px;
}
.bottomnav,
.podcast-app .bottomnav {
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
  transform: translateX(-50%);
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
  background: rgba(251,251,250,.94);
  border-top: 1px solid #e7e7e3;
  box-shadow: none;
  z-index: 20;
}
.navitem,
.podcast-app .navitem {
  min-width: 0;
  min-height: 54px;
  flex: initial;
  padding: 7px 2px 5px;
  gap: 3px;
  border-radius: 12px;
  color: #777a82;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.navitem__icon { display: grid; place-items: center; height: 23px; font-size: 0; }
.navitem__icon svg { width: 22px; height: 22px; fill: currentColor; }
.navitem__label { display: block; white-space: nowrap; line-height: 1.15; }
.navitem--active { color: #0969da; background: transparent; }
.h1 { font-size: clamp(30px, 8.4vw, 42px); line-height: 1.08; letter-spacing: -.045em; }
.h2 { font-size: 20px; letter-spacing: -.025em; }
.eyebrow, .section-kicker {
  margin: 0 0 7px;
  color: #777a82;
  font: 700 12px/1.2 inherit;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.faint { color: #6d717a; font-size: 14px; }
.card {
  background: #fff;
  border: 1px solid #e8e8e4;
  border-radius: 16px;
  box-shadow: none;
}
.primary-action, .secondary-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 13px;
  padding: 0 20px;
  font-weight: 750;
  font-size: 16px;
  cursor: pointer;
}
.primary-action { width: 100%; color: #fff; background: #111318; }
.primary-action:hover { background: #24272e; }
.primary-action:disabled { opacity: .45; cursor: not-allowed; }
.secondary-action { color: #111318; background: #f0f1f2; }
.text-button {
  border: 0;
  background: transparent;
  color: #656a73;
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
}
.back-link { display: inline-block; min-height: 42px; color: #60656f; font-size: 14px; }
.page-heading { margin: 16px 0 32px; }
.page-heading h1 { margin: 0; font-size: clamp(32px, 9vw, 48px); line-height: 1.07; letter-spacing: -.05em; }
.page-heading > p:last-child { max-width: 590px; margin: 12px 0 0; color: #6a6e77; font-size: 16px; }

/* Welcome and authentication */
.auth-body { min-height: 100svh; background: #fff; }
.welcome-screen, .auth-screen {
  width: min(100%, 520px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top, 0px)) 20px max(28px, env(safe-area-inset-bottom, 0px));
}
.welcome-screen { display: flex; flex-direction: column; }
.welcome-brand, .auth-brand { font-size: 18px; font-weight: 800; letter-spacing: -.035em; }
.welcome-copy { margin: auto 0; padding: 64px 0; }
.welcome-copy h1 { margin: 0; font-size: clamp(44px, 13vw, 66px); line-height: .99; letter-spacing: -.065em; }
.welcome-copy > p:last-child, .auth-lead { margin: 22px 0 0; color: #6d717a; font-size: 17px; }
.welcome-kicker { color: #0969da; font-size: 13px; font-weight: 750; letter-spacing: .06em; }
.auth-screen { display: flex; flex-direction: column; }
.auth-panel { margin: auto 0; padding: 56px 0 80px; }
.auth-panel h1 { margin: 0; font-size: clamp(36px, 10vw, 50px); line-height: 1.04; letter-spacing: -.055em; }
.auth-panel label, .auth-form label, .settings-form label { display: grid; gap: 8px; margin: 18px 0; color: #50545d; font-size: 14px; font-weight: 650; }
.auth-panel input, .settings-form input, .settings-form select, #podcast-voice {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 14px;
  color: #111318;
  background: #fff;
  border: 1px solid #d9dadd;
  border-radius: 12px;
  font-size: 16px;
}
.phone-field { display: flex; align-items: center; min-height: 52px; border: 1px solid #d9dadd; border-radius: 12px; overflow: hidden; }
.phone-field span { padding: 0 12px 0 14px; color: #565a63; border-right: 1px solid #e1e2e4; }
.phone-field input { border: 0; border-radius: 0; }
.otp-field { letter-spacing: .25em; text-align: center; font-size: 22px !important; }
.phone-auth .primary-action, .auth-form .primary-action { margin-top: 6px; }
.auth-help, .auth-unavailable { margin: 10px 0 0; color: #747880; font-size: 13px; }
.auth-unavailable { color: #8b6214; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 25px 0 18px; color: #9a9ca2; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: #e5e5e2; }
.account-login summary { min-height: 46px; display: grid; place-items: center; cursor: pointer; color: #4e535c; font-weight: 700; }
.account-login summary::marker { content: ''; }
.account-login .secondary-action { width: 100%; }
.auth-switch { margin: 22px 0 0; text-align: center; color: #70747c; font-size: 14px; }
.auth-switch a { color: #0969da; font-weight: 700; }
.auth-notice, .auth-error { margin-top: 14px; color: #b4233a; font-size: 14px; }
.auth-notice { color: #257553; }

/* Learning home */
.profile-hero { margin: 0 -20px 42px; }
.profile-cover { height: 128px; background: #e7edf4; }
.profile-avatar {
  width: 82px;
  height: 82px;
  margin: -41px 20px 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #1d2530;
  border: 4px solid #fbfbfa;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 800;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero h1 { margin: 14px 20px 0; font-size: 29px; letter-spacing: -.04em; }
.profile-hero p { margin: 4px 20px 0; color: #575c65; font-size: 15px; }
.profile-hero > span { display: block; margin: 13px 20px 0; font-size: 16px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.section-heading h2, .plan-section > h2, .learn-entry-section > h2, .today-summary h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.section-heading a { color: #70747c; font-size: 13px; white-space: nowrap; }
.plan-section { margin-bottom: 44px; }
.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #e7e7e3;
}
.plan-row div { min-width: 0; display: grid; gap: 3px; }
.plan-row div span, .plan-row > span { color: #737780; font-size: 13px; }
.plan-row > span { flex: none; }
.today-section { margin-bottom: 42px; }
.today-section > h2 { margin: 0 0 18px; font-size: clamp(28px, 8vw, 38px); letter-spacing: -.045em; }
.next-card {
  padding: 25px 22px 22px;
  color: #111318;
  background: #fff;
  border: 1px solid #dedfdf;
  border-radius: 18px;
  box-shadow: none;
}
.next-card::before { display: none; }
.next-card .today-subject { color: #0969da; font-size: 13px; font-weight: 750; }
.next-card .mission-title { margin: 10px 0 2px; font-size: clamp(27px, 8vw, 38px); line-height: 1.12; }
.next-card .mission-meta { color: #5f646d; font: 14px inherit; }
.next-card .mission-why { margin: 18px 0; padding: 0; color: #5f646d; background: none; border: 0; font-size: 15px; }
.feature-row, .simple-menu > a, .book-list > a, .book-list > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 16px 0;
  border-bottom: 1px solid #e7e7e3;
}
.feature-row > span, .simple-menu a > span, .book-list > * > span { display: grid; gap: 3px; min-width: 0; }
.feature-row strong, .simple-menu strong, .book-list strong { font-size: 17px; }
.feature-row small, .simple-menu small, .book-list small { color: #737780; font-size: 14px; }
.feature-row b, .simple-menu b, .book-list b { color: #777b84; font-size: 14px; white-space: nowrap; }
.learn-entry-section { margin-bottom: 42px; }
.today-summary { padding-top: 4px; }
.today-summary p { color: #737780; }

/* Chat */
.chat-starters { display: flex; gap: 8px; overflow-x: auto; margin: -15px 0 20px; padding-bottom: 4px; scrollbar-width: none; }
.chat-starters button {
  flex: none;
  min-height: 42px;
  padding: 0 14px;
  color: #42464f;
  background: #f0f1f2;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.conversation { min-height: 300px; padding: 4px 0 90px; }
.conversation p { max-width: 86%; margin: 12px 0 !important; padding: 12px 15px; background: #f0f1f2; border-radius: 16px 16px 16px 5px; line-height: 1.65; }
.conversation p:has(strong:first-child) { margin-left: auto !important; }
.conversation-loading { color: #777b84; }
.chat-composer {
  position: sticky;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 8px;
  padding: 10px;
  background: rgba(251,251,250,.94);
  border: 1px solid #dedfdf;
  border-radius: 16px;
  backdrop-filter: blur(12px);
}
.chat-composer input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px; font-size: 16px; outline: 0; }
.chat-send { min-width: 58px; border: 0; border-radius: 11px; color: #fff; background: #111318; font-weight: 700; }

/* Vocabulary */
.vocabulary-heading { margin-bottom: 18px; }
.subtabs { display: flex; gap: 8px; margin-bottom: 25px; }
.subtabs a { min-height: 42px; display: grid; place-items: center; padding: 0 14px; color: #656a73; background: #f0f1f2; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.subtabs a.is-active { color: #fff; background: #111318; }
.book-list { margin-top: -8px; }
.book-list__disabled { opacity: .48; }
.vocabulary-session-meta { display: flex; justify-content: space-between; margin: 0 0 18px; color: #797d85; font-size: 13px; }
.vocabulary-card { padding: 26px 0 8px; border-top: 1px solid #e5e5e2; border-bottom: 1px solid #e5e5e2; }
.vocabulary-category { color: #0969da; font-size: 13px; font-weight: 700; }
.vocabulary-word-row { align-items: flex-start; }
.vocabulary-word { margin: 0; font-size: clamp(42px, 13vw, 68px); line-height: 1.02; letter-spacing: -.055em; }
.vocabulary-word--sentence { font-size: clamp(25px, 7vw, 40px); line-height: 1.18; }
.vocabulary-phonetic { margin: 9px 0 0; color: #60656e; font-size: 16px; }
.speak-button { flex: none; min-width: 54px; min-height: 48px; display: grid; place-items: center; gap: 1px; color: #0969da; background: #edf4fc; border: 0; border-radius: 13px; cursor: pointer; }
.speak-button svg { width: 19px; height: 19px; fill: currentColor; }
.speak-button span { font-size: 11px; }
.vocabulary-definition { margin: 31px 0 0; font-size: clamp(24px, 7vw, 32px); font-weight: 750; }
.memory-hook, .word-context { margin-top: 28px; }
.memory-hook > span, .word-context > span { color: #72767f; font-size: 13px; font-weight: 700; }
.memory-hook p, .word-context p { margin: 7px 0 0; font-size: 17px; line-height: 1.7; }
.more-info, .quiet-details { margin-top: 28px; border-top: 1px solid #e5e5e2; }
.more-info:not([open]) > :not(summary),
.quiet-details:not([open]) > :not(summary),
.account-login:not([open]) > :not(summary) { display: none !important; }
.more-info > summary, .quiet-details > summary { min-height: 54px; display: flex; align-items: center; color: #555a63; cursor: pointer; font-weight: 700; }
.more-info__body p { display: grid; gap: 4px; margin: 15px 0; color: #656a73; font-size: 14px; }
.more-info__body code { overflow-wrap: anywhere; font-size: 11px; }
.vocabulary-recall { display: none; }
.vocabulary-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 25px; }
.vocabulary-actions button { min-width: 0; min-height: 50px; padding: 4px; color: #333740; background: #f0f1f2; border: 0; border-radius: 12px; font-weight: 700; cursor: pointer; }
.vocabulary-actions button:nth-child(n+3) { color: #fff; background: #111318; }
.vocabulary-save-state { margin: 12px 0 0; color: #858991; text-align: center; font-size: 13px; }
.vocabulary-pager { margin-top: 18px; }
.vocabulary-pager a { min-height: 48px; display: grid; place-items: center; padding: 0 18px; background: #f0f1f2; border-radius: 12px; font-weight: 700; }
.vocabulary-pager .pager-next { color: #fff; background: #111318; }

/* Practice, profile and podcast */
.practice-primary { margin-bottom: 24px; padding: 24px; background: #eef3f8; border-radius: 18px; }
.practice-primary span { color: #0969da; font-size: 12px; font-weight: 750; }
.practice-primary h2 { margin: 8px 0 0; font-size: 28px; letter-spacing: -.04em; }
.practice-primary p { margin: 8px 0 22px; color: #626770; }
.practice-question-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e5e5e2; }
.practice-question-row div { display: grid; gap: 4px; }
.practice-question-row div span, .practice-question-row > span { color: #72767f; font-size: 13px; }
.profile-hero--me { margin-top: -18px; }

.home-greeting { margin: 22px 0 34px; }
.home-greeting p { margin: 0 0 6px; color: #0969da; font-weight: 750; }
.home-greeting h1 { max-width: 680px; margin: 0; font-size: clamp(30px, 8vw, 47px); line-height: 1.08; letter-spacing: -.05em; }
.home-greeting span { display: block; margin-top: 12px; color: #6a6e77; }
.today-timeline { margin: 0 0 42px; }
.today-timeline ol { margin: 18px 0 0; padding: 0; list-style: none; }
.timeline-item { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid #eceef0; color: #92969d; }
.timeline-item div { display: flex; justify-content: space-between; gap: 12px; }
.timeline-item strong { color: #25282d; font-size: 15px; }
.timeline-item small { white-space: nowrap; }
.timeline-item--done > span { color: #28845a; }
.timeline-item--current > span, .timeline-item--current strong { color: #0969da; }
.timeline-empty { padding: 18px 0; color: #777b84; }

.mentor-header { display: flex; gap: 15px; align-items: center; margin: 18px 0 30px; }
.mentor-avatar { display: grid; place-items: center; flex: 0 0 58px; height: 58px; border-radius: 50%; background: #11151b; color: white; font-size: 20px; font-weight: 800; }
.mentor-header h1 { margin: 2px 0 5px; font-size: clamp(28px, 7vw, 42px); letter-spacing: -.045em; }
.mentor-header span { color: #6a6e77; font-size: 14px; }
.mentor-status { display: grid; grid-template-columns: minmax(112px, .35fr) 1fr; gap: 12px; margin-bottom: 24px; }
.mentor-status > * { margin: 0; padding: 18px; border: 1px solid #e4e6e8; border-radius: 17px; background: #fff; }
.mentor-status strong { display: block; font-size: 27px; }
.mentor-status span { display: block; margin-bottom: 5px; color: #737780; font-size: 12px; }
.mentor-conversation { min-height: 220px; padding-bottom: 18px; }
.mentor-action-cards { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 18px; }
.mentor-action-cards a { flex: 0 0 auto; padding: 10px 14px; border: 1px solid #dfe2e5; border-radius: 999px; color: #272a30; font-size: 13px; font-weight: 700; }

.strategy-summary { display: grid; gap: 12px; margin-bottom: 42px; }
.strategy-summary > div { padding: 20px; border: 1px solid #e3e5e7; border-radius: 18px; }
.strategy-summary span { display: block; margin-bottom: 8px; color: #72767e; font-size: 12px; }
.strategy-summary strong { font-size: 20px; }
.strategy-summary p { margin: 8px 0 0; color: #5f646d; }
.vp-talk-heading { margin-bottom: 12px; }

.me-progress { margin-bottom: 36px; }
.subject-progress-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.subject-progress-grid > div { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 15px; border: 1px solid #e5e7e9; border-radius: 15px; }
.subject-progress-grid span { font-weight: 750; }
.subject-progress-grid small { grid-column: 1 / -1; color: #777b84; }
.subject-progress-grid i { position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, #0969da var(--progress), #edf0f2 var(--progress)); }
.admin-entry { border-color: #9fc5ef !important; background: #f5f9ff !important; }

@media (max-width: 520px) {
  .mentor-status { grid-template-columns: 1fr; }
  .timeline-item div { display: block; }
  .timeline-item small { display: block; margin-top: 4px; }
}
.settings-form { max-width: 520px; padding-bottom: 10px; }
.danger-link { color: #b4233a; margin-top: 24px; }
.current-goal { margin-bottom: 28px; padding: 24px; background: #eef3f8; border-radius: 18px; }
.current-goal > span { color: #0969da; font-size: 12px; font-weight: 750; }
.current-goal h2 { margin: 7px 0 3px; font-size: 27px; letter-spacing: -.04em; }
.current-goal p { margin: 0; color: #676b74; }
.goal-row { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e5e5e2; }
.goal-row > span { display: grid; gap: 3px; }
.goal-row small { color: #737780; font-size: 13px; }
.goal-row button { min-width: 64px; min-height: 42px; color: #fff; background: #111318; border: 0; border-radius: 11px; font-weight: 700; }
.onboarding-screen { width: min(100%, 560px); min-height: 100svh; margin: 0 auto; padding: max(28px, env(safe-area-inset-top, 0px)) 20px max(28px, env(safe-area-inset-bottom, 0px)); }
.onboarding-question { margin: 14vh 0 40px; }
.onboarding-question h1 { margin: 0; font-size: clamp(36px, 10vw, 52px); line-height: 1.04; letter-spacing: -.055em; }
.onboarding-question > p { color: #6d717a; font-size: 16px; }
.choice-stack { display: grid; margin: 28px 0; border-top: 1px solid #e5e5e2; }
.choice-stack > a, .choice-stack > span, .choice-stack > button, .choice-stack > label { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; color: #111318; background: transparent; border: 0; border-bottom: 1px solid #e5e5e2; text-align: left; font-size: 16px; cursor: pointer; }
.choice-stack > [aria-disabled="true"] { opacity: .42; cursor: default; }
.choice-stack > * > span { display: grid; gap: 3px; }
.choice-stack small { color: #737780; font-size: 13px; }
.choice-stack--radio input { width: 20px; height: 20px; margin-right: 12px; accent-color: #111318; }
.choice-stack--radio label { justify-content: flex-start; }
.optional-goal { display: grid; gap: 8px; margin: 24px 0; color: #5d626b; font-size: 14px; }
.optional-goal input, .optional-goal textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #d9dadd; border-radius: 12px; font-size: 16px; }
.intake-question { margin-top: 32px; }
.intake-question h2 { font-size: 23px; line-height: 1.3; }
.intake-question .choice-stack { margin-top: 16px; }
.vp-welcome { margin: 32px 0; padding: 20px; background: #eef3f8; border-radius: 16px; line-height: 1.7; }
.podcast-app { max-width: 860px; }
.podcast-heading { margin-bottom: 15px; }
.podcast-status { color: #656a73; background: transparent; border-color: #dedfdf; margin-bottom: 18px; }
.podcast-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.podcast-modes label { min-width: 0; }
.podcast-modes input { position: absolute; opacity: 0; }
.podcast-modes span { min-height: 86px; display: grid; align-content: center; gap: 4px; padding: 12px; background: #f1f2f3; border: 1px solid transparent; border-radius: 14px; cursor: pointer; }
.podcast-modes small { color: #737780; font-size: 12px; }
.podcast-modes input:checked + span { background: #edf4fc; border-color: #a9c9ee; }
.podcast-stage { min-height: 300px; margin: 18px 0 28px; background: #fff; border-color: #e0e1e1; border-radius: 18px; backdrop-filter: none; }
.podcast-stage::before { display: none; }
.podcast-main-button { min-height: 52px; background: #111318; box-shadow: none; }
.podcast-settings section { display: grid; gap: 14px; padding-bottom: 18px; }
.podcast-settings label { display: grid; gap: 8px; color: #60656e; font-size: 14px; }
.podcast-transcript-card .text-button { float: right; margin-top: -54px; }

@media (max-width: 430px) {
  .app__content { padding-inline: 16px; }
  .appbar { padding-inline: 16px; }
  .profile-hero { margin-inline: -16px; }
  .profile-avatar, .profile-hero h1, .profile-hero p, .profile-hero > span { margin-left: 16px; margin-right: 16px; }
  .podcast-modes { grid-template-columns: 1fr; }
  .podcast-modes span { min-height: 68px; }
  .vocabulary-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .app { max-width: 1100px; padding: 0 28px 40px 194px; }
  .appbar { padding-left: 20px; }
  .app__content { max-width: 880px; }
  .bottomnav, .podcast-app .bottomnav {
    top: 88px;
    bottom: auto;
    left: max(24px, calc(50% - 530px));
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 0;
    transform: none;
  }
  .navitem, .podcast-app .navitem {
    min-height: 48px;
    display: grid;
    grid-template-columns: 26px 1fr;
    justify-items: start;
    gap: 10px;
    padding: 0 12px;
    font-size: 15px;
  }
  .navitem--active { background: #eef3f8; }
  .chat-composer { bottom: 20px; }
  .profile-cover { height: 170px; }
}
