/* 书报合辑阅读器 UI —— 参照 微信读书 / Apple Books 的阅读体验。
   接管阅读表面：隐藏旧的深色章节条与棕色«»键，改用简约行内章节头 + 收窄阅读栏 + 底部翻篇。
   护眼四主题 + 字号 + 行距 + 底部设置弹层。作用域挂在 html[data-bk-*] / html.bk-ready 上，
   JS 未接管前(无 bk-ready)旧版面照常显示 —— 渐进增强。 */

/* ── 四主题色板（本站棕/金身份；正文色加深保证对比度） ──────────── */
html[data-bk-theme="paper"]{
  --bk-bg:#f7f4ee; --bk-fg:#17150f; --bk-sub:#33291b; --bk-link:#875321;
  --bk-sheet:#ffffff; --bk-sheetfg:#17150f; --bk-muted:#867d70; --bk-line:#e6dfd3;
  --bk-fill:#f0ece3; --bk-gold:#b07d2a;
}
html[data-bk-theme="sepia"]{
  --bk-bg:#f3ecda; --bk-fg:#221a0e; --bk-sub:#453117; --bk-link:#7a481a;
  --bk-sheet:#fdf8ee; --bk-sheetfg:#221a0e; --bk-muted:#9c8d69; --bk-line:#e6d9c1;
  --bk-fill:#ece0c9; --bk-gold:#a5761f;
}
html[data-bk-theme="green"]{
  --bk-bg:#e6efe0; --bk-fg:#152210; --bk-sub:#2f4321; --bk-link:#3c6a2b;
  --bk-sheet:#f0f6ec; --bk-sheetfg:#152210; --bk-muted:#7d8b6d; --bk-line:#d5e1ce;
  --bk-fill:#dde9d6; --bk-gold:#6a9040;
}
html[data-bk-theme="night"]{
  --bk-bg:#15171b; --bk-fg:#d3ccbe; --bk-sub:#e4dccb; --bk-link:#d3b479;
  --bk-sheet:#22262c; --bk-sheetfg:#d3ccbe; --bk-muted:#8b8578; --bk-line:#31353c;
  --bk-fill:#2b2f36; --bk-gold:#d0b070;
}

/* ── 底色 ──────────────────────────────────────────────── */
html[data-bk-theme]{ background:var(--bk-bg) !important; }
html[data-bk-theme] body{ background:var(--bk-bg) !important; }

/* ── 接管：隐藏旧章节条/«»键/回首页链/旧sticky条 ────────────────── */
html.bk-ready #bk-root > .header--fixed,
html.bk-ready #bk-root > .feature,
html.bk-ready #bk-root #toptitle,
html.bk-ready #bk-chapbar{ display:none !important; }

/* ── 行内章节头（Apple Books 式：书名·目录 / 篇号 / 标题 / 分隔线） ── */
.bk-chead{ max-width:700px; margin:0 auto; padding:40px 24px 4px; text-align:center;
  font:400 15px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
.bk-chead .bk-book{ display:inline-block; margin-bottom:24px; font-size:16.5px; letter-spacing:.02em;
  color:var(--bk-sub); text-decoration:none; }
.bk-chead .bk-book:hover{ color:var(--bk-gold); }
.bk-chead .bk-book b{ font-weight:700; color:var(--bk-fg); }
.bk-chead .bk-eye{ font-size:15px; font-weight:600; letter-spacing:.4em; text-indent:.4em;
  color:var(--bk-gold); margin-bottom:16px; }
.bk-chead .bk-h1{ margin:0 0 26px; font-weight:600; line-height:1.34; color:var(--bk-fg);
  font-size:clamp(23px,5.4vw,29px); letter-spacing:-.01em;
  font-family:"Songti SC","STSong",Georgia,"Microsoft YaHei",serif; }
.bk-chead .bk-rule{ width:40px; height:3px; border-radius:2px; background:var(--bk-gold); margin:0 auto; opacity:.85; }

/* ── 阅读栏：收窄居中 + 舒适排版 + 强对比 ─────────────────────── */
html.bk-ready #bk-root .main{ max-width:700px; margin:0 auto; padding:22px 24px 8px; box-sizing:border-box;
  color:var(--bk-fg) !important;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
html[data-bk-theme] #bk-root .main{ letter-spacing:.005em; }
/* 正文用普通抗锯齿(非antialiased), CJK 笔画更实、更黑, 不发灰 */
html.bk-ready #bk-root .main, html.bk-ready #bk-root .cont, html.bk-ready #bk-root .cn1{
  -webkit-font-smoothing:auto !important; -moz-osx-font-smoothing:auto !important; }
html[data-bk-theme] #bk-root .cont{ color:var(--bk-fg) !important; margin:.32em 0 !important;
  text-indent:2em; text-align:left; }
html[data-bk-theme] #bk-root .cn1{ color:var(--bk-fg) !important; display:block;
  margin:1.7em 0 .6em !important; padding-left:13px; font-size:1.05em; font-weight:600; line-height:1.5;
  border-left:3px solid var(--bk-gold); text-indent:0; }
html[data-bk-theme] #bk-root .main a{ color:var(--bk-link) !important; }

/* ══════════ 老式「编号＋正文」两栏纲目(约一万篇文章的 content 里内联写死 display:flex) ══════════
   原样式在手机上有两个毛病：
   ① 正文那一栏是 flex item, 窄屏被 shrink 成 5~6 个字一行, 右边大片留白;
   ② 外层 .cont 的 text-indent:2em 继承进两个子 div, 把编号和正文各推开 2em, 中间空一大块。
   → 一律改成「悬挂缩进」: 编号绝对定位在左, 正文占满整行宽度, 换行与首行对齐。 */
html[data-bk-theme] #bk-root [style*="display:flex"]:not(.bk-ui):not([class*="bk-"]){
  display:block !important; position:relative;
  text-indent:0 !important; padding-left:2.2em; margin:.5em 0;
}
html[data-bk-theme] #bk-root [style*="display:flex"]:not([class*="bk-"]) > div{
  display:inline !important; text-indent:0 !important;
}
/* 编号: 悬挂在左, 用主题金色标出层级, 与正文黑字分开 */
html[data-bk-theme] #bk-root [style*="display:flex"]:not([class*="bk-"]) > div:first-child{
  position:absolute; left:0; top:0; display:block !important;
  min-width:1.9em; padding-right:.3em; text-align:left;
  color:var(--bk-gold) !important; font-weight:700;
}
/* 一级(.cn1 贰/叁…)本身已是带左金条的标题块: 编号跟标题同排, 不再额外悬挂 */
html[data-bk-theme] #bk-root .cn1[style*="display:flex"]{ padding-left:13px; }
html[data-bk-theme] #bk-root .cn1[style*="display:flex"] > div:first-child{
  position:static; display:inline !important; min-width:0; padding-right:.45em;
}
/* 二级(.l2 一/二/三)与三级(.l3 1/2/3): 层级靠缩进与字号区分, 不再各自加粗放大 */
html[data-bk-theme] #bk-root .l2[style*="display:flex"]{ font-size:1em; font-weight:600; margin:.7em 0 .35em; }
html[data-bk-theme] #bk-root .l3[style*="display:flex"]{ font-size:1em; font-weight:400; margin:.4em 0 .4em 1.1em; }
html[data-bk-theme] #bk-root .l3[style*="display:flex"] > div:first-child{ font-weight:600; }
/* 经文弹窗里的「节号＋经文」也是同一种两栏结构 */
html[data-bk-theme] #bk-root .modal-body [style*="display:flex"]{ padding-left:2.4em; }

/* 2041/圣经课程新增的经文弹窗：沿用既有书报阅读器的克制金色层级，
   但隔离文章纲目的悬挂缩进，避免节号把经文挤成窄列。 */
#bk-root .modal[id^="lr2041_"]{ padding:0 12px !important; }
#bk-root .modal[id^="lr2041_"] .modal-dialog{
  width:min(100%,440px); margin:24px auto;
}
#bk-root .modal[id^="lr2041_"] .modal-content{
  display:flex; flex-direction:column; max-height:calc(100dvh - 48px); overflow:hidden;
  border:1px solid var(--bk-line,#e6dfd3); border-radius:10px;
  background:var(--bk-sheet,#fff); color:var(--bk-sheetfg,#17150f);
  box-shadow:0 20px 54px rgba(34,27,18,.24);
}
#bk-root .modal[id^="lr2041_"] .modal-header{
  position:relative; display:flex; min-height:74px; align-items:center; justify-content:center;
  padding:15px 58px 14px; border-bottom:1px solid var(--bk-line,#e6dfd3);
}
#bk-root .modal[id^="lr2041_"] .modal-title{
  margin:0; color:var(--bk-link,#875321); font-size:clamp(22px,5.6vw,28px);
  font-weight:500; line-height:1.35; text-align:center;
  font-family:"Songti SC","STSong","Noto Serif CJK SC",serif;
}
#bk-root .modal[id^="lr2041_"] .modal-header .close{
  position:absolute; top:50%; right:10px; width:44px; height:44px; margin:0; padding:0;
  transform:translateY(-50%); border:0; background:transparent; color:var(--bk-muted,#867d70);
  font-size:30px; font-weight:500; line-height:44px; opacity:1;
}
#bk-root .modal[id^="lr2041_"] .modal-body{
  min-height:0; max-height:calc(100dvh - 122px); padding:22px 20px 28px; overflow-y:auto;
  color:var(--bk-sheetfg,#17150f); font-size:clamp(20px,5.2vw,24px); line-height:1.9;
  letter-spacing:.01em; text-align:left; -webkit-overflow-scrolling:touch;
}
#bk-root .modal[id^="lr2041_"] .modal-body > [style*="display:flex"]{
  display:grid !important; position:relative !important;
  grid-template-columns:2.15em minmax(0,1fr); gap:.2em;
  margin:0 0 .55em !important; padding:0 !important; text-indent:0 !important;
}
#bk-root .modal[id^="lr2041_"] .modal-body > [style*="display:flex"] > div{
  display:block !important; position:static !important; min-width:0; padding:0 !important;
  text-indent:0 !important;
}
#bk-root .modal[id^="lr2041_"] .modal-body > [style*="display:flex"] > div:first-child{
  color:var(--bk-gold,#b07d2a) !important; font-weight:650; text-align:left;
}

/* ── 目录/分类列表页（booklists，微信读书式 + 固定页眉 + 跟随主题） ── */
/* ⚠️修复:booklists 页某处把 html/body 高度锁成 ~52px，导致长列表被顶到视口上方看不到开头。强制 auto。 */
html.bk-toc, html.bk-toc body{ height:auto !important; min-height:100% !important; }
html.bk-toc #bk-root > .header--fixed, html.bk-toc #bk-root #toptitle,
html.bk-toc-ready #bk-root .feature{ display:none !important; }

/* 顶部空间：手机让出页眉条56；桌面让出站导56+页眉条56 */
html.bk-toc-ready body{ padding-top:56px !important; }
@media (min-width:900px){ html.bk-toc-ready body{ padding-top:112px !important; } }

/* 固定页眉条 */
#bk-tbar{ position:fixed; left:0; right:0; top:0; z-index:1000; min-height:56px; box-sizing:border-box;
  display:flex; align-items:center; gap:6px; padding:7px 14px;
  background:var(--bk-sheet,#fff); color:var(--bk-sheetfg,#17150f); border-bottom:1px solid var(--bk-line,#e6dfd3);
  box-shadow:0 2px 16px rgba(40,24,8,.06);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
@media (min-width:900px){ #bk-tbar{ top:56px; padding:7px 24px; } }
.bk-tbk{ flex:0 0 auto; display:flex; align-items:center; gap:1px; border:none; background:none; cursor:pointer;
  color:var(--bk-link,#7a481a); font-size:16px; padding:6px 8px 6px 2px; border-radius:10px; -webkit-tap-highlight-color:transparent; }
.bk-tbk svg{ width:24px; height:24px; } .bk-tbk:active{ background:var(--bk-fill,#f0ece3); }
.bk-tt{ flex:1; min-width:0; text-align:center; }
.bk-tt1{ font-size:16.5px; font-weight:600; color:var(--bk-sheetfg,#17150f); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bk-tt2{ font-size:12px; color:var(--bk-muted,#867d70); margin-top:1px; }
.bk-tsp{ flex:0 0 auto; width:58px; }

/* 撤掉旧表格 + 站内浮动钮（目录页让位） */
html.bk-toc #bk-root #list{ display:none !important; }
html.bk-toc #_lrfab, html.bk-toc #_lrfabx, html.bk-toc #tts-btn{ display:none !important; }
html.bk-toc #bk-root div[style*="padding"]{ padding:0 !important; }

/* 内容容器 */
#bk-tocwrap{ max-width:720px; margin:0 auto; padding:0 0 52px; padding-top:70px;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
#bk-tocwrap:has(.bk-catbar){ padding-top:104px; }

/* 搜索固定在页眉下方；内容区预留同等高度，滚动时不跳位。 */
.bk-toctools{ position:fixed; top:56px; left:50%; z-index:900; width:min(720px,100%); box-sizing:border-box; transform:translateX(-50%); background:var(--bk-bg); padding:10px 16px 12px; }
@media (min-width:900px){ .bk-toctools{ top:112px; width:min(1080px,100%); padding:12px 16px 14px; } }
.bk-search{ display:flex; align-items:center; gap:10px; height:46px; margin:0; padding:0 15px; border:1px solid color-mix(in srgb,var(--bk-line) 84%,transparent); border-radius:999px; background:var(--bk-fill); color:var(--bk-muted); box-shadow:inset 0 1px 0 rgba(255,255,255,.25); }
.bk-search:focus-within{ border-color:color-mix(in srgb,var(--bk-gold) 55%,var(--bk-line)); box-shadow:0 0 0 3px color-mix(in srgb,var(--bk-gold) 12%,transparent); }
.bk-search svg{ width:19px; height:19px; flex:0 0 auto; }
.bk-search input{ flex:1; min-width:0; border:none; background:none; outline:none; font-size:16px; color:var(--bk-fg); -webkit-appearance:none; }
.bk-search input::placeholder{ color:var(--bk-muted); }
.bk-search input::-webkit-search-cancel-button{ display:none; -webkit-appearance:none; }
.bk-search-global{ cursor:text; }

/* 分类书架的全屏搜索：仅移植搜索层，避免书城全局样式覆盖分类主题。 */
html.book-search-open,html.book-search-open body{overflow:hidden}
.book-search-screen{display:none;position:fixed;inset:0;z-index:2147483000;height:100dvh;min-height:100dvh;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:var(--bk-bg,#f7f5f0);color:var(--bk-fg,#1f1d19)}
.book-search-screen.on{display:block}
.book-search-screen>header{display:flex;align-items:center;gap:10px;padding:calc(12px + env(safe-area-inset-top,0px)) 16px 12px;border-bottom:1px solid var(--bk-line,#ddd6ca);background:color-mix(in srgb,var(--bk-bg,#f7f5f0) 86%,#fff)}
.book-search-screen>header>button{width:42px;height:42px;border:0;background:transparent;color:var(--bk-fg,#1f1d19);font-size:32px;line-height:1}
.book-search-screen form{display:flex;flex:1;min-width:0;align-items:center;gap:8px;min-height:46px;padding:0 9px 0 14px;border-radius:999px;background:var(--bk-fill,#efebe2)}
.book-search-screen form>span{color:var(--bk-muted,#887e70);font-size:22px;transform:rotate(-18deg)}
.book-search-screen form input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--bk-fg,#1f1d19);font:inherit;font-size:16px}
.book-search-screen form button{min-height:36px;padding:0 12px;border:0;border-radius:18px;background:var(--bk-gold,#b98a2b);color:#fff;font:inherit;font-size:14px;font-weight:750}
.book-search-history{padding:24px 20px 40px}
.book-search-history__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.book-search-history__head h2{margin:0;font-size:18px;letter-spacing:.02em}
.book-search-history__head button{border:0;background:transparent;color:var(--bk-muted,#887e70);font:inherit;font-size:13px}
.book-search-history__item{display:flex;align-items:center;border-bottom:1px solid color-mix(in srgb,var(--bk-line,#ddd6ca) 72%,transparent)}
.book-search-history__item>button:first-child{display:flex;flex:1;min-width:0;align-items:center;gap:12px;min-height:54px;border:0;background:transparent;color:var(--bk-fg,#1f1d19);font:inherit;text-align:left}
.book-search-history__item>button:first-child span{color:var(--bk-muted,#887e70);font-size:17px}
.book-search-history__item b{overflow:hidden;font-size:15px;font-weight:550;text-overflow:ellipsis;white-space:nowrap}
.book-search-history__item>button:last-child{width:44px;height:44px;border:0;background:transparent;color:var(--bk-muted,#887e70);font-size:21px}
.book-search-history__empty{margin:58px 0;color:var(--bk-muted,#887e70);font-size:14px;text-align:center}
.book-search-confirm{position:fixed;inset:0;z-index:2147483640;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(31,29,25,.42)}
.book-search-confirm section{width:min(100%,350px);padding:24px;border-radius:20px;background:#fffdfa;box-shadow:0 18px 48px rgba(40,31,20,.18)}
.book-search-confirm h2{margin:0 0 9px;font-size:20px}
.book-search-confirm p{margin:0;color:var(--bk-muted,#887e70);font-size:14px;line-height:1.7}
.book-search-confirm section>div{display:flex;gap:10px;margin-top:20px}
.book-search-confirm button{flex:1;min-height:44px;border:1px solid var(--bk-line,#ddd6ca);border-radius:12px;background:#fffdfa;color:var(--bk-fg,#1f1d19);font:inherit;font-size:15px}
.book-search-confirm button.danger{border-color:#a9362e;background:#a9362e;color:#fff;font-weight:700}
@media(min-width:768px){.book-search-screen{display:none!important}}
.bk-qx{ border:none; background:none; color:var(--bk-muted); font-size:14px; cursor:pointer; width:22px; height:22px; }
.bk-filters{ display:flex; gap:8px; margin-top:10px; }
.bk-filters button{ border:none; cursor:pointer; font-size:13.5px; font-weight:600; padding:6px 15px; border-radius:16px; background:var(--bk-fill); color:var(--bk-muted); -webkit-tap-highlight-color:transparent; transition:background .15s,color .15s; }
.bk-filters button.on{ background:var(--bk-gold); color:#fff; }

/* 继续阅读卡 */
.bk-continue{ display:flex; align-items:center; gap:12px; margin:4px 16px 8px; padding:13px 14px; border-radius:14px; background:var(--bk-fill); text-decoration:none; box-shadow:0 1px 8px rgba(40,24,8,.05); }
.bk-cont-ic{ flex:0 0 auto; width:38px; height:38px; border-radius:50%; background:var(--bk-gold); color:#fff; display:flex; align-items:center; justify-content:center; font-size:15px; }
.bk-cont-x{ flex:1; min-width:0; }
.bk-cont-lbl{ font-size:11.5px; font-weight:700; letter-spacing:.09em; color:var(--bk-gold); }
.bk-cont-t{ font-size:15.5px; font-weight:600; color:var(--bk-fg); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bk-cont-ch{ width:8px; height:14px; color:var(--bk-muted); flex:0 0 auto; }

/* 分组小标题 */
.bk-sec-h{ font-size:12.5px; font-weight:700; letter-spacing:.1em; color:var(--bk-muted); padding:18px 20px 6px; }

/* 富信息行（两行式，微信读书风格） */
.bk-toclist{ padding:0 8px; }
.bk-item{ display:flex; align-items:center; gap:13px; padding:13px 6px 13px 12px; position:relative; text-decoration:none; border-radius:12px; -webkit-tap-highlight-color:transparent; }
.bk-item::after{ content:""; position:absolute; left:55px; right:8px; bottom:0; height:1px; background:var(--bk-line); }
.bk-item:last-child::after{ display:none; }
.bk-item:hover, .bk-item:active{ background:var(--bk-fill); }
.bk-it-idx{ flex:0 0 auto; width:30px; height:30px; border-radius:50%; background:var(--bk-fill); color:var(--bk-muted); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }
.bk-item.read .bk-it-idx{ background:var(--bk-gold); color:#fff; }
.bk-it-main{ flex:1; min-width:0; }
.bk-it-t{ font-size:16.5px; font-weight:600; color:var(--bk-fg); line-height:1.4; }
.bk-item.read .bk-it-t{ color:var(--bk-muted); font-weight:500; }
.bk-read-tag{ font-size:11px; font-weight:600; color:var(--bk-gold); margin-left:7px; white-space:nowrap; display:inline-block; }
.bk-it-sub{ font-size:12.5px; color:var(--bk-muted); margin-top:3px; }
.bk-star{ flex:0 0 auto; border:none; background:none; cursor:pointer; font-size:19px; line-height:1; color:var(--bk-muted); width:34px; height:34px; -webkit-tap-highlight-color:transparent; }
.bk-star.on{ color:var(--bk-gold); }
.bk-it-ch{ width:8px; height:14px; color:var(--bk-muted); flex:0 0 auto; opacity:.5; }
.bk-tocempty{ text-align:center; color:var(--bk-muted); padding:44px 20px; font-size:14px; }

/* 字号 6 档 —— ⭐统一作用于全部正文容器(.main / #c / .cont / 大纲 #title)，用固定 px。
   旧书 CSS 给 .cont/#c 各自的 em 放大(把默认顶到 25.5px，手机过大)；这里用 px !important 一律压平，
   全篇一个舒适尺寸。默认 fs=3 = 18.5px(手机舒适阅读)。 */
html[data-bk-fs="1"] #bk-root .main, html[data-bk-fs="1"] #bk-root #c, html[data-bk-fs="1"] #bk-root .cont, html[data-bk-fs="1"] #bk-root [id="title"]{ font-size:15.5px !important; }
html[data-bk-fs="2"] #bk-root .main, html[data-bk-fs="2"] #bk-root #c, html[data-bk-fs="2"] #bk-root .cont, html[data-bk-fs="2"] #bk-root [id="title"]{ font-size:17px !important; }
html[data-bk-fs="3"] #bk-root .main, html[data-bk-fs="3"] #bk-root #c, html[data-bk-fs="3"] #bk-root .cont, html[data-bk-fs="3"] #bk-root [id="title"]{ font-size:18.5px !important; }
html[data-bk-fs="4"] #bk-root .main, html[data-bk-fs="4"] #bk-root #c, html[data-bk-fs="4"] #bk-root .cont, html[data-bk-fs="4"] #bk-root [id="title"]{ font-size:20.5px !important; }
html[data-bk-fs="5"] #bk-root .main, html[data-bk-fs="5"] #bk-root #c, html[data-bk-fs="5"] #bk-root .cont, html[data-bk-fs="5"] #bk-root [id="title"]{ font-size:22.5px !important; }
html[data-bk-fs="6"] #bk-root .main, html[data-bk-fs="6"] #bk-root #c, html[data-bk-fs="6"] #bk-root .cont, html[data-bk-fs="6"] #bk-root [id="title"]{ font-size:25px !important; }
/* 内层文字容器一律继承外层字号(覆盖旧书 CSS 的 1.4em 等放大)，全篇一致 */
html.bk-ready #bk-root .main .cont, html.bk-ready #bk-root .main p, html.bk-ready #bk-root #c p,
html.bk-ready #bk-root [id="title"] > *{ font-size:1em !important; }
/* 行距 3 档：同样覆盖全部容器 */
html[data-bk-ls="1"] #bk-root .main, html[data-bk-ls="1"] #bk-root #c, html[data-bk-ls="1"] #bk-root .cont, html[data-bk-ls="1"] #bk-root [id="title"]{ line-height:1.7 !important; }
html[data-bk-ls="2"] #bk-root .main, html[data-bk-ls="2"] #bk-root #c, html[data-bk-ls="2"] #bk-root .cont, html[data-bk-ls="2"] #bk-root [id="title"]{ line-height:1.95 !important; }
html[data-bk-ls="3"] #bk-root .main, html[data-bk-ls="3"] #bk-root #c, html[data-bk-ls="3"] #bk-root .cont, html[data-bk-ls="3"] #bk-root [id="title"]{ line-height:2.3 !important; }

/* ── 大纲/纲目页(#title flex 两列：标号 + 内容) —— 标号列固定窄、内容列占满，舒适排版 ── */
html.bk-ready #bk-root [id="title"]{
  display:flex !important; align-items:baseline;
  margin:.4em 0 !important; padding:0 24px !important; max-width:700px;
  margin-left:auto !important; margin-right:auto !important;
  color:var(--bk-fg) !important; text-indent:0 !important; text-align:left !important;
}
html.bk-ready #bk-root [id="title"] > *:first-child{ flex:0 0 auto; min-width:1.4em; font-weight:700; white-space:nowrap; margin-right:.35em; }
html.bk-ready #bk-root [id="title"] > *:last-child{ flex:1 1 auto; min-width:0; }
html.bk-ready #bk-root [id="title"] a{ color:var(--bk-link,#7a481a) !important; }

/* ── 底部翻篇 ─────────────────────────────────────────────── */
.bk-pager{ max-width:720px; margin:10px auto 0; display:flex; align-items:center; justify-content:space-between;
  border-top:1px solid var(--bk-line); padding:14px 24px 20px; }
.bk-pager button{ display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:8px 2px;
  border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--bk-fg);
  font-size:14px; font-weight:500; line-height:1; font-family:inherit;
  cursor:pointer; -webkit-tap-highlight-color:transparent; transition:transform .14s; }
.bk-pager button:active{ transform:scale(.98); }
.bk-pager button:disabled{ opacity:.36; cursor:default; }
.bk-pager button svg{ width:17px; height:17px; color:var(--bk-gold); }

/* SPA 翻篇淡入 */
#bk-root{ animation:bkfade .24s ease; }
@keyframes bkfade{ from{opacity:.3} to{opacity:1} }

/* ═══ 阅读设置 UI ═══════════════════════════════════════════════ */
#bk-ui{ font:400 15px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased; }

/* 撤掉站内散落的浮动按钮，全部收进顶部工具条 */
html.bk-ready #tts-btn, html.bk-ready #_lrfab, html.bk-ready #_lrfabx{ display:none !important; }
/* 固定篇题页眉 52px + 工具条 64px；桌面另保留站点导航 56px */
html.bk-ready body{ padding-top:116px !important; }
html.bk-toolbar-hidden.bk-ready body{ padding-top:52px !important; }
@media (min-width:900px){
  html.bk-ready body{ padding-top:174px !important; }
  html.bk-toolbar-hidden.bk-ready body{ padding-top:108px !important; }
}

/* 固定篇题页眉：始终显示，返回与标题保持同一层级 */
#bk-reader-head{ position:fixed; left:0; right:0; top:0; z-index:1002; height:52px; box-sizing:border-box;
  display:flex; align-items:center; gap:2px; padding:0 12px 0 4px;
  background:var(--bk-sheet,#fff); color:var(--bk-sheetfg,#17150f); border-bottom:1px solid var(--bk-line,#e6dfd3); }
@media (min-width:900px){ #bk-reader-head{ top:56px; padding:0 24px; } }
.bk-reader-title{ flex:1 1 auto; min-width:0; min-height:44px; overflow-x:auto; overflow-y:hidden; text-overflow:clip; white-space:nowrap;
  overscroll-behavior-inline:contain; touch-action:pan-x; scrollbar-width:none; -webkit-overflow-scrolling:touch;
  border:0; background:transparent; padding:0 8px; color:var(--bk-sheetfg,#17150f); text-align:left;
  font:600 16px/1.25 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; letter-spacing:.01em; }
.bk-reader-title::-webkit-scrollbar{ display:none; }
.bk-reader-title-track{ display:inline-block; min-width:max-content; transform:translateX(0); }
.bk-reader-title.is-marquee{ overflow:hidden; touch-action:pan-y; }
.bk-reader-title.is-marquee .bk-reader-title-track{
  animation:bk-reader-title-marquee var(--bk-title-duration,10s) ease-in-out infinite alternate;
  will-change:transform;
}
@keyframes bk-reader-title-marquee{
  0%,14%{ transform:translateX(0); }
  86%,100%{ transform:translateX(var(--bk-title-shift,0)); }
}
@media (prefers-reduced-motion:reduce){
  .bk-reader-title.is-marquee{ overflow-x:auto; touch-action:pan-x; }
  .bk-reader-title.is-marquee .bk-reader-title-track{ animation:none; }
}

/* 功能工具条：阅读向下时自动隐藏，固定页眉不动 */
#bk-bar{ position:fixed; left:0; right:0; top:52px; z-index:1000; height:64px; box-sizing:border-box;
  display:flex; align-items:center; padding:0 8px;
  background:var(--bk-sheet,#fff); color:var(--bk-sheetfg,#17150f);
  border-bottom:1px solid var(--bk-line,#e6dfd3);
  box-shadow:0 2px 16px rgba(40,24,8,.06); transition:transform .32s cubic-bezier(.4,0,.2,1); }
#bk-bar.hide{ transform:translateY(-100%); }
@media (min-width:900px){ #bk-bar{ top:108px; height:66px; padding:0 24px; } }
body.modal-open #bk-bar, body.modal-open #bk-reveal{ display:none; }   /* 经文弹窗打开时让位 */

.bk-bb{ flex:0 0 auto; border:none; background:none; cursor:pointer; color:var(--bk-sheetfg,#17150f);
  border-radius:12px; display:flex; align-items:center; justify-content:center;
  -webkit-tap-highlight-color:transparent; transition:background .15s, transform .12s; }
.bk-bb:active{ background:var(--bk-fill,#f0ece3); transform:scale(.94); }
.bk-bb.bk-back{ flex:0 0 44px; width:44px; height:44px; min-height:44px; }
.bk-bb svg{ width:25px; height:25px; }
/* 图标+文字标签（苹果式，让人一看就懂） */
.bk-bb.bk-lb{ flex-direction:column; gap:3px; width:auto; min-width:52px; height:54px; padding:0 7px; }
.bk-bb.bk-lb svg{ width:23px; height:23px; }
.bk-lbl{ font-size:11px; font-weight:500; line-height:1; letter-spacing:.02em; color:var(--bk-muted,#867d70); }
.bk-aabtn .aa{ display:flex; align-items:baseline; height:23px; line-height:1; }
.bk-aabtn .aa span{ font-size:19px; font-weight:700; } .bk-aabtn .aa .sm{ font-size:12px; margin-left:-1px; opacity:.82; }
.bk-bar-acts{ display:flex; align-items:center; justify-content:space-evenly; gap:1px; flex:1 1 auto; min-width:0; overflow-x:auto; overscroll-behavior-inline:contain; }
.bk-bar-acts .bk-bb{ flex:0 0 auto; }
.bk-bb[data-act="bm"].on{ color:var(--bk-gold,#b07f2c); }
.bk-bb[data-act="bm"].on .bkf{ --reader-bookmark-fill:currentColor; fill:var(--bk-gold,#b07f2c); stroke:var(--bk-gold,#b07f2c); }
.bk-bb[data-act="bm"].on .bk-lbl{ color:var(--bk-gold,#b07f2c); }
/* 收起后的还原钮（顶部中央小把手） */
#bk-reveal{ position:fixed; top:52px; left:50%; z-index:1001; width:52px; height:44px; border:none;
  border-radius:0; cursor:pointer; background:transparent; color:var(--bk-muted,#867d70); box-shadow:none;
  display:flex; align-items:flex-start; justify-content:center; padding:0;
  transform:translateX(-50%) translateY(-100%); opacity:0; pointer-events:none;
  transition:transform .32s cubic-bezier(.4,0,.2,1), opacity .2s; }
#bk-reveal.show{ transform:translateX(-50%) translateY(0); opacity:1; pointer-events:auto; }
#bk-reveal::before{ content:""; position:absolute; top:0; width:34px; height:22px; border:1px solid var(--bk-line,#e6dfd3);
  border-top:0; border-radius:0 0 12px 12px; background:var(--bk-sheet,#fff); }
#bk-reveal svg{ position:relative; width:20px; height:20px; }
@media (min-width:900px){ #bk-reveal{ top:108px; } }

/* 朗读播放器：跟随主题、与阅读器统一（覆盖 tts-player 深色内联样式） */
html.bk-ready #tts-bar{ background:var(--bk-sheet,#fff) !important; color:var(--bk-fg,#17150f) !important;
  border-top:1px solid var(--bk-line,#e6dfd3); box-shadow:0 -6px 26px rgba(40,24,8,.14) !important; }
html.bk-ready #tts-cur{ color:var(--bk-fg,#17150f) !important; }
html.bk-ready #tts-cur.muted{ color:var(--bk-muted,#867d70) !important; }
html.bk-ready #tts-x, html.bk-ready #tts-rw, html.bk-ready #tts-ff, html.bk-ready #tts-time{ color:var(--bk-muted,#867d70) !important; }
html.bk-ready #tts-pp, html.bk-ready #tts-mini .m-pp{ background:var(--bk-gold,#b07f2c) !important; }
html.bk-ready #tts-prog{ background:var(--bk-line,#e6dfd3) !important; }
html.bk-ready #tts-prog::-webkit-slider-thumb{ background:var(--bk-gold,#b07f2c) !important; }
html.bk-ready #tts-prog::-moz-range-thumb{ background:var(--bk-gold,#b07f2c) !important; }
html.bk-ready #tts-mini{ background:var(--bk-sheet,#fff) !important; color:var(--bk-fg,#17150f) !important; }
html.bk-ready #tts-mini .m-tt{ color:var(--bk-fg,#17150f) !important; }
html.bk-ready #tts-mini .m-ic{ color:var(--bk-muted,#867d70) !important; }

/* 纲目抽屉（从左滑出） */
#bk-od-scrim{ position:fixed; inset:0; z-index:1100; background:rgba(20,12,4,.16);
  opacity:0; pointer-events:none; transition:opacity .26s ease; }
#bk-od-scrim.open{ opacity:1; pointer-events:auto; }
#bk-outline{ position:fixed; top:0; left:0; bottom:0; z-index:1101; width:min(340px,82vw); box-sizing:border-box;
  background:var(--bk-sheet,#fff); color:var(--bk-sheetfg,#26221d); box-shadow:2px 0 30px rgba(30,18,6,.28);
  transform:translateX(-100%); transition:transform .3s cubic-bezier(.32,.72,0,1); display:flex; flex-direction:column; }
#bk-outline.open{ transform:none; }
.bk-od-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 12px 8px; }
.bk-od-toc{ display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:0 6px; color:var(--bk-link,#7a4a1e);
  text-decoration:none; font-size:14px; font-weight:600; }
.bk-od-toc svg{ width:19px; height:19px; }
.bk-od-x{ display:inline-flex; align-items:center; justify-content:center; border:none; background:none; color:var(--bk-muted,#8c847a); cursor:pointer; width:44px; height:44px; }
.bk-od-x svg{ width:20px; height:20px; }
.bk-od-title{ padding:10px 18px 12px; color:var(--bk-fg,#26221d); font-size:16px; font-weight:700; border-bottom:1px solid var(--bk-line,#e8e2d8); }
.bk-od-list{ overflow-y:auto; padding:6px 0 24px; -webkit-overflow-scrolling:touch; }
/* 手机端底部导航(56px)会盖住抽屉尾部条目 → 列表底部清出空间 */
@media (max-width:899px){ .bk-od-list{ padding-bottom:calc(84px + env(safe-area-inset-bottom,0px)); } }
.bk-od-list button{ display:block; width:100%; text-align:left; border:none; background:none; color:var(--bk-fg,#26221d);
  cursor:pointer; padding:11px 18px; font-size:15px; line-height:1.5; border-left:3px solid transparent; -webkit-tap-highlight-color:transparent; }
.bk-od-list button:active{ background:var(--bk-fill,#f2eee6); border-left-color:var(--bk-gold,#b07f2c); }
.bk-od-empty{ padding:24px 18px; color:var(--bk-muted,#8c847a); font-size:14px; }

/* 设置弹层：遮罩全透明(切主题时正文实时可见) */
#bk-scrim{ position:fixed; inset:0; z-index:9998; background:transparent;
  opacity:0; pointer-events:none; transition:opacity .2s ease; }
#bk-scrim.open{ opacity:1; pointer-events:auto; }
#bk-sheet{ position:fixed; left:0; right:0; bottom:0; z-index:9999;
  background:var(--bk-sheet,#fff); color:var(--bk-sheetfg,#26221d);
  border-radius:20px 20px 0 0;
  /* ⭐底部留出手机底栏(56)高度，否则最后一项(翻页方式)被固定底栏遮挡；max-height+滚动防小屏内容超出视口 */
  padding:8px 20px calc(22px + 56px + env(safe-area-inset-bottom,0px));
  max-height:calc(100vh - 70px); overflow-y:auto; -webkit-overflow-scrolling:touch;
  box-shadow:0 -8px 40px rgba(30,18,6,.26);
  transform:translateY(102%); transition:transform .34s cubic-bezier(.32,.72,0,1); will-change:transform;
  pointer-events:none; }   /* ⭐关闭时不拦截点击(桌面面板opacity:0仍留原位会吃掉下方find bar的✕/切主题,故关闭必须pointer-events:none) */
#bk-sheet.open{ transform:translateY(0); pointer-events:auto; }
@media (min-width:900px){
  #bk-sheet{ left:auto; right:16px; top:124px; bottom:auto; width:344px; border-radius:18px; padding:10px 22px 20px;
    transform:translateY(-10px) scale(.98); opacity:0;
    box-shadow:0 16px 48px rgba(30,18,6,.28), 0 0 0 .5px rgba(120,90,50,.14); }
  #bk-sheet.open{ transform:none; opacity:1; }
  #bk-grab{ display:none; }
}
#bk-grab{ width:38px; height:4px; border-radius:2px; background:var(--bk-line,#e8e2d8); margin:6px auto 14px; touch-action:none; }

html[data-bk-theme="night"].bk-ready #bk-root .main :where(p,span,div,b,strong,em,i,font,li,td,th,h1,h2,h3,h4,h5,h6){
  color:var(--bk-fg)!important;
}
html[data-bk-theme="night"].bk-ready #bk-root .main a{
  color:var(--bk-link)!important;
}
html[data-bk-theme="night"].bk-ready #bk-root .bk-cxxl-source,
html[data-bk-theme="night"].bk-ready #bk-root .bk-cxxl-source :where(p,span,div,b,strong,em,i,font,li,td,th,h1,h2,h3,h4,h5,h6){
  color:var(--bk-fg)!important;
}
html[data-bk-theme="night"].bk-ready #bk-root .bk-cxxl-source a{
  color:var(--bk-link)!important;
}
html[data-bk-theme="night"].bk-ready #bk-root .bk-cxxl-source .AA2BJ{
  background:var(--bk-fill)!important;
}

.bk-sec{ margin:0 0 20px; } .bk-sec:last-child{ margin-bottom:2px; }
.bk-cap{ font-size:12px; font-weight:600; letter-spacing:.12em; color:var(--bk-muted,#8c847a); margin:0 2px 12px; }

/* 主题圆形色板 + 金色选中环 */
.bk-themes{ display:flex; justify-content:space-between; gap:8px; }
.bk-sw{ flex:1; background:none; border:none; padding:0; cursor:pointer; text-align:center; -webkit-tap-highlight-color:transparent; }
.bk-sw .dot{ display:block; width:46px; height:46px; border-radius:50%; margin:0 auto 7px; position:relative;
  box-shadow:inset 0 0 0 1px rgba(120,90,50,.16); transition:transform .18s cubic-bezier(.34,1.56,.64,1); }
.bk-sw .dot::after{ content:""; position:absolute; inset:-5px; border-radius:50%;
  border:2px solid var(--bk-gold,#bd8836); opacity:0; transform:scale(.8); transition:opacity .18s, transform .18s; }
.bk-sw.on .dot{ transform:scale(1.02); } .bk-sw.on .dot::after{ opacity:1; transform:scale(1); }
.bk-sw .dot.t-paper{ background:#f6f3ec; } .bk-sw .dot.t-sepia{ background:#ecd9b4; }
.bk-sw .dot.t-green{ background:#cfe0c6; } .bk-sw .dot.t-night{ background:#23262c; }
.bk-sw .nm{ font-size:12.5px; color:var(--bk-muted,#8c847a); }
.bk-sw.on .nm{ color:var(--bk-sheetfg,#26221d); font-weight:600; }

/* 字号步进 */
.bk-fs{ display:flex; align-items:center; gap:12px; }
.bk-step{ flex:0 0 auto; width:52px; height:46px; border-radius:13px; cursor:pointer; border:none;
  background:var(--bk-fill,#f2eee6); color:var(--bk-sheetfg,#26221d);
  display:flex; align-items:center; justify-content:center; -webkit-tap-highlight-color:transparent; transition:transform .14s; }
.bk-step:active{ transform:scale(.92); }
.bk-step.a-min{ font-size:15px; font-weight:700; } .bk-step.a-max{ font-size:23px; font-weight:700; }
.bk-track{ flex:1; display:flex; align-items:center; justify-content:space-between; padding:0 6px; }
.bk-track i{ width:9px; height:9px; border-radius:50%; background:var(--bk-line,#e8e2d8); transition:background .15s, transform .15s; }
.bk-track i.on{ background:var(--bk-gold,#bd8836); transform:scale(1.28); }
/* ⭐字号步进器(点击式：小A − 当前字号数字 − 大A；Kris:滑块在网页不够丝滑,改点击) */
.bk-fs3{ display:flex; align-items:stretch; background:var(--bk-fill,#f2eee6); border-radius:13px; overflow:hidden; }
.bk-fs3 button{ flex:1; height:52px; border:0; background:none; color:var(--bk-sheetfg,#26221d);
  display:flex; align-items:center; justify-content:center; cursor:pointer; -webkit-tap-highlight-color:transparent; font-family:inherit; }
/* 点击不留任何选中/阴影残留(像底部导航那样干净),按下只轻微变淡 */
.bk-fs3 button:active{ opacity:.55; }
.bk-fs3 button:focus{ outline:none; }
.bk-fs3 button[disabled]{ opacity:.32; }
.bk-fs3 .fa-min{ font-size:16px; font-weight:700; } .bk-fs3 .fa-max{ font-size:24px; font-weight:700; }
.bk-fs3-val{ flex:0 0 auto; min-width:86px; display:flex; align-items:center; justify-content:center;
  background:var(--bk-sheet,#fff); border-radius:26px; margin:7px 2px; box-shadow:0 2px 8px rgba(0,0,0,.12);
  font-size:17px; font-weight:700; color:var(--bk-sheetfg,#26221d); font-variant-numeric:tabular-nums; }
/* (旧滑块样式保留仅兼容) */
.bk-fs2{ display:flex; align-items:center; gap:12px; background:var(--bk-fill,#f2eee6); border-radius:13px; padding:10px 16px; }
.bk-fs-a{ flex:0 0 auto; color:var(--bk-sheetfg,#26221d); font-weight:700; line-height:1; }
.bk-fs-a.sm{ font-size:15px; } .bk-fs-a.lg{ font-size:23px; }
.bk-fs-slider{ position:relative; flex:1; height:34px; display:flex; align-items:center; }
.bk-fs-slider input[type=range]{ -webkit-appearance:none; appearance:none; width:100%; height:4px; border-radius:3px;
  background:var(--bk-line,#e0d8cc); outline:none; margin:0; padding:0; }
.bk-fs-slider input[type=range]::-webkit-slider-thumb{ -webkit-appearance:none; appearance:none; width:24px; height:24px; border-radius:50%;
  background:#fff; border:1px solid rgba(0,0,0,.12); box-shadow:0 2px 6px rgba(0,0,0,.22); cursor:pointer; }
.bk-fs-slider input[type=range]::-moz-range-thumb{ width:24px; height:24px; border-radius:50%; background:#fff; border:1px solid rgba(0,0,0,.12); box-shadow:0 2px 6px rgba(0,0,0,.22); cursor:pointer; }
.bk-fs-slider input[type=range]::-moz-range-track{ height:4px; border-radius:3px; background:var(--bk-line,#e0d8cc); }
.bk-fs-bub{ position:absolute; top:50%; transform:translate(-50%,-50%); font-size:11.5px; font-weight:700;
  color:var(--bk-sheetfg,#26221d); pointer-events:none; line-height:1; }

/* 行距分段 */
.bk-seg{ display:flex; background:var(--bk-fill,#f2eee6); border-radius:13px; padding:4px; gap:4px; }
.bk-seg button{ flex:1; height:38px; border:none; border-radius:10px; cursor:pointer; background:transparent;
  color:var(--bk-muted,#8c847a); font-size:14px; font-weight:600; -webkit-tap-highlight-color:transparent;
  transition:color .15s, background .18s, box-shadow .18s; }
.bk-seg button.on{ background:var(--bk-sheet,#fff); color:var(--bk-sheetfg,#26221d); box-shadow:0 1px 4px rgba(40,24,8,.16); }

/* 目录行 */
.bk-toc{ display:flex; align-items:center; gap:12px; width:100%; height:52px; padding:0 4px; border:none;
  background:none; cursor:pointer; color:var(--bk-sheetfg,#26221d);
  border-top:1px solid var(--bk-line,#e8e2d8); margin-top:4px; -webkit-tap-highlight-color:transparent; }
.bk-toc .ic{ width:22px; height:22px; fill:var(--bk-gold,#bd8836); flex:0 0 auto; }
.bk-toc .tx{ flex:1; text-align:left; font-size:15.5px; font-weight:600; }
.bk-toc .ch{ width:8px; height:14px; stroke:var(--bk-muted,#8c847a); fill:none; stroke-width:2; }
.bk-toc:active{ background:var(--bk-fill,#f2eee6); border-radius:12px; }

@media (prefers-reduced-motion:reduce){
  #bk-sheet,#bk-scrim,#bk-aa,.bk-sw .dot,#bk-root{ transition:none !important; animation:none !important; }
}

/* ── 底部「支持我们」卡（阅读页/文章页尾，永久免费·不诉苦） ── */
.bk-support{ max-width:700px; margin:16px auto 6px; display:flex; align-items:center; gap:14px;
  padding:16px 18px; border-radius:14px; background:var(--bk-sheet); border:1px solid var(--bk-line); box-sizing:border-box; }
.bk-support-ic{ flex:0 0 40px; width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--bk-fill); color:var(--bk-gold); }
.bk-support-tx{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.bk-support-tx b{ font-size:15px; font-weight:700; color:var(--bk-fg); }
.bk-support-tx i{ font-style:normal; font-size:13px; color:var(--bk-muted); line-height:1.5; }
.bk-support-btn{ flex:0 0 auto; padding:9px 22px; border-radius:20px; background:var(--bk-gold); color:#fff !important; font-size:14px; font-weight:600; text-decoration:none; white-space:nowrap; }
.bk-support-btn:active{ filter:brightness(.94); }
@media(max-width:600px){ .bk-support{ margin:12px 16px 6px; padding:14px; gap:11px; } .bk-support-btn{ padding:8px 16px; font-size:13.5px; } .bk-support-tx i{ font-size:12.5px; } }

/* 单篇文章书(booklists 页上的 bk-ready)：正文基准字号对齐章节阅读页(否则偏小) */
html.bk-toc.bk-ready #bk-root{ font-size:19.6px; }

/* ── 子目录页(多层级书的中间层)：微信读书式篇目列表 ── */
.bk-idxcap{ max-width:760px; margin:0 auto; padding:2px 24px 8px; font-size:15px; font-weight:700; color:var(--bk-fg); }
html.bk-ready #bk-root .bk-chaplist{ max-width:760px; margin:0 auto; padding:0 12px 40px; }
html.bk-ready #bk-root .bk-chap{ display:flex; align-items:center; gap:13px; padding:14px 12px; border-bottom:1px solid var(--bk-line); text-decoration:none; }
html.bk-ready #bk-root .bk-chap:active{ background:var(--bk-fill); }
.bk-chap-n{ flex:0 0 auto; min-width:26px; text-align:center; font-size:13px; color:var(--bk-muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
/* 层级分组：大标题(第X层/部…可点)+子篇缩进 */
html.bk-ready #bk-root .bk-grp-h, html.bk-toc #bk-root .bk-grp-h, html.bk-toc-ready #bk-root .bk-grp-h{
  display:flex; align-items:center; gap:8px; padding:20px 12px 9px; text-decoration:none;
  font-size:16.5px; font-weight:700; color:var(--bk-gold) !important; border-bottom:1px solid var(--bk-line); }
.bk-grp-h .bk-grp-t{ flex:1; min-width:0; font-family:"Songti SC","Noto Serif SC",serif; letter-spacing:.5px; }
.bk-grp-h .bk-ch{ flex:0 0 8px; width:8px; height:14px; color:var(--bk-gold); opacity:.55; }
.bk-chap-sub{ padding-left:28px !important; }
.bk-chap-sub .bk-chap-n{ opacity:.65; }
.bk-chap-t{ flex:1; min-width:0; font-size:16.5px; color:var(--bk-fg) !important; line-height:1.42; }
.bk-chap .bk-ch{ flex:0 0 8px; width:8px; height:14px; color:var(--bk-muted); opacity:.5; }

/* 旧「回首页」条(#toptitle 有时在 bk-root 外) —— 阅读器/目录页一律隐藏 */
html.bk-ready #toptitle, html.bk-toc #toptitle, html.bk-toc-ready #toptitle{ display:none !important; }

/* 去掉旧版遗留的空白撑高 div(如 <div style="height:95%"></div>)造成的文末大片空白(JS 未跑时兜底) */
html.bk-ready #bk-root div[style*="%"]:empty,
html.bk-toc-ready #bk-root div[style*="%"]:empty,
html.bk-toc #bk-root div[style*="%"]:empty{ display:none !important; }

/* 电脑端：目录/详情/分类页更宽，充分利用整屏(参微信读书 PC；阅读正文栏仍保持窄栏易读) */
@media (min-width:900px){
  #bk-tocwrap{ max-width:1080px; }
  html.bk-toc-ready .bk-toctools{ max-width:1080px; }
}

/* ═══ 划线高亮 + 笔记（bk-highlight.js） ═══════════════════════════ */
/* 划线本身：inset 底边线不占布局、box-decoration-break 让跨行也着色 */
html.bk-ready #bk-root mark.bk-hl,
html.bk-toc-ready #bk-root mark.bk-hl{
  color:inherit; padding:0 .02em; border-radius:2px; cursor:pointer;
  -webkit-box-decoration-break:clone; box-decoration-break:clone;
  transition:background .15s;
}
/* 五色(黄/绿/蓝/红/紫)：每色定义 --hlc(纯色,画线用) + --hlc-bg(浅色块,高亮用)。
   三线型(bk-st-hl 高亮 / bk-st-line 直线 / bk-st-wave 波浪)共用这两个变量。 */
mark.bk-hl-c1{ --hlc:rgba(214,140,26,.95); --hlc-bg:rgba(245,178,42,.40); }
mark.bk-hl-c2{ --hlc:rgba(42,145,70,.98);  --hlc-bg:rgba(60,175,90,.26); }
mark.bk-hl-c3{ --hlc:rgba(43,110,214,.95); --hlc-bg:rgba(56,132,246,.24); }
mark.bk-hl-c4{ --hlc:rgba(220,48,74,.98);  --hlc-bg:rgba(244,63,94,.24); }
mark.bk-hl-c5{ --hlc:rgba(124,77,219,.95); --hlc-bg:rgba(139,92,246,.26); }
html[data-bk-theme="night"] mark.bk-hl-c1{ --hlc-bg:rgba(245,190,60,.24); }
html[data-bk-theme="night"] mark.bk-hl-c2{ --hlc-bg:rgba(70,195,105,.24); }
html[data-bk-theme="night"] mark.bk-hl-c3{ --hlc-bg:rgba(90,150,250,.26); }
html[data-bk-theme="night"] mark.bk-hl-c4{ --hlc-bg:rgba(245,90,115,.26); }
html[data-bk-theme="night"] mark.bk-hl-c5{ --hlc-bg:rgba(160,120,250,.28); }
/* 三线型：高亮=色块 / 直线=底实线 / 波浪=底波浪线(旧划线无 bk-st-* 时按 render 默认 hl) */
mark.bk-hl.bk-st-hl{ background:var(--hlc-bg); box-shadow:inset 0 -2.5px 0 var(--hlc); }
mark.bk-hl.bk-st-line{ background:none; box-shadow:inset 0 -2.5px 0 var(--hlc); }
mark.bk-hl.bk-st-wave{ background:none; box-shadow:none; text-decoration:underline; text-decoration-style:wavy;
  text-decoration-color:var(--hlc); text-decoration-thickness:2px; text-underline-offset:3px; -webkit-text-decoration:underline wavy var(--hlc); }
/* ⭐根治蓝链：倪/李页加载的 bootstrap 有 a{color:#08c}(蓝)，污染 reader 重建的列表/卡片链接。
   用 :where(特异性0) 把 #bk-root 内锚点默认色设为正文色——只压过 bootstrap 的 a(靠加载顺序,
   reader.css 在其后)，而组件自身颜色(按钮白字/经文金色/正文链接)特异性更高照常生效，不误伤。 */
:where(#bk-root) a{ color:var(--bk-fg,#221a0e); }
/* 兜底：子目录/大纲页的原始链接(a.content/a.link 及 <div id=title> 里的链接)一律跟随主题色。
   ⭐⭐这些老书内容(如 2371 性格的培养)的正文/大纲经常在 #bk-root 之外的裸 <div> 里(模板结构)，
   所以规则必须【全局】(不带 #bk-root 前缀)——a.content/a.link 是老书正文专用类，全局设置不误伤。 */
a.content, a.link, [id="title"] a, #title a,
#bk-root a.content, #bk-root a.link{ color:var(--bk-link,#7a481a) !important; }
/* 老书模板的占位 spacer(<div style="height:95%"></div> 等)在阅读器下撑出整屏空白 → 一律折叠 */
body > div:empty[style*="height"]{ display:none !important; }
/* 正文里 ─xxx─ 式装饰副标题行(reader.js 标记 bk-deco-line)：居中、无缩进 */
.bk-deco-line{ text-align:center !important; text-indent:0 !important; }
/* 从「我的笔记」点进来定位到的划线：金色光环脉冲一下引导视线 */
mark.bk-hl.bk-hl-flash{ border-radius:3px; animation:bkhlflash 1.9s ease 1; }
@keyframes bkhlflash{ 0%{ box-shadow:0 0 0 0 rgba(224,169,63,0); } 12%{ box-shadow:0 0 0 4px rgba(224,169,63,.65); } 55%{ box-shadow:0 0 0 4px rgba(224,169,63,.38); } 100%{ box-shadow:0 0 0 0 rgba(224,169,63,0); } }
/* 笔记角标（贴在划线末尾的小笔尖） */
.bk-note-dot{ display:inline-block; width:0.82em; height:0.82em; margin:0 .05em 0 .1em; vertical-align:.32em;
  cursor:pointer; opacity:.9;
  background:no-repeat center/contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23b07d2a" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 19h4L20 8l-4-4L5 15z"/></svg>'); }
html[data-bk-theme="night"] .bk-note-dot{ background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23d0b070" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 19h4L20 8l-4-4L5 15z"/></svg>'); }
/* 内联笔记便签：写完直接显示在划线后面，点它可编辑（跟随主题） */
.bk-inline-note{ display:inline; margin:0 .15em; padding:.06em .5em .1em; border-radius:6px; cursor:pointer;
  background:rgba(224,169,63,.2); color:var(--bk-fg); font-size:.84em; line-height:1.7;
  box-shadow:inset 2.5px 0 0 var(--bk-gold); -webkit-box-decoration-break:clone; box-decoration-break:clone; }
.bk-inline-note:hover{ background:rgba(224,169,63,.3); }
.bk-inline-note .bk-in-ic{ display:inline-block; width:.82em; height:.82em; margin-right:.2em; vertical-align:-.08em;
  background:no-repeat center/contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23b07d2a" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 19h4L20 8l-4-4L5 15z"/></svg>'); }
html[data-bk-theme="night"] .bk-inline-note{ background:rgba(208,176,112,.18); }
html[data-bk-theme="night"] .bk-inline-note .bk-in-ic{ background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23d0b070" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 19h4L20 8l-4-4L5 15z"/></svg>'); }

/* 浮动工具条 / 划线菜单（深色药丸，任意主题都清晰） */
.bk-hp{ position:fixed; z-index:2147483645; background:#2b2824; color:#fff;
  border-radius:13px; box-shadow:0 8px 28px rgba(0,0,0,.36); padding:6px; max-width:92vw;
  -webkit-user-select:none; user-select:none; animation:bkhpin .13s ease; }
@keyframes bkhpin{ from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:none; } }
.bk-hp.below{ animation-name:bkhpdn; }
@keyframes bkhpdn{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.bk-hp-row{ display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:7px; row-gap:8px; }
/* 色板改成「圆点 + 语义标签」两行(重点/印证/亮光/疑问/应用)，一眼就知每色含义；从容留白，不拥挤 */
.bk-hp-swi{ display:flex; flex-direction:column; align-items:center; gap:6px; flex:0 0 auto; min-width:40px; padding:2px 0; border-radius:9px; }
.bk-hp-swl{ font-size:11px; line-height:1; font-weight:600; letter-spacing:.02em; color:rgba(255,255,255,.9); white-space:nowrap; }
.bk-hp-sw{ width:24px; height:24px; border-radius:50%; border:2px solid rgba(255,255,255,.28);
  cursor:pointer; padding:0; flex:0 0 auto; -webkit-tap-highlight-color:transparent; transition:transform .12s ease; }
.bk-hp-swi:hover .bk-hp-sw{ transform:scale(1.08); }
.bk-hp-sw.on{ border-color:#fff; box-shadow:0 0 0 2px rgba(255,255,255,.25); }
.bk-hp-swi .bk-hp-sw.on + .bk-hp-swl, .bk-hp-swi:hover .bk-hp-swl{ color:#fff; }
.bk-hp-sw.bk-hl-c1{ background:#f5b22a; box-shadow:none; } .bk-hp-sw.bk-hl-c1.on{ box-shadow:0 0 0 2px rgba(255,255,255,.3); }
.bk-hp-sw.bk-hl-c2{ background:#3caf5a; } .bk-hp-sw.bk-hl-c3{ background:#3884f6; } .bk-hp-sw.bk-hl-c4{ background:#f43f5e; } .bk-hp-sw.bk-hl-c5{ background:#8b5cf6; }
.bk-hp-sep{ width:1px; height:34px; background:rgba(255,255,255,.2); margin:0 3px; flex:0 0 auto; }
.bk-hp-b{ background:none; border:0; color:#fff; font-size:14.5px; font-weight:600; padding:6px 10px;
  border-radius:9px; cursor:pointer; white-space:nowrap; -webkit-tap-highlight-color:transparent; }
.bk-hp-b:hover{ background:rgba(255,255,255,.12); } .bk-hp-b:active{ background:rgba(255,255,255,.18); }
.bk-hp-del{ color:#ff9a9a; }
/* 「写笔记」主按钮：醒目金色，一键从选区进笔记编辑(免去先选色再绕) */
/* 写笔记主按钮：高级青玉色(teal)，刻意区别于 5 个划线色(黄/绿/蓝/红/紫)，冷雅有质感 */
.bk-hp-note{ background:linear-gradient(180deg,#12a396,#0c8579); color:#fff; font-weight:700; box-shadow:0 1px 0 rgba(255,255,255,.14) inset; }
.bk-hp-note:hover{ background:linear-gradient(180deg,#16b0a2,#0e8f82); } .bk-hp-note:active{ background:linear-gradient(180deg,#0c8579,#0a726a); }

/* ── 微信读书式选择工具条：深色主条(图标+标签+小三角) + 下方分离的[3线型圆钮 + 5色胶囊] ── */
.bk-hp.bk-wr{ padding:0; min-width:0; overflow:visible; background:none; box-shadow:none; border-radius:0;
  display:flex; flex-direction:column; align-items:flex-start; gap:9px; max-width:calc(100vw - 16px); }
.bk-wr-bar{ position:relative; background:#232120; border-radius:14px; box-shadow:0 10px 30px rgba(0,0,0,.38); padding:3px 4px;
  align-self:stretch; }   /* 与行2(线型圆+色板胶囊)同宽(Kris:上面窄了不好看) */
.bk-wr-main{ display:flex; align-items:stretch; justify-content:center; }
.bk-wr-b{ position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  background:none; border:0; color:#fff; font-size:12px; font-weight:500; padding:9px 17px 8px; flex:1 1 0;
  border-radius:11px; cursor:pointer; white-space:nowrap; -webkit-tap-highlight-color:transparent; }
.bk-wr-b + .bk-wr-b::before{ content:""; position:absolute; left:0; top:26%; height:48%; width:1px; background:rgba(255,255,255,.16); }
.bk-wr-b:hover{ background:rgba(255,255,255,.08); } .bk-wr-b:active{ background:rgba(255,255,255,.14); }
.bk-wr-ic{ display:block; line-height:0; }
.bk-wr-ic svg{ width:22px; height:22px; display:block; }
.bk-wr-l{ line-height:1; letter-spacing:.02em; }
/* 行2：分离浮动的线型圆钮 + 色板胶囊(微信读书式)。⚠️总宽必须<视口:线型3×38+色板胶囊≈310,留边距 */
.bk-wr-row2{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; max-width:100%; }
.bk-wr-st{ flex:0 0 auto; width:38px; height:38px; border-radius:50%; background:#232120; border:2px solid transparent;
  box-shadow:0 4px 13px rgba(0,0,0,.28); display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0; -webkit-tap-highlight-color:transparent; }
.bk-wr-st svg{ width:25px; height:25px; display:block; }
.bk-wr-st.on{ border-color:#e8b74a; }
.bk-wr-cols{ display:flex; align-items:center; gap:10px; background:#232120; border-radius:22px;
  box-shadow:0 4px 13px rgba(0,0,0,.28); padding:8px 13px; }
.bk-wr-col{ position:relative; width:23px; height:23px; border-radius:50%; border:0; cursor:pointer; padding:0; -webkit-tap-highlight-color:transparent; }
/* 色圆/线型圆的触摸命中区扩大(视觉不变)——23px 圆手指常点偏"选不上"(Kris反馈) */
.bk-wr-col::before{ content:""; position:absolute; inset:-10px; border-radius:50%; }
.bk-wr-st{ position:relative; }
.bk-wr-st::before{ content:""; position:absolute; inset:-6px; border-radius:50%; }
.bk-wr-col.bk-hl-c1{ background:#f5b22a; } .bk-wr-col.bk-hl-c2{ background:#3caf5a; } .bk-wr-col.bk-hl-c3{ background:#3884f6; } .bk-wr-col.bk-hl-c4{ background:#f43f5e; } .bk-wr-col.bk-hl-c5{ background:#8b5cf6; }
.bk-wr-col.on::after{ content:"✓"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:#2b2115; font-size:13px; font-weight:800; }
/* 已写笔记的预览块(点它进编辑)——不点开编辑框也能看到自己的笔记 */
.bk-wr-note{ margin:2px 8px 8px; padding:9px 11px; background:rgba(255,255,255,.08); border-left:3px solid #e8b74a;
  border-radius:8px; color:#f2ede4; font-size:13px; line-height:1.6; max-height:96px; overflow:auto; cursor:pointer;
  white-space:pre-wrap; word-break:break-word; }
.bk-wr-note-l{ display:inline-block; margin-right:7px; font-size:10.5px; font-weight:700; color:#e8b74a;
  border:1px solid rgba(232,183,74,.6); border-radius:5px; padding:1px 5px; vertical-align:1px; }
.bk-wr-caret{ position:absolute; bottom:-7px; left:50%; width:0; height:0; margin-left:-8px;
  border-left:8px solid transparent; border-right:8px solid transparent; border-top:8px solid #232120; filter:drop-shadow(0 3px 2px rgba(0,0,0,.18)); }
.bk-wr.below .bk-wr-caret{ bottom:auto; top:-7px; border-top:0; border-bottom:8px solid #232120; filter:drop-shadow(0 -2px 2px rgba(0,0,0,.14)); }
/* 划线菜单：列式（色板 + 笔记预览 + 操作） */
/* 菜单固定宽度：长笔记在框内换行(否则容器会横向撑满、文字不换行) */
.bk-hm{ display:block; padding:12px 14px 10px; width:328px; max-width:93vw; box-sizing:border-box; }
.bk-hm .bk-hp-row:first-child{ justify-content:space-between; padding:0 2px 2px; }
/* 笔记预览：便利贴式柔黄卡片(深字+金左边+阴影)，任何主题/文章底色都清晰区分，一眼就是一张便签
   (米白会与白色paper主题顺色 → 改柔黄, 2026-07-22 Kris反馈) */
.bk-hm-note{ font-size:14px; color:#3a2f14; line-height:1.6; background:#fbecae;
  padding:9px 12px; border-radius:9px; margin:9px 0 5px; max-height:120px; overflow:auto;
  white-space:pre-wrap; word-break:break-word; border-left:4px solid #e0a93f;
  box-shadow:0 1px 7px rgba(0,0,0,.28); }
.bk-hm-acts{ margin-top:9px; padding-top:9px; border-top:1px solid rgba(255,255,255,.12); justify-content:space-between; }

/* 笔记编辑弹框（跟随阅读主题） */
.bk-nov{ position:fixed; inset:0; background:rgba(0,0,0,.44); z-index:2147483646;
  display:flex; align-items:flex-start; justify-content:center; padding:9vh 20px 20px; }
.bk-ne{ background:var(--bk-sheet,#fff); color:var(--bk-sheetfg,#222); width:100%; max-width:430px;
  border-radius:16px; padding:17px; box-shadow:0 16px 50px rgba(0,0,0,.36); }
.bk-ne-q{ font-size:13px; color:var(--bk-muted,#867d70); border-left:3px solid var(--bk-gold,#b07d2a);
  padding-left:10px; line-height:1.55; margin-bottom:13px; max-height:78px; overflow:auto; }
.bk-ne-t{ width:100%; box-sizing:border-box; min-height:120px; resize:vertical; font-family:inherit;
  font-size:15.5px; line-height:1.6; padding:12px; border:1.5px solid var(--bk-line,#e6dfd3);
  border-radius:12px; outline:none; background:var(--bk-bg,#fff); color:var(--bk-fg,#222); }
.bk-ne-t:focus{ border-color:var(--bk-gold,#b07d2a); }
.bk-ne-title{margin:0 0 12px;color:var(--bk-fg,#222);font-size:18px;font-weight:750}
.bk-auth-gate__eyebrow{margin-bottom:7px;color:var(--bk-gold,#b07d2a);font-size:12px;font-weight:800;letter-spacing:.12em}
.bk-auth-gate h2{margin:0 0 10px;color:var(--bk-fg,#222);font-size:21px}
.bk-auth-gate p{margin:0 0 18px;color:var(--bk-muted,#867d70);font-size:14px;line-height:1.75}
.bk-ne-row{ display:flex; gap:10px; margin-top:14px; }
.bk-ne-c{ flex:1; padding:11px; border:1px solid var(--bk-line,#e6dfd3); background:var(--bk-fill,#f0ece3);
  color:var(--bk-fg,#222); border-radius:11px; font-weight:700; font-size:15px; cursor:pointer; }
.bk-ne-rm{ color:#c0392b; }
.bk-ne-ok{ flex:1.4; padding:11px; border:0; background:var(--bk-gold,#b07d2a); color:#fff;
  border-radius:11px; font-weight:800; font-size:15px; cursor:pointer; }

/* ═══ #2 本篇/本书笔记面板（bk-highlight 注入的工具条「笔记」→ 右侧抽屉） ═══ */
.bk-notesbtn{ position:relative; }
.bk-nb-badge{ position:absolute; top:3px; right:1px; min-width:15px; height:15px; padding:0 3px; box-sizing:border-box; border-radius:8px; background:var(--bk-gold); color:#fff; font-size:10px; line-height:15px; font-weight:700; text-align:center; }
#bk-notes-scrim{ position:fixed; inset:0; background:rgba(0,0,0,.3); opacity:0; visibility:hidden; transition:.25s; z-index:99970; }
#bk-notes-scrim.open{ opacity:1; visibility:visible; }
/* 抽屉：桌面从站导(57)下方开始、手机停在底部导航(#_bnav 56)上方——两端都不遮挡导航 */
#bk-notes{ position:fixed; top:0; right:0; bottom:0; width:min(380px,88vw); background:var(--bk-sheet); color:var(--bk-sheetfg);
  z-index:99971; transform:translateX(101%); transition:transform .28s; display:flex; flex-direction:column; box-shadow:-8px 0 34px rgba(0,0,0,.22); }
#bk-notes.open{ transform:none; }
@media (min-width:900px){ #bk-notes{ top:57px; } }                                   /* 桌面：让出顶部站导 */
@media (max-width:899px){ #bk-notes{ bottom:calc(56px + env(safe-area-inset-bottom,0px)); } }   /* 手机：让出底部导航 */
.bk-nt-head{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px 12px; border-bottom:1px solid var(--bk-line); flex:0 0 auto; }
.bk-nt-ttl{ font-size:17px; font-weight:700; color:var(--bk-fg); }
.bk-nt-x{ border:0; background:none; color:var(--bk-muted); font-size:18px; cursor:pointer; padding:4px 8px; -webkit-tap-highlight-color:transparent; }
.bk-nt-tabs{ display:flex; gap:8px; padding:12px 16px 6px; flex:0 0 auto; }
.bk-nt-tabs button{ border:0; background:var(--bk-fill); color:var(--bk-sub); font-size:14px; font-weight:600; padding:7px 16px; border-radius:16px; cursor:pointer; }
.bk-nt-tabs button.on{ background:var(--bk-gold); color:#fff; }
.bk-note-compose{padding:8px 16px 4px;flex:0 0 auto}
.bk-note-compose[hidden]{display:none}
.bk-note-compose button{display:flex;width:100%;min-height:44px;align-items:center;justify-content:center;border:1px solid color-mix(in srgb,var(--bk-gold) 45%,var(--bk-line));border-radius:12px;background:color-mix(in srgb,var(--bk-gold) 8%,var(--bk-sheet));color:var(--bk-gold);font:inherit;font-size:14.5px;font-weight:750}
.bk-nt-list{ flex:1; overflow:auto; padding:8px 14px calc(40px + env(safe-area-inset-bottom,0px)); -webkit-overflow-scrolling:touch; }
@media (max-width:899px){ .bk-nt-list{ padding-bottom:calc(72px + env(safe-area-inset-bottom,0px)); } }  /* 手机：清出底部导航高度，末条不被遮 */
.bk-nt-item{ display:block; padding:12px 13px; border-radius:12px; text-decoration:none; margin-bottom:10px; background:var(--bk-fill); border:1px solid var(--bk-line); cursor:pointer; }
.bk-nt-item:active{ filter:brightness(.97); }
.bk-nt-lbl{ display:inline-block; font-size:10.5px; font-weight:700; padding:1px 6px; border-radius:5px; margin-right:7px; vertical-align:2px; letter-spacing:.3px; }
.bk-nt-lbl-src{ background:var(--bk-line); color:var(--bk-sub); }
.bk-nt-lbl-n{ background:var(--bk-gold); color:#fff; }
.bk-nt-chapter{display:block;color:var(--bk-gold);font-size:12px;font-weight:750;letter-spacing:.08em}
.bk-nt-q{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:15px; line-height:1.55; color:var(--bk-fg); padding-left:9px; border-left:3px solid var(--bk-gold); font-weight:500; }
.bk-nt-n{ display:block; margin-top:9px; font-size:13.5px; line-height:1.55; color:var(--bk-fg); background:var(--bk-sheet); border-radius:8px; padding:7px 10px; word-break:break-word; }
.bk-nt-empty{ padding:44px 22px; text-align:center; color:var(--bk-muted); font-size:14.5px; line-height:1.75; }

/* ═══ #5 引导/柔性提示条（首次划线引导 + 未登录提示；深底白字任意主题清晰，避开底部导航） ═══ */
.bk-tip{ position:fixed; left:50%; bottom:calc(24px + env(safe-area-inset-bottom,0px)); transform:translate(-50%,16px);
  opacity:0; transition:opacity .3s, transform .3s; z-index:99960; width:max-content; max-width:94vw; box-sizing:border-box;
  display:flex; align-items:center; gap:9px; padding:11px 11px 11px 16px; border-radius:999px;
  background:#2b2824; color:#fff; box-shadow:0 10px 34px rgba(0,0,0,.34); font-size:14px; }
@media (max-width:899px){ .bk-tip{ bottom:calc(72px + env(safe-area-inset-bottom,0px)); } }   /* 手机让出底部导航 */
.bk-tip.on{ opacity:1; transform:translateX(-50%); }
.bk-tip-t{ flex:1; line-height:1.55; } .bk-tip-t b{ color:#ffe0a8; }
.bk-tip-go{ flex:0 0 auto; background:var(--bk-gold,#b3872f); color:#fff; text-decoration:none; font-weight:700; padding:7px 14px; border-radius:9px; font-size:13.5px; white-space:nowrap; }
.bk-tip-x{ flex:0 0 auto; border:0; background:none; color:rgba(255,255,255,.55); font-size:14px; cursor:pointer; padding:4px 6px; -webkit-tap-highlight-color:transparent; }

/* ══ 书内搜索 查找条（第3步，跟随四主题） ═══════════════════════ */
#bk-find-scrim{ position:fixed; inset:0; z-index:998; border:0; padding:0; background:rgba(24,20,16,.16);
  opacity:0; visibility:hidden; pointer-events:none; transition:opacity .16s ease,visibility .16s; }
html.bk-finding #bk-find-scrim{ opacity:1; visibility:visible; pointer-events:auto; }
#bk-find{ position:fixed; left:0; right:0; top:116px; z-index:999; box-sizing:border-box;
  background:var(--bk-sheet); border-bottom:1px solid var(--bk-line);
  box-shadow:0 8px 22px rgba(20,12,4,.12);
  transform:translateY(-14px); opacity:0; pointer-events:none; visibility:hidden;
  transition:opacity .16s ease, transform .16s ease, visibility .16s; }
#bk-find.open{ transform:none; opacity:1; pointer-events:auto; visibility:visible; }
@media (min-width:900px){ #bk-find{ top:174px; } }
body.modal-open #bk-find{ display:none; }
.bk-find-scope{ display:grid; grid-template-columns:1fr 1fr; gap:2px; width:calc(100% - 24px); max-width:736px; box-sizing:border-box; padding:3px; margin:10px auto 0; border-radius:11px; background:var(--bk-fill); }
.bk-find-scope button{ min-height:36px; border:0; border-radius:8px; background:transparent; color:var(--bk-sub); font:500 14px/1 inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bk-find-scope button.on{ background:var(--bk-sheet); color:var(--bk-fg); font-weight:700; box-shadow:0 1px 4px rgba(50,35,15,.08); }
.bk-find-top{ display:flex; align-items:center; gap:8px; max-width:760px; margin:0 auto; padding:9px 14px; box-sizing:border-box; }
@media (min-width:900px){ .bk-find-top{ padding:11px 24px; } }
.bk-find-mag{ flex:0 0 auto; width:20px; height:20px; color:var(--bk-muted); display:flex; }
.bk-find-mag svg{ width:20px; height:20px; }
.bk-find-inp{ flex:1; min-width:0; border:none; background:none; outline:none; font-size:16px; color:var(--bk-fg); -webkit-appearance:none; padding:6px 0; }
.bk-find-inp::placeholder{ color:var(--bk-muted); }
.bk-find-inp::-webkit-search-cancel-button{ -webkit-appearance:none; }
.bk-find-cnt{ flex:0 0 auto; font-size:13px; color:var(--bk-muted); min-width:38px; text-align:right; font-variant-numeric:tabular-nums; }
.bk-find-nav{ flex:0 0 auto; width:32px; height:32px; border:none; border-radius:8px; background:var(--bk-fill); color:var(--bk-sub); display:flex; align-items:center; justify-content:center; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bk-find-nav svg{ width:20px; height:20px; }
.bk-find-nav:hover{ color:var(--bk-gold); } .bk-find-nav:active{ background:var(--bk-gold); color:#fff; }
.bk-find-close{ flex:0 0 auto; width:32px; height:32px; border:none; border-radius:8px; background:none; color:var(--bk-muted); font-size:16px; line-height:1; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bk-find-close:active{ background:var(--bk-fill); }
.bk-find-res{ max-width:760px; margin:0 auto; max-height:46vh; overflow-y:auto; -webkit-overflow-scrolling:touch; border-top:1px solid var(--bk-line); }
.bk-find-rhead, .bk-find-hint{ font-size:12.5px; color:var(--bk-muted); padding:10px 16px 5px; }
@media (min-width:900px){ .bk-find-rhead, .bk-find-hint{ padding:10px 24px 5px; } }
.bk-find-item{ display:block; text-decoration:none; padding:10px 16px; border-bottom:1px solid var(--bk-line); }
@media (min-width:900px){ .bk-find-item{ padding:11px 24px; } }
.bk-find-item:last-child{ border-bottom:none; }
.bk-find-item:hover, .bk-find-item:active{ background:var(--bk-fill); }
.bk-find-it-t{ font-size:14.5px; font-weight:600; color:var(--bk-fg); line-height:1.4; }
.bk-find-it-s{ font-size:12.5px; color:var(--bk-muted); line-height:1.55; margin-top:3px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.bk-find-it-t [style*="color:red"], .bk-find-it-s [style*="color:red"]{ color:var(--bk-gold)!important; background:none!important; font-weight:700; }

/* 页内命中高亮（临时 mark，翻篇/新划线时清除） */
mark.bk-find{ background:rgba(245,200,70,.45); color:inherit; border-radius:2px; box-shadow:inset 0 -1px 0 rgba(200,150,20,.55); }
mark.bk-find.bk-find-cur{ background:var(--bk-gold); color:#fff; box-shadow:0 0 0 2px var(--bk-gold); }
html[data-bk-theme="night"] mark.bk-find{ background:rgba(240,200,90,.30); }
html[data-bk-theme="night"] mark.bk-find.bk-find-cur{ background:var(--bk-gold); color:#15171b; }

/* 查找条打开时给正文顶部让位（避免第一行被盖） */
html.bk-finding.bk-ready body{ padding-top:216px !important; }
@media (min-width:900px){ html.bk-finding.bk-ready body{ padding-top:274px !important; } }
html.bk-finding.bk-toc-ready body{ padding-top:156px !important; }
@media (min-width:900px){ html.bk-finding.bk-toc-ready body{ padding-top:212px !important; } }

/* ══════════ 左右翻书翻页模式（bk-flip.js） ══════════ */
html.bk-flip, html.bk-flip body{ overflow:hidden !important; height:100% !important; }
html.bk-flip #_bnav{ display:none !important; }                 /* 沉浸阅读：隐藏站点底栏 */
html.bk-flip #bk-root{
  position:fixed; left:0; right:0; top:116px;
  bottom:calc(30px + env(safe-area-inset-bottom,0px));
  margin:0 !important; padding:0 22px !important;
  overflow:hidden;                         /* ⭐用 scrollLeft 翻页(JS)：overflow:hidden 仍可程序化滚动，且隐藏滚动条 */
  column-width:calc(100vw - 44px); column-gap:44px; column-fill:auto;
  -webkit-column-width:calc(100vw - 44px); -webkit-column-gap:44px;
  will-change:scroll-position; touch-action:pan-y;
  scrollbar-width:none;
}
html.bk-flip #bk-root::-webkit-scrollbar{ display:none; }
/* 翻页模式：#bk-root 加背景挡住身后元素(它是 fixed 透明的，否则页面其它元素会透出来) */
html.bk-flip #bk-root{ background:var(--bk-bg) !important; }
/* 翻页模式隐藏非分页内容(捐款横幅/尾卡等，它们在 #bk-root 之外会透出来干扰阅读) */
html.bk-flip #dnt-end, html.bk-flip [id^="dnt-"], html.bk-flip .dnt-banner{ display:none !important; }
html.bk-toolbar-hidden.bk-flip #bk-root{ top:52px; }
@media (min-width:900px){
  html.bk-flip #bk-root{ top:174px; }
  html.bk-toolbar-hidden.bk-flip #bk-root{ top:108px; }
}
html.bk-flip #bk-root .main{ max-width:none !important; margin:0 !important; padding:0 !important; }
html.bk-flip #bk-root > *{ max-width:none !important; float:none !important; }   /* 正文主容器因模板而异(.main/#c/裸块)，统一去约束让其正常分栏 */
html.bk-flip #bk-root #c{ margin:0 !important; padding:0 !important; }
html.bk-flip #bk-root .bk-chead{ margin-top:0 !important; }
html.bk-flip #bk-root .bk-support{ break-inside:avoid; -webkit-column-break-inside:avoid; }
html.bk-flip #bk-root .bk-pager{ break-inside:avoid; -webkit-column-break-inside:avoid; margin-top:20px; }
#bk-flip-ind{
  position:fixed; left:0; right:0; bottom:calc(6px + env(safe-area-inset-bottom,0px));
  text-align:center; font-size:12.5px; color:var(--bk-muted,#867d70);
  z-index:1000; pointer-events:none; letter-spacing:.5px; font-variant-numeric:tabular-nums;
}

@media(min-width:768px){ .bk-flip-sec{ display:none; } }   /* 翻页仅手机端可用，桌面隐藏开关 */

/* ══ 窄屏工具条适配（≤374px 手机，防按钮溢出被切）══ */
.bk-bar-acts{ overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.bk-bar-acts::-webkit-scrollbar{ display:none; }
@media (max-width:374px){
  #bk-bar{ padding:0 4px; gap:0; }
  .bk-bb.bk-lb{ min-width:44px; padding:0 2px; }
  .bk-bb.bk-lb svg{ width:21px; height:21px; }
  .bk-lbl{ font-size:9.5px; }
  .bk-bb.bk-back svg{ width:22px; height:22px; }
}

/* 无 .main 包裹、#c 直接作正文容器的页：也给舒适阅读栏(居中收窄+内边距) */
html.bk-ready #bk-root > #c{ max-width:700px; margin:0 auto; padding:10px 24px 8px; box-sizing:border-box; }

/* ── 金句卡浮标(#sc-entry, sharecard.js 注入, z-index 极高)避让 ── */
/* 设置面板打开时隐藏，否则盖住「翻页方式」等开关 */
html:has(#bk-sheet.open) #sc-entry, html:has(#bk-sheet.open) #sc-confirm{ display:none !important; }
/* 左右翻页模式下隐藏(免与翻页点击冲突) */
html.bk-flip #sc-entry, html.bk-flip #sc-confirm{ display:none !important; }

/* ══ 文章内字号层级统一(和谐比例) —— 覆盖旧书 CSS 把 .cn2/.cn3 标题和经文链接放大到 24-26px 的乱象 ══
   正文 1em(18.5px) → 大纲标题梯度温和 → 经文/引用链接与正文同号，全篇不再忽大忽小。 */
html.bk-ready #bk-root .cn1{ font-size:1.11em !important; font-weight:700 !important; }   /* 大纲一级(壹/纲目) ~20.5px */
.cn1{ font-size:1.11em !important; font-weight:700 !important; }
html.bk-ready #bk-root .cn2{ font-size:1.05em !important; font-weight:600 !important; }   /* 大纲二级(一/二)  ~19.5px */
html.bk-ready #bk-root .cn3{ font-size:1em    !important; font-weight:600 !important; }   /* 大纲三级(1/2/a) 与正文同号加粗 */
/* 正文内经文引用/超链接与正文同号(旧CSS放大到24px太跳)，颜色不动 */
html.bk-ready #bk-root .main a, html.bk-ready #bk-root #c a, html.bk-ready #bk-root .cont a,
html.bk-ready #bk-root [id="title"] a, html.bk-ready #bk-root a.rcv-ref{ font-size:1em !important; }
/* 正文内 <b>/<strong>/<font> 不改变字号(只保留加粗)，避免旧内联放大 */
html.bk-ready #bk-root .main b, html.bk-ready #bk-root .main strong, html.bk-ready #bk-root .main font,
html.bk-ready #bk-root #c b, html.bk-ready #bk-root #c strong, html.bk-ready #bk-root #c font,
html.bk-ready #bk-root .cont b, html.bk-ready #bk-root .cont strong, html.bk-ready #bk-root .cont font{ font-size:1em !important; }

/* 大纲缩进层级 .l1-.l6(旧书把 .l1=24/.l2=22/.l3=20px 全大过正文) → 压成温和梯度，与 .cn 一致 */
html.bk-ready #bk-root .l1{ font-size:1.11em !important; }   /* ~20.5px */
html.bk-ready #bk-root .l2{ font-size:1.05em !important; }   /* ~19.5px */
html.bk-ready #bk-root .l3, html.bk-ready #bk-root .l4,
html.bk-ready #bk-root .l5, html.bk-ready #bk-root .l6{ font-size:1em !important; }   /* 18.5px */

/* 李文集/倪文集正文用 <p class="A1..A9">(直接在 #bk-root 下, 无 .main 包裹, 旧CSS 25.5px 过大) → 纳入统一字号 */
html[data-bk-fs="1"] #bk-root p{ font-size:15.5px !important; }
html[data-bk-fs="2"] #bk-root p{ font-size:17px !important; }
html[data-bk-fs="3"] #bk-root p{ font-size:18.5px !important; }
html[data-bk-fs="4"] #bk-root p{ font-size:20.5px !important; }
html[data-bk-fs="5"] #bk-root p{ font-size:22.5px !important; }
html[data-bk-fs="6"] #bk-root p{ font-size:25px !important; }
html[data-bk-ls="1"] #bk-root p{ line-height:1.7 !important; }
html[data-bk-ls="2"] #bk-root p{ line-height:1.95 !important; }
html[data-bk-ls="3"] #bk-root p{ line-height:2.3 !important; }
/* 李/倪正文段落也给舒适阅读栏(它们直接在 #bk-root 下无 .main) */
html.bk-ready #bk-root > p{ max-width:700px; margin-left:auto !important; margin-right:auto !important; padding-left:24px; padding-right:24px; box-sizing:border-box; }

/* ══ 划线新建浮条重排为两行(上行5色均分, 下行 写笔记|复制) ══ */
.bk-hp{ padding:10px 12px 11px; min-width:240px; }
.bk-hp-colors{ justify-content:space-between; gap:4px; flex-wrap:nowrap; }
.bk-hp-colors .bk-hp-swi{ min-width:0; flex:1 1 0; }
.bk-hp-acts{ justify-content:space-between; align-items:center; gap:12px; margin-top:10px; padding-top:9px; border-top:1px solid rgba(255,255,255,.15); flex-wrap:nowrap; }
.bk-hp-acts .bk-hp-note{ padding:8px 20px; }
.bk-hp-acts .bk-hp-b[data-act="copy"]{ padding:8px 18px; }

/* ══ 微信读书式选择手柄(起/止 可拖圆手柄) ══ */
/* 微信读书式桃形手柄：水滴状带尖，尖指向文字——起点手柄在首字左下(尖朝右上)、终点在末字右下(尖朝左上) */
.bk-selh{ position:fixed; z-index:2147483646; width:34px; height:34px; margin:-17px 0 0 -17px; touch-action:none; -webkit-tap-highlight-color:transparent; }
.bk-selh::after{ content:""; position:absolute; width:17px; height:17px;
  background:var(--bk-gold,#c08b2d); box-shadow:0 1px 5px rgba(0,0,0,.3); }
.bk-selh-start::after{ left:0; top:17px; border-radius:50% 2px 50% 50%; }   /* 圆在锚点左下，右上角是尖 */
.bk-selh-end::after{ left:17px; top:17px; border-radius:2px 50% 50% 50%; }  /* 圆在锚点右下，左上角是尖 */

/* ══ AI朗读条·调速按钮:金色描边加大加深(Kris:颜色太浅且有点小) ══ */
html.bk-ready .tts-ctrl-btn{ background:transparent !important; border:1.5px solid var(--bk-gold,#b07f2c) !important;
  color:var(--bk-gold,#b07f2c) !important; font-size:14.5px !important; font-weight:700 !important;
  padding:7px 14px !important; border-radius:999px !important; min-width:56px !important; }

/* ══ 通用正文容器 .bk-prose(老页面div直挂内容套阅读器用):跟随字号/行距/主题色/阅读栏 ══ */
#bk-root .bk-prose{ color:var(--bk-fg,#2a2a2a); }
html.bk-ready #bk-root .bk-prose{ max-width:700px; margin:0 auto; padding:0 24px; box-sizing:border-box;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
html[data-bk-fs="1"] #bk-root .bk-prose{ font-size:15.5px; }
html[data-bk-fs="2"] #bk-root .bk-prose{ font-size:17px; }
html[data-bk-fs="3"] #bk-root .bk-prose{ font-size:18.5px; }
html[data-bk-fs="4"] #bk-root .bk-prose{ font-size:20.5px; }
html[data-bk-fs="5"] #bk-root .bk-prose{ font-size:22.5px; }
html[data-bk-fs="6"] #bk-root .bk-prose{ font-size:25px; }
html[data-bk-ls="1"] #bk-root .bk-prose{ line-height:1.7; }
html[data-bk-ls="2"] #bk-root .bk-prose{ line-height:1.95; }
html[data-bk-ls="3"] #bk-root .bk-prose{ line-height:2.3; }

/* ══ 工具条「更多」面板(微信读书式: 加入书架/标记读完/纠错/复制链接) ══ */
#bk-mscrim{ position:fixed; inset:0; background:rgba(20,15,5,.42); z-index:1200; opacity:0; pointer-events:none; transition:opacity .25s; }
#bk-mscrim.open{ opacity:1; pointer-events:auto; }
#bk-more{ position:fixed; left:0; right:0; bottom:0; z-index:1201; background:var(--bk-sheet,#fffdf8); border-radius:18px 18px 0 0;
  padding:6px 18px calc(18px + env(safe-area-inset-bottom,0px)); transform:translateY(108%); transition:transform .28s cubic-bezier(.32,.72,0,1);
  max-width:520px; max-height:calc(100vh - 70px); overflow-y:auto; -webkit-overflow-scrolling:touch;
  box-sizing:border-box; margin:0 auto; box-shadow:0 -8px 34px rgba(30,20,8,.22); }
#bk-more.open{ transform:translateY(0); }
@media(max-width:767px){ #bk-more{ bottom:calc(56px + env(safe-area-inset-bottom,0px)); } }
@media(min-width:900px){
  #bk-more{ bottom:auto; top:50%; left:50%; right:auto; width:400px; border-radius:16px;
    transform:translate(-50%,-46%); opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; }
  #bk-more.open{ transform:translate(-50%,-50%); opacity:1; pointer-events:auto; }
  #bk-mgrab{ display:none; }
}
#bk-mgrab{ width:38px; height:4.5px; border-radius:3px; background:var(--bk-line,#d8cdb8); margin:6px auto 10px; }
.bk-mo-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:4px 0; }
.bk-mo-b{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:44px; border:0; background:transparent; box-shadow:none; padding:6px 2px; cursor:pointer; color:var(--bk-fg,#2b2117); font-family:inherit; font-size:12px; font-weight:500; line-height:1.2; }
.bk-mo-b .ic{ width:52px; height:52px; border-radius:50%; background:rgba(0,0,0,.055); display:flex; align-items:center; justify-content:center; }
html[data-bk-theme=night] .bk-mo-b .ic{ background:rgba(255,255,255,.09); }
.bk-mo-b .ic svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.bk-mo-b.on{ color:var(--bk-gold,#b07f2c); }
.bk-mo-b.on .ic{ background:rgba(176,127,44,.15); }
.bk-mo-stats-cap{ margin:2px 0 7px; color:var(--bk-sub,#8a8378); text-align:center; font-size:12px; font-weight:600; line-height:1.4; letter-spacing:.12em; }
.bk-mo-stats-category{ margin:0 0 14px; color:var(--bk-fg,#2b2117); text-align:center; font-size:14px; line-height:1.5; }
.bk-mo-stats-metrics{ display:flex; margin:4px 0 6px; }
.bk-mo-stat{ flex:1; min-width:0; text-align:center; }
.bk-mo-stat strong{ display:flex; align-items:baseline; justify-content:center; color:var(--bk-fg,#2b2117); line-height:1.1; white-space:nowrap; }
.bk-mo-stat strong b{ font-size:26px; font-weight:800; }
.bk-mo-stat strong i{ margin-left:2px; font-size:13px; font-style:normal; font-weight:600; }
.bk-mo-stat em{ display:block; margin-top:5px; color:var(--bk-sub,#8a8378); font-size:12.5px; font-style:normal; line-height:1.35; }
.bk-mo-stats p{ margin:12px 6px 2px; color:var(--bk-sub,#8a8378); text-align:center; font-size:12px; line-height:1.7; }
.bk-mo-stats-more{ display:flex; align-items:center; justify-content:center; min-height:48px; margin:16px 0 2px; padding:13px; border:0; border-radius:12px; background:rgba(176,127,44,.08); box-shadow:none; color:var(--bk-gold,#b07f2c); text-decoration:none; font-size:15px; font-weight:700; }
.bk-mo-stats-more svg{ width:18px; height:18px; margin-left:4px; }
/* 8钮工具条窄屏再压一档 */
@media(max-width:430px){ .bk-bar-acts{ gap:0; } .bk-bb.bk-lb{ min-width:41px; padding:0 1px; } .bk-bb .bk-lbl{ font-size:10px; } }
@media(max-width:360px){
  .bk-bar-acts .bk-bb.bk-lb{ flex:1 0 32px; width:32px; min-width:32px; height:54px; min-height:44px; padding:0; }
  .bk-lbl{ font-size:9.5px; letter-spacing:0; }
}

/* ══ 弹层滚动: 侧边抽屉锁背景；底部弹层只约束内部边界，外部正文仍可滚动 ══ */
html.bk-lock,body.bk-lock{ overflow:hidden!important; overscroll-behavior:none; }
#bk-sheet,#bk-more{ overscroll-behavior:contain; }
#bk-outline .bk-od-list,#bk-notes .bk-nt-list{ overscroll-behavior:contain; }
.bk-find-res{ overscroll-behavior:contain; }
#bk-scrim,#bk-mscrim{ touch-action:pan-y; }
#bk-od-scrim,#bk-notes-scrim{ touch-action:none; }
