/* 论文批改 · 切割垫上的一份校样 */
@font-face {
	font-family: 'PG Kai';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/kai-0354beb17b.woff2) format('woff2');
}

:root {
	--mat: #235546;
	--mat-deep: #1b4639;
	--mat-line: rgba(214, 238, 226, .07);
	--mat-line-2: rgba(214, 238, 226, .16);
	--mat-ink: #e3f1ea;
	--mat-ink-2: #a8cbbd;
	--paper: #fdfdfb;
	--paper-2: #f3f4f0;
	--rule: #dfe2dc;
	--ink: #1d1f1e;
	--ink-2: #5b605d;
	--ink-3: #8a8f8b;
	--pen: #c8321b;
	--pen-mark: #d6361c;
	--pen-soft: rgba(214, 54, 28, .1);
	--self: #2b3d63;
	--sup: #17875c;
	--add: #b8861b;
	--ask: #3d5bb5;
	--rev: #e0762a;
	--ref: #c42d22;
	--serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
	--kai: 'PG Kai', 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
	--num: 'Space Grotesk', 'Noto Serif SC', sans-serif;
	--bar-h: 58px;
	--ruler-h: 116px;
	--side-w: 232px;
	--txt-w: 34em;
	--mg-w: 300px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
	background: var(--mat);
	color: var(--ink);
	font-family: var(--serif);
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
	overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid #f0c674; outline-offset: 2px; }
.sheet :focus-visible, .slip :focus-visible, .drawer :focus-visible { outline-color: var(--ask); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
svg.gl { width: 14px; height: 14px; flex: none; overflow: visible; }

/* ── 切割垫 ── */
.mat {
	position: fixed; inset: 0;
	display: grid;
	grid-template-columns: var(--side-w) minmax(0, 1fr);
	grid-template-rows: var(--bar-h) minmax(0, 1fr) var(--ruler-h);
	grid-template-areas: 'bar bar' 'side desk' 'ruler ruler';
	background-color: var(--mat);
	background-image:
		linear-gradient(var(--mat-line-2) 1px, transparent 1px),
		linear-gradient(90deg, var(--mat-line-2) 1px, transparent 1px),
		linear-gradient(var(--mat-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
	background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
	background-position: -1px -1px;
}

/* 顶栏 */
.bar {
	grid-area: bar;
	display: flex; align-items: center; gap: 18px;
	padding: 0 20px;
	color: var(--mat-ink);
	border-bottom: 1px solid rgba(214, 238, 226, .14);
	background: linear-gradient(var(--mat-deep), rgba(27, 70, 57, .86));
	position: relative; z-index: 6;
}
.brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.brand h1 { margin: 0; font-size: 21px; font-weight: 900; letter-spacing: .12em; white-space: nowrap; }
.brand p { margin: 0; font-size: 13.5px; color: var(--mat-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acts { margin-left: auto; display: flex; gap: 6px; }
.acts button {
	font-size: 14px; letter-spacing: .08em;
	padding: 7px 14px; border-radius: 999px;
	border: 1px solid rgba(214, 238, 226, .28);
	color: var(--mat-ink);
	transition: background .2s, border-color .2s;
}
.acts button:hover { background: rgba(214, 238, 226, .1); border-color: rgba(214, 238, 226, .5); }
.acts button[aria-expanded='true'] { background: var(--mat-ink); color: var(--mat-deep); border-color: var(--mat-ink); }
.scholar-chip {
	display: none; align-items: center; gap: 8px;
	font-size: 13.5px; padding: 5px 6px 5px 12px; border-radius: 999px;
	background: var(--paper); color: var(--ink);
}
.scholar-chip.on { display: inline-flex; }
.scholar-chip b { font-family: var(--kai); font-weight: 400; font-size: 16px; color: var(--pen); }
.scholar-chip button { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.scholar-chip button:hover { background: var(--paper-2); color: var(--ink); }

/* ── 左栏：年份、立场分布、段落导航 ── */
.side {
	grid-area: side;
	color: var(--mat-ink);
	padding: 16px 16px 14px 20px;
	overflow-y: auto; overflow-x: hidden;
	scrollbar-width: thin;
	display: flex; flex-direction: column; gap: 14px;
}
.yr { display: flex; flex-direction: column; gap: 2px; }
.yr b { font-family: var(--num); font-size: 46px; font-weight: 500; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.yr span { font-size: 13px; color: var(--mat-ink-2); }
.yr span b { font-size: 13px; font-weight: 600; color: var(--mat-ink); letter-spacing: 0; }
.side h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--mat-ink-2); letter-spacing: .1em; }
.dist { display: flex; flex-direction: column; gap: 3px; }
.drow {
	display: grid; grid-template-columns: 16px 2.6em 1fr 2em; align-items: center; gap: 6px;
	padding: 3px 6px; margin: 0 -6px; border-radius: 6px; text-align: left; font-size: 13.5px;
	transition: background .2s, opacity .2s;
}
.drow:hover { background: rgba(214, 238, 226, .08); }
.drow[aria-pressed='false'] { opacity: .42; }
.drow[aria-pressed='false'] .dbar i { background: transparent !important; box-shadow: inset 0 0 0 1px var(--mat-ink-2); }
.drow .dbar { height: 8px; border-radius: 0 4px 4px 0; background: rgba(214, 238, 226, .1); overflow: hidden; }
.drow .dbar i { display: block; height: 100%; border-radius: 0 4px 4px 0; transition: width .35s ease; }
.drow .dn { text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; color: var(--mat-ink); }
.drow svg.gl { color: var(--mat-ink); }

.mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.mini button {
	width: 100%; display: grid; grid-template-columns: 1.6em 1fr 58px; align-items: center; gap: 6px;
	text-align: left; font-size: 13px; padding: 3px 6px; margin: 0 -6px; border-radius: 6px;
	color: var(--mat-ink-2); transition: background .2s, color .2s;
}
.mini button:hover { background: rgba(214, 238, 226, .08); color: var(--mat-ink); }
.mini button.cur { background: rgba(214, 238, 226, .14); color: var(--mat-ink); }
.mini .mn-n { font-family: var(--num); font-variant-numeric: tabular-nums; color: var(--mat-ink); }
.mini .mn-h { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mn-bar { display: flex; height: 7px; gap: 1px; justify-content: flex-end; }
.mini .mn-bar i { display: block; width: 6px; height: 7px; border-radius: 1px; transition: opacity .3s; }
.mini .mn-bar i.off { opacity: 0; }

/* ── 桌面：校样纸 ── */
.desk {
	grid-area: desk;
	overflow-y: auto; overflow-x: hidden;
	scroll-behavior: smooth;
	padding: 26px 28px 60px 8px;
	scrollbar-color: rgba(214, 238, 226, .35) transparent;
	scrollbar-width: thin;
	position: relative;
}
.sheet {
	position: relative;
	width: min(100%, 1040px);
	margin: 0 auto;
	background: var(--paper);
	border-radius: 2px;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 40px -18px rgba(5, 25, 19, .65), 0 2px 6px rgba(5, 25, 19, .25);
	padding: 54px 40px 60px 56px;
}
.sheet::before {
	/* 校样纸上的套准角标 */
	content: ''; position: absolute; left: 16px; top: 16px; width: 18px; height: 18px;
	border-left: 1px solid var(--ink-3); border-top: 1px solid var(--ink-3); opacity: .5;
}
.sheet::after {
	content: ''; position: absolute; right: 16px; bottom: 16px; width: 18px; height: 18px;
	border-right: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3); opacity: .5;
}
svg.ink { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 2; }
svg.ink path { fill: none; stroke: var(--pen-mark); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
svg.ink .mk { transition: opacity .35s; }
svg.ink .mk.self path { stroke: var(--self); }
svg.ink .mk.dim { opacity: .14; }
svg.ink .lead { stroke-width: 1; stroke-dasharray: 3 3; opacity: .85; }
svg.ink .hl { fill: var(--pen-soft); stroke: none; }

/* 论文抬头 */
.head {
	display: grid; grid-template-columns: minmax(0, var(--txt-w)) var(--mg-w); gap: 0 44px;
	grid-template-areas: 'ti ti' 'nt st';
	margin-left: 46px; padding-bottom: 26px; margin-bottom: 30px;
	border-bottom: 1px solid var(--rule);
}
.head .h-ti { grid-area: ti; }
.head .h-nt { grid-area: nt; }
.head .stamp { grid-area: st; }
.head .au { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); letter-spacing: .06em; }
.head h2 { margin: 0; font-size: 36px; line-height: 1.18; font-weight: 700; letter-spacing: -.005em; }
.head .tr { margin: 8px 0 0; font-size: 20px; font-weight: 600; letter-spacing: .1em; }
.head .note { margin: 16px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.head .note a { color: var(--ink); text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.head .note a:hover { text-decoration-color: var(--pen); }
.head .stamp { align-self: end; font-family: var(--kai); color: var(--pen); font-size: 17px; line-height: 1.6; }
.head .stamp p { margin: 0; }
.head .stamp .sum { display: flex; gap: 14px; font-size: 15px; color: var(--ink-2); font-family: var(--serif); }
.head .stamp .sum b { font-family: var(--num); font-weight: 500; font-size: 24px; color: var(--ink); margin-right: 3px; }

/* 窄屏：立场分布放进抬头 */
.dist-m { display: none; }
@media (max-width: 1060px) {
	.dist-m { display: block; grid-column: 1 / -1; margin-top: 18px; }
	.dist-m .stack { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
	.dist-m .stack i { display: block; flex: 1 1 0; min-width: 2px; transition: flex-grow .4s; }
	.dist-m .chips { display: flex; flex-wrap: wrap; gap: 6px; }
	.dist-m .drow { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 5px 10px 5px 8px; border: 1px solid var(--rule); border-radius: 999px; font-size: 13.5px; color: var(--ink); }
	.dist-m .drow:hover { background: var(--paper-2); }
	.dist-m .drow .dn { font-family: var(--num); color: var(--ink-2); }
	.dist-m .drow[aria-pressed='false'] { opacity: .45; }
	.dist-m .drow svg.gl { color: inherit; }
}

/* 段落 */
.para {
	position: relative;
	display: grid;
	grid-template-columns: 30px minmax(0, var(--txt-w)) var(--mg-w);
	gap: 0 16px;
	padding: 6px 0 26px;
	scroll-margin-top: 20px;
}
.para .gut { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 4px; }
.para .gut .pn { font-family: var(--num); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.para .gut .pp { font-size: 11px; color: var(--ink-3); writing-mode: vertical-rl; letter-spacing: .1em; }
.para .heat { position: absolute; left: 0; top: 30px; bottom: 26px; width: 5px; border-radius: 3px; background: var(--paper-2); transition: background .5s; }
.para .heat::after { content: ''; position: absolute; inset: 0; border-radius: 3px; background: var(--heat, transparent); transition: background .5s; }
.para .txt {
	margin: 0; font-size: 17px; line-height: 2.05; letter-spacing: .02em;
	text-align: justify; text-justify: inter-character;
	hanging-punctuation: allow-end;
	padding-left: 12px;
}
.para .txt .an { transition: background .2s; border-radius: 2px; }
.para .txt .an.hot { background: var(--pen-soft); }
.para .cut-note { grid-column: 2; margin: 12px 0 0 12px; font-size: 13.5px; color: var(--ink-3); letter-spacing: .08em; }
.para .cut-note::before { content: ''; display: inline-block; width: 40px; height: 1px; background: var(--ink-3); vertical-align: middle; margin-right: 10px; }

/* 页边批注 */
.mg { padding-left: 26px; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.mn {
	display: grid; grid-template-columns: 16px 1fr; gap: 0 7px; align-items: start;
	text-align: left; padding: 2px 6px; margin-left: -6px; border-radius: 4px;
	line-height: 1.5;
	transform: rotate(var(--tilt, 0deg));
	transition: background .2s, opacity .35s;
}
.mn svg.gl { margin-top: 6px; color: var(--pen); }
.mn .g { font-family: var(--kai); color: var(--pen); font-size: 17.5px; margin-right: 8px; }
.mn .by { font-family: var(--kai); font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.mn .by i { font-style: normal; font-family: var(--num); font-size: 12px; margin-left: 3px; }
.mn.self svg.gl, .mn.self .g { color: var(--self); }
.mn:hover, .mn.hot { background: var(--pen-soft); }
.mn.self:hover, .mn.self.hot { background: rgba(43, 61, 99, .08); }
.mn.cur { background: var(--pen-soft); box-shadow: inset 2px 0 0 var(--pen); }
.mn[hidden] { display: none; }
.mn.ink-in { animation: inkin .7s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes inkin { from { clip-path: inset(0 100% 0 0); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.mn.dim { opacity: .2; }
.mg-empty { font-family: var(--kai); font-size: 14px; color: var(--ink-3); padding: 4px 0; }

/* 总评 */
.review {
	position: relative;
	margin: 26px 0 0 46px; padding: 30px 0 0; border-top: 1px solid var(--rule);
	display: grid; grid-template-columns: minmax(0, var(--txt-w)) var(--mg-w); gap: 0 44px;
	scroll-margin-top: 20px;
}
.review h2 { margin: 0 0 14px; font-family: var(--kai); font-weight: 400; color: var(--pen); font-size: 30px; letter-spacing: .3em; }
.review .rv p { margin: 0 0 12px; font-family: var(--kai); color: var(--pen); font-size: 19px; line-height: 1.85; text-indent: 2em; }
.review .rv a { color: var(--pen); text-decoration: underline; text-decoration-style: wavy; text-decoration-thickness: 1px; text-underline-offset: 5px; cursor: pointer; }
.review .rv a:hover { background: var(--pen-soft); }
.review .seal-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 54px; }
.seal { width: 82px; height: 82px; transform: rotate(-7deg); filter: drop-shadow(0 0 .5px rgba(160, 30, 10, .4)); }
.review .date { font-family: var(--kai); color: var(--pen); font-size: 17px; letter-spacing: .1em; }
.review .refs { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.review .refs a { color: var(--ink-2); }

/* 尾注：版本 */
.colophon { margin: 36px 0 0 46px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.8; color: var(--ink-2); max-width: calc(var(--txt-w) * 1.1); }
.colophon h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: .1em; }
.colophon ol { margin: 0; padding-left: 1.4em; }
.colophon a { color: var(--ink-2); text-underline-offset: 2px; }

/* 笔尖 */
.nib { position: absolute; left: 0; top: 0; width: 26px; height: 26px; z-index: 4; pointer-events: none; opacity: 0; transition: transform .32s cubic-bezier(.3, .7, .2, 1), opacity .3s; }
.nib.on { opacity: 1; }

/* ── 批注纸条 ── */
.slip {
	position: absolute; z-index: 8;
	width: 356px;
	background: #fffef9;
	background-image: repeating-linear-gradient(transparent 0 29px, rgba(61, 91, 181, .13) 29px 30px);
	background-position: 0 50px;
	border-radius: 3px;
	box-shadow: 0 16px 34px -14px rgba(10, 30, 24, .5), 0 2px 6px rgba(10, 30, 24, .2);
	padding: 16px 18px 14px 22px;
	border-left: 3px solid var(--pen);
}
.slip[hidden] { display: none; }
.slip .s-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-right: 26px; }
.slip .s-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; letter-spacing: .08em; }
.slip .s-who { margin: 8px 0 2px; font-family: var(--kai); font-size: 22px; color: var(--ink); line-height: 1.3; }
.slip .s-who button { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(200, 50, 27, .4); text-underline-offset: 4px; }
.slip .s-who button:hover { color: var(--pen); }
.slip .s-who .en { font-family: var(--serif); font-size: 12.5px; color: var(--ink-2); margin-left: 4px; }
.slip .s-who i { font-style: normal; font-family: var(--num); font-size: 15px; color: var(--ink-2); margin-left: 6px; }
.slip .s-t { margin: 8px 0 10px; font-family: var(--kai); font-size: 17px; line-height: 1.75; color: var(--pen); }
.slip.self .s-t { color: var(--self); }
.slip .s-c { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--ink-2); word-break: break-word; }
.slip .s-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; }
.slip .s-links a { color: var(--ask); text-decoration: none; border-bottom: 1px solid rgba(61, 91, 181, .35); }
.slip .s-links a:hover { border-bottom-color: var(--ask); }
.slip .s-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule); font-size: 13px; color: var(--ink-2); }
.slip .s-nav button { padding: 4px 8px; border-radius: 4px; }
.slip .s-nav [data-copy] { margin-left: auto; margin-right: 6px; color: var(--ink-3); font-size: 12.5px; }
.slip .s-nav .num { margin-left: 8px; }
.slip .s-nav button:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }
.slip .s-nav button:disabled { opacity: .35; cursor: default; }
.slip .s-x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--ink-2); }
.slip .s-x:hover { background: var(--paper-2); color: var(--ink); }

/* ── 抽屉：学者、说明 ── */
.drawer {
	position: fixed; z-index: 9; top: var(--bar-h); right: 0; bottom: var(--ruler-h);
	width: min(420px, 100%);
	background: var(--paper);
	box-shadow: -18px 0 40px -20px rgba(5, 25, 19, .7);
	display: flex; flex-direction: column;
	transform: translateX(105%); transition: transform .35s cubic-bezier(.3, .7, .2, 1), visibility .35s;
	visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer:focus { outline: none; }
.drawer > header { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px 22px; border-bottom: 1px solid var(--rule); }
.drawer > header h2 { margin: 0; font-size: 18px; letter-spacing: .1em; }
.drawer > header p { margin: 0; font-size: 13px; color: var(--ink-2); }
.drawer > header .x { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; font-size: 21px; color: var(--ink-2); display: grid; place-items: center; flex: none; }
.drawer > header .x:hover { background: var(--paper-2); color: var(--ink); }
.dw-body { overflow-y: auto; padding: 14px 22px 26px; scrollbar-width: thin; }

.sch-sort { display: flex; gap: 6px; margin: 0 0 10px; font-size: 13px; }
.sch-sort button { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); }
.sch-sort button[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sch-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 14px; }
.sch-list li { break-inside: avoid; }
.sch-list button {
	width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px;
	padding: 6px 8px; margin: 0 -8px; border-radius: 6px;
}
.sch-list button:hover { background: var(--paper-2); }
.sch-list button.on { background: var(--pen-soft); }
.sch-list .nm { font-family: var(--kai); font-size: 18px; line-height: 1.2; }
.sch-list .en { grid-column: 1; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-list .gls { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 2px; }
.sch-list .gls svg { width: 11px; height: 11px; }

.sch-detail h3 { margin: 4px 0 2px; font-family: var(--kai); font-weight: 400; font-size: 26px; }
.sch-detail .en { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.sch-detail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sch-detail li { border-left: 3px solid var(--rule); padding: 2px 0 2px 12px; }
.sch-detail li .meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.sch-detail li .meta b { font-weight: 600; }
.sch-detail li .q { margin: 4px 0; font-size: 13.5px; color: var(--ink-2); }
.sch-detail li .t { margin: 0; font-family: var(--kai); font-size: 16px; line-height: 1.65; color: var(--pen); }
.sch-detail li button.go { margin-top: 6px; font-size: 13px; color: var(--ask); border-bottom: 1px solid rgba(61, 91, 181, .35); }
.sch-detail .back { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.sch-detail .back:hover { color: var(--ink); }

.about h3 { margin: 18px 0 6px; font-size: 15px; letter-spacing: .06em; }
.about h3:first-child { margin-top: 4px; }
.about p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.85; }
.about .legend { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.about .legend li { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-size: 14px; }
.about .legend svg { width: 92px; height: 26px; overflow: visible; }
.about .legend svg path { fill: none; stroke: var(--pen-mark); stroke-linecap: round; stroke-linejoin: round; }
.about .legend svg text { font-family: var(--serif); font-size: 14px; fill: var(--ink); }
.about .legend b { font-weight: 600; }
.about .legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.about ol { margin: 0 0 10px; padding-left: 1.3em; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.about a { color: var(--ask); }

/* ── 时间尺 ── */
.ruler {
	grid-area: ruler;
	display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: stretch;
	padding: 10px 24px 12px 14px; gap: 14px;
	border-top: 1px solid rgba(214, 238, 226, .14);
	background: linear-gradient(rgba(27, 70, 57, .88), var(--mat-deep));
	position: relative; z-index: 5;
	color: var(--mat-ink);
}
.standalone .ruler { padding-right: 200px; }
.play {
	align-self: center; justify-self: center;
	width: 56px; height: 56px; border-radius: 50%;
	border: 1.5px solid rgba(214, 238, 226, .5);
	display: grid; place-items: center;
	transition: background .2s, border-color .2s;
}
.play:hover { background: rgba(214, 238, 226, .1); border-color: var(--mat-ink); }
.play svg { width: 20px; height: 20px; }
.play .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.strip {
	position: relative; min-width: 0;
	background: var(--paper);
	border-radius: 3px;
	box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .6);
	touch-action: none;
	cursor: ew-resize;
}
.strip svg.tl { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl .tick { stroke: var(--ink-3); stroke-width: 1; }
.tl .tick.maj { stroke: var(--ink-2); }
.tl .tlab { font-family: var(--num); font-size: 11px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl .brk { stroke: var(--ink-3); stroke-width: 1; fill: none; }
.tl .ev line { stroke: var(--ink); stroke-width: 1.4; }
.tl .ev text { font-family: var(--serif); font-size: 11px; fill: var(--ink); }
.tl .ev text tspan { font-family: var(--num); }
.tl .dot { cursor: pointer; transition: opacity .3s; }
.tl .dot .hit { fill: transparent; stroke: none; }
.tl .dot .gl-shape { stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; }
.tl .dot.fill .gl-shape { fill: currentColor; }
.tl .dot.off { opacity: .14; }
.tl .dot.dim { opacity: .2; }
.tl .dot:hover .gl-shape, .tl .dot.hot .gl-shape { stroke-width: 2.6; }
.tl .done { fill: rgba(214, 54, 28, .045); }
.scrub {
	position: absolute; top: -9px; bottom: -4px; width: 0; z-index: 3;
	border-left: 2px solid var(--pen);
	transform: translateX(var(--x, 0px));
	cursor: ew-resize;
	outline: none;
}
.scrub .flag {
	position: absolute; bottom: 100%; left: -1px; transform: translate(-50%, 6px);
	background: var(--pen); color: #fff; border-radius: 4px;
	font-family: var(--num); font-size: 13px; font-weight: 600; padding: 2px 8px; white-space: nowrap;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 3px 8px -3px rgba(0, 0, 0, .5);
}
.scrub:focus-visible .flag { outline: 2px solid #f0c674; outline-offset: 2px; }
.scrub::after { content: ''; position: absolute; left: -12px; right: -12px; top: 0; bottom: 0; }
.hint {
	position: absolute; right: 18px; bottom: calc(100% + 36px); z-index: 4;
	font-family: var(--kai); font-size: 17px; color: var(--paper); white-space: nowrap;
	background: var(--pen); padding: 4px 12px; border-radius: 6px;
	box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6);
	opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; pointer-events: none;
}
.hint::after { content: ''; position: absolute; right: 2px; top: 100%; border: 7px solid transparent; border-top-color: var(--pen); border-right-width: 0; }
.hint.on { opacity: 1; transform: none; }
.tip {
	position: fixed; z-index: 12; pointer-events: none;
	max-width: 300px; padding: 8px 11px; border-radius: 6px;
	background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.55;
	box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .6);
	opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.tip.on { opacity: 1; transform: none; }
.tip b { font-family: var(--kai); font-weight: 400; font-size: 15px; }
.tip i { font-style: normal; font-family: var(--num); color: #c9cdc9; margin-left: 4px; }
.tip .g { display: block; color: #ffb3a3; font-family: var(--kai); font-size: 15px; }

/* 手机上的段落热度条（代替左栏） */
.hstrip { display: none; }

/* ── 中屏 ── */
@media (max-width: 1240px) {
	:root { --side-w: 200px; --mg-w: 260px; }
	.sheet { padding: 44px 26px 50px 36px; }
	.head, .review, .colophon { margin-left: 46px; }
}
@media (max-width: 1060px) {
	:root { --mg-w: 230px; --txt-w: 30em; }
	.mat {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: var(--bar-h) 30px minmax(0, 1fr) var(--ruler-h);
		grid-template-areas: 'bar' 'hs' 'desk' 'ruler';
	}
	.side { display: none; }
	.desk { padding-left: 20px; padding-right: 20px; }
	.hstrip { display: flex; grid-area: hs; gap: 3px; padding: 6px 20px 8px; align-items: stretch; }
	.hstrip button { flex: 1; border-radius: 2px; min-width: 0; background: rgba(214, 238, 226, .12); }
	.hstrip button.cur { box-shadow: 0 0 0 2px var(--mat-ink); }
}

/* ── 手机 ── */
@media (max-width: 760px) {
	:root { --bar-h: 50px; --ruler-h: 86px; }
	.mat {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: var(--bar-h) 34px minmax(0, 1fr) var(--ruler-h);
		grid-template-areas: 'bar' 'hs' 'desk' 'ruler';
	}
	.bar { padding: 0 10px 0 14px; gap: 8px; }
	.brand { flex-direction: column; gap: 0; }
	.brand h1 { font-size: 17px; letter-spacing: .08em; }
	.brand p { font-size: 11.5px; max-width: 46vw; }
	.acts { gap: 4px; }
	.acts button { padding: 6px 10px; font-size: 13px; letter-spacing: .04em; }
	.scholar-chip.on { position: fixed; left: 12px; top: calc(var(--bar-h) + 40px); z-index: 7; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); }
	.hstrip { display: flex; grid-area: hs; gap: 2px; padding: 6px 12px 8px; align-items: stretch; }
	.hstrip button { flex: 1; border-radius: 2px; min-width: 0; background: rgba(214, 238, 226, .12); position: relative; }
	.hstrip button.cur { box-shadow: 0 0 0 2px var(--mat-ink); }
	.desk { padding: 4px 0 40px; scroll-behavior: auto; }
	.sheet { width: 100%; border-radius: 0; padding: 26px 16px 40px; box-shadow: none; }
	.sheet::before, .sheet::after { display: none; }
	.head { grid-template-columns: 1fr; grid-template-areas: 'ti' 'nt' 'st'; margin-left: 0; gap: 14px; }
	.head h2 { font-size: 25px; }
	.head .tr { font-size: 17px; }
	.para { grid-template-columns: 18px minmax(0, 1fr); gap: 0 8px; padding-bottom: 18px; }
	.para .txt { font-size: 16.5px; line-height: 1.95; padding-left: 4px; }
	.para .heat { width: 4px; top: 24px; bottom: 18px; }
	.para .gut .pp { display: none; }
	.mg { grid-column: 2; padding: 6px 0 0 4px; flex-direction: row; flex-wrap: wrap; gap: 4px 6px; }
	.mn { grid-template-columns: 14px auto; transform: none; padding: 3px 8px 3px 6px; margin: 0; background: rgba(214, 54, 28, .045); border-radius: 6px; line-height: 1.45; }
	.mn svg.gl { margin-top: 5px; }
	.mn .g { font-size: 16px; }
	.mn .by { font-size: 12.5px; }
	.mn.self { background: rgba(43, 61, 99, .06); }
	.para .cut-note { margin-left: 4px; }
	.review { grid-template-columns: 1fr; margin-left: 0; }
	.review .seal-wrap { flex-direction: row; align-items: center; padding-top: 6px; }
	.review .rv p { font-size: 17.5px; }
	.colophon { margin-left: 0; }
	.slip {
		position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto !important;
		max-height: 76vh; overflow-y: auto; border-radius: 14px 14px 0 0; border-left: 0; border-top: 3px solid var(--pen);
		padding: 18px 18px calc(16px + env(safe-area-inset-bottom));
		transform: none !important;
		box-shadow: 0 -16px 40px -12px rgba(0, 0, 0, .5);
	}
	.drawer { top: var(--bar-h); bottom: 0; width: 100%; }
	.sch-list { columns: 2; }
	.ruler { grid-template-columns: 50px minmax(0, 1fr); padding: 14px 12px 10px 8px; gap: 8px; }
	.standalone .ruler { padding-right: 12px; padding-bottom: 58px; }
	.standalone .slip { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	.standalone { --ruler-h: 134px; }
	.play { width: 44px; height: 44px; }
	.tl .ev text { display: none; }
	.tl .tlab.sm { display: none; }
}

/* ── 一步步看（../assets/tour.js）：启动钮在左下角，时间尺往右让；手机上时间尺下面多一行放它（单开时右边还有「在展馆中查看」）。
   走的时候整个作品往上收，让出卡片的高度（--hwt-h 由 walk.js 量）。 ── */
/* 时间尺上方的年份红旗高出尺面约 24px：尺子顶上留够地方，红旗不压到纸上的字（尺面高度不变） */
:root { --ruler-h: 131px; }
.ruler { padding-top: 25px; padding-left: 226px; }
html.hwt-on .sheet { margin-bottom: 40vh; }   /* 走的时候最后几段也能滚到上面来（加在纸上，不撑高滚动区） */
html.hwt-on .wk-pill { visibility: hidden; }
/* 窗口够高（或手机竖屏）时整个作品往上收；宽而矮的窗口，卡片就叠在左下角（批注纸条在右边，不受影响） */
@media (max-width: 760px), (min-height: 790px) {
	html.hwt-on .mat { bottom: var(--hwt-h, 0px); }
	html.hwt-on .ruler { padding-left: 14px; }
	html.hwt-on .standalone .ruler { padding-right: 24px; }
	html.hwt-on .drawer { bottom: calc(var(--ruler-h) + var(--hwt-h, 0px)); }
}
@media (max-width: 760px) {
	:root, .standalone { --ruler-h: 145px; }
	.ruler { padding-top: 25px; padding-left: 8px; padding-bottom: 58px; }
	html.hwt-on, html.hwt-on .standalone { --ruler-h: 97px; }
	html.hwt-on .ruler, html.hwt-on .standalone .ruler { padding: 25px 12px 10px 8px; }
	html.hwt-on .drawer { bottom: var(--hwt-h, 0px); }
	html.hwt-on .slip { bottom: var(--hwt-h, 0px); max-height: calc(76vh - var(--hwt-h, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
	.desk { scroll-behavior: auto; }
}
.paused *, .hidden-tab * { animation-play-state: paused !important; }
@media print {
	body { overflow: visible; background: #fff; }
	.mat { position: static; display: block; background: none; }
	.bar, .side, .ruler, .hstrip, .drawer, .slip { display: none !important; }
	.desk { overflow: visible; padding: 0; }
	.sheet { box-shadow: none; }
}
