/* ===================== 公版英语原著阅读 · 精简样式 ===================== */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-soft: #e8f0fe;
  --border: #e5e7eb;
  --pd: #b45309;       /* 公版 主题色（琥珀/棕色，呼应"古典"） */
  --pd-soft: #fef3c7;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary); text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;   /* 标题栏锁定：滚动页面时始终固定在顶部 */
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.site-header .wrap { padding-top: 13px; padding-bottom: 13px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { font-size: 24px; }
.brand > div { display: flex; align-items: baseline; gap: 0; }
.brand h1 { margin: 0; font-size: 16px; }
.tagline { margin: 0; color: var(--muted); font-size: 11px; }
.tagline::before { content: "·"; margin: 0 10px; color: var(--muted); }

/* ---------- 公版横幅 ---------- */
.public-domain-banner {
  background: var(--pd-soft);
  border-bottom: 1px solid #fde68a;
  color: #78350f;
  font-size: 14px;
}
.public-domain-banner .wrap { padding: 10px 20px; display: flex; align-items: center; gap: 10px; }
.pd-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pd); color: #fff; font-weight: 700; font-size: 12px;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: none;
}
.pd-badge.small { font-size: 11px; padding: 1px 7px; }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  margin: 22px 0 0;
  position: sticky;                 /* 随标题栏一起锁定 */
  top: var(--sticky-h, 74px);       /* 高度由 JS 动态测量标题栏得到 */
  z-index: 29;
  background: var(--bg);
  padding-bottom: 10px;
}
.level-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; transition: .15s;
}
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.search-box input {
  width: 240px; max-width: 60vw; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 14px; outline: none;
}
.search-box input:focus { border-color: var(--primary); }

.book-count {
  color: var(--muted); font-size: 13px;
  margin: 0 0 14px;
  position: sticky;                 /* 跟在标题栏+等级栏下方一起锁定 */
  top: var(--sticky-h2, 116px);
  z-index: 28;
  background: var(--bg);
  padding: 0 0 8px;
}

/* ---------- Book grid ---------- */
/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 26px 0 8px; }
.pager button {
  min-width: 36px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font-size: 14px; cursor: pointer; transition: all .15s;
}
.pager button:hover:not(:disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .ellipsis { color: var(--muted); padding: 0 2px; user-select: none; }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.book-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; cursor: pointer; transition: .15s; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; position: relative;
  transform: scale(0.9); transform-origin: center top;
}
.book-card:hover { transform: translateY(-3px) scale(0.9); border-color: var(--primary); }
/* 书形封面：高:宽 = 1.2:1；上40%羊皮纸米白，下60%赭石（方案2·暖古典）；书名从 30% 高度处起 */
.book-shape {
  position: relative; width: 100%; aspect-ratio: 1 / 1.2; border-radius: 6px;
  border: 1px solid rgba(120,90,40,.30); overflow: hidden;
  background: linear-gradient(to bottom, #f6efe0 0%, #f6efe0 40%, #d8c6a0 40%, #d8c6a0 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.02);
}
/* 左侧书脊高光，增加"书"的质感 */
.book-shape::before {
  content: ""; position: absolute; top: 0; left: 0; width: 10px; height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,.10), rgba(0,0,0,0));
}
/* 40% 接缝赭石细线，强化"封面/封底"分界 */
.book-shape::after {
  content: ""; position: absolute; top: 40%; left: 0; right: 0; height: 1px;
  background: rgba(120,90,40,.28);
}
.book-title-on-cover {
  position: absolute; top: 30%; left: 0; right: 0; padding: 0 10%;
  text-align: center; font-family: 'Noto Serif SC', 'Songti SC', Georgia, 'Times New Roman', serif;
  word-break: break-word;
}
.book-title-on-cover .en { font-size: 15px; font-weight: 600; color: #3a2f1c; line-height: 1.25; }
.book-title-on-cover .zh { font-size: 14px; color: #5a4a30; margin-top: 4px; line-height: 1.3; }
.book-author { color: var(--muted); font-size: 13px; margin: 0; }
.book-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.book-level { font-size: 12px; color: var(--muted); }
.card-pd { position: absolute; top: 10px; right: 10px; }
.empty-hint { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--border); }
.site-footer .wrap { padding: 18px 20px; color: var(--muted); font-size: 13px; }
.site-footer p { margin: 4px 0; }
.icp .placeholder { color: #9aa3ad; }
a.beian-ga { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.beian-icon { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }

/* ---------- Reader ---------- */
.reader-page { background: var(--surface); }
.reader-header { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.reader-header-inner { display: flex; align-items: center; gap: 16px; padding: 12px 20px; }
.back-link { font-size: 14px; flex: none; }
.reader-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.book-cover-mini { font-size: 28px; }
.reader-title h1 { font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-meta { margin: 0; color: var(--muted); font-size: 12px; }
.reader-tools { display: flex; gap: 8px; flex: none; }
.tool-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.tool-btn.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

.reader-main { max-width: 760px; padding-top: 20px; padding-bottom: 90px; }

/* 底部翻页条 */
.reader-pager {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 10px 16px; box-shadow: 0 -2px 10px rgba(0,0,0,.05);
}
.reader-pager[hidden] { display: none; }
.pg-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: .15s;
}
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-info { font-size: 14px; color: var(--muted); min-width: 70px; text-align: center; }

/* 目录侧栏 */
.toc-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 40; }
.toc-overlay[hidden] { display: none; }
.toc-panel {
  position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 82vw; z-index: 41;
  background: var(--surface); box-shadow: 2px 0 24px rgba(0,0,0,.18);
  transform: translateX(-100%); transition: transform .22s ease; display: flex; flex-direction: column;
}
.toc-panel.open { transform: translateX(0); }
.toc-panel[hidden] { display: none; }
.toc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border); flex: none;
}
.toc-title { font-size: 16px; font-weight: 700; }
.toc-close { border: none; background: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.toc-list { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; flex: 1; }
.toc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 18px; cursor: pointer; font-size: 14px; border-left: 3px solid transparent; transition: .12s;
}
.toc-item:hover { background: var(--primary-soft); border-left-color: var(--primary); }
.toc-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-page { color: var(--muted); font-size: 12px; flex: none; }
.toc-empty { padding: 16px 18px; color: var(--muted); font-size: 14px; }

/* 故事集模式：标题两行（英文 + 中文），英文粗、中文灰小 */
.toc-item-story { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 12px; padding-bottom: 12px; }
.toc-item-story .toc-page { align-self: flex-end; margin-top: -16px; }
.toc-name-en { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-name-zh { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-hint { background: var(--pd-soft); color: #78350f; font-size: 13px; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; }
.reader-content { font-size: 18px; }
.para { margin: 0 0 18px; }
.para .en { font-family: Georgia, "Times New Roman", serif; line-height: 1.8; text-align: justify; white-space: pre-line; }
.para .en .word { cursor: pointer; }
.para .en .word:hover { background: var(--primary-soft); }
.para .zh { color: var(--muted); font-size: 15px; margin-top: 4px; white-space: pre-line; }
/* 译文/解析开关：hide-zh、hide-analysis 加在祖先 .reader-content 上 */
.reader-content.hide-zh .zh { display: none; }
.reader-content.hide-analysis .analysis { display: none; }

/* 解析块 */
.analysis { margin: 8px 0 0; padding: 10px 14px; background: #f8fafc; border-left: 3px solid var(--primary); border-radius: 6px; font-size: 14px; }
.analysis .a-item { margin: 4px 0; }
.analysis .a-term { font-weight: 600; color: #0f172a; }
.analysis .a-type { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; margin-right: 6px; }
.analysis .a-type.vocab { background: #dbeafe; color: #1d4ed8; }
.analysis .a-type.sentence { background: #dcfce7; color: #15803d; }
.analysis .a-note { color: #334155; }

/* 章节标题 */
.chapter-title { margin: 30px 0 14px; font-size: 17px; color: var(--primary); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
/* 故事集：章内标题两行（英文 + 中文翻译） */
.chapter-title-story { font-size: 17px; line-height: 1.4; }
.chapter-title-story .chapter-title-en { font-weight: 700; }
.chapter-title-story .chapter-title-zh { font-size: 14px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* ---------- Dictionary modal ---------- */
.dict-modal { position: fixed; inset: 0; background: rgba(15,23,42,.35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.dict-modal[hidden] { display: none; }
.dict-card {
  background: var(--surface); border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.2);
  max-width: 420px; width: 100%; padding: 22px; position: relative; max-height: 80vh; overflow: auto;
}
.dict-close { position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.dict-word-row { display: flex; align-items: center; gap: 8px; }
.dict-word { font-size: 22px; font-weight: 700; }
.dict-speak { flex: none; border: none; background: none; cursor: pointer; font-size: 17px; line-height: 1; padding: 2px 4px; border-radius: 6px; opacity: .65; transition: .12s; }
.dict-speak:hover { opacity: 1; background: var(--primary-soft); transform: scale(1.12); }
.dict-speak:active { transform: scale(.94); }
.dict-phon { color: var(--muted); margin: 2px 0 8px; }
.dict-pos { display: inline-block; background: var(--primary-soft); color: var(--primary); font-size: 12px; padding: 1px 8px; border-radius: 6px; margin-bottom: 8px; }
.dict-meaning { font-size: 16px; margin-bottom: 10px; white-space: pre-line; }
.dict-defs { font-size: 14px; margin-bottom: 10px; }
.dict-defs .def { display: block; margin: 6px 0; line-height: 1.6; }
.dict-defs .def .pos { font-weight: 700; margin-right: 6px; padding: 0 2px; border-radius: 4px; }
/* 不同词性不同颜色（加粗 + 彩色），便于一眼区分多词性 */
.dict-defs .def .pos.pos--n      { color: #1d4ed8; }
.dict-defs .def .pos.pos--v      { color: #15803d; }
.dict-defs .def .pos.pos--adj    { color: #c2410c; }
.dict-defs .def .pos.pos--adv    { color: #be123c; }
.dict-defs .def .pos.pos--prep   { color: #0e7490; }
.dict-defs .def .pos.pos--conj   { color: #4f46e5; }
.dict-defs .def .pos.pos--pron   { color: #92400e; }
.dict-defs .def .pos.pos--int    { color: #a21caf; }
.dict-defs .def .pos.pos--abbr   { color: #475569; }
.dict-defs .def .pos.pos--art    { color: #64748b; }
.dict-defs .def .pos.pos--det    { color: #64748b; }
.dict-defs .def .pos.pos--num    { color: #7c3aed; }
.dict-defs .def .pos.pos--phrase { color: #0d9488; }
.dict-defs .def .pos.pos--other  { color: var(--primary); }
.dict-examples { font-size: 13px; color: #475569; }
.dict-examples .ex { margin: 4px 0; }
.dict-source { margin-top: 12px; font-size: 11px; color: #9aa3ad; }

@media (max-width: 600px) {
  .reader-header-inner { flex-wrap: wrap; }
  .reader-tools { order: 3; width: 100%; }
  .reader-content { font-size: 17px; }
}

/* ===== 本地书架（localStorage，不收集个人信息，零备案风险） ===== */
/* hidden 属性必须压过任何 display:flex/grid 声明（否则设了 hidden 的书架区仍会显示） */
[hidden] { display: none !important; }
.tabs { display: flex; gap: 8px; margin: 18px 0 6px; }
.tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; transition: .15s;
}
.tab.active { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.tab-n {
  display: inline-block; min-width: 18px; text-align: center;
  background: var(--primary); color: #fff; border-radius: 999px;
  padding: 0 6px; font-size: 12px; line-height: 18px; margin-left: 4px;
}
.mine-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
.clear-btn {
  border: 1px solid #c0392b; color: #c0392b; background: var(--surface);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; transition: .15s;
}
.clear-btn:hover { background: #c0392b; color: #fff; }
/* 书架按钮 */
.shelf-toggle {
  margin-top: 2px; width: 100%; border: 1px solid var(--primary); color: var(--primary);
  background: var(--surface); border-radius: 8px; padding: 7px 0; font-size: 13px;
  font-weight: 600; text-align: center; cursor: pointer; transition: .15s;
}
.shelf-toggle:hover { background: var(--primary); color: #fff; }
.shelf-toggle.added { background: var(--primary); color: #fff; border-color: var(--primary); }
.shelf-toggle.added:hover { background: #5e3814; }
/* 我的书架·进度角标（书籍右上角） */
.progress-badge {
  position: absolute; top: 16px; right: 10px;
  background: rgba(58,47,28,.92); color: #f3e7d3;
  font-size: 11px; font-weight: 600; line-height: 1.5;
  padding: 2px 8px; border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); pointer-events: none;
}
.mine-toolbar .book-count { margin: 0; }

/* ===================== 词汇量测试（vocabgame.js） ===================== */
.vg-loading { color: var(--muted); padding: 24px 2px; }

.vg-start {
  max-width: 520px; margin: 14px auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 28px; text-align: center;
}
.vg-emoji { font-size: 40px; }
.vg-start h3 { margin: 8px 0 4px; font-size: 22px; }
.vg-sub { color: var(--muted); margin: 0 0 16px; }
.vg-rules {
  text-align: left; margin: 0 auto 20px; padding-left: 20px; color: var(--text);
  max-width: 420px; line-height: 2;
}
.vg-rules b { color: var(--primary); }
.vg-start-btn { font-size: 16px; padding: 12px 30px; }
.vg-last {
  background: var(--primary-soft); color: var(--primary); font-size: 13.5px;
  border-radius: 10px; padding: 8px 12px; margin-bottom: 18px;
}
.vg-last b { font-weight: 700; }

.vg-game {
  max-width: 560px; margin: 14px auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px 26px;
}
.vg-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--muted); margin-bottom: 10px;
}
.vg-progress b { color: var(--text); font-size: 16px; }
.vg-timer {
  font-variant-numeric: tabular-nums; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: 3px 10px; border-radius: 999px;
}
.vg-timer.danger { color: #fff; background: #dc2626; }
.vg-exit {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 8px; padding: 4px 12px; cursor: pointer; font-size: 13px;
}
.vg-exit:hover { border-color: #dc2626; color: #dc2626; }
.vg-streak { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 4px; }
.vg-sub2 { font-size: 12px; }

.vg-word-wrap {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 14px 0 22px;
}
.vg-word {
  font-size: 38px; font-weight: 800; letter-spacing: .5px; color: var(--text);
  text-align: center; line-height: 1.2;
}
.vg-speak {
  border: none; background: var(--primary-soft); color: var(--primary); border-radius: 50%;
  width: 38px; height: 38px; font-size: 18px; cursor: pointer; flex: none;
}
.vg-speak:hover { background: #dde7ff; }

.vg-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.vg-opt {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 10px; padding: 16px 14px; font-size: 16px; cursor: pointer;
  text-align: center; transition: border-color .15s, background .15s;
  min-height: 56px;
}
.vg-opt:hover:not(:disabled) { border-color: var(--primary); background: #f5f8ff; }
.vg-opt:disabled { cursor: default; }
.vg-opt.right { border-color: #16a34a; background: #eafaf0; color: #16a34a; font-weight: 700; }
.vg-opt.wrong { border-color: #dc2626; background: #fdecec; color: #dc2626; }
/* 「我没见过这个词」：占满一行，样式上区别于普通释义 */
.vg-opt.unknown {
  grid-column: 1 / -1;
  border-style: dashed; color: var(--muted); font-size: 15px; min-height: 48px; padding: 12px 14px;
  margin-top: 6px;
}
.vg-opt.unknown:hover:not(:disabled) { border-color: var(--muted); background: #fafafa; }
/* 开始页的朗读开关 */
.vg-switch {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin: 14px auto 4px; font-size: 13px; color: var(--muted); cursor: pointer;
}
.vg-switch input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
/* 结果页：区间 / 警示 */
.vg-result-range { color: var(--muted); font-size: 13px; margin-top: -2px; }
.vg-result-note b { color: var(--text); }
.vg-result-warn {
  margin: 10px 0 16px; padding: 10px 12px; border-radius: 8px;
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; text-align: left;
}

.vg-result {
  max-width: 520px; margin: 14px auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 26px; text-align: center;
}
.vg-result-badge {
  display: inline-block; background: var(--primary); color: #fff;
  padding: 6px 18px; border-radius: 999px; font-weight: 700; font-size: 15px;
}
.vg-result-size { font-size: 30px; margin: 16px 0 4px; }
.vg-result-size b { color: var(--primary); }
.vg-result-cefr { color: var(--muted); font-size: 14px; }
.vg-result-desc { margin: 12px 0; color: var(--text); }
.vg-result-note { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.vg-result-actions { display: flex; gap: 12px; justify-content: center; }

/* 中途退出确认弹窗 */
.vg-modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.vg-modal {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 22px 18px; max-width: 360px; width: calc(100% - 40px); text-align: center;
}
.vg-modal-msg { font-size: 15px; margin-bottom: 18px; line-height: 1.7; }
.vg-modal-btns { display: flex; gap: 10px; justify-content: center; }
.vg-result-modal .vg-result-note { margin-bottom: 0; }
.vg-result-modal .btn { margin-top: 16px; }

/* 轻提示 */
.vg-toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(16px);
  background: rgba(31,41,51,.92); color: #fff; font-size: 14px;
  padding: 9px 18px; border-radius: 999px; opacity: 0; z-index: 120;
  transition: opacity .25s, transform .25s; pointer-events: none;
}
.vg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= 跟读音频条 + 同步高亮 ================= */
.audio-bar {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,.14);
  z-index: 60;
}
.audio-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  flex: none;
  line-height: 1;
}
.audio-btn:hover { filter: brightness(1.08); }
.audio-speed {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  flex: none;
}
.audio-progress {
  width: 150px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  flex: none;
}
#audioProgressFill {
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: 3px;
}
.audio-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* 正在朗读的句子：淡黄底 + 左侧蓝色竖线，与本页其他行区分 */
.sent-playing {
  background: rgba(255, 213, 79, .30);
  box-shadow: inset 3px 0 0 var(--primary);
  border-radius: 3px;
  padding: 1px 2px;
  margin-left: -2px;
}
@media (max-width: 640px) {
  .audio-bar { bottom: 70px; padding: 6px 12px; gap: 8px; }
  .audio-progress { width: 90px; }
}

/* 快进快退按钮 + 倍速弹出菜单 */
.audio-skip {
  width: auto;
  min-width: 38px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
}
.audio-speed-wrap {
  position: relative;
  flex: none;
}
.audio-speed-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  padding: 4px;
  display: flex;
  flex-direction: column;
  min-width: 72px;
  z-index: 70;
}
.audio-speed-menu button {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
.audio-speed-menu button:hover {
  background: var(--bg);
}
.audio-speed-menu button.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
/* 菜单小箭头 */
.audio-speed-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}
