/* ============================================================
   30-Day English Listening — styles
   ============================================================ */
:root {
  /* design system tokens */
  --bg: #F8FAFF;
  --surface: #FFFFFF;
  --text-primary: #172033;
  --text-secondary: #6F7A94;
  --text-muted: #9099AE;
  --primary: #4E78FF;
  --primary-soft: #EEF3FF;
  --cyan: #20B8C9;
  --purple: #936DD3;
  --orange: #FF8A3D;
  --border: #E8ECF3;
  /* legacy aliases kept for existing pages */
  --bg-soft: #EEF1F7;
  --card: #FFFFFF;
  --text: #172033;
  --muted: #6F7A94;
  --accent: #4E78FF;
  --accent-soft: rgba(78, 120, 255, 0.12);
  --shadow: 0 8px 24px rgba(31, 45, 78, 0.06);
  --shadow-sm: 0 4px 12px rgba(31, 45, 78, 0.05);
  --radius: 14px;
  --radius-lg: 18px;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #0E1118;
  --surface: #161B25;
  --text-primary: #F4F6FA;
  --text-secondary: #969FB3;
  --text-muted: #8A94AA;
  --primary: #6F91FF;
  --primary-soft: rgba(111, 145, 255, 0.16);
  --cyan: #20B8C9;
  --purple: #936DD3;
  --orange: #FF8A3D;
  --border: #272E3B;
  /* legacy aliases */
  --bg-soft: #1B2230;
  --card: #161B25;
  --text: #F4F6FA;
  --muted: #969FB3;
  --accent: #6F91FF;
  --accent-soft: rgba(111, 145, 255, 0.18);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 30px rgba(0,0,0,.4);
  --shadow-sm: 0 4px 12px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background .25s ease, color .25s ease;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% -5%, var(--accent-soft), transparent 70%),
    radial-gradient(500px 260px at 90% 0%, rgba(147,109,255,.10), transparent 70%);
}
[data-theme="dark"] .bg-glow { opacity: .5; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 64px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid #EEF1F7;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .site-header { background: rgba(14, 17, 24, .92); border-bottom-color: #272E3B; }
.head-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-primary); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 32px; height: 32px; color: var(--primary); flex: none; }
.brand-icon svg { width: 100%; height: 100%; }
.brand-text { font-weight: 700; font-size: 17px; letter-spacing: .2px; display: flex; flex-direction: column; line-height: 1.1; color: var(--text-primary); }
.brand-text small { font-weight: 500; font-size: 11px; color: #8993A8; }
.head-actions { display: flex; align-items: center; gap: 14px; }
.head-nav { display: flex; align-items: center; gap: 22px; }
.head-nav .nav-link { color: #657089; font-size: 14px; font-weight: 500; transition: color .2s ease; }
.head-nav .nav-link:hover { color: #4775FF; text-decoration: none; }
.head-nav .nav-link.active { color: #4775FF; font-weight: 600; }
[data-theme="dark"] .head-nav .nav-link { color: var(--text-secondary); }
[data-theme="dark"] .head-nav .nav-link:hover,
[data-theme="dark"] .head-nav .nav-link.active { color: var(--primary); }
.theme-toggle {
  background: #FFFFFF; border: 1px solid #E7EBF3; color: var(--text-secondary);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease;
}
.theme-toggle:hover { background: #F5F7FC; border-color: #DCE2EE; }
[data-theme="dark"] .theme-toggle { background: #161B25; border-color: #272E3B; color: #F4F6FA; }
[data-theme="dark"] .theme-toggle:hover { background: #1B2230; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline-flex; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid #E7EBF3; color: var(--text-secondary); cursor: pointer; }
.menu-toggle svg { width: 20px; height: 20px; }
[data-theme="dark"] .menu-toggle { background: #161B25; border-color: #272E3B; color: #F4F6FA; }
.mobile-nav { display: none; flex-direction: column; background: rgba(255,255,255,.97); border-bottom: 1px solid #EEF1F7; padding: 8px 16px; }
[data-theme="dark"] .mobile-nav { background: rgba(14,17,24,.97); border-bottom-color: #272E3B; }
.site-header.menu-open .mobile-nav { display: flex; }
.mobile-nav .nav-link { padding: 12px 8px; font-size: 15px; color: var(--text-primary); border-bottom: 1px solid var(--border); }
.mobile-nav .nav-link:last-child { border-bottom: none; }
.mobile-nav .nav-link.active { color: #4775FF; font-weight: 600; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; padding: 56px 0 28px; }
.hero-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 900; letter-spacing: -.5px; }
.hero .accent { color: var(--accent); }
.hero-sub { font-size: 16px; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 12px; font-weight: 700; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px var(--accent-soft); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.05); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.hero-progress { display: flex; align-items: center; gap: 20px; }
.progress-ring { width: 118px; height: 118px; border-radius: 50%; background: conic-gradient(var(--accent) 0%, var(--bg-soft) 0); display: grid; place-items: center; position: relative; }
.progress-ring .ring-center { width: 86px; height: 86px; border-radius: 50%; background: var(--card); display: grid; place-items: center; align-content: center; }
.ring-center strong { font-size: 22px; }
.ring-center small { color: var(--muted); font-size: 12px; }
.hero-principles p { margin: 2px 0; }

/* ---------- principle banner ---------- */
.principle-banner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 8px 0 30px; }
.pr-cell { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.pr-icon { font-size: 22px; }
.pr-cell b { display: block; }
.pr-cell small { color: var(--muted); }

/* ---------- progress strip ---------- */
.progress-strip { padding: 6px 0 30px; }
.progress-bar { height: 12px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #9b6dff); border-radius: 999px; transition: width .4s ease; }
.progress-note { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* ---------- sections ---------- */
.section { padding: 14px 0 34px; }
.section-title { font-size: 24px; font-weight: 800; }
.phase-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.phase-row { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--pc); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.phase-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); margin-top: 7px; flex: none; }
.phase-info h3 { font-size: 17px; }
.phase-goal { color: var(--pc); font-size: 13px; font-weight: 700; margin-left: 8px; }
.phase-info p { margin: 4px 0; }

/* ---------- day grid ---------- */
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.day-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 14px 12px; box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .2s ease; display: flex; flex-direction: column; gap: 2px; }
.day-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20,30,60,.12); }
.day-card.test { border-width: 2px; border-color: var(--pc); }
.day-card.stream .day-num::after { content: " ›"; color: var(--muted); }
.day-num { font-weight: 900; font-size: 13px; color: var(--pc); letter-spacing: .5px; }
.day-t { font-weight: 700; font-size: 14px; line-height: 1.35; min-height: 2.7em; }
.day-meta { font-size: 12px; color: var(--muted); }
.day-check { position: absolute; top: 12px; right: 12px; color: var(--muted); font-size: 15px; }
.day-speaker { font-size: 12px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.day-card.done { border-color: #2bbd8c; background: linear-gradient(180deg, rgba(43,189,140,.08), rgba(43,189,140,.03)); }
.day-card.done .day-check { color: #17a074; }
.day-card.done .day-num { color: #17a074; }
.day-card.done:hover { border-color: #2bbd8c; box-shadow: 0 12px 28px rgba(23,160,116,.12); }

/* ---------- method grid ---------- */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.method-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); position: relative; }
.method-n { position: absolute; top: 12px; right: 14px; font-size: 30px; font-weight: 900; color: var(--accent-soft); }
.method-card h3 { font-size: 16px; }
.method-card p { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- day page ---------- */
.day-nav { display: flex; justify-content: space-between; gap: 10px; padding: 20px 0 12px; }
.nav-arrow { padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-size: 13px; font-weight: 600; }
.nav-arrow:hover { border-color: var(--accent); text-decoration: none; }
.day-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 26px 0 14px; border-bottom: 3px solid var(--pc); margin-bottom: 18px; flex-wrap: wrap; }
.day-chap { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pc); }
.day-header h1 { font-size: clamp(22px, 3.4vw, 32px); font-weight: 900; }
.day-skill { color: var(--muted); }
.day-header-done { text-align: right; }
.test-banner { background: var(--accent-soft); color: var(--accent); border: 1px dashed var(--accent); border-radius: 12px; padding: 12px 16px; font-weight: 700; margin-bottom: 18px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card h3 { font-size: 17px; }
.card h2 { font-size: 20px; margin-top: 1.2em; }

/* audio card */
.audio-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.audio-icon { font-size: 30px; }
.audio-head h3 { margin: 0; }
.audio-head p { margin: 2px 0 0; font-size: 13px; }
.audio-card audio { margin-top: 6px; }
.stream-card { border-left: 4px solid #ff8c42; }
.stream-body h2 { font-size: 17px; }
.stream-body h3 { font-size: 15px; }
.stream-body ul, .stream-body ol { padding-left: 22px; }
.stream-body blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 14px; color: var(--muted); }

/* info grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.info-cell small { display: block; color: var(--muted); font-size: 12px; }
.info-cell b { font-size: 14px; word-break: break-all; }
.info-cell b a { word-break: break-all; }
.info-full { grid-column: 1 / -1; }

/* steps */
.steps-head { display: flex; justify-content: space-between; align-items: center; }
.steps-card h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.steps-card h3 { color: var(--accent); }
.steps-card ul, .steps-card ol { padding-left: 22px; }
.steps-card blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 14px; color: var(--muted); }
.steps-card hr { border: none; border-top: 1px dashed var(--border); margin: 20px 0; }

/* transcript */
.trans-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: 10px; }
.tab { border: none; background: transparent; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; }
.tab.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.trans-body { max-height: 520px; overflow-y: auto; margin-top: 12px; padding: 14px 16px; background: var(--bg-soft); border-radius: 12px; font-size: 15px; }
.t-line { margin: 0 0 8px; cursor: pointer; }
.t-speaker { display: inline-block; min-width: 96px; font-weight: 800; color: var(--accent); }
.t-narr { color: var(--muted); }

/* vocabulary */
.vocab-card h3 { color: var(--accent); }
.vocab-card h4 { margin-bottom: 2px; }
.vocab-card strong { font-weight: 700; }
.vocab-card hr { border: none; border-top: 1px dashed var(--border); margin: 18px 0; }
.vocab-card p { margin: 4px 0; }
.vocab-card em { color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 0 40px; text-align: center; }
.site-footer p { margin: 4px 0; }

/* responsive */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 34px; }
  .hero-progress { justify-content: center; }
  .day-header { flex-direction: column; }
  .day-header-done { text-align: left; }
  .audio-head { flex-wrap: wrap; }
}

/* ---------- step checkboxes ---------- */
.step-row { display: flex; align-items: center; gap: 10px; margin-top: 1.4em; }
.step-check { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border); background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer; line-height: 1; }
.step-check:hover { border-color: var(--accent); }
.step-check.on { background: #23b887; border-color: #23b887; color: #fff; }

/* ---------- score card ---------- */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.score-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.score-grid input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-size: 15px; }
.score-grid input:focus { outline: none; border-color: var(--accent); }
#toggleDone.is-done { color: #fff; }

/* ---------- landing homepage (English learning hub) ---------- */
.landing { padding-bottom: 40px; }

/* hero */
.landing-hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 60px 0 44px;
  min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 100%, rgba(70,120,255,.12), transparent 30%),
    radial-gradient(circle at 95% 80%, rgba(160,100,255,.10), transparent 30%),
    linear-gradient(180deg, #F8FAFF 0%, #FFFFFF 100%);
}
[data-theme="dark"] .landing-hero {
  background:
    radial-gradient(circle at 10% 100%, rgba(70,120,255,.10), transparent 32%),
    radial-gradient(circle at 95% 80%, rgba(160,100,255,.08), transparent 32%),
    linear-gradient(180deg, #0E1118 0%, #11151E 100%);
}
.landing-hero-deco { position: absolute; inset: 0; pointer-events: none; }
.deco { position: absolute; }
.deco-circle-1 { width: 120px; height: 120px; border-radius: 50%; background: rgba(78,120,255,.06); top: 24px; right: 12%; }
.deco-circle-2 { width: 56px; height: 56px; border-radius: 50%; border: 12px solid rgba(147,109,255,.07); bottom: 48px; left: 14%; }
.deco-ring { width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(78,120,255,.10); top: -70px; left: 8%; }
[data-theme="dark"] .deco { opacity: .55; }
.landing-hero > * { position: relative; z-index: 1; }

.landing-badge {
  height: 30px; padding: 0 16px; display: inline-flex; align-items: center;
  border-radius: 999px; background: #EEF3FF; border: 1px solid #DCE6FF;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: #4D76F6;
}
[data-theme="dark"] .landing-badge { background: rgba(111,145,255,.14); border-color: rgba(111,145,255,.3); color: #8FABFF; }
.landing-title {
  font-size: 72px; font-weight: 800; letter-spacing: -3px; line-height: 1.05;
  margin: 22px 0 0; color: #141B2C;
}
[data-theme="dark"] .landing-title { color: #F4F6FA; }
.landing-title em { font-style: normal; color: #4E78FF; }
[data-theme="dark"] .landing-title em { color: #6F91FF; }
.landing-sub { font-size: 18px; line-height: 1.7; color: #67738F; max-width: 600px; margin: 22px 0 0; }
[data-theme="dark"] .landing-sub { color: var(--text-secondary); }

/* skill quick entries */
.skill-grid { display: grid; grid-template-columns: repeat(4, 120px); gap: 12px; margin-top: 30px; }
.skill-card {
  background: rgba(255,255,255,.9); border: 1px solid #E9EDF5; border-radius: 14px;
  box-shadow: var(--shadow-sm); padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
[data-theme="dark"] .skill-card { background: rgba(22,27,37,.9); border-color: #272E3B; }
.skill-icon { width: 26px; height: 26px; }
.skill-icon svg { width: 100%; height: 100%; }
.skill-card b { font-size: 14px; color: var(--text-primary); }
.skill-card small { font-size: 12px; color: #8A94AA; }

/* learning plans */
.landing-programs { padding: 34px 0 16px; }
.landing-programs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.section-title-row { display: flex; align-items: center; gap: 10px; }
.section-title-icon { width: 26px; height: 26px; color: #4E78FF; display: inline-flex; }
.section-title-icon svg { width: 100%; height: 100%; }
.landing-programs-head h2 { font-size: 28px; font-weight: 700; color: #172033; margin: 0; }
[data-theme="dark"] .landing-programs-head h2 { color: #F4F6FA; }
.landing-programs-head .muted { font-size: 14px; color: #8A94AA; margin: 0; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card {
  position: relative;
  min-height: 205px;
  background: #FFFFFF; border: 1px solid #E8ECF3; border-left: 3px solid var(--pc);
  border-radius: 18px; box-shadow: var(--shadow); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  color: var(--text-primary); text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
[data-theme="dark"] .plan-card { background: #161B25; border-color: #272E3B; }
a.plan-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 32px rgba(31,45,78,.10); }
[data-theme="dark"] a.plan-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.plan-card.disabled { opacity: .75; cursor: default; }
.plan-card.disabled:hover { transform: none; box-shadow: var(--shadow); }

.plan-icon-block { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.plan-icon-block svg { width: 26px; height: 26px; }
.plan-listen .plan-icon-block { background: #F0F4FF; color: #4E78FF; }
.plan-indian .plan-icon-block { background: #ECFAFA; color: #22A7B5; }
.plan-speak .plan-icon-block { background: #F3EEFC; color: #936DD3; }
.plan-words .plan-icon-block { background: #FFF3EB; color: #F47B2C; }
.plan-in { font-family: var(--mono); font-weight: 700; font-size: 18px; color: #22A7B5; }

.plan-body h3 { font-size: 16px; font-weight: 700; color: #172033; margin: 0 0 6px; line-height: 1.3; }
[data-theme="dark"] .plan-body h3 { color: #F4F6FA; }
.plan-body p { font-size: 13px; line-height: 1.7; color: #727E98; margin: 0 0 10px; }
[data-theme="dark"] .plan-body p { color: var(--text-secondary); }
.plan-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.plan-tags em { font-style: normal; font-size: 11px; padding: 5px 9px; border-radius: 999px; }
.plan-listen .plan-tags em { background: #EEF3FF; color: #5077F6; }
.plan-indian .plan-tags em { background: #ECFAFA; color: #22A7B5; }
.plan-speak .plan-tags em { background: #F3EEFC; color: #936DD3; }
.plan-words .plan-tags em { background: #FFF3EB; color: #F47B2C; }
.plan-cta { font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.plan-cta .arrow { transition: transform .2s ease; }
a.plan-card:hover .plan-cta .arrow { transform: translateX(3px); }
.plan-cta.soon-tag { color: var(--text-muted); }

/* bottom feature bar */
.feature-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  background: rgba(255,255,255,.8); border: 1px solid #EDF0F5; border-radius: 16px;
  padding: 18px 24px; margin: 16px 0 30px;
}
[data-theme="dark"] .feature-bar { background: rgba(22,27,37,.8); border-color: #272E3B; }
.feature-item { display: flex; gap: 12px; align-items: flex-start; }
.feature-icon { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.feature-icon svg { width: 100%; height: 100%; }
.feature-body b { display: block; font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }
.feature-body small { font-size: 12px; color: #8A94AA; }

.landing-progress { width: 100%; max-width: 420px; margin: 0 auto 20px; text-align: center; }
.landing-progress .progress-note { margin-top: 10px; }

/* page load fade-in (landing only — avoids animating containers that hold fixed widgets) */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.landing-hero, .landing-programs, .feature-bar { animation: fadeUp .3s ease; }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-title { font-size: 56px; }
  .skill-grid { grid-template-columns: repeat(2, 120px); justify-content: center; }
}
@media (max-width: 767px) {
  .wrap { padding: 0 16px; }
  .landing-hero { padding-top: 40px; }
  .landing-title { font-size: 42px; }
  .skill-grid { grid-template-columns: repeat(2, 120px); }
  .plan-grid { grid-template-columns: 1fr; }
  .feature-bar { grid-template-columns: repeat(2, 1fr); padding: 16px; }
  .head-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- floating training timer ---------- */
.timer-widget { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.timer-widget.collapsed .timer-panel { display: none; }
.timer-widget:not(.collapsed) .timer-fab { display: none; }
.timer-fab {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; min-width: 84px; padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 6px 20px rgba(20,30,60,.18);
  cursor: grab;
  font-size: 16px; font-weight: 700; color: var(--text);
  user-select: none; -webkit-user-select: none; touch-action: none;
  transition: box-shadow .15s ease, transform .12s ease;
}
.timer-fab:hover { box-shadow: 0 10px 26px rgba(20,30,60,.24); }
.timer-fab:active { cursor: grabbing; transform: scale(.97); }
.timer-fab .timer-fab-clock { font-family: var(--mono); font-size: 14px; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.timer-panel { width: 300px; max-width: calc(100vw - 24px); max-height: calc(100vh - 90px); overflow-y: auto; }
.timer-drag-handle { display: flex; align-items: flex-start; gap: 8px; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.timer-drag-handle:active { cursor: grabbing; }
.timer-head { flex: 1; }
.timer-head h3 { margin: 0; font-size: 15px; }
.timer-head p { margin: 2px 0 0; font-size: 12px; }
.timer-total { font-size: 12px; }
.timer-collapse { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; }
.timer-collapse:hover { border-color: var(--accent); color: var(--accent); }
.timer-display { text-align: center; font-family: var(--mono); font-weight: 800; font-size: clamp(34px, 8vw, 48px); line-height: 1; margin: 12px 0 6px; letter-spacing: 2px; color: var(--text); }
.timer-display.running { color: var(--accent); }
.timer-presets { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 10px 0 12px; }
.timer-presets button { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.timer-presets button:hover { border-color: var(--accent); color: var(--accent); }
.timer-presets button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.timer-controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ---------- answer reflection card ---------- */
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.answer-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.answer-grid textarea { padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-size: 14px; resize: vertical; font-family: inherit; min-height: 54px; }
.answer-grid textarea:focus { outline: none; border-color: var(--accent); }
.answer-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.answer-result { margin-top: 14px; padding: 14px 16px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.answer-status.loading { color: var(--accent); }
.answer-status.error { color: #e5484d; }
@media (max-width: 560px) {
  .answer-grid { grid-template-columns: 1fr; }
  .timer-widget { right: 10px; bottom: 10px; }
  .timer-panel { width: min(300px, calc(100vw - 20px)); }
}

/* ---------- vocab save button (day page) ---------- */
.vocab-h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vocab-save { margin-left: auto; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.vocab-save:hover { border-color: var(--accent); color: var(--accent); }
.vocab-save.saved { background: #23b887; border-color: #23b887; color: #fff; cursor: default; }

/* ---------- word list page ---------- */
.words-hero { text-align: center; padding: 44px 0 20px; }
.words-hero-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; margin-bottom: 12px; }
.words-hero h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 900; margin: 0 0 6px; }
.words-hero p { margin: 0; }

.words-add-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; margin-top: 14px; align-items: end; }
.words-add-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.words-add-form input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-size: 15px; }
.words-add-form input:focus { outline: none; border-color: var(--accent); }

.words-empty { padding: 24px; text-align: center; color: var(--muted); background: var(--bg-soft); border-radius: 12px; margin-top: 14px; }
.words-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.words-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.words-item-main { flex: 1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.words-item-word { font-weight: 800; font-size: 15px; }
.words-item-meaning { color: var(--muted); font-size: 14px; }
.words-item-meta { font-size: 12px; color: var(--accent); }
.words-del { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted); font-size: 13px; cursor: pointer; }
.words-del:hover { border-color: #e5484d; color: #e5484d; }

/* flashcard */
.flashcard { perspective: 1000px; margin: 20px auto; max-width: 440px; cursor: pointer; }
.flashcard-inner { position: relative; width: 100%; height: 230px; transform-style: preserve-3d; transition: transform .5s ease; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); padding: 22px; text-align: center; }
.flashcard-back { transform: rotateY(180deg); background: var(--accent-soft); border-color: var(--accent); }
.flash-word { font-size: 26px; font-weight: 800; line-height: 1.3; }
.flash-meaning { font-size: 18px; line-height: 1.5; }
.flash-controls { display: flex; justify-content: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .words-add-form { grid-template-columns: 1fr; }
}

/* ---------- selection save (划词收藏) ---------- */
.sel-save-btn {
  position: fixed; z-index: 130;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 30, 60, .2);
  transition: transform .12s ease, filter .15s ease;
}
.sel-save-btn:hover { filter: brightness(1.06); }
.sel-save-btn:active { transform: scale(.96); }

.sel-popup {
  position: fixed; z-index: 130;
  width: 300px; max-width: calc(100vw - 20px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(20, 30, 60, .22);
  padding: 14px 16px;
}
.sel-popup h4 { margin: 0 0 6px; font-size: 14px; }
.sel-popup-word {
  font-weight: 800; font-size: 15px; color: var(--accent);
  word-break: break-word; margin-bottom: 10px; line-height: 1.4;
}
.sel-popup label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.sel-popup input {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg-soft); color: var(--text); font-size: 14px;
}
.sel-popup input:focus { outline: none; border-color: var(--accent); }
.sel-popup-actions { display: flex; gap: 8px; justify-content: flex-end; }

.sel-ctx {
  position: fixed; z-index: 130;
  padding: 8px 14px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(20, 30, 60, .18);
  font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
  white-space: nowrap;
}
.sel-ctx:hover { border-color: var(--accent); color: var(--accent); }

.sel-toast {
  position: fixed; z-index: 140;
  left: 50%; transform: translateX(-50%);
  bottom: 24px;
  padding: 10px 18px; border-radius: 999px;
  background: #23b887; color: #fff;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(20, 30, 60, .24);
  max-width: calc(100vw - 24px);
  text-align: center;
}

/* ---------- dictionary lookup previews ---------- */
.sel-dict { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 6px 0 8px; font-size: 12.5px; color: var(--text); }
.sel-dict-ph { font-family: var(--mono); font-weight: 700; margin-right: 8px; }
.sel-dict-item { margin: 3px 0; }
.sel-dict-item em { font-style: italic; color: var(--accent); margin-right: 6px; }
.sel-dict-ex { color: var(--muted); font-size: 12px; margin: 1px 0 4px; }
.sel-dict-ai { color: var(--muted); }
.words-lookup { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 6px 0 0; font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.words-lookup b { font-family: var(--mono); color: var(--text); margin-right: 6px; }
.words-lookup em { font-style: italic; color: var(--accent); margin-right: 5px; }
.words-item-word { display: inline-flex; align-items: baseline; gap: 8px; }
.words-item-phonetic { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.words-item-defs { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sel-dict-zh { color: var(--accent); font-weight: 600; margin-left: 4px; }
.words-item-def { margin-top: 2px; }
.words-item-def em { font-style: italic; color: var(--accent); margin-right: 5px; }
.play-time { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* ---------- STREAM_ONLY watch-time banner ---------- */
.watch-banner { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, rgba(255,140,66,.10), rgba(255,140,66,.04)); border: 1px solid rgba(255,140,66,.35); border-left: 4px solid #ff8c42; border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.wb-icon { font-size: 22px; }
.watch-banner b { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.wb-seg { display: block; font-size: 18px; font-weight: 800; color: #e07a2c; }
.watch-banner small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- floating audio player bar ---------- */
.float-player {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px));
  z-index: 90;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(20,30,60,.18);
  padding: 10px 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
  animation: floatIn .25s ease;
}
@keyframes floatIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.float-player audio { width: 100%; }
.float-player .fp-label { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- floating step trainer ---------- */
.step-trainer { position: fixed; left: 16px; bottom: 16px; z-index: 95; }
.st-fab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.st-fab:hover { border-color: var(--accent); }
.st-fab-icon { font-size: 15px; }
.st-fab-clock { color: var(--accent); font-family: var(--mono); }
.st-panel { width: 300px; max-width: calc(100vw - 32px); padding: 12px; margin: 8px 0 0; }
.st-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.st-head b { font-size: 14px; }
.st-collapse { border: none; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; padding: 0 4px; }
.st-list { display: flex; flex-direction: column; gap: 6px; }
.st-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); }
.st-row.running { border-color: var(--accent); }
.st-check { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border); background: var(--card); color: var(--muted); font-size: 12px; cursor: pointer; }
.st-check.on { background: #23b887; border-color: #23b887; color: #fff; }
.st-info { flex: 1; min-width: 0; }
.st-info b { display: block; font-size: 12.5px; line-height: 1.25; }
.st-info small { font-size: 11px; color: var(--muted); }
.st-time { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--muted); }
.st-time.running { color: var(--accent); }
.st-ctl { display: flex; gap: 4px; }
.st-ctl button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 11px; cursor: pointer; }
.st-ctl button:hover { border-color: var(--accent); }
.step-trainer.collapsed .st-panel { display: none; }

/* collapsed / completed step section in the main card */
.step-sec { transition: opacity .25s ease; }
.step-sec.done { opacity: .38; }
.step-sec.done > h2 { text-decoration: line-through; color: var(--muted); }
@media (max-width: 520px) {
  .step-trainer { left: 10px; bottom: 70px; }  /* 避开底部悬浮音频播放器 */
}

/* step detail (expanded instructions in the floating panel) */
.st-row.open { align-items: flex-start; }
.st-info { cursor: pointer; }
.st-info b:hover { color: var(--accent); }
.st-detail { grid-column: 1 / -1; width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; font-size: 12px; line-height: 1.6; color: var(--text); max-height: 46vh; overflow-y: auto; }
.st-detail h3 { font-size: 12.5px; margin: 6px 0 2px; color: var(--accent); }
.st-detail p { margin: 3px 0; }
.st-detail ul, .st-detail ol { margin: 3px 0; padding-left: 18px; }
.st-detail blockquote { margin: 4px 0; padding-left: 10px; border-left: 3px solid var(--accent); color: var(--muted); }
.st-detail hr { margin: 8px 0; border: none; border-top: 1px dashed var(--border); }
.st-detail em { color: var(--muted); }

/* completed step: collapse + gray the main-card section */
.step-sec { transition: opacity .25s ease; }
.step-sec.done { opacity: .55; }
.step-sec.done > .step-row { display: flex; }
.step-sec.done > *:not(.step-row) { display: none; }
.step-sec.done .step-h { text-decoration: line-through; color: var(--muted); }
/* step checkbox in main card */
.step-row { display: flex; align-items: center; gap: 10px; margin-top: 1.2em; }
.step-check { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border); background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer; line-height: 1; }
.step-check:hover { border-color: var(--accent); }
.step-check.on { background: #23b887; border-color: #23b887; color: #fff; }
.step-h { margin: 0; }

/* ---------- floating notes (right side) ---------- */
.notes-widget { position: fixed; right: 16px; bottom: 16px; z-index: 94; }
.notes-fab { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 18px; cursor: pointer; box-shadow: var(--shadow); }
.notes-fab:hover { border-color: var(--accent); transform: translateY(-2px); }
.notes-panel { width: 320px; max-width: calc(100vw - 32px); padding: 12px; margin: 8px 0 0; }
.notes-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.notes-head b { font-size: 14px; }
.notes-save { margin-left: auto; font-size: 11px; }
.notes-collapse { border: none; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; padding: 0 2px; }
#notesText { width: 100%; min-height: 220px; resize: vertical; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text); font-size: 14px; line-height: 1.7; padding: 10px 12px; }
#notesText:focus { outline: none; border-color: var(--accent); }
.notes-widget.collapsed .notes-panel { display: none; }
@media (max-width: 520px) {
  .notes-widget { right: 10px; bottom: 70px; }
}

/* ============================================================
   Day page: two-column layout + left floating step nav
   ============================================================ */
.day-layout { display: flex; gap: 26px; align-items: flex-start; }
.day-main { flex: 1; min-width: 0; }

/* ---- left step nav (sticky, default expanded) ---- */
.step-nav {
  position: sticky; top: 80px; align-self: flex-start;
  width: 198px; flex: none;
  max-height: calc(100vh - 96px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 12px 10px;
}
.step-nav-title {
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
  padding: 0 8px 8px; margin-bottom: 6px; border-bottom: 1px solid var(--border);
}
.step-nav-title small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; margin-top: 3px; }
.step-nav-link {
  display: block; padding: 7px 10px; border-radius: 9px;
  color: var(--text); font-size: 13.5px; text-decoration: none;
}
.step-nav-link:hover { background: var(--accent-soft); color: var(--accent); }
.step-nav-link.active { background: var(--accent); color: #fff; }
.step-nav-toggle {
  display: block; width: 100%; margin-top: 8px; padding: 5px 0;
  border: 1px solid var(--border); border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 13px; cursor: pointer; text-align: center;
}
.step-nav-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ---- collapsed rail ---- */
.step-nav.collapsed { width: 46px; padding: 12px 6px; }
.step-nav.collapsed .step-nav-inner { display: none; }
.step-nav.collapsed .step-nav-toggle { margin-top: 0; writing-mode: vertical-rl; text-orientation: mixed; }

/* ---- step cards (one box per step) ---- */
.step-card .step-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.step-card .step-head h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.step-card.done { opacity: .62; }
.step-card.done .step-head h2 { text-decoration: line-through; color: var(--muted); }
.step-card blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 14px; color: var(--muted); }

/* ---- anchored sections keep clear of the sticky header ---- */
#stepNav .step-nav-link, .day-main [id] { scroll-margin-top: 92px; }

/* ---- mobile: nav becomes a floating pill/drawer ---- */
@media (max-width: 980px) {
  .day-layout { display: block; }
  .step-nav {
    position: fixed; left: 14px; bottom: 14px; top: auto; z-index: 95;
    width: auto; max-height: none; padding: 8px 12px; border-radius: 999px;
  }
  .step-nav .step-nav-inner { display: none; }
  .step-nav.open { border-radius: var(--radius); padding: 12px; }
  .step-nav.open .step-nav-inner {
    display: block; position: absolute; left: 0; bottom: calc(100% + 10px);
    width: 240px; max-height: 60vh; overflow-y: auto;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  }
  .step-nav-toggle { width: auto; margin-top: 0; padding: 2px 6px; writing-mode: initial; }
}

/* ============================================================
   Chunk listening (Step 2 auto-pause)
   ============================================================ */
.chunk-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 12px;
  background: var(--accent-soft); border: 1px solid rgba(78, 120, 255, .28); border-radius: 12px;
}
.chunk-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--accent); cursor: pointer; user-select: none; }
.chunk-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.chunk-status { font-size: 13px; color: var(--accent); font-weight: 600; }
.fp-chunk { color: var(--accent); font-weight: 600; margin-left: 8px; font-size: 12.5px; }
/* 悬浮播放条里再包一层时去掉高亮底色，避免嵌套感 */
.float-player .chunk-row { background: transparent; border: none; border-radius: 0; margin-top: 6px; padding: 4px 0 0; }

/* ============================================================
   Chunk summary widget (write one sentence, AI evaluates)
   ============================================================ */
.chunk-summary { position: fixed; right: 16px; bottom: 96px; z-index: 96; width: 320px; }
.chunk-summary-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.chunk-summary-head b { font-size: 14px; }
.chunk-summary-head .muted { font-size: 12px; flex: 1; }
#csClose { margin-left: auto; border: none; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; }
#csClose:hover { color: var(--accent); }
#csText { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 13.5px; background: var(--surface); color: var(--text); resize: vertical; }
#csText:focus { outline: none; border-color: var(--accent); }
.chunk-summary-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.chunk-summary-result { margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: var(--primary-soft); font-size: 13px; line-height: 1.5; white-space: pre-line; }
.chunk-count { font-size: 12px; color: var(--accent); font-weight: 600; }

/* ============================================================
   Listening Vocabulary selection popup
   ============================================================ */
.sel-popup { width: 320px; }
.sel-popup-meta { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 10px; padding: 8px 10px; background: var(--bg-soft); border-radius: 9px; word-break: break-word; }
.sel-popup .sel-type { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.sel-popup .sel-type label,
.sel-popup .err-chip {
  display: inline-flex; flex-direction: row; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--text); margin: 0; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--card);
}
.sel-popup .sel-type label:has(input:checked),
.sel-popup .err-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.sel-popup input[type=radio], .sel-popup input[type=checkbox] { width: auto; accent-color: var(--accent); }
.sel-popup .sel-errors { display: none; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.sel-popup .sel-errors.show { display: grid; }
.sel-dict { font-size: 12px; color: var(--text); line-height: 1.5; margin-bottom: 10px; padding: 8px 10px; background: var(--card); border: 1px solid var(--border); border-radius: 9px; word-break: break-word; }
.sel-dict .sel-dict-phon { font-weight: 600; color: var(--accent); margin-right: 6px; }
.sel-dict .sel-dict-row { margin: 3px 0; }
.sel-dict .sel-dict-row i { font-style: normal; font-size: 10.5px; color: var(--accent); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; margin-right: 4px; }
.sel-dict .sel-dict-zh { color: var(--muted); font-size: 11.5px; }

/* ============================================================
   Listening Vocabulary page
   ============================================================ */
.vocab-hero { padding: 34px 0 8px; }
.vocab-hero h1 { font-size: 30px; margin: 6px 0 8px; }
.vocab-hero-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.vocab-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 18px 0; }
.vocab-stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.vocab-stat b { display: block; font-size: 26px; line-height: 1.1; }
.vocab-stat small { color: var(--muted); font-size: 12px; }
.vocab-stat.accent b { color: var(--accent); }
.vocab-stat.warn b { color: var(--orange); }
.vocab-stat.ok b { color: #23b887; }
.vocab-toolbar { margin: 16px 0 14px; }
.vocab-search { width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font-size: 14px; margin-bottom: 10px; }
.vocab-search:focus { outline: none; border-color: var(--accent); }
.vocab-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.vocab-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.vocab-filters select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-size: 13px; }

.vocab-list { display: flex; flex-direction: column; gap: 10px; }
.vocab-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 16px; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s ease; }
.vocab-row:hover { border-color: var(--accent); }
.vocab-play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-size: 15px; cursor: pointer; }
.vocab-play:hover { background: var(--accent); color: #fff; }
.vocab-row-main { flex: 1; min-width: 0; }
.vocab-row-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.vocab-expr { font-weight: 800; font-size: 16.5px; color: var(--text); word-break: break-word; }
.vocab-type { font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.vocab-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.vocab-status.learning { color: var(--accent); border-color: var(--accent); }
.vocab-status.listening_weak { color: var(--orange); border-color: var(--orange); }
.vocab-status.mastered { color: #23b887; border-color: #23b887; }
.vocab-due { font-size: 11px; color: #fff; background: var(--orange); padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.vocab-row-sub { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.vocab-meaning { color: var(--text); }
.vocab-score { color: var(--accent); }
.vocab-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.vocab-empty h3 { font-size: 20px; margin-bottom: 8px; }
.vocab-empty kbd { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 12px; }

.vocab-detail { margin-top: 20px; }
.vocab-detail-card { position: relative; }
.vocab-detail-close { position: absolute; top: 12px; right: 14px; border: none; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.vocab-detail-close:hover { color: var(--accent); }
.vocab-detail-card h2 { margin: 0 0 2px; font-size: 24px; }
.vocab-base { margin: 0 0 6px; }
.vocab-detail-meaning { font-size: 16px; margin: 8px 0; }
.vocab-note { background: var(--bg-soft); border-radius: 9px; padding: 8px 12px; font-size: 13.5px; }
.occ-title { margin: 18px 0 8px; font-size: 15px; }
.occ-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.occ-row:last-child { border-bottom: none; }
.occ-play { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.occ-play:hover { background: var(--accent); color: #fff; }
.occ-sentence { margin: 0 0 4px; line-height: 1.55; }
.occ-sentence mark { background: rgba(255, 190, 70, .35); border-radius: 3px; padding: 0 2px; }
.occ-zh { margin: 0 0 3px; font-size: 13.5px; }
.occ-meta { margin: 0; font-size: 12px; }
.vocab-open-training { margin: 16px 0 0; color: var(--accent); font-weight: 700; cursor: pointer; font-size: 14px; }

/* ============================================================
   Listening Review page
   ============================================================ */
.review-head { padding: 34px 0 16px; text-align: center; }
.review-head h1 { margin: 0 0 6px; }
.review-card { max-width: 620px; margin: 0 auto; text-align: center; padding: 30px 26px; }
.review-play { margin-bottom: 16px; }
.review-play .btn { font-size: 17px; padding: 12px 26px; }
#reviewRevealBtn { margin-left: 10px; }
.review-sentence { font-size: 18px; line-height: 1.6; }
.review-sentence mark { background: rgba(255, 190, 70, .35); border-radius: 3px; padding: 0 3px; }
.review-meaning { font-size: 15px; color: var(--text); margin: 8px 0 4px; }
.review-meta { font-size: 13px; }
.review-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn-rating { min-width: 90px; }
.btn-rating[data-grade="again"] { border-color: var(--orange); color: var(--orange); }
.btn-rating[data-grade="hard"] { border-color: #e8a13a; color: #c07f1f; }
.btn-rating[data-grade="good"] { border-color: var(--accent); color: var(--accent); }
.btn-rating[data-grade="easy"] { border-color: #23b887; color: #1a9a6e; }
.review-hint { margin-top: 18px; font-size: 12.5px; }
.review-hint kbd { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 12px; }
.review-done { text-align: center; padding: 40px 20px; color: var(--muted); }
.review-done b { color: var(--text); }

/* transcript line highlight when jumping from vocabulary (day page ?t=) */
.t-highlight { background: rgba(255, 190, 70, .3); border-radius: 4px; box-shadow: 0 0 0 4px rgba(255,190,70,.12); }
