/* 中国传统文化在 Web3 复兴的可能性 · 可视化演讲
   纸色底，三种油墨：朱（中华传统）、墨（西方现代）、青（区块链新大陆），另有一点金（比特币）。 */
:root {
	--paper: #f2ede2;
	--paper-hi: #faf7f0;
	--paper-lo: #e5ddcc;
	--bone: #eadfc6;
	--ink: #1d1b18;
	--ink-2: #4c463d;
	--ink-3: #8b8273;
	--rule: rgba(29, 27, 24, .13);
	--zhu: #d13f28;
	--zhu-soft: #f3c9bb;
	--qing: #2849b8;
	--qing-soft: #c9d2f2;
	--jin: #b98118;
	--jin-soft: #efdcae;
	--mo: #2e2b27;
	--serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
	--grot: 'Space Grotesk', 'Noto Serif SC', system-ui, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .1 0 0 0 0 .09 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
	--pad: clamp(16px, 2.4vw, 36px);
	--cap: 18px;
	color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
	background: var(--paper) var(--grain);
	color: var(--ink);
	font: 400 16px/1.7 var(--serif);
	-webkit-font-smoothing: antialiased;
	overflow: hidden;
	overscroll-behavior: none;
	-webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--qing); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.grot { font-family: var(--grot); }
.zhu { color: var(--zhu); }
.qing { color: var(--qing); }
.jin { color: var(--jin); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 小部件 ---------- */
.chip {
	display: inline-flex; align-items: center; gap: 6px;
	height: 34px; padding: 0 14px;
	border: 1px solid var(--rule); border-radius: 999px;
	background: rgba(250, 247, 240, .82);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	font-size: 14px; line-height: 1; white-space: nowrap;
	transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.chip:hover { border-color: rgba(29, 27, 24, .35); background: var(--paper-hi); }
.chip:active { transform: translateY(1px); }
.chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chip--ink { background: var(--ink); color: var(--paper-hi); border-color: var(--ink); }
.chip--ink:hover { background: #000; color: #fff; }
.chip--zhu { background: var(--zhu); color: #fff; border-color: var(--zhu); }
.chip--zhu:hover { background: #b8321d; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper-hi); border-color: var(--ink); }
.chip--icon { width: 34px; padding: 0; justify-content: center; }
.kbd { display: inline-block; min-width: 1.7em; padding: 1px 6px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px; font: 500 12px/1.5 var(--mono); text-align: center; background: var(--paper-hi); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--rule); border-radius: 999px; background: rgba(250, 247, 240, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: none; font-size: 13.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper-hi); }

/* ---------- 总图 ---------- */
.atlas { position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.atlas.is-drag { cursor: grabbing; }
.atlas svg.atlas-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.atlas .nodes { position: absolute; inset: 0; pointer-events: none; }
.atlas-head {
	position: absolute; left: var(--pad); top: calc(var(--pad) - 4px); z-index: 3; pointer-events: none;
	max-width: min(560px, 60vw);
}
.atlas-head .eyebrow { margin: 0 0 10px; font: 500 12px/1.4 var(--grot); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.atlas-head .eyebrow b { color: var(--zhu); font-weight: 700; }
.atlas-head::before { content: ''; position: absolute; left: -60px; top: -50px; right: -90px; bottom: -40px; z-index: -1; background: radial-gradient(closest-side, rgba(242,237,226,.94) 55%, rgba(242,237,226,0)); }
.atlas-head h1 { margin: 0; font-weight: 900; font-size: clamp(26px, 3.1vw, 44px); line-height: 1.12; letter-spacing: .01em; position: relative; }
.atlas-head h1 .ov { position: absolute; left: 0; top: 0; color: var(--qing); mix-blend-mode: multiply; opacity: .0; transform: translate(2px, 1px); transition: opacity .6s, transform .6s; }
.atlas.is-in .atlas-head h1 .ov { opacity: .26; transform: translate(3px, 2px); }
.atlas-head .sub { margin: 12px 0 0; font-size: 15px; color: var(--ink-2); max-width: 30em; }
.atlas-ctl { position: absolute; right: var(--pad); top: var(--pad); z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.atlas-ctl .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.route-note { font-size: 13px; color: var(--ink-3); min-height: 1.5em; text-align: right; }
.atlas-legend { position: absolute; left: var(--pad); bottom: var(--pad); z-index: 3; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); pointer-events: none; }
.atlas-legend .lg { display: flex; gap: 16px; flex-wrap: wrap; }
.atlas-legend .lg span { display: inline-flex; align-items: center; gap: 7px; }
.atlas-legend .lg i { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.atlas-legend .hint { color: var(--ink-3); font-size: 12.5px; }
.compass { position: absolute; right: var(--pad); bottom: calc(var(--pad) + 44px); z-index: 3; width: 92px; height: 92px; border: 0; padding: 0; background: none; }
.compass svg { width: 100%; height: 100%; overflow: visible; }
.compass:hover svg .needle { transform: rotate(20deg); }
.compass svg .needle { transition: transform .8s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50px 50px; }
.zoom-ctl { position: absolute; right: var(--pad); bottom: var(--pad); z-index: 3; display: flex; gap: 6px; }

/* 岛（场景节点） */
.node {
	position: absolute; left: 0; top: 0; pointer-events: auto;
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	transform: translate(-50%, -24px);
	border: 0; background: none; padding: 0; color: var(--ink);
	transition: opacity .35s;
}
.node .mk {
	position: relative; width: 48px; height: 48px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--paper-hi); border: 1.5px solid var(--ink);
	box-shadow: 3px 3px 0 var(--ink-c, var(--ink));
	transition: transform .25s cubic-bezier(.3, 1.5, .5, 1), box-shadow .25s, background .25s;
}
.node .mk svg { width: 24px; height: 24px; fill: none; stroke: var(--ink-c, var(--ink)); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s; }
.node .no { position: absolute; top: -9px; right: -11px; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink-c, var(--ink)); color: #fff; font: 700 11px/20px var(--grot); text-align: center; letter-spacing: .02em; }
.node .lb { font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; padding: 2px 8px; border-radius: 4px; background: rgba(242, 237, 226, .86); }
.node .ord { position: absolute; left: -13px; top: -9px; width: 22px; height: 20px; border-radius: 10px; background: var(--paper-hi); border: 1.5px solid var(--route-c, var(--ink)); color: var(--route-c, var(--ink)); font: 700 11px/17px var(--grot); text-align: center; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .3s; }
.atlas.has-route .node.in-route .ord { opacity: 1; transform: none; }
.node:hover .mk, .node:focus-visible .mk { transform: translateY(-3px) rotate(-4deg); box-shadow: 5px 6px 0 var(--ink-c, var(--ink)); }
.node:hover .mk svg { transform: scale(1.12); }
.node.is-visited .mk { background: var(--ink-c-soft, var(--paper-lo)); }
.node.is-current .mk { background: var(--ink-c, var(--ink)); }
.node.is-current .mk svg { stroke: #fff; }
.node.is-current::after { content: ''; position: absolute; left: 50%; top: -30px; width: 0; height: 0; border: 8px solid transparent; border-top: 11px solid var(--zhu); transform: translateX(-50%); animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -5px); } }
.atlas.has-route .node:not(.in-route) { opacity: .32; }
/* 首次打开：岛一座座浮出来，路线缓缓流动 */
.atlas .node .mk { animation: mkIn .7s cubic-bezier(.3,1.6,.5,1) backwards; animation-delay: calc(var(--i, 0) * 55ms + .25s); }
.atlas .node .lb { animation: lbIn .6s ease backwards; animation-delay: calc(var(--i, 0) * 55ms + .45s); }
@keyframes mkIn { from { opacity: 0; transform: scale(.3) rotate(-30deg); } }
@keyframes lbIn { from { opacity: 0; transform: translateY(6px); } }
.atlas .rt { animation: rtFlow 2.4s linear infinite; }
@keyframes rtFlow { to { stroke-dashoffset: -18; } }
body.in-scene .atlas .rt { animation-play-state: paused; }
body.present .toast { top: 18px; bottom: auto; }
.node[data-ink="zhu"] { --ink-c: var(--zhu); --ink-c-soft: var(--zhu-soft); }
.node[data-ink="qing"] { --ink-c: var(--qing); --ink-c-soft: var(--qing-soft); }
.node[data-ink="mo"] { --ink-c: var(--mo); --ink-c-soft: var(--paper-lo); }
.node[data-ink="sea"] { --ink-c: var(--jin); --ink-c-soft: var(--jin-soft); }
.node .tip { position: absolute; top: 74px; left: 50%; transform: translate(-50%, 4px); width: max-content; max-width: 230px; padding: 8px 11px; border-radius: 6px; background: var(--ink); color: var(--paper-hi); font-size: 13px; line-height: 1.55; text-align: left; white-space: normal; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 2; }
.node:hover .tip, .node:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .node .tip { display: none; } }

/* 竖屏的总图：图标在左、名字在右 */
.atlas.is-portrait .node { flex-direction: row; gap: 7px; transform: translate(-21px, -21px); }
.atlas.is-portrait .node .mk { width: 42px; height: 42px; box-shadow: 2px 2px 0 var(--ink-c, var(--ink)); }
.atlas.is-portrait .node .mk svg { width: 20px; height: 20px; }
.atlas.is-portrait .node .no { top: -8px; right: -9px; min-width: 19px; height: 17px; font-size: 10px; line-height: 17px; }
.atlas.is-portrait .node .lb { font-size: 13.5px; padding: 1px 5px; }
.atlas.is-portrait .node.is-current::after { left: 21px; top: -26px; }
.atlas.is-portrait .node .ord { left: -10px; }

/* ---------- 幕 ---------- */
.stage { position: fixed; inset: 0; z-index: 10; background: var(--paper) var(--grain); overflow: hidden; -webkit-user-select: none; user-select: none; }
.stage .sc-cap .line { -webkit-user-select: text; user-select: text; }
.atlas { -webkit-user-select: none; user-select: none; }
.stage.anim-in { animation: reveal .75s cubic-bezier(.7, 0, .2, 1) both; }
.stage.anim-out { animation: reveal .55s cubic-bezier(.7, 0, .2, 1) reverse both; }
@keyframes reveal { from { clip-path: circle(0 at var(--ox, 50%) var(--oy, 50%)); } to { clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%)); } }
.scene-host { position: absolute; inset: 0; }
.scene { position: absolute; inset: 0; }
.scene.sw-in-next { animation: swInN .6s cubic-bezier(.3, .8, .2, 1) both; }
.scene.sw-in-prev { animation: swInP .6s cubic-bezier(.3, .8, .2, 1) both; }
.scene.sw-out { animation: swOut .45s ease both; pointer-events: none; }
@keyframes swInN { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes swInP { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@keyframes swOut { to { opacity: 0; } }

.sc-head { position: absolute; left: var(--pad); top: calc(var(--pad) - 6px); z-index: 5; max-width: min(760px, 58vw); pointer-events: none; }
.sc-head .no { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font: 700 13px/1 var(--grot); letter-spacing: .12em; color: var(--zhu); }
.sc-head .no em { font-style: normal; color: var(--ink-3); font-weight: 500; letter-spacing: .06em; }
.sc-head h2 { margin: 0; font-weight: 900; font-size: clamp(28px, 3.3vw, 48px); line-height: 1.12; letter-spacing: .01em; }
.sc-head .kicker { margin: 10px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 36em; }
.sc-head .kicker q { quotes: '「' '」'; }
.sc-head .kicker q::before, .sc-head .kicker q::after { color: var(--zhu); }

.sc-nav { position: absolute; right: var(--pad); top: var(--pad); z-index: 6; display: flex; gap: 8px; }
.sc-cap {
	position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--pad) - 4px); z-index: 5;
	display: flex; align-items: flex-end; gap: 18px; pointer-events: none;
}
.sc-cap .txt { flex: 1; max-width: 900px; pointer-events: auto; }
.sc-cap .line {
	margin: 0; font-size: var(--cap); line-height: 1.6; font-weight: 600;
	padding: 10px 16px 11px; border-radius: 6px; background: rgba(250, 247, 240, .88);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	box-shadow: 0 1px 0 var(--rule), 0 10px 30px -18px rgba(0, 0, 0, .35);
	display: inline-block;
}
.sc-cap .line.is-q::before { content: '「'; color: var(--zhu); }
.sc-cap .line.is-q::after { content: '」'; color: var(--zhu); }
.sc-cap .src { display: inline-block; margin: 6px 0 0 4px; font-size: 12.5px; color: var(--ink-3); border: 0; background: none; padding: 0; pointer-events: auto; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.sc-cap .src:hover { color: var(--ink); }
.sc-cap .line.fade { animation: capIn .45s ease both; }
@keyframes capIn { from { opacity: 0; transform: translateY(8px); } }
.steps { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.steps button { width: 26px; height: 26px; border: 0; padding: 0; background: none; display: grid; place-items: center; }
.steps button i { width: 8px; height: 8px; border-radius: 2px; background: var(--ink-3); opacity: .45; transition: all .3s; display: block; transform: rotate(45deg); }
.steps button[aria-current="true"] i { background: var(--zhu); opacity: 1; transform: rotate(45deg) scale(1.35); }
.steps .pn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--rule); background: rgba(250, 247, 240, .9); }
.steps .pn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.steps .pn:hover { border-color: var(--ink); }
.steps .pn:disabled { opacity: .3; cursor: default; border-color: var(--rule); }
.steps .pn .pl { display: none; }
.steps .pn svg { flex: none; }
/* 一幕的第一步：往回写「上一幕」；最后一步：往下写「下一幕：……」，这时步点收起，只留「6 / 6」 */
.steps .pn.is-wide { width: auto; max-width: min(360px, calc(100vw - 120px)); padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; }
.steps .pn.is-wide .pl { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 1.2; }
.steps .pn.is-go { background: var(--zhu); border-color: var(--zhu); color: #fff; animation: goIn .45s ease both; }
.steps .pn.is-go:hover { background: #b8321d; border-color: #b8321d; }
.steps .pn--next.is-wide:not(.is-go) { background: var(--ink); border-color: var(--ink); color: var(--paper-hi); }
.steps.at-last .d { display: none; }
@keyframes goIn { from { opacity: .4; transform: translateX(-6px); } }
.steps .cnt { font: 500 12px/1 var(--grot); color: var(--ink-3); min-width: 3.4em; text-align: center; letter-spacing: .04em; }

/* ---------- 翻页：两侧箭头 ---------- */
.deck-side {
	position: absolute; top: 50%; z-index: 6; width: 34px; height: 76px; margin-top: -38px; padding: 0;
	display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 17px;
	background: rgba(250, 247, 240, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	color: var(--ink); box-shadow: 0 8px 22px -14px rgba(0, 0, 0, .45);
	transition: background .2s, border-color .2s, color .2s, opacity .3s, transform .15s;
}
.deck-side::before { content: ''; position: absolute; inset: -14px -6px; }
.deck-side svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.deck-side--prev { left: 6px; }
.deck-side--next { right: 6px; }
.deck-side:hover { border-color: var(--ink); background: var(--paper-hi); }
.deck-side:active { transform: scale(.95); }
.deck-side.is-go { background: var(--zhu); border-color: var(--zhu); color: #fff; }
.deck-side.is-go:hover { background: #b8321d; border-color: #b8321d; }
.deck-side:disabled { opacity: .25; cursor: default; }
.deck-side:disabled::before { display: none; }
.deck-side:disabled:hover { border-color: var(--rule); background: rgba(250, 247, 240, .9); }
/* 华文道共用的「一步步看」按钮和步骤卡片在这里不用：从头看、清单的入口在总图和每一幕的右上角 */
.hwt-launch, .hwt-card { display: none !important; }

/* 场景里的通用部件 */
.panel { position: absolute; background: rgba(250, 247, 240, .9); border: 1px solid var(--rule); border-radius: 8px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.note { font-size: 12px; line-height: 1.55; color: var(--ink-3); }
.note a { color: inherit; }
.big-num { font: 700 64px/1 var(--grot); letter-spacing: -.02em; }
.hint-chip { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--ink); color: var(--paper-hi); font-size: 13px; line-height: 1.2; pointer-events: none; animation: pulse 2.4s ease-in-out infinite; }
.hint-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--zhu); }
@keyframes pulse { 50% { transform: translateY(-3px); } }
.tag { display: inline-block; padding: 1px 7px; border-radius: 3px; font: 600 12px/1.6 var(--grot); letter-spacing: .04em; }
.tag--zhu { background: var(--zhu); color: #fff; }
.tag--qing { background: var(--qing); color: #fff; }
.tag--mo { background: var(--ink); color: #fff; }
.tag--line { border: 1px solid currentColor; }
.cv-full { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- 原话抽屉 ---------- */
.drawer {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(460px, 92vw);
	background: var(--paper-hi); border-left: 1px solid var(--rule);
	box-shadow: -30px 0 60px -40px rgba(0, 0, 0, .45);
	display: flex; flex-direction: column;
	transform: translateX(105%); transition: transform .45s cubic-bezier(.7, 0, .2, 1);
}
.drawer.is-open { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 12px; border-bottom: 1px solid var(--rule); }
.drawer header h3 { margin: 0; font-size: 15px; font-weight: 700; }
.drawer header p { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); }
.drawer .body { flex: 1; overflow: auto; padding: 8px 22px 30px; -webkit-overflow-scrolling: touch; }
.drawer .body p, .drawer .body li { font-size: 15.5px; line-height: 1.95; margin: 14px 0; text-align: justify; }
.drawer .body h4 { margin: 26px 0 4px; font-size: 13px; color: var(--zhu); letter-spacing: .1em; }
.drawer .body .para { position: relative; padding-left: 14px; border-left: 2px solid transparent; transition: border-color .4s, background .4s; }
.drawer .body .para.is-hl { border-left-color: var(--zhu); }
.drawer .body mark { background: linear-gradient(transparent 55%, var(--zhu-soft) 55%); color: inherit; }
.drawer .body .slide { padding: 14px 16px; border: 1px dashed var(--rule); border-radius: 6px; margin: 14px 0; }
.drawer .body .slide b { display: block; margin-bottom: 6px; }
.drawer .body .slide li { font-size: 14.5px; margin: 6px 0; line-height: 1.7; }
.drawer footer { padding: 12px 20px 16px; border-top: 1px solid var(--rule); display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 读全文 ---------- */
.reader { position: fixed; inset: 0; z-index: 50; background: var(--paper-hi); overflow: auto; -webkit-overflow-scrolling: touch; }
.reader .bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--pad); background: rgba(250, 247, 240, .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.reader .bar b { font-size: 15px; }
.reader .bar .prog { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--zhu); width: 0; }
.reader .wrap { display: grid; grid-template-columns: 240px minmax(0, 680px); gap: 56px; justify-content: center; padding: 40px var(--pad) 120px; }
.reader nav.toc { position: sticky; top: 80px; align-self: start; font-size: 14px; line-height: 1.5; max-height: calc(100vh - 110px); overflow: auto; }
.reader nav.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--rule); text-decoration: none; color: var(--ink-2); }
.reader nav.toc a.is-on { border-left-color: var(--zhu); color: var(--ink); font-weight: 700; }
.reader article h1 { font-weight: 900; font-size: 34px; line-height: 1.25; margin: 0 0 8px; }
.reader article .meta { color: var(--ink-3); font-size: 14px; margin: 0 0 30px; }
.reader article h2 { font-size: 22px; font-weight: 900; margin: 46px 0 6px; scroll-margin-top: 70px; }
.reader article .go { display: inline-flex; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; }
.reader article .go button { font-size: 12.5px; border: 1px solid var(--rule); background: none; border-radius: 999px; padding: 3px 10px; color: var(--zhu); }
.reader article .go button:hover { border-color: var(--zhu); }
.reader article p, .reader article li { font-size: 17px; line-height: 2; text-align: justify; scroll-margin-top: 80px; }
.reader article p.is-hl { background: linear-gradient(90deg, var(--zhu-soft), transparent); }
.reader article a { color: var(--qing); text-decoration-color: rgba(40, 73, 184, .3); text-underline-offset: 3px; }

/* ---------- 搜索、帮助、黑屏、提示 ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(29, 27, 24, .35); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.overlay .box { width: min(640px, 100%); background: var(--paper-hi); border-radius: 10px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); overflow: hidden; }
.search input { width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: 18px 20px; font-size: 18px; background: none; outline: none; }
.search ul { list-style: none; margin: 0; padding: 6px; max-height: 56vh; overflow: auto; }
.search li button { width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; border-radius: 6px; display: flex; gap: 12px; align-items: baseline; }
.search li button:hover, .search li button.is-on { background: var(--paper-lo); }
.search li .k { flex: none; font: 700 12px/1.6 var(--grot); color: var(--zhu); width: 2.4em; }
.search li .t { font-size: 15px; line-height: 1.6; }
.search li .t small { display: block; color: var(--ink-3); font-size: 13px; }
.search li mark { background: var(--zhu-soft); color: inherit; }
.help .box { padding: 22px 24px; }
.help h3 { margin: 0 0 12px; font-size: 18px; }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14.5px; }
.help dt { text-align: right; }
.help p { font-size: 14px; color: var(--ink-2); margin: 16px 0 0; }
.black { position: fixed; inset: 0; z-index: 90; background: #000; cursor: none; }
.toast { position: fixed; left: 50%; bottom: 90px; z-index: 80; transform: translate(-50%, 10px); padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--paper-hi); font-size: 14px; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 演讲模式：大字、少按钮 ---------- */
body.present { --cap: clamp(22px, 2.15vw, 34px); }
body.present .sc-head h2 { font-size: clamp(34px, 4vw, 62px); }
body.present .sc-head .kicker { font-size: 19px; }
body.present .sc-cap .line { padding: 14px 22px 15px; }
body.present .sc-cap .src { display: none; }
body.present .sc-nav .opt { display: none; }
body.present.idle, body.present.idle * { cursor: none !important; }
body.present .steps .pn { display: none; }
body.present.idle .deck-side { opacity: 0; }
/* 演讲模式里步点两头的小箭头照旧收起；一幕的头尾处写着去向的按钮仍然显示（鼠标不动时淡去） */
body.present .steps .pn.is-wide { display: inline-flex; transition: opacity .3s; }
body.present.idle .steps .pn.is-wide { opacity: 0; }
.pres-badge { display: none; }
body.present .pres-badge { display: inline-flex; }

/* ---------- 竖屏 / 手机 ---------- */
@media (max-width: 760px), (orientation: portrait) and (max-width: 900px) {
	:root { --pad: 16px; --cap: 15px; }
	.atlas-head { max-width: calc(100vw - 32px); top: 14px; }
	.atlas-head .eyebrow { font-size: 10.5px; margin-bottom: 6px; }
	.atlas-head h1 { font-size: 25px; }
	.atlas-head .sub { display: none; }
	.atlas-ctl { top: auto; bottom: 14px; right: 16px; left: 16px; align-items: stretch; }
	.atlas-ctl .row { justify-content: space-between; flex-wrap: nowrap; }
	.atlas-ctl .seg { overflow-x: auto; max-width: 100%; }
	.atlas-ctl .row { gap: 6px; }
	#btnRead, #btnList { width: 34px; padding: 0; justify-content: center; }
	#btnRead .lbl, #btnList .lbl { display: none; }
	.atlas-ctl .chip--ink, .atlas-ctl .chip--zhu { padding: 0 12px; }
	.route-note { display: none; }
	.atlas-legend { display: none; }
	.compass { top: 104px; bottom: auto; width: 64px; height: 64px; right: 14px; }
	.zoom-ctl { display: none; }
	.node .mk { width: 42px; height: 42px; }
	.node .lb { font-size: 13.5px; }
	/* 窄屏：「原话」「清单」「总图」放到右上角，底下一整条留给翻页 */
	.sc-head { top: 12px; max-width: calc(100vw - 166px); }
	.sc-head .no { font-size: 11px; margin-bottom: 4px; }
	.sc-head h2 { font-size: 24px; }
	.sc-head .kicker { display: none; }
	.sc-nav { top: 12px; right: 12px; gap: 6px; }
	.sc-nav .chip { height: 38px; width: 38px; padding: 0; justify-content: center; }
	.sc-nav .chip .lbl { display: none; }
	#scPresent { display: none; }
	.sc-cap { bottom: 60px; left: 12px; right: 12px; flex-direction: column; align-items: stretch; gap: 8px; }
	.sc-cap .line { padding: 9px 12px; display: block; }
	.deck-side { display: none !important; }
	.steps { position: fixed; left: 12px; right: 12px; bottom: 12px; justify-content: center; gap: 2px; }
	.steps .pn { flex: none; width: 40px; height: 40px; }
	.steps .pn--prev { margin-right: auto; }
	.steps .pn--next { margin-left: auto; }
	.steps .pn.is-wide { width: auto; max-width: calc(100vw - 110px); }
	.steps button.d { width: 16px; }
	.steps .cnt { min-width: 2.8em; }
	.reader .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 20px; }
	.reader nav.toc { display: none; }
	.reader article p, .reader article li { font-size: 16.5px; }
	.drawer { top: auto; left: 0; width: 100%; height: 72vh; border-left: 0; border-top: 1px solid var(--rule); border-radius: 14px 14px 0 0; transform: translateY(105%); }
	.drawer.is-open { transform: none; }
	.big-num { font-size: 44px; }
}

/* 中等宽度或矮屏：总图右上的「读全文」「清单」只留图标，按钮这一行不再往左压住岛和标题 */
@media (min-width: 761px) and (max-width: 1100px), (min-width: 761px) and (max-height: 600px) {
	#btnRead, #btnList { width: 34px; padding: 0; justify-content: center; }
	#btnRead .lbl, #btnList .lbl { display: none; }
}

/* 单独打开时右下角有展馆的小标签：给它让位；进了幕就收起它 */
html:not(.is-embed) .zoom-ctl { bottom: calc(var(--pad) + 50px); }
html:not(.is-embed) .compass { bottom: calc(var(--pad) + 96px); }
body.in-scene .wk-pill { display: none !important; }
.is-embed .zoom-ctl { display: none; }
.is-embed .compass { bottom: var(--pad); }
@media (max-width: 760px), (orientation: portrait) and (max-width: 900px) {
	html:not(.is-embed) .atlas-ctl { bottom: 64px; }
	html:not(.is-embed) .compass { bottom: auto; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print { .atlas, .stage, .drawer { display: none !important; } .reader { position: static; overflow: visible; } }
