/* ==========================================================================
   沉浸式生活英语 · 站点样式 v2
   极简高级风：大留白、紧凑字距、发丝线、毛玻璃、克制配色。
   所有类名与 v1 保持一致，JS 逻辑零改动即可换肤。
   ========================================================================== */

:root {
  /* —— 底色与墨色 —— */
  --paper: #f5f5f7;
  --paper-2: #ececf0;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #515154;
  --muted: #86868b;
  --faint: #aeaeb2;
  --line: #e8e8ed;
  --line-2: #d2d2d7;

  /* —— 模块色：Apple 系统色，只做小面积点缀 —— */
  --listen: #0071e3;
  --listen-soft: #eaf3fe;
  --read: #5e5ce6;
  --read-soft: #efeffd;
  --practice: #c93400;
  --practice-soft: #fdf0e8;
  --watch: #e0345c;
  --watch-soft: #fdeef2;
  --success: #1d8127;

  --accent: #0071e3;
  --accent-hover: #0077ed;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow: 0 4px 16px rgba(0, 0, 0, .06), 0 12px 40px rgba(0, 0, 0, .05);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .14);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "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;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

/* 内联 SVG 图标：随字号缩放，颜色跟随文字 */
.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic svg { width: 1em; height: 1em; display: block; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 60px; display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.2px; font-size: 16px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  overflow: hidden; background: var(--paper-2); border: 1px solid var(--line);
}
.brand-mark img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 58% 50%;
}
.brand-sub { font-size: 10.5px; color: var(--muted); font-weight: 500; letter-spacing: 1.2px; }
.nav-spacer { flex: 1; }
.nav-link {
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 8px 13px; border-radius: 980px; transition: .18s;
  display: inline-flex; align-items: center; gap: 6px; opacity: .85;
}
.nav-link:hover { background: rgba(0, 0, 0, .045); color: var(--ink); opacity: 1; }
.nav-bili { box-shadow: none; }
.nav-bili:hover { background: rgba(0, 0, 0, .045); }

/* ---------- 首页 Hero：居中大标题 ---------- */
.hero { padding: 88px 0 64px; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .4px;
  color: var(--accent); background: var(--listen-soft);
  padding: 7px 15px; border-radius: 980px; margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px); line-height: 1.08; margin: 0 0 20px;
  letter-spacing: -.022em; font-weight: 700;
}
.hero h1 em { font-style: normal; }
.hero p {
  font-size: clamp(16px, 2vw, 21px); line-height: 1.55; color: var(--muted);
  max-width: 680px; margin: 0 auto 34px; letter-spacing: -.01em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 52px; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px; border-radius: 980px; border: 1px solid transparent;
  font-size: 16px; font-weight: 500; transition: .2s; white-space: nowrap;
  letter-spacing: -.01em;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 8px 24px rgba(0, 113, 227, .28); }
.btn-ghost { background: transparent; color: var(--accent); padding: 13px 18px; }
.btn-ghost:hover { text-decoration: underline; }
.btn-bili { background: transparent; color: var(--accent); padding: 13px 18px; box-shadow: none; }
.btn-bili:hover { text-decoration: underline; transform: none; }
.btn-sm { padding: 9px 20px; font-size: 14px; border-radius: 980px; }

.stats { display: flex; flex-wrap: wrap; justify-content: center; max-width: 760px; margin: 0 auto; }
.stats > div { padding: 0 34px; position: relative; }
.stats > div + div::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px; background: var(--line-2);
}
.stat-num { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 5px; }

/* ---------- 区块标题 ---------- */
.section { padding: 56px 0; }
.section-head { margin-bottom: 32px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; letter-spacing: -.02em; font-weight: 700; }
.section-head p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- 模块说明卡 ---------- */
.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: 30px 28px; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s;
}
.mod:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.mod-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 21px; margin-bottom: 18px;
}
.mod h3 { margin: 0 0 9px; font-size: 18px; letter-spacing: -.01em; }
.mod p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.mod-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 980px;
  background: var(--paper); color: var(--ink-2); border: 1px solid var(--line);
}
.mod-go {
  display: inline-block; margin-top: 14px;
  font-size: 13.5px; font-weight: 600; color: var(--accent);
  transition: .15s;
}
a.mod:hover .mod-go { text-decoration: underline; }

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

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

.ep-cover {
  position: relative; aspect-ratio: 16 / 8.6; padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer; overflow: hidden; isolation: isolate;
}
.ep-cover::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,.34) 100%);
}
.ep-tag {
  position: absolute; top: 14px; left: 18px; z-index: 1;
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
  color: rgba(255, 255, 255, .94);
  background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .28);
  padding: 4px 10px; border-radius: 980px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-variant-numeric: tabular-nums;
}
.ep-cover-zh { color: #fff; font-size: 23px; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 1px 10px rgba(0,0,0,.3); }
.ep-cover-en { color: rgba(255, 255, 255, .85); font-size: 12px; font-weight: 500; letter-spacing: .6px; margin-top: 4px; }
.ep-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.9);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .96); color: var(--ink);
  display: grid; place-items: center; font-size: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0; transition: .25s; z-index: 2;
}
.ep-card:hover .ep-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.ep-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.ep-feature { font-size: 13.5px; line-height: 1.65; color: var(--muted); margin: 0 0 16px; flex: 1; }
.ep-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--faint); margin-bottom: 14px; }
.ep-meta span { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }

.ep-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ep-act {
  border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm);
  padding: 10px 4px; font-size: 12px; font-weight: 500; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; gap: 5px; transition: .18s;
}
.ep-act .ic { font-size: 17px; }
.ep-act:hover { border-color: var(--line-2); background: var(--card); transform: translateY(-1px); }
.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: 4px; background: var(--paper-2); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.ep-progress i { display: block; height: 100%; background: var(--success); border-radius: 3px; }

/* ---------- B 站区块：深色优雅卡片 ---------- */
.bili-band {
  border-radius: 24px; padding: 56px clamp(28px, 5vw, 64px); color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(140deg, #1d1d1f 0%, #2c2c2e 60%, #3a3a3c 100%);
  box-shadow: var(--shadow); text-align: center;
}
.bili-band::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 90% at 85% 10%, rgba(224, 52, 92, .26), transparent 60%),
    radial-gradient(50% 80% at 10% 90%, rgba(0, 113, 227, .22), transparent 60%);
  pointer-events: none;
}
.bili-band h2 { margin: 0 0 14px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; font-weight: 700; position: relative; }
.bili-band p { margin: 0 auto 28px; font-size: 16px; line-height: 1.65; max-width: 640px; color: rgba(255,255,255,.72); position: relative; }
.bili-actions { display: flex; flex-wrap: wrap; gap: 14px; position: relative; z-index: 1; justify-content: center; }
.btn-white { background: #fff; color: var(--ink); font-weight: 600; }
.btn-white:hover { box-shadow: 0 8px 24px rgba(255,255,255,.2); }
.btn-outline-white { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,.18); text-decoration: none; }

/* ==========================================================================
   剧集内页通用
   ========================================================================== */
.ep-header { background: rgba(255,255,255,.72); border-bottom: 1px solid var(--line); padding: 26px 0 0;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.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: 500;
  color: var(--muted); background: var(--paper); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 980px; transition: .16s; margin-top: 2px;
}
.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: 600; letter-spacing: 1.2px; color: var(--muted); }
.ep-header-title h1 { margin: 6px 0 4px; font-size: 30px; letter-spacing: -.02em; font-weight: 700; }
.ep-header-title h1 small { font-weight: 400; color: var(--muted); font-size: 14px; letter-spacing: 0; margin-left: 12px; }

.module-tabs { display: flex; gap: 4px; margin-top: 22px; overflow-x: auto; }
.module-tab {
  border: none; background: transparent; padding: 12px 18px 14px; font-size: 14.5px; font-weight: 500;
  color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; transition: .16s;
  display: inline-flex; align-items: center; gap: 8px;
}
.module-tab .ic { font-size: 16px; }
.module-tab:hover { color: var(--ink); }
.module-tab.active { color: var(--ink); font-weight: 600; }
.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: 34px 0 80px; }

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

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

.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  padding: 8px 14px; border-radius: 980px; font-size: 13px; font-weight: 500; transition: .16s;
  display: inline-flex; align-items: center; gap: 7px;
}
.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); border-radius: 980px; padding: 3px; }
.stepper button {
  border: none; background: transparent; min-width: 30px; height: 28px; border-radius: 980px;
  font-size: 14px; color: var(--ink-2); font-weight: 600; padding: 0 8px;
}
.stepper button:hover { background: var(--card); }
.stepper span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 36px; text-align: center; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   听力模块
   ========================================================================== */
.listen-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@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: 88px; }
}

.player-card {
  background: #000; border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.player-screen {
  aspect-ratio: 16 / 10; position: relative; display: grid; place-items: center;
  padding: 30px 34px; text-align: center;
  background:
    radial-gradient(110% 85% at 50% 108%, rgba(0, 113, 227, .20), transparent 60%),
    linear-gradient(165deg, #1c1c1e, #000 72%);
}
.screen-inner { position: relative; z-index: 1; width: 100%; }
.screen-en {
  color: #fff; font-weight: 600; line-height: 1.32; letter-spacing: -.015em;
  font-size: clamp(20px, 2.3vw, 30px); transition: font-size .15s;
}
.screen-en .hl { color: #7cc4ff; }
.screen-zh {
  color: rgba(255, 255, 255, .68); font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.6; margin-top: 14px; font-weight: 400;
}
.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: 5px; height: 36px; margin-top: 26px; }
.player-bars i {
  display: block; width: 3px; border-radius: 2px; height: 6px;
  background: rgba(255, 255, 255, .2); transition: background .25s;
}
.player-card.playing .player-bars i {
  background: #0a84ff; 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: 6px; } to { height: 30px; } }

.player-controls { padding: 18px 22px 20px; background: #101012; border-top: 1px solid rgba(255,255,255,.07); }
.scrub-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.scrub-time { font-size: 12px; color: rgba(255,255,255,.55); 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: 4px; width: 100%; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
.scrub-fill { height: 100%; width: 0; background: #0a84ff; border-radius: 3px; }
.scrub:hover .scrub-handle { opacity: 1; }
.scrub-handle {
  position: absolute; width: 12px; height: 12px; 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,.08); color: #fff; border-radius: 980px;
  min-width: 42px; height: 42px; padding: 0 14px; font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: .16s;
}
.ctrl-btn:hover { background: rgba(255,255,255,.16); }
.ctrl-btn.main { background: #fff; color: #000; min-width: 56px; font-size: 16px; }
.ctrl-btn.main:hover { background: rgba(255,255,255,.85); }
.ctrl-btn.on { background: #0a84ff; color: #fff; }
.ctrl-btn small { font-size: 11.5px; font-weight: 600; }
.ctrl-spacer { flex: 1; }
.speed-select {
  background: rgba(255,255,255,.08); color: #fff; border: none; border-radius: 980px;
  height: 42px; padding: 0 12px; font-size: 13px; font-weight: 500; 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: 15px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink); position: sticky; top: 0; background: var(--card); z-index: 2;
}
.subs-head .count { font-weight: 400; 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: 12px 16px; border-radius: var(--radius-sm); 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: 15px; line-height: 1.5; color: var(--ink); font-family: var(--serif); letter-spacing: -.005em; }
.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; }

/* 控制条第二排：字幕字号 + 快捷键提示 */
.ctrl-row-2 { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.ctrl-label { font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, .55); }
.ctrl-hint { flex: 1; text-align: right; font-size: 12.5px; color: rgba(255, 255, 255, .42); }
.ctrl-hint .key { background: rgba(255, 255, 255, .12); border: none; color: rgba(255, 255, 255, .78); }
.stepper-dark { background: rgba(255, 255, 255, .08); }
.stepper-dark button { color: #fff; }
.stepper-dark button:hover { background: rgba(255, 255, 255, .16); }
.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: #000;
}
.player-card:-webkit-full-screen {
  border-radius: 0; display: flex; flex-direction: column; justify-content: center;
  background: #000;
}
.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: 52px; }
.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-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: 20px;
  box-shadow: var(--shadow-sm); padding: 52px clamp(24px, 5vw, 72px);
  max-width: 860px; margin: 0 auto;
  --read-en: 20px;
  --read-zh: 15px;
  --read-lh: 1.65;
}
.read-line { margin-bottom: 28px; 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: -.008em;
}
.read-zh {
  color: var(--muted); margin-top: 8px;
  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; }
body.hide-zh .screen-zh { display: none; }
.read-line:hover .read-en { color: var(--read); }
.read-line .idx {
  position: absolute; left: -48px; top: .5em; font-size: 11.5px; font-weight: 600;
  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: 44px; padding-top: 28px;
  border-top: 1px solid var(--line);
}

/* 阅读工具栏吸顶 */
.read-sticky {
  position: sticky; top: 60px; z-index: 55;
  padding: 10px 0 12px; margin-bottom: 8px;
  background: var(--paper);
}
.read-sticky .read-progress { margin-bottom: 10px; }
.read-sticky .toolbar { margin-bottom: 0; }

/* ==========================================================================
   拼写模块
   ========================================================================== */
.practice-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-sm); padding: 30px clamp(20px, 4vw, 44px) 32px; position: relative;
}
.practice-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.progress-pill {
  font-size: 13px; font-weight: 600; background: var(--practice-soft); color: var(--practice);
  padding: 7px 14px; border-radius: 980px; font-variant-numeric: tabular-nums;
}
.practice-timer {
  font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 980px; 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: 500; line-height: 1.5;
  margin: 32px auto 20px; max-width: 900px; transition: font-size .15s; letter-spacing: -.01em;
}
.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: 3px; height: 6px; border-radius: 2px; 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: 6px 20px; border-radius: var(--radius-sm); 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: 28px 12px; min-height: 190px; margin-bottom: 20px;
}
.word-input {
  border: none; border-bottom: 2px dashed var(--line-2); background: transparent;
  font-family: var(--serif); font-weight: 600; text-align: center; color: var(--ink);
  padding: 0 4px; border-radius: 0; transition: border-color .2s, color .2s;
  /* width 只量文字内容：全局是 border-box，padding 会吃掉量好的宽度，
     衬线体在 Mac 上又比量尺用的无衬线体宽，两笔误差一叠，m 多的词就装不下了 */
  box-sizing: content-box;
}
.word-input:focus { border-bottom-color: var(--practice); border-bottom-style: solid; outline: none; }
.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); color: var(--ink-2); padding: 3px 9px; border-radius: 7px;
  font-weight: 600; border: 1px solid var(--line); font-size: 12px;
}

.practice-nav { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.done-banner {
  text-align: center; padding: 40px 24px; background: var(--practice-soft);
  border-radius: var(--radius); color: var(--practice); margin-top: 22px;
}
.done-banner h3 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.02em; }
.done-banner p { margin: 0 0 20px; color: var(--ink-2); font-size: 15px; }

/* 拼写模块 · 字号 + 可折叠字幕列表 */
.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 8px; border-radius: 980px;
}
.chip-script.active { background: var(--practice); border-color: var(--practice); color: #fff; }
.chip-script.active b { background: rgba(255, 255, 255, .26); color: #fff; }

/* 拼写模块 · 记笔记按钮 */
.chip-note-btn b {
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--read-soft); color: var(--read);
  padding: 2px 8px; border-radius: 980px;
}
.chip-note-btn.has-note { border-color: var(--read); color: var(--read); }
.chip-note-btn.has-note b { background: var(--read); color: #fff; }

.script-panel {
  display: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 22px;
}
.script-panel.show { display: block; }
.script-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px;
  border-bottom: 1px solid var(--line); background: var(--paper); flex-wrap: wrap;
}
.script-head .spacer { flex: 1; }
.script-title { font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.script-head .count { font-size: 12.5px; font-weight: 400; 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: 11px 14px;
  border-radius: var(--radius-sm); 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: 600;
  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: 15px; 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); }
/* 这一句有笔记：右上角小圆点 */
.si-note-dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--read); margin-top: 7px; display: none;
}
.script-item.has-note .si-note-dot { display: block; }

/* ==========================================================================
   视频模块
   ========================================================================== */
.watch-frame {
  border-radius: 22px; 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, #1c1c1e, #000); text-align: center; padding: 30px;
}
.watch-fallback.show { display: flex; }
.watch-info { margin-top: 24px; display: grid; gap: 18px; }
@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: 26px 28px; box-shadow: var(--shadow-sm);
}
.info-card h3 { margin: 0 0 12px; font-size: 17px; letter-spacing: -.01em; }
.info-card p { margin: 0 0 14px; font-size: 14.5px; 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: 70px 20px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: rgba(29, 29, 31, .92); color: #fff; padding: 13px 24px; border-radius: 980px;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: .25s; z-index: 420; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  max-width: calc(100vw - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 40px 0 52px; margin-top: 48px;
  font-size: 13.5px; color: var(--muted); background: var(--paper);
}
.footer-flex { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 20px; 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: #c7c7cc; 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: rgba(0, 113, 227, .18); }

/* ==========================================================================
   访问密码门禁（受保护模式 + 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(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: gate-in .22s ease-out;
}
@keyframes gate-in { from { opacity: 0; } to { opacity: 1; } }

.gate-card {
  background: var(--card); border-radius: 22px; padding: 38px 32px 28px;
  width: 100%; max-width: 400px; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: gate-card-in .3s cubic-bezier(.2, .9, .3, 1.05);
}
@keyframes gate-card-in { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

.gate-lock { font-size: 30px; line-height: 1; margin-bottom: 14px; color: var(--ink); display: flex; justify-content: center; }
.gate-card h2 { font-size: 22px; margin: 0 0 8px; color: var(--ink); letter-spacing: -.02em; }
.gate-card > p { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0 0 24px; }

#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); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px; outline: none; transition: border-color .18s, background .18s;
}
#gate-pass:focus { border-color: var(--accent); background: #fff; }
#gate-btn {
  flex: 0 0 auto; font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: #fff; background: var(--accent); border: none; border-radius: 980px;
  padding: 13px 26px; cursor: pointer; transition: .18s;
}
#gate-btn:hover { background: var(--accent-hover); }
#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: 500;
}
.gate-bili:hover { text-decoration: underline; }

/* 首页：锁住的集 */
.ep-lock {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  font-size: 13px; line-height: 1; color: #fff;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 7px 9px; border-radius: 980px; display: inline-flex;
}
.ep-cover { position: relative; }
.ep-play { z-index: 2; }
.ep-card-locked .ep-cover { filter: saturate(.6) brightness(.92); }
.ep-locked-tag {
  color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); padding: 2px 9px; border-radius: 980px; font-size: 11.5px;
}

/* 首页英雄区：免费集数提示 */
.hero-note {
  display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
  margin: -30px 0 40px; padding: 10px 20px;
  font-size: 13.5px; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line); border-radius: 980px;
  box-shadow: var(--shadow-sm);
}
.hero-note a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.hero-note a:hover { text-decoration: underline; }

/* 受保护模式：权限不够时的提示面板 */
.locked-panel {
  max-width: 560px; margin: 60px auto; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 52px 34px; box-shadow: var(--shadow-sm);
}
.locked-icon { font-size: 34px; line-height: 1; margin-bottom: 16px; color: var(--ink-2); display: flex; justify-content: center; }
.locked-panel h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.02em; }
.locked-panel p { margin: 0 0 26px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.locked-panel p b { color: var(--practice); }
.locked-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ==========================================================================
   阅读模块 · 批注与笔记本
   ========================================================================== */

:root {
  --note-word: #b26a00;
  --note-phrase: #0f766e;
  --note-sentence: #5e5ce6;
}

.read-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  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; }
.read-layout .read-card { max-width: none; margin: 0; padding: 44px 48px 44px 62px; }
.read-layout .read-line { scroll-margin-top: 178px; }

/* ---------- 正文里的标注 ---------- */
.nw { border-radius: 4px; transition: background .14s; }
.nw-word { background: rgba(178, 106, 0, .12); box-shadow: inset 0 -2px 0 rgba(178, 106, 0, .5); }
.nw-phrase { background: rgba(15, 118, 110, .1); box-shadow: inset 0 -2px 0 rgba(15, 118, 110, .45); }
.nw.sel { background: rgba(94, 92, 230, .22); box-shadow: inset 0 -2px 0 var(--read); }
.nw.hl { outline: 2px solid rgba(178, 106, 0, .4); outline-offset: 1px; }

.read-line.has-sentnote {
  background: linear-gradient(90deg, rgba(94, 92, 230, .07), rgba(94, 92, 230, 0) 70%);
  border-radius: 10px;
}
.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: .55;
}
.read-layout.annotating .nw { cursor: pointer; }
/* 听力黑底屏幕上的批注词：同一种选中手感，hover 给一点反馈 */
.screen-en.annotating .nw { cursor: pointer; border-radius: 4px; transition: background .14s; }
.screen-en.annotating .nw:hover { background: rgba(255, 255, 255, .1); }
.screen-en.annotating .nw.sel:hover { background: rgba(94, 92, 230, .3); }
.read-layout.annotating .nw:hover { background: rgba(94, 92, 230, .15); }
.read-layout.annotating .read-line .idx {
  opacity: .55; cursor: pointer; padding: 1px 5px; border-radius: 6px; 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(94, 92, 230, .25); }
}
.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: .75; }
.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: 92px;
  max-height: calc(100vh - 118px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-sm);
}
.notes-head { padding: 14px 15px 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.notes-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px;
}
.notes-scope {
  font-size: 11.5px; font-weight: 600; color: var(--read); background: var(--read-soft);
  padding: 3px 9px; border-radius: 980px;
}
.notes-filter { width: 100%; }
.notes-filter button { flex: 1; padding: 6px 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: var(--radius-sm); padding: 11px 13px; 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: 600; 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 5px; border-radius: 6px; 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: 24px 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: 16px;
  box-shadow: var(--shadow-lg); padding: 11px 13px;
  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: 600; padding: 6px 11px;
  border-radius: 980px; white-space: nowrap; color: var(--ink-2); background: var(--paper-2);
}
.nf-word { background: rgba(178, 106, 0, .12); color: var(--note-word); }
.nf-phrase { background: rgba(15, 118, 110, .12); color: var(--note-phrase); }
.nf-sentence { background: rgba(94, 92, 230, .12); 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: 16px; box-shadow: var(--shadow-lg);
}
.ne-head {
  display: flex; align-items: center; gap: 9px; padding: 12px 15px;
  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: 14px 16px;
}
.ne-foot { display: flex; align-items: center; gap: 9px; padding: 11px 15px; 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); }

/* 拼写 · 选词记笔记：单词做成可点选的小块，跟阅读批注同一种手感 */
.wp-words {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline;
  padding: 16px; max-height: 230px; overflow-y: auto;
  font-family: var(--serif); font-size: 16.5px; line-height: 2;
}
.wp-w {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 8px; padding: 2px 10px; font-size: inherit; transition: .14s;
}
.wp-w:hover { border-color: var(--line-2); }
.wp-w.sel {
  background: rgba(94, 92, 230, .14); border-color: var(--read);
  box-shadow: inset 0 -2px 0 var(--read);
}
.wp-s { color: var(--muted); padding: 0 1px; }

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

.notes-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 22px; }
.ns {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 12px; text-align: center; box-shadow: var(--shadow-sm);
}
.ns-num { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ns-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.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: 15px 20px;
  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: 15.5px; font-weight: 600; color: var(--ink); }
.ng-sub { font-size: 12.5px; color: var(--faint); }
.ng-count {
  font-size: 12px; font-weight: 600; color: var(--read); background: var(--read-soft);
  padding: 3px 10px; border-radius: 980px;
}
.ng-act { font-size: 12.5px; font-weight: 500; 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: 14px; padding: 14px 16px;
  box-shadow: var(--shadow-sm); transition: .15s;
}
.hn-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.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: 600; 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: 48px 28px; text-align: center;
}
.nme-icon { font-size: 30px; margin-bottom: 12px; color: var(--faint); display: flex; justify-content: center; }
.notes-mod-empty h3 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.01em; }
.notes-mod-empty p {
  margin: 0 auto 22px; max-width: 540px;
  font-size: 14px; line-height: 1.78; color: var(--muted);
}
.notes-mod-empty.small { padding: 24px; 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); }
}

/* ==========================================================================
   模块选集页（#/listen · #/read · #/practice 不带集号）
   ========================================================================== */
.mi-desc { color: var(--muted); font-size: 15.5px; line-height: 1.7; margin: 4px 0 20px; }
.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: 16px;
  padding: 15px 20px; 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: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: #fff;
}
.mi-body { flex: 1; min-width: 0; }
.mi-title { display: block; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.mi-lock { font-size: 13px; }
.mi-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.mi-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--faint); margin-top: 7px; }
.mi-meta i { font-style: normal; display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.mi-go { flex: none; font-size: 13px; font-weight: 500; 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: 30px; box-shadow: var(--shadow-sm); max-width: 860px;
}
.tool-privacy {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2);
  margin-bottom: 22px;
}
.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: 6px;
  text-align: center; padding: 26px 12px;
  border: 1.5px dashed var(--line-2); border-radius: 16px;
  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: 26px; color: var(--muted); display: flex; }
.td-name { font-size: 14.5px; font-weight: 600; }
.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: 22px; 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: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.tool-tips p { margin: 0 0 8px; font-size: 13px; color: var(--muted); line-height: 1.65; }

@media (max-width: 640px) {
  .mi-row { padding: 13px 15px; gap: 12px; }
  .mi-go { display: none; }
  .tool-card { padding: 20px; }
  .hero { padding: 64px 0 48px; }
  .stats > div { padding: 0 20px; }
  .site-header .wrap { gap: 2px; }
  .nav-link { padding: 8px 9px; font-size: 13px; }
  .brand-sub { display: none; }
}
