/* =========================================================
   毛泽东选集 · 数字馆
   设计令牌 + 基础样式 + 组件
   ========================================================= */

:root {
  --red:        #9A1B1B;
  --red-2:      #741212;
  --red-3:      #B03A3A;
  --red-soft:   rgba(154, 27, 27, .075);
  --red-line:   rgba(154, 27, 27, .22);

  --gold:       #B0904F;
  --gold-soft:  #D9C49A;

  --paper:      #F6F2E9;
  --paper-2:    #EFE9DB;
  --card:       #FFFCF6;
  --card-2:     #FAF6EC;

  --ink:        #1C1A17;
  --ink-2:      #57534B;
  --ink-3:      #8C8578;
  --line:       #E3DAC9;
  --line-2:     #D5CAB5;

  --shadow-s:   0 1px 2px rgba(60, 45, 20, .05), 0 2px 8px rgba(60, 45, 20, .05);
  --shadow-m:   0 2px 6px rgba(60, 45, 20, .07), 0 12px 28px rgba(60, 45, 20, .09);
  --shadow-l:   0 10px 40px rgba(60, 45, 20, .14);

  --serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", STSong, "STZhongsong", SimSun, "Times New Roman", serif;
  --sans:  "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --max: 1180px;
  --nav-h: 62px;
  --radius: 4px;
}

html[data-theme="dark"] {
  --red:        #C84A46;
  --red-2:      #A8342F;
  --red-3:      #DC6B66;
  --red-soft:   rgba(200, 74, 70, .12);
  --red-line:   rgba(200, 74, 70, .28);

  --gold:       #C9A96A;
  --gold-soft:  #6E5F3E;

  --paper:      #16151A;
  --paper-2:    #1D1C22;
  --card:       #201F26;
  --card-2:     #26252D;

  --ink:        #EDE8DF;
  --ink-2:      #B6AFA2;
  --ink-3:      #837C71;
  --line:       #33313A;
  --line-2:     #423F4A;

  --shadow-s:   0 1px 2px rgba(0,0,0,.4);
  --shadow-m:   0 2px 8px rgba(0,0,0,.45), 0 14px 30px rgba(0,0,0,.4);
  --shadow-l:   0 14px 44px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-theme="dark"] body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(1200px 600px at 15% 0%, rgba(200,74,70,.06), transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

::selection { background: var(--red); color: #FFF8F0; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

.wrap { width: min(100% - 48px, var(--max)); margin-inline: auto; }

/* ================= 顶栏 ================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-2) 42%, var(--gold) 100%);
}
.topbar .wrap { display: flex; align-items: center; gap: 22px; }

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand .seal {
  width: 32px; height: 32px; border-radius: 3px;
  background: linear-gradient(160deg, var(--red-3), var(--red-2));
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 2px 6px rgba(116,18,18,.3);
}
.brand .seal svg { width: 17px; height: 17px; }
.brand b {
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  letter-spacing: .06em; white-space: nowrap;
}
.brand span { font-size: 11px; color: var(--ink-3); letter-spacing: .22em; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav button {
  padding: 7px 13px; border-radius: var(--radius); border: 0; background: transparent;
  font-size: 14px; color: var(--ink-2); transition: .18s; white-space: nowrap;
}
.nav a:hover, .nav button:hover { background: var(--red-soft); color: var(--red); }
.nav a.on { color: var(--red); font-weight: 600; background: var(--red-soft); }

.iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--card); border-radius: var(--radius);
  color: var(--ink-2); transition: .18s; flex-shrink: 0;
}
.iconbtn:hover { border-color: var(--red-line); color: var(--red); }
.iconbtn svg { width: 16px; height: 16px; }

/* ================= Hero ================= */
.hero { position: relative; overflow: hidden; padding: 62px 0 50px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 420px at 82% 8%, var(--red-soft), transparent 62%),
    radial-gradient(700px 380px at 4% 96%, rgba(176,144,79,.10), transparent 60%),
    linear-gradient(180deg, var(--paper-2), var(--paper));
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 336px;
  gap: 56px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; letter-spacing: .2em; color: var(--red);
  font-family: var(--mono); text-transform: uppercase;
  padding: 5px 12px; border: 1px solid var(--red-line); border-radius: 100px;
  background: var(--red-soft);
}
.eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); display: block; }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(46px, 7.2vw, 84px);
  line-height: 1.04; font-weight: 900;
  letter-spacing: .02em; margin: 20px 0 0;
  color: var(--ink);
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede {
  margin: 20px 0 0; max-width: 34em;
  font-family: var(--serif); font-size: 17.5px; line-height: 1.9; color: var(--ink-2);
}
.hero .lede b { color: var(--ink); font-weight: 600; }

.cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
  font-size: 15px; font-weight: 500; transition: .2s; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: linear-gradient(160deg, var(--red-3), var(--red-2));
  color: #FFF6EF;
  box-shadow: 0 3px 14px rgba(116,18,18,.26);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 7px 22px rgba(116,18,18,.34); }
.btn-ghost { border-color: var(--line-2); color: var(--ink-2); background: var(--card); }
.btn-ghost:hover { border-color: var(--red-line); color: var(--red); }

/* 书封 */
.book {
  position: relative; aspect-ratio: 3 / 4.15; border-radius: 3px 6px 6px 3px;
  background: linear-gradient(150deg, #A8251F 0%, #8C1712 48%, #6E0F0C 100%);
  box-shadow: var(--shadow-l), inset 0 0 0 1px rgba(255, 220, 180, .18);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 34px 22px; overflow: hidden;
}
.book::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 13px;
  background: linear-gradient(90deg, rgba(0,0,0,.42), rgba(0,0,0,.08) 60%, rgba(255,255,255,.07));
}
.book::after {
  content: ""; position: absolute; inset: 13px; border: 1px solid rgba(233, 205, 150, .32); border-radius: 2px;
  pointer-events: none;
}
.book .star { width: 30px; height: 30px; margin-bottom: 24px; opacity: .92; }
.book .vtitle {
  writing-mode: vertical-rl; text-orientation: upright; white-space: nowrap;
  font-family: var(--serif); font-size: clamp(28px, 2.6vw, 36px); font-weight: 700;
  letter-spacing: .2em; color: #F7E9D2; line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
  max-height: 74%;
}
.book .vsub {
  position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .3em;
  color: rgba(240, 218, 180, .62);
}

/* ================= 数据条 ================= */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); overflow: hidden; margin-top: 52px;
  box-shadow: var(--shadow-s);
}
.stat { padding: 24px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .k {
  font-family: var(--mono); font-size: 30px; font-weight: 600; line-height: 1.1;
  color: var(--red); letter-spacing: -.01em;
}
.stat .k small { font-size: 14px; font-weight: 500; margin-left: 3px; color: var(--ink-3); }
.stat .l { margin-top: 7px; font-size: 13px; color: var(--ink-3); letter-spacing: .04em; }

/* ================= 区块 ================= */
.sec { padding: 76px 0; }
.sec-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 34px; }
.sec-head .t { min-width: 0; }
.sec-head h2 {
  font-family: var(--serif); font-size: 30px; font-weight: 700;
  margin: 0; letter-spacing: .04em; display: flex; align-items: center; gap: 13px;
}
.sec-head h2::before {
  content: ""; width: 4px; height: 24px; border-radius: 2px;
  background: linear-gradient(180deg, var(--red), var(--red-2)); flex-shrink: 0;
}
.sec-head p { margin: 9px 0 0 17px; color: var(--ink-3); font-size: 14.5px; }
.sec-head .more { margin-left: auto; font-size: 14px; color: var(--red); white-space: nowrap; }
.sec-head .more:hover { text-decoration: underline; }

/* ================= 卷卡 ================= */
.vols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.vol {
  position: relative; padding: 26px 22px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card);
  transition: .22s; overflow: hidden; display: block; box-shadow: var(--shadow-s);
}
.vol::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--red), var(--red-2)); opacity: .85;
}
.vol:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: var(--line-2); }
.vol .vn {
  font-family: var(--serif); font-size: 19px; font-weight: 700;
  letter-spacing: .06em; color: var(--ink);
}
.vol .vy {
  font-family: var(--mono); font-size: 12px; color: var(--red);
  letter-spacing: .1em; margin-top: 5px;
}
.vol .vd { font-size: 13px; color: var(--ink-3); margin-top: 12px; line-height: 1.6; min-height: 42px; }
.vol .vm {
  margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line-2);
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  display: flex; justify-content: space-between;
}
.vol .vm b { color: var(--ink); font-weight: 600; }

/* ================= 检索/筛选 ================= */
.tools {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); margin-bottom: 20px; box-shadow: var(--shadow-s);
}
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); transition: .18s;
}
.search:focus-within { border-color: var(--red-line); background: var(--card); }
.search svg { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }
.search input {
  border: 0; outline: 0; background: transparent; width: 100%;
  font-size: 15px; color: var(--ink); font-family: var(--sans);
}
.search input::placeholder { color: var(--ink-3); }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 100px; border: 1px solid var(--line);
  background: var(--paper); font-size: 13.5px; color: var(--ink-2); transition: .18s;
}
.chip:hover { border-color: var(--red-line); color: var(--red); }
.chip.on { background: var(--red); border-color: var(--red); color: #FFF6EF; font-weight: 500; }

.hint { font-size: 13.5px; color: var(--ink-3); margin: 0 0 12px 2px; }
.hint b { color: var(--red); font-weight: 600; font-family: var(--mono); }

/* ================= 篇目列表 ================= */
.list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--shadow-s); }
.item {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto 22px;
  align-items: baseline; gap: 16px;
  padding: 17px 22px; border-bottom: 1px solid var(--line);
  transition: .16s; position: relative;
}
.item:last-child { border-bottom: 0; }
.item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); transform: scaleY(0); transition: .2s; transform-origin: center;
}
.item:hover { background: var(--card-2); }
.item:hover::before { transform: scaleY(1); }
.item .no {
  font-family: var(--mono); font-size: 13px; color: var(--red);
  letter-spacing: .04em; padding-top: 3px;
}
.item .tt { min-width: 0; }
.item .tt h3 {
  font-family: var(--serif); font-size: 18px; font-weight: 600;
  margin: 0; line-height: 1.5; color: var(--ink);
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.item .tt h3 .vtag {
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  padding: 2px 7px; border-radius: 3px; letter-spacing: .04em;
  background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line);
}
.item .tt .ex {
  margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.65;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.item .meta {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-3);
  white-space: nowrap; text-align: right;
}
.item .go { color: var(--ink-3); align-self: center; }
.item .go svg { width: 15px; height: 15px; }
.item:hover .go { color: var(--red); }

.empty { padding: 60px 20px; text-align: center; color: var(--ink-3); font-size: 15px; }
.empty code { font-family: var(--mono); font-size: 13px; background: var(--card-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 3px; }

mark.hl, .hl { background: var(--red-soft); color: var(--red); font-weight: 600; padding: 0 1px; border-radius: 2px; }

/* ================= 年表 ================= */
.timeline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 28px 24px 22px; box-shadow: var(--shadow-s); }
.tl-track { display: flex; align-items: flex-end; gap: 6px; height: 132px; overflow-x: auto; padding-bottom: 4px; }
.tl-col { flex: 1 0 36px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; cursor: pointer; }
.tl-col .bar { width: 100%; max-width: 20px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, var(--red-3), var(--red-2)); opacity: .32; transition: .2s; }
.tl-col:hover .bar { opacity: .7; }
.tl-col.on .bar { opacity: 1; }
.tl-col .yr { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; letter-spacing: -.02em; }
.tl-col.on .yr, .tl-col:hover .yr { color: var(--red); font-weight: 600; }

/* ================= 金句 ================= */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote {
  position: relative; padding: 28px 24px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); transition: .22s; display: block;
  box-shadow: var(--shadow-s);
}
.quote:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.quote::before {
  content: "“"; position: absolute; top: 4px; left: 15px;
  font-family: var(--serif); font-size: 54px; line-height: 1; color: var(--red); opacity: .2;
}
.quote p {
  font-family: var(--serif); font-size: 17px; line-height: 1.85;
  margin: 6px 0 0; color: var(--ink); position: relative;
}
.quote .src {
  margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 10px;
}
.quote .src b { color: var(--red); font-weight: 500; }

/* ================= 页脚 ================= */
.foot { border-top: 1px solid var(--line); background: var(--paper-2); padding: 44px 0 34px; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.foot h4 { font-family: var(--serif); font-size: 15px; margin: 0 0 13px; letter-spacing: .05em; }
.foot p, .foot li { font-size: 13.5px; color: var(--ink-3); line-height: 1.85; margin: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li a:hover { color: var(--red); }
.foot .copy {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ================= 阅读页 ================= */
.progress { position: fixed; left: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--red), var(--gold)); z-index: 60; width: 0; transition: width .08s linear; }

.reader-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 40px; padding: 34px 0 80px; align-items: start; }

.side {
  position: sticky; top: calc(var(--nav-h) + 22px);
  max-height: calc(100vh - var(--nav-h) - 44px); overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow-s);
}
.side-head { padding: 16px 18px 13px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.side-head .vh { font-family: var(--serif); font-size: 15.5px; font-weight: 700; letter-spacing: .05em; }
.side-head .vx { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 4px; letter-spacing: .06em; }
.side-nav { padding: 8px; }
.side-nav a {
  display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 8px;
  padding: 9px 10px; border-radius: 3px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
  transition: .15s;
}
.side-nav a .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding-top: 2px; }
.side-nav a:hover { background: var(--red-soft); color: var(--red); }
.side-nav a.on { background: var(--red); color: #FFF6EF; }
.side-nav a.on .n { color: rgba(255,246,239,.72); }

/* 正文 */
.doc { max-width: 780px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumb a:hover { color: var(--red); }
.crumb svg { width: 12px; height: 12px; opacity: .5; }

.doc-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(28px, 4vw, 38px); line-height: 1.32; letter-spacing: .02em;
  margin: 0 0 14px; color: var(--ink);
}
.doc-sub { font-family: var(--serif); font-size: 17px; color: var(--ink-2); margin: 0 0 14px; }
.doc-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-3);
}
.doc-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

.intro {
  margin: 26px 0 34px; padding: 18px 22px;
  background: var(--card-2); border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-size: 15.5px; line-height: 1.9; color: var(--ink-2);
}
.intro::before {
  content: "题解"; display: block; margin-bottom: 7px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .22em; color: var(--gold); font-weight: 600;
}

.body { font-family: var(--serif); font-size: 17.5px; line-height: 1.98; color: var(--ink); }
.body p { margin: 0 0 1.05em; text-indent: 2em; text-align: justify; }
.body h2 {
  font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .03em;
  margin: 2.1em 0 .95em; padding-left: 13px; position: relative; color: var(--ink);
}
.body h2::before {
  content: ""; position: absolute; left: 0; top: .28em; bottom: .28em; width: 3px;
  border-radius: 2px; background: var(--red);
}
.body p:first-of-type { margin-top: 0; }

.notes { margin-top: 46px; border-top: 1px solid var(--line); padding-top: 6px; }
.notes summary {
  cursor: pointer; list-style: none; padding: 14px 0 12px;
  font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: .05em;
  display: flex; align-items: center; gap: 10px; color: var(--ink);
}
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after {
  content: "展开"; margin-left: auto; font-family: var(--sans); font-size: 12.5px; font-weight: 400;
  color: var(--red); letter-spacing: .04em;
}
.notes[open] summary::after { content: "收起"; }
.notes ol { margin: 0; padding-left: 0; list-style: none; }
.notes li {
  font-size: 13.5px; line-height: 1.85; color: var(--ink-2);
  padding: 11px 0 11px 14px; border-top: 1px dashed var(--line);
  text-indent: -14px; padding-left: 0;
}
.notes li::before { content: ""; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 52px; }
.pg {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); transition: .2s; display: block; box-shadow: var(--shadow-s);
}
.pg:hover { border-color: var(--red-line); box-shadow: var(--shadow-m); transform: translateY(-2px); }
.pg .dir { font-size: 11.5px; letter-spacing: .18em; color: var(--ink-3); font-family: var(--mono); }
.pg .tt { font-family: var(--serif); font-size: 16px; font-weight: 600; margin-top: 8px; line-height: 1.5; }
.pg.next { text-align: right; }
.pg.disabled { opacity: .4; pointer-events: none; }

.reader-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.reader-tools .iconbtn { width: 32px; height: 32px; }
.fontctl { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.fontctl button { border: 0; background: transparent; padding: 5px 10px; font-size: 13px; color: var(--ink-2); }
.fontctl button:hover { background: var(--red-soft); color: var(--red); }
.reader-crumb { font-size: 13.5px; color: var(--ink-2); font-family: var(--serif); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= 关于页 ================= */
.prose { max-width: 760px; }
.prose h2 {
  font-family: var(--serif); font-size: 24px; margin: 44px 0 16px; letter-spacing: .04em;
  padding-left: 14px; border-left: 4px solid var(--red); line-height: 1.3;
}
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 15.5px; line-height: 1.95; color: var(--ink-2); margin: 0 0 1em; }
.prose ul { padding-left: 20px; }
.prose li { font-size: 15.5px; line-height: 1.95; color: var(--ink-2); margin-bottom: 7px; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.prose th, .prose td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--card-2); font-weight: 600; font-family: var(--serif); }
.prose code { font-family: var(--mono); font-size: 13px; background: var(--card-2); padding: 2px 6px; border-radius: 3px; border: 1px solid var(--line); }
.note-box {
  padding: 18px 22px; border-radius: var(--radius); margin: 20px 0;
  background: var(--card-2); border-left: 3px solid var(--gold);
  font-size: 14.5px; line-height: 1.9; color: var(--ink-2);
}

/* ================= 响应式 ================= */
@media (max-width: 1080px) {
  .vols { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: minmax(0,1fr); gap: 42px; }
  .book { max-width: 260px; margin-inline: auto; }
  .reader-shell { grid-template-columns: minmax(0,1fr); }
  .side { position: static; max-height: none; }
  .side-nav { max-height: 300px; overflow-y: auto; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 30px); }
  .brand { flex-shrink: 1; min-width: 0; }
  .brand span span { display: none; }          /* 收起英文副题，避免顶栏撑破版面 */
  .brand b { font-size: 16px; }
  .nav a:not(.keep) { display: none; }
  .topbar .wrap { gap: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .vols, .quotes { grid-template-columns: 1fr; }
  .sec { padding: 52px 0; }
  .hero { padding: 40px 0 34px; }
  .item { grid-template-columns: 44px minmax(0,1fr); gap: 10px 12px; padding: 15px 16px; }
  .item .meta { grid-column: 2; text-align: left; }
  .item .go { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .body { font-size: 16.5px; }
  .pager { grid-template-columns: 1fr; }
  .pg.next { text-align: left; }
  .reader-crumb { display: none; }
  .prose table { font-size: 12.5px; }
  .prose th, .prose td { padding: 8px 9px; }
  .tools { padding: 12px; gap: 9px; }
  .search { flex-basis: 100%; }
  .quote p { font-size: 16px; }
}

/* ================= 打印 ================= */
@media print {
  .topbar, .side, .pager, .progress, .reader-tools, .foot, .crumb { display: none !important; }
  body { background: #fff; color: #000; }
  .reader-shell { grid-template-columns: 1fr; padding: 0; }
  .doc { max-width: none; }
  .body { font-size: 11.5pt; line-height: 1.75; }
  .notes { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
