/* ==========================================================================
   杜仲闲谈 · 个人网站
   编辑式极简（暖纸底 + 陶土橙）｜配色沿用微考牌官网设计系统
   藏地蓝为「出行纪实」分区专用色，取自《蔚来ES8西藏自驾游》书封原图
   ========================================================================== */

:root {
  --paper: #FBF6EF;
  --cream: #F4EADB;
  --card: #FFFFFF;
  --ink: #2A1B12;
  --ink-soft: #3D2B1F;
  --muted: #6B5746;
  --accent: #B4540A;
  --accent-strong: #8F3F06;
  --accent-soft: #E0913A;
  --border: #EADFCF;

  --cold-1: #87CAFF;
  --cold-2: #378ACC;
  --cold-3: #30679D;
  --cold-deep: #1B3A57;
  --cold-ink: #F2F8FF;

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1312px;
  --shadow-card: 0 1px 2px rgba(42, 27, 18, .04), 0 8px 24px rgba(42, 27, 18, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.35; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }
.container-narrow { max-width: 880px; }
.section { padding: 104px 0; }
.section-tight { padding: 72px 0; }
.section-cream { background: var(--cream); }
.section-line { border-top: 1px solid var(--border); }

/* ---------- 书脊式竖排栏目标签（由书封「竖排书名」母题转译） ---------- */
.spine {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 34px;
  z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  border-right: 1px solid var(--border);
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: .42em;
  color: var(--muted);
  user-select: none;
}
.spine::after {
  content: ""; position: absolute; right: -1px; top: 0; bottom: 0;
  width: 1px; background: var(--accent); opacity: .25;
}
@media (max-width: 1280px) { .spine { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 239, .93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 16px rgba(42,27,18,.05); }
.header-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-family: var(--font-serif); font-size: 21px; font-weight: 600; letter-spacing: .06em; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: .16em; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-size: 15px; color: var(--ink-soft); position: relative; padding: 6px 0; transition: color .18s ease; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); transition: right .22s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav-toggle { display: none; border: 0; background: transparent; padding: 8px; color: var(--ink); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .2s ease; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav a::after { display: none; }
}

/* ---------- 共用排版 ---------- */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .22em;
  color: var(--accent); text-transform: uppercase;
}
.section-head { margin-bottom: 52px; max-width: 760px; }
.section-num { font-family: var(--font-serif); font-size: 13px; color: var(--accent); letter-spacing: .2em; display: block; margin-bottom: 14px; }
.section-title { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: .02em; }
.section-desc { margin-top: 18px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.lead { font-family: var(--font-serif); font-size: clamp(19px, 2vw, 24px); line-height: 1.85; color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.rule { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 28px; border-radius: 8px; font-size: 15px; font-weight: 600;
  line-height: 1.3; transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  border: 0;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -6px rgba(180,84,10,.5); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-outline { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn-outline:hover { background: #FDF4EA; }
.btn-ghost { color: var(--ink); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--accent); }
.btn-arrow::after { content: "→"; font-weight: 400; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow-card);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.tag {
  display: inline-block; font-size: 12px; letter-spacing: .06em;
  color: var(--accent); background: #FDF1E6;
  border: 1px solid #F2DCC4; border-radius: 999px; padding: 4px 12px;
}
.tag-plain { color: var(--muted); background: var(--cream); border-color: var(--border); }

/* ---------- 首页 Hero ---------- */
.hero { padding: 88px 0 104px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: center; }
.hero-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.hero-kicker::before { content: ""; width: 34px; height: 1px; background: var(--accent); }
.hero-title { font-size: clamp(46px, 6vw, 78px); letter-spacing: .04em; line-height: 1.2; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { margin-top: 26px; font-size: 17px; color: var(--muted); line-height: 1.95; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-roles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--border); }
.hero-portrait { position: relative; }
.hero-portrait .frame {
  aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius);
  background: var(--cream); border: 1px solid var(--border);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero-portrait .caption {
  position: absolute; left: -24px; bottom: 28px;
  background: var(--paper); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 20px; box-shadow: var(--shadow-card);
}
.hero-portrait .caption strong { display: block; font-family: var(--font-serif); font-size: 17px; }
.hero-portrait .caption span { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
@media (max-width: 900px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-portrait .frame { aspect-ratio: 3 / 3.2; }
  .hero-portrait .caption { left: 12px; bottom: 12px; }
}

/* ---------- 身份四格 ---------- */
.role-card { position: relative; padding: 34px 30px; }
.role-card .idx { font-family: var(--font-serif); font-size: 13px; color: var(--accent); letter-spacing: .18em; }
.role-card h3 { font-size: 23px; margin: 16px 0 12px; }
.role-card p { font-size: 14px; color: var(--muted); line-height: 1.85; }

/* ---------- 双线著作分组 ---------- */
.line-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.line-head h3 { font-size: 26px; }
.line-head .line-note { font-size: 14px; color: var(--muted); }
.book-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
@media (max-width: 900px) { .book-row { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .book-row { grid-template-columns: 1fr; } }
.book-card { display: flex; flex-direction: column; overflow: hidden; }
.book-cover {
  aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center;
  padding: 22px 22px 18px; position: relative; overflow: hidden;
  background: #FFFFFF; border-bottom: 1px solid var(--border);
}
.book-cover img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(42,27,18,.16)); }
.book-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.book-body h4 { font-size: 19px; margin-bottom: 10px; }
.book-body .meta { font-size: 12px; color: var(--muted); line-height: 1.9; }
.book-body .desc { font-size: 14px; color: var(--ink-soft); margin-top: 14px; line-height: 1.85; flex: 1; }
.book-body .foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--accent); }

/* ---------- 冷色专区（D3：藏地蓝仅用于出行纪实） ---------- */
.cold-zone {
  background: var(--cold-deep); color: var(--cold-ink);
  position: relative; overflow: hidden;
}
.cold-zone::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(55,138,204,.55) 0%, rgba(27,58,87,.15) 55%, rgba(27,58,87,.85) 100%);
  pointer-events: none;
}
.cold-zone > .container { position: relative; }
.cold-zone .eyebrow { color: var(--cold-1); }
.cold-zone .section-num { color: var(--cold-1); }
.cold-zone .section-title { color: #fff; }
.cold-zone .section-desc { color: #CFE3F5; }
.cold-zone .btn-primary { background: var(--accent); }
.cold-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.cold-cover { border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.cold-cover img { width: 100%; }
.cold-facts { display: flex; flex-wrap: wrap; gap: 28px 44px; margin-top: 34px; }
.cold-facts .fact strong { display: block; font-family: var(--font-serif); font-size: 25px; color: #fff; }
.cold-facts .fact span { font-size: 12px; color: #BBD5EC; letter-spacing: .1em; }
@media (max-width: 900px) { .cold-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 36px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -31px; top: 9px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent);
}
.tl-year { font-family: var(--font-serif); font-size: 14px; color: var(--accent); letter-spacing: .08em; }
.tl-item h4 { font-size: 18px; margin: 6px 0 8px; }
.tl-item p { font-size: 14px; color: var(--muted); line-height: 1.85; }

/* ---------- 三档自我介绍切换 ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--cream); border-radius: 10px; border: 1px solid var(--border); margin-bottom: 28px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: 9px 20px; border-radius: 7px; font-size: 14px; color: var(--muted); transition: all .18s ease; }
.tab.is-active { background: var(--card); color: var(--accent); font-weight: 600; box-shadow: 0 1px 4px rgba(42,27,18,.08); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.intro-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 44px; }
.intro-box .quote { font-family: var(--font-serif); font-size: clamp(17px, 1.9vw, 21px); line-height: 2; color: var(--ink-soft); }
.intro-box .quote p + p { margin-top: 18px; }
.intro-box .source { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
@media (max-width: 620px) { .intro-box { padding: 26px 22px; } }

/* ---------- 通用列表 / 定义 ---------- */
.plain-list li { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; display: flex; gap: 16px; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list .k { min-width: 108px; color: var(--muted); font-size: 13px; }
.plain-list .v { color: var(--ink-soft); }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); transition: color .18s ease; }
.link-list a:hover { color: var(--accent); }
.link-list a:last-child { border-bottom: 0; }
.link-list .t { font-family: var(--font-serif); font-size: 19px; }
.link-list .d { font-size: 13px; color: var(--muted); }
.link-list .arrow { color: var(--accent); }

/* ---------- 领域卡片 ---------- */
.domain-card h3 { font-size: 20px; margin-bottom: 12px; }
.domain-card .count { font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.domain-card ul { margin-top: 18px; }
.domain-card li { font-size: 13px; color: var(--muted); padding: 7px 0; border-top: 1px solid var(--border); }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-qr { margin-top: 28px; }
.contact-qr img {
  width: 220px; height: 220px; display: block;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; padding: 12px; box-shadow: var(--shadow-card);
}
.contact-qr span { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .contact-qr img { width: 180px; height: 180px; } }

/* 正文内链：邮件、社群、履历 */
.plain-list a, .timeline a {
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--border); transition: text-decoration-color .18s ease;
}
.plain-list a:hover, .timeline a:hover { text-decoration-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--cream); border-top: 1px solid var(--border); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 132px; gap: 40px; align-items: start; }
.footer-qr { text-align: left; }
.footer-qr h4 { font-family: var(--font-sans); font-size: 13px; letter-spacing: .14em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.footer-qr img { width: 104px; height: 104px; border-radius: 10px; background: #fff; padding: 6px; box-shadow: 0 2px 10px rgba(42,27,18,.10); display: block; }
.footer-qr span { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.footer-bottom a { color: var(--accent); font-weight: 600; }
.footer-bottom a:hover { text-decoration: underline; }

/* book index cards (books.html) */
.book-cards { grid-template-columns: repeat(3, 1fr); }
/* 封面在上、介绍文字在下 */
.book-card { display: flex; flex-direction: column; gap: 20px; padding: 24px; background: var(--paper); border: 1px solid var(--border); border-radius: 16px; text-decoration: none; color: inherit; transition: transform .25s ease, box-shadow .25s ease; align-items: stretch; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(42,27,18,.10); }
.book-card-cover { width: 100%; display: flex; justify-content: center; }
.book-card-cover img { width: auto; max-width: 200px; height: auto; border-radius: 8px; box-shadow: 0 6px 18px rgba(42,27,18,.14); }
.book-card-info { flex: 1; display: flex; flex-direction: column; }
.book-card-info h3 { font-size: 20px; margin: 10px 0 8px; letter-spacing: .01em; line-height: 1.5; }
.book-card-info .meta { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.book-card-info .desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.85; flex: 1; }
.book-card-cta { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 700; font-size: 14px; }
.book-card:hover .book-card-cta { text-decoration: underline; }
@media (max-width: 900px) { .book-cards { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .book-cards { grid-template-columns: 1fr; } .book-card-cover img { max-width: 180px; } }
.footer-brand .brand-name { font-size: 24px; }
.footer-brand p { margin-top: 14px; font-size: 13px; color: var(--muted); max-width: 360px; line-height: 1.9; }
.footer-col h4 { font-family: var(--font-sans); font-size: 13px; letter-spacing: .14em; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.footer-col a { display: block; font-size: 14px; padding: 5px 0; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.footer-bottom .realname { font-family: var(--font-serif); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 动效（尊重 reduced-motion） ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

@media (max-width: 620px) {
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 36px; }
  .container { width: calc(100% - 32px); }
  .header-inner { height: 64px; }
  .nav { top: 64px; }
  .brand-sub { display: none; }
}

/* ==========================================================================
   著作页 · 书目详情块 + 目录（站内文章 / 公众号 / 书中章节 三态区分）
   ========================================================================== */

/* ---------- 书目详情块 ---------- */
.book-block {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-card);
  margin-top: 28px;
}
.book-block:first-of-type { margin-top: 0; }
.book-block-head { display: grid; grid-template-columns: 210px 1fr; gap: 38px; align-items: start; }
.book-block-cover { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.book-block-cover img { width: 100%; height: auto; display: block; }
.book-block-info .tag { margin-bottom: 14px; }
.book-block-info h3 { font-size: 24px; line-height: 1.42; }
.book-block-info .meta { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.9; }
.book-block-info .desc { font-size: 15px; color: var(--ink-soft); margin-top: 16px; line-height: 1.9; }
.book-block-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- 目录 ---------- */
.book-toc { margin-top: 34px; border-top: 1px solid var(--border); padding-top: 28px; }
.toc-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; font-size: 12px; color: var(--muted); }
.toc-legend span { display: inline-flex; align-items: center; gap: 7px; }
.toc-legend .dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.toc-legend .dot.site { background: var(--accent); }
.toc-legend .dot.ext { background: var(--cold-2); }
.toc-legend .dot.plain { background: var(--border); }

.toc-group { margin-top: 22px; }
.toc-group:first-of-type { margin-top: 0; }
.toc-group-title {
  font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: var(--ink);
  letter-spacing: .03em; padding-bottom: 8px; margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}
.toc-list { list-style: none; }
.toc-item {
  display: flex; align-items: baseline; gap: 14px;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.toc-item:last-child { border-bottom: 0; }
.toc-item .num { font-size: 12px; color: var(--muted); min-width: 36px; flex: none; font-variant-numeric: tabular-nums; }
.toc-item .label { flex: 1; font-size: 15px; color: var(--ink-soft); line-height: 1.6; }
.toc-item a.label { color: var(--accent); transition: color .18s ease, opacity .18s ease; }
.toc-item a.label:hover { text-decoration: underline; text-underline-offset: 3px; }
.toc-badge { font-size: 11px; letter-spacing: .04em; padding: 2px 9px; border-radius: 999px; white-space: nowrap; flex: none; }
.toc-badge.site { color: var(--accent); background: #FDF1E6; border: 1px solid #F2DCC4; }
.toc-badge.ext { color: var(--cold-3); background: #EAF4FC; border: 1px solid #CFE6F6; }
.toc-badge.plain { color: var(--muted); background: var(--cream); border: 1px solid var(--border); }
.toc-badge .arr { font-size: 10px; margin-left: 3px; }

.toc-ext-note { font-size: 13px; color: var(--muted); line-height: 1.95; margin-top: 18px; }
.toc-ext-head { font-family: var(--font-serif); font-size: 17px; margin-top: 34px; }

/* ---------- 三级目录：篇（toc-group）→ 章（toc-chapter）→ 节（toc-sub） ---------- */
.toc-legend .toc-legend-note { color: var(--accent); font-weight: 600; }
.toc-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 4px; }
.toc-jump a {
  font-size: 12px; line-height: 1.6; padding: 4px 12px; text-decoration: none;
  color: var(--muted); background: var(--card);
  border: 1px solid var(--border); border-radius: 999px;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.toc-jump a:hover { color: var(--accent); border-color: var(--accent-soft); background: #FDF1E6; }
.toc-chapter { padding: 2px 0 12px; border-bottom: 1px dashed var(--border); }
.toc-chapter:last-child { border-bottom: 0; padding-bottom: 2px; }
.toc-chapter .toc-item { border-bottom: 0; padding: 9px 0 3px; }
.toc-chapter .toc-item .num { width: 62px; min-width: 62px; color: var(--accent); font-weight: 600; }
.toc-chapter .toc-item .label { font-weight: 600; color: var(--ink); font-size: 15.5px; }
.toc-sub {
  list-style: none; margin: 0 0 0 76px; padding: 2px 0 0 16px;
  border-left: 1px solid var(--border);
}
.toc-sub li { display: flex; gap: 10px; font-size: 13px; line-height: 1.75; color: var(--muted); padding: 3px 0; }
.toc-sub .snum { flex: none; width: 34px; color: var(--accent-soft); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .book-block { padding: 24px; }
  .book-block-head { grid-template-columns: 150px 1fr; gap: 24px; }
}
@media (max-width: 560px) {
  .book-block-head { grid-template-columns: 1fr; }
  .book-block-cover { max-width: 200px; }
  .toc-chapter .toc-item { gap: 10px; }
  .toc-chapter .toc-item .num { width: 50px; min-width: 50px; font-size: 11px; }
  .toc-chapter .toc-item .label { font-size: 14.5px; }
  .toc-sub { margin-left: 12px; padding-left: 12px; }
  .toc-sub li { font-size: 12.5px; }
  .toc-sub .snum { width: 28px; }
}

/* notes · 概念条目链接（闲谈卡片） */
.domain-card li a {
  color: var(--accent); font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: baseline; gap: 6px;
}
.domain-card li a::after { content: "→"; font-size: 11px; font-weight: 400; opacity: .65; }
.domain-card li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.domain-card li .note-plain { color: var(--muted); }
