/* ==========================================================================
   沉浸式生活英语 · 站点样式
   ========================================================================== */

:root {
  --paper: #faf8f4;
  --paper-2: #f3efe8;
  --card: #ffffff;
  --ink: #1a1713;
  --ink-2: #4b453c;
  --muted: #8a8175;
  --faint: #b3aa9c;
  --line: #eae4da;
  --line-2: #d9d1c3;

  --listen: #1f8a80;
  --listen-soft: #e6f3f1;
  --read: #5b5bd6;
  --read-soft: #ecebfb;
  --practice: #cf5f2e;
  --practice-soft: #fbeee7;
  --watch: #e14b76;
  --watch-soft: #fdeaf1;
  --success: #2f9152;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(26, 23, 19, .05), 0 2px 8px rgba(26, 23, 19, .04);
  --shadow: 0 2px 4px rgba(26, 23, 19, .05), 0 12px 32px rgba(26, 23, 19, .07);
  --shadow-lg: 0 24px 60px rgba(26, 23, 19, .12);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Charter, "Source Serif Pro",
    Georgia, "Songti SC", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 248, 244, .86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 64px; display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.2px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, #cf5f2e, #e8934f);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(207, 95, 46, .3);
}
.brand-sub { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .3px; }
.nav-spacer { flex: 1; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 7px 12px; border-radius: 8px; transition: .18s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { background: var(--paper-2); color: var(--ink); }
.nav-bili {
  color: #fff; background: #fb7299; font-weight: 600;
  box-shadow: 0 4px 14px rgba(251, 114, 153, .32);
}
.nav-bili:hover { background: #f25d8a; color: #fff; }

/* ---------- 首页 Hero ---------- */
.hero { padding: 68px 0 44px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: var(--practice); background: var(--practice-soft);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5.2vw, 54px); line-height: 1.12; margin: 0 0 18px;
  letter-spacing: -1.2px; font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #cf5f2e, #e0934a 55%, #1f8a80);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 620px; margin: 0 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; transition: .18s; white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(26, 23, 19, .18); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(26, 23, 19, .22); }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-bili { background: #fb7299; color: #fff; box-shadow: 0 6px 18px rgba(251, 114, 153, .3); }
.btn-bili:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }

.stats { display: flex; flex-wrap: wrap; gap: 36px; }
.stat-num { font-size: 27px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ---------- 区块标题 ---------- */
.section { padding: 42px 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 25px; margin: 0 0 8px; letter-spacing: -.5px; }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- 三模块说明 ---------- */
.mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.mod {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); transition: .2s;
}
.mod:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.mod-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; margin-bottom: 15px;
}
.mod h3 { margin: 0 0 8px; font-size: 17px; }
.mod p { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.mod-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
}

/* ---------- 剧集网格 ---------- */
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }

.ep-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .22s;
  display: flex; flex-direction: column;
}
.ep-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.ep-cover {
  position: relative; aspect-ratio: 16 / 9; padding: 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer; overflow: hidden; isolation: isolate;
}
.ep-cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.22) 1px, transparent 0);
  background-size: 16px 16px;
}
.ep-num {
  position: absolute; top: 12px; right: 16px; z-index: 1;
  font-size: 46px; font-weight: 800; letter-spacing: -3px;
  color: rgba(255, 255, 255, .28); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ep-cover-zh { color: #fff; font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.ep-cover-en {
  color: rgba(255, 255, 255, .82); font-size: 12px; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase; margin-top: 3px;
}
.ep-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .93); color: var(--ink);
  display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  opacity: 0; transition: .22s; z-index: 2;
}
.ep-card:hover .ep-play { opacity: 1; }

.ep-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.ep-feature { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0 0 14px; flex: 1; }
.ep-meta { display: flex; gap: 12px; font-size: 12px; color: var(--faint); margin-bottom: 13px; }
.ep-meta span { display: inline-flex; align-items: center; gap: 4px; }

.ep-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.ep-act {
  border: 1px solid var(--line); background: var(--paper); border-radius: 9px;
  padding: 9px 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; gap: 3px; transition: .16s;
}
.ep-act i { font-style: normal; font-size: 15px; }
.ep-act:hover { border-color: var(--line-2); background: var(--card); }
.ep-act[data-k="listen"]:hover { border-color: var(--listen); color: var(--listen); background: var(--listen-soft); }
.ep-act[data-k="read"]:hover { border-color: var(--read); color: var(--read); background: var(--read-soft); }
.ep-act[data-k="practice"]:hover { border-color: var(--practice); color: var(--practice); background: var(--practice-soft); }
.ep-act[data-k="watch"]:hover { border-color: var(--watch); color: var(--watch); background: var(--watch-soft); }

.ep-progress {
  height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 12px;
}
.ep-progress i { display: block; height: 100%; background: var(--success); border-radius: 2px; }

/* ---------- B 站区块 ---------- */
.bili-band {
  border-radius: 22px; padding: 40px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(125deg, #fb7299 0%, #f0578d 42%, #b34bd6 100%);
  box-shadow: 0 20px 50px rgba(251, 114, 153, .28);
}
.bili-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 300px; height: 300px;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.bili-band h2 { margin: 0 0 12px; font-size: 26px; letter-spacing: -.5px; }
.bili-band p { margin: 0 0 24px; font-size: 15.5px; line-height: 1.65; max-width: 620px; color: rgba(255,255,255,.92); }
.bili-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.btn-white { background: #fff; color: #d94a78; font-weight: 700; }
.btn-white:hover { transform: translateY(-1px); }
.btn-outline-white { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,.24); }

/* ==========================================================================
   剧集内页通用
   ========================================================================== */
.ep-header { background: var(--card); border-bottom: 1px solid var(--line); padding: 22px 0 0; }
.ep-header-top { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); background: var(--paper-2); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 9px; transition: .16s;
}
.back-btn:hover { color: var(--ink); border-color: var(--line-2); }
.ep-header-title { flex: 1; min-width: 240px; }
.ep-kicker { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.ep-header-title h1 { margin: 5px 0 4px; font-size: 26px; letter-spacing: -.6px; }
.ep-header-title h1 small { font-weight: 500; color: var(--faint); font-size: 14px; letter-spacing: 0; margin-left: 10px; }

.module-tabs { display: flex; gap: 4px; margin-top: 20px; overflow-x: auto; }
.module-tab {
  border: none; background: transparent; padding: 11px 16px 13px; font-size: 14px; font-weight: 600;
  color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; transition: .16s;
  display: inline-flex; align-items: center; gap: 7px;
}
.module-tab:hover { color: var(--ink-2); }
.module-tab.active { color: var(--ink); }
.module-tab.active[data-k="listen"] { border-bottom-color: var(--listen); color: var(--listen); }
.module-tab.active[data-k="read"] { border-bottom-color: var(--read); color: var(--read); }
.module-tab.active[data-k="practice"] { border-bottom-color: var(--practice); color: var(--practice); }
.module-tab.active[data-k="watch"] { border-bottom-color: var(--watch); color: var(--watch); }

.page-body { padding: 30px 0 70px; }

/* 工具条 */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.toolbar .spacer { flex: 1; }
.tb-group { display: flex; align-items: center; gap: 7px; }
.tb-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.seg { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 3px; }
.seg button {
  border: none; background: transparent; padding: 6px 13px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); transition: .16s;
}
.seg button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

.chip {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; transition: .16s;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--line-2); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[data-k="listen"].active { background: var(--listen); border-color: var(--listen); }
.chip[data-k="read"].active { background: var(--read); border-color: var(--read); }
.chip[data-k="practice"].active { background: var(--practice); border-color: var(--practice); }

.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--paper-2); border-radius: 9px; padding: 3px; }
.stepper button {
  border: none; background: transparent; width: 28px; height: 26px; border-radius: 7px;
  font-size: 15px; color: var(--ink-2); font-weight: 700;
}
.stepper button:hover { background: var(--card); }
.stepper span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   听力模块
   ========================================================================== */
.listen-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 1020px) {
  .listen-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; }
  .listen-player-col { position: sticky; top: 84px; }
}

.player-card {
  background: #16130f; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.player-screen {
  aspect-ratio: 16 / 10; position: relative; display: grid; place-items: center;
  padding: 28px 32px; text-align: center;
  background:
    radial-gradient(120% 90% at 50% 105%, rgba(31, 138, 128, .34), transparent 60%),
    radial-gradient(90% 70% at 12% 0%, rgba(207, 95, 46, .30), transparent 55%),
    linear-gradient(160deg, #221c16, #12100d 70%);
}
.player-screen::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0);
  background-size: 22px 22px; pointer-events: none;
}
.screen-inner { position: relative; z-index: 1; width: 100%; }
.screen-en {
  color: #fff; font-weight: 700; line-height: 1.28; letter-spacing: -.3px;
  font-size: clamp(19px, 2.3vw, 30px); transition: font-size .15s;
}
.screen-en .hl { color: #ffd9a8; }
.screen-zh {
  color: rgba(255, 255, 255, .72); font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.6; margin-top: 14px; font-weight: 500;
}
.screen-zh:empty { display: none; }
.screen-hint { color: rgba(255,255,255,.38); font-size: 14px; }

.player-bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 40px; margin-top: 26px; }
.player-bars i {
  display: block; width: 4px; border-radius: 3px; height: 7px;
  background: rgba(255, 255, 255, .22); transition: background .25s;
}
.player-card.playing .player-bars i {
  background: #37d3c4; animation: barBounce .85s infinite ease-in-out alternate;
}
.player-card.playing .player-bars i:nth-child(2n) { animation-delay: .12s; }
.player-card.playing .player-bars i:nth-child(3n) { animation-delay: .24s; }
.player-card.playing .player-bars i:nth-child(5n) { animation-delay: .34s; }
.player-card.playing .player-bars i:nth-child(7n) { animation-delay: .46s; }
@keyframes barBounce { from { height: 7px; } to { height: 34px; } }

.player-controls { padding: 16px 20px 18px; background: #1d1913; }
.scrub-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.scrub-time { font-size: 12px; color: rgba(255,255,255,.62); font-variant-numeric: tabular-nums; min-width: 42px; }
.scrub-time.right { text-align: right; }
.scrub {
  flex: 1; height: 22px; display: flex; align-items: center; cursor: pointer; position: relative;
}
.scrub-track { height: 5px; width: 100%; border-radius: 3px; background: rgba(255,255,255,.16); overflow: hidden; position: relative; }
.scrub-fill { height: 100%; width: 0; background: linear-gradient(90deg, #37d3c4, #1f8a80); border-radius: 3px; }
.scrub:hover .scrub-handle { opacity: 1; }
.scrub-handle {
  position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #fff;
  transform: translate(-50%, -50%); top: 50%; opacity: 0; transition: opacity .16s;
  box-shadow: 0 2px 6px rgba(0,0,0,.4); pointer-events: none;
}

.ctrl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctrl-btn {
  border: none; background: rgba(255,255,255,.09); color: #fff; border-radius: 10px;
  min-width: 40px; height: 40px; padding: 0 13px; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: .16s;
}
.ctrl-btn:hover { background: rgba(255,255,255,.17); }
.ctrl-btn.main { background: var(--listen); min-width: 54px; font-size: 17px; }
.ctrl-btn.main:hover { background: #1a7a71; }
.ctrl-btn.on { background: #37d3c4; color: #0d1a18; }
.ctrl-btn small { font-size: 11.5px; font-weight: 700; }
.ctrl-spacer { flex: 1; }
.speed-select {
  background: rgba(255,255,255,.09); color: #fff; border: none; border-radius: 10px;
  height: 40px; padding: 0 10px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.speed-select option { color: #000; }

/* 字幕列表 */
.subs-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden;
}
.subs-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2); position: sticky; top: 0; background: var(--card); z-index: 2;
}
.subs-head .count { font-weight: 600; color: var(--faint); font-size: 12.5px; }
.subs-list { max-height: 620px; overflow-y: auto; padding: 8px; scroll-behavior: smooth; position: relative; }
.sub-item {
  padding: 11px 14px; border-radius: 10px; cursor: pointer; transition: background .14s;
  border-left: 3px solid transparent;
}
.sub-item:hover { background: var(--paper); }
.sub-item.active { background: var(--listen-soft); border-left-color: var(--listen); }
.sub-time { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.sub-en { font-size: 14.5px; line-height: 1.5; color: var(--ink); font-family: var(--serif); }
.sub-zh { font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 3px; }
.sub-item.active .sub-en { font-weight: 600; }
body.hide-zh .sub-zh { display: none; }

/* ==========================================================================
   阅读模块
   ========================================================================== */
.read-progress { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 20px; }
.read-progress i { display: block; height: 100%; width: 0; background: var(--read); }

.read-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 44px clamp(22px, 5vw, 64px);
  max-width: 860px; margin: 0 auto;
  --read-en: 20px;
  --read-zh: 15px;
  --read-lh: 1.6;
}
.read-line { margin-bottom: 26px; position: relative; scroll-margin-top: 150px; }
.read-en {
  font-family: var(--serif); color: var(--ink);
  font-size: var(--read-en); line-height: var(--read-lh);
  transition: font-size .15s; letter-spacing: -.1px;
}
.read-zh {
  color: var(--muted); margin-top: 7px;
  font-size: var(--read-zh); line-height: calc(var(--read-lh) + .1);
  transition: font-size .15s;
}
body.hide-zh .read-zh { display: none; }
body.mode-en .read-zh { display: none; }
.read-line:hover .read-en { color: var(--read); }
.read-line .idx {
  position: absolute; left: -46px; top: .5em; font-size: 11.5px; font-weight: 700;
  color: var(--faint); font-variant-numeric: tabular-nums; opacity: 0; transition: .16s;
}
.read-line:hover .idx { opacity: 1; }
@media (max-width: 760px) { .read-line .idx { display: none; } }

.read-pager {
  display: flex; justify-content: center; gap: 12px; margin-top: 40px; padding-top: 26px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   拼写模块
   ========================================================================== */
.practice-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 28px clamp(18px, 4vw, 40px) 30px; position: relative;
}
.practice-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.progress-pill {
  font-size: 13px; font-weight: 700; background: var(--practice-soft); color: var(--practice);
  padding: 6px 13px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.practice-timer {
  font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--paper-2);
  padding: 6px 13px; border-radius: 999px; font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 8px;
}
.practice-timer button { border: none; background: transparent; color: var(--muted); font-size: 13px; padding: 0 2px; }

.practice-zh {
  text-align: center; color: var(--ink-2); font-weight: 600; line-height: 1.45;
  margin: 30px auto 18px; max-width: 900px; transition: font-size .15s;
}
.practice-zh:empty { display: none; }

.wave-bar { display: flex; align-items: center; justify-content: center; gap: 7px; height: 34px; margin-bottom: 18px; }
.wave-bar i { display: block; width: 4px; height: 6px; border-radius: 3px; background: var(--line-2); transition: .2s; }
.wave-bar.playing i { background: var(--practice); animation: waveBounce .8s infinite ease-in-out alternate; }
.wave-bar.playing i:nth-child(2) { animation-delay: .1s; }
.wave-bar.playing i:nth-child(3) { animation-delay: .2s; }
.wave-bar.playing i:nth-child(4) { animation-delay: .3s; }
.wave-bar.playing i:nth-child(5) { animation-delay: .15s; }
.wave-bar.playing i:nth-child(6) { animation-delay: .25s; }
.wave-bar.playing i:nth-child(7) { animation-delay: .05s; }
@keyframes waveBounce { from { height: 6px; } to { height: 26px; } }

.peek-slot { min-height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.peek-text {
  font-size: 1.25rem; font-weight: 600; color: var(--practice); background: var(--practice-soft);
  padding: 5px 18px; border-radius: 9px; visibility: hidden; opacity: 0; transition: opacity .15s;
}
.peek-text.show { visibility: visible; opacity: 1; }

.type-field {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: 10px 14px; padding: 26px 12px; min-height: 190px; margin-bottom: 20px;
}
.word-input {
  border: none; border-bottom: 2.5px dashed var(--line-2); background: transparent;
  font-family: var(--serif); font-weight: 600; text-align: center; color: var(--ink);
  padding: 0 2px; border-radius: 0; transition: border-color .2s, color .2s, width .1s;
}
.word-input:focus { border-bottom-color: var(--practice); border-bottom-style: solid; }
.word-input.correct { border-bottom-color: var(--success); border-bottom-style: solid; color: var(--success); }
.punc { font-weight: 600; color: var(--ink); font-family: var(--serif); }

.practice-foot { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }
.key {
  background: var(--paper-2); color: var(--ink-2); padding: 3px 8px; border-radius: 6px;
  font-weight: 700; border: 1px solid var(--line); font-size: 12px;
}

.practice-nav { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.done-banner {
  text-align: center; padding: 34px 20px; background: var(--practice-soft);
  border-radius: 14px; color: var(--practice);
}
.done-banner h3 { margin: 0 0 8px; font-size: 22px; }
.done-banner p { margin: 0 0 18px; color: var(--ink-2); font-size: 14.5px; }

/* ==========================================================================
   视频模块
   ========================================================================== */
.watch-frame {
  border-radius: var(--radius); overflow: hidden; background: #000;
  box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; position: relative;
}
.watch-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.watch-fallback {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: #fff;
  background: linear-gradient(150deg, #241d17, #12100d); text-align: center; padding: 30px;
}
.watch-fallback.show { display: flex; }
.watch-info { margin-top: 22px; display: grid; gap: 16px; }
@media (min-width: 900px) { .watch-info { grid-template-columns: 1.4fr 1fr; } }
.info-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.info-card h3 { margin: 0 0 10px; font-size: 16px; }
.info-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.65; color: var(--muted); }
.info-card ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }

/* ---------- 空状态 / 提示 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 11px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: .25s; z-index: 200; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 34px 0 44px; margin-top: 40px;
  font-size: 13.5px; color: var(--muted);
}
.footer-flex { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--ink); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }
.subs-list::-webkit-scrollbar-thumb { border-color: var(--card); }

::selection { background: var(--practice-soft); }

/* ==========================================================================
   访问密码门禁（受保护模式 + SITE_PASSWORD）
   ========================================================================== */
body.gated { overflow: hidden; }

.gate {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(26, 23, 19, .42);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  animation: gate-in .22s ease-out;
}
@keyframes gate-in { from { opacity: 0; } to { opacity: 1; } }

.gate-card {
  background: var(--card); border-radius: 20px; padding: 34px 30px 26px;
  width: 100%; max-width: 400px; text-align: center;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  animation: gate-card-in .26s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes gate-card-in { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

.gate-lock { font-size: 34px; line-height: 1; margin-bottom: 12px; }
.gate-card h2 { font-size: 21px; margin: 0 0 8px; color: var(--ink); letter-spacing: -.3px; }
.gate-card > p { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin: 0 0 22px; }

#gate-form { display: flex; gap: 9px; }
#gate-pass {
  flex: 1; min-width: 0; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 11px;
  padding: 12px 14px; outline: none; transition: border-color .18s, background .18s;
}
#gate-pass:focus { border-color: var(--listen); background: #fff; }
#gate-btn {
  flex: 0 0 auto; font-family: var(--sans); font-size: 15px; font-weight: 700;
  color: #fff; background: var(--ink); border: none; border-radius: 11px;
  padding: 12px 22px; cursor: pointer; transition: opacity .18s, transform .12s;
}
#gate-btn:hover { opacity: .86; }
#gate-btn:active { transform: scale(.97); }
#gate-btn:disabled { opacity: .5; cursor: default; }

.gate-msg { font-size: 13px; min-height: 20px; margin-top: 12px; color: var(--muted); }
.gate-msg.bad { color: #c0392b; font-weight: 600; }

.gate-bili {
  display: inline-block; margin-top: 18px; padding-top: 17px; width: 100%;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--watch); font-weight: 600;
}
.gate-bili:hover { text-decoration: underline; }

/* 首页：锁住的集 */
.ep-lock {
  position: absolute; top: 12px; right: 13px; z-index: 2;
  font-size: 13px; line-height: 1;
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  padding: 6px 8px; border-radius: 8px;
}
.ep-cover { position: relative; }
.ep-play { z-index: 2; }
.ep-card-locked .ep-cover { filter: saturate(.62) brightness(.94); }
.ep-locked-tag {
  color: var(--muted); background: var(--paper-2);
  border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
}

/* 首页英雄区：免费集数提示 */
.hero-note {
  display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: -18px 0 34px; padding: 9px 16px;
  font-size: 13.5px; color: var(--ink-2);
  background: var(--listen-soft); border: 1px solid #cfe7e4; border-radius: 999px;
}
.hero-note a { color: var(--listen); font-weight: 700; white-space: nowrap; }
.hero-note a:hover { text-decoration: underline; }
.hero-note-on { background: var(--practice-soft); border-color: #f0d3c4; }
.hero-note-on a { color: var(--practice); }

/* ==========================================================================
   听力模块 · 播放器补充
   ========================================================================== */

/* 「中」按钮要能真正关掉播放区里的中文字幕。
   之前只隐藏了右侧字幕列表的 .sub-zh，播放区的大字中文漏掉了。 */
body.hide-zh .screen-zh { display: none; }

/* 控制条第二排：字幕字号 + 快捷键提示 */
.ctrl-row-2 {
  margin-top: 13px; padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.ctrl-label { font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .55); }
.ctrl-hint { flex: 1; text-align: right; font-size: 12.5px; color: rgba(255, 255, 255, .45); }
.ctrl-hint .key { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); }
.stepper-dark { background: rgba(255, 255, 255, .09); }
.stepper-dark button { color: #fff; }
.stepper-dark button:hover { background: rgba(255, 255, 255, .18); }
.stepper-dark span { color: #fff; min-width: 34px; }
@media (max-width: 560px) { .ctrl-hint { display: none; } }

/* 全屏：真全屏优先；浏览器不给就用「网页内全屏」兜底（同一个类） */
.player-card:fullscreen,
.player-card.player-full {
  border-radius: 0; display: flex; flex-direction: column; justify-content: center;
  background: #16130f;
}
.player-card:-webkit-full-screen {
  border-radius: 0; display: flex; flex-direction: column; justify-content: center;
  background: #16130f;
}
.player-card.player-full { position: fixed; inset: 0; z-index: 400; }
.player-card:fullscreen .player-screen,
.player-card:-webkit-full-screen .player-screen,
.player-card.player-full .player-screen { flex: 1; aspect-ratio: auto; min-height: 0; }
.player-card:fullscreen .screen-en,
.player-card:-webkit-full-screen .screen-en,
.player-card.player-full .screen-en { font-size: clamp(26px, 4.2vw, 60px) !important; }
.player-card:fullscreen .screen-zh,
.player-card:-webkit-full-screen .screen-zh,
.player-card.player-full .screen-zh { font-size: clamp(17px, 2.4vw, 32px) !important; margin-top: 22px; }
.player-card:fullscreen .player-bars,
.player-card:-webkit-full-screen .player-bars,
.player-card.player-full .player-bars { margin-top: 40px; height: 56px; }
.player-card:fullscreen .player-controls,
.player-card:-webkit-full-screen .player-controls,
.player-card.player-full .player-controls { padding: 18px clamp(16px, 4vw, 48px) 22px; }
body.player-full-body { overflow: hidden; }

/* ==========================================================================
   阅读模块 · 工具栏吸顶
   ========================================================================== */
.read-sticky {
  position: sticky; top: 64px; z-index: 55;
  padding: 10px 0 12px; margin-bottom: 6px;
  background: var(--paper);
  box-shadow: 0 12px 18px -16px rgba(26, 23, 19, .45);
}
.read-sticky .read-progress { margin-bottom: 10px; }
.read-sticky .toolbar { margin-bottom: 0; }
@media (max-width: 640px) { .read-sticky { top: 60px; } }

/* ==========================================================================
   拼写模块 · 字号 + 可折叠字幕列表
   ========================================================================== */
.practice-card { --p-en: 30px; --p-zh: 24px; }
.practice-zh { font-size: var(--p-zh); }
.type-field { font-size: var(--p-en); }
.word-input, .punc { font-size: inherit; }
.peek-text { font-size: calc(var(--p-en) * .82); }

.practice-hint { font-size: 12.5px; color: var(--faint); }

.chip-script { gap: 8px; }
.chip-script b {
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--practice-soft); color: var(--practice);
  padding: 2px 7px; border-radius: 999px;
}
.chip-script.active { background: var(--practice); border-color: var(--practice); color: #fff; }
.chip-script.active b { background: rgba(255, 255, 255, .26); color: #fff; }

.script-panel {
  display: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px;
}
.script-panel.show { display: block; }
.script-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--paper); flex-wrap: wrap;
}
.script-head .spacer { flex: 1; }
.script-title { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.script-head .count { font-size: 12.5px; font-weight: 600; color: var(--faint); }
.script-list { max-height: 400px; overflow-y: auto; padding: 8px; scroll-behavior: smooth; }
.script-item {
  display: flex; align-items: flex-start; gap: 11px; padding: 10px 13px;
  border-radius: 10px; cursor: pointer; transition: background .14s;
  border-left: 3px solid transparent;
}
.script-item:hover { background: var(--paper); }
.script-item.active { background: var(--practice-soft); border-left-color: var(--practice); }
.script-item.active .si-en { font-weight: 700; color: var(--practice); }
.si-num {
  flex: none; width: 30px; text-align: right; font-size: 11.5px; font-weight: 700;
  color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 2px;
}
.script-item.active .si-num { color: var(--practice); }
.si-body { flex: 1; min-width: 0; }
.si-en { font-family: var(--serif); font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.si-zh { font-size: 12.5px; line-height: 1.55; color: var(--muted); margin-top: 3px; }
body.mode-en .si-zh { display: none; }
.si-flag { flex: none; font-size: 13px; font-weight: 700; color: var(--success); opacity: 0; padding-top: 2px; }
.script-item.is-done .si-flag { opacity: 1; }
.script-item.is-done .si-en { color: var(--ink-2); }
.script-item.is-done.active .si-en { color: var(--practice); }

/* 受保护模式：权限不够时的提示面板 */
.locked-panel {
  max-width: 560px; margin: 56px auto; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 44px 30px; box-shadow: var(--shadow-sm);
}
.locked-icon { font-size: 40px; line-height: 1; margin-bottom: 14px; }
.locked-panel h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -.4px; }
.locked-panel p { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.locked-panel p b { color: var(--practice); }
.locked-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ==========================================================================
   阅读模块 · 批注与笔记本（右侧批注栏 + 虚线连接，思路跟 Word 批注一样）
   ========================================================================== */

:root {
  --note-word: #c2410c;
  --note-phrase: #0f766e;
  --note-sentence: #5b5bd6;
}

.read-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 24px;
  align-items: start;
}
.read-layout.panel-off { grid-template-columns: minmax(0, 1fr); }
.read-layout.panel-off .notes-panel { display: none; }
.read-main { min-width: 0; }
/* 左边多留一点，正文外面的行号（.idx 在 left:-46px）才不会顶到页面边缘 */
.read-layout .read-card { max-width: none; margin: 0; padding: 38px 44px 38px 58px; }
.read-layout .read-line { scroll-margin-top: 178px; }

/* ---------- 正文里的标注 ---------- */
.nw { border-radius: 3px; transition: background .14s; }
.nw-word { background: rgba(194, 65, 12, .13); box-shadow: inset 0 -2px 0 rgba(194, 65, 12, .55); }
.nw-phrase { background: rgba(15, 118, 110, .12); box-shadow: inset 0 -2px 0 rgba(15, 118, 110, .5); }
.nw.sel { background: rgba(91, 91, 214, .26); box-shadow: inset 0 -2px 0 var(--read); }
.nw.hl { outline: 2px solid rgba(194, 65, 12, .45); outline-offset: 1px; }

.read-line.has-sentnote {
  background: linear-gradient(90deg, rgba(91, 91, 214, .08), rgba(91, 91, 214, 0) 70%);
  border-radius: 8px;
}
.read-line.has-sentnote::before {
  content: ''; position: absolute; left: -14px; top: 4px; width: 3px; height: 1.5em;
  border-radius: 2px; background: var(--note-sentence); opacity: .6;
}
.read-layout.annotating .nw { cursor: pointer; }
.read-layout.annotating .nw:hover { background: rgba(91, 91, 214, .18); }
.read-layout.annotating .read-line .idx {
  opacity: .55; cursor: pointer; padding: 1px 4px; border-radius: 5px; background: var(--paper-2);
}
.read-layout.annotating .read-line .idx:hover { opacity: 1; background: var(--read-soft); color: var(--read); }

@keyframes noteFlash {
  0%, 100% { background-color: transparent; }
  20%, 65% { background-color: rgba(91, 91, 214, .3); }
}
.nw.flash { animation: noteFlash 1.3s ease-out; }
.read-line.flash { animation: noteFlash 1.3s ease-out; }

/* ---------- 虚线连接层 ---------- */
.notes-lines {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 3; overflow: visible;
}
.notes-lines path { fill: none; stroke-width: 1.4; stroke-dasharray: 4 4; opacity: .8; }
.notes-lines circle { stroke: none; }
.notes-lines path.nl-word, .notes-lines circle.nl-word { stroke: var(--note-word); fill: var(--note-word); }
.notes-lines path.nl-phrase, .notes-lines circle.nl-phrase { stroke: var(--note-phrase); fill: var(--note-phrase); }
.notes-lines path.nl-sentence, .notes-lines circle.nl-sentence { stroke: var(--note-sentence); fill: var(--note-sentence); }

/* ---------- 右侧笔记本 ---------- */
.notes-panel {
  position: sticky; top: 96px;
  max-height: calc(100vh - 122px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-sm);
}
.notes-head { padding: 12px 13px 10px; border-bottom: 1px solid var(--line); background: var(--paper); }
.notes-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 9px;
}
.notes-scope {
  font-size: 11.5px; font-weight: 700; color: var(--read); background: var(--read-soft);
  padding: 2px 8px; border-radius: 999px;
}
.notes-filter { width: 100%; }
.notes-filter button { flex: 1; padding: 5px 2px; font-size: 12.5px; }
.notes-hint { font-size: 11.5px; color: var(--faint); line-height: 1.5; margin-top: 8px; }
.notes-list { flex: 1; overflow-y: auto; padding: 10px; }

.note-card {
  background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: 11px; padding: 10px 12px; margin-bottom: 9px; transition: .15s;
  cursor: pointer;
}
.note-card:hover { background: var(--card); box-shadow: var(--shadow-sm); }
.note-card:hover .nc-line { color: var(--read); }
.note-card.nc-word { border-left-color: var(--note-word); }
.note-card.nc-phrase { border-left-color: var(--note-phrase); }
.note-card.nc-sentence { border-left-color: var(--note-sentence); }
.nc-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.nc-head .spacer { flex: 1; }
.nc-badge { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.nc-word .nc-badge { color: var(--note-word); }
.nc-phrase .nc-badge { color: var(--note-phrase); }
.nc-sentence .nc-badge { color: var(--note-sentence); }
.nc-line { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nc-btn {
  border: none; background: transparent; font-size: 12px; color: var(--faint);
  padding: 2px 4px; border-radius: 5px; cursor: pointer; line-height: 1;
}
.nc-btn:hover { background: var(--paper-2); color: var(--ink-2); }
.nc-text {
  font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--ink);
  line-height: 1.45; margin-bottom: 5px; word-break: break-word;
}
.nc-body { font-size: 12.8px; line-height: 1.62; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.notes-empty { font-size: 12.8px; line-height: 1.8; color: var(--muted); padding: 22px 12px; text-align: center; }
.notes-empty b { color: var(--read); }

/* ---------- 选中浮条 + 写笔记浮窗 ---------- */
.note-fab {
  position: fixed; left: 50%; bottom: 22px; z-index: 300;
  display: flex; align-items: center; gap: 10px;
  max-width: min(780px, calc(100vw - 28px));
  background: var(--card); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 10px 12px;
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: .2s;
}
.note-fab.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.nf-badge {
  flex: none; font-size: 12px; font-weight: 700; padding: 5px 10px;
  border-radius: 999px; white-space: nowrap; color: var(--ink-2); background: var(--paper-2);
}
.nf-word { background: rgba(194, 65, 12, .13); color: var(--note-word); }
.nf-phrase { background: rgba(15, 118, 110, .13); color: var(--note-phrase); }
.nf-sentence { background: rgba(91, 91, 214, .13); color: var(--note-sentence); }
.nf-text {
  font-family: var(--serif); font-size: 14px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42vw;
}

.note-editor {
  position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); z-index: 310;
  width: min(560px, calc(100vw - 28px)); overflow: hidden;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow-lg);
}
.ne-head {
  display: flex; align-items: center; gap: 9px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.ne-text {
  flex: 1; font-family: var(--serif); font-size: 14px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ne-x { border: none; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; line-height: 1; }
.note-editor textarea {
  display: block; width: 100%; min-height: 98px; resize: vertical;
  border: none; outline: none; background: var(--card); color: var(--ink);
  font-family: var(--sans); font-size: 14.5px; line-height: 1.62; padding: 13px 15px;
}
.ne-foot { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-top: 1px solid var(--line); }
.ne-foot .spacer { flex: 1; }
.ne-meta { font-size: 12px; color: var(--faint); }
.ne-del { color: #c0392b; border-color: rgba(192, 57, 43, .3); }

/* ==========================================================================
   首页 · 我的笔记本
   ========================================================================== */
.ep-notes-badge { color: var(--read); font-weight: 700; }

.notes-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.ns {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 16px 12px; text-align: center; box-shadow: var(--shadow-sm);
}
.ns-num { font-size: 26px; font-weight: 800; letter-spacing: -1px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ns-label { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ns-word .ns-num { color: var(--note-word); }
.ns-phrase .ns-num { color: var(--note-phrase); }
.ns-sentence .ns-num { color: var(--note-sentence); }

.notes-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.notes-toolbar .spacer { flex: 1; }
.hn-hint { font-size: 12.5px; color: var(--faint); }

.note-group {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 13px; overflow: hidden;
}
.ng-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  cursor: pointer; flex-wrap: wrap; transition: background .14s;
}
.ng-head:hover { background: var(--paper); }
.ng-arrow { display: inline-block; color: var(--faint); font-size: 12px; transition: transform .18s; }
.note-group.open .ng-arrow { transform: rotate(90deg); }
.ng-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.ng-sub { font-size: 12.5px; color: var(--faint); }
.ng-count {
  font-size: 12px; font-weight: 700; color: var(--read); background: var(--read-soft);
  padding: 3px 9px; border-radius: 999px;
}
.ng-act { font-size: 12.5px; font-weight: 600; color: var(--read); padding: 4px 8px; border-radius: 7px; }
.ng-act:hover { background: var(--read-soft); }
.ng-body { display: none; padding: 0 14px 14px; grid-template-columns: repeat(auto-fill, minmax(282px, 1fr)); gap: 11px; }
.note-group.open .ng-body { display: grid; }

.hn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(298px, 1fr)); gap: 12px; }
.hn-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--line-2); border-radius: 13px; padding: 13px 15px;
  box-shadow: var(--shadow-sm); transition: .15s;
}
.hn-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.hn-word { border-left-color: var(--note-word); }
.hn-phrase { border-left-color: var(--note-phrase); }
.hn-sentence { border-left-color: var(--note-sentence); }
.hn-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.hn-top .spacer { flex: 1; }
.hn-badge { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.hn-loc { font-size: 11.5px; color: var(--faint); }
.hn-go { font-size: 13px; color: var(--read); opacity: 0; transition: .15s; }
.hn-card:hover .hn-go { opacity: 1; }
.hn-text {
  font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--ink);
  line-height: 1.4; margin-bottom: 6px; word-break: break-word;
}
.hn-body { font-size: 13px; line-height: 1.62; color: var(--muted); white-space: pre-wrap; word-break: break-word; }

.notes-mod-empty {
  background: var(--card); border: 1px dashed var(--line-2);
  border-radius: var(--radius); padding: 42px 26px; text-align: center;
}
.nme-icon { font-size: 34px; margin-bottom: 10px; }
.notes-mod-empty h3 { margin: 0 0 10px; font-size: 19px; }
.notes-mod-empty p {
  margin: 0 auto 20px; max-width: 540px;
  font-size: 14px; line-height: 1.78; color: var(--muted);
}
.notes-mod-empty.small { padding: 22px; font-size: 13.5px; color: var(--muted); }
.notes-mod-empty.small a { color: var(--read); font-weight: 600; }

@media (max-width: 1080px) {
  .read-layout { grid-template-columns: minmax(0, 1fr); }
  .notes-panel { position: static; max-height: 480px; }
  .notes-lines { display: none !important; }
}
@media (max-width: 760px) {
  .ng-body, .hn-grid { grid-template-columns: minmax(0, 1fr); }
  .nf-text { max-width: 34vw; }
}
@media (max-width: 720px) {
  .notes-stats { grid-template-columns: repeat(2, 1fr); }
}

/* 提示条要盖在批注浮条 / 编辑浮窗上面，不然保存笔记时看不到反馈 */
.toast { z-index: 420; }

/* ==========================================================================
   模块卡片可点击（首页三张卡 + 本地工具卡）
   ========================================================================== */
a.mod {
  text-decoration: none; color: inherit; display: block; cursor: pointer;
}
.mod-go {
  display: inline-block; margin-top: 12px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  transition: color .15s;
}
a.mod:hover .mod-go { color: var(--ink); }
.mod-tool { border-style: dashed; }

/* ==========================================================================
   模块选集页（#/listen · #/read · #/practice 不带集号）
   ========================================================================== */
.mi-desc { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 4px 0 18px; }
.mi-list { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.mi-row {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; box-shadow: var(--shadow-sm); transition: .16s; cursor: pointer;
}
.mi-row:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.mi-locked { opacity: .72; }
.mi-num {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mi-body { flex: 1; min-width: 0; }
.mi-title { display: block; font-size: 16px; font-weight: 700; }
.mi-lock { font-size: 13px; }
.mi-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.mi-meta { display: flex; gap: 12px; font-size: 12px; color: var(--faint); margin-top: 6px; }
.mi-meta i { font-style: normal; display: inline-flex; align-items: center; gap: 3px; }
.mi-go { flex: none; font-size: 13px; font-weight: 700; color: var(--faint); transition: color .15s; }
.mi-row:hover .mi-go { color: var(--ink); }

/* ==========================================================================
   本地拼写工具（#/tool）
   ========================================================================== */
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); max-width: 860px;
}
.tool-privacy {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2);
  margin-bottom: 20px;
}
.tool-privacy b { color: var(--ink); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tool-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-align: center; padding: 24px 12px;
  border: 1.5px dashed var(--line-2); border-radius: 14px;
  cursor: pointer; transition: .16s; background: var(--paper);
}
.tool-drop:hover { border-color: var(--practice); background: var(--practice-soft); }
.tool-drop.has { border-style: solid; border-color: var(--success); background: #f0fdf4; }
.td-icon { font-size: 27px; }
.td-name { font-size: 14.5px; font-weight: 700; }
.td-hint { font-size: 12px; color: var(--faint); word-break: break-all; }
.tool-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tool-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.tool-actions button:disabled { opacity: .5; cursor: not-allowed; }
.tool-msg { font-size: 13.5px; color: var(--practice); font-weight: 600; }
.tool-tips { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.tool-tips p { margin: 0 0 7px; font-size: 13px; color: var(--muted); line-height: 1.65; }

@media (max-width: 640px) {
  .mi-row { padding: 12px 14px; gap: 12px; }
  .mi-go { display: none; }
  .tool-card { padding: 18px; }
}
