/* 四大名著研读站 · 基础布局与组件 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--brand-font); font-weight: 700; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.readwrap { max-width: var(--readw); margin: 0 auto; padding: 0 20px; }

/* 顶栏 */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { font-family: var(--brand-font); font-size: 24px; font-weight: 700; color: var(--accent); letter-spacing: 2px; }
.topnav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topnav a { color: var(--text-soft); font-size: 15px; }
.topnav a:hover, .topnav a.active { color: var(--accent); }

/* 主题切换器 */
.theme-switch { position: relative; }
.theme-btn {
  cursor: pointer; font-family: inherit; font-size: 14px; color: var(--text-soft);
  background: transparent; border: 1px solid var(--line); border-radius: 20px;
  padding: 5px 12px; display: inline-flex; align-items: center; gap: 6px; line-height: 1;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-menu {
  position: absolute; right: 0; top: 46px; z-index: 40; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px; display: none;
}
.theme-menu.open { display: block; }
.theme-item { display: block; width: 100%; text-align: left; cursor: pointer; border: 0; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--text); padding: 9px 12px; border-radius: 8px; }
.theme-item:hover { background: var(--bg-2); }
.theme-item .ti-name { font-weight: 600; }
.theme-item .ti-desc { display: block; font-size: 12px; color: var(--muted); }
.theme-item.active { color: var(--accent); }

/* 首页 hero */
.hero { text-align: center; padding: 56px 20px 30px; }
.hero-compact { padding: 40px 20px 18px; }
.hero-title { font-size: 54px; margin: 0; color: var(--accent); letter-spacing: 10px; }
.hero-sub { color: var(--text-soft); font-size: 18px; margin: 10px 0 16px; letter-spacing: 3px; }
.hero-desc { max-width: 680px; margin: 0 auto; color: var(--text-soft); }
.hero-actions { margin-top: 18px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; padding: 10px 22px; border-radius: 24px; font-size: 15px;
  font-weight: 600; letter-spacing: 1px; border: 1px solid var(--accent); color: var(--accent); background: transparent;
  cursor: pointer; transition: .15s; }
.btn:hover { background: var(--accent); color: #fff; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

/* 卡片网格（首页四本一排） */
.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 18px 0; }
.book-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; display: block; color: inherit; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(80,60,30,.16); }
.card-cover { width: 100%; height: 124px; object-fit: cover; background: var(--bg-2); display: flex; align-items: center; justify-content: center; }
.card-body { padding: 14px 16px 18px; }
.card-body h3 { margin: 0 0 4px; font-size: 22px; color: var(--text); }
.card-author { color: var(--accent); margin: 0 0 8px; font-size: 14px; }
.card-desc { color: var(--text-soft); font-size: 14px; margin: 0 0 12px; }

/* 区块标题 */
.section-title { font-family: var(--brand-font); color: var(--accent); border-left: 4px solid var(--accent);
  padding-left: 12px; margin: 26px 0 14px; font-size: 22px; }

/* 功能入口 */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 14px; }
.feature-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); transition: transform .16s ease; color: inherit; }
.feature-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.feature-card b { font-family: var(--brand-font); font-size: 18px; color: var(--accent); }
.feature-card span { font-size: 13px; color: var(--muted); }

/* 书籍页：评点人（批注来源）卡片 */
.cmt-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cmt-card { padding: 13px 16px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow); }
.cmt-name { font-family: var(--brand-font); font-weight: 700; font-size: 16px; }
.cmt-dyn { font-family: var(--body-font); font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 8px; }
.cmt-desc { margin-top: 5px; font-size: 14px; line-height: 1.8; color: var(--text-soft); }

/* 书目标签 */
.tag { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text-soft); margin-right: 6px; }

/* 阅读页正文 */
.reading { max-width: var(--readw); margin: 0 auto; padding: 20px 20px 40px; }
.chapter-title { font-size: 30px; line-height: 1.5; color: var(--text); margin: 14px 0 18px; text-align: center; }
.chapter-text { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 30px 34px;
  box-shadow: var(--shadow); text-align: justify; font-size: var(--read-font, 18px); line-height: var(--read-lh, 2); letter-spacing: var(--read-ls, 0); color: var(--text); }
.chapter-text p { margin: 0 0 1.1em; text-indent: 2em; }
.chapter-text p.poem { text-indent: 0; text-align: center; letter-spacing: 1px; }
ruby { ruby-position: over; }
ruby rt { font-size: 11px; color: var(--accent-2); font-family: var(--body-font); }

/* ===== 竖排古籍风：右起竖排阅读 ===== */
[data-theme="vertical"] .chapter-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  height: 62vh;
  max-height: 62vh;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 22px 26px;
  font-size: 19px;
  line-height: 2.2;
  letter-spacing: 2px;
  text-align: start;
  border-radius: 8px;
}
[data-theme="vertical"] .chapter-text p {
  text-indent: 0;
  margin: 0 0 0 1.4em;   /* 竖排下表现为「列间距」 */
}
[data-theme="vertical"] .chapter-text ruby { ruby-position: over; }  /* 注音居右 */
/* 竖排时批注移出竖排流，单独横向成段（见阅读页 anno-section） */
[data-theme="vertical"] .anno-section { margin-top: 20px; }

/* ===== 民国铅字风：报刊双线 ===== */
[data-theme="republic"] .chapter-text {
  border-top: 3px double var(--accent-2);
  border-bottom: 3px double var(--accent-2);
  border-left: 0; border-right: 0;
  letter-spacing: .3px;
}

/* 批注筛选栏 */
.anno-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.anno-bar .ab-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.chip { cursor: pointer; font-family: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text-soft); border-radius: 999px; padding: 5px 14px; transition: .15s; }
.chip.on { color: #fff; }
.chip.off { opacity: .5; text-decoration: line-through; }
.ab-spacer { flex: 1; }
.ab-toggle { cursor: pointer; font-family: inherit; font-size: 13px; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; border-radius: 999px; padding: 5px 14px; }
.ab-toggle:hover { background: var(--accent); color: #fff; }

/* 批注卡片 */
.anno-card { margin: 0 0 12px; padding: 12px 16px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); border-left: 5px solid var(--accent); }
.anno-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.anno-by { font-family: var(--brand-font); font-weight: 700; font-size: 15px; color: var(--accent); }
.anno-kind { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.anno-text { font-size: 15px; color: var(--text-soft); line-height: 1.8; }

/* 翻页 */
.pager { display: flex; gap: 12px; justify-content: space-between; margin: 22px 0; }
.nav-btn { flex: 1; text-align: center; padding: 12px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 15px; cursor: pointer; }
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-btn.disabled { color: var(--muted); cursor: not-allowed; background: var(--bg-2); }

/* 检索 */
.search-box { display: flex; gap: 8px; margin: 18px 0; }
.search-box input { flex: 1; font-family: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--text); }
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-box button { font-family: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); border-radius: 10px; width: 44px; font-size: 18px; }
.search-box button:hover { border-color: var(--accent); color: var(--accent); }
.sf-chip { cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text-soft);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; }
.sf-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* 检索结果卡片。**display:block 不能省** —— 它是 <a> 标签，默认 inline，
   而 inline 元素会忽略 padding / border / background / margin，
   表现为「卡片框线与底色整块消失，文字直接压在页面背景上」，
   在某些主题下看起来就像有一段深色色块挡住了文字。 */
.result { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); margin-bottom: 12px; color: inherit; text-decoration: none; }
.result:hover { border-color: var(--accent); }
.result h4 { margin: 0 0 6px; font-size: 16px; }
.result .r-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.result p { margin: 0 0 2px; font-size: 14px; color: var(--text-soft); }
mark { background: rgba(224,122,111,.30); color: inherit; padding: 0 1px; border-radius: 3px; }

/* 可视化通用容器 */
.viz-wrap { padding: 20px; }
.canvas-host { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0; font-size: 13px; color: var(--text-soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* 时间线 */
.timeline { position: relative; margin: 16px 0 4px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 22px; }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); }
.tl-year { font-family: var(--brand-font); font-weight: 700; color: var(--accent); font-size: 16px;
  min-width: 82px; flex: none; }
.tl-label { font-weight: 600; margin-left: 8px; }
.tl-desc { color: var(--text-soft); font-size: 14px; margin-top: 2px; padding-left: 90px; }
/* 时间线：阶段分组 */
.tl-stage { margin: 0 0 6px; }
.tl-stage-h { display: flex; align-items: center; gap: 9px; margin: 26px 0 14px; padding: 7px 14px;
  font-family: var(--brand-font); font-size: 17px; font-weight: 700; color: var(--text);
  border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow); }
.tl-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-soft);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.tl-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tl-chap { margin-left: auto; flex: none; font-size: 12px; color: var(--text-soft); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.tl-chap:hover { color: var(--accent); border-color: var(--accent); }
/* 时间标签本身就是回次时（红楼），链接只留箭头，紧贴标题，避免右侧孤零零一个符号 */
.tl-chap-min { margin-left: 4px; padding: 0 5px; font-size: 13px; color: var(--muted);
  border-color: transparent; background: transparent; }
.tl-chap-min:hover { background: var(--bg-2); border-color: var(--accent); }
/* 阶段配色（时间线） */
.k1 { --kc: #d98b6a; } .k2 { --kc: #c9a227; } .k3 { --kc: #6a9fb5; }
.k4 { --kc: #8b7bb8; } .k5 { --kc: #6aa87a; } .k6 { --kc: #b46a7a; }
.tl-stage-h.k1, .tl-stage-h.k2, .tl-stage-h.k3, .tl-stage-h.k4, .tl-stage-h.k5, .tl-stage-h.k6 { border-left-color: var(--kc); }
.tl-item.k1::before, .tl-item.k2::before, .tl-item.k3::before,
.tl-item.k4::before, .tl-item.k5::before, .tl-item.k6::before { background: var(--kc); }
.tl-item.k1 .tl-year, .tl-item.k2 .tl-year, .tl-item.k3 .tl-year,
.tl-item.k4 .tl-year, .tl-item.k5 .tl-year, .tl-item.k6 .tl-year { color: var(--kc); }

/* 思维导图：根节点 → 一级章节 → 二级小节 → 深层卡片/叶子芯片 */
.mm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px;
  font-size: 13px; color: var(--muted); }
.mm-bar .btn { padding: 4px 12px; font-size: 12px; }
.mm { max-width: 1120px; }
.mm-root { display: inline-block; padding: 10px 20px; border-radius: 12px; background: var(--accent);
  color: #fff; font-family: var(--brand-font); font-size: 21px; letter-spacing: 1.5px; box-shadow: var(--shadow); }
.mm > .mm-d { margin: 10px 0 18px; color: var(--text-soft); font-size: 13.5px; }
.mm-d { color: var(--muted); font-size: 12.5px; line-height: 1.65; margin: 2px 0 8px; }
.mm-lv1 { display: grid; grid-template-columns: 1fr; gap: 16px; }   /* 一级章节：整幅横排，避免高度参差错位 */
.mm-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mm-sec > .mm-body > .mm-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.mm-card > .mm-body > .mm-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.mm-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
.mm-sec, .mm-card { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.mm-sec { border-left: 4px solid var(--accent); padding: 14px 16px; background: var(--surface); }
.mm-card { border-left: 3px solid color-mix(in srgb, var(--accent) 45%, var(--line)); padding: 10px 12px;
  background: var(--bg-2); }
.mm-card .mm-card { background: var(--surface); }
.mm-h { cursor: pointer; font-family: var(--brand-font); color: var(--text); user-select: none;
  display: flex; align-items: baseline; gap: 4px; line-height: 1.5; }
.mm-h:hover { color: var(--accent); }
.mm-d1 > .mm-h { font-size: 18px; font-weight: 700; }
.mm-card > .mm-h { font-size: 14.5px; font-weight: 600; }
.mm-caret { flex: none; width: 13px; color: var(--accent); }
.mm-chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 12.5px; line-height: 1.6; }
.mm-card .mm-card .mm-chip { background: var(--bg-2); }

/* 地理对照 */
.geo-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.geo-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); padding: 12px; }
.geo-panel h3 { margin: 4px 8px 10px; font-size: 18px; color: var(--accent); }
/* 地理画布：固定 10:7 与投影坐标等比，避免横向压缩变形；叠加浅格网 */
#mapCanvas { position: relative; aspect-ratio: 10 / 7; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px;
  background-color: var(--surface);
  background-image: radial-gradient(circle at 60% 40%, var(--bg-2), var(--surface)),
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 10% 10%, 10% 10%;
  background-position: 0 0, -1px -1px, -1px -1px; }
.geo-dot { position: absolute; width: 13px; height: 13px; padding: 0; margin: 0;
  transform: translate(-50%, -50%); border-radius: 50%; cursor: pointer;
  border: 2px solid var(--surface); background: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.28);
  transition: transform .12s ease, background .12s ease; }
.geo-dot:hover { transform: translate(-50%, -50%) scale(1.5); z-index: 5; }
.geo-dot.active { background: var(--text); transform: translate(-50%, -50%) scale(1.5); z-index: 6;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent); }
.gd-label { position: absolute; white-space: nowrap; font-size: 11px; line-height: 1.5;
  padding: 0 4px; border-radius: 5px; background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text); font-family: var(--brand-font); pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.gd-label.hide { display: none; }
/* 列表选中时强制显现的标签：固定挂在点位右侧 */
.gd-label.gd-manual { left: 8.5px; top: 50%; transform: translateY(-50%); }
.geo-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 8px 10px; font-size: 13px; color: var(--text-soft); }
.geo-tools label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.geo-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.geo-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 14px; }
.geo-list li { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); margin-bottom: 8px;
  break-inside: avoid; -webkit-column-break-inside: avoid; }
.geo-list .g-ancient { font-family: var(--brand-font); font-weight: 700; color: var(--accent); }
.geo-list .g-modern { color: var(--text-soft); font-size: 14px; }
.geo-list .g-note { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }

/* 插图
   加载策略：网格里一律用 400 宽缩略图（单张 26–55 KB），loading="lazy" 延迟到进入视口才下载；
   点开灯箱时才取 1024 宽大图。这样图多到上百张，首屏流量仍只有百 KB 级。 */
.illus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 16px; padding: 10px 0; }
.illus-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; }
.illus-ph { position: relative; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); color: var(--muted); font-family: var(--brand-font); font-size: 16px;
  border-bottom: 1px solid var(--line); overflow: hidden; cursor: zoom-in; }
.illus-ph img { width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .35s ease; }
.illus-ph img.loaded { opacity: 1; }
/* 缩略图未到时的底纹，避免大片空白显得像坏了 */
.illus-ph::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(180,150,110,.10) 50%, transparent 60%); }
/* 灯箱
   ⚠️ 关键：下面的 `display: flex` 会**覆盖** HTML `hidden` 属性自带的
   `display: none`（作者样式优先级高于 UA 样式），导致灯箱遮罩在页面加载后就
   铺满整个视口，把下面的网格全部挡住，表现为「页面发灰、什么都点不了」。
   因此必须显式声明 `.illus-lightbox[hidden] { display: none; }`。 */
.illus-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(30,22,14,.82);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 32px 20px; cursor: zoom-out; }
.illus-lightbox[hidden] { display: none; }
.illus-lightbox img { max-width: min(920px, 92vw); max-height: 76vh; border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0,0,0,.5); background: #fff; }
.illus-lightbox .lb-cap { color: #f5ead9; text-align: center; max-width: 720px; font-size: 15px; line-height: 1.7; }
.illus-lightbox .lb-cap b { display: block; font-size: 19px; margin-bottom: 4px; }
.illus-lightbox .lb-cap span { color: #cbbb9c; font-size: 13px; }
.illus-body { padding: 11px 13px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.illus-body h4 { margin: 0; font-size: 16px; color: var(--text); }
.illus-body p { margin: 0; font-size: 13px; color: var(--text-soft); line-height: 1.6; }
.illus-chap { align-self: flex-start; font-size: 12px; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 0 8px; }
.illus-note { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0 0 4px;
  border-left: 3px solid var(--line); padding-left: 10px; }
.illus-stat { display: inline-flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }

/* 页脚 */
.site-footer { margin-top: 36px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 22px 0; text-align: center;
  color: var(--text-soft); font-size: 14px; }
.site-footer .muted { color: var(--muted); margin-top: 6px; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 22px; margin: 18px 0 30px; }
.notice h2 { font-family: var(--brand-font); color: var(--accent); margin: 0 0 8px; font-size: 19px; }

@media (max-width: 900px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .geo-list { columns: 1; }
  .mm-sec > .mm-body > .mm-grid { grid-template-columns: 1fr; }
  .mm-card > .mm-body > .mm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-title { font-size: 40px; letter-spacing: 6px; }
  .chapter-text { padding: 20px 16px; font-size: 17px; line-height: 1.95; }
  .geo-layout { grid-template-columns: 1fr; }
  .header-inner { height: auto; padding: 8px 0; flex-wrap: wrap; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 阅读偏好：字号/行距/字间距由 --read-* 变量驱动（已在 .chapter-text 应用） ===== */

/* 阅读页顶部工具条：← 返回 / 批注来源（左） + 收藏·设置·导出（右） */
.read-top { display: flex; align-items: center; padding: 14px 0 0; gap: 10px 16px; flex-wrap: wrap; }
.rt-back { flex: none; font-size: 14px; color: var(--text-soft); }
.rt-back:hover { color: var(--accent); }
.rt-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.read-tools { display: flex; gap: 8px; flex: none; }
.rt-btn { cursor: pointer; font-family: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-soft); border-radius: 999px; padding: 6px 14px; white-space: nowrap; }
.rt-btn:hover { border-color: var(--accent); color: var(--accent); }
/* 顶栏内的批注来源条：紧贴「收藏/设置」左侧 */
.read-top .anno-bar { margin: 0; padding: 5px 10px; gap: 6px; background: var(--bg-2); flex: 0 1 auto; }
.read-top .anno-bar .ab-label { margin-right: 0; font-size: 12px; }
.read-top .anno-bar .chip { font-size: 12px; padding: 3px 11px; background: var(--surface); }
.read-top .anno-bar .ab-toggle { font-size: 12px; padding: 3px 11px; }

/* 行内锚点（批注定位到字句） */
.anno-anchor { background: linear-gradient(transparent 62%, rgba(224,122,111,.30) 0); cursor: help;
  border-bottom: 1px dashed var(--accent-2); }
.anno-flag { font-size: 9px; vertical-align: super; color: var(--accent); background: var(--bg-2); border: 1px solid var(--accent);
  border-radius: 6px; padding: 0 3px; margin-left: 1px; font-family: var(--body-font); }
.anno-anchor:hover { background: rgba(224,122,111,.38); }

/* 旁批/侧边悬浮批注卡 */
.anno-pop { position: absolute; z-index: 60; width: max-content; min-width: 200px; max-width: min(340px, 88vw);
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(60,40,20,.22); padding: 12px 14px; display: none; }
.anno-pop.show { display: block; }
.anno-pop .anno-card { border: 0; background: transparent; padding: 0; box-shadow: none; }
.anno-pop .anno-text { font-size: 14px; }

/* 批注分区：回前评 / 旁批 / 回末总评
   这些批注按脂评本体例另栏排布，而不是硬锚到正文某句——错锚比不锚更糟。 */
.anno-zone { margin: 16px 0; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent); }
.zone-head { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.zone-tail { border-color: color-mix(in srgb, var(--accent-2) 40%, var(--line)); }
.az-title { margin: 0 0 4px; font-size: 15px; color: var(--accent); font-family: var(--brand-font); }
.az-note { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.anno-zone .anno-card + .anno-card { margin-top: 10px; }
/* 批注全部被筛选隐藏时的占位提示 */
.anno-none { margin: 0 0 8px; padding: 12px 14px; border: 1px dashed var(--line);
  border-radius: 10px; color: var(--text-soft); font-size: 15px; background: var(--bg-2); }

/* 汇总里标出每条批注的呈现位置 */
.anno-where { font-style: normal; padding: 1px 7px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--line); color: var(--text-soft); }
.anno-where.w-inline { color: var(--accent); border-color: var(--accent); }
.anno-where.w-head, .anno-where.w-tail { color: var(--accent-2); border-color: var(--accent-2); }
/* 有被评句却没能在本回正文命中：标黄提示，不让它看起来像正常行内批注 */
.anno-where.w-miss { color: #b26a00; border-color: #e0a33c; background: rgba(224,163,60,.12); }

/* 本回批注汇总 / 区块标题 */
.read-block { margin: 24px 0 0; }
.rb-title { font-family: var(--brand-font); color: var(--accent); font-size: 18px; border-left: 4px solid var(--accent); padding-left: 10px; margin: 18px 0 10px; }
.anno-summary { list-style: none; padding: 0; margin: 0; max-height: 520px; overflow-y: auto; }
.anno-summary li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 10px; font-size: 14px; }
.anno-summary .anno-text { margin-top: 4px; }
.anno-src { font-size: 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.anno-src:hover { background: var(--accent); color: #fff; }

/* 用户笔记 */
.note-area { display: flex; flex-direction: column; gap: 10px; }
.note-card { padding: 10px 14px; border: 1px solid var(--accent-2); border-left: 5px solid var(--accent-2); border-radius: 10px; background: var(--surface); position: relative; }
.note-quote { font-size: 13px; color: var(--text-soft); font-style: italic; }
.note-text { font-size: 15px; color: var(--text); margin: 4px 0 22px; }
.note-del { position: absolute; right: 10px; bottom: 8px; cursor: pointer; font-family: inherit; font-size: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 6px; padding: 2px 8px; }
.note-del:hover { border-color: #c0392b; color: #c0392b; }
.muted { color: var(--muted); font-size: 14px; }

/* 多底本对照：校勘记卡片（原 7 列宽表在异文长时会变成窄条竖排，已弃用） */
.cmp-cards { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 6px; }
.cmp-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; }
.cmp-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.cmp-hd .cmp-chap { font-size: 13px; }
.cmp-hd .cmp-base { font-family: var(--brand-font); font-size: 16px; font-weight: 700;
  color: var(--text); background: none; width: auto; margin: 0; }
/* 列数 = 版本数（≤4），保证每行填满、不留空底色块 */
.cmp-vs { display: grid; grid-template-columns: repeat(var(--vn, 3), minmax(0, 1fr)); gap: 1px;
  background: var(--line); }
.cmp-v { background: var(--surface); padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 3px; }
.cmp-vn { font-family: var(--brand-font); font-size: 13px; font-weight: 700; color: var(--accent); }
.cmp-vt { color: var(--text-soft); font-size: 14px; line-height: 1.78; }
.cmp-ve { color: var(--muted); font-size: 11.5px; }
/* 该本无单独异文：整块淡化，避免误读为「此本亦作异文」 */
.cmp-v.is-same .cmp-vt { color: var(--muted); font-size: 12.5px; }
.cmp-v.is-same .cmp-vn { color: var(--muted); }
@media (max-width: 900px) {
  .cmp-vs { grid-template-columns: 1fr; }
}

/* 兼容旧表格样式（历史数据页仍在用） */
.cmp-table { width: 100%; border-collapse: collapse; margin: 14px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.cmp-table th, .cmp-table td { border: 1px solid var(--line); padding: 12px 14px; vertical-align: top; font-size: 14px; text-align: left; }
.cmp-table thead th { background: var(--bg-2); font-family: var(--brand-font); color: var(--accent); }
.cmp-base { font-weight: 600; color: var(--text); background: var(--bg-2); width: 22%; }
.cmp-v { color: var(--text-soft); }
.cmp-vh { white-space: nowrap; }
.cmp-chap { white-space: nowrap; font-family: var(--brand-font); color: var(--text-soft); font-size: 13px; width: 88px; }
.cmp-type { width: 104px; }
/* 某本与主本相同：淡化，避免误读为「该本有此异文」 */
.cmp-same { color: var(--muted); opacity: .5; }
.cmp-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 2px; }
.cmp-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; line-height: 1.65;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text-soft); white-space: nowrap; }
.cmp-tag.g1 { color: #d98b6a; border-color: color-mix(in srgb, #d98b6a 42%, var(--line)); }
.cmp-tag.g2 { color: #c9a227; border-color: color-mix(in srgb, #c9a227 42%, var(--line)); }
.cmp-tag.g3 { color: #6a9fb5; border-color: color-mix(in srgb, #6a9fb5 42%, var(--line)); }
.cmp-tag.g4 { color: #8b7bb8; border-color: color-mix(in srgb, #8b7bb8 42%, var(--line)); }
.cmp-tag.g5 { color: #6aa87a; border-color: color-mix(in srgb, #6aa87a 42%, var(--line)); }
.cmp-tag.g6 { color: #b46a7a; border-color: color-mix(in srgb, #b46a7a 42%, var(--line)); }
.cmp-tag.g7 { color: #7f8fa6; border-color: color-mix(in srgb, #7f8fa6 42%, var(--line)); }
.cmp-tag.g8 { color: #a58a63; border-color: color-mix(in srgb, #a58a63 42%, var(--line)); }

/* 评本说明 */
.ed-era { font-family: var(--brand-font); color: var(--accent); font-size: 16px; }
.ed-desc { color: var(--text-soft); line-height: 1.9; font-size: 16px; }

/* 多底本对照：横向滚动 + 版本说明卡片 */
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp-table { min-width: 760px; }
.ed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 10px; }
.ed-note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.ed-note > b { font-family: var(--brand-font); color: var(--accent); font-size: 16px; }

/* 词频/频次条形 */
.wordfreq { list-style: none; padding: 0; margin: 8px 0 20px; }
.wordfreq li { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 14px; }
.wf-name { width: 90px; flex: none; color: var(--text); font-family: var(--brand-font);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 批注分布两栏较窄，类型名可长到 7–8 字，单独放宽并允许换行 */
.st-two .wf-name { width: 132px; white-space: normal; line-height: 1.35; }
.wf-bar { flex: 1; background: var(--bg-2); border-radius: 6px; height: 14px; overflow: hidden; }
.wf-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.wf-c { width: 42px; text-align: right; color: var(--muted); flex: none; }
/* 文本挖掘：概览卡 / 角色弧线 / 共现 / 曲线 / 注音字 */
.st-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0 6px; }
.st-card { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 14px 16px; box-shadow: var(--shadow); }
.st-card b { display: block; font-family: var(--brand-font); font-size: 25px; line-height: 1.2; color: var(--accent); }
.st-card span { font-size: 12px; color: var(--text-soft); margin-left: 3px; }
.st-card em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.st-h4 { margin: 4px 0 6px; font-size: 13.5px; color: var(--text-soft); font-family: var(--brand-font); font-weight: 600; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.arc-list { list-style: none; padding: 0; margin: 8px 0 20px; }
.arc-list li { display: flex; align-items: flex-end; gap: 10px; padding: 4px 0; font-size: 13.5px; }
.arc-name { width: 86px; flex: none; color: var(--text); font-family: var(--brand-font);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; }
/* 逐段出场强度：面积折线，x = 回次分段，y = 该段提及次数 */
.arc-spark { flex: 1; height: 30px; border-bottom: 1px solid var(--line); }
.arc-spark svg { display: block; width: 100%; height: 30px; }
.arc-area { fill: var(--accent); fill-opacity: .26; stroke: var(--accent);
  stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.arc-total { width: 62px; flex: none; text-align: right; color: var(--text-soft); font-size: 12px; align-self: center; }
.arc-range { width: 84px; flex: none; text-align: right; color: var(--muted); font-size: 12px; align-self: center; }
.co-pair { width: 150px; flex: none; color: var(--text); font-family: var(--brand-font); font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-list .wf-c { width: 172px; }
.co-n { font-style: normal; display: block; font-size: 11px; color: var(--muted); letter-spacing: 0; }
.co-list .wf-bar i { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.st-chart { width: 100%; height: 200px; display: block; margin: 6px 0 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.st-chart .st-line { fill: none; stroke: var(--accent); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.st-chart .st-avg { stroke: var(--line); stroke-width: 1.4; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.st-rubies { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 20px; }
.st-ruby { display: inline-flex; flex-direction: column; align-items: center; gap: 0;
  padding: 4px 12px 3px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); min-width: 74px; position: relative; }
.st-ruby b { font-family: var(--brand-font); font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.25; }
.st-ruby i { font-style: normal; font-size: 11px; color: var(--text-soft); letter-spacing: .3px; margin-top: 1px; }
.st-ruby em { font-style: normal; font-size: 10px; color: var(--muted); margin-top: 1px; }
@media (max-width: 760px) {
  .st-two { grid-template-columns: 1fr; gap: 6px; }
  .arc-name { width: 62px; }
  .co-pair { width: 108px; }
}

/* 偏好/导出浮层 */
.prefs-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; }
.prefs-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px 26px; width: min(420px, 92vw); }
.prefs-panel h3 { font-family: var(--brand-font); color: var(--accent); margin: 0 0 16px; font-size: 20px; }
.prefs-panel label { display: block; margin-bottom: 14px; font-size: 14px; color: var(--text-soft); }
.prefs-panel input[type=range] { width: 100%; margin-top: 6px; }
.prefs-panel select { font-family: inherit; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.prefs-panel .btn { width: 100%; justify-content: center; margin-top: 6px; }
.export-opt { margin-bottom: 10px; }

/* 翻页方向（右→左） */
.rtl-read .pager { flex-direction: row-reverse; }

/* ===== 阅读页：左侧目录 + 右侧正文 双栏 ===== */
.read-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 30px; align-items: start;
  max-width: calc(var(--maxw) + 200px); margin: 0 auto; padding: 0 20px 40px; }
.read-toc { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.toc-details { margin: 0; }
.toc-title { position: sticky; top: 0; z-index: 1; background: var(--bg-2); padding: 12px 14px;
  font-family: var(--brand-font); font-weight: 700; color: var(--accent); border-bottom: 1px solid var(--line);
  cursor: pointer; list-style: none; }
.toc-title::-webkit-details-marker { display: none; }
.toc-title::before { content: "▾ "; color: var(--muted); }
.toc-details:not([open]) .toc-title::before { content: "▸ "; }
.toc-list { padding: 6px; }
.toc-item { display: flex; gap: 8px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-soft); font-size: 13px; line-height: 1.4; align-items: baseline; }
.toc-item:hover { background: var(--bg-2); color: var(--accent); }
.toc-item.active { background: var(--accent); color: #fff; }
.toc-item.active .toc-t { color: #fff; }
.toc-no { font-family: var(--brand-font); flex: none; }
.toc-t { flex: 1; }

.read-main { min-width: 0; }
.read-main > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.read-main .read-block { max-width: 900px; }

/* 阅读页窄屏：目录收到正文上方 */
@media (max-width: 1080px) {
  .read-layout { grid-template-columns: 1fr; gap: 14px; }
  .read-toc { position: static; max-height: 300px; }
  .read-main > *, .read-main .read-block { max-width: 100%; }
  .read-top .anno-bar { flex: 1 1 100%; }
}

/* ===== 人物关系图控件 ===== */
.g-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 4px; }
.g-search { flex: 1; min-width: 200px; font-family: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.g-search:focus { outline: none; border-color: var(--accent); }
.g-lab { font-size: 13px; color: var(--text-soft); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.g-zoom { cursor: pointer; font-family: inherit; font-size: 15px; width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); border-radius: 8px; }
.g-zoom:hover { border-color: var(--accent); color: var(--accent); }
/* 缩放滑块组：以滑块/按钮为主，滚轮需按住 Ctrl/⌘，避免与页面滚动冲突 */
.g-zoomgrp { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.g-zoomgrp .g-zoom { width: 30px; height: 30px; font-size: 15px; }
.g-zoomgrp #gZoomReset { width: auto; padding: 0 10px; font-size: 13px; }
.g-range { -webkit-appearance: none; appearance: none; width: 132px; height: 4px; border-radius: 999px; background: var(--line); cursor: pointer; }
.g-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.28); cursor: grab; }
.g-range::-webkit-slider-thumb:active { cursor: grabbing; }
.g-range::-moz-range-track { height: 4px; border-radius: 999px; background: var(--line); }
.g-range::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); cursor: grab; }
.g-zoomval { font-size: 12px; color: var(--text-soft); min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.g-pin { font-size: 12px; color: var(--accent); border: 1px dashed var(--accent); border-radius: 999px; padding: 0 8px; margin-left: 6px; }
@media (max-width: 720px) { .g-range { width: 90px; } }
.g-host { position: relative; }
.g-chip { cursor: pointer; font-family: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); border-radius: 999px; padding: 5px 12px; display: inline-flex; align-items: center; gap: 6px; }
.g-chip i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.g-chip .g-cnt { font-size: 11px; opacity: .6; }
.g-chip.on { border-color: var(--gc); color: var(--text); }
.g-chip:not(.on) { opacity: .45; text-decoration: line-through; }
.g-chip.g-all { border-style: dashed; }
.g-info { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; color: var(--text-soft); min-height: 42px; }
.g-info-head { font-family: var(--brand-font); font-size: 16px; margin-bottom: 6px; }
.g-rel-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.g-rel-list li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.g-rel { color: var(--muted); }
/* 关系图：搜索建议下拉 + ego 标签 */
.g-sug-wrap { position: relative; flex: 1; min-width: 200px; }
.g-sug { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.20); max-height: 330px; overflow: auto; text-align: left; }
.g-sug li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.g-sug li:hover { background: var(--bg-2); }
.g-sug li i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.g-sug li span { margin-left: auto; font-size: 12px; color: var(--muted); }
.g-sug li.g-sug-none { cursor: default; color: var(--muted); }
.g-sug li.g-sug-none:hover { background: none; }

/* 打印（导出 PDF 时只保留阅读正文） */
@media print {
  .site-header, .site-footer, .read-top, .read-toc, .anno-bar, .read-block, .pager, .anno-pop, .notice, .feature-grid, .theme-switch { display: none !important; }
  body { background: #fff; color: #000; }
  .chapter-text { border: 0; box-shadow: none; padding: 0; font-size: 15px; }
  .read-layout { display: block; max-width: 100%; padding: 0; }
  .reading { max-width: 100%; padding: 0; }
  .read-main > * { max-width: 100%; }
}

/* 检索结果跳转到原文后的定位高亮 */
.para-flash { animation: paraFlash 1.6s ease-out 1; border-radius: 4px; }
@keyframes paraFlash {
  0%   { background: rgba(224,180,90,.42); box-shadow: 0 0 0 6px rgba(224,180,90,.18); }
  70%  { background: rgba(224,180,90,.30); box-shadow: 0 0 0 6px rgba(224,180,90,.10); }
  100% { background: transparent; box-shadow: 0 0 0 6px rgba(224,180,90,0); }
}
/* 检索结果右下角的「定位到原文」提示 */
.result .r-jump { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--accent); opacity: .75; }
.result:hover .r-jump { opacity: 1; }

/* 检索结果的上下文行：弱化显示，帮助在长段里定位 */
.result .r-ctx { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.result p { margin: 0 0 2px; }
