/* ============ 崇德老人纪念册 ============ */
:root {
  --paper: #f4ede0;
  --paper-2: #ebe2d1;
  --paper-3: #e0d4bd;
  --ink: #1f1a16;
  --ink-2: #4a4038;
  --ink-3: #85786a;
  --line: #cdbfa6;
  --green: #4d6a38;
  --green-d: #2f4526;
  --zhu: #b2392a;
  --zhu-l: rgba(178, 57, 42, .38);
  --qing: #3e6b78;
  --zhe: #8a5a3b;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "Kaiti TC", "BiauKai", var(--serif);
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --fs: 19px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
/* 纸纹 */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 28px;
  background: rgba(244, 237, 224, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, transform .3s;
  font-family: var(--sans); font-size: 14px;
}
.topnav.scrolled { border-bottom-color: var(--line); }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; font-family: var(--kai); font-size: 18px; letter-spacing: .1em; }
.seal-sm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; font-size: 11px; line-height: 1;
  writing-mode: vertical-rl; letter-spacing: 0;
  background: var(--zhu); color: #f8efe2; border-radius: 3px;
  font-family: var(--kai);
}
.navlinks { display: flex; gap: 22px; }
.navlinks a { text-decoration: none; color: var(--ink-2); letter-spacing: .15em; }
.navlinks a:hover { color: var(--zhu); }
.nav-read { color: var(--zhu) !important; border: 1px solid var(--zhu); padding: 2px 12px; border-radius: 2px; }

/* ---------- 卷首 ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 90px 40px 60px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -10vw; top: -10vh; width: 60vw; height: 120vh;
  background: radial-gradient(closest-side, rgba(77, 106, 56, .10), transparent);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: minmax(240px, 400px) auto minmax(280px, 460px); gap: 56px; align-items: center; max-width: 1240px; width: 100%; }
.hero-cover { margin: 0; transform: rotate(-2.5deg); transition: transform .6s; }
.hero-cover:hover { transform: rotate(-1deg) translateY(-4px); }
.hero-cover img { width: 100%; display: block; border-radius: 2px; box-shadow: 0 2px 0 #c9b998, 0 24px 50px -12px rgba(40, 30, 15, .45), 0 6px 14px rgba(40, 30, 15, .18); }
.hero-cover figcaption { font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-top: 14px; letter-spacing: .2em; text-align: center; }
.hero-title { display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 18px; position: relative; }
.vtitle { writing-mode: vertical-rl; font-family: var(--kai); font-weight: 400; font-size: clamp(48px, 6vw, 76px); letter-spacing: .18em; margin: 0; line-height: 1.1; color: var(--ink); }
.vsub { writing-mode: vertical-rl; font-family: var(--kai); font-size: 18px; letter-spacing: .4em; color: var(--ink-2); margin-top: 120px; border-right: 1px solid var(--zhu-l); padding-right: 10px; }
.seal {
  position: absolute; right: -52px; bottom: 4px;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: var(--zhu); color: #f6eadb; font-family: var(--kai); font-size: 20px; line-height: 1.05;
  border-radius: 4px; transform: rotate(4deg);
  box-shadow: inset 0 0 0 3px var(--zhu), inset 0 0 0 4px #f3d9c9;
  opacity: .92;
}
.hero-years { font-family: var(--kai); font-size: 20px; letter-spacing: .5em; color: var(--zhu); margin: 0 0 18px; }
.hero-lede { max-width: 25em; font-size: 18px; line-height: 2.1; color: var(--ink-2); margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; padding: 10px 26px; border: 1px solid var(--ink-2);
  background: transparent; letter-spacing: .3em; font-size: 15px; border-radius: 2px; transition: all .2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--green-d); border-color: var(--green-d); color: #f2ead9; }
.btn-primary:hover { background: var(--zhu); border-color: var(--zhu); }
.btn-sm { padding: 5px 14px; font-size: 13px; letter-spacing: .1em; }
.hero-quote { margin: 40px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--zhu); font-family: var(--kai); font-size: 18px; color: var(--ink-2); min-height: 3.4em; transition: opacity .6s; }
.hero-quote cite { display: block; font-style: normal; font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-top: 6px; letter-spacing: .1em; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-family: var(--sans); font-size: 12px; letter-spacing: .5em; color: var(--ink-3); writing-mode: vertical-rl; animation: bob 2.4s infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- 通用版块 ---------- */
.sec { max-width: 1240px; margin: 0 auto; padding: 100px 40px 60px; }
.sec-head { max-width: 760px; margin-bottom: 36px; }
.sec-head.sub { margin-top: 70px; }
.sec-title { font-family: var(--kai); font-weight: 400; font-size: 36px; letter-spacing: .25em; margin: 0 0 14px; display: flex; align-items: baseline; gap: 16px; }
.sec-title i { font-style: normal; font-size: 15px; color: var(--paper); background: var(--zhu); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0; border-radius: 2px; transform: translateY(-5px); }
.sub-title { font-family: var(--kai); font-weight: 400; font-size: 24px; letter-spacing: .2em; margin: 0 0 8px; }
.sec-desc { color: var(--ink-2); margin: 0; font-size: 16px; }
.sec-desc b { font-weight: 400; color: var(--zhu); }
.side-h { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .3em; color: var(--ink-3); margin: 28px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }

/* ---------- 其人 ---------- */
.who-grid { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
.who-photo { margin: 0; position: sticky; top: 90px; }
.who-photo img { width: 100%; display: block; filter: sepia(.35) contrast(1.02); border: 10px solid #fbf7ef; box-shadow: 0 18px 40px -16px rgba(40, 30, 15, .4); }
.who-photo figcaption { font-family: var(--sans); font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 12px; letter-spacing: .2em; }
.who-text p { font-size: 17px; line-height: 2.05; margin: 0 0 16px; color: var(--ink-2); }
.who-text .lead { font-size: 20px; color: var(--ink); }
.who-text .lead b { font-weight: 400; color: var(--zhu); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 36px; border-top: 1px solid var(--line); }
.stat { padding: 18px 8px 16px; border-bottom: 1px solid var(--line); }
.stat:not(:nth-child(3n)) { border-right: 1px solid var(--line); padding-right: 16px; }
.stat:not(:nth-child(3n+1)) { padding-left: 18px; }
.stat b { display: block; font-family: var(--kai); font-weight: 400; font-size: 34px; color: var(--green-d); line-height: 1.2; }
.stat b small { font-size: 16px; margin-left: 2px; color: var(--ink-2); }
.stat span { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); letter-spacing: .08em; }

/* ---------- 长卷 ---------- */
.sec-scroll { max-width: 1440px; }
.tl-wrap { overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; scrollbar-width: thin; }
.timeline { display: block; font-family: var(--sans); }
.timeline .col-hit { fill: transparent; cursor: pointer; }
.timeline .col-hl { fill: rgba(178, 57, 42, .08); pointer-events: none; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-family: var(--sans); font-size: 12.5px; color: var(--ink-2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend svg { overflow: visible; }
.tl-tip {
  position: fixed; z-index: 60; width: 300px; pointer-events: none;
  background: #fbf7ef; border: 1px solid var(--line); box-shadow: 0 12px 30px -10px rgba(40, 30, 15, .35);
  padding: 14px 16px 12px; border-radius: 2px; font-size: 14px; line-height: 1.75;
}
.tl-tip .tt-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.tl-tip .tt-gz { font-family: var(--kai); font-size: 22px; color: var(--zhu); }
.tl-tip .tt-meta { font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.tl-tip .tt-fam { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); font-family: var(--sans); font-size: 12px; color: var(--ink-2); }
.tl-tip .tt-hist { font-family: var(--sans); font-size: 12px; color: var(--qing); margin-top: 4px; }

/* ---------- 行迹 ---------- */
.map-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 40px; align-items: start; }
.map-box { position: relative; background: #efe6d4; border: 1px solid var(--line); }
.map-svg { display: block; width: 100%; height: auto; max-height: calc(100vh - 120px); margin: 0 auto; }
.map-svg .prov { fill: #f1e9d8; stroke: #c9b896; stroke-width: 1; }
.map-svg .prov-label { font-family: var(--kai); font-size: 20px; fill: #b3a283; letter-spacing: .3em; text-anchor: middle; pointer-events: none; }
.map-svg .river { fill: none; stroke: #9db4b6; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.map-svg .canal { fill: none; stroke: #9db4b6; stroke-width: 2; stroke-dasharray: 6 5; opacity: .8; }
.map-svg .lake { fill: #b9cccb; opacity: .7; }
.map-svg .river-label { font-family: var(--kai); font-size: 16px; fill: #7f9c9f; letter-spacing: .3em; }
.map-svg .leg { fill: none; stroke: var(--zhu); stroke-width: 2.6; stroke-linecap: round; opacity: .85; }
.map-svg .leg.old { opacity: .32; }
.map-svg .trip { fill: none; stroke: var(--zhu); stroke-width: 1.6; stroke-dasharray: 3 5; opacity: .55; }
.map-svg .city circle { fill: #fbf7ef; stroke: var(--ink-2); stroke-width: 1.5; transition: r .3s; }
.map-svg .city.lived circle { fill: var(--ink); }
.map-svg .city.pass circle { stroke: var(--ink-3); }
.map-svg .city text { font-family: var(--kai); font-size: 21px; fill: var(--ink); paint-order: stroke; stroke: #efe6d4; stroke-width: 5px; }
.map-svg .city.pass text { font-size: 16px; fill: var(--ink-3); }
.map-svg .city.now circle { fill: var(--zhu); stroke: var(--zhu); }
.map-svg .city.now text { fill: var(--zhu); }
.map-svg .city { cursor: pointer; }
.map-svg .me { fill: var(--zhu); }
.map-svg .me-ring { fill: none; stroke: var(--zhu); stroke-width: 2; animation: ring 1.8s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.map-note { position: absolute; left: 12px; bottom: 8px; font-family: var(--sans); font-size: 11px; color: var(--ink-3); }
.map-ctrl { display: flex; gap: 14px; align-items: center; }
.map-ctrl input[type=range] { flex: 1; accent-color: var(--zhu); }
.map-card { margin-top: 18px; background: #fbf7ef; border: 1px solid var(--line); padding: 18px 20px; min-height: 170px; }
.map-card .mc-y { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.map-card .mc-gz { font-family: var(--kai); font-size: 30px; color: var(--zhu); }
.map-card .mc-meta { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); }
.map-card .mc-place { font-family: var(--kai); font-size: 20px; margin: 6px 0 4px; }
.map-card p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.85; }
.map-card a { font-family: var(--sans); font-size: 12.5px; color: var(--zhu); text-decoration: none; display: inline-block; margin-top: 8px; cursor: pointer; }
.place-list { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.place-list li { display: grid; grid-template-columns: 4.2em 1fr 3.5em; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dotted var(--line); cursor: pointer; }
.place-list li:hover { color: var(--zhu); }
.place-list .pl-name { font-family: var(--kai); font-size: 17px; }
.place-list .pl-bar { height: 8px; background: var(--paper-2); position: relative; }
.place-list .pl-bar i { position: absolute; top: 0; height: 100%; background: var(--ink-2); }
.place-list .pl-n { font-family: var(--sans); font-size: 12px; color: var(--ink-3); text-align: right; }

/* ---------- 世变 ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tab { background: none; border: none; padding: 10px 26px; font-family: var(--kai); font-size: 19px; letter-spacing: .2em; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--ink); border-bottom-color: var(--zhu); }
.tabpane { display: none; }
.tabpane.on { display: block; animation: fade .4s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

.wages { background: #fbf7ef; border: 1px solid var(--line); padding: 22px 26px 18px; margin-bottom: 28px; }
.wages h4 { margin: 0 0 4px; font-family: var(--kai); font-weight: 400; font-size: 20px; letter-spacing: .1em; }
.wages p { margin: 0 0 18px; font-size: 14px; color: var(--ink-3); font-family: var(--sans); }
.wage-line { display: flex; align-items: flex-end; gap: 0; position: relative; padding-top: 10px; }
.wage { flex: 1; text-align: center; position: relative; }
.wage .w-v { font-family: var(--kai); font-size: 20px; color: var(--zhu); white-space: nowrap; }
.wage .w-dot { width: 11px; height: 11px; background: var(--zhu); border-radius: 50%; margin: 8px auto; position: relative; z-index: 1; }
.wage .w-y { font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.wage-line::before { content: ""; position: absolute; left: 8%; right: 8%; top: 50%; border-top: 1px solid var(--zhu-l); }

.ledger-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-family: var(--sans); }
.chip { border: 1px solid var(--line); background: transparent; padding: 3px 12px; font-size: 13px; border-radius: 20px; color: var(--ink-2); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ledger {
  background:
    linear-gradient(90deg, transparent 0 88px, var(--zhu-l) 88px 89px, transparent 89px 92px, var(--zhu-l) 92px 93px, transparent 93px),
    #fbf7ef;
  border: 1px solid var(--line); border-top: 3px double var(--zhu-l);
}
.lg-row { display: grid; grid-template-columns: 88px minmax(140px, 1.1fr) minmax(120px, .7fr) 2fr; align-items: baseline; gap: 0 18px; padding: 11px 18px 11px 0; border-bottom: 1px solid rgba(178, 57, 42, .16); cursor: pointer; transition: background .15s; }
.lg-row:hover { background: rgba(178, 57, 42, .045); }
.lg-y { font-family: var(--sans); font-size: 13px; color: var(--ink-3); text-align: right; padding-right: 14px; }
.lg-y b { display: block; font-family: var(--kai); font-weight: 400; color: var(--ink-2); font-size: 14px; }
.lg-item { padding-left: 14px; font-size: 15.5px; }
.lg-item .cat { font-family: var(--sans); font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); padding: 0 5px; margin-right: 6px; border-radius: 2px; vertical-align: 2px; }
.lg-price { font-family: var(--kai); font-size: 21px; color: var(--zhu); white-space: nowrap; }
.lg-q { font-size: 13.5px; color: var(--ink-3); line-height: 1.75; }

.travel { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.tr-card { padding: 20px 22px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbf7ef; cursor: pointer; transition: background .2s; }
.tr-card:hover { background: #fffdf8; }
.tr-card .tr-y { font-family: var(--sans); font-size: 12px; color: var(--ink-3); letter-spacing: .1em; }
.tr-card .tr-mode { font-family: var(--kai); font-size: 22px; margin: 4px 0 8px; display: flex; align-items: center; gap: 10px; }
.tr-card svg { width: 44px; height: 28px; stroke: var(--ink); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tr-card.no svg { stroke: var(--zhu); }
.tr-card p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.8; }
.tr-card .by { font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }

.hair { position: relative; background: #fbf7ef; border: 1px solid var(--line); padding: 30px 26px 16px; }
.hair-axis { position: relative; height: 22px; margin-left: 180px; border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); }
.hair-axis span { position: absolute; transform: translateX(-50%); bottom: 4px; }
.hair-row { display: grid; grid-template-columns: 180px 1fr; align-items: center; min-height: 54px; border-bottom: 1px dotted var(--line); }
.hair-row .hr-name { font-family: var(--kai); font-size: 17px; line-height: 1.35; padding-right: 12px; }
.hair-row .hr-name small { display: block; font-family: var(--sans); font-size: 11px; color: var(--ink-3); }
.hair-track { position: relative; height: 54px; }
.hair-bar { position: absolute; top: 12px; height: 10px; background: var(--green); border-radius: 5px; opacity: .8; }
.hair-d { position: absolute; top: 26px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dress { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.dress div { background: #fbf7ef; border: 1px solid var(--line); padding: 14px 16px; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.dress b { display: block; font-family: var(--kai); font-weight: 400; font-size: 18px; color: var(--ink); margin-bottom: 4px; }

/* ---------- 谱系 ---------- */
.tree { display: grid; gap: 18px; }
.clan { border: 1px solid var(--line); background: #fbf7ef; padding: 22px 24px; position: relative; }
.clan h4 { position: absolute; top: -13px; left: 18px; margin: 0; background: var(--paper); padding: 0 10px; font-family: var(--kai); font-weight: 400; font-size: 18px; letter-spacing: .3em; color: var(--green-d); }
.gen { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; justify-content: center; position: relative; padding: 12px 0; }
.gen + .gen::before { content: ""; position: absolute; top: -2px; left: 50%; height: 14px; border-left: 1px solid var(--ink-3); }
.gen-label { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 11px; color: var(--ink-3); letter-spacing: .2em; writing-mode: vertical-rl; }
.pnode { border: 1px solid var(--ink-3); background: var(--paper); padding: 6px 12px 5px; text-align: center; min-width: 88px; cursor: pointer; transition: all .2s; }
.pnode:hover { border-color: var(--zhu); }
.pnode b { display: block; font-family: var(--kai); font-weight: 400; font-size: 17px; line-height: 1.4; }
.pnode small { font-family: var(--sans); font-size: 11px; color: var(--ink-3); display: block; line-height: 1.5; }
.pnode.dead { border-style: dashed; opacity: .6; }
.pnode.self { background: var(--zhu); border-color: var(--zhu); color: #fbf0e3; }
.pnode.self small { color: #f3d4c6; }
.pnode.hus { background: var(--green-d); border-color: var(--green-d); color: #f0eadb; }
.pnode.hus small { color: #cfd9c0; }
.pnode.par { background: var(--ink); border-color: var(--ink); color: #f0eadb; }
.pnode.par small { color: #c9bfae; }
.couple { display: flex; align-items: center; justify-content: center; gap: 0; padding: 16px 0 6px; }
.couple .knot { width: 46px; border-top: 3px double var(--zhu); position: relative; }
.couple .knot::after { content: "1875"; position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-family: var(--sans); font-size: 11px; color: var(--zhu); }

.kids { margin-top: 18px; border: 1px solid var(--line); background: #fbf7ef; padding: 28px 24px 18px; position: relative; }
.kids h4 { position: absolute; top: -13px; left: 18px; margin: 0; background: var(--paper); padding: 0 10px; font-family: var(--kai); font-weight: 400; font-size: 18px; letter-spacing: .3em; color: var(--zhu); }
.kids-svg { display: block; width: 100%; overflow: visible; font-family: var(--sans); }
.kids-note { font-size: 14px; color: var(--ink-2); margin: 10px 0 0; }
.kids-note b { font-weight: 400; color: var(--zhu); font-family: var(--kai); font-size: 18px; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; }
.pp { display: grid; grid-template-columns: 5.2em 1fr 2.2em; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dotted var(--line); cursor: pointer; font-size: 14px; }
.pp:hover .pp-n { color: var(--zhu); }
.pp-n { font-family: var(--kai); font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-bar { height: 6px; background: var(--paper-2); }
.pp-bar i { display: block; height: 100%; background: var(--ink-2); }
.pp.l .pp-bar i { background: var(--qing); }
.pp-c { font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); text-align: right; }

/* ---------- 页脚 ---------- */
.foot { text-align: center; padding: 80px 30px 60px; border-top: 1px solid var(--line); margin-top: 60px; font-size: 13.5px; color: var(--ink-2); font-family: var(--sans); }
.foot-quote { font-family: var(--kai); font-size: 28px; letter-spacing: .3em; color: var(--ink); margin-bottom: 24px; }
.foot p { margin: 6px auto; max-width: 640px; }
.foot-contact { scroll-margin-top: 90px; display: grid; grid-template-columns: 1fr 190px; gap: 32px; align-items: center; max-width: 720px; margin: 48px auto 0; padding: 28px 32px; text-align: left; border: 1px solid var(--line); background: rgba(251, 247, 239, .72); }
.contact-kicker { margin: 0 0 6px !important; color: var(--zhu); font: 11px/1.6 var(--sans); letter-spacing: .18em; }
.contact-copy h2 { margin: 0 0 8px; font: 400 26px/1.4 var(--kai); letter-spacing: .12em; color: var(--ink); }
.foot .contact-copy p:last-child { margin: 0; color: var(--ink-2); line-height: 1.9; }
.contact-qr { width: 190px; margin: 0; text-align: center; }
.contact-qr img { display: block; width: 100%; height: auto; padding: 8px; border: 1px solid var(--line); background: #fff; }
.contact-qr figcaption { margin-top: 8px; color: var(--ink-3); font-size: 12px; letter-spacing: .12em; }

/* ============ 读谱 ============ */
.reader { position: fixed; inset: 0; z-index: 80; background: var(--paper); display: flex; flex-direction: column; animation: fade .35s; }
.reader::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: inherit;
}
.rd-bar { display: flex; align-items: center; gap: 18px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: rgba(244, 237, 224, .95); font-family: var(--sans); font-size: 13px; position: relative; z-index: 2; flex-wrap: wrap; }
.rd-close { border: none; background: none; color: var(--ink-2); letter-spacing: .15em; padding: 4px 6px; }
.rd-close:hover { color: var(--zhu); }
.rd-parts { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.rd-parts button { border: none; background: none; padding: 4px 10px; color: var(--ink-3); white-space: nowrap; border-radius: 2px; font-family: var(--kai); font-size: 15px; }
.rd-parts button.on { color: var(--paper); background: var(--green-d); }
.rd-tools { display: flex; gap: 10px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.seg button { border: none; background: transparent; padding: 4px 10px; color: var(--ink-2); font-size: 13px; }
.seg button.on { background: var(--ink); color: var(--paper); }
.tool { border: 1px solid var(--line); background: transparent; padding: 3px 9px; border-radius: 2px; font-size: 13px; color: var(--ink-2); min-width: 32px; }
.tool.on { border-color: var(--zhu); color: var(--zhu); }
.rd-search { position: relative; }
.rd-search input { border: 1px solid var(--line); background: #fbf7ef; padding: 4px 10px; width: 150px; font: inherit; border-radius: 2px; color: var(--ink); }
.rd-search input:focus { outline: 1px solid var(--zhu); }
.rd-results { position: absolute; right: 0; top: 34px; width: 420px; max-height: 70vh; overflow-y: auto; background: #fbf7ef; border: 1px solid var(--line); box-shadow: 0 14px 30px -12px rgba(40, 30, 15, .4); z-index: 5; }
.rd-results .rr { padding: 10px 14px; border-bottom: 1px dotted var(--line); cursor: pointer; font-family: var(--serif); font-size: 14px; line-height: 1.7; }
.rd-results .rr:hover { background: #fffdf8; }
.rd-results .rr small { display: block; font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); }
.rd-results mark { background: rgba(178, 57, 42, .18); color: inherit; }
.rd-results .rr-none { padding: 14px; color: var(--ink-3); }

.rd-body { flex: 1; display: grid; grid-template-columns: 200px minmax(0, 1fr) 260px; min-height: 0; position: relative; z-index: 1; }
.rd-years { overflow-y: auto; border-right: 1px solid var(--line); padding: 10px 0 40px; font-family: var(--sans); font-size: 13px; scrollbar-width: thin; }
.ry-part { font-family: var(--kai); font-size: 14px; color: var(--green-d); padding: 14px 18px 4px; letter-spacing: .15em; }
.ry { display: flex; justify-content: space-between; gap: 8px; padding: 3px 18px 3px 22px; cursor: pointer; color: var(--ink-2); border-left: 2px solid transparent; }
.ry:hover { color: var(--zhu); }
.ry.on { color: var(--zhu); border-left-color: var(--zhu); background: rgba(178, 57, 42, .06); }
.ry b { font-family: var(--kai); font-weight: 400; font-size: 15px; }
.ry span { color: var(--ink-3); font-size: 11.5px; }
.ry .ry-len { display: inline-block; height: 3px; background: var(--line); vertical-align: middle; margin-left: 4px; }

.rd-main { overflow-y: auto; padding: 40px 56px 80px; scroll-behavior: smooth; }
.rd-margin { overflow-y: auto; border-left: 1px solid var(--line); padding: 30px 22px 40px; font-family: var(--sans); font-size: 13px; color: var(--ink-2); }

/* 横排页 */
.page { max-width: 760px; margin: 0 auto; }
.pg-head { display: flex; align-items: flex-end; gap: 18px; border-bottom: 1px solid var(--ink); padding-bottom: 12px; margin-bottom: 8px; }
.pg-gz { white-space: nowrap; font-family: var(--kai); font-size: 52px; line-height: 1; color: var(--ink); letter-spacing: .05em; }
.pg-meta { font-family: var(--kai); font-size: 19px; color: var(--ink-2); padding-bottom: 4px; }
.pg-meta em { font-style: normal; font-family: var(--sans); font-size: 13px; color: var(--zhu); margin-left: 10px; letter-spacing: .05em; }
.pg-place { margin-left: auto; font-family: var(--sans); font-size: 12px; padding: 3px 10px; color: #fff; border-radius: 2px; margin-bottom: 6px; white-space: nowrap; }
.pg-sub { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); margin-bottom: 26px; letter-spacing: .1em; }
.pg-sum { font-family: var(--sans); font-size: 14px; line-height: 1.9; color: var(--ink-2); background: rgba(77, 106, 56, .07); border-left: 3px solid var(--green); padding: 10px 16px; margin: 0 0 30px; }
.pg-sum::before { content: "白话导读　"; color: var(--green-d); font-weight: 600; letter-spacing: .1em; }
.txt { font-size: var(--fs); line-height: 2.1; text-align: justify; }
.txt p { margin: 0 0 1em; text-indent: 2em; }
.txt .by-author { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); text-indent: 0; margin-bottom: 18px; }

/* 敬空 */
.jk { display: inline-block; width: .5em; position: relative; }
.notes-on .jk::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: var(--zhu-l); }

/* 专名号与注释 */
.e { cursor: pointer; }
.notes-on .e-p, .notes-on .e-l { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .32em; text-decoration-color: rgba(31, 26, 22, .55); }
.notes-on .e-l { text-decoration-color: rgba(62, 107, 120, .8); }
.notes-on .e-t { text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: .32em; text-decoration-color: var(--zhu-l); }
.notes-on .e:hover { color: var(--zhu); }
.e.hit { background: rgba(178, 57, 42, .14); }
mark.q { background: rgba(178, 57, 42, .18); color: inherit; }

/* 功课单 */
.notice { margin: 1.4em auto 1.6em; max-width: 520px; border: 1px solid var(--ink-2); outline: 1px solid var(--ink-2); outline-offset: 4px; padding: 24px 30px 20px; background: #fbf7ef; font-family: var(--kai); }
.notice h5 { margin: 0 0 14px; text-align: center; font-weight: 400; font-size: 1.1em; letter-spacing: .6em; }
.notice table { width: 100%; border-collapse: collapse; font-size: .95em; }
.notice td { border-bottom: 1px solid var(--line); padding: 6px 4px; vertical-align: top; }
.notice td:first-child { white-space: nowrap; color: var(--ink-3); width: 6.5em; }
.notice td:last-child { color: var(--zhu); white-space: nowrap; text-align: right; }
.notice .motto { margin-top: 16px; text-align: center; font-size: 1.15em; letter-spacing: .25em; line-height: 1.9; }
.notice .date { text-align: right; font-size: .85em; color: var(--ink-3); margin-top: 10px; }
.notice .rule { font-size: .9em; line-height: 1.9; margin-top: 14px; text-indent: 2em; color: var(--ink-2); }
.poem { font-family: var(--kai); text-align: center; line-height: 2.2; margin: 1em 0 1.4em; text-indent: 0 !important; }

.pg-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--sans); font-size: 13px; }
.pg-nav button { border: none; background: none; color: var(--ink-2); text-align: left; padding: 0; max-width: 46%; }
.pg-nav button:last-child { text-align: right; }
.pg-nav button:hover { color: var(--zhu); }
.pg-nav b { display: block; font-family: var(--kai); font-weight: 400; font-size: 18px; color: var(--ink); }

/* 朱笔圈点（白文） */
.zhu .pc { display: inline-block; inline-size: 0; position: relative; color: transparent; overflow: visible; vertical-align: baseline; }
.zhu .pc > span { visibility: hidden; position: absolute; }
.zhu .pc.ju::after, .zhu .pc.dou::after { content: ""; position: absolute; border-radius: 50%; }
.zhu .pc.ju::after { width: .34em; height: .34em; border: 1.6px solid var(--zhu); left: -.2em; top: -.2em; }
.zhu .pc.dou::after { width: .2em; height: .2em; background: var(--zhu); left: -.13em; top: -.1em; }

/* 直排页 */
.vwrap { display: flex; justify-content: center; align-items: flex-start; height: 100%; }
.vbook { position: relative; border: 3px solid var(--ink); padding: 3px; background: #f8f1e3; box-shadow: 0 20px 50px -24px rgba(40, 30, 15, .5); max-width: 100%; }
.vframe { border: 1px solid var(--ink); display: flex; flex-direction: row-reverse; max-width: 100%; }
.vspine { width: 36px; border-left: 1px solid var(--ink); padding: 18px 0; font-family: var(--kai); color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 12px; background: #f3ead9; flex: none; }
.vspine span { writing-mode: vertical-rl; letter-spacing: .25em; font-size: 14px; }
.vspine .vs-gz { color: var(--zhu); font-size: 15px; }
.vspine .vs-pg { margin-top: auto; font-size: 12px; color: var(--ink-3); }
.vspine .fish { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 12px solid var(--ink); }
.vpage {
  writing-mode: vertical-rl;
  font-size: var(--fs);
  line-height: var(--lh);
  overflow-x: auto; overflow-y: hidden;
  padding: calc(var(--fs) * .6) 0;
  max-width: 100%;
  background-image: repeating-linear-gradient(to left, transparent 0 calc(var(--lh) - 1px), var(--zhu-l) calc(var(--lh) - 1px) var(--lh));
  background-attachment: local;
  background-position: right top;
  scrollbar-width: thin;
  text-align: justify;
}
.vpage p { margin: 0; text-indent: 2em; }
.vpage .v-h { font-family: var(--kai); font-weight: 700; margin: 0; text-indent: 0; color: var(--ink); white-space: nowrap; line-height: var(--lh); }
.vpage .v-h .fn-no { font-weight: 400; }
.vpage .v-sum { display: none; }
.notes-on .vpage .e-p, .notes-on .vpage .e-l, .notes-on .vpage .e-t { text-underline-position: left; text-underline-offset: .22em; }
.vpage .notice { writing-mode: vertical-rl; max-width: none; margin: 0; padding: 0; border: none; outline: none; background: transparent; font-family: var(--serif); }
.vpage .notice h5 { display: none; }
.vpage .notice .vrow { text-indent: 2em; }
.vpage .poem { text-align: start; margin: 0; }
.zhu .vpage .pc.ju::after { left: .55em; top: -.25em; }
.zhu .vpage .pc.dou::after { left: .62em; top: -.18em; }
.vhint { text-align: center; font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-top: 14px; letter-spacing: .15em; }

/* 页边 */
.mg-block { margin-bottom: 26px; }
.mg-block h6 { margin: 0 0 8px; font-size: 11.5px; letter-spacing: .3em; color: var(--ink-3); font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.mg-kv { display: grid; grid-template-columns: 3em 1fr; gap: 3px 10px; font-size: 13px; }
.mg-kv dt { color: var(--ink-3); }
.mg-kv dd { margin: 0; font-family: var(--serif); font-size: 14px; }
.fam { list-style: none; padding: 0; margin: 0; }
.fam li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; font-family: var(--serif); font-size: 14px; line-height: 1.6; }
.fam i { flex: none; width: 9px; height: 9px; display: inline-block; transform: translateY(1px); }
.mk-b { background: var(--green); border-radius: 50%; }
.mk-d { background: var(--ink); border-radius: 50%; }
.mk-w { border: 2px solid var(--zhu); border-radius: 50%; }
.mk-m { border-left: 8px solid var(--qing); border-top: 5px solid transparent; border-bottom: 5px solid transparent; width: 0 !important; height: 0 !important; }
.mk-k { background: var(--zhe); transform: rotate(45deg) translateY(1px) !important; width: 8px !important; height: 8px !important; }
.mg-hist { font-family: var(--serif); font-size: 14px; color: var(--qing); line-height: 1.7; }
.ents { display: flex; flex-wrap: wrap; gap: 6px; }
.ent { border: 1px solid var(--line); background: #fbf7ef; padding: 1px 8px; font-family: var(--kai); font-size: 14px; border-radius: 2px; cursor: pointer; }
.ent:hover { border-color: var(--zhu); color: var(--zhu); }
.ent.l { color: var(--qing); }
.ent.t { color: var(--zhe); }
.mg-mini { width: 100%; display: block; }
.mg-mini .prov { fill: #eee5d2; stroke: #d3c4a6; stroke-width: 2; }
.mg-mini .dot { fill: var(--ink-3); }
.mg-mini .dot.now { fill: var(--zhu); }

/* 注释卡 */
.pop { position: fixed; z-index: 120; width: 320px; background: #fbf7ef; border: 1px solid var(--ink-2); box-shadow: 0 18px 40px -14px rgba(40, 30, 15, .5); padding: 16px 18px 14px; font-size: 14px; line-height: 1.8; }
.pop::before { content: ""; position: absolute; inset: 3px; border: 1px solid var(--line); pointer-events: none; }
.pop .p-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pop .p-name { font-family: var(--kai); font-size: 24px; }
.pop .p-life { font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.pop .p-type { margin-left: auto; font-family: var(--sans); font-size: 11px; color: #fff; background: var(--ink-2); padding: 0 6px; border-radius: 2px; }
.pop .p-type.l { background: var(--qing); }
.pop .p-type.t { background: var(--zhe); }
.pop .p-alias { font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); margin: 2px 0 8px; }
.pop .p-g { margin: 0 0 10px; color: var(--ink-2); }
.pop .p-yrs { font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: 8px; }
.pop .p-yrs span { display: inline-block; margin: 3px 4px 0 0; padding: 0 6px; border: 1px solid var(--line); cursor: pointer; color: var(--ink-2); border-radius: 2px; }
.pop .p-yrs span:hover, .pop .p-yrs span.cur { border-color: var(--zhu); color: var(--zhu); }
.pop .p-x { position: absolute; right: 10px; top: 6px; border: none; background: none; color: var(--ink-3); font-size: 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 300px auto; }
  .hero-text { grid-column: 1 / -1; }
  .rd-body { grid-template-columns: 170px minmax(0, 1fr); }
  .rd-margin { display: none; }
}
@media (max-width: 820px) {
  .topnav { padding: 8px 16px; }
  .navlinks { gap: 12px; }
  .navlinks a:not(.nav-read) { display: none; }
  .hero { padding: 80px 22px 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; justify-items: center; }
  .hero-cover { max-width: 260px; }
  .hero-title { order: -1; }
  .vtitle { font-size: 44px; }
  .vsub { margin-top: 60px; }
  .seal { display: none; }
  .sec { padding: 70px 20px 40px; }
  .who-grid, .map-grid { grid-template-columns: 1fr; gap: 30px; }
  .who-photo { position: static; max-width: 300px; margin: 0 auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(n) { border-right: none; padding-left: 8px; }
  .lg-row { grid-template-columns: 70px 1fr; }
  .lg-q { grid-column: 1 / -1; padding-left: 14px; }
  .ledger { background: #fbf7ef; }
  .hair-axis { margin-left: 100px; }
  .hair-row { grid-template-columns: 100px 1fr; }
  .rd-body { grid-template-columns: 1fr; }
  .rd-years { display: none; }
  .rd-main { padding: 24px 18px 60px; }
  .rd-tools { flex-wrap: wrap; }
  .rd-search input { width: 110px; }
  .rd-results { width: 86vw; }
  .pg-gz { font-size: 40px; }
  .foot-contact { grid-template-columns: 1fr; justify-items: center; gap: 20px; padding: 24px 20px; text-align: center; }
  .contact-qr { width: min(190px, 58vw); }
}

/* ============ 第二版：三维、图录、影印 ============ */
/* 卷首 3D 书 */
.hero-book { transform: none !important; }
.book3d { position: relative; width: 100%; aspect-ratio: 0.72; cursor: pointer; }
.book3d canvas { position: absolute; inset: -12% -40% -8% -40%; width: 180% !important; height: 120% !important; display: block; }
.book3d.live .book-fallback { visibility: hidden; }
.book-fallback { width: 100%; display: block; box-shadow: 0 24px 50px -12px rgba(40, 30, 15, .45); transform: rotate(-2deg); }
.book3d.opening { cursor: default; }
.hero-inner { position: relative; z-index: 2; }

/* 像 */
.pt-frame { background: #fbf7ef; border: 10px solid #fbf7ef; box-shadow: 0 18px 40px -16px rgba(40, 30, 15, .4); aspect-ratio: 0.66; overflow: hidden; position: relative; }
.pt-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; filter: sepia(.3) contrast(1.03); transition: opacity .35s; }
.pt-ages { position: relative; display: flex; justify-content: space-between; margin: 18px 4px 0; }
.pt-line { position: absolute; left: 22px; right: 22px; top: 22px; border-top: 1px solid var(--line); }
.pt-ages button { position: relative; border: none; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.pt-ages .pt-face { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; filter: sepia(.45) grayscale(.2); border: 2px solid #fbf7ef; box-shadow: 0 0 0 1px var(--line); transition: transform .2s, box-shadow .2s, filter .2s; }
.pt-ages button:hover .pt-face { transform: scale(1.12); filter: sepia(.2); }
.pt-ages button.on .pt-face { box-shadow: 0 0 0 2px var(--zhu); filter: none; transform: scale(1.12); }
.pt-ages span { font-family: var(--kai); font-size: 13px; color: var(--ink-3); }
.pt-ages button.on span { color: var(--zhu); }
.who-photo figcaption#ptCap { text-align: left; letter-spacing: .05em; font-size: 12.5px; cursor: pointer; line-height: 1.7; margin-top: 14px; }
#ptCap b { font-family: var(--kai); font-weight: 400; font-size: 19px; color: var(--ink); margin-right: 10px; letter-spacing: .1em; }
#ptCap .pt-ctx { display: block; font-family: var(--serif); font-size: 14px; color: var(--ink-2); margin-top: 6px; letter-spacing: 0; }
#ptCap:hover .pt-ctx { color: var(--zhu); }

/* 立体舆图 */
.map-box { overflow: hidden; }
.map3d { position: relative; width: 100%; aspect-ratio: 0.86; max-height: calc(100vh - 120px); cursor: grab; background: radial-gradient(ellipse at 50% 40%, #f3ead8, #e4d8c0); }
.map3d:active { cursor: grabbing; }
.map3d canvas { display: block; width: 100% !important; height: 100% !important; }
.m3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.m3-label { position: absolute; left: 0; top: 0; font-family: var(--kai); font-size: 17px; color: var(--ink); white-space: nowrap; text-shadow: 0 0 3px #f6eedd, 0 0 6px #f6eedd, 0 0 2px #f6eedd; pointer-events: auto; cursor: pointer; padding-bottom: 4px; }
.m3-label.pass { font-size: 13px; color: var(--ink-3); }
.m3-label.now { color: var(--zhu); font-size: 20px; }
.map-mode { position: absolute; right: 10px; top: 10px; background: rgba(251, 247, 239, .9); font-family: var(--sans); }
.map-svg .bg { pointer-events: none; }
.map-svg.painted .prov { fill: none; stroke: rgba(120, 95, 60, .25); }
.map-svg.painted .river, .map-svg.painted .canal, .map-svg.painted .lake, .map-svg.painted .prov-label { display: none; }

/* 图录 */
.album-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; font-family: var(--sans); flex-wrap: wrap; }
.album-note { font-size: 12.5px; color: var(--ink-3); }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 22px; }
.al-card { cursor: pointer; }
.al-img { position: relative; aspect-ratio: 0.8; overflow: hidden; background: #fbf7ef; box-shadow: 0 10px 26px -14px rgba(40, 30, 15, .45); }
.al-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s, transform .6s; }
.al-img .al-yuan { opacity: 0; }
.al-card:hover .al-img .al-yuan { opacity: 1; }
.al-card:hover .al-img img { transform: scale(1.02); }
.al-img .al-no { position: absolute; left: 8px; top: 8px; z-index: 2; font-family: var(--sans); font-size: 11px; background: rgba(251, 247, 239, .9); padding: 0 6px; color: var(--ink-3); border-radius: 2px; }
.al-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 10px; }
.al-cap b { font-family: var(--kai); font-weight: 400; font-size: 17px; }
.al-cap span { font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.family-photo { margin: 0; }
.family-photo img { width: 100%; display: block; filter: sepia(.25); border: 10px solid #fbf7ef; box-shadow: 0 18px 40px -16px rgba(40, 30, 15, .4); }
.family-photo figcaption { font-family: var(--sans); font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 10px; letter-spacing: .2em; }

/* 大图对照 */
.lightbox { position: fixed; inset: 0; z-index: 110; background: rgba(30, 24, 18, .88); display: flex; align-items: center; justify-content: center; animation: fade .3s; }
.lb-body { display: flex; gap: 28px; align-items: center; max-width: 92vw; max-height: 90vh; }
.cmp { position: relative; height: min(84vh, 900px); aspect-ratio: 0.8; overflow: hidden; background: #fbf7ef; user-select: none; touch-action: none; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp-b { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--zhu); cursor: ew-resize; }
.cmp-handle::before { content: ""; position: absolute; inset: 0 -14px; }
.cmp-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; background: var(--zhu); color: #fbf0e3; font-family: var(--sans); font-size: 12px; padding: 4px 10px; border-radius: 12px; }
.lb-side { width: 260px; color: #efe6d4; font-family: var(--sans); font-size: 13.5px; line-height: 1.9; }
.lb-side h3 { font-family: var(--kai); font-weight: 400; font-size: 28px; margin: 0 0 6px; color: #fbf4e6; letter-spacing: .1em; }
.lb-side .lb-meta { color: #b9ab93; font-size: 12px; margin-bottom: 14px; }
.lb-side blockquote { margin: 12px 0; padding-left: 12px; border-left: 2px solid var(--zhu); font-family: var(--serif); font-size: 14.5px; color: #e6dcc8; }
.lb-side .seg { border-color: #6d6050; margin: 10px 0 14px; }
.lb-side .seg button { color: #d9ccb4; }
.lb-side .seg button.on { background: #efe6d4; color: var(--ink); }
.lb-side a { color: #f0a08f; cursor: pointer; text-decoration: none; }
.lb-x { position: absolute; top: 16px; right: 22px; border: none; background: none; color: #efe6d4; font-size: 22px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); border: none; background: none; color: #efe6d4; font-size: 54px; line-height: 1; padding: 10px; opacity: .7; }
.lb-nav:hover { opacity: 1; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }

/* 阅读器内插图 */
.pg-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 0 0 30px; }
.pg-fig { margin: 0; cursor: pointer; }
.pg-fig img { width: 100%; display: block; aspect-ratio: 0.8; object-fit: cover; box-shadow: 0 8px 22px -12px rgba(40, 30, 15, .45); }
.pg-fig.pt img { aspect-ratio: 0.7; object-position: center 25%; filter: sepia(.3); }
.pg-fig figcaption { font-family: var(--kai); font-size: 15px; margin-top: 6px; color: var(--ink-2); }
.pg-fig figcaption small { font-family: var(--sans); font-size: 11px; color: var(--ink-3); margin-left: 6px; }

/* 影印 */
.fac { max-width: 1100px; margin: 0 auto; text-align: center; }
.fac-top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }
.fac-top b { font-family: var(--kai); font-weight: 400; font-size: 22px; color: var(--ink); margin-right: 10px; }
.fac-view { position: relative; display: inline-block; max-width: 100%; }
.fac-view img { display: block; max-width: 100%; max-height: calc(100vh - 210px); box-shadow: 0 20px 50px -24px rgba(40, 30, 15, .55); }
.fac-mark { position: absolute; top: 0; bottom: 0; width: 50%; border-top: 3px solid var(--zhu); pointer-events: none; }
.fac-mark.R { right: 0; } .fac-mark.L { left: 0; }
.fac-mark span { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-family: var(--sans); font-size: 11.5px; color: var(--zhu); white-space: nowrap; }
.fac-nav { display: flex; justify-content: center; gap: 18px; margin-top: 16px; font-family: var(--sans); font-size: 13px; }
.fac-nav button { border: 1px solid var(--line); background: #fbf7ef; padding: 4px 14px; border-radius: 2px; color: var(--ink-2); }
.fac-nav button:hover { border-color: var(--zhu); color: var(--zhu); }
.fac-nav span { color: var(--ink-3); align-self: center; }

/* 车船、发髻、页脚 */
.tr-card .tr-pic { height: 110px; display: flex; align-items: flex-end; justify-content: center; margin: 4px 0 10px; }
.tr-card .tr-pic img { max-height: 100%; max-width: 88%; display: block; }
.tr-card.no .tr-pic img { filter: grayscale(.6); opacity: .65; }
.tr-card.no .tr-pic { position: relative; }
.tr-card.no .tr-pic::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; border-top: 2px solid var(--zhu); transform: rotate(-14deg); }
.tr-card .tr-mode { margin-top: 0; }
.hair-orig { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 32px; align-items: start; margin-bottom: 30px; }
.hair-orig figure { margin: 0; }
.hair-orig img { width: 100%; display: block; border: 8px solid #fbf7ef; box-shadow: 0 14px 32px -16px rgba(40, 30, 15, .45); }
.hair-orig h4 { font-family: var(--kai); font-weight: 400; font-size: 22px; margin: 0 0 8px; letter-spacing: .15em; }
.hair-orig p { font-size: 15px; color: var(--ink-2); margin: 0 0 10px; }
.hair-orig ul { margin: 0 0 10px; padding-left: 0; list-style: none; font-size: 14.5px; line-height: 1.9; color: var(--ink-2); }
.hair-orig li { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.hair-orig li b { font-family: var(--kai); font-weight: 400; font-size: 17px; color: var(--ink); }
.foot-copy { margin: 0 auto 40px; width: 200px; }
.foot-copy img { width: 100%; display: block; transform: rotate(-2deg); box-shadow: 0 16px 34px -14px rgba(40, 30, 15, .45); }
.foot-copy figcaption { font-size: 12px; color: var(--ink-3); margin-top: 12px; letter-spacing: .15em; }

@media (max-width: 820px) {
  .book3d canvas { inset: -8% -30% -6% -30%; width: 160% !important; }
  .hair-orig { grid-template-columns: 1fr; }
  .lb-body { flex-direction: column; overflow-y: auto; padding: 50px 0 20px; }
  .cmp { height: auto; width: 88vw; }
  .lb-side { width: 88vw; }
  .lb-nav { top: auto; bottom: 10px; transform: none; }
  .map3d { aspect-ratio: 0.8; }
}
.hero-title, .hero-text, .hero-book figcaption { transition: opacity .5s; }
.book-opening .hero-title, .book-opening .hero-text, .book-opening .hero-book figcaption { opacity: 0; }
.book-opening .hero-book { z-index: 5; position: relative; }

/* 家注 */
.fn { cursor: pointer; text-decoration: underline double; text-decoration-color: var(--zhu); text-underline-offset: .3em; text-decoration-thickness: 1px; }
.fn:hover { background: rgba(178, 57, 42, .08); }
.fn-no { color: var(--zhu); font-family: var(--sans); font-size: .55em; cursor: pointer; margin: 0 1px; vertical-align: .7em; line-height: 0; font-weight: 600; }
.vpage .fn { text-underline-position: left; }
.vpage .fn-no { vertical-align: baseline; font-size: .6em; text-combine-upright: none; }
.zhu .fn-no { color: var(--zhu); }
.fnotes { margin-top: 40px; padding: 20px 24px 8px; border-top: 2px solid var(--zhu); background: rgba(178, 57, 42, .035); }
.fnotes h4 { margin: 0 0 12px; font-family: var(--kai); font-weight: 400; font-size: 20px; letter-spacing: .4em; color: var(--zhu); }
.fnotes h4::after { content: "　家人所注"; font-family: var(--sans); font-size: 11.5px; letter-spacing: .1em; color: var(--ink-3); }
.fnotes ol { list-style: none; padding: 0; margin: 0; }
.fnotes li { padding: 10px 0 10px 3em; position: relative; border-bottom: 1px dotted var(--line); font-size: 15px; line-height: 1.95; color: var(--ink-2); cursor: default; }
.fnotes li:last-child { border-bottom: none; }
.fnotes .fl-no { position: absolute; left: 0; top: 10px; color: var(--zhu); font-family: var(--kai); }
.fnotes li b { font-family: var(--kai); font-weight: 400; font-size: 17px; color: var(--ink); display: block; }
.fnotes li p { margin: 2px 0; }
.mg-notes { margin-top: 0; padding: 12px 12px 4px; }
.mg-notes h4 { font-size: 16px; }
.mg-notes li { padding-left: 2.4em; font-size: 13px; font-family: var(--serif); cursor: pointer; }
.mg-notes li b { font-size: 15px; }
.ry .ry-note { font-style: normal; font-family: var(--kai); font-size: 11px; color: #fbf0e3; background: var(--zhu); padding: 0 3px; margin-left: 4px; border-radius: 2px; }
.pop .p-type.n { background: var(--zhu); }

/* ============ 行迹 · 第三版 ============ */
.trip-stage { position: relative; height: min(76vh, 720px); min-height: 520px; border: 1px solid var(--line); background: #e9ddc4; overflow: hidden; }
.trip-stage .map3d { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; max-height: none; }
.trip-stage .map3d::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(80, 60, 30, .28); }
.trip-stage .map-svg { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; }
.trip-card { position: absolute; left: 22px; top: 22px; width: 340px; max-height: calc(100% - 44px); overflow-y: auto; z-index: 3;
  background: rgba(251, 247, 239, .94); backdrop-filter: blur(6px); border: 1px solid var(--line); box-shadow: 0 16px 36px -18px rgba(40, 30, 15, .5); padding: 18px 20px 16px; }
.tc-top { display: flex; justify-content: space-between; gap: 8px; font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); }
.tc-step { color: var(--zhu); letter-spacing: .1em; }
.tc-gz { font-family: var(--kai); font-size: 40px; line-height: 1.2; color: var(--ink); margin-top: 6px; }
.tc-route { font-family: var(--kai); font-size: 20px; color: var(--zhu); margin: 2px 0 8px; }
.tc-route small { font-size: 14px; color: var(--ink-3); }
.trip-card p { margin: 0 0 14px; font-size: 15px; line-height: 1.9; color: var(--ink-2); }
.tc-ctrl { display: flex; gap: 6px; font-family: var(--sans); }
.tc-ctrl button { flex: 1; border: 1px solid var(--line); background: #fffdf8; padding: 6px 4px; font-size: 13px; color: var(--ink-2); border-radius: 2px; }
.tc-ctrl button:hover:not(:disabled) { border-color: var(--zhu); color: var(--zhu); }
.tc-ctrl button:disabled { opacity: .35; cursor: default; }
.tc-ctrl .tc-auto.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.trip-card a { display: inline-block; margin-top: 10px; font-family: var(--sans); font-size: 12.5px; color: var(--zhu); cursor: pointer; }
.tc-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--zhu); transform-origin: left; transform: scaleX(0); }
.trip-tools { position: absolute; right: 14px; top: 14px; z-index: 3; display: flex; gap: 8px; font-family: var(--sans); }
.trip-tools .seg, .trip-all { background: rgba(251, 247, 239, .92); }
.trip-all { border: 1px solid var(--line); padding: 4px 12px; font-size: 13px; border-radius: 2px; color: var(--ink-2); }
.trip-all:hover { color: var(--zhu); border-color: var(--zhu); }
.trip-band { margin-top: 14px; }
.tb-row { position: relative; display: flex; height: 30px; cursor: pointer; }
.tb-seg { border: none; padding: 0; height: 100%; color: #fbf4e8; font-family: var(--kai); font-size: 13px; overflow: hidden; white-space: nowrap; border-right: 1px solid var(--paper); opacity: .82; transition: opacity .2s; }
.tb-seg:hover { opacity: 1; }
.tb-cur { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; background: var(--zhu); box-shadow: 0 0 0 2px var(--paper); transition: left .5s; pointer-events: none; }
.tb-axis { position: relative; height: 18px; font-family: var(--sans); font-size: 11px; color: var(--ink-3); }
.tb-axis span { position: absolute; top: 3px; transform: translateX(-50%); }
.trip-stage + .trip-band + .map-note { position: static; margin-top: 4px; }
@media (max-width: 820px) {
  .trip-stage { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .trip-stage .map3d, .trip-stage .map-svg { position: relative; height: 60vh; }
  .trip-card { position: relative; left: 0; top: 0; width: auto; max-height: none; box-shadow: none; border: none; border-top: 1px solid var(--line); order: 2; }
}
