/* ============================================================================
   宅命书 · 阅读版式
   ----------------------------------------------------------------------------
   报告页原有的卡片式布局偏「后台仪表盘」：适合扫读，不适合当作一份交付物
   收藏、打印或送人。这一层只改阅读气质，不动信息结构：

     · 封面      —— 书名、卷号、房间、日期、印章
     · 目录      —— 四卷 + 附录，点击直达
     · 卷首      —— 卷号改用「卷一 / 卷二」，标题走衬线
     · 纸面      —— 米白纸底、细双线、页边距，接近一本书而不是一张看板

   所有选择器都限定在 .book-* / .stage 下，避免影响站内其他页面。
   ========================================================================== */

/* ---------- 封面 ---------- */
.book-cover {
  position: relative;
  margin: 28px auto 44px;
  padding: clamp(44px, 7vw, 76px) clamp(24px, 5vw, 56px) clamp(36px, 5vw, 52px);
  background:
    linear-gradient(180deg, rgba(255,254,251,.96), rgba(255,254,251,.99)),
    radial-gradient(120% 80% at 50% 0%, rgba(184,50,39,.045), transparent 60%);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(26,46,61,.04), 0 18px 44px -28px rgba(26,46,61,.28);
  text-align: center;
  overflow: hidden;
}
/* 书页内的细双线 */
.book-cover::before {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid rgba(184,50,39,.16);
  pointer-events: none;
}
.book-cover::after {
  content: "";
  position: absolute; inset: 19px;
  border: 1px solid rgba(26,46,61,.07);
  pointer-events: none;
}

.bc-kicker {
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 650;
  margin-bottom: 26px;
}
.bc-title {
  font-family: var(--font-cjk-serif);
  font-size: clamp(44px, 9vw, 76px);
  line-height: 1.12;
  letter-spacing: .14em;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text);
  text-indent: .14em; /* 视觉居中：抵消末字的字距 */
}
.bc-sub {
  font-family: var(--font-cjk-serif);
  font-size: clamp(13px, 1.6vw, 15px);
  letter-spacing: .34em;
  color: var(--text-2);
  margin-bottom: 30px;
  text-indent: .34em;
}
.bc-orn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0 auto 30px; max-width: 260px;
  color: var(--accent);
}
.bc-orn::before, .bc-orn::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, rgba(184,50,39,.4));
}
.bc-orn::after { background: linear-gradient(90deg, rgba(184,50,39,.4), transparent); }
.bc-orn span {
  width: 7px; height: 7px; transform: rotate(45deg);
  border: 1px solid rgba(184,50,39,.55);
}

.bc-quote {
  font-family: var(--font-cjk-serif);
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 2.05;
  color: var(--text-2);
  max-width: 30em;
  margin: 0 auto 34px;
}

.bc-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  font-size: 12px; color: var(--text-3);
  letter-spacing: .04em;
}
.bc-meta b {
  color: var(--text);
  font-weight: 600;
  margin-left: 6px;
  letter-spacing: .02em;
}

.bc-seal {
  position: absolute;
  right: clamp(18px, 4vw, 40px);
  bottom: clamp(18px, 4vw, 34px);
  width: 54px; height: 54px;
  border: 1.5px solid rgba(184,50,39,.62);
  color: rgba(184,50,39,.86);
  font-family: var(--font-cjk-serif);
  font-size: 24px;
  display: grid; place-items: center;
  transform: rotate(-5deg);
  opacity: .9;
  letter-spacing: 0;
}
.bc-seal::after {
  content: "";
  position: absolute; inset: 3px;
  border: .5px solid rgba(184,50,39,.34);
}

/* ---------- 目录 ---------- */
.book-toc {
  margin: 0 auto 44px;
  padding: 26px clamp(18px, 4vw, 34px) 22px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.bt-head {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--text-3); font-weight: 650;
  margin-bottom: 16px;
}
.book-toc ol {
  list-style: none; margin: 0; padding: 0;
  counter-reset: toc;
}
.book-toc li {
  counter-increment: toc;
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dotted rgba(26,46,61,.14);
}
.book-toc li:last-child { border-bottom: 0; }
.book-toc a {
  color: var(--text); text-decoration: none;
  font-size: 15px;
  display: flex; align-items: baseline; gap: 10px; width: 100%;
}
.book-toc a:hover { color: var(--accent); }
.book-toc .toc-no {
  font-family: var(--font-cjk-serif);
  font-size: 12px; color: var(--accent);
  min-width: 2.6em;
}
.book-toc .toc-dots {
  flex: 1; border-bottom: 1px dotted rgba(26,46,61,.2);
  transform: translateY(-3px);
}
.book-toc .toc-pg {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
}
.book-toc .toc-note {
  display: block; font-size: 12px; color: var(--text-3);
  margin-top: 2px; letter-spacing: 0;
}

/* ---------- 卷首 ---------- */
.stage {
  position: relative;
  padding-top: 10px;
  scroll-margin-top: 24px;
}
.stage-head {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(26,46,61,.1);
  margin-bottom: 22px;
}
.stage-num {
  font-family: var(--font-cjk-serif);
  font-size: 13px;
  width: 34px; height: 34px;
  border: 1px solid rgba(184,50,39,.3);
  color: var(--accent);
  background: rgba(184,50,39,.03);
}
.stage-head h2 {
  font-family: var(--font-cjk-serif);
  font-size: clamp(21px, 2.6vw, 26px);
  letter-spacing: .06em;
  font-weight: 600;
}
.stage-sub {
  font-family: var(--font-cjk-serif);
  letter-spacing: .02em;
}

/* 断语正文：略宽行距、衬线，读起来像书而不是像表格 */
.finding .advice,
.finding .why,
.remedy-para,
.s3-extra,
.s3-honesty {
  font-family: var(--font-cjk-serif);
  line-height: 1.95;
}
.finding .advice { font-size: 16.5px; }
.finding .why { font-size: 14px; }
.remedy-para { font-size: 14.5px; }

/* 卷末的小结，做成一句「批注」 */
.mnemonic {
  font-family: var(--font-cjk-serif);
  font-size: 17px;
  letter-spacing: .04em;
  padding: 18px 22px;
  border-left: 2px solid rgba(184,50,39,.45);
  background: rgba(184,50,39,.025);
}

/* 落款印章区更像书的版权页 */
.doc-seal {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid rgba(26,46,61,.1);
}

/* ---------- 打印：按书页分章 ---------- */
@media print {
  @page { size: A4; margin: 18mm 16mm; }
  header.site, footer.site, .disc-bar, .pdf-bar, .paywall,
  .feedback, .sample-cta, .mock-banner, .orient-bar, .item-modal {
    display: none !important;
  }
  body { background: #fff; }
  .book-cover { box-shadow: none; page-break-after: always; border: 0; }
  .book-toc { page-break-after: always; border: 0; }
  .stage { page-break-before: always; }
  .stage:first-of-type { page-break-before: auto; }
  .stage-head { position: static; }
  a[href]::after { content: ""; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .book-cover { margin: 16px auto 28px; }
  .bc-seal { width: 44px; height: 44px; font-size: 19px; }
  .bc-meta { gap: 8px 16px; }
  .book-toc { padding: 20px 16px 16px; }
  .book-toc a { font-size: 14px; }
}

/* 打印按钮：与下载并列，弱化成次要动作 */
.pdf-btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.pdf-btn-ghost:hover { color: var(--text); border-color: var(--text-3); }

/* 反思问题：不是结论，是一个可以自己核对的动作。
   左侧一道朱砂细线，弱化成一个旁注，而不是又一条警告。 */
.reflect {
  display: flex; gap: 10px; align-items: baseline;
  margin: 14px 0 4px; padding: 10px 0 10px 14px;
  border-left: 2px solid rgba(184,50,39,.35);
  background: linear-gradient(90deg, rgba(184,50,39,.035), transparent 70%);
  font-family: var(--font-cjk-serif);
  line-height: 1.85;
}
.reflect b {
  flex: none; font-size: 11px; letter-spacing: .12em;
  color: var(--accent); font-weight: 650;
  text-transform: uppercase;
}
.reflect span { font-size: 14px; color: var(--text-2); }

/* ---------- 就这份报告追问 ---------- */
.ask-report {
  margin: 46px 0 8px;
  padding-top: 28px;
  border-top: 1px solid rgba(26,46,61,.1);
}
.ar-head h2 {
  font-family: var(--font-cjk-serif);
  font-size: clamp(21px, 2.6vw, 26px);
  letter-spacing: .06em;
  font-weight: 600;
  margin: 0 0 6px;
}
.ar-head p {
  font-size: 13px; color: var(--text-3); line-height: 1.75;
  margin: 0 0 16px;
  max-width: 44em;
}
.ar-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ar-chips button {
  font: inherit; font-size: 12.5px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  border-radius: 0;
}
.ar-chips button:hover { border-color: rgba(184,50,39,.4); color: var(--accent); }

.ar-form { display: flex; gap: 8px; }
.ar-form input {
  flex: 1; min-width: 0; height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0 12px;
  font: inherit; font-size: 14.5px;
  border-radius: 0;
}
.ar-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184,50,39,.07);
}
.ar-log { margin-top: 18px; }
.ar-turn {
  padding: 4px 0 16px 16px;
  border-left: 2px solid rgba(184,50,39,.28);
  margin-bottom: 14px;
}
.ar-q {
  font-family: var(--font-cjk-serif);
  font-size: 15px; color: var(--text);
  margin-bottom: 8px;
}
.ar-a {
  font-family: var(--font-cjk-serif);
  font-size: 14.5px; line-height: 1.95;
  color: var(--text-2);
  white-space: pre-wrap;
}
.ar-thinking { color: var(--text-3); font-style: italic; }
.ar-error { color: var(--high); font-style: normal; }
.ar-note {
  font-size: 11.5px; color: var(--text-3); line-height: 1.7;
  margin: 14px 0 0;
}

/* ============================================================================
   阅读辅助层
   ----------------------------------------------------------------------------
   报告正文有十几屏，读者真正缺的是两样东西：
     ① 我读到哪儿了   → 顶部细进度条
     ② 我想去哪一卷   → 左侧常驻卷章轨（当前卷高亮）
   两者都不进入打印（见下方 @media print）。
   ========================================================================== */

/* ---------- 顶部阅读进度条 ---------- */
.read-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), #D96A4E);
  z-index: 90;
  transition: width .1s linear;
  pointer-events: none;
}

/* ---------- 左侧卷章轨 ---------- */
.vol-rail {
  position: fixed;
  left: max(14px, calc((100vw - 1360px) / 2));
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 8px;
  background: var(--glass-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.vol-rail a {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  text-decoration: none;
  font-family: var(--font-cjk-serif);
  font-size: 13px;
  color: var(--text-3);
  transition: all var(--dur) var(--ease);
}
.vol-rail a:hover { color: var(--accent); background: var(--accent-soft); }
.vol-rail a.on {
  background: var(--accent);
  color: #FFFEFB;
  box-shadow: 0 2px 8px rgba(184,50,39,.3);
}

/* 窄屏隐藏：手机上左侧浮标会挡住内容，且顶部已有完整目录 */
@media (max-width: 1279.98px) {
  .vol-rail { display: none !important; }
}

/* 打印时全部隐藏 */
@media print {
  .read-progress, .vol-rail { display: none !important; }
}
