:root {
  --brand: #667eea;
  --brand-dark: #5B67D4;
  --brand-rgb: 102, 126, 234;
  --page-bg: #f0f3f9;
  --surface: #fafbff;
  --surface-alt: #f3f6fc;
  --border: #e6e8f0;
  --text: #1f2937;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --heading: #111827;
  --scripture-bg: #f6f7fa;
  --radius-sm: 6px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 6px 16px rgba(0,0,0,.08);
  --fn-ref: #c07818;
  --fn-ref-hover: #e08000;
  /* 5 色标注语义（沿用 bible-reader） */
  --c1: #FFEB3B;  /* 黄：重要的句子 */
  --c2: #4CAF50;  /* 绿：耶和华我的神等 */
  --c3: #9C27B0;  /* 紫：我是耶和华 */
  --c4: #2196F3;  /* 蓝：神所喜爱、赞赏的 */
  --c5: #F44336;  /* 红：神所恨恶、审判、禁止的 */
  /* 阅读排版（Aa 排版面板可调，纯本地偏好不入云同步）：
     --reading-scale 正文字号倍率 0.85~2.0；--reading-lh 正文行距 1.5~2.4 */
  --reading-scale: 1;
  --reading-lh: 2;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.9;
}

/* ── 首屏 splash：全屏覆盖，首页就绪后 .hidden 隐藏（display:none 同步，不挡交互） ── */
#splash {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(160deg, var(--brand-dark), var(--brand));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center;
}
#splash.hidden { display: none; }
.splash-logo { font-size: 40px; font-weight: 700; color: #fff; letter-spacing: 2px; }
.splash-verse {
  margin: 0; max-width: 560px; font-size: 17px; line-height: 2;
  color: rgba(255,255,255,.95); font-style: normal;
}
.splash-source { font-size: 13px; color: rgba(255,255,255,.7); }
.splash-spinner {
  width: 34px; height: 34px; margin-top: 6px;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff;
  border-radius: 50%; animation: spin .9s linear infinite;
}
/* 启动关键数据加载失败：splash 上的错误提示 + 重试 */
.splash-error {
  margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: rgba(255,255,255,.9); font-size: 14px;
}
.splash-retry-btn {
  padding: 8px 26px; border: none; border-radius: 8px; cursor: pointer;
  background: #fff; color: #667eea; font-size: 14px; font-weight: 600;
}
/* 模块数据加载指示（ensure* 未缓存时占位，渲染后被内容替换） */
.loading-hint {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 40px 16px; color: var(--text-muted); font-size: 14px;
}
.loading-spin {
  width: 18px; height: 18px; flex: none;
  border: 2px solid var(--border); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.loading-error {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 16px; color: var(--text-muted); font-size: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 顶栏 ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 12px;
  background: linear-gradient(135deg, #667EEA, #5B67D4);
  color: #fff;
  box-shadow: var(--shadow-md);
}
/* 阅读进度条：固定顶边 2px 细线，随 #textCol 滚动指示当前阅读进度（晨读 app 同款，纯 UI）
   顶栏 z30 之上，弹窗 z50+ 之下——不盖弹窗、不挡交互（pointer-events:none） */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: #fff; opacity: .9; z-index: 35;
  pointer-events: none; transition: width .08s linear;
}
/* 首页本身滚动，不显示阅读进度条 */
body.home .reading-progress { display: none; }
.icon-btn {
  border: none; background: transparent; color: #fff;
  font-size: 20px; cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.icon-btn:hover { background: rgba(255,255,255,.15); }
.crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.crumb #bookName { white-space: nowrap; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; }
.crumb #chapterLabel { font-weight: 400; opacity: .9; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 4px; align-items: center; }
@media (max-width: 900px) {
  .crumb { flex: 1; }
}
.top-btn {
  border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff;
  font-size: 13px; cursor: pointer; padding: 4px 10px; border-radius: var(--radius-sm);
}
.top-btn:hover { background: rgba(255,255,255,.15); }
.top-btn.active { background: rgba(255,255,255,.25); }

/* 设置弹窗（卡片分组） */
.settings-wrap { margin: -2px; }
#popupBody:has(.settings-wrap) { padding: 14px 12px 10px; }
.settings-card {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
}
.settings-group {
  font-size: 12px; color: var(--text-muted);
  padding: 10px 14px 2px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; cursor: pointer;
}
.settings-row + .settings-row { border-top: 1px solid var(--border); }
.settings-row:hover { background: rgba(0,0,0,.03); }
.settings-label { font-size: 14px; color: var(--text); }
.settings-value { font-size: 13px; color: var(--text-soft); }
.settings-arrow { font-size: 18px; color: var(--text-muted); line-height: 1; }

/* 状态标签（云同步） */
.settings-badge {
  font-size: 11px; padding: 3px 9px; border-radius: 10px;
  background: var(--surface); color: var(--text-soft);
}
.settings-badge.on { background: #dcfce7; color: #166534; }
.settings-badge.off { background: var(--surface); color: var(--text-muted); }

/* 开关（隐藏注号） */
.switch {
  position: relative; width: 40px; height: 24px; flex: none;
  border-radius: 12px; background: #cbd5e1; transition: background .2s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .2s;
}
.switch.on { background: var(--brand); }
.switch.on::after { left: 18px; }

/* 底部版本号 */
.settings-footer {
  text-align: center; font-size: 12px; color: var(--text-muted);
  padding: 6px 0 2px;
}

/* 数据对比（本机 ↔ 云端逐模块条目数，手动同步入口 2026-09） */
.sync-cmp { margin-bottom: 10px; }
.sync-cmp-head, .sync-cmp-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 16px;
  padding: 7px 2px; font-size: 14px; align-items: baseline;
}
.sync-cmp-head { font-size: 12px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.sync-cmp-row { border-bottom: 1px dashed var(--border); }
.sync-cmp-row:last-child { border-bottom: none; }
.sync-cmp-row span:nth-child(2), .sync-cmp-row span:nth-child(3) { min-width: 88px; text-align: right; font-variant-numeric: tabular-nums; }
.sync-cmp-head span:nth-child(2), .sync-cmp-head span:nth-child(3) { min-width: 88px; text-align: right; }
.sync-cmp-row.diff span { color: #d9534f; font-weight: 600; }

/* 云同步弹窗：强制覆盖危险区 */
.sync-danger {
  margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border);
}
.sync-danger-title { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

/* 同步状态指示 */
/* 移动端「读经|研读」模式切换 pill（桌面隐藏，见 @media max-width:900px） */
.mode-pill { display: none; }

/* 移动端底部导航：桌面端隐藏（否则以块级元素排在文档流末尾，滚到底可见） */
.mobile-nav { display: none; }

/* 轻提示 toast（底部弹出，自动消失） */
.toast {
  position: fixed; left: 50%; bottom: calc(64px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  background: rgba(28,30,42,.92); color: #fff;
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.on { color: #a5f3a5; }
.toast.pending { color: #ffd28a; }
.toast.offline { color: #ff9d9d; }

/* 设置弹窗「同步状态」文字+颜色 */
.settings-value.sync-val.on { color: #166534; }
.settings-value.sync-val.pending { color: #b45309; }
.settings-value.sync-val.offline { color: #b91c1c; }
.settings-value.sync-val.off { color: var(--text-muted); }

/* 隐藏注号（纯净阅读模式） */
body.hide-marks sup.fn-ref,
body.hide-marks sup.xref-ref { display: none; }

/* ── 布局 ── */
.layout {
  --study-w: 480px;
  display: grid;
  /* 用 JS 实时维护的 --app-h（真实 WebView 高度，随键盘/窗口变化），
     避免 Android 100vh 不随 WebView 缩放而失效 */
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, var(--study-w));
  height: calc(var(--app-h, 100vh) - 52px);
  overflow: hidden;
  transition: margin-left .25s ease;
}
.nav-col { grid-column: 1; }
.text-col { grid-column: 2; }
.study-col { grid-column: 3; }

/* ── 停靠抽屉（2026-09 导航合并）：桌面四阅读器模块均两列（正文+研读），
   层级导航统一走 #navDrawer 停靠列（fixed + .layout margin-left 占位，可收起） ── */
.body-mod-bible .layout, .body-mod-lifereading .layout,
.body-mod-books .layout, .body-mod-morning .layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--study-w));
}
.body-mod-bible .text-col, .body-mod-lifereading .text-col,
.body-mod-books .text-col, .body-mod-morning .text-col { grid-column: 1; }
.body-mod-bible .study-col, .body-mod-lifereading .study-col,
.body-mod-books .study-col, .body-mod-morning .study-col { grid-column: 2; }
/* 上下分屏（两列版：原文上、研读下） */
.body-mod-bible .layout.view-stacked, .body-mod-lifereading .layout.view-stacked,
.body-mod-books .layout.view-stacked, .body-mod-morning .layout.view-stacked {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1fr;
}
.body-mod-bible .layout.view-stacked .text-col, .body-mod-lifereading .layout.view-stacked .text-col,
.body-mod-books .layout.view-stacked .text-col, .body-mod-morning .layout.view-stacked .text-col { grid-column: 1; grid-row: 1; }
.body-mod-bible .layout.view-stacked .study-col, .body-mod-lifereading .layout.view-stacked .study-col,
.body-mod-books .layout.view-stacked .study-col, .body-mod-morning .layout.view-stacked .study-col {
  grid-column: 1; grid-row: 2; border-left: none; border-top: 1px solid var(--border);
}
/* 全屏/研读全屏（保持单列占满） */
.body-mod-bible .layout.view-full, .body-mod-lifereading .layout.view-full,
.body-mod-books .layout.view-full, .body-mod-morning .layout.view-full,
.body-mod-bible .layout.study-full, .body-mod-lifereading .layout.study-full,
.body-mod-books .layout.study-full, .body-mod-morning .layout.study-full {
  grid-template-columns: minmax(0, 1fr);
}

/* 全屏沉浸（只显示原文；notes 模块保留三列结构但同样隐藏研读列） */
.layout.view-full { grid-template-columns: minmax(0, 1fr); }
.layout.view-full .nav-col,
.layout.view-full .study-col { display: none; }
.layout.view-full .text-col { grid-column: 1; }

/* 研读面板全屏（只显示研读列） */
.layout.study-full { grid-template-columns: minmax(0, 1fr); }
.layout.study-full .nav-col,
.layout.study-full .text-col { display: none; }
.layout.study-full .study-col { grid-column: 1; border-left: none; }
.layout.study-full .resize-handle { display: none; }

/* ── 左栏（仅笔记管理分类树；层级导航已统一走停靠抽屉） ── */
.nav-col {
  display: none;   /* 默认隐藏，仅 body-mod-notes 显示（见「阅读器模块容器切换」节） */
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  min-height: 0;
}
.nav-list {
  flex: 1; overflow-y: auto; min-height: 0;
  padding: 4px;
}
.nav-list .book-item {
  padding: 7px 12px; cursor: pointer; border-radius: var(--radius-sm);
  font-size: 15px;
}
.nav-list .book-item:hover { background: #f0f4ff; }
.nav-list .book-item.active {
  background: var(--brand); color: #fff;
}
.nav-list .group-label {
  padding: 8px 12px 4px; font-size: 12px; color: var(--text-muted);
  font-weight: 600;
}
.nav-chapters {
  height: 140px; overflow-y: auto; min-height: 0;
  border-top: 1px solid var(--border); padding: 8px;
  display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start;
}
.nav-chapters .ch-item {
  width: 38px; height: 34px; line-height: 34px; text-align: center;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
  color: var(--text-soft);
}
.nav-chapters .ch-item:hover { background: #f0f4ff; }
.nav-chapters .ch-item.active { background: var(--brand); color: #fff; }

/* ── 原文列 ── */
.text-col {
  background: var(--surface);
  overflow-y: auto; min-height: 0;
  padding: 20px 28px 60px;
}
.chapter-theme {
  font-size: calc(15px * var(--reading-scale)); color: var(--text-muted);
  margin-bottom: 20px; line-height: 1.7;
}
/* 上一章/下一章（置于顶栏 crumb 内，文字按钮） */
.crumb-nav {
  border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
  padding: 4px 10px; border-radius: var(--radius-sm);
  white-space: nowrap;
}
.crumb-nav:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.crumb-nav:disabled { opacity: .35; cursor: not-allowed; }
/* 纲目：章首主题 + 经文间分段标题 */
.theme-row {
  font-size: calc(14px * var(--reading-scale)); color: var(--text-muted); text-align: center; line-height: 1.9; margin-bottom: 18px;
}
.outline-item {
  line-height: 1.8; padding: 2px 0; margin: 10px 0 4px;
  color: var(--text-soft);
}
.outline-item.lv1 {
  font-weight: 700; font-size: calc(17px * var(--reading-scale)); color: var(--heading); margin-top: 22px;
}
.outline-item.lv2 {
  font-weight: 600; font-size: calc(15px * var(--reading-scale)); color: var(--brand); margin-top: 14px;
  padding-left: 14px;
}
.outline-item.lv3 {
  font-size: calc(14px * var(--reading-scale)); color: var(--text);
  padding-left: 28px;
}
.outline-item.lv4 {
  font-size: calc(13.5px * var(--reading-scale)); color: var(--text-soft);
  padding-left: 42px;
}
.outline-item.lv5, .outline-item.lv6 {
  font-size: calc(13px * var(--reading-scale)); color: var(--text-muted);
  padding-left: 56px;
}
.verses { width: 100%; }
/* 经文卡片：连续经文聚合，纲目穿插其间 */
.scripture-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 18px;
  margin: 10px 0;
  box-shadow: 0 1px 5px rgba(102, 126, 234, .20); /* 主题色蓝阴影（#667eea） */
}
.scripture-card .verse { margin-bottom: 8px; }
.scripture-card .verse:last-child { margin-bottom: 0; }
.verse {
  margin-bottom: 14px;
}
.verse .vnum {
  color: var(--brand); font-weight: 700; font-size: calc(13px * var(--reading-scale));
  vertical-align: super; margin-right: 4px;
}
.verse .vtext {
  font-size: calc(18px * var(--reading-scale)); line-height: var(--reading-lh);
}
/* 标注高亮 */
.verse mark, .lr-content mark {
  padding: 0 1px; border-radius: 2px;
}
mark.c1 { background: rgba(255,235,59,.5); }
mark.c2 { background: rgba(76,175,80,.35); color: #1b5e20; }
mark.c3 { background: rgba(156,39,176,.28); }
mark.c4 { background: rgba(33,150,243,.28); }
mark.c5 { background: rgba(244,67,54,.3); }
mark.ul { background: transparent; text-decoration: underline wavy #eb6c05 2px; }
/* 纯笔记标注：透明背景 + 橙色波浪线（晨读语义） */
mark.note { background: transparent; }
mark.has-note { text-decoration: underline wavy #eb6c05 1px; text-underline-offset: 2px; }

/* 注脚 / 串珠 上标 */
sup.fn-ref {
  color: var(--fn-ref); font-weight: 700; cursor: pointer;
  font-size: calc(11px * var(--reading-scale)); padding: 0 1px;
}
sup.fn-ref:hover { color: var(--fn-ref-hover); }
sup.xref-ref {
  color: var(--brand); cursor: pointer; font-size: calc(11px * var(--reading-scale)); font-weight: 700;
}
sup.xref-ref:hover { color: var(--brand-dark); }

/* 正文中的经文引用链接 */
.ref-link {
  color: var(--brand); cursor: pointer;
  border-bottom: 1px dashed var(--brand);
}
.ref-link:hover { color: var(--brand-dark); }

/* ── 研读列 ── */
.study-col {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface-alt);
  border-left: 1px solid var(--border);
  min-height: 0;
}
.resize-handle {
  position: absolute; left: -4px; top: 0; bottom: 0;
  width: 8px; cursor: col-resize; z-index: 6;
}
.resize-handle:hover,
.resize-handle.dragging { background: rgba(102,126,234,.25); }
.layout.view-stacked .resize-handle,
.layout.view-full .resize-handle { display: none; }
.study-tabs {
  display: flex; border-bottom: 1px solid var(--border);
}
.study-tab {
  flex: 1; padding: 10px 4px; border: none; background: transparent;
  cursor: pointer; font-size: 14px; color: var(--text-soft);
  border-bottom: 2px solid transparent;
}
.study-tab.active {
  color: var(--brand); border-bottom-color: var(--brand); font-weight: 600;
}
.study-body {
  flex: 1; overflow-y: auto; min-height: 0; padding: 14px;
}
.fn-item, .lr-item, .note-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.fn-item { cursor: pointer; }
.fn-item:hover { border-color: var(--brand); }
.fn-item .fn-label {
  color: var(--fn-ref); font-weight: 700; font-size: 13px; margin-bottom: 4px;
}
.lr-item .lr-title {
  font-weight: 700; text-align: center; font-size: calc(18px * var(--reading-scale));
  color: var(--brand); margin: 20px 0 10px;
}
.lr-item .lr-verses { color: var(--text-muted); font-size: 13px; margin-bottom: 6px; }
.note-item textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; font-size: calc(14px * var(--reading-scale)); resize: vertical; min-height: 80px;
  font-family: inherit;
}
.note-item .note-meta { color: var(--text-muted); font-size: 12px; margin-bottom: 4px; }
.empty-hint { color: var(--text-muted); text-align: center; padding: 30px 0; font-size: 14px; }
.lr-content { white-space: pre-wrap; font-size: calc(17px * var(--reading-scale)); line-height: var(--reading-lh); }
.lr-para {
  margin-bottom: 10px;
  text-indent: 2em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
/* 书报正文：无卡片样式，纯段落（标题见 .bk-head） */
.bk-para {
  margin-bottom: 10px;
  text-indent: 2em;
  font-size: calc(15px * var(--reading-scale)); line-height: var(--reading-lh); color: var(--text);
}
/* 书报标题：与正文区分（左对齐 + 加粗 + 字号递进 + 间距），不做逐级缩进 */
.book-content { text-align: justify; }
.bk-head {
  font-weight: 700;
  color: var(--heading);
  margin: 18px 0 10px;
  line-height: 1.7;
  text-align: justify;
}
.bk-head.lr-h0 { font-size: calc(16px * var(--reading-scale)); }            /* 短行节标题（无编号） */
.bk-head.lr-h1 { font-size: calc(17px * var(--reading-scale)); }            /* 壹 */
.bk-head.lr-h2 { font-size: calc(16px * var(--reading-scale)); }            /* 一 */
.bk-head.lr-h3, .bk-head.lr-h4 { font-size: calc(15.5px * var(--reading-scale)); font-weight: 600; }  /* １ （壹） */
.bk-head.lr-h5, .bk-head.lr-h6, .bk-head.lr-h7,
.bk-head.lr-h8, .bk-head.lr-h9, .bk-head.lr-h10 {
  font-size: calc(15px * var(--reading-scale)); font-weight: 600; color: var(--text);                  /* （一）及更深 */
}
/* 生命读经标题：所有层级统一居中，正文卡片化后标题自然凸显 */
.lr-head {
  font-weight: 700;
  text-align: center;
  margin: 20px 0 10px;
  color: var(--brand);
  line-height: 1.7;
}

/* 生命读经全屏：纲目侧边栏 + 正文 */
.study-body.lr-full-mode {
  padding: 0; overflow: hidden;
}
.lr-full-wrap {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  height: 100%; min-height: 0; overflow: hidden;
}
.lr-outline {
  overflow-y: auto; min-height: 0;
  border-right: 1px solid var(--border);
  padding: 12px 10px; background: var(--surface);
}
.lr-full-content {
  overflow-y: auto; min-height: 0; padding: 14px;
}
.lr-outline-group { margin-bottom: 14px; }
.lr-outline-group-title {
  font-weight: 700; font-size: calc(14px * var(--reading-scale)); color: var(--heading);
  margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lr-toc-item { font-size: calc(14px * var(--reading-scale)); padding: 2px 0; cursor: pointer; color: var(--text-soft); }
.lr-toc-item:hover { color: var(--brand); }
/* 纲目联动：当前阅读小节对应条目高亮（inset 左条不破坏层级缩进） */
.lr-toc-item.active {
  color: var(--brand); font-weight: 600;
  background: rgba(102,126,234,.1);
  border-radius: var(--radius-sm);
  box-shadow: inset 2px 0 0 var(--brand);
}
.lr-toc-l0 { font-weight: 700; color: var(--heading); }
.lr-toc-l1 { font-weight: 700; color: var(--brand); }
.lr-toc-l2 { padding-left: 12px; }
.lr-toc-l3 { padding-left: 22px; }
.lr-toc-l4 { padding-left: 32px; font-size: calc(13px * var(--reading-scale)); }
.lr-toc-l5 { padding-left: 42px; font-size: calc(13px * var(--reading-scale)); }
.lr-toc-l6 { padding-left: 52px; font-size: calc(13px * var(--reading-scale)); }
.lr-toc-l7 { padding-left: 62px; font-size: calc(12px * var(--reading-scale)); color: var(--text-muted); }
.lr-toc-l8 { padding-left: 72px; font-size: calc(12px * var(--reading-scale)); color: var(--text-muted); }
.lr-toc-l9 { padding-left: 82px; font-size: calc(12px * var(--reading-scale)); color: var(--text-muted); }
.lr-toc-l10 { padding-left: 92px; font-size: calc(12px * var(--reading-scale)); color: var(--text-muted); }

/* ── 划线汇总 ── */
.hl-section { margin-top: 14px; }
.hl-header { font-weight: 700; color: var(--heading); margin-bottom: 8px; font-size: calc(15px * var(--reading-scale)); }
.hl-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.hl-tab {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; cursor: pointer; font-size: 13px; color: var(--text-soft);
}
.hl-tab.active {
  color: var(--brand); border-color: var(--brand); background: var(--surface-alt); font-weight: 600;
}
.hl-group {
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  margin: 10px 0 4px; padding-left: 2px;
}
.hl-item {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 6px;
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.hl-item:hover { border-color: var(--brand); }
.hl-loc { color: var(--brand); font-weight: 600; font-size: 12px; flex-shrink: 0; white-space: nowrap; }
.hl-text {
  font-size: calc(14px * var(--reading-scale)); color: var(--text); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 笔记独占一行（hl-text flex:1 基点 0，同行会被挤成 0 宽），引用式背景区分 */
.hl-note {
  flex: 0 0 100%; margin-top: 4px;
  background: var(--surface-alt); border-radius: var(--radius-sm); padding: 6px 10px;
  font-size: calc(13px * var(--reading-scale)); line-height: var(--reading-lh); color: var(--text-soft);
  white-space: pre-wrap; word-break: break-word;
}

/* 跳转定位闪烁 */
.flash { animation: flashBg 1.6s ease; }
@keyframes flashBg {
  0% { background: rgba(102,126,234,.28); }
  100% { background: transparent; }
}

/* ── 标注浮动工具 ── */
.floattool {
  position: fixed; z-index: 82;   /* 高于停靠抽屉 81：划线工具伸进停靠列区域时不被盖住（点击穿透会误触导航） */
  background: #fff; border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 6px; display: flex; gap: 6px; align-items: center;
  border: 1px solid var(--border);
}
.floattool[hidden] { display: none; }
.floattool .sw {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent;
}
.floattool .sw.active { border-color: #333; }
.floattool .sw.c1 { background: var(--c1); }
.floattool .sw.c2 { background: var(--c2); }
.floattool .sw.c3 { background: var(--c3); }
.floattool .sw.c4 { background: var(--c4); }
.floattool .sw.c5 { background: var(--c5); }
.floattool .tool-sep { width: 1px; height: 22px; background: var(--border); }
.floattool .tool-btn {
  border: none; background: transparent; cursor: pointer;
  padding: 4px 8px; font-size: 14px; border-radius: var(--radius-sm);
  color: var(--text-soft);
}
.floattool .tool-btn:hover { background: var(--surface-alt); }

/* ── 标注菜单（点击已有划线） ── */
.marktool {
  position: fixed; z-index: 50;
  background: #fff; border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 8px; min-width: 240px;
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--border);
}
.marktool[hidden] { display: none; }
.mk-bubble {
  background: var(--surface-alt); border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.mk-note-preview {
  font-size: 13px; color: var(--text);
  line-height: 1.7; word-break: break-all; white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-expand {
  border: none; background: transparent; color: var(--brand);
  font-size: 12px; cursor: pointer; padding: 2px 0 0;
}
.mk-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mk-tool-btn {
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  padding: 4px 8px; font-size: 13px; border-radius: var(--radius-sm);
  color: var(--text-soft);
}
.mk-tool-btn:hover { background: var(--surface-alt); color: var(--brand); }
.mk-tool-btn.danger:hover { color: #d33; border-color: #d33; }
.mk-panel {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding-top: 6px; border-top: 1px solid var(--border);
}
.mk-panel[hidden] { display: none; }
.marktool .sw {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent;
}
.marktool .sw.active { border-color: #333; }
.marktool .sw.c1 { background: var(--c1); }
.marktool .sw.c2 { background: var(--c2); }
.marktool .sw.c3 { background: var(--c3); }
.marktool .sw.c4 { background: var(--c4); }
.marktool .sw.c5 { background: var(--c5); }

/* ── 笔记编辑器 ── */
.notemodal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
}
.notemodal[hidden] { display: none; }
.notemodal-card {
  background: #fff; border-radius: 12px;
  width: min(520px, 92vw); padding: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,.2);
}
.notemodal-title { font-weight: 700; color: var(--heading); margin-bottom: 10px; font-size: 15px; }
/* 原文引用预览（写/改笔记时展示所标注的原文，反馈 #13）：置于输入框上方 */
.note-quote {
  background: var(--surface-alt); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 10px;
  font-size: 14px; line-height: 1.8; color: var(--text);
  max-height: 132px; overflow-y: auto; word-break: break-all;
}
.notemodal textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; font-size: 14px; resize: vertical; min-height: 100px;
  font-family: inherit; box-sizing: border-box;
}
.notemodal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ── 排版面板（Aa）：正文字号 / 行距 ── */
#typoModal { z-index: 88; }   /* 高于弹窗栈（popup 84/85） */
.typo-card { width: min(430px, 92vw); padding: 0; }
.typo-grab { display: none; }
.typo-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 6px;
}
.typo-title { font-weight: 700; color: var(--heading); font-size: 15px; }
.typo-head .icon-btn { font-size: 20px; }
.typo-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-top: 1px solid var(--border);
}
.typo-label { flex: 0 0 34px; font-size: 13px; color: var(--text-soft); }
.typo-val { flex: 0 0 86px; text-align: right; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.typo-step {
  flex: none; width: 34px; height: 30px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text); font-size: 13px; font-weight: 600; font-family: inherit;
}
.typo-step:hover { background: var(--surface-alt); }
.typo-row input[type=range] {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 4px;
  border-radius: 2px; background: #dfe3ee; outline: none; cursor: pointer;
}
.typo-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--brand); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.typo-row input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; background: var(--brand);
}
.typo-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 18px 16px; border-top: 1px solid var(--border);
}
.typo-hint { font-size: 11px; color: var(--text-muted); }
/* 顶栏 Aa 按钮（桌面/移动通用；移动端次要工具按钮隐藏后仍保留） */
.aa-btn { font-weight: 700; font-size: 15px; letter-spacing: -.5px; }
.aa-btn.active { background: rgba(102,126,234,.14); color: var(--brand); }

/* 检查更新弹窗 */
#updateModal { z-index: 90; }   /* 独立 modal 叠在设置弹窗（popup 栈 84/85）之上，下载不被打断 */
.update-status { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.update-body { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; line-height: 1.7; white-space: pre-wrap; }
.update-body a { color: var(--brand); }
.update-progress { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.update-progress[hidden] { display: none; }
.update-progress .bar {
  flex: 1; height: 8px; border-radius: 4px; background: var(--surface);
  overflow: hidden;
}
.update-progress .fill { height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .15s; }
.update-percent { font-size: 12px; color: var(--text-soft); min-width: 40px; text-align: right; }

/* ⚙️ 设置按钮：发现新版本时红点角标 */
.update-dot {
  position: relative;
}
.update-dot::after {
  content: '●';
  position: absolute; top: -2px; right: -4px;
  font-size: 10px; color: #ef4444; line-height: 1;
}

/* 弹框打开时锁定页面滚动 */
body.scroll-locked { overflow: hidden; }

/* ── 弹窗 ── */
.overlay {
  position: fixed; inset: 0; z-index: 84;
  background: rgba(0,0,0,.35);
}
.overlay[hidden] { display: none; }
.popup {
  position: fixed; z-index: 85;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(560px, 92vw); max-height: 76vh;
  background: #fff; border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
  display: flex; flex-direction: column; overflow: hidden;
}
.popup[hidden] { display: none; }
.popup-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.popup-header span { font-weight: 700; color: var(--heading); flex: 1; }
.popup-header .icon-btn {
  color: var(--text-muted);
  min-width: 40px; min-height: 40px;       /* 扩大触控热区 */
  display: flex; align-items: center; justify-content: center;
  margin: -8px -4px;                        /* 视觉上不撑高标题栏 */
}
.popup-header .back-btn[hidden] { display: none; }
.popup-body {
  overflow-y: auto; padding: 16px;
}
.popup-verse {
  padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.popup-verse:last-child { border-bottom: none; }
.popup-verse .pv-ref { color: var(--brand); font-weight: 700; font-size: 13px; margin-right: 6px; }
.popup-verse .pv-text { font-size: 16px; line-height: 1.9; }
.fn-body { white-space: pre-wrap; font-size: 15px; line-height: 1.9; }

/* ── 统一导航抽屉（WeBible 模式：双栏主从 + Segment 浏览/历史 + 模块级搜索）──
   移动端 = 浮层（遮罩 + 平移）；桌面 = 可收起的停靠列（body.drawer-docked，见文末停靠规则组） */
#drawerOverlay {
  position: fixed; inset: 0; z-index: 80;
  background: #000; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
#drawerOverlay.on { opacity: .5; pointer-events: auto; }
#drawerOverlay[hidden] { display: none; }
#navDrawer {
  position: fixed; z-index: 81; top: 0; bottom: 0; left: 0;
  width: 340px; max-width: 86vw;
  background: var(--surface);
  transform: translateX(-100%); transition: transform .25s ease;
  box-shadow: 6px 0 16px rgba(0,0,0,.08);   /* 与 --shadow-md 同量级，方向朝右 */
  border-radius: 0 12px 12px 0;             /* 浮层时右缘圆角，贴合全应用卡片语言；停靠时归零 */
  display: flex; flex-direction: column;
}
#navDrawer.open { transform: translateX(0); }
#navDrawer[hidden] { display: none; }

/* 模块级搜索（自三模块左栏迁入）：常驻搜索条 + 结果层覆盖抽屉 */
.dw-search {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 12px 4px; flex-shrink: 0;
}
.dw-search input {
  flex: 1; padding: 8px 12px;
  border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; outline: none; background: var(--surface-alt); color: var(--text);
  min-width: 0; transition: background .15s, border-color .15s;
}
.dw-search input:focus { background: #fff; border-color: var(--brand); }
.dw-search input::placeholder { color: var(--text-muted); }
.dw-search .dw-search-cancel {
  flex-shrink: 0; border: none; background: transparent;
  font-size: 13px; color: var(--text-muted); cursor: pointer; padding: 6px 4px;
}
.dw-search .dw-search-cancel:hover { color: var(--brand); }
.dw-search-results {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--surface); z-index: 3;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-top: 56px;   /* 露出搜索条 */
}
.dw-search-results[hidden] { display: none; }
.dw-search-results .dw-sr-head {
  padding: 10px 16px 8px; font-size: 12px; color: var(--text-muted);
}

/* Segment 分段控件：浏览 | 历史（及底部旧约/新约、书报辑切换） */
.dw-seg, .dw-foot-seg {
  display: flex; background: var(--surface-alt); border-radius: 8px;
  margin: 8px 12px 0; padding: 3px; gap: 2px; flex-shrink: 0;
}
.dw-seg > div, .dw-foot-seg > div {
  flex: 1; height: 30px;
  display: flex; align-items: center; justify-content: center;  /* div 无 UA 居中，补上 */
  font-size: 14px; color: var(--text-soft); cursor: pointer; user-select: none;
  border-radius: 6px; transition: background .15s, color .15s;
}
.dw-seg > div:hover, .dw-foot-seg > div:hover { color: var(--brand); }
.dw-seg > div.sel, .dw-foot-seg > div.sel {
  background: var(--brand); color: #fff; font-weight: 600;
  box-shadow: 0 1px 3px rgba(102,126,234,.35);
}
.dw-seg > div.sel:hover, .dw-foot-seg > div.sel:hover { color: #fff; }
.dw-foot { flex-shrink: 0; padding: 2px 0 max(8px, env(safe-area-inset-bottom)); }
.dw-foot .dw-foot-seg { margin: 8px 12px 0; }

.dw-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dw-cols { flex: 1; display: flex; min-height: 0; margin-top: 8px; }
.dw-col { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 12px; }
.dw-col + .dw-col { border-left: 1px solid var(--border); }
.dw-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 6px; margin: 0 8px;
  font-size: 14px; color: var(--text); cursor: pointer;
  min-width: 0; border-radius: 6px;   /* 圆角 hover 项，与 .lr-toc-item 同语言，不用行分隔线 */
}
.dw-item:hover { background: var(--surface-alt); }
.dw-item:active { background: rgba(102,126,234,.1); }
.dw-item .t {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5;
}
.dw-item .num { min-width: 20px; color: var(--text-muted); font-size: 12px; flex-shrink: 0; }
.dw-item .sub { font-size: 12px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; white-space: nowrap; }
.dw-item .nav-result-loc { color: var(--brand); opacity: .75; }
.dw-item.cur {
  background: rgba(102,126,234,.12); color: var(--brand); font-weight: 600;
}
.dw-item.cur .num, .dw-item.cur .sub { color: var(--brand); opacity: .75; }
.dw-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px; padding: 24px;
}
.dw-hint { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }
.dw-hist-head {
  display: flex; justify-content: flex-end; align-items: center;
  padding: 8px 12px 4px; flex-shrink: 0;
}
.dw-clear-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px; font-size: 12px; color: var(--text-muted);
  border-radius: 12px; cursor: pointer;
}
.dw-clear-btn:hover { color: #d9534f; background: rgba(217,83,79,.08); }
.dw-hist-wrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.dw-hist-list { flex: 1; overflow-y: auto; }
.dw-hist-item {
  padding: 10px 8px; margin: 0 8px; border-radius: 6px;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.dw-hist-item:hover { background: var(--surface-alt); }
.dw-hist-item:active { background: rgba(102,126,234,.1); }
.dw-hist-item .t { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-hist-item .sub { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ── 停靠列（桌面 >900px）：抽屉常驻为左侧栏，可经 ☰/crumb 收起展开 ── */
@media (min-width: 901px) {
  body.drawer-docked:not(.body-mod-notes) #navDrawer {
    top: 52px;   /* 从顶栏下缘开始，不遮挡 ☰/crumb */
    transform: translateX(0);
    box-shadow: none;
    border-radius: 0;
    border-right: 1px solid var(--border);
  }
  body.drawer-docked:not(.body-mod-notes) #drawerOverlay { display: none; }
  body.drawer-docked:not(.body-mod-notes) .layout { margin-left: 340px; }
  /* 全屏沉浸时占满整行 */
  body.drawer-docked:not(.body-mod-notes) .layout.view-full,
  body.drawer-docked:not(.body-mod-notes) .layout.study-full { margin-left: 0; }
}

/* 移动端生命读经导航（☰ 在研读+生命读经 tab）：篇目 + 纲目目录 */
.lrn-group + .lrn-group { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.lrn-group-title {
  font-size: 15px; font-weight: 700; color: var(--heading);
  padding: 4px 0 6px; cursor: pointer;
}
.lrn-group-title:hover { color: var(--brand); }
.lrn-list .lr-toc-item { padding: 5px 0; }

/* 生命读经手动指定篇目 */
.lr-map-bar { margin-bottom: 10px; text-align: right; }
.lr-map-btn {
  font-size: 12px; color: var(--brand); background: var(--surface-alt);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 10px; cursor: pointer;
}
.lr-map-btn:hover { background: var(--brand); color: #fff; }
.lr-pick-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.6; }
.lr-pick-list {
  max-height: 50vh; overflow-y: auto; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px;
}
.lr-pick-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 4px; font-size: 14px; cursor: pointer; line-height: 1.5;
}
.lr-pick-row:hover { background: var(--surface-alt); }
.lr-pick-row input { margin-top: 3px; flex: none; }
.lr-pick-actions { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }
.popup-btn {
  font-size: 14px; padding: 7px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text);
}
.popup-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.popup-btn.danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.popup-btn:hover { opacity: .9; }

/* ── 反馈表单 ── */
.fb-hint { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; line-height: 1.6; }
.fb-select {
  width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 14px; margin-bottom: 10px;
}
.fb-textarea {
  width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font-size: 14px; line-height: 1.6; resize: vertical; font-family: inherit;
}
.fb-actions { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.fb-msg { font-size: 13px; color: var(--brand); margin-right: auto; }

/* ── 云同步设置 ── */
.sync-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.sync-row b.sync-st-on { color: #16a34a; }
.sync-row b.sync-st-off { color: var(--text-soft); }
.fb-input {
  width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font-size: 16px; letter-spacing: 2px; font-family: inherit;
}

/* ── 首页（合集块）── 启动默认视图，与工作区正交：body.home 时隐藏 .layout */
body:not(.home) #homeView { display: none; }   /* 工作区时隐藏首页 */
body.home .layout { display: none; }
body.home .crumb { display: none; }                    /* 首页不显示章节 crumb */
body.home #homeBtn { display: none; }                  /* 首页无需「回首页」按钮 */
body.home .topbar-actions { margin-left: auto; }       /* 首页反馈+设置推到最右（crumb 隐藏后无占位元素） */
body.home #menuBtn { display: none; }                  /* ☰ 只服务工作区导航 */
body.home #modePill { display: none; }                 /* 首页是第三种态，隐藏读经|研读 pill */
body.home #viewModeBtn, body.home #hideMarksBtn,
body.home #studyFullBtn { display: none !important; }
body.home .mobile-nav { display: none; }
#homeView {
  position: fixed; inset: 52px 0 0; z-index: 20;       /* 顶栏 z30 之上、popup z60 之下 */
  background: var(--page-bg); overflow-y: auto; padding: 24px 16px 40px;
}
.home-wrap { max-width: 640px; margin: 0 auto; }
.home-search { position: relative; }
.home-search input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 16px; background: var(--surface);
  color: var(--text); outline: none;
}
.home-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15); }
#homeSearchResults {
  margin-top: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; display: none;
}
#homeSearchResults:not(:empty) { display: block; }
.home-sr-item {
  padding: 10px 14px; cursor: pointer; font-size: 14px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.home-sr-item:last-child { border-bottom: none; }
.home-sr-item:hover { background: var(--surface-alt); }
.home-sr-item .sr-loc { color: var(--text-muted); margin-right: 8px; font-size: 13px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 24px; }
.home-block {
  aspect-ratio: 1/1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.home-block:hover { border-color: var(--brand); transform: translateY(-2px); }
.home-block-icon { font-size: 40px; line-height: 1; }
.home-block-title { font-size: 16px; font-weight: 600; color: var(--heading); }

/* 首页「最近阅读」（反馈 #16）：合集块下方的极简行列表（无卡片底，仅细分隔线） */
.home-hist { margin-top: 26px; }
.home-hist:empty { display: none; }
.home-hist-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px; }
.home-hist-title { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: .5px; }
.home-hist-more {
  border: none; background: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--brand);
}
.home-hist-more:hover { text-decoration: underline; }
.home-hist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; cursor: pointer; border-bottom: 1px solid var(--border);
}
.home-hist-item:last-child { border-bottom: none; }
.home-hist-item .t {
  flex: 1; min-width: 0; font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-hist-item .sub { flex: none; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.home-hist-item:hover .t { color: var(--brand); }

/* 我的笔记：本章|全部 范围切换 */
.note-scope { display: flex; gap: 8px; margin: 2px 0 10px; }
.note-scope-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  padding: 4px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
}
.note-scope-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ── 阅读器模块容器切换（默认 bible；body-mod-lifereading / body-mod-books / body-mod-morning / body-mod-notes 切换） ── */
/* 层级导航已统一走停靠抽屉 #navDrawer：左栏仅剩笔记管理分类树（.nav-col 默认 display:none） */
#lrMain, #lrSide, #bookMain, #bookSide, #morningMain, #morningSide,
#notesMain, #notesSide { display: none; }
.body-mod-notes .nav-col { display: flex; }
.body-mod-lifereading #chapterTheme, .body-mod-lifereading #verseContainer { display: none; }
.body-mod-lifereading #studyTabs, .body-mod-lifereading #studyBody { display: none; }
.body-mod-lifereading #lrMain { display: block; }
.body-mod-lifereading #lrSide { display: flex; flex-direction: column; min-height: 0; }
.body-mod-books #chapterTheme, .body-mod-books #verseContainer { display: none; }
.body-mod-books #studyTabs, .body-mod-books #studyBody { display: none; }
.body-mod-books #bookMain { display: block; }
.body-mod-books #bookSide { display: flex; flex-direction: column; min-height: 0; }
.body-mod-morning #chapterTheme, .body-mod-morning #verseContainer { display: none; }
.body-mod-morning #studyTabs, .body-mod-morning #studyBody { display: none; }
.body-mod-morning #morningMain { display: block; }
.body-mod-morning #morningSide { display: flex; flex-direction: column; min-height: 0; }
/* 生命读经/书报/晨兴模块：顶栏留 ⚙️ + 反馈（双页/隐藏注号/研读全屏/笔记隐藏；翻章按钮无意义） */
.body-mod-lifereading #viewModeBtn, .body-mod-lifereading #hideMarksBtn, .body-mod-lifereading #studyFullBtn { display: none !important; }
.body-mod-lifereading .crumb-nav { display: none; }
.body-mod-books #viewModeBtn, .body-mod-books #hideMarksBtn, .body-mod-books #studyFullBtn { display: none !important; }
.body-mod-books .crumb-nav { display: none; }
.body-mod-morning #viewModeBtn, .body-mod-morning #hideMarksBtn, .body-mod-morning #studyFullBtn { display: none !important; }
.body-mod-morning .crumb-nav { display: none; }
.body-mod-notes #chapterTheme, .body-mod-notes #verseContainer { display: none; }
.body-mod-notes #studyTabs, .body-mod-notes #studyBody { display: none; }
.body-mod-notes #notesMain { display: block; }
.body-mod-notes #notesSide { display: flex; flex-direction: column; min-height: 0; }
.body-mod-notes #viewModeBtn, .body-mod-notes #hideMarksBtn, .body-mod-notes #studyFullBtn { display: none !important; }
.body-mod-notes .crumb-nav { display: none; }

/* 生命读经阅读器：右栏（纲目|笔记） */
.lr-side-tabs { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex: none; }
.lr-side-tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  padding: 4px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
}
.lr-side-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.lr-side-body { flex: 1; overflow-y: auto; min-height: 0; padding: 12px; }
.lr-side-body .lr-outline-group { margin-bottom: 12px; }
.lr-side-body .lr-toc-item { padding: 5px 8px; font-size: calc(13px * var(--reading-scale)); color: var(--text); cursor: pointer; border-radius: 6px; line-height: 1.6; }
.lr-side-body .lr-toc-item:hover { background: var(--surface-alt); }
.lr-side-body .lr-toc-item.active { color: var(--brand); font-weight: 600; }
.lr-side-body .lr-toc-l1 { font-weight: 600; }
.lr-note-ta {
  width: 100%; min-height: 140px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px; font-size: calc(14px * var(--reading-scale));
  resize: vertical; font-family: inherit; color: var(--text); background: var(--surface);
}
.lr-main { padding: 16px 20px; }
.lr-main .lr-item { margin-bottom: 8px; }

/* 模块级搜索结果条目前的来源前缀（卷名/期名，弱化处理；现用于停靠抽屉搜索结果） */
.nav-result-loc { font-size: 11px; color: var(--text-muted); margin-right: 6px; flex-shrink: 0; }

/* 书报阅读器：主区 + 右栏 */
.bk-main { padding: 16px 20px; }
.bk-title { font-size: calc(17px * var(--reading-scale)); font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.bk-para { font-size: calc(15px * var(--reading-scale)); line-height: var(--reading-lh); color: var(--text); margin-bottom: 6px; }
.bk-toc-item {
  display: block; width: 100%; text-align: left; padding: 7px 10px;
  border: none; background: transparent; border-bottom: 1px solid var(--border);
  cursor: pointer; font-size: 13px; color: var(--text); line-height: 1.5;
}
.bk-toc-item:hover { background: var(--surface-alt); }
.bk-toc-item.active { background: rgba(102,126,234,.1); color: var(--brand); font-weight: 600; }

/* 晨兴阅读器：主区 + 右栏 */
.morning-main { padding: 16px 20px; }
.morning-title { font-size: calc(17px * var(--reading-scale)); font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.morning-scripture { font-size: calc(13px * var(--reading-scale)); color: var(--text-muted); margin-bottom: 12px; }
/* 听抄排版：照抄晨读 app message-page（renderer.js renderMessageSection / css .section-level*）
   段落两端对齐 + 2em 首行缩进；层级标题字号/字重/左缩进递进（lr-h0 短行小标题用基础样式），无卡片 */
.morning-content { font-size: calc(15px * var(--reading-scale)); text-align: justify; }
.morning-para {
  margin: 14px 0;
  padding-inline: 0.3em;
  text-indent: 2em;
  color: var(--text);
  line-height: var(--reading-lh);
  text-align: justify;
}
.morning-head {
  font-weight: 600;
  color: var(--heading);
  margin: 13px 0 8px;
  line-height: 1.6;
  text-align: justify;
  padding-left: 10px;
}
.morning-head.lr-h1 { font-size: 1.06em; font-weight: 650; margin: 16px 0 10px; }
.morning-head.lr-h2 { font-size: 1.03em; font-weight: 600; margin: 13px 0 8px; margin-left: 8px; }
.morning-head.lr-h3 { font-size: 1.02em; font-weight: 540; margin: 11px 0 8px; margin-left: 16px; }
.morning-head.lr-h4 { font-size: 1.00em; font-weight: 500; margin: 9px 0 6px; margin-left: 24px; }
.morning-head.lr-h5, .morning-head.lr-h6, .morning-head.lr-h7,
.morning-head.lr-h8, .morning-head.lr-h9, .morning-head.lr-h10 {
  font-size: .97em; font-weight: 450; margin: 7px 0 5px; margin-left: 32px;
}

/* ── 笔记管理模块：左栏分类树 / 主区工具条+列表+批量 / 右栏编辑面板 ── */
.notes-nav { padding: 8px 6px; overflow-y: auto; }
/* 移动端：分类树整体渲染进统一导航抽屉 #dwBody（见 app.js notesTreeTarget）→ 撑满并自身滚动 */
#dwBody > .notes-tree { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 6px; }
.notes-tree-node {
  display: flex; align-items: center; gap: 6px; width: 100%;
  text-align: left; padding: 6px 8px; border: none; background: transparent;
  border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text); line-height: 1.5;
}
.notes-tree-node:hover { background: var(--surface-alt); }
.notes-tree-node.active { background: rgba(102,126,234,.1); color: var(--brand); font-weight: 600; }
.notes-tree-node .notes-caret {
  width: 14px; flex: none; color: var(--text-muted); font-size: 11px; text-align: center;
}
.notes-tree-node .notes-count {
  margin-left: auto; font-size: 11px; color: var(--text-muted);
  background: var(--surface-alt); border-radius: 999px; padding: 0 7px; flex: none;
}
.notes-tree-children { padding-left: 12px; }
.notes-tree-children[hidden] { display: none; }
.notes-tree-empty { color: var(--text-muted); font-size: 13px; padding: 14px 10px; }

.notes-main { padding: 14px 18px; }
.notes-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.notes-tab {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); cursor: pointer; font-size: 13px; color: var(--text-soft);
}
.notes-tab:hover { border-color: var(--brand); }
.notes-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.notes-color {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border);
  cursor: pointer; flex: none; background: var(--surface); font-size: 11px; color: var(--text-soft);
}
.notes-color.active { outline: 2px solid var(--brand); outline-offset: 1px; }
.notes-search {
  flex: 1; min-width: 140px; padding: 5px 10px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 13px; color: var(--text); background: var(--surface);
}
.notes-sort {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: 13px; color: var(--text-soft); cursor: pointer;
}
.notes-sort.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.notes-list { padding-bottom: 12px; }
.notes-group {
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  margin: 12px 0 4px; padding-left: 2px;
  display: flex; align-items: center; gap: 8px;
}
.notes-group .notes-group-check { margin-left: auto; font-size: 12px; color: var(--brand); cursor: pointer; font-weight: 400; }
.notes-item {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 6px;
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.notes-item:hover { border-color: var(--brand); }
.notes-item.selected { border-color: var(--brand); background: rgba(102,126,234,.06); }
.notes-item-check { flex: none; align-self: center; }
.notes-item-time { flex: none; font-size: 11px; color: var(--text-muted); align-self: center; }
.notes-item-kind { flex: none; font-size: 12px; align-self: center; }
.notes-empty { color: var(--text-muted); font-size: 14px; padding: 24px 6px; }
.notes-batch-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 8px; align-items: center; padding: 8px 10px; margin-bottom: 10px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px;
}
.notes-batch-bar .popup-btn { padding: 4px 12px; font-size: 13px; }

.notes-side { padding: 12px; overflow-y: auto; }
/* 移动端编辑面板返回条：桌面隐藏（见 @media max-width:900px 内 body.body-mod-notes 规则） */
.notes-backbar { display: none; }
/* 移动端「筛选」弹窗（颜色 + 排序，复用 openPopup 弹窗栈） */
.notes-fp-sec { margin-bottom: 14px; }
.notes-fp-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.notes-fp-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.notes-fp-color {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border); cursor: pointer; font-size: 12px; color: var(--text-soft);
}
.notes-fp-color.active { box-shadow: 0 0 0 2px var(--brand); }
.notes-fp-sorts { display: flex; gap: 8px; }
.notes-panel-title { font-weight: 700; color: var(--heading); font-size: 15px; margin-bottom: 10px; }
.notes-panel-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.notes-panel-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.6; }
.notes-panel-text {
  font-size: 14px; color: var(--text); background: var(--surface-alt);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 10px; line-height: 1.7;
}
/* 未选中条目空状态：居中浅灰图标 + 引导文案 */
.notes-panel-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 48px 16px; text-align: center; color: #c3c8d0;
}
.notes-panel-empty svg { opacity: .75; }
.notes-panel-empty-title { font-size: 14px; font-weight: 600; color: var(--text-soft); }
.notes-panel-empty-desc { font-size: 12px; color: var(--text-muted); line-height: 1.8; }

/* ── 移动端 ── */
@media (max-width: 900px) {
  /* 桌面视图模式（双页/上下/全屏）在移动端无意义：强制单列，中和残留的 view-* 类 */
  .layout { grid-template-columns: 1fr !important; grid-template-rows: auto !important; }
  .nav-col, .text-col, .study-col { grid-column: 1 !important; grid-row: auto !important; }
  .layout.view-full .nav-col,
  .layout.view-full .study-col { display: flex !important; }
  .resize-handle { display: none !important; }

  /* 排版面板：移动端底部 sheet（覆盖 .notemodal 的居中 flex） */
  #typoModal { align-items: flex-end; }
  .typo-card {
    width: 100%; max-width: none; border-radius: 16px 16px 0 0;
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
  }
  .typo-grab { display: block; width: 38px; height: 4px; border-radius: 2px; background: #d8dce8; margin: 8px auto 0; }
  .typo-row { padding: 13px 16px; }
  .typo-val { flex-basis: 78px; }

  /* 读经模块左栏已由统一导航抽屉取代（桌面两列隐藏、移动端直接不显示） */
  .nav-col { display: none; }

  /* 底部导航：读经模式翻页（研读模式隐藏，见 body.mobile-study 规则） */
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    height: 52px; background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* 仅读经模块显示：其余模块（生命读经/书报/听抄/笔记管理）无「章」概念，
     按钮却仍绑 selectChapter → 会静默改掉圣经章号并写坏 crumb */
  body:not(.body-mod-bible) .mobile-nav { display: none; }
  .mnav-btn {
    flex: 1; height: 100%; border: none; background: transparent;
    font-size: 15px; color: var(--text); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .mnav-btn:active { background: var(--surface-alt); }
  .mnav-btn:disabled { color: var(--text-muted); opacity: .45; cursor: default; }

  /* 研读视图：全屏覆盖，默认藏起；切到「研读」显示（与读经二选一） */
  .study-col {
    position: fixed; left: 0; right: 0; top: 52px; z-index: 40;
    bottom: calc(52px + env(safe-area-inset-bottom));
    width: auto; border-left: none;
    transform: translateX(100%); transition: transform .2s;
  }
  .study-col.open { transform: translateX(0); }
  body.mobile-study .study-col { transform: translateX(0); }
  body.mobile-study .text-col { display: none; }

  /* 研读模式沉浸化：无底部导航，内容延伸到屏幕底（safe-area 由 study-body 内边距兜底） */
  body.mobile-study .mobile-nav { display: none; }
  body.mobile-study .study-col { bottom: 0; }
  body.mobile-study .study-body { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }

  /* ── 笔记管理模块（≤900px，2026-09-11 方案 B）：单列 + 编辑面板走全屏 push ── */
  /* 该模块不使用「读经|研读」pill：列表 → 编辑改由「点条目 push + 返回条」承担
     （Material 3：窄屏 pane 切换走返回栈；NN/g：长时停留/复杂内容不用 overlay） */
  body.body-mod-notes #modePill { display: none; }
  /* 分类树改由统一导航抽屉承担（桌面仍用左栏 #navCol 树） */
  body.body-mod-notes .nav-col { display: none; }
  /* 编辑面板顶部返回条（仅移动端 notes 显示） */
  body.body-mod-notes .notes-backbar {
    display: flex; align-items: center; flex: 0 0 auto;
    padding: 6px 10px; background: var(--surface); border-bottom: 1px solid var(--border);
  }
  #notesBackBtn {
    height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--brand); font-size: 14px; font-weight: 600; cursor: pointer;
  }
  #notesBackBtn:active { background: var(--surface-alt); }
  /* 工具条收敛：第 1 行「搜索 + 筛选」，第 2 行「来源 chips（可横滑）+ 多选」 */
  .notes-toolbar-mobile { flex-direction: column; align-items: stretch; gap: 8px; }
  .notes-toolbar-mobile .notes-row { display: flex; gap: 6px; align-items: center; }
  .notes-toolbar-mobile .notes-search { flex: 1; min-width: 0; }
  .notes-toolbar-mobile .notes-tabs-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
  .notes-toolbar-mobile .notes-tabs-row::-webkit-scrollbar { display: none; }
  .notes-toolbar-mobile .notes-tab,
  .notes-toolbar-mobile .notes-sort,
  .notes-toolbar-mobile .notes-filter-btn { flex: 0 0 auto; white-space: nowrap; }
  /* 当前分组标签（可一键清除） */
  .notes-group-chip {
    display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
    margin: 0 0 8px; padding: 5px 10px; border-radius: 999px;
    background: rgba(var(--brand-rgb), .12); color: var(--brand); font-size: 13px;
  }
  .notes-group-chip-x {
    border: 0; background: transparent; color: var(--brand);
    font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px;
  }
  /* 批量条改底部固定（拇指可达；原为列表顶部 sticky） */
  body.body-mod-notes .notes-batch-bar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 46;
    margin: 0;   /* 基础规则带 margin-bottom:10px，会把 fixed 底边顶上去 */
    border-top: 1px solid var(--border); border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 14px rgba(0, 0, 0, .06);
  }

  .text-col { padding: 16px 16px calc(68px + env(safe-area-inset-bottom)); }
  /* 生命读经模块主区（反馈 #11，方案 A 定稿）：移动端去掉外层 .lr-item 文章卡片，
     段落卡片直接沿用原 .lr-para 样式（不加新背景/阴影覆盖）——与桌面同为段落卡观感 */
  body.body-mod-lifereading .text-col { padding: 10px 10px calc(60px + env(safe-area-inset-bottom)); }
  body.body-mod-lifereading .lr-main { padding: 2px; }
  body.body-mod-lifereading #lrMain .lr-item {
    background: transparent; border: none; box-shadow: none; padding: 0;
  }

  /* 顶栏重构：☰ 左 · 标题(点击选章) 居中 · 读经|研读 pill + ⚙️ 右；次要操作收进设置菜单 */
  #viewModeBtn, #studyFullBtn, #hideMarksBtn, #feedbackBtn { display: none !important; }
  .mode-pill {
    display: flex; background: rgba(255,255,255,.16);
    border-radius: 999px; padding: 2px; margin-right: 2px;
  }
  .mode-pill-btn {
    border: none; background: transparent; color: rgba(255,255,255,.85);
    font-size: 13px; padding: 4px 10px; border-radius: 999px; cursor: pointer;   /* 10px（原 12）：给 Aa 挤出的右侧空间找回 8px 标题宽度 */
  }
  .mode-pill-btn.active { background: #fff; color: var(--brand-dark); font-weight: 600; }
  #settingsBtn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -4px;
  }
  #setViewMode { display: none; }   /* 移动端无视图模式 */
  .crumb {
    /* 右侧让位：pill（读经|研读） + Aa 排版 + ⚙️，共约 216px；原 174 只让了 pill+⚙️，
       加 Aa 后 crumb 会压进 pill 区域（标题被遮） */
    position: absolute; left: 44px; right: 210px; top: 0; bottom: 0;
    justify-content: center; gap: 4px; font-size: 16px; white-space: nowrap;
    overflow: hidden;   /* 超窄屏标题省略 */
    cursor: pointer;   /* 移动端点击弹章节选择 */
  }
  .crumb .crumb-nav { display: none; }   /* 翻页移至底部导航 */
  .topbar-actions { gap: 2px; margin-left: auto; position: relative; z-index: 2; }   /* crumb 绝对定位后：推到最右 + 盖在其上层避免拦截点击 */
  #menuBtn { width: 44px; height: 44px; margin-left: -6px; }
  #homeBtn { width: 44px; height: 44px; margin-left: -6px; }
  .crumb { left: 88px; }   /* 原 44px：让位给常驻 ⌂ 首页按钮 */

  /* 首页移动端：合集块缩小（360px 约 3 列），底部留安全区 */
  #homeView { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .home-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin-top: 20px; }
  .home-block { border-radius: 14px; gap: 6px; }
  .home-block-icon { font-size: 30px; }
  .home-block-title { font-size: 14px; }

  /* 生命读经全屏：隐藏纲目侧栏，正文占满 */
  .lr-full-wrap { grid-template-columns: 1fr !important; }
  .lr-outline { display: none !important; }

  /* 划线工具条移动端紧凑化（5色+按钮单行放不下会 flex 收缩挤压文字）：
     圆点/按钮不收缩，放不下时整体换行（不挤压文字） */
  .floattool {
    padding: 4px; gap: 4px; flex-wrap: wrap; justify-content: center;
    max-width: calc(100vw - 16px);
  }
  .floattool .sw, .floattool .tool-btn, .floattool .tool-sep { flex-shrink: 0; }
  .floattool .sw { width: 24px; height: 24px; }
  .floattool .tool-btn { padding: 3px 7px; font-size: 13px; }
}
