/* ============================================================
   读书笔记 · 页面预览公共样式
   视觉方向：纸质书房暖调 —— 纸白、木色层板、书脊投影、衬线标题
   375 宽基准，手机外框内演示；真实项目落 uni-app
   ============================================================ */

:root {
  /* 纸与墨 */
  --paper: #F6F1E7;
  --paper-2: #FBF8F1;
  --surface: #FFFFFF;
  --surface-2: #FCFAF4;

  --ink-900: #2A2521;
  --ink-800: #352F29;
  --ink-700: #443C34;
  --ink-600: #5A5047;
  --ink-500: #776B5D;
  --ink-400: #96897A;
  --ink-300: #B4A795;

  /* 木 */
  --wood-900: #5C3F27;
  --wood-800: #6B4A2C;
  --wood-700: #7A5533;
  --wood-600: #8E6438;
  --wood-500: #A87C4A;
  --wood-400: #C49A66;
  --wood-300: #DFC3A0;
  --wood-200: #EEDCC4;
  --wood-100: #F6EBDC;

  /* 强调：旧书红 / 苔绿 / 藏青 */
  --red-700: #8C3B2E;
  --red-500: #B04E3C;
  --red-100: #F7E7E2;
  --sage-700: #4C6350;
  --sage-500: #68826C;
  --sage-100: #EBF0E9;
  --navy-700: #33475B;
  --navy-100: #E8EDF1;
  --amber-700: #8A6320;
  --amber-100: #F8EFDC;

  --line: #E8DED0;
  --line-strong: #D8CAB6;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;

  /* 书脊 / 层板投影 */
  --shadow-book: 0 6px 14px -4px rgba(74, 53, 32, .28), 0 2px 4px rgba(74, 53, 32, .12);
  --shadow-shelf: inset 0 1px 0 #FFF9EF, 0 3px 0 #C9A97E, 0 8px 12px -6px rgba(74, 53, 32, .28);
  --shadow-card: 0 1px 2px rgba(74, 53, 32, .06), 0 4px 12px -6px rgba(74, 53, 32, .16);

  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font: 14px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- 图标 ---------- */
.ic {
  width: 16px; height: 16px; flex-shrink: 0; display: inline-block;
  vertical-align: -3px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.ic.sm { width: 13px; height: 13px; vertical-align: -2px; stroke-width: 1.9; }
.ic.lg { width: 20px; height: 20px; vertical-align: -4px; stroke-width: 1.6; }
.ic.xl { width: 26px; height: 26px; vertical-align: -6px; stroke-width: 1.5; }

/* ---------- 文档外壳 ---------- */
.doc-body { background: #EAE2D6; min-height: 100vh; padding: 26px 16px 46px; }
.doc-wrap { max-width: 430px; margin: 0 auto; }

.doc-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 14px;
}
.doc-head .left { min-width: 0; }
.doc-head h1 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-head .crumb { margin: 3px 0 0; font-size: 11.5px; color: var(--ink-400); font-family: ui-monospace, Consolas, monospace; }
.doc-head .nav { display: flex; gap: 6px; flex-shrink: 0; }
.doc-head .nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 9px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-strong);
  font-size: 12px; color: var(--ink-600); transition: .16s;
}
.doc-head .nav a:hover { border-color: var(--wood-600); color: var(--wood-900); }
.doc-head .nav a.disabled { opacity: .35; pointer-events: none; }

.phone {
  position: relative; width: 100%; height: 812px;
  border-radius: 38px; border: 9px solid #241F1A;
  background: var(--paper); overflow: hidden;
  box-shadow: 0 18px 40px rgba(36, 31, 26, .22);
  display: flex; flex-direction: column;
}

.statusbar {
  height: 28px; padding: 0 20px; display: flex; align-items: center;
  justify-content: space-between; font-size: 10.5px; font-weight: 600;
  color: var(--ink-900); flex: 0 0 28px;
}
.statusbar .r { display: flex; gap: 5px; align-items: center; }
.statusbar .r i { display: block; width: 14px; height: 7px; border: 1.2px solid currentColor; border-radius: 2px; opacity: .7; }
.statusbar .r i.sig { width: 13px; height: 8px; border: 0; background: currentColor; border-radius: 1px; opacity: .55; }

.navbar {
  position: relative; flex: 0 0 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 56px;
}
.navbar .title { font-size: 16px; font-weight: 650; letter-spacing: -.1px; font-family: var(--serif); }
.navbar .sub { display: block; font-size: 10.5px; color: var(--ink-400); font-weight: 400; margin-top: 1px; font-family: var(--sans); }
.navbar .back, .navbar .act {
  position: absolute; top: 0; height: 46px; display: flex; align-items: center;
  background: none; border: 0; padding: 0; font-size: 13px; color: var(--ink-600);
}
.navbar .back { left: 14px; font-size: 20px; }
.navbar .act { right: 14px; }
.navbar .act.pill {
  height: 27px; top: 9px; padding: 0 12px; border-radius: 999px;
  background: var(--wood-100); color: var(--wood-900); font-size: 11.5px; font-weight: 600;
}

.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 2px 16px 24px; scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }
.scroll.flush { padding-left: 0; padding-right: 0; }
.scroll.tight { padding-left: 11px; padding-right: 11px; }

/* ---------- 通用 ---------- */
.muted { color: var(--ink-500); }
.tiny { font-size: 11.5px; color: var(--ink-400); line-height: 1.6; }
.small { font-size: 12.5px; color: var(--ink-500); }
.strong { font-weight: 650; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }

.card {
  background: var(--surface); border-radius: var(--radius);
  padding: 15px; border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 11px; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 2px 10px; font-size: 12.5px; color: var(--ink-500); font-weight: 600;
}
.section-title:first-child { margin-top: 6px; }
.section-title .link { color: var(--wood-700); font-size: 11.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--wood-700); color: #fff; font-size: 14.5px; font-weight: 600;
  transition: .16s; letter-spacing: .2px;
}
.btn:active { transform: scale(.985); }
.btn.ghost { background: var(--wood-100); color: var(--wood-900); }
.btn.line { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-600); font-weight: 500; }
.btn.sm { width: auto; min-height: 32px; padding: 0 14px; font-size: 12.5px; }
.btn.xs { width: auto; min-height: 27px; padding: 0 11px; font-size: 11.5px; }

/* ---------- 书架：分层木架 ---------- */
.shelf { padding: 0 3px; }

.shelf-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 由脚本按设备宽度覆盖为 4 列 */
  gap: 18px 13px;
  padding: 6px 10px 0;
  margin-bottom: 0;
}

/* 层板：木纹 + 前挡板阴影 */
.shelf-plank {
  position: relative; height: 15px; margin: 9px 0 24px;
  border-radius: 2px 2px 4px 4px;
  background: linear-gradient(180deg, #D9B588 0%, #C39A68 42%, #A8804F 100%);
  box-shadow: inset 0 1px 0 rgba(255, 249, 236, .9), 0 4px 10px -5px rgba(74, 53, 32, .45);
}
.shelf-plank::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #8A6337, #6E4C28);
  opacity: .55;
}

/* ---------- 书本卡片 ---------- */
.book {
  position: relative; display: block; text-align: left; border: 0; background: none;
  padding: 0; width: 100%; cursor: pointer;
  transition: transform .18s ease;
}
.book:active { transform: translateY(1px) scale(.985); }

.book-cover {
  position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 3px 6px 6px 3px;
  overflow: hidden; background: var(--wood-200);
  box-shadow: var(--shadow-book);
}
/* 书脊：左侧压暗 + 高光条 */
.book-cover::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; z-index: 3;
  background: linear-gradient(90deg, rgba(0,0,0,.30), rgba(0,0,0,.07) 55%, rgba(255,255,255,.16) 100%);
}
/* 书页侧边 */
.book-cover::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 4px; z-index: 3;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.85) 0 2px, rgba(0,0,0,.08) 2px 3px);
  opacity: .5;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }

/* 无封面时用文字封面 */
.book-cover .cover-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: space-between; padding: 13px 10px 11px 17px; color: #fff;
}
.book-cover .cover-fallback .cf-title {
  font-family: var(--serif); font-size: 15px; line-height: 1.35; font-weight: 600;
  letter-spacing: .02em; text-shadow: 0 1px 3px rgba(0,0,0,.22);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.book-cover .cover-fallback .cf-author { font-size: 9.5px; opacity: .82; letter-spacing: .04em; }

/* 封面底部书签丝带（有未读/收藏感） */
.book-ribbon {
  position: absolute; top: -1px; right: 11px; width: 13px; height: 26px; z-index: 4;
  background: var(--red-500);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

.book-meta { padding: 9px 2px 0; }
.book-title {
  font-family: var(--serif); font-size: 13.5px; font-weight: 600; line-height: 1.4;
  color: var(--ink-900);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-sub { margin-top: 3px; font-size: 10.5px; color: var(--ink-400); display: flex; align-items: center; gap: 5px; }
.book-sub .dot { width: 2.5px; height: 2.5px; border-radius: 50%; background: currentColor; opacity: .6; }

/* 层板下方的书名铭牌 */
.book-cap { text-align: center; padding: 0 4px; }
.book-cap .t {
  font-family: var(--serif); font-size: 12.5px; font-weight: 600; color: var(--ink-800);
  line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-cap .s { margin-top: 2px; font-size: 10px; color: var(--ink-400); }
.book-cap .s b { color: var(--wood-700); font-weight: 600; }

/* 分类卡（首页：书架式文件夹） */
.cat {
  position: relative; display: block; border: 0; padding: 0; background: none;
  width: 100%; text-align: left; transition: transform .18s ease;
  isolation: isolate;
}
.cat:active { transform: translateY(1px) scale(.985); }
.cat-cover {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 2 / 3; border-radius: 5px 7px 7px 5px;
  overflow: hidden; box-shadow: var(--shadow-book);
  background: var(--wood-200);
}
.cat-cover .cat-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 12px 13px; }
.cat-cover .cat-face::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.02) 30%, rgba(0,0,0,.42) 100%);
}
.cat-cover .cat-name {
  position: relative; z-index: 2; font-family: var(--serif); font-size: 15.5px; font-weight: 600;
  color: #fff; line-height: 1.35; text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.cat-cover .cat-count { position: relative; z-index: 2; margin-top: 4px; font-size: 10.5px; color: rgba(255,255,255,.86); }
.cat-cover .cat-spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 9px; z-index: 3;
  background: linear-gradient(90deg, rgba(0,0,0,.32), rgba(0,0,0,.08) 60%, rgba(255,255,255,.14));
}
/* 书本堆叠：封面后方两张纸 */
.cat-stack {
  position: absolute; inset: 0; z-index: -1;
}
.cat-stack::before, .cat-stack::after {
  content: ""; position: absolute; background: #EFE6D6; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(74,53,32,.18);
}
.cat-stack::before { left: 5px; right: -3px; top: 4px; bottom: -4px; transform: rotate(1.2deg); }
.cat-stack::after { left: 8px; right: -5px; top: 7px; bottom: -7px; transform: rotate(2.2deg); }

/* 「新增」虚线卡 */
.add-tile {
  position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 5px;
  border: 1.5px dashed var(--line-strong); background: rgba(255,255,255,.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  color: var(--ink-400); font-size: 11.5px; transition: .16s;
}
.add-tile:hover { border-color: var(--wood-500, var(--wood-600)); color: var(--wood-700); background: #fff; }
.add-tile .ic { width: 22px; height: 22px; stroke-width: 1.4; }

/* ---------- 底部悬浮操作 ---------- */
.fab-bar {
  flex: 0 0 auto; display: flex; gap: 10px; padding: 10px 16px 18px;
  background: linear-gradient(180deg, rgba(246,241,231,0), var(--paper) 38%);
  position: relative; z-index: 20;
}

/* ---------- 列表条目 ---------- */
.entry {
  position: relative; display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: var(--shadow-card); transition: .16s;
}
.entry + .entry { margin-top: 10px; }
.entry:hover { border-color: var(--wood-300); }
.entry-hd { display: flex; align-items: baseline; gap: 8px; }
.entry-hd .date { font-size: 10.5px; color: var(--ink-400); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.entry-hd .idx { font-family: var(--serif); font-size: 11px; color: var(--wood-500, var(--wood-600)); }
.entry-title { margin: 4px 0 0; font-family: var(--serif); font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.entry-text {
  margin: 6px 0 0; font-size: 12.5px; color: var(--ink-600); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.entry-foot { margin-top: 9px; display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--ink-400); }
.entry-foot .chip { display: inline-flex; align-items: center; gap: 4px; }
.entry-foot .chip .ic { width: 12px; height: 12px; }
.entry-note {
  margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--wood-700);
}

/* 备注树：左引导线表示层级 */
.nest { position: relative; padding-left: 14px; }
.nest::before {
  content: ""; position: absolute; left: 3px; top: 4px; bottom: 12px; width: 1px;
  background: linear-gradient(180deg, var(--line-strong), transparent);
}

/* ---------- 块编辑（感悟正文） ---------- */
.blocks { display: flex; flex-direction: column; gap: 10px; }
.block {
  position: relative; border-radius: var(--radius-sm);
  border: 1px solid transparent; transition: .14s;
}
.block:focus-within, .block.hl { border-color: var(--wood-300); background: var(--surface-2); }
.block-text {
  width: 100%; border: 0; background: none; resize: none; outline: none;
  font-size: 14px; line-height: 1.9; color: var(--ink-900); padding: 2px 0 2px 2px;
  min-height: 30px; overflow: hidden;
}
.block-text::placeholder { color: var(--ink-300); }
.block-img { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.block-img img { width: 100%; height: auto; }
.block-bar {
  position: absolute; top: 6px; right: 6px; display: flex; gap: 5px; opacity: 0;
  transition: .16s;
}
.block:hover .block-bar, .block:focus-within .block-bar { opacity: 1; }
.icon-btn {
  width: 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255,255,255,.94);
  color: var(--ink-500); padding: 0;
}
.icon-btn .ic { width: 13px; height: 13px; }
.icon-btn:hover { color: var(--red-700); border-color: var(--red-500); }

.audio-block {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.audio-play {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; border: 0;
  background: var(--wood-700); color: #fff; display: flex; align-items: center; justify-content: center;
}
.audio-play .ic { width: 14px; height: 14px; }
.audio-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 26px; min-width: 0; }
.audio-wave i {
  display: block; width: 2.5px; border-radius: 2px; background: var(--wood-400);
  animation: wave 1.1s ease-in-out infinite;
}
@keyframes wave { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.audio-dur { font-size: 11px; color: var(--ink-400); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

.block-toolbar {
  display: flex; gap: 6px; padding: 8px 0 0; border-top: 1px dashed var(--line); margin-top: 4px;
}
.tool {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: #fff;
  color: var(--ink-600); font-size: 11.5px;
}
.tool:hover { border-color: var(--wood-500, var(--wood-600)); color: var(--wood-900); }
.tool .ic { width: 13px; height: 13px; }

/* ---------- 表单 ---------- */
.field + .field { margin-top: 13px; }
.field label { display: block; font-size: 11.5px; color: var(--ink-500); margin-bottom: 6px; letter-spacing: .02em; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; padding: 10px 12px; outline: none; transition: .16s;
  font-size: 13.5px; line-height: 1.6;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--wood-500, var(--wood-600)); box-shadow: 0 0 0 3px rgba(142,100,56,.11); }
.textarea { resize: vertical; min-height: 84px; }
.hint { margin: 5px 0 0; font-size: 11px; color: var(--ink-400); }

/* 封面选择器 */
.cover-picker { display: flex; gap: 11px; align-items: flex-start; }
.cover-preview {
  width: 78px; aspect-ratio: 2 / 3; flex: 0 0 78px; border-radius: 3px 5px 5px 3px;
  overflow: hidden; box-shadow: var(--shadow-book); position: relative; background: var(--wood-200);
}
.cover-preview::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px;
  background: linear-gradient(90deg, rgba(0,0,0,.3), rgba(0,0,0,.05) 60%, rgba(255,255,255,.15));
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-opts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; border-radius: 7px; border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(0,0,0,.07) inset; padding: 0;
}
.swatch.on { border-color: var(--ink-700); box-shadow: 0 0 0 2px #fff inset; }

/* ---------- 空状态 ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--ink-400); }
.empty .ic { width: 34px; height: 34px; stroke-width: 1.3; margin-bottom: 10px; opacity: .55; }
.empty p { margin: 0; font-size: 12.5px; }

/* ---------- 弹层 / 抽屉 ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 60; display: none;
  background: rgba(42, 37, 33, .34); backdrop-filter: blur(1.5px);
}
.overlay.on { display: block; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 61;
  background: var(--paper-2); border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 30px rgba(42,37,33,.18);
  padding: 8px 16px 20px; transform: translateY(102%); transition: transform .26s cubic-bezier(.3,.8,.3,1);
  max-height: 82%; overflow-y: auto;
}
.sheet.on { transform: translateY(0); }
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 6px auto 12px; }
.sheet h3 { margin: 0 0 3px; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.sheet .sheet-sub { margin: 0 0 15px; font-size: 11.5px; color: var(--ink-400); }
.sheet-acts { display: flex; gap: 9px; margin-top: 16px; }

/* ---------- 提示 toast ---------- */
.toast {
  position: absolute; left: 50%; bottom: 88px; transform: translate(-50%, 8px);
  background: rgba(42, 37, 33, .92); color: #fff; font-size: 12.5px;
  padding: 9px 16px; border-radius: 999px; z-index: 90; opacity: 0;
  transition: .22s; pointer-events: none; white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 面包屑 / 层级路径 ---------- */
.path {
  display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; overflow-x: auto;
  padding: 6px 16px 8px; font-size: 11px; color: var(--ink-400); scrollbar-width: none;
}
.path::-webkit-scrollbar { display: none; }
.path a { color: var(--ink-500); white-space: nowrap; }
.path a:hover { color: var(--wood-700); }
.path .sep { opacity: .5; }
.path .cur { color: var(--ink-700); font-weight: 600; white-space: nowrap; }

/* ---------- 书籍详情头 ---------- */
.book-hero {
  display: flex; gap: 15px; padding: 4px 16px 16px;
}
.book-hero .cover {
  width: 88px; flex: 0 0 88px; aspect-ratio: 2 / 3; border-radius: 3px 6px 6px 3px;
  overflow: hidden; position: relative; box-shadow: var(--shadow-book); background: var(--wood-200);
}
.book-hero .cover::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; z-index: 3;
  background: linear-gradient(90deg, rgba(0,0,0,.3), rgba(0,0,0,.06) 60%, rgba(255,255,255,.16));
}
.book-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-hero .info { min-width: 0; flex: 1; padding-top: 2px; }
.book-hero h2 {
  margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 650; line-height: 1.35;
  letter-spacing: -.2px;
}
.book-hero .author { margin: 5px 0 0; font-size: 12px; color: var(--ink-500); }
.book-hero .stats { margin-top: 10px; display: flex; gap: 14px; }
.book-hero .stats div { font-size: 10.5px; color: var(--ink-400); }
.book-hero .stats b { display: block; font-size: 15px; color: var(--ink-800, var(--ink-700)); font-variant-numeric: tabular-nums; font-weight: 650; }
.book-hero .actions { margin-top: 11px; display: flex; gap: 7px; }

/* 进度条 */
.progress { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; border-radius: 2px; background: var(--wood-600); }

/* ---------- 底栏 tab ---------- */
.tabbar {
  flex: 0 0 auto; height: 54px; display: flex; align-items: center;
  background: rgba(251,248,241,.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 9.5px; color: var(--ink-400); padding-top: 3px;
}
.tabbar a .ic { width: 19px; height: 19px; stroke-width: 1.6; }
.tabbar a.on { color: var(--wood-800, var(--wood-900)); font-weight: 600; }
.tabbar a.on .ic { stroke-width: 1.9; }

/* ---------- 设备切换（手机 / 平板·桌面） ---------- */
.doc-head .devices { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: #fff; border: 1px solid var(--line-strong); flex-shrink: 0; }
.doc-head .devices button {
  border: 0; background: none; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; color: var(--ink-500); line-height: 1.5;
}
.doc-head .devices button.on { background: var(--wood-700); color: #fff; font-weight: 600; }

.doc-wrap.wide { max-width: 828px; }
.phone.wide { height: 700px; }
.phone.wide .navbar { padding: 0 72px; }
.phone.wide .shelf-row { grid-template-columns: repeat(4, 1fr); gap: 20px 18px; padding: 8px 16px 0; }
.phone.wide .shelf { padding: 0 10px; }
.phone.wide .book-cap .t { font-size: 13.5px; }
.phone.wide .book-cover .cover-fallback { padding: 16px 12px 13px 21px; }
.phone.wide .book-cover .cover-fallback .cf-title { font-size: 17px; }

/* ---------- 图片占位（无外链资源，纯 CSS 相片） ---------- */
.photo-ph {
  position: relative; width: 100%; border-radius: 8px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 8%, rgba(255,246,229,.95), rgba(238,220,196,0) 58%),
    linear-gradient(158deg, #E9DDC9 0%, #D9C6AA 47%, #C3AB8C 100%);
  display: flex; align-items: flex-end; padding: 14px;
  min-height: 132px;
}
.photo-ph::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(96deg, rgba(120,94,64,.10) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(6deg, rgba(120,94,64,.07) 0 1px, transparent 1px 17px);
  mix-blend-mode: multiply;
}
.photo-ph::after {
  content: ""; position: absolute; left: 50%; top: 12%; width: 30%; height: 66%;
  transform: translateX(-50%) rotate(-2deg);
  background: linear-gradient(150deg, rgba(255,255,255,.55), rgba(255,255,255,.12));
  border-radius: 3px; box-shadow: 0 4px 14px rgba(90,68,42,.16);
}
.photo-ph .cap {
  position: relative; z-index: 2; font-size: 10.5px; color: #6B5537;
  background: rgba(255,251,243,.86); padding: 3px 9px; border-radius: 999px;
}

.quote-block {
  border-left: 2.5px solid var(--wood-400); padding: 2px 0 2px 12px;
  font-family: var(--serif); font-size: 13.5px; color: var(--ink-700); line-height: 1.85;
}

/* ---------- 移动端：手机框铺满 ---------- */
@media (max-width: 560px) {
  .doc-body { padding: 0; background: var(--paper); }
  .doc-wrap, .doc-wrap.wide { max-width: none; }
  .doc-head { padding: 9px 14px 0; margin-bottom: 8px; }
  .doc-head h1 { font-size: 13.5px; }
  .doc-head .crumb { display: none; }
  .phone, .phone.wide { border: 0; border-radius: 0; height: calc(100dvh - 56px); box-shadow: none; }
  .statusbar { display: none; }
  .phone.wide .navbar { padding: 0 56px; }
}

/* ---------- 多页预览首页 ---------- */
.preview-index { max-width: 1180px; margin: 0 auto; padding: 40px 24px 60px; }
.preview-index .hero { border-bottom: 1px solid var(--line-strong); padding-bottom: 26px; margin-bottom: 30px; }
.preview-index .eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-400); }
.preview-index h1 { margin: 10px 0 8px; font-family: var(--serif); font-size: 30px; font-weight: 650; letter-spacing: -.4px; }
.preview-index .lead { margin: 0; max-width: 760px; font-size: 13.5px; color: var(--ink-600); line-height: 1.8; }
.preview-index .chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.preview-index .chips span { font-size: 11.5px; padding: 4px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line-strong); color: var(--ink-600); }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.preview-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 17px; box-shadow: var(--shadow-card); transition: .16s;
}
.preview-card:hover { border-color: var(--wood-400); transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(74,53,32,.4); }
.preview-card .no { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; color: var(--wood-600); letter-spacing: .06em; }
.preview-card h3 { margin: 6px 0 5px; font-family: var(--serif); font-size: 15px; font-weight: 600; }
.preview-card p { margin: 0; font-size: 12px; color: var(--ink-500); line-height: 1.7; }
.preview-card .tags { margin-top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.preview-card .tags i { font-style: normal; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: var(--wood-100); color: var(--wood-900); }
