/* 阅读页两层共用的：浮动底栏、“更多”、跳到、目录三个浮层（DESIGN §4.3–§4.5；原型 o07、v-m0-bar、v-m0-more、o12、o13）。
   颜色只用 tokens.css 的变量。原页层自己的样式在 page.css。
   底栏（read/bar.js）：浮在底部正中；按钮一律最小高度、不写死高度，系统字号 150%、200% 时字不溢出（规则 17）；
   深色下用 1px --rule 的边框分开，不靠阴影（规则 16）；墨水屏没有这条栏（页码行和菜单在墨水屏那一步）。 */

/* =====================================================================
   浮动底栏：[37 / 745] [更多]（M0，Q10）；往下读 48px 收起（.hide）
   ===================================================================== */
#tb .ftb { position: fixed; z-index: 30; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); max-width: calc(100vw - 32px);
  min-height: var(--tb-h); padding: 8px; gap: 4px; display: flex; align-items: center; border-radius: var(--r-full); background: var(--s2); color: var(--ink);
  box-shadow: var(--shadow); transition: transform var(--t-fast) var(--ease-std); }
#tb .ftb.hide { transform: translate(-50%, calc(100% + 32px + var(--safe-b))); }
#tb .ftb.hide:has(:focus-visible) { transform: translateX(-50%); }
.tb-i { min-width: 60px; min-height: var(--tap); padding: 4px 6px; flex: none; border-radius: var(--r-l); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--ink); font-size: .75rem; line-height: 1rem; font-weight: 500; }
.tb-i svg { width: 22px; height: 22px; fill: currentColor; }
.tb-i .tl { white-space: nowrap; }
.tb-i:active { background: var(--s3); }
.tb-i[aria-disabled="true"] { opacity: .45; cursor: default; }
.tb-pg { min-height: var(--tap); min-width: 6.5em; padding: 4px 16px; flex: none; border-radius: var(--r-full); background: var(--bg); color: var(--ink); font-size: .9375rem; line-height: 1.3; white-space: nowrap; }
.tb-pg:active { background: var(--s3); }
html[data-theme="dark"] #tb .ftb { box-shadow: none; border: 1px solid var(--rule); }
html[data-theme="eink"] #tb .ftb { display: none; }
@media (prefers-reduced-motion: reduce) { #tb .ftb { transition: none; } }

/* =====================================================================
   浮层里的几样（“更多”、跳到、目录；浮层的框在 base.css dialog.sheet）
   ===================================================================== */
.sh-info { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: .875rem; line-height: 1.6; }
.sh-v { display: flex; align-items: center; flex-wrap: wrap; column-gap: 0; }
.sh-note { padding: 14px 0 6px; font-size: .875rem; color: var(--ink2); line-height: 1.6; }
.sh-more > .sh-row:first-of-type { padding-top: 14px; }
/* 跳到：数字框 + “/ 745” + “跳” */
.jump-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 0 6px; }
.jump-in { width: 6.5em; font-variant-numeric: tabular-nums; }
.jump-of { color: var(--ink2); font-variant-numeric: tabular-nums; }
.jump-row .btn-fill { margin-left: auto; }
.jump-msg { min-height: 1.2em; font-size: .8125rem; color: var(--ink); font-weight: 600; }
.jump-msg:empty { min-height: 0; }
.jump-opt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 0; }
.jump-lab[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-ink); border-color: var(--inv-bg); }
/* 目录：一条一行，书名一样的宋体不截断；正在读的标“在读”（字，不只靠颜色） */
.toc-k { display: block; margin-top: 14px; padding-bottom: 4px; }
.toc li { border-top: 1px solid var(--rule); }
.toc-a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; min-height: var(--tap); padding: 12px 0 10px; text-align: left; }
.toc-t { font-family: var(--serif); font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.toc-t:lang(en) { font-family: var(--latin-serif), var(--serif); }
.toc-a small { flex: none; font-size: .75rem; color: var(--ink2); }
.toc-x { color: var(--ink2); }
.toc .lv2 .toc-a { padding-left: 1rem; }
.toc .lv3 .toc-a { padding-left: 2rem; }
.toc .lv4 .toc-a { padding-left: 3rem; }
.toc li.on .toc-t { font-weight: 600; }
.toc li.on .toc-a small { color: var(--ink); font-weight: 600; }
