:root {
  --paper: #fbf7ee;
  --paper-edge: #efe8d9;
  --ink: #1a1d20;
  --ink-2: #3d4247;
  --grey: #7b7b78;
  --line: #e2dacb;
  --card: #f1ebdd;
  --red: #c21c13;
  --gold: #b8934f;
  --serif: "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0; overflow: hidden;
  color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(120% 90% at 50% 0%, #2c2723 0%, #1b1815 45%, #12100e 100%), #12100e;
}

/* ── 顶栏 ─────────────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; height: 44px; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(18, 16, 14, .92);
}
.bar-l, .bar-r { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bar-l { flex: 0 0 auto; }
.bar-r { flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.bar-r::-webkit-scrollbar { display: none; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #6b6560; }
.dot.on { background: #4aa06a; }
.dot.off { background: var(--red); }
.mono { font-size: 10.5px; letter-spacing: .1em; color: #a49c92; white-space: nowrap; }
.sep { opacity: .5; }
.ghost {
  appearance: none; border: 0; background: none; cursor: pointer; font: inherit;
  font-size: 10.5px; letter-spacing: .1em; color: #cfc6b9; padding: 4px 1px;
  border-bottom: 1px solid transparent; white-space: nowrap; flex: none;
}
.ghost:hover { color: #f0e6d4; border-bottom-color: var(--gold); }
.ghost.on { color: var(--gold); border-bottom-color: var(--gold); }

/* ── 舞台 ─────────────────────────────── */
.book {
  position: fixed; inset: 44px 0 0 0;
  height: calc(100vh - 44px);
  display: grid; place-items: center;
  padding: clamp(10px, 2.4vh, 26px) clamp(10px, 2.6vw, 30px) clamp(34px, 5vh, 46px);
  perspective: 3200px;
}
@supports (height: 100dvh) { .book { height: calc(100dvh - 44px); } }

.stage {
  position: relative;
  width: min(780px, 100%);
  height: 100%;
  perspective: 3200px;
  transform-style: preserve-3d;
}

/* 书页外框：承担纸张质感与堆叠阴影 */
.page-frame {
  position: absolute; inset: 0;
  background: var(--paper);
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .12),
    5px 5px 0 -1px var(--paper-edge),
    6px 6px 0 0 rgba(0, 0, 0, .10),
    10px 10px 0 -2px #e8e0cf,
    11px 11px 0 0 rgba(0, 0, 0, .09),
    0 44px 80px -34px rgba(0, 0, 0, .85);
}
.page-frame::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.page-frame::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 46px; z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(122, 100, 66, .22), rgba(122, 100, 66, .05) 45%, transparent);
}

/* 页 */
.page { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; }
.page-head {
  flex: 0 0 auto; display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px clamp(22px, 4vw, 56px) 10px;
  font-size: 9px; letter-spacing: .26em; color: #a9a294;
  border-bottom: 1px solid rgba(226, 218, 203, .8);
}
.page-head .ph-en { color: #c1baab; letter-spacing: .3em; }
.page-body {
  position: relative; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(20px, 3.4vh, 40px) clamp(22px, 4vw, 56px) clamp(16px, 2.6vh, 30px);
  scrollbar-width: thin; scrollbar-color: #d6cdba transparent;
}
.page-body::-webkit-scrollbar { width: 7px; }
.page-body::-webkit-scrollbar-thumb { background: #ddd4c1; border-radius: 4px; }
.page-foot {
  flex: 0 0 auto; display: grid; place-items: center;
  padding: 6px 0 12px; font-family: var(--serif); font-size: 10px;
  letter-spacing: .2em; color: #a29a8b;
}
.pf-inner { max-width: 100%; }
.page-foot::before, .page-foot::after {
  content: ""; width: 26px; height: 1px; background: var(--line); margin: 0 10px;
}
.page-foot .pf-inner { display: flex; align-items: center; }

/* 页码溢出提示 */
.page.overflow .page-body { box-shadow: inset 0 -18px 18px -18px rgba(194, 28, 19, .5); }
.overflow-hint {
  position: absolute; right: 14px; top: 10px; z-index: 5;
  font-size: 9px; letter-spacing: .14em; color: #b03a32;
  background: rgba(251, 247, 238, .94); border: 1px solid rgba(194, 28, 19, .35);
  padding: 4px 8px; border-radius: 2px; pointer-events: none;
}

/* ── 封面页 ─────────────────────────────── */
.page--cover { z-index: 4; }
.page--cover .page-body { padding: 0; overflow: hidden; }
.cover-sheet {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px 3px),
    linear-gradient(160deg, #23302c 0%, #1a2422 52%, #141d1b 100%);
  cursor: pointer;
}
.cover-sheet::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 26px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .45), rgba(255, 255, 255, .05) 62%, rgba(0, 0, 0, .28));
  box-shadow: inset -1px 0 0 rgba(197, 168, 106, .28);
}
.cover-face { padding: 0 30px; }
.cv-kicker { font-size: 9px; letter-spacing: .44em; color: rgba(226, 214, 190, .62); margin: 0 0 clamp(20px, 4vh, 46px); }
.cv-title {
  font-family: var(--serif); font-weight: 600; margin: 0;
  font-size: clamp(34px, 6.2vw, 76px); line-height: 1.14; letter-spacing: .1em;
  background: linear-gradient(104deg, #8f7233 0%, #d9b96f 34%, #f6ecc4 52%, #c69c44 68%, #8b6c2e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cv-title span { font-size: .62em; letter-spacing: .18em; }
.cv-rule { width: 74px; height: 1px; background: rgba(197, 168, 106, .55); margin: clamp(18px, 3.4vh, 36px) auto clamp(12px, 2.2vh, 22px); }
.cv-year { font-family: var(--serif); font-size: clamp(11px, 1.5vw, 15px); letter-spacing: .24em; color: rgba(226, 214, 190, .78); margin: 0; }
.cv-seal {
  position: absolute; right: 26px; bottom: 26px;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid rgba(194, 28, 19, .82); color: rgba(214, 58, 46, .92);
  font-family: var(--serif); font-size: 13px; letter-spacing: .5em; text-indent: .5em;
  writing-mode: vertical-rl; border-radius: 2px;
}
.cv-hint {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  font-size: 9px; letter-spacing: .5em; color: rgba(226, 214, 190, .45); margin: 0;
  animation: breathe 3.6s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .3 } 50% { opacity: .8 } }

/* ── 文字排印 ───────────────────────────── */
.kicker { font-size: 9.5px; letter-spacing: .34em; color: var(--grey); margin: 0; }
.display-line {
  font-family: var(--serif); font-weight: 600; letter-spacing: .1em;
  font-size: clamp(24px, 3.6vw, 38px); margin: 0;
  background: linear-gradient(92deg, #1a1d20 0%, #6d5b4a 40%, #c21c13 70%, #1a1d20 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.epigraph { display: grid; gap: 14px; place-items: center; text-align: center; padding: clamp(14px, 4vh, 46px) 0; }
.epigraph .quote { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 2.6vw, 27px); line-height: 1.8; margin: 0; }

.toc-title { font-family: var(--serif); font-weight: 600; text-align: center; font-size: clamp(18px, 2.4vw, 24px); letter-spacing: .3em; text-indent: .3em; margin: 6px 0 26px; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list a { display: flex; align-items: baseline; gap: 10px; padding: 8px 6px; text-decoration: none; color: var(--ink); border-radius: 2px; }
.toc-list a:hover { background: rgba(194, 28, 19, .055); color: var(--red); }
.toc-num { font-family: var(--serif); font-size: 11.5px; color: var(--red); width: 22px; flex: none; }
.toc-name { font-family: var(--serif); font-size: 14.5px; letter-spacing: .05em; flex: none; }
.toc-dots { flex: 1 1 auto; height: 1px; align-self: center; margin: 0 8px; background-image: radial-gradient(circle, #b9b0a0 1px, transparent 1px); background-size: 6px 1px; background-repeat: repeat-x; }
.toc-page { font-family: var(--serif); font-size: 11.5px; color: var(--grey); flex: none; }

.ch-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; padding-right: 20px; }
.ch-num { flex: 0 0 auto; width: 64px; font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--red); }
.ch-title { flex: 1 1 auto; font-family: var(--serif); font-weight: 600; margin: 0; font-size: clamp(19px, 2.6vw, 27px); letter-spacing: .08em; }
.ch-en { flex: 0 0 auto; font-size: 8.5px; letter-spacing: .3em; color: #bdb6a7; white-space: nowrap; }
.read { flex: 0 0 auto; appearance: none; border: 0; background: none; cursor: pointer; font-family: var(--sans); font-size: 8.5px; letter-spacing: .2em; color: #b0a898; padding: 2px 0; border-bottom: 1px solid transparent; }
.read:hover, .read.on { color: var(--red); border-bottom-color: var(--red); }
.motto { font-family: var(--serif); font-style: italic; font-size: clamp(14px, 1.8vw, 18px); line-height: 1.8; color: var(--ink-2); background: var(--card); border-left: 3px solid var(--red); padding: 14px 18px; margin: 0 0 16px; }
.prompts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 16px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.prompts li { font-size: 10px; letter-spacing: .06em; color: var(--grey); line-height: 1.7; }

/* 编辑器 */
.editor { border-bottom: 1px dashed rgba(160, 148, 124, .5); padding-bottom: 6px; }
.editor .ProseMirror { outline: none; }
.editor .ProseMirror p { font-family: var(--serif); font-size: 16px; line-height: 1.95; margin: 0 0 .5em; text-indent: 2em; color: var(--ink); }
.editor .ProseMirror p:last-child { margin-bottom: 0; }
.editor .ProseMirror img { max-width: 100%; height: auto; display: block; margin: 1em 0; box-shadow: 0 1px 0 #fff, 0 10px 22px -14px rgba(0, 0, 0, .45); }
.editor .ProseMirror blockquote { margin: 1em 0; padding-left: 14px; border-left: 2px solid var(--line); color: var(--ink-2); font-family: var(--serif); }
.editor .ProseMirror ::selection { background: #f4d7d3; }
.editor .ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder); float: left; height: 0; pointer-events: none;
  color: #b6ae9d; font-style: italic; font-family: var(--serif); text-indent: 0;
}
.editor--big .ProseMirror p { font-family: var(--serif); font-size: clamp(21px, 3.2vw, 32px); line-height: 1.85; text-indent: 0; text-align: center; letter-spacing: .04em; }
.editor--quote .ProseMirror p { font-style: italic; font-size: clamp(17px, 2.2vw, 22px); line-height: 1.9; }
.page--big .page-body, .page--quote .page-body { display: grid; place-items: center; }
.page--big .editor, .page--quote .editor { width: 100%; border-bottom: 0; }

.collaboration-cursor__caret { border-left: 2px solid; margin-left: -1px; margin-right: -1px; pointer-events: none; position: relative; }
.collaboration-cursor__label { position: absolute; top: -1.4em; left: -2px; font-size: 9px; line-height: 1; padding: 3px 5px; border-radius: 2px; color: #fff; white-space: nowrap; opacity: .9; }

/* ── 班级分册（页内）────────────────────── */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.class-card { appearance: none; cursor: pointer; display: grid; gap: 2px; place-items: center; padding: 10px 4px 8px; border: 1px solid rgba(150, 136, 110, .5); background: rgba(255, 253, 246, .55); border-radius: 2px; font-family: var(--serif); position: relative; }
.class-card:hover { border-color: var(--red); background: rgba(194, 28, 19, .05); }
.class-card b { font-size: 14px; font-weight: 600; letter-spacing: .05em; }
.class-card i { font-style: normal; font-size: 8px; letter-spacing: .14em; color: #a9a08f; }
.class-card.has-text i { color: var(--red); }
.class-card.active { border-color: var(--red); background: rgba(194, 28, 19, .07); }
.class-stage { margin-top: 14px; border-top: 1px dashed rgba(160, 148, 124, .6); padding-top: 12px; }
.class-stage-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; font-family: var(--serif); font-size: 15px; }
.class-stage .editor { min-height: 140px; }

/* ── 影像页 ─────────────────────────────── */
.dropzone { margin: 0 0 14px; padding: 18px 14px; text-align: center; cursor: pointer; border: 1px dashed rgba(160, 148, 124, .7); background: rgba(255, 253, 246, .5); }
.dropzone p { margin: 0; font-size: 10px; letter-spacing: .1em; color: #9d9484; }
.dropzone:hover, .dropzone.drag { border-color: var(--red); background: rgba(194, 28, 19, .045); }
.plate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.plate-item { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #efe9db; cursor: zoom-in; box-shadow: 0 1px 0 #fff, 0 8px 18px -14px rgba(0, 0, 0, .5); }
.plate-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.plate-item:hover img { transform: scale(1.03); }
.plate-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 7px 4px; font-size: 8.5px; letter-spacing: .06em; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity .25s; }
.plate-item:hover figcaption { opacity: 1; }
.plate-hint { font-size: 10px; letter-spacing: .1em; color: #b0a898; text-align: center; margin: 14px 0 0; }

/* ── 版权页 ─────────────────────────────── */
.exlibris { position: relative; margin: 18px auto 16px; padding: 18px 20px 16px; max-width: 280px; border: 1px solid rgba(140, 120, 88, .55); outline: 1px solid rgba(140, 120, 88, .28); outline-offset: 4px; background: rgba(255, 253, 246, .55); text-align: center; }
.ex-en { font-size: 8.5px; letter-spacing: .5em; color: #9d8f6f; margin: 0 0 10px; text-indent: .5em; }
.ex-name { font-family: var(--serif); font-size: 13.5px; letter-spacing: .1em; margin: 0 0 14px; }
.ex-owner { font-family: var(--serif); font-size: 11.5px; color: var(--ink-2); margin: 0 0 8px; }
.ex-blank { display: inline-block; min-width: 90px; border-bottom: 1px solid rgba(140, 128, 104, .8); }
.ex-no { font-family: var(--serif); font-size: 9.5px; letter-spacing: .18em; color: var(--grey); margin: 0; }
.ex-no span { border-bottom: 1px dotted rgba(140, 128, 104, .7); outline: none; padding: 0 4px; }
.wax { position: relative; width: 74px; height: 74px; margin: 4px auto 18px; border-radius: 50%; display: grid; place-items: center; transform: rotate(-8deg);
  background: radial-gradient(circle at 34% 28%, #d8453a 0%, #b8231a 42%, #8d1109 72%, #6d0c06 100%);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, .35), inset 0 -6px 12px rgba(0, 0, 0, .55), 0 10px 22px -10px rgba(0, 0, 0, .8); }
.wax::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px solid rgba(255, 220, 210, .28); }
.wax span { position: relative; z-index: 2; font-family: var(--serif); font-size: 23px; color: rgba(255, 214, 200, .82); text-shadow: 0 1px 0 rgba(90, 8, 4, .9), 0 -1px 0 rgba(255, 190, 175, .35); transform: rotate(8deg); }
.imprint { display: grid; gap: 5px; max-width: 300px; margin: 0 auto; }
.imprint p { margin: 0; display: grid; grid-template-columns: 52px 1fr; gap: 8px; font-family: var(--serif); font-size: 11px; color: var(--ink-2); text-align: left; }
.imprint em { font-style: normal; color: #a89f8d; font-size: 9px; letter-spacing: .2em; }

/* ── 翻页叶子 ───────────────────────────── */
.leaf {
  position: absolute; inset: 0; z-index: 30; display: none;
  transform-style: preserve-3d; transform-origin: left center;
  will-change: transform; pointer-events: none;
}
.leaf.on { display: block; }
.leaf-face {
  position: absolute; inset: 0; overflow: hidden;
  background-color: var(--paper);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
  transform: translateZ(0);          /* 单独提升为合成层，旋转时只做变换不重绘 */
}
.leaf-face.front::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  /* 靠近书脊的暗部 + 远端飞起的亮边，静态楔形，替代原来那个会掉帧的动画阴影层 */
  background:
    linear-gradient(90deg, rgba(60, 45, 24, .20), rgba(60, 45, 24, .04) 26%, transparent 55%),
    linear-gradient(270deg, rgba(255, 255, 255, .35), transparent 18%);
}
.leaf-face.back { transform: rotateY(180deg); }
.leaf-face.back::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(270deg, rgba(60, 45, 24, .20), rgba(60, 45, 24, .04) 26%, transparent 55%),
    linear-gradient(90deg, rgba(255, 255, 255, .35), transparent 18%);
}

/* ── 翻页按钮 / 页码指示 ────────────────── */
/* 翻页热区：整页高度，贴在书页左右两侧外侧 */
.nav {
  position: absolute; top: 0; bottom: 0; z-index: 20;
  width: 74px; border: 0; cursor: pointer; padding: 0;
  display: grid; place-items: center;
  background: linear-gradient(90deg, rgba(251, 247, 238, .10), rgba(251, 247, 238, .02));
  color: #cfc6b9; font-family: var(--serif); font-size: 30px; line-height: 1;
  opacity: .55; transition: opacity .18s, background .18s, color .18s;
}
.nav.prev { left: -86px; border-radius: 3px 0 0 3px; }
.nav.next { right: -86px; border-radius: 0 3px 3px 0; background: linear-gradient(270deg, rgba(251, 247, 238, .10), rgba(251, 247, 238, .02)); }
.stage:hover .nav { opacity: 1; }
.nav:hover { background: rgba(251, 247, 238, .18); color: #fff; }
.nav:active { background: rgba(251, 247, 238, .28); }
.nav:disabled { opacity: 0 !important; cursor: default; }

/* 日历页：年份做醒目大标题 */
.page--calendar .page-head span:first-child {
  font-family: var(--serif); font-size: 22px; letter-spacing: .22em;
  color: var(--ink); font-weight: 600;
}
.page--calendar .page-head { padding-bottom: 8px; }

/* 翻页期间只提升这一层的合成，别让整页都常驻图层 */
.leaf.on { will-change: transform; }
.leaf-face { contain: paint; }
.page-ind { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-family: var(--serif); font-size: 10px; letter-spacing: .22em; color: #8d8577; }

/* ── 加页菜单 ───────────────────────────── */
.add-menu {
  position: fixed; z-index: 70; right: 16px; top: 50px;
  display: grid; gap: 2px; padding: 12px; min-width: 150px;
  background: rgba(28, 24, 20, .97); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .9);
}
.add-menu-t { margin: 0 0 8px; font-size: 9px; letter-spacing: .28em; color: #9a9186; }
.add-menu button {
  appearance: none; border: 0; background: none; cursor: pointer; text-align: left;
  font-family: var(--serif); font-size: 13px; letter-spacing: .12em; color: #e6dccd;
  padding: 8px 6px; border-radius: 2px;
}
.add-menu button:hover { background: rgba(194, 28, 19, .22); color: #fff; }
.add-menu-hint { margin: 8px 0 0; font-size: 9px; letter-spacing: .1em; color: #8a8177; }
.add-menu-hint.bad { color: #e0645a; }

/* ── 灯箱 / toast / 封版 ────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: rgba(12, 10, 9, .88); backdrop-filter: blur(6px); padding: 40px; }
.lightbox.on { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9); background: #fff; }
.lb-close { position: absolute; top: 22px; right: 26px; width: 34px; height: 34px; border: 0; background: none; color: #d8cfbf; font-size: 26px; line-height: 1; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: rgba(246, 240, 228, .96); color: #1a1d20; font-size: 11px; letter-spacing: .08em; padding: 9px 15px; border-radius: 2px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .7); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 95; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sealed-banner { position: fixed; left: 50%; top: 52px; transform: translateX(-50%); z-index: 65; padding: 7px 18px; border-radius: 2px; background: rgba(194, 28, 19, .92); color: #fff6ee; font-family: var(--serif); font-size: 10.5px; letter-spacing: .24em; }
body.sealed .dropzone, body.sealed .plate-del, body.sealed .admin-only, body.sealed #addPage { display: none !important; }

/* ── 自适应 ─────────────────────────────── */
@media (max-width: 900px) {
  .stage { width: min(640px, 100%); }
  .nav { display: none; }
  .page-ind { bottom: -20px; }
  .add-menu { right: 8px; left: 8px; top: auto; bottom: 8px; min-width: 0; }
  .plate-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .book { top: 40px; height: calc(100vh - 40px); padding: 0 0 26px; }
  @supports (height: 100dvh) { .book { height: calc(100dvh - 40px); } }
  .bar { height: 40px; padding: 0 10px; gap: 8px; }
  .bar-l, .bar-r { gap: 9px; }
  .ghost { font-size: 9.5px; letter-spacing: .06em; }
  .mono { font-size: 9.5px; }
  .sep { display: none; }
  .stage { width: 100%; }
  .page-frame { border-radius: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .14); }
  .page-frame::after { width: 18px; }
  .page-head { padding: 14px 16px 8px; font-size: 8px; letter-spacing: .18em; }
  .page-body { padding: 14px 16px 10px; }
  .page-foot { padding: 4px 0 8px; }
  .prompts { grid-template-columns: 1fr; gap: 4px; }
  .ch-head { gap: 8px; padding-right: 8px; }
  .ch-num { width: 40px; font-size: 26px; }
  .ch-en { display: none; }
}
@media (max-width: 420px) {
  #sound, #print { display: none; }
}

/* ── 印刷 ───────────────────────────────── */
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff !important; overflow: visible !important; }
  .bar, .nav, .page-ind, .toast, .lightbox, .add-menu, .sealed-banner, .dropzone, .plate-del, .read, .overflow-hint { display: none !important; }
  .book { position: static !important; height: auto !important; padding: 0 !important; perspective: none !important; display: block !important; }
  .stage { width: auto !important; height: auto !important; perspective: none !important; }
  .page-frame { position: static !important; box-shadow: none !important; overflow: visible !important; background: #fff !important; }
  .page-frame::before, .page-frame::after { display: none !important; }
  .page { position: static !important; display: block !important; break-before: page; page-break-before: always; }
  .page-body { overflow: visible !important; height: auto !important; }
  .page-head, .page-foot { display: none !important; }
  .editor { border-bottom: 0 !important; }
  .leaf { display: none !important; }
}

/* 翻页背面快照（静态渲染，用于翻页动画的正面/背面） */
.static-text {
  font-family: var(--serif); font-size: 16px; line-height: 1.95; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.static-blank { color: #b6ae9d; font-style: italic; font-family: var(--serif); font-size: 15px; }
.page--big .static-text { font-size: clamp(21px, 3.2vw, 32px); line-height: 1.85; text-align: center; }
.page--quote .static-text { font-style: italic; font-size: clamp(17px, 2.2vw, 22px); }

/* 图版页：图片铺满版心 */
.editor--plate .ProseMirror img { width: 100%; margin: 0 0 10px; }
.editor--plate .ProseMirror p { text-indent: 0; font-size: 12px; color: var(--grey); letter-spacing: .04em; }
.page--plate .page-body { padding-left: clamp(16px, 3vw, 34px); padding-right: clamp(16px, 3vw, 34px); }

/* ══ 日历页 ═══════════════════════════════ */
.cal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; min-width: 0; }
.cal-m {
  font-family: var(--serif); font-size: 10.5px; letter-spacing: .14em; color: var(--ink-2);
  margin: 0 0 3px; padding-bottom: 2px; border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between;
}
.cal-m em { font-style: normal; font-size: 8px; letter-spacing: .18em; color: #bdb6a7; }
.cal-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; margin-bottom: 1px; }
.cal-wk span { font-size: 7px; color: #b0a898; text-align: center; letter-spacing: 0; }
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.day {
  appearance: none; border: 1px solid transparent; background: none; cursor: pointer;
  font-family: var(--serif); font-size: 9px; color: var(--grey); line-height: 1;
  aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: 2px;
  position: relative; transition: background .15s, color .15s, border-color .15s;
}
.day:hover { background: rgba(194, 28, 19, .09); color: var(--red); }
.day.blank { cursor: default; pointer-events: none; }
.day.weekend { color: #a8a094; }
.day.has {
  background: rgba(194, 28, 19, .10);
  color: var(--red); font-weight: 600;
  border-color: rgba(194, 28, 19, .22);
}
.day.has::after {
  content: ""; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 2px; height: 2px; border-radius: 50%; background: var(--red);
}
.day.active { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.cal-legend {
  grid-column: 1 / -1; flex: 1 1 auto; min-width: 0; margin: 6px 0 0; font-size: 9px; letter-spacing: .14em;
  color: #b0a898; display: flex; align-items: center; gap: 7px; justify-content: center;
}
.cal-legend .dot-mini { width: 5px; height: 5px; border-radius: 50%; background: var(--red); display: inline-block; }

/* 日期记录面板 */
.day-panel {
  position: fixed; z-index: 80; right: 0; top: 44px; bottom: 0;
  width: min(430px, 100vw);
  display: flex; flex-direction: column;
  background: #fdfaf2;
  border-left: 1px solid rgba(0, 0, 0, .18);
  box-shadow: -30px 0 70px -34px rgba(0, 0, 0, .9);
  animation: slideIn .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .4 } to { transform: none; opacity: 1 } }
.dp-head {
  flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line);
}
.dp-date { font-family: var(--serif); font-size: 17px; letter-spacing: .06em; display: block; }
.dp-week { font-size: 9px; letter-spacing: .24em; color: #a29a8b; }
.dp-close { appearance: none; border: 0; background: none; font-size: 22px; line-height: 1; color: #9a9186; cursor: pointer; padding: 0 4px; }
.dp-close:hover { color: var(--red); }
.dp-editor { flex: 1 1 auto; overflow-y: auto; padding: 14px 18px; border-bottom: 0; min-height: 0; }
.dp-editor .ProseMirror { outline: none; }
.dp-editor .ProseMirror p { font-family: var(--serif); font-size: 14.5px; line-height: 1.9; margin: 0 0 .4em; text-indent: 0; }
.dp-editor .ProseMirror img { max-width: 100%; display: block; margin: .8em 0; box-shadow: 0 1px 0 #fff, 0 8px 18px -14px rgba(0, 0, 0, .5); }
.dp-editor .ProseMirror p.is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; height: 0; pointer-events: none; color: #b6ae9d; font-style: italic; }
.dp-foot { flex: 0 0 auto; padding: 8px 18px 14px; font-size: 9px; letter-spacing: .14em; color: #a29a8b; }

@media (max-width: 760px) {
  .cal { grid-template-columns: repeat(2, 1fr); }
  .day { font-size: 9.5px; }
  .day-panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto;
    height: min(62vh, 520px);
    border-left: 0; border-top: 1px solid rgba(0, 0, 0, .18);
    border-radius: 8px 8px 0 0;
  }
  .cal { grid-template-columns: repeat(2, 1fr); gap: 12px 12px; }
  .day { font-size: 10px; }
}

/* hidden 属性必须真的不占位（作者样式里的 display 会覆盖 UA 的 [hidden]） */
[hidden] { display: none !important; }

/* 日历是整页版面，页内滚动属于正常，不弹「写满」提示 */
.page--calendar .overflow-hint { display: none; }
.page--calendar.overflow .page-body { box-shadow: none; }

/* ══ 目录索引（桌面左栏）═════════════════════ */
.index-panel {
  position: fixed; left: 14px; top: 50%; transform: translateY(-50%);
  z-index: 58; width: 190px; max-height: min(76vh, 620px);
  display: flex; flex-direction: column;
  background: rgba(24, 20, 17, .93);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
  transition: width .22s, transform .22s, opacity .22s;
}
.ix-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 8px 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07);
  font-family: var(--serif); font-size: 10px; letter-spacing: .3em; color: #a79e91;
}
.ix-fold {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: #8d8477; font-size: 15px; line-height: 1; padding: 2px 6px;
}
.ix-fold:hover { color: var(--gold); }
.ix-list { list-style: none; margin: 0; padding: 6px 0 8px; overflow-y: auto; scrollbar-width: thin; }
.ix-list a {
  display: flex; align-items: baseline; gap: 8px;
  padding: 5px 12px; text-decoration: none; color: #cfc5b6;
  font-family: var(--serif); font-size: 12px; letter-spacing: .04em;
  border-left: 2px solid transparent; transition: color .15s, background .15s, border-color .15s;
}
.ix-list a:hover { color: #fff6e6; background: rgba(255, 255, 255, .05); }
.ix-list a.on { color: #fff3df; border-left-color: var(--red); background: rgba(194, 28, 19, .14); }
.ix-num { flex: 0 0 auto; width: 16px; color: #b0784f; font-size: 10.5px; }
.ix-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-pg { flex: 0 0 auto; font-size: 9.5px; color: #857c6f; }
.index-panel.folded { width: 44px; }
.index-panel.folded .ix-list, .index-panel.folded .ix-head span { display: none; }
.index-panel.folded .ix-fold { transform: rotate(180deg); }

/* 手机悬浮按钮 */
.index-fab {
  position: fixed; right: 16px; bottom: 18px; z-index: 59;
  width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(28, 24, 20, .86); color: #e6dccd; cursor: pointer;
  font-family: var(--serif); font-size: 16px; letter-spacing: 0;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .9);
  display: none; place-items: center;
}
.index-fab:active { transform: scale(.94); }

@media (max-width: 1319px) {
  .index-panel {
    left: 0; top: 40px; bottom: 0; max-height: none; transform: translateX(-100%);
    width: min(78vw, 260px); opacity: 0; border-radius: 0;
  }
  .index-panel.open { transform: none; opacity: 1; }
  .index-panel.folded { width: min(78vw, 260px); }
  .index-panel.folded .ix-list, .index-panel.folded .ix-head span { display: block; }
  .ix-fold { display: none; }
  .index-fab { display: grid; }
}

/* ══ 大事记抽屉 ══════════════════════════════ */
.timeline {
  position: fixed; z-index: 79; right: 0; top: 44px; bottom: 0;
  width: min(380px, 100vw); display: flex; flex-direction: column;
  background: #fdfaf2; border-left: 1px solid rgba(0, 0, 0, .18);
  box-shadow: -30px 0 70px -34px rgba(0, 0, 0, .9);
  animation: slideIn .24s cubic-bezier(.2, .8, .2, 1);
}
.tl-head {
  flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
}
.tl-title { font-family: var(--serif); font-size: 16px; letter-spacing: .08em; display: block; }
.tl-sub { font-size: 9px; letter-spacing: .2em; color: #a29a8b; }
.tl-list { list-style: none; margin: 0; padding: 8px 0 20px; overflow-y: auto; flex: 1 1 auto; }
.tl-list button {
  appearance: none; border: 0; background: none; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: baseline;
  padding: 10px 16px; border-bottom: 1px dotted rgba(160, 148, 124, .35);
}
.tl-list button:hover { background: rgba(194, 28, 19, .05); }
.tl-date { font-family: var(--serif); font-size: 12px; color: var(--red); letter-spacing: .02em; }
.tl-txt { font-family: var(--serif); font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.tl-empty { padding: 26px 18px; font-size: 11px; letter-spacing: .1em; color: #a89f8d; text-align: center; }

/* 日历页上的"大事记"入口 */
.tl-open {
  flex: 0 0 auto; appearance: none; border: 1px solid rgba(194, 28, 19, .3); background: rgba(194, 28, 19, .05);
  color: var(--red); cursor: pointer; font-family: var(--serif);
  font-size: 9.5px; letter-spacing: .16em; padding: 3px 9px; border-radius: 2px;
}
.tl-open:hover { background: rgba(194, 28, 19, .12); }
.cal-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin-top: 4px; min-width: 0; }

/* ══ 击掌页 ══════════════════════════════════ */
.page--clap .page-body { display: grid; place-items: center; }
.clap-wrap { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px 0 26px; }
.clap-lead { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--grey); margin: 0 0 10px; letter-spacing: .06em; }
.clap-btn {
  position: relative; width: clamp(120px, 22vh, 170px); height: clamp(120px, 22vh, 170px);
  border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 36% 30%, #f3e2c6 0%, #e3c9a2 38%, #c9a877 68%, #a9884f 100%);
  box-shadow: 0 18px 34px -18px rgba(80, 50, 10, .8), inset 0 2px 6px rgba(255, 255, 255, .7), inset 0 -10px 22px rgba(120, 80, 20, .35);
  display: grid; place-items: center; font-size: clamp(44px, 8vh, 62px); line-height: 1;
  transition: transform .09s ease-out; user-select: none; -webkit-tap-highlight-color: transparent;
}
.clap-btn::after {
  content: ""; position: absolute; inset: 12%; border-radius: 50%;
  border: 1px solid rgba(140, 100, 40, .35);
}
.clap-btn:hover { transform: translateY(-2px); }
.clap-btn.hit { animation: clapHit .26s ease-out; }
@keyframes clapHit {
  0% { transform: scale(1); }
  35% { transform: scale(.9) rotate(-3deg); }
  70% { transform: scale(1.04) rotate(2deg); }
  100% { transform: scale(1); }
}
.clap-ripple {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(194, 28, 19, .55);
  animation: ripple .62s ease-out forwards; pointer-events: none;
}
@keyframes ripple { from { transform: scale(.8); opacity: .6 } to { transform: scale(1.32); opacity: 0 } }
.clap-plus {
  position: absolute; left: 50%; top: 12%; font-family: var(--serif); font-size: 17px;
  color: var(--red); pointer-events: none; animation: floatUp .9s ease-out forwards;
}
@keyframes floatUp { from { transform: translate(-50%, 0); opacity: 1 } to { transform: translate(-50%, -62px); opacity: 0 } }
.clap-count { display: flex; align-items: baseline; gap: 8px; margin-top: 20px; }
.clap-count b {
  font-family: var(--serif); font-size: clamp(38px, 7vh, 58px); font-weight: 600;
  letter-spacing: .02em; color: var(--ink); display: inline-block;
}
.clap-count b.bump { animation: bump .34s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bump { 0% { transform: scale(1) } 45% { transform: scale(1.18) } 100% { transform: scale(1) } }
.clap-count span { font-size: 10px; letter-spacing: .24em; color: var(--grey); }
.clap-meta { margin: 6px 0 0; font-size: 9.5px; letter-spacing: .16em; color: #a89f8d; }
.clap-reset { margin-top: 18px; }

/* ══ 灯箱备注条 ══════════════════════════════ */
.lb-bar {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: min(680px, 90vw); display: flex; align-items: center; gap: 10px;
  background: rgba(24, 20, 17, .82); border: 1px solid rgba(255, 255, 255, .1);
  padding: 9px 12px; border-radius: 3px;
}
.lb-meta { margin: 0; font-size: 9.5px; letter-spacing: .12em; color: #a1978a; white-space: nowrap; }
.lb-note {
  flex: 1 1 auto; min-width: 0; appearance: none; border: 0; background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .18); color: #f2ead9; font: inherit;
  font-family: var(--serif); font-size: 12.5px; padding: 4px 2px; outline: none;
}
.lb-note::placeholder { color: #7e766a; }
.lb-note:focus { border-bottom-color: var(--red); }
.lb-del {
  flex: 0 0 auto; appearance: none; border: 1px solid rgba(194, 28, 19, .5);
  background: rgba(194, 28, 19, .16);
  color: #f0c9c4; font: inherit; font-size: 10px; letter-spacing: .12em; padding: 5px 10px;
  border-radius: 2px; cursor: pointer;
}
.lb-del:hover { background: rgba(194, 28, 19, .32); color: #fff; }

/* 影像格子里常显备注 */
.plate-item .p-note {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 16px 7px 5px; font-family: var(--serif); font-size: 10px; line-height: 1.5;
  color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .62));
  overflow: hidden;
}
.plate-item .p-by {
  position: absolute; top: 4px; left: 5px; font-size: 8px; letter-spacing: .1em;
  color: #fff; background: rgba(0, 0, 0, .42); padding: 2px 5px; border-radius: 2px;
  opacity: 0; transition: opacity .2s;
}
.plate-item:hover .p-by { opacity: 1; }

/* 击掌页在小屏的尺寸 */
@media (max-width: 760px) {
  .clap-btn { width: 108px; height: 108px; font-size: 40px; }
  .clap-count b { font-size: 36px; }
  .lb-bar { width: 92vw; bottom: 14px; flex-wrap: wrap; }
  .lb-note { order: 3; flex: 1 0 100%; }
  .timeline { top: 40px; width: 100vw; }
}

/* 木鱼：不用 emoji，纯 CSS 画（内槽 + 缺口 + 顶部小柄） */
.clap-btn { font-size: 0; }
.clap-btn::before {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: 24%;
  height: 26%; border-radius: 50%;
  border-bottom: 3px solid rgba(118, 82, 32, .55);
  box-shadow: 0 6px 10px -6px rgba(90, 60, 15, .5) inset;
}
.clap-knob {
  position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  width: 16%; height: 12%; border-radius: 50% 50% 40% 40%;
  background: linear-gradient(180deg, #d9bd91, #b2905a);
  box-shadow: 0 2px 4px -2px rgba(80, 50, 10, .6) inset;
}

/* 左栏常驻时，整本书右移让位（避免压住书页与翻页热区） */
@media (min-width: 1320px) {
  .book { padding-left: 214px; }
}

.cal-month { min-width: 0; overflow: hidden; }

/* ══ 编辑工具条 ══════════════════════════════ */
.fmt {
  position: sticky; top: -2px; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px 2px;
  padding: 5px 6px; margin: 0 0 10px;
  box-shadow: 0 6px 12px -10px rgba(0, 0, 0, .5);
  background: linear-gradient(#fbf7ee, #f5efe2);
  border: 1px solid var(--line); border-radius: 2px;
}
.fmt-group { display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.fmt-group + .fmt-group { border-left: 1px solid rgba(160, 148, 124, .28); }
.fmt button {
  appearance: none; border: 1px solid transparent; background: none; cursor: pointer;
  min-width: 22px; height: 22px; padding: 0 5px; border-radius: 2px;
  font-family: var(--sans); font-size: 11.5px; line-height: 1; color: var(--ink-2);
  display: grid; place-items: center;
}
.fmt button:hover { background: rgba(194, 28, 19, .08); color: var(--red); }
.fmt button.on { background: rgba(194, 28, 19, .14); border-color: rgba(194, 28, 19, .35); color: var(--red); }
.fmt button:disabled { opacity: .3; cursor: default; background: none; }
.fmt .sw { width: 15px; min-width: 15px; height: 15px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); }
.fmt .sw.on { outline: 2px solid var(--red); outline-offset: 1px; }
.fmt .sw-bg { border-radius: 3px; }
.fmt--compact { padding: 4px 4px; margin-bottom: 8px; }
.fmt--compact button { min-width: 20px; height: 20px; font-size: 10.5px; }

/* 页面底色 */
.page-frame { background: var(--page-bg, var(--paper)); }

/* ══ 页内加页按钮 ══════════════════════════ */
.add-fab {
  position: absolute; top: 10px; right: 12px; z-index: 6;
  appearance: none; cursor: pointer; white-space: nowrap;
  height: 24px; min-width: 24px; padding: 0 8px; border-radius: 12px;
  border: 1px solid rgba(160, 148, 124, .55);
  background: rgba(255, 253, 246, .9); color: #8b8272;
  font-family: var(--sans); font-size: 11px; letter-spacing: .06em; line-height: 1;
  box-shadow: 0 2px 6px -3px rgba(0, 0, 0, .35);
  transition: color .15s, border-color .15s, background .15s, transform .12s;
}
.add-fab:hover { color: var(--red); border-color: var(--red); background: #fff; }
.add-fab:active { transform: scale(.95); }
.add-fab.full { color: #fff; background: var(--red); border-color: var(--red); animation: fabPulse 2.4s ease-in-out infinite; }
.add-fab.off { color: #b9b1a3; background: rgba(240, 236, 227, .8); border-color: rgba(180, 170, 150, .35); cursor: not-allowed; }
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 28, 19, .35); }
  50% { box-shadow: 0 0 0 6px rgba(194, 28, 19, 0); }
}
.page.has-fab .page-head { padding-right: 62px; }

/* ══ 签名页 ══════════════════════════════ */
.page--sign .page-body { display: flex; flex-direction: column; }
.sign-wrap { position: relative; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; }
.sign-canvas {
  flex: 1 1 auto; min-height: 280px; width: 100%; display: block;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(150, 136, 110, .10) 27px 28px),
    #fffdf7;
  border: 1px solid rgba(160, 148, 124, .45);
  border-radius: 2px; touch-action: none; cursor: crosshair;
}
.sign-hint {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  margin: 0; font-family: var(--serif); font-style: italic; font-size: 12px;
  color: #bfb7a6; letter-spacing: .12em; pointer-events: none;
}
.sign-bar {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 2px;
  background: linear-gradient(#fbf7ee, #f5efe2);
}
.sg-tools, .sg-actions { display: flex; gap: 3px; }
.sign-bar button {
  appearance: none; border: 1px solid transparent; background: none; cursor: pointer;
  font-family: var(--serif); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-2);
  height: 22px; padding: 0 7px; border-radius: 2px;
}
.sign-bar button:hover { background: rgba(194, 28, 19, .08); color: var(--red); }
.sign-bar button.on { background: rgba(194, 28, 19, .14); border-color: rgba(194, 28, 19, .35); color: var(--red); }
.sg-colors { display: flex; gap: 4px; padding: 0 6px; border-left: 1px solid rgba(160, 148, 124, .28); border-right: 1px solid rgba(160, 148, 124, .28); }
.sg-sw { width: 15px; height: 15px; min-width: 15px; padding: 0 !important; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18) !important; }
.sg-sw.on { outline: 2px solid var(--red); outline-offset: 1px; }
@media (max-width: 760px) {
  .sign-canvas { min-height: 220px; }
  .sign-bar { gap: 4px 6px; }
}

/* 页内有「＋」按钮时，不再重复弹「写满」提示条（按钮本身就是入口） */
.page.has-fab .overflow-hint { display: none; }

/* ══ TDesign 图标 ═══════════════════════════════════════ */
.t-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.t-icon svg { width: 1em; height: 1em; display: block; }
.ghost { display: inline-flex; align-items: center; gap: 4px; }
.ghost .t-icon { font-size: 12px; }
.nav .t-icon { font-size: 26px; }
.ix-fold .t-icon { font-size: 13px; }
.index-fab .t-icon { font-size: 19px; }
.dp-close .t-icon, .lb-close .t-icon { font-size: 17px; }
.fmt button .t-icon { font-size: 13px; }
.plate-del .t-icon { font-size: 11px; }
.read { display: inline-flex; align-items: center; gap: 3px; }
.read .t-icon { font-size: 9px; }
.sign-bar button { display: inline-flex; align-items: center; gap: 3px; }
.sign-bar .t-icon { font-size: 11px; }
.add-fab { display: inline-flex; align-items: center; gap: 3px; }
.add-fab .t-icon { font-size: 13px; }
.add-fab .fab-txt { letter-spacing: .06em; }

/* ══ 击掌页（重做）═══════════════════════════════════ */
.clap-btn::before { display: none !important; }
.page--clap .page-body { display: grid; place-items: center; }
.clap-wrap { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 4px 0 20px; }
.clap-lead {
  font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--grey);
  letter-spacing: .1em; margin: 0 0 4px;
}
.clap-btn {
  position: relative; width: clamp(140px, 27vh, 196px); height: auto !important; line-height: 0;
  padding: 0; border: 0; background: none; cursor: pointer; box-shadow: none !important;
  display: grid; place-items: center;
  filter: drop-shadow(0 8px 12px rgba(60, 38, 8, .2));
}
.clap-art { width: 100%; height: 100%; display: block; transition: transform .12s ease-out; }
.clap-mallet { transform-origin: 91px 23px; transition: transform .18s ease-out; }
.clap-btn:hover .clap-art { transform: translateY(-3px); }
.clap-btn:active .clap-art { transform: translateY(1px) scale(.985); }
.clap-btn.hit .clap-art { animation: clapHit .3s ease-out; }
.clap-btn.hit .clap-mallet { transform: rotate(-30deg); transition: transform .06s ease-out; }
.clap-count { margin: 4px 0 0; }
.clap-count b {
  font-family: var(--serif); font-size: clamp(38px, 7.6vh, 60px); font-weight: 600;
  letter-spacing: .02em; line-height: 1; display: inline-block;
}
.clap-count span { display: block; margin-top: 8px; font-size: 9px; letter-spacing: .34em; color: var(--grey); }
.clap-meta { margin: 12px 0 0; font-size: 9px; letter-spacing: .2em; color: #b0a898; }

/* ══ 版权页（重做）═══════════════════════════════════ */
.page--colophon .page-body { display: grid; place-items: center; }
.col-inner { width: 100%; max-width: 340px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.col-end {
  position: relative; margin: 0; font-family: var(--serif); font-size: 14px;
  letter-spacing: .4em; text-indent: .4em; color: var(--ink);
}
.col-end::before, .col-end::after {
  content: ""; position: absolute; top: 50%; width: 30px; height: 1px; background: var(--line);
}
.col-end::before { left: -40px; }
.col-end::after { right: -40px; }

.exlibris {
  position: relative; width: 100%; padding: 16px 18px 14px;
  border: 1px solid rgba(140, 120, 88, .45);
  background: rgba(255, 253, 246, .55);
}
.exlibris::before {
  content: ""; position: absolute; inset: 4px; pointer-events: none;
  border: 1px solid rgba(140, 120, 88, .18);
}
.ex-en { margin: 0 0 10px; font-size: 8px; letter-spacing: .5em; text-indent: .5em; color: #a3936f; }
.ex-name { margin: 0 0 12px; font-family: var(--serif); font-size: 13px; letter-spacing: .12em; }
.ex-owner { margin: 0 0 8px; font-family: var(--serif); font-size: 10.5px; color: var(--ink-2); }
.ex-blank { display: inline-block; min-width: 92px; border-bottom: 1px solid rgba(140, 128, 104, .7); }
.ex-no { margin: 0; font-family: var(--serif); font-size: 8.5px; letter-spacing: .22em; color: var(--grey); }
.ex-no span { padding: 0 4px; outline: none; border-bottom: 1px dotted rgba(140, 128, 104, .6); }

.wax2 { width: 72px; margin: 2px 0; }
.wax2 svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(80, 10, 5, .32)); }

.col-rule { width: 100%; height: 1px; background: var(--line); }
.imprint { width: 100%; display: grid; gap: 5px; }
.imprint p {
  margin: 0; display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--serif); font-size: 10.5px; color: var(--ink-2);
}
.imprint p span { font-size: 9px; letter-spacing: .22em; color: #a89f8d; }
.col-note { margin: 0; font-size: 9px; line-height: 2; letter-spacing: .04em; color: var(--grey); }

@media (max-width: 760px) {
  .clap-btn { width: 132px; }
  .col-inner { max-width: 300px; gap: 12px; }
  .col-end::before, .col-end::after { display: none; }
}

/* 木鱼：槌子的悬停/敲击姿态（用 CSS 控制，pivot 在 SVG 用户坐标） */
.clap-art { width: 100%; height: auto; }
.clap-mallet {
  transform-box: view-box;
  transform-origin: 91.9px 8px;
  transform: translate(-6px, 4px) rotate(14deg);
  transition: transform .18s ease-out;
}
.clap-btn.hit .clap-mallet { transform: translate(-6px, 4px) rotate(-20deg); transition: transform .06s ease-out; }

/* 版权页收尾微调 */
.col-inner { max-width: 372px; }
.col-note { font-size: 9px; line-height: 1.95; }
.wax2 svg text { text-shadow: 0 1px 0 rgba(90, 8, 4, .9); }
