
:root {
  --listen-bg: #f5f7f3;
  --listen-ink: #19251f;
  --listen-muted: #6e7972;
  --listen-line: #dce4dd;
  --listen-green: #237b60;
  --listen-green-soft: #e0eee7;
  --listen-coral: #d98266;
  --listen-yellow: #e9bf62;
}
:root[data-theme="dark"] {
  --listen-bg: #151b18;
  --listen-ink: #e6eee8;
  --listen-muted: #a0aca4;
  --listen-line: #35433b;
  --listen-green: #8bc4a8;
  --listen-green-soft: #263d32;
  --listen-coral: #e29a7f;
  --listen-yellow: #dfbd72;
}
@media (max-width: 620px) { html, body { overflow-x: clip; } .topic-tabs { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } }

html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--listen-ink); background: var(--listen-bg); font: 15px/1.55 "DM Sans", "Noto Sans SC", system-ui, sans-serif; }
button, input, select { color: inherit; font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--listen-coral); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.listen-header { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 70px; padding: 0 max(4vw, calc((100vw - 1320px)/2)); border-bottom: 1px solid var(--listen-line); background: color-mix(in srgb, var(--listen-bg) 94%, transparent); backdrop-filter: blur(14px); }
.listen-brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--listen-green); font-size: 21px; }
.listen-brand strong, .listen-brand small { display: block; line-height: 1.2; }
.listen-brand strong { font-size: 13px; letter-spacing: .04em; }
.listen-brand small { margin-top: 4px; color: var(--listen-muted); font: 9px "IBM Plex Mono", monospace; letter-spacing: .1em; }
.listen-header nav { display: flex; align-items: center; gap: 30px; height: 70px; color: var(--listen-muted); font-size: 13px; }
.listen-header nav a { display: grid; align-items: center; height: 100%; border-bottom: 2px solid transparent; }
.listen-header nav a:hover, .listen-header nav a.active { color: var(--listen-ink); border-color: var(--listen-green); }
.saved-nav { justify-self: end; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border: 1px solid var(--listen-line); border-radius: 6px; background: transparent; font-size: 13px; }
.saved-nav[aria-pressed="true"] { color: var(--listen-green); border-color: var(--listen-green); }
.saved-nav b { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: var(--listen-green-soft); font-size: 11px; }
main { width: min(1220px, 90vw); margin: 0 auto; }
.intro { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 30px; min-height: 410px; padding: 68px 4vw 60px; border-bottom: 1px solid var(--listen-line); overflow: hidden; }
.intro::after { position: absolute; z-index: -1; right: 25%; bottom: -210px; width: 440px; height: 440px; border: 1px solid color-mix(in srgb, var(--listen-green) 16%, transparent); border-radius: 50%; content: ""; box-shadow: 0 0 0 44px color-mix(in srgb, var(--listen-green) 3%, transparent), 0 0 0 90px color-mix(in srgb, var(--listen-green) 2%, transparent); }
.eyebrow { margin: 0 0 13px; color: var(--listen-green); font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .11em; }
.intro h1 { max-width: 700px; margin: 0; font: 700 46px/1.32 "Noto Serif SC", serif; letter-spacing: 0; }
.intro-lede { max-width: 520px; margin: 17px 0 24px; color: var(--listen-muted); font-size: 15px; line-height: 1.9; }
.primary-link { display: inline-flex; align-items: center; gap: 20px; min-height: 44px; padding: 0 17px; border: 1px solid var(--listen-green); border-radius: 5px; color: #fff; background: var(--listen-green); font-size: 13px; }
.primary-link:hover { filter: brightness(1.06); }
.daily-note { justify-self: end; align-self: center; width: 300px; max-width: 100%; padding: 22px 23px; border-left: 2px solid var(--listen-coral); background: color-mix(in srgb, var(--listen-green-soft) 42%, transparent); }
.note-index { color: var(--listen-green); font: 10px "IBM Plex Mono", monospace; letter-spacing: .08em; }
.daily-note p { margin: 15px 0 16px; font: 600 20px/1.55 "Noto Serif SC", serif; }
.daily-note em { color: var(--listen-green); font-style: normal; }
.note-rule { display: flex; gap: 4px; height: 3px; margin-bottom: 12px; }
.note-rule span { display: block; width: 33%; background: var(--listen-green); }
.note-rule span:nth-child(2) { opacity: .55; }.note-rule span:nth-child(3) { opacity: .2; }
.daily-note small { color: var(--listen-muted); font-size: 11px; }
.library { padding: 64px 0 72px; border-bottom: 1px solid var(--listen-line); }
.section-heading, .lesson-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-heading h2, .lesson-heading h2 { margin: 0; font: 600 27px/1.4 "Noto Serif SC", serif; }
.library-count { margin: 0 0 4px; color: var(--listen-muted); font-size: 12px; }
.library-count b { color: var(--listen-green); font: 600 17px "IBM Plex Mono", monospace; }
.library-tools { display: flex; gap: 10px; margin-top: 25px; }
.search-field { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; height: 46px; padding: 0 13px; border: 1px solid var(--listen-line); border-radius: 5px; background: color-mix(in srgb, var(--listen-bg) 74%, white); }
:root[data-theme="dark"] .search-field { background: #1d2621; }
.search-field > span:first-child { color: var(--listen-muted); font-size: 24px; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-field input::placeholder { color: var(--listen-muted); }
.level-select select { width: 190px; height: 46px; padding: 0 12px; border: 1px solid var(--listen-line); border-radius: 5px; background: var(--listen-bg); font-size: 12px; }
.topic-tabs { display: flex; gap: 8px; margin: 18px 0 23px; overflow-x: auto; scrollbar-width: thin; }
.topic-tabs button { flex: none; padding: 8px 13px; border: 1px solid transparent; border-radius: 4px; color: var(--listen-muted); background: transparent; font-size: 12px; }
.topic-tabs button:hover { color: var(--listen-green); }.topic-tabs button.active { border-color: var(--listen-line); color: var(--listen-green); background: var(--listen-green-soft); }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.course-card { position: relative; display: flex; flex-direction: column; min-height: 216px; padding: 18px; border: 1px solid var(--listen-line); border-radius: 5px; background: color-mix(in srgb, var(--listen-bg) 87%, white); transition: transform .18s ease, border-color .18s ease; }
:root[data-theme="dark"] .course-card { background: #1b241f; }
.course-card:hover { transform: translateY(-2px); border-color: var(--listen-green); }
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course-index { color: var(--listen-green); font: 11px "IBM Plex Mono", monospace; }
.course-badges { display: flex; gap: 6px; }
.course-badges span { padding: 4px 7px; border-radius: 3px; color: var(--listen-muted); background: color-mix(in srgb, var(--listen-line) 45%, transparent); font-size: 10px; }
.course-card h3 { margin: 19px 0 3px; font: 600 16px/1.45 "DM Sans", "Noto Sans SC", sans-serif; }
.course-card .cn-title { margin: 0; color: var(--listen-muted); font-size: 12px; }
.course-card .course-summary { margin: 12px 0 16px; color: var(--listen-muted); font-size: 11px; line-height: 1.6; }
.course-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--listen-line); color: var(--listen-muted); font-size: 10px; }
.course-open { border: 0; color: var(--listen-green); background: transparent; font-size: 11px; font-weight: 600; }
.course-open:hover { text-decoration: underline; }
.empty-message { padding: 35px 10px; color: var(--listen-muted); text-align: center; }
.lesson-section { padding: 65px 0 80px; }
.lesson-heading { align-items: center; margin-bottom: 25px; }
.lesson-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.lesson-tags span { padding: 6px 9px; border: 1px solid var(--listen-line); border-radius: 3px; color: var(--listen-muted); font-size: 10px; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 18px; }
.player-panel { min-width: 0; padding: 18px 20px 20px; border: 1px solid var(--listen-line); border-radius: 18px; background: var(--listen-glass); box-shadow: var(--listen-shadow); backdrop-filter: blur(16px); position: relative; }
:root[data-theme="dark"] .player-panel { background: rgba(18, 24, 38, 0.82); border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45); }
.tv-casing { display: flex; flex-direction: column; gap: 12px; }
.tv-header { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--listen-line); }
.tv-badge { display: flex; align-items: center; gap: 8px; }
.tv-power-led { width: 9px; height: 9px; border-radius: 50%; background: #64748b; box-shadow: 0 0 2px rgba(0, 0, 0, 0.3); transition: all 0.3s ease; flex-shrink: 0; }
.player-panel.is-speaking .tv-power-led { background: #38bdf8; box-shadow: 0 0 10px #38bdf8, 0 0 4px #38bdf8; }
.story-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--listen-green); background: var(--listen-green-soft); font: 600 12px "IBM Plex Mono", var(--mono), monospace; }
.tv-tag { display: inline-block; padding: 2px 7px; border-radius: 4px; font: 600 9px "IBM Plex Mono", var(--mono), monospace; letter-spacing: 0.1em; color: var(--listen-green); background: var(--listen-green-soft); }
.tv-meta { flex: 1; min-width: 0; }
.story-kicker { margin: 0 0 2px; color: var(--listen-green); font: 9px "IBM Plex Mono", var(--mono), monospace; letter-spacing: 0.08em; }
.story-topline h3 { margin: 0; overflow-wrap: anywhere; font: 600 16px/1.4 "Space Grotesk", "Noto Sans SC", sans-serif; }
.story-subtitle { margin: 2px 0 0; color: var(--listen-muted); font-size: 11px; }
.save-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--listen-line); border-radius: 8px; color: var(--listen-muted); background: transparent; font-size: 18px; cursor: pointer; transition: all 0.2s ease; }
.save-button[aria-pressed="true"] { color: var(--listen-coral); border-color: var(--listen-coral); }

/* TV Screen Display Chassis */
.tv-screen { position: relative; border-radius: 14px; background: #090d16; border: 3px solid #1e293b; box-shadow: inset 0 3px 14px rgba(0, 0, 0, 0.75), 0 8px 24px rgba(0, 0, 0, 0.18); overflow: hidden; margin-top: 4px; margin-bottom: 6px; }
:root[data-theme="dark"] .tv-screen { background: #060910; border-color: #242f47; box-shadow: inset 0 4px 18px rgba(0, 0, 0, 0.9), 0 8px 28px rgba(0, 0, 0, 0.35); }
.tv-screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 42%); border-radius: 11px; }

/* TV OSD (On-Screen Display) Bar */
.tv-osd-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: rgba(15, 23, 42, 0.92); border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: #94a3b8; font-size: 11px; position: relative; z-index: 4; }
.tv-osd-left { display: flex; align-items: center; gap: 8px; }
.sound-indicator { display: flex; align-items: center; gap: 2px; height: 14px; }
.sound-indicator i { width: 2px; height: 4px; background: #38bdf8; opacity: 0.45; border-radius: 1px; }
.sound-indicator i:nth-child(2) { height: 8px; }
.sound-indicator i:nth-child(3) { height: 12px; }
.sound-indicator i:nth-child(4) { height: 6px; }
.player-panel.is-speaking .sound-indicator i { opacity: 1; animation: wave 0.55s ease-in-out infinite alternate; }
.player-panel.is-speaking .sound-indicator i:nth-child(2) { animation-delay: 0.13s; }
.player-panel.is-speaking .sound-indicator i:nth-child(3) { animation-delay: 0.26s; }
.player-panel.is-speaking .sound-indicator i:nth-child(4) { animation-delay: 0.38s; }
@keyframes wave { to { transform: scaleY(0.45); } }
.sentence-count { margin-left: auto; color: #94a3b8; font: 11px "IBM Plex Mono", var(--mono), monospace; }
.sentence-count b { color: #38bdf8; }

/* TV Lyrics Scrolling Window: 5-6 lines visible, teleprompter style */
.tv-lyrics { box-sizing: border-box; position: relative; height: 300px; max-height: 300px; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; padding: 105px 18px; mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 9%, black 24%, black 76%, rgba(0, 0, 0, 0.35) 91%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 9%, black 24%, black 76%, rgba(0, 0, 0, 0.35) 91%, transparent 100%); }
.tv-lyrics::-webkit-scrollbar { display: none; }

/* Sentences on the TV Screen */
.sentence-row { display: block; width: 100%; margin-bottom: 8px; padding: 8px 14px; border-radius: 12px; border: 1px solid transparent; background: transparent; opacity: 0.35; transform: scale(0.96); filter: blur(0.2px); transform-origin: center center; transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.25, 1), transform 0.35s cubic-bezier(0.2, 0.8, 0.25, 1), background 0.35s ease, filter 0.35s ease, border-color 0.35s ease; cursor: pointer; text-align: center; }
.sentence-row:hover { opacity: 0.7; filter: none; transform: scale(0.98); }
.sentence-row.is-current { opacity: 1; transform: scale(1.03); filter: none; background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.36); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.sentence-en { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: #cbd5e1; font-family: "Space Grotesk", "Noto Sans SC", system-ui, sans-serif; font-size: 15px; line-height: 1.5; text-align: center; cursor: pointer; transition: color 0.2s ease, font-size 0.2s ease; }
.sentence-row.is-current .sentence-en { color: #ffffff; font-size: 17.5px; font-weight: 700; text-shadow: 0 2px 14px rgba(56, 189, 248, 0.4); }
.sentence-zh { display: block; margin-top: 4px; color: #64748b; font-size: 13px; line-height: 1.45; text-align: center; transition: color 0.2s ease; }
.sentence-row.is-current .sentence-zh { color: #7dd3fc; font-weight: 500; }
.tv-lyrics.translation-hidden .sentence-zh, .tv-lyrics.listen-first .sentence-zh { display: none; }
.media-stage { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, .9fr); align-items: stretch; aspect-ratio: 2.7 / 1; min-height: 0; overflow: hidden; background: #03060c; }
.real-media { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; background: #03060c; object-fit: contain; }
.media-captions { position: relative; min-width: 0; min-height: 0; height: auto; border-left: 1px solid rgba(255,255,255,.1); background: #080d18; color: #e7edf7; overflow: hidden; }
.caption-head { position: absolute; inset: 0 0 auto; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 43px; padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(8,13,24,.94); color: #7dd3fc; font: 600 10px "IBM Plex Mono", var(--mono), monospace; letter-spacing: .1em; }
.caption-modes { display: inline-flex; gap: 4px; margin-left: auto; }
.caption-mode { min-width: 30px; height: 24px; padding: 0 6px; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; color: #94a3b8; background: transparent; font: 600 10px "IBM Plex Mono", var(--mono), monospace; letter-spacing: .04em; cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.caption-mode:hover { color: #e7edf7; border-color: rgba(255,255,255,.3); }
.caption-mode.active { color: #04121e; background: #7dd3fc; border-color: #7dd3fc; }
.caption-scroll.hide-en .caption-line strong { display: none; }
.caption-scroll.hide-zh .caption-line span { display: none; }
.caption-scroll.hide-en.hide-zh .caption-line { display: none; }
.tv-lyrics.both-hidden .sentence-row { display: none; }
.caption-scroll { box-sizing: border-box; position: absolute; inset: 43px 0 0; overflow-y: auto; padding: 38% 12px; scrollbar-width: none; scroll-behavior: smooth; mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent); }
.caption-scroll::-webkit-scrollbar { display: none; }
.caption-line-wrap { position: relative; margin: 0 0 8px; }
.caption-line-wrap.is-current .caption-replay { opacity: 1; pointer-events: auto; }
.caption-replay { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: #7dd3fc; background: rgba(8,13,24,.8); font-size: 12px; opacity: 0; pointer-events: none; cursor: pointer; transition: opacity .2s ease, border-color .2s ease; }
.caption-replay:hover { border-color: #7dd3fc; }
.caption-line { display: block; width: calc(100% - 30px); margin: 0; padding: 9px 10px; border: 0; border-radius: 9px; opacity: .34; transform: scale(.97); color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; transition: opacity .25s ease, transform .25s ease, background .25s ease; }
.caption-line:hover { opacity: .72; }
.caption-line.is-current { opacity: 1; transform: scale(1); background: rgba(56,189,248,.13); box-shadow: inset 2px 0 #38bdf8; }
.caption-line strong { display: block; font: 600 13px/1.55 "Space Grotesk", "Noto Sans SC", sans-serif; color: #edf6ff; }
.caption-line span { display: block; margin-top: 3px; color: #7dd3fc; font-size: 11px; line-height: 1.5; }
.real-media[hidden], .media-captions[hidden], .player-controls[hidden], .tv-osd-bar[hidden], .text-toggle[hidden], .study-aside[hidden], .timeline[hidden] { display: none !important; }
.lesson-layout.has-real-media { grid-template-columns: minmax(0, 1fr); max-width: 920px; margin-inline: auto; }
.lesson-layout.has-real-media .tv-screen { border-width: 2px; }
.lesson-layout.has-real-media .player-options { justify-content: center; }
.lesson-layout.has-real-media .speed-control { min-width: 116px; justify-content: center; }
.voice-note a { color: var(--listen-green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* English Pod-style hero stats & level chips & keykey expression try */
.intro-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 22px 0 4px; color: var(--listen-muted); font-size: 12.5px; }
.intro-stats b { color: var(--listen-green); font: 600 15px "IBM Plex Mono", var(--mono), monospace; margin-right: 3px; }
.intro-stats i { width: 4px; height: 4px; border-radius: 50%; background: var(--listen-line); }
.level-chips { display: flex; gap: 8px; margin: 4px 0 12px; }
.level-chips button { padding: 8px 16px; border: 1px solid var(--listen-line); border-radius: 999px; color: var(--listen-muted); background: transparent; font-size: 12px; cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.level-chips button:hover { color: var(--listen-green); border-color: var(--listen-green); }
.level-chips button.active { color: #fff; background: var(--listen-green); border-color: var(--listen-green); }
.expression-try { display: inline-flex; align-items: center; gap: 7px; width: 100%; justify-content: center; min-height: 38px; margin-top: 12px; padding: 0 12px; border: 1px solid var(--listen-line); border-radius: 8px; color: var(--listen-green); background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.expression-try:hover { border-color: var(--listen-green); background: var(--listen-green-soft); }
.expression-try.is-done { color: var(--listen-green); border-color: var(--listen-green); background: var(--listen-green-soft); }

/* Learning progress strip */
.progress-strip { margin: 4px 0 18px; padding: 13px 16px; border: 1px solid var(--listen-line); border-radius: 12px; background: var(--listen-glass); box-shadow: 0 8px 24px rgba(43,61,91,.04); }
.progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--listen-muted); font-size: 12px; }
.progress-copy b { color: var(--listen-green); font: 600 14px "IBM Plex Mono", var(--mono), monospace; }
.progress-copy small { color: var(--listen-green); font: 600 12px "IBM Plex Mono", var(--mono), monospace; }
.progress-track { position: relative; height: 6px; margin-top: 9px; border-radius: 3px; background: var(--listen-green-soft); overflow: hidden; }
.progress-track i { position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: 3px; background: linear-gradient(90deg, var(--listen-green), var(--listen-blue)); transition: width .6s cubic-bezier(.22,1,.36,1); }

/* Duration badges */
.course-duration[data-duration-badge="short"] { color: #2fae6e; }
.course-duration[data-duration-badge="mid"] { color: var(--listen-blue); }
.course-duration[data-duration-badge="long"] { color: var(--listen-coral); }

/* Wordbook & tap-a-word */
.caption-line .w { font-style: normal; cursor: pointer; border-bottom: 1px dashed rgba(125,211,252,.0); transition: border-color .15s ease, color .15s ease; }
.caption-line .w:hover { color: #7dd3fc; border-bottom-color: rgba(125,211,252,.6); }
.toast-note { position: fixed; left: 50%; bottom: 92px; z-index: 90; padding: 10px 18px; border: 1px solid var(--listen-line); border-radius: 999px; color: var(--listen-ink); background: var(--listen-glass); backdrop-filter: blur(14px); box-shadow: var(--listen-shadow); font-size: 12.5px; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.toast-note.show { opacity: 1; transform: translate(-50%, 0); }
.wordbook-nav[aria-pressed="true"] { color: var(--listen-green); border-color: var(--listen-green); }
.listen-header .saved-nav b { background: var(--listen-green-soft); color: var(--listen-green); }
.wordbook-nav .due-badge { background: #e5484d; color: #fff; }

/* 跟读录音对比 */
.recording-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--listen-line); border-radius: 8px; background: var(--listen-green-soft); }
.recording-bar[hidden] { display: none; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--listen-muted); flex-shrink: 0; }
.rec-dot.live { background: #e5484d; animation: recPulse 1.1s ease-in-out infinite; }
@keyframes recPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); } 50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); } }
.rec-label { color: var(--listen-ink); font-size: 11.5px; font-weight: 600; flex: 1; min-width: 0; }
.rec-timer { color: var(--listen-muted); font: 500 11px var(--mono); }

/* Word status colors in captions */
.w { font-style: normal; }
.w-new { border-bottom: 1px dashed rgba(125, 211, 252, .75); }
.w-learning { border-bottom: 1px solid rgba(242, 198, 109, .85); }
.w-known { opacity: .82; }

/* Wordbook drawer */
body.modal-open { overflow: hidden; }
.wordbook-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; display: flex; flex-direction: column; width: min(380px, 94vw); border-left: 1px solid var(--listen-line); background: color-mix(in srgb, var(--listen-bg) 92%, #10192b); box-shadow: -18px 0 50px rgba(0,0,0,.3); }
.wordbook-drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--listen-line); }
.drawer-head h3 { margin: 0; font: 600 17px var(--serif); }
.drawer-head b { color: var(--listen-green); font: 600 14px var(--mono); }
.drawer-close { width: 32px; height: 32px; border: 1px solid var(--listen-line); border-radius: 8px; color: var(--listen-muted); background: transparent; cursor: pointer; }
.drawer-close:hover { color: var(--listen-ink); border-color: var(--listen-green); }
.wordbook-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.wordbook-empty { color: var(--listen-muted); font-size: 12.5px; line-height: 1.8; padding: 14px 6px; }
.wordbook-row { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--listen-line); border-radius: 10px; background: var(--listen-glass); }
.wordbook-speak { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; border: 0; background: none; color: var(--listen-ink); font: 600 14px "Space Grotesk", sans-serif; text-align: left; cursor: pointer; }
.wordbook-speak:hover { color: var(--listen-green); text-decoration: underline; text-underline-offset: 3px; }
.word-due { flex: none; color: var(--listen-muted); font-size: 10.5px; }
.wordbook-review { flex: none; padding: 5px 9px; border: 0; border-radius: 6px; color: #fff; background: var(--listen-green); font-size: 10.5px; font-weight: 600; cursor: pointer; }
.word-status { flex: none; min-width: 52px; padding: 5px 7px; border: 1px solid var(--listen-line); border-radius: 6px; background: transparent; color: var(--listen-muted); font-size: 10.5px; cursor: pointer; }
.word-status.new { color: #7dd3fc; border-color: rgba(125,211,252,.5); }
.word-status.learning { color: var(--listen-yellow); border-color: rgba(242,198,109,.5); }
.word-status.known { color: var(--listen-muted); }
.drawer-foot { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--listen-line); }
.drawer-foot .text-toggle { flex: 1; justify-content: center; }

/* Stats & dictation modals */
.stats-modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; background: rgba(5, 10, 20, .55); backdrop-filter: blur(6px); }
.stats-modal[hidden] { display: none; }
.stats-panel { width: min(520px, 100%); max-height: 86dvh; overflow-y: auto; padding: 0 0 18px; border: 1px solid var(--listen-line); border-radius: 16px; background: var(--listen-bg); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 6px 20px 0; }
.stat-box { padding: 14px 10px; border: 1px solid var(--listen-line); border-radius: 12px; background: var(--listen-glass); text-align: center; }
.stat-box b { display: block; color: var(--listen-green); font: 600 24px var(--mono); }
.stat-box span { display: block; margin-top: 4px; color: var(--listen-muted); font-size: 10.5px; }
.stats-week { display: flex; align-items: end; justify-content: space-between; gap: 6px; height: 96px; margin: 18px 20px 0; padding: 14px 14px 10px; border: 1px solid var(--listen-line); border-radius: 12px; background: var(--listen-glass); }
.week-col { display: grid; justify-items: center; gap: 6px; flex: 1; }
.week-col i { display: block; width: 16px; border-radius: 4px 4px 0 0; background: var(--track, rgba(12,15,20,.08)); min-height: 4px; }
.week-col i.has { background: linear-gradient(180deg, var(--listen-blue), var(--listen-green)); }
.week-col span { color: var(--listen-muted); font-size: 10px; }
.stats-levels { display: grid; gap: 8px; margin: 14px 20px 0; }
.level-stat { display: grid; grid-template-columns: 34px 1fr 52px; align-items: center; gap: 10px; }
.level-stat .level-code { color: var(--listen-green); font: 600 12px var(--mono); }
.level-bar { height: 8px; border-radius: 4px; background: var(--listen-green-soft); overflow: hidden; }
.level-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--listen-green), var(--listen-blue)); }
.level-stat b { color: var(--listen-muted); font: 500 11px var(--mono); text-align: right; }

/* Dictation */
.dictation-score { color: var(--listen-green); font: 600 13px var(--mono); margin-left: auto; }
.dictation-course { margin: 14px 20px 0; color: var(--listen-muted); font-size: 11px; }
.dictation-sentence { min-height: 88px; margin: 12px 20px 0; padding: 16px 18px; border: 1px solid var(--listen-line); border-radius: 12px; background: #0b1020; color: #e7edf7; font: 500 16px/2.1 "Space Grotesk", "Noto Sans SC", sans-serif; }
.blank { border: 0; border-bottom: 2px solid #38bdf8; background: rgba(56,189,248,.08); color: #7dd3fc; font: inherit; text-align: center; padding: 0 6px; margin: 0 3px; outline: none; }
.blank.ok { border-bottom-color: #2fae6e; color: #6ee7b7; }
.blank.bad { border-bottom-color: #e5a083; color: #fda4af; }
.dictation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 20px 0; }
.dictation-note { margin: 12px 20px 0; color: var(--listen-muted); font-size: 11.5px; }
.dictation-modal .stats-panel { border-color: var(--listen-blue); }

/* Real-audio course mode: audio bar on top, captions below */
.real-audio { display: none; width: 100%; background: #0b1020; }
.media-stage.is-audio { display: flex; flex-direction: column; aspect-ratio: auto; }
.media-stage.is-audio .real-audio { display: block; }
.media-stage.is-audio .media-captions { height: 330px; border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
.media-stage.is-audio .caption-scroll { padding: 90px 14px; }
.real-audio[hidden] { display: none !important; }
@media (max-width: 760px) { .media-stage.is-audio .media-captions { height: 300px; } }

/* TV Controls Deck */
.tv-controls-deck { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.timeline { display: flex; align-items: center; gap: 10px; color: var(--listen-muted); font: 11px "IBM Plex Mono", var(--mono), monospace; }
.timeline input { flex: 1; min-width: 0; height: 4px; accent-color: var(--listen-green); cursor: pointer; }
.player-controls { display: flex; justify-content: center; align-items: center; gap: 18px; }
.icon-control { width: 38px; height: 38px; border: 1px solid var(--listen-line); border-radius: 50%; background: transparent; color: var(--listen-ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; transition: all 0.2s ease; }
.icon-control:hover { border-color: var(--listen-green); color: var(--listen-green); transform: scale(1.05); }
.play-control { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 128px; height: 44px; padding: 0 18px; border: 0; border-radius: 22px; color: #ffffff; background: var(--listen-green); font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25); transition: all 0.2s ease; }
.play-control:hover { filter: brightness(1.08); transform: translateY(-1px); }
.play-control > span:first-child { font-size: 13px; }
.player-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--listen-line); }
.speed-control, .text-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--listen-line); border-radius: 6px; background: transparent; font-size: 11px; color: var(--listen-muted); cursor: pointer; transition: all 0.2s ease; }
.speed-control select { border: 0; background: transparent; color: inherit; font-size: 11px; cursor: pointer; }
.text-toggle:hover { border-color: var(--listen-green); color: var(--listen-ink); }
.text-toggle[aria-pressed="true"] { border-color: var(--listen-green); color: var(--listen-green); background: var(--listen-green-soft); }
.voice-note { margin: 0; color: var(--listen-muted); font-size: 10px; }

/* TV Stand Foot */
.tv-stand { display: flex; justify-content: center; margin-top: 6px; }
.tv-stand i { display: block; width: 90px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--listen-line) 85%, #94a3b8); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); }
.study-aside { display: grid; gap: 12px; }
.expression-box, .practice-box { padding: 18px; border: 1px solid var(--listen-line); border-radius: 5px; background: color-mix(in srgb, var(--listen-bg) 79%, white); }
:root[data-theme="dark"] .expression-box, :root[data-theme="dark"] .practice-box { background: #1b241f; }
.expression-box .eyebrow, .practice-box .eyebrow { font-size: 9px; }.expression-box h3, .practice-box h3 { margin: 0 0 12px; font: 600 16px "Noto Serif SC", serif; }
.expression-term { color: var(--listen-green); font: 600 19px "DM Sans", sans-serif; }.expression-meaning { margin: 6px 0; font-size: 12px; }.expression-example { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--listen-line); color: var(--listen-muted); font-size: 11px; line-height: 1.65; }
.practice-box > p:not(.eyebrow) { color: var(--listen-muted); font-size: 12px; line-height: 1.8; }
.answer-toggle { display: flex; justify-content: space-between; width: 100%; padding: 10px 0 0; border: 0; border-top: 1px solid var(--listen-line); color: var(--listen-green); background: transparent; font-size: 11px; text-align: left; }
.answer-text { margin-bottom: 0; color: var(--listen-ink) !important; }
.study-tip { display: flex; gap: 10px; padding: 12px 13px; color: var(--listen-muted); background: var(--listen-green-soft); font-size: 11px; line-height: 1.7; }.study-tip span { color: var(--listen-coral); font-size: 16px; }.study-tip p { margin: 0; }
footer { display: flex; justify-content: space-between; gap: 14px; padding: 18px 0 30px; border-top: 1px solid var(--listen-line); color: var(--listen-muted); font-size: 10px; }footer a { color: var(--listen-green); }
@media (max-width: 850px) { .intro { grid-template-columns: minmax(0,1fr) 230px; padding-inline: 2vw; }.daily-note { width: 210px; }.course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.lesson-layout { grid-template-columns: minmax(0,1fr) 250px; gap: 12px; }.player-panel { padding: 21px 19px 18px; } }
@media (max-width: 620px) { .listen-header { grid-template-columns: 1fr auto; min-height: 62px; padding-inline: 5vw; }.listen-header nav { position: fixed; bottom: 0; z-index: 12; left: 0; right: 0; justify-content: space-around; height: 54px; border-top: 1px solid var(--listen-line); background: var(--listen-bg); font-size: 11px; }.listen-header nav a { padding: 0 8px; }.saved-nav { min-height: 34px; }.saved-nav span { display: none; } main { width: 90vw; }.intro { display: block; min-height: 0; padding: 54px 0 42px; }.intro h1 { font-size: 34px; }.intro-lede { max-width: 100%; font-size: 13px; }.daily-note { display: none; }.library { padding: 44px 0 50px; }.section-heading h2,.lesson-heading h2 { font-size: 23px; }.library-count { white-space: nowrap; font-size: 10px; }.library-tools { display: grid; grid-template-columns: 1fr; }.level-select select { width: 100%; }.topic-tabs { margin: 13px -5vw 18px; padding: 0 5vw 5px; }.course-grid { grid-template-columns: 1fr; gap: 9px; }.course-card { min-height: 190px; padding: 16px; }.lesson-section { padding: 46px 0 65px; }.lesson-heading { display: block; }.lesson-tags { margin-top: 13px; }.lesson-layout { grid-template-columns: 1fr; }.player-panel { padding: 17px 14px 15px; }.story-topline { gap: 10px; }.story-topline h3 { font-size: 14px; }.sentence-row { padding: 9px 9px; }.sentence-en { font-size: 14px; }.player-options { gap: 6px; }.speed-control,.text-toggle { padding-inline: 7px; font-size: 9px; }.study-aside { grid-template-columns: 1fr; }footer { flex-wrap: wrap; padding-bottom: 74px; } }

/* homepage visual language */
:root {
  --listen-bg: #f7f9fc;
  --listen-ink: #0c0f14;
  --listen-muted: #5c6673;
  --listen-line: rgba(12, 15, 20, .08);
  --listen-green: #4968b8;
  --listen-green-soft: rgba(138, 180, 255, .16);
  --listen-coral: #8f76c9;
  --listen-yellow: #9be8dc;
  --listen-blue: #8ab4ff;
  --listen-glass: rgba(255, 255, 255, .64);
  --listen-shadow: 0 18px 50px rgba(43, 61, 91, .08);
}
:root[data-theme="dark"] {
  --listen-bg: #0b0e14;
  --listen-ink: #e8edf4;
  --listen-muted: #9aa6b6;
  --listen-line: rgba(232, 237, 244, .1);
  --listen-green: #8ab4ff;
  --listen-green-soft: rgba(111, 157, 255, .16);
  --listen-coral: #b3a1f5;
  --listen-yellow: #7fd8c8;
  --listen-blue: #6f9dff;
  --listen-glass: rgba(21, 27, 39, .62);
  --listen-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
html { background: var(--listen-bg); }
body { position: relative; overflow-x: clip; background: var(--listen-bg); font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
body::before { position: fixed; inset: -16%; z-index: -2; pointer-events: none; content: ""; background: radial-gradient(680px 460px at 12% 2%, color-mix(in srgb, var(--listen-blue) 19%, transparent), transparent 70%), radial-gradient(650px 520px at 92% 22%, color-mix(in srgb, var(--listen-coral) 13%, transparent), transparent 70%), radial-gradient(800px 500px at 48% 100%, color-mix(in srgb, var(--listen-yellow) 10%, transparent), transparent 72%); }
body::after { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035; content: ""; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
.listen-header { width: min(1120px, 92vw); min-height: 72px; margin: 0 auto; padding: 18px 0; border-bottom: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.listen-brand { gap: 11px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; color: var(--listen-ink); background: var(--listen-ink); font-size: 0; }
.brand-mark::after { width: 16px; height: 16px; border: 3px solid var(--listen-bg); border-top-color: transparent; border-radius: 50%; content: ""; }
.listen-brand strong { font: 600 15px/1 "Space Grotesk", var(--mono); letter-spacing: .06em; }
.listen-brand small { font-size: 8px; letter-spacing: .12em; }
.listen-header nav { height: 42px; gap: 22px; font-size: 12px; }
.listen-header nav a { height: auto; padding: 8px 0; border: 0; }
.listen-header nav a:hover, .listen-header nav a.active { color: var(--listen-ink); border: 0; }
.listen-header nav a.active { font-weight: 600; }
.saved-nav { min-height: 36px; border-color: var(--listen-line); border-radius: 7px; background: var(--listen-glass); box-shadow: 0 8px 24px rgba(43, 61, 91, .05); font-size: 12px; }
main { width: min(1120px, 92vw); }
.intro { min-height: 400px; padding: 72px 0 64px; border: 0; background: transparent; }
.intro::before { right: 12%; border-color: color-mix(in srgb, var(--listen-coral) 28%, transparent); }
.intro::after { right: 17%; bottom: -220px; border-color: color-mix(in srgb, var(--listen-blue) 20%, transparent); }
.intro h1 { font-family: var(--serif); font-size: clamp(40px, 5vw, 62px); }
.eyebrow, .kicker, .story-kicker { color: var(--listen-green); }
.primary-link { border: 0; border-radius: 8px; color: var(--on-strong, #fff); background: var(--listen-ink); box-shadow: 0 10px 22px rgba(12, 15, 20, .14); }
.text-link { color: var(--listen-green); }
.daily-note { border: 1px solid var(--listen-line); border-top: 3px solid var(--listen-coral); border-radius: 12px; background: var(--listen-glass); box-shadow: var(--listen-shadow); backdrop-filter: blur(16px); }
.plan-strip, .level-roadmap, .library, .lesson-section { border-color: var(--listen-line); }
.plan-strip { padding: 42px 0 44px; }
.plan-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.plan-heading h2 { margin: 0; font: 600 25px/1.4 var(--serif); }
.plan-heading > p { max-width: 300px; margin: 0 0 3px; color: var(--listen-muted); font-size: 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.plan-step { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 88px; padding: 14px; border: 1px solid var(--listen-line); border-radius: 10px; background: var(--listen-glass); box-shadow: 0 10px 28px rgba(43, 61, 91, .04); }
.plan-number { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: var(--listen-green); background: var(--listen-green-soft); font: 600 11px var(--mono); }
.plan-step strong { font-size: 13px; }.plan-step p { margin: 3px 0 0; color: var(--listen-muted); font-size: 11px; }.plan-step b { align-self: start; color: var(--listen-muted); font: 10px var(--mono); }
.level-roadmap { padding: 48px 0 40px; }
.level-card, .course-card, .player-panel, .expression-box, .practice-box { border-color: var(--listen-line); border-radius: 10px; background: var(--listen-glass); box-shadow: 0 10px 28px rgba(43, 61, 91, .04); backdrop-filter: blur(10px); }
.level-card.active { border-color: var(--listen-blue); background: var(--listen-green-soft); box-shadow: inset 3px 0 var(--listen-green), 0 10px 28px rgba(43, 61, 91, .04); }
.level-card:hover, .course-card:hover { border-color: var(--listen-blue); box-shadow: var(--listen-shadow); }
.course-card { min-height: 222px; }
.player-panel { box-shadow: var(--listen-shadow); }
.study-tip { border-radius: 9px; background: var(--listen-green-soft); }
footer { border-color: var(--listen-line); }
@media (max-width: 760px) { .plan-heading { display: block; }.plan-heading > p { margin-top: 10px; }.plan-grid { grid-template-columns: 1fr; }.plan-step { min-height: 70px; }.listen-header { width: 90vw; } }

@media (max-width: 620px) { .intro { min-height: 0; padding-top: 42px; padding-bottom: 38px; } .intro::after { width: 300px; height: 300px; right: -90px; bottom: -180px; } }


:root { --listen-bg: #f7f8f5; --listen-ink: #17231f; --listen-muted: #68766f; --listen-line: #d9e2dc; --listen-green: #176b58; --listen-green-soft: #e5f0ea; --listen-coral: #c66f54; --listen-yellow: #f2c66d; --listen-blue: #4778a8; }
:root[data-theme="dark"] { --listen-bg: #141a18; --listen-ink: #edf3ee; --listen-muted: #a1afa5; --listen-line: #34453b; --listen-green: #8bd0b2; --listen-green-soft: #253c31; --listen-coral: #e5a083; --listen-yellow: #d4b46e; --listen-blue: #8eafd0; }
body { background: var(--listen-bg); }
.listen-header { min-height: 64px; box-shadow: 0 1px 0 rgba(23,35,31,.03); }
.intro { min-height: 430px; padding-top: 74px; padding-bottom: 74px; background: linear-gradient(110deg, color-mix(in srgb, var(--listen-green-soft) 78%, transparent), transparent 65%); }
.intro::before { position: absolute; top: 48px; right: 9%; width: 118px; height: 118px; border: 1px solid color-mix(in srgb, var(--listen-coral) 36%, transparent); border-radius: 50%; content: ""; }
.intro-emblem { position: absolute; top: 66px; right: calc(9% + 20px); display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; background: color-mix(in srgb, var(--listen-glass) 80%, transparent); box-shadow: 0 10px 28px rgba(43,61,91,.1), inset 0 1px 0 rgba(255,255,255,.5); backdrop-filter: blur(8px); }
.intro-emblem img { width: 46px; height: 46px; display: block; }
@media (max-width: 760px) { .intro-emblem { top: 40px; right: calc(4% + 8px); width: 56px; height: 56px; } .intro-emblem img { width: 32px; height: 32px; } }
.intro-emblem { position: absolute; top: 66px; right: calc(9% + 20px); display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; background: color-mix(in srgb, var(--listen-glass) 80%, transparent); box-shadow: 0 10px 28px rgba(43,61,91,.1), inset 0 1px 0 rgba(255,255,255,.5); backdrop-filter: blur(8px); }
.intro-emblem img { width: 46px; height: 46px; display: block; }
.intro h1 { max-width: 760px; font-size: clamp(38px, 5vw, 66px); letter-spacing: -1px; }
.intro-lede { max-width: 570px; font-size: 16px; }
.intro-actions { display: flex; align-items: center; gap: 19px; flex-wrap: wrap; }
.text-link { color: var(--listen-green); font-size: 12px; font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.daily-note { border-left: 0; border-top: 3px solid var(--listen-coral); box-shadow: 0 16px 34px rgba(23, 55, 40, .08); }
.intro-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 22px 0 4px; color: var(--listen-muted); font-size: 12.5px; }
.intro-stats b { color: var(--listen-green); font: 600 15px "IBM Plex Mono", monospace; margin-right: 3px; }
.intro-stats i { width: 4px; height: 4px; border-radius: 50%; background: var(--listen-line); }
.level-roadmap { padding: 52px 0 42px; border-bottom: 1px solid var(--listen-line); }
.roadmap-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.roadmap-heading h2 { margin: 0; font: 600 27px/1.4 "Noto Serif SC", serif; }
.roadmap-heading > p { max-width: 270px; margin: 0 0 3px; color: var(--listen-muted); font-size: 12px; }
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 23px; }
.level-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 88px; padding: 14px 16px; border: 1px solid var(--listen-line); border-radius: 7px; color: var(--listen-ink); background: color-mix(in srgb, var(--listen-bg) 75%, white); text-align: left; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
:root[data-theme="dark"] .level-card { background: #1c2721; }
.level-card:hover { transform: translateY(-2px); border-color: var(--listen-green); }
.level-card.active { border-color: var(--listen-green); background: var(--listen-green-soft); box-shadow: inset 3px 0 var(--listen-green); }
.level-card .level-code { color: var(--listen-green); font: 600 20px "IBM Plex Mono", monospace; }
.level-card strong, .level-card small { display: block; }.level-card strong { font-size: 13px; }.level-card small { margin-top: 4px; color: var(--listen-muted); font-size: 10px; }.level-card b { align-self: start; color: var(--listen-muted); font: 10px "IBM Plex Mono", monospace; }
.library { padding-top: 52px; }
.library-tools { max-width: 900px; }
.topic-tabs { padding-bottom: 3px; }
.course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.course-card { min-height: 230px; border-radius: 8px; box-shadow: 0 5px 18px rgba(23, 55, 40, .04); }
.course-card:hover { box-shadow: 0 12px 25px rgba(23, 55, 40, .09); }
.course-badges span:first-child { color: var(--listen-green); background: var(--listen-green-soft); }
.course-card h3 { font-size: 17px; }
.course-open { padding: 5px 0; }
.lesson-section { padding-top: 60px; }
.lesson-heading h2 { font-size: 31px; }
.player-panel { border-radius: 8px; box-shadow: 0 15px 34px rgba(23, 55, 40, .06); }
.study-aside { gap: 14px; }.expression-box, .practice-box { border-radius: 8px; box-shadow: 0 8px 22px rgba(23, 55, 40, .04); }
@media (max-width: 760px) { .intro { padding-top: 54px; }.intro::before { right: 4%; top: 30px; width: 74px; height: 74px; }.level-grid { grid-template-columns: 1fr; }.level-card { min-height: 73px; }.roadmap-heading { display: block; }.roadmap-heading > p { margin-top: 10px; }.course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .intro { min-height: 0; padding-top: 42px; padding-bottom: 38px; } .intro::after { width: 300px; height: 300px; right: -90px; bottom: -180px; } }

/* final homepage-aligned tokens and learning states */
:root { --listen-bg: #f7f9fc; --listen-ink: #0c0f14; --listen-muted: #5c6673; --listen-line: rgba(12, 15, 20, .08); --listen-green: #4968b8; --listen-green-soft: rgba(138, 180, 255, .16); --listen-coral: #8f76c9; --listen-yellow: #9be8dc; --listen-blue: #8ab4ff; --listen-glass: rgba(255,255,255,.64); --listen-shadow: 0 18px 50px rgba(43,61,91,.08); }
:root[data-theme="dark"] { --listen-bg: #0b0e14; --listen-ink: #e8edf4; --listen-muted: #9aa6b6; --listen-line: rgba(232,237,244,.1); --listen-green: #8ab4ff; --listen-green-soft: rgba(111,157,255,.16); --listen-coral: #b3a1f5; --listen-yellow: #7fd8c8; --listen-blue: #6f9dff; --listen-glass: rgba(21,27,39,.62); --listen-shadow: 0 18px 50px rgba(0,0,0,.22); }
.level-card.is-done { border-color: var(--listen-yellow); }
.plan-step.is-done { border-color: var(--listen-yellow); background: color-mix(in srgb, var(--listen-yellow) 12%, var(--listen-glass)); }
.plan-step.is-done .plan-number::after { content: "✓"; font-size: 12px; }
.plan-step.is-done .plan-number { font-size: 0; color: var(--listen-green); }
@media (max-width: 620px) { .plan-strip { padding: 34px 0; }.listen-header { padding-inline: 0; } }

/* final visual pass wins over the original listening palette */
html { background: var(--listen-bg); }
body { background: var(--listen-bg); font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.listen-header { width: min(1120px, 92vw); min-height: 72px; margin: 0 auto; padding: 18px 0; border-bottom: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
main { width: min(1120px, 92vw); }
.intro { min-height: 400px; padding: 72px 0 64px; border: 0; background: transparent; }
.intro h1 { font-family: var(--serif); font-size: clamp(40px, 5vw, 62px); letter-spacing: 0; }
.primary-link { border: 0; border-radius: 8px; color: #fff; background: var(--listen-ink); box-shadow: 0 10px 22px rgba(12,15,20,.14); }
.daily-note { border: 1px solid var(--listen-line); border-top: 3px solid var(--listen-coral); border-radius: 12px; background: var(--listen-glass); box-shadow: var(--listen-shadow); backdrop-filter: blur(16px); }
.plan-strip { padding: 42px 0 44px; border-bottom: 1px solid var(--listen-line); }
.plan-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.plan-heading h2 { margin: 0; font: 600 25px/1.4 var(--serif); }
.plan-heading > p { max-width: 300px; margin: 0 0 3px; color: var(--listen-muted); font-size: 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.plan-step { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 88px; padding: 14px; border: 1px solid var(--listen-line); border-radius: 10px; background: var(--listen-glass); box-shadow: 0 10px 28px rgba(43,61,91,.04); }
.plan-number { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: var(--listen-green); background: var(--listen-green-soft); font: 600 11px var(--mono); }
.plan-step strong { font-size: 13px; }.plan-step p { margin: 3px 0 0; color: var(--listen-muted); font-size: 11px; }.plan-step b { align-self: start; color: var(--listen-muted); font: 10px var(--mono); }
.level-roadmap { padding: 48px 0 40px; border-bottom: 1px solid var(--listen-line); }
.level-card, .course-card, .player-panel, .expression-box, .practice-box { border-color: var(--listen-line); border-radius: 10px; background: var(--listen-glass); box-shadow: 0 10px 28px rgba(43,61,91,.04); backdrop-filter: blur(10px); }
.level-card.active { border-color: var(--listen-blue); background: var(--listen-green-soft); box-shadow: inset 3px 0 var(--listen-green), 0 10px 28px rgba(43,61,91,.04); }
.level-card:hover, .course-card:hover { border-color: var(--listen-blue); box-shadow: var(--listen-shadow); }
.course-card { min-height: 222px; }
.player-panel { box-shadow: var(--listen-shadow); }
.study-tip { border-radius: 9px; background: var(--listen-green-soft); }
.plan-step.is-done { border-color: var(--listen-yellow); background: color-mix(in srgb, var(--listen-yellow) 12%, var(--listen-glass)); }
.plan-step.is-done .plan-number::after { content: "✓"; font-size: 12px; }.plan-step.is-done .plan-number { font-size: 0; color: var(--listen-green); }
@media (max-width: 760px) { .plan-heading { display: block; }.plan-heading > p { margin-top: 10px; }.plan-grid { grid-template-columns: 1fr; }.plan-step { min-height: 70px; }.listen-header { width: 90vw; }.intro { padding-top: 54px; }.level-grid { grid-template-columns: 1fr; }.roadmap-heading { display: block; }.roadmap-heading > p { margin-top: 10px; }.course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .intro { min-height: 0; padding-top: 42px; padding-bottom: 38px; }.plan-strip { padding: 34px 0; }.listen-header { padding-inline: 0; }.course-grid { grid-template-columns: 1fr; } }

/* TV Console & Lyrics Teleprompter Dedicated Polish */
.player-panel.tv-unit { border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
:root[data-theme="dark"] .player-panel.tv-unit { background: rgba(18, 24, 38, 0.84); border-color: rgba(255, 255, 255, 0.09); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
@media (max-width: 760px) {
  .media-stage { grid-template-columns: 1fr; aspect-ratio: auto; }
  .real-media { height: auto; aspect-ratio: 16 / 9; }
  .media-captions { height: 250px; border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .caption-scroll { inset: 43px 0 0; padding: 84px 10px; }
}
@media (max-width: 620px) {
  .player-panel.tv-unit { padding: 14px 12px 16px; }
  .tv-lyrics { box-sizing: border-box; height: 260px; max-height: 260px; padding: 85px 12px; }
  .sentence-en { font-size: 14px; }
  .sentence-row.is-current .sentence-en { font-size: 16px; }
}

/* 头部右侧两个按钮放在同一格，避免四个元素挤出三列网格；徽标遵守 hidden 属性 */
.listen-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.saved-nav b[hidden] { display: none; }

/* 页头吸顶时加一层背景，避免和下面的正文叠在一起 */
@media (max-width: 620px) {
  .listen-header { box-sizing: border-box; width: 100%; padding-inline: 5vw; background: var(--listen-bg); box-shadow: 0 1px 0 var(--listen-line); }
}
/* 宽屏：毛玻璃并铺满整行。手机上不加 backdrop-filter / clip-path，
   否则页头里固定在底部的导航会改为相对页头定位并被裁掉 */
@media (min-width: 621px) {
  .listen-header {
    background: color-mix(in srgb, var(--listen-bg) 80%, transparent);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--listen-bg) 80%, transparent);
    clip-path: inset(0 -100vmax);
  }
}

/* ================= v34 学习面板、级别进度、课程卡片、播放器 ================= */
.dash { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr); align-items: center; gap: 36px; width: min(1120px, 92vw); margin: 0 auto; padding: 64px 0 52px; }
.dash h1 { margin: 0; font: 700 clamp(36px, 4.6vw, 58px)/1.2 var(--serif, "Noto Serif SC"), serif; letter-spacing: -0.5px; }
.dash .intro-lede { max-width: 560px; margin: 16px 0 26px; font-size: 15px; line-height: 1.85; }
.dash .intro-lede b { color: var(--listen-ink); }
.resume-card { position: relative; display: flex; align-items: center; gap: 18px; max-width: 560px; padding: 18px 18px 18px 22px; border: 1px solid var(--listen-line); border-radius: 18px; background: var(--listen-glass); box-shadow: var(--listen-shadow); backdrop-filter: blur(14px); overflow: hidden; }
.resume-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--listen-blue), var(--listen-coral)); }
.resume-copy { display: grid; flex: 1; gap: 4px; min-width: 0; }
.resume-kicker { color: var(--listen-green); font: 600 11px "IBM Plex Mono", monospace; letter-spacing: 0.08em; }
.resume-copy strong { overflow: hidden; font: 600 18px/1.4 "Space Grotesk", "Noto Sans SC", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.resume-copy small { overflow: hidden; color: var(--listen-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.resume-play { display: grid; flex: none; place-items: center; width: 54px; height: 54px; border: 0; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--listen-green), var(--listen-coral)); box-shadow: 0 10px 24px color-mix(in srgb, var(--listen-green) 35%, transparent); font-size: 18px; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease; }
.resume-play span { margin-left: 3px; }
.resume-card:hover .resume-play { transform: scale(1.08); box-shadow: 0 14px 30px color-mix(in srgb, var(--listen-green) 45%, transparent); }
.next-up { margin: 14px 0 0 4px; color: var(--listen-muted); font-size: 12.5px; }
.next-up button { padding: 0; border: 0; border-bottom: 1px dashed currentColor; color: var(--listen-green); background: none; font-weight: 600; }
/* 「下一课」按钮和页脚链接字很小：用透明的伪元素把可点区域扩到 24px 以上，外观不变 */
.next-up button, footer a { position: relative; }
.next-up button::after, footer a::after { content: ""; position: absolute; inset: -6px -4px; }
.dash-today { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px 22px; padding: 22px; border: 1px solid var(--listen-line); border-radius: 22px; background: var(--listen-glass); box-shadow: var(--listen-shadow); backdrop-filter: blur(14px); }
.goal-ring { position: relative; width: 124px; height: 124px; }
.goal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 10; }
.goal-track { stroke: color-mix(in srgb, var(--listen-line) 100%, transparent); }
.goal-fill { stroke: var(--listen-green); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--goal, 0)); transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1); }
.goal-ring.is-done .goal-fill { stroke: #2fae6e; }
.goal-copy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; line-height: 1.15; }
.goal-copy b { font: 700 30px "Space Grotesk", "IBM Plex Mono", monospace; }
.goal-copy span { color: var(--listen-muted); font-size: 11px; }
.goal-copy small { margin-top: 3px; color: var(--listen-green); font-size: 10px; letter-spacing: 0.1em; }
.today-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 0; }
.today-stats div { min-width: 0; }
.today-stats dt { color: var(--listen-muted); font-size: 11px; }
.today-stats dd { margin: 2px 0 0; font-size: 12px; }
.today-stats b { font: 700 20px "Space Grotesk", "IBM Plex Mono", monospace; }
.due-link { padding: 0; border: 0; color: inherit; background: none; font: inherit; }
.due-link:hover b { color: var(--listen-green); }
.dash-week { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 8px; height: 70px; padding-top: 12px; border-top: 1px solid var(--listen-line); }
.dash-week span { display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 4px; height: 100%; }
.dash-week i { align-self: end; width: 100%; max-width: 22px; height: var(--h, 6%); border-radius: 6px; background: var(--listen-line); transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.dash-week span.has i { background: linear-gradient(180deg, var(--listen-blue), var(--listen-green)); }
.dash-week small { color: var(--listen-muted); font-size: 10px; }
.dash-week span:last-child small { color: var(--listen-green); font-weight: 700; }

/* 级别卡片：唯一的级别入口，带进度条 */
.level-card { grid-template-columns: auto 1fr auto; grid-template-areas: "code name count" "code desc desc" "meter meter meter"; align-items: center; gap: 4px 14px; padding: 16px 18px 14px; }
.level-card .level-code { grid-area: code; font-size: 24px; }
.level-card strong { grid-area: name; }
.level-card small { grid-area: desc; margin-top: 0; }
.level-card b { grid-area: count; align-self: center; }
.level-meter { grid-area: meter; height: 4px; margin-top: 10px; border-radius: 4px; background: var(--listen-line); overflow: hidden; }
.level-meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--listen-green), var(--listen-blue)); transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1); }

/* 课程卡片 */
.course-card { min-height: 0; cursor: pointer; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.25s ease; }
.course-card:hover { transform: translateY(-4px); }
.course-card:active { transform: translateY(-1px) scale(0.99); }
.course-card-top { display: flex; align-items: center; gap: 8px; }
.course-status { padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.course-status.is-done { color: #2a8f5c; background: rgba(47, 174, 110, 0.12); }
.course-status.is-current { color: var(--listen-green); background: var(--listen-green-soft); }
.course-star { margin-left: auto; color: #e0a526; font-size: 14px; }
.course-card h3 { margin: 14px 0 4px; }
.course-card .cn-title { flex: 1; font-size: 12.5px; line-height: 1.6; }
.course-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.course-tags span { padding: 3px 8px; border: 1px solid var(--listen-line); border-radius: 999px; color: var(--listen-muted); font-size: 10.5px; }
.course-card.is-current { border-color: var(--listen-blue); box-shadow: 0 0 0 1px var(--listen-blue), var(--listen-shadow); }
.course-card.is-done h3 { color: var(--listen-muted); }
.course-open { font-size: 12px; }
.course-card:hover .course-open { text-decoration: none; transform: translateX(3px); }
.course-open { transition: transform 0.25s ease; }

/* 课程头部：标签 + 上一课/下一课 */
.lesson-side { display: grid; justify-items: end; gap: 10px; }
.lesson-nav { display: flex; gap: 8px; }
.lesson-nav button { min-height: 32px; padding: 0 14px; border: 1px solid var(--listen-line); border-radius: 999px; color: var(--listen-ink); background: var(--listen-glass); font-size: 12px; transition: border-color 0.2s, transform 0.2s, background 0.2s; }
.lesson-nav button:hover:not(:disabled) { border-color: var(--listen-green); transform: translateY(-1px); }
.lesson-nav button:disabled { opacity: 0.4; cursor: default; }
.lesson-section.is-done #lesson-title::after { content: " ✓"; color: #2fae6e; font-size: 0.7em; vertical-align: middle; }

/* 播放器：去掉电视机外壳，保留深色字幕舞台 */
.tv-screen { border: 0; border-radius: 16px; box-shadow: 0 18px 40px rgba(8, 13, 24, 0.22); overflow: hidden; }
.tv-screen::before { display: none; }
.tv-header { padding-bottom: 14px; }
.player-panel { border-radius: 22px; padding: 20px 22px 18px; }
.expression-speak { margin-top: 10px; padding: 6px 12px; border: 1px solid var(--listen-line); border-radius: 999px; color: var(--listen-green); background: transparent; font-size: 12px; transition: border-color 0.2s, background 0.2s; }
.expression-speak:hover { border-color: var(--listen-green); background: var(--listen-green-soft); }
.expression-box, .practice-box { border-radius: 16px; }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; padding-top: 44px; }
  .dash-today { max-width: 560px; }
}
@media (max-width: 620px) {
  .dash { width: 90vw; gap: 22px; padding: 34px 0 30px; }
  .dash-today { grid-template-columns: 1fr; justify-items: center; padding: 18px; }
  .today-stats { width: 100%; }
  .lesson-side { justify-items: start; margin-top: 12px; }
  .resume-copy strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .goal-fill, .dash-week i, .level-meter i { transition: none; }
}

.saved-nav { white-space: nowrap; }
.listen-header .wordbook-nav .due-badge { color: #fff; background: #e5484d; }
#levels, #library, #lesson { scroll-margin-top: 96px; }
@media (max-width: 620px) { #levels, #library, #lesson { scroll-margin-top: 76px; } }
.more-courses { display: block; margin: 18px auto 0; padding: 10px 22px; border: 1px solid var(--listen-line); border-radius: 999px; color: var(--listen-green); background: var(--listen-glass); font-size: 13px; transition: border-color 0.2s, transform 0.2s; }
.more-courses:hover { border-color: var(--listen-green); transform: translateY(-1px); }
.more-courses[hidden] { display: none; }
.saved-nav svg { flex: none; width: 15px; height: 15px; }
/* 旧版绿色主题留下的深色规则优先级更高，统一回当前的蓝色玻璃质感 */
:root[data-theme="dark"] .level-card,
:root[data-theme="dark"] .course-card,
:root[data-theme="dark"] .expression-box,
:root[data-theme="dark"] .practice-box,
:root[data-theme="dark"] .search-field { background: var(--listen-glass); }
:root[data-theme="dark"] .level-card.active { background: var(--listen-green-soft); }
@media (max-width: 620px) {
  .caption-head > span { display: none; }
  .caption-head b { white-space: nowrap; }
}

/* 子页面左上角使用和首页一致的渐变圆环标志 */
.brand-mark { overflow: hidden; background: none; }
.brand-mark::after { display: none; }
.brand-mark img { display: block; width: 34px; height: 34px; }

/* ---------- v36：单句循环 ---------- */
.caption-line-wrap:hover .caption-replay { opacity: .7; pointer-events: auto; }
.caption-line-wrap.is-looping .caption-replay { opacity: 1; pointer-events: auto; color: #0b1020; border-color: #7dd3fc; background: #7dd3fc; animation: loopPulse 1.8s ease-out infinite; }
.caption-line-wrap.is-looping .caption-line { box-shadow: inset 2px 0 0 #7dd3fc; }
@keyframes loopPulse { from { box-shadow: 0 0 0 0 rgba(125, 211, 252, .55); } to { box-shadow: 0 0 0 9px rgba(125, 211, 252, 0); } }

/* ---------- v36：闪卡复习 ---------- */
.flash-start { display: flex; align-items: baseline; gap: 6px; margin: 12px 14px 0; padding: 12px 14px; border: 1px solid var(--listen-green); border-radius: 12px; color: #fff; background: var(--listen-green); font-weight: 600; text-align: left; transition: transform .2s var(--fx-ease, ease), box-shadow .2s ease; }
.flash-start:hover { transform: translateY(-1px); box-shadow: 0 10px 24px color-mix(in srgb, var(--listen-green) 30%, transparent); }
.flash-start span { flex: 1; }
.flash-start b { color: inherit; font: 600 18px "IBM Plex Mono", ui-monospace, monospace; }
.flash-start small { opacity: .8; font-size: 11px; font-weight: 400; }
:root[data-theme="dark"] .flash-start { color: #10201a; }
.flash-bar { height: 3px; background: var(--listen-green-soft); }
.flash-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--listen-green), var(--listen-blue, #5b8def)); transition: width .4s var(--fx-ease, ease); }
.flash-stage { padding: 18px 20px 4px; }
.flash-card { position: relative; display: grid; min-height: 230px; perspective: 1200px; cursor: pointer; outline: none; }
.flash-face { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 26px 22px; border: 1px solid var(--listen-line); border-radius: 16px; background: var(--listen-glass, color-mix(in srgb, var(--listen-bg) 70%, #fff)); text-align: center; backface-visibility: hidden; transition: transform .55s var(--fx-ease, ease); }
.flash-back { transform: rotateY(180deg); }
.flash-card.is-flipped .flash-front { transform: rotateY(-180deg); }
.flash-card.is-flipped .flash-back { transform: rotateY(0); }
.flash-tag { padding: 2px 8px; border-radius: 999px; color: var(--listen-green); background: var(--listen-green-soft); font: 600 10.5px "Noto Sans SC", system-ui, sans-serif; letter-spacing: .06em; }
.flash-word { font: 600 34px/1.15 "Space Grotesk", var(--serif, serif); letter-spacing: -.01em; word-break: break-word; }
.flash-ex { max-width: 40ch; margin: 0; color: var(--listen-ink); font-size: 14.5px; line-height: 1.6; }
.flash-ex mark { padding: 0 2px; border-radius: 3px; color: inherit; background: color-mix(in srgb, var(--listen-yellow) 45%, transparent); }
.flash-zh { margin: 0; color: var(--listen-muted); font-size: 13.5px; }
.flash-face small { color: var(--listen-muted); font-size: 11px; }
.flash-dict { margin-top: 4px; color: var(--listen-green); font-size: 12.5px; font-weight: 600; }
.flash-dict:hover { text-decoration: underline; text-underline-offset: 3px; }
.flash-actions { display: grid; gap: 10px; margin-top: 14px; }
.flash-say { display: inline-flex; align-items: center; gap: 6px; justify-self: center; padding: 6px 14px; border: 1px solid var(--listen-line); border-radius: 999px; background: transparent; color: var(--listen-muted); font-size: 12px; }
.flash-say svg { width: 15px; height: 15px; }
.flash-say:hover { color: var(--listen-ink); border-color: var(--listen-green); }
.flash-flip { justify-self: center; min-width: 160px; padding: 11px 18px; border: 1px solid var(--listen-ink); border-radius: 10px; color: var(--listen-bg); background: var(--listen-ink); font-weight: 600; }
.flash-flip kbd, .flash-grades kbd { margin-left: 6px; padding: 1px 5px; border: 1px solid currentColor; border-radius: 4px; opacity: .6; font: 10px "IBM Plex Mono", ui-monospace, monospace; }
.flash-grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; animation: fx-rise .35s var(--fx-ease, ease) both; }
.flash-grades button { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--listen-line); border-radius: 12px; background: transparent; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.flash-grades button:hover { transform: translateY(-1px); }
.flash-grades b { font-size: 14px; }
.flash-grades small { color: var(--listen-muted); font-size: 10.5px; }
.flash-grades [data-flash-grade="again"]:hover, .flash-grades [data-flash-grade="again"]:focus-visible { border-color: var(--listen-coral); background: color-mix(in srgb, var(--listen-coral) 12%, transparent); }
.flash-grades [data-flash-grade="hard"]:hover, .flash-grades [data-flash-grade="hard"]:focus-visible { border-color: var(--listen-yellow); background: color-mix(in srgb, var(--listen-yellow) 14%, transparent); }
.flash-grades [data-flash-grade="good"]:hover, .flash-grades [data-flash-grade="good"]:focus-visible { border-color: var(--listen-green); background: var(--listen-green-soft); }
.flash-empty { display: grid; justify-items: center; gap: 10px; padding: 34px 10px 18px; text-align: center; }
.flash-empty strong { font: 600 18px var(--serif, serif); }
.flash-empty p { margin: 0; color: var(--listen-muted); font-size: 13px; }
.flash-check { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: #fff; background: var(--listen-green); font-size: 26px; animation: fx-pop .5s var(--fx-ease, ease) both; }
@media (prefers-reduced-motion: reduce) {
  .flash-face { transition: none; }
  .caption-line-wrap.is-looping .caption-replay { animation: none; }
}

/* ---------- v36：学习热力图 ---------- */
.stats-heat { margin: 14px 20px 0; padding: 14px; border: 1px solid var(--listen-line); border-radius: 12px; background: var(--listen-glass); }
.heat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.heat-head h4 { margin: 0; font-size: 13px; }
.heat-head span { color: var(--listen-muted); font: 11px "IBM Plex Mono", ui-monospace, monospace; }
.heat-scroll { overflow-x: auto; scrollbar-width: thin; }
.heat-grid { display: grid; grid-template-columns: repeat(var(--weeks, 26), 12px); grid-template-rows: 14px repeat(7, 12px); gap: 3px; width: max-content; }
.heat-grid span { grid-row: 1; color: var(--listen-muted); font: 9.5px/14px "IBM Plex Mono", ui-monospace, monospace; white-space: nowrap; }
.heat-grid i, .heat-legend i { display: block; width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--listen-ink) 7%, transparent); }
:is(.heat-grid, .heat-legend) i[data-l="1"] { background: color-mix(in srgb, var(--listen-green) 30%, transparent); }
:is(.heat-grid, .heat-legend) i[data-l="2"] { background: color-mix(in srgb, var(--listen-green) 55%, transparent); }
:is(.heat-grid, .heat-legend) i[data-l="3"] { background: color-mix(in srgb, var(--listen-green) 80%, transparent); }
:is(.heat-grid, .heat-legend) i[data-l="4"] { background: var(--listen-green); }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; color: var(--listen-muted); font-size: 10px; }
/* 深色下按钮底色是浅绿，白字看不清，改用深色字 */
:root[data-theme="dark"] .primary-link { color: #10201a; }

/* ---------- v37：交互动效 ---------- */
/* 提示条：弹簧上浮 */
.toast-note { transform: translate(-50%, 14px) scale(.94); transition: opacity .25s ease, transform .45s var(--fx-spring, ease); }
.toast-note.show { transform: translate(-50%, 0) scale(1); }

/* 点词加入词库：这个词弹一下并闪出底色 */
.w.w-pop { display: inline-block; border-radius: 3px; animation: wordPop .6s var(--fx-spring, ease) both; }
@keyframes wordPop {
  0% { transform: scale(1); background: transparent; }
  35% { transform: scale(1.16); background: color-mix(in srgb, var(--listen-yellow) 55%, transparent); }
  100% { transform: scale(1); background: transparent; }
}

/* 闪卡：评分后按方向飞出，下一张从下方弹入；翻面用弹簧 */
.flash-face { transition: transform .6s var(--fx-spring, ease); }
.flash-card.is-entering { animation: flashIn .46s var(--fx-spring, ease) both; }
.flash-card.leave-good { animation: flashOutGood .24s var(--fx-ease-in, ease-in) forwards; }
.flash-card.leave-hard { animation: flashOutHard .24s var(--fx-ease-in, ease-in) forwards; }
.flash-card.leave-again { animation: flashOutAgain .24s var(--fx-ease-in, ease-in) forwards; }
@keyframes flashIn { from { opacity: 0; transform: translateY(22px) scale(.95); } }
@keyframes flashOutGood { to { opacity: 0; transform: translateX(42%) rotate(6deg); } }
@keyframes flashOutHard { to { opacity: 0; transform: translateY(26px) scale(.94); } }
@keyframes flashOutAgain { to { opacity: 0; transform: translateX(-42%) rotate(-6deg); } }
.flash-grades.is-leaving { opacity: .4; pointer-events: none; transition: opacity .15s ease; }
.flash-grades button:active { transform: scale(.96); }
.flash-bar i { width: 100%; transform: scaleX(var(--p, 0)); transform-origin: left center; transition: transform .55s var(--fx-spring, ease); }
.flash-empty.is-done strong, .flash-empty.is-done p, .flash-empty.is-done button { animation: fx-rise .5s var(--fx-ease, ease) backwards; }
.flash-empty.is-done p { animation-delay: .08s; }
.flash-empty.is-done button { animation-delay: .16s; }

/* 统计：打开时柱子与进度条从零长出来，热力图按列依次点亮 */
.week-col i { transition: height .7s var(--fx-spring, ease); }
.level-bar i { transition: width .8s var(--fx-ease, ease); }
@starting-style {
  .week-col i { height: 4px; }
  .level-bar i { width: 0; }
  .goal-fill { stroke-dashoffset: 100; }
  .level-meter i { width: 0; }
}
.stats-modal:not([hidden]) .heat-grid i { animation: heatIn .42s var(--fx-spring, ease) backwards; animation-delay: calc(var(--c, 0) * 14ms + .1s); }
@keyframes heatIn { from { opacity: 0; transform: scale(.3); } }
.heat-grid i { transition: transform .15s ease; }
.heat-grid i:hover { transform: scale(1.35); }

/* 课程库切换级别 / 主题 / 收藏筛选时卡片依次上浮 */
[data-course-list].fx-refresh .course-card { animation: fx-rise .5s var(--fx-ease, ease) backwards; animation-delay: calc(var(--i, 0) * 32ms); }

/* 单句循环开启时的按钮先弹一下再转 */
.caption-line-wrap.is-looping .caption-replay { animation: loopIn .4s var(--fx-spring, ease), loopSpin 2.4s linear .4s infinite; }
@keyframes loopIn { from { transform: translateY(-50%) scale(.6); } }

@media (prefers-reduced-motion: reduce) {
  .w.w-pop, .flash-card.is-entering, .flash-card[class*="leave-"], .flash-empty.is-done *,
  .stats-modal:not([hidden]) .heat-grid i, [data-course-list].fx-refresh .course-card { animation: none; }
  .flash-bar i, .week-col i, .level-bar i, .toast-note, .flash-face { transition: none; }
  .caption-line-wrap.is-looping .caption-replay { animation: none; }
}
