/* 指南车 · 金漆夜行：黑漆地、金线、朱漆车身、青铜齿轮 */
:root {
	--bg: #0b0908;
	--ink: #f4e9d4;
	--ink-2: rgba(244, 233, 212, .74);
	--ink-3: rgba(244, 233, 212, .48);
	--gold: #d9ad5b;
	--gold-2: #f1d08a;
	--zhu: #c0321f;
	--zhu-2: #e2533a;
	--panel: rgba(15, 11, 9, .76);
	--panel-2: rgba(244, 233, 212, .05);
	--line: rgba(217, 173, 91, .34);
	--line-2: rgba(217, 173, 91, .16);
	--serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
	--sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
	--mono: "JetBrains Mono", "Space Grotesk", ui-monospace, monospace;
	--wk-pill-bg: rgba(15, 11, 9, .82);
	--wk-pill-fg: #f4e9d4;
	--wk-pill-line: rgba(217, 173, 91, .3);
	--wk-pill-accent: #c0321f;
	--wk-pill-accent-fg: #f4e9d4;
	color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body { font: 400 15px/1.7 var(--sans); -webkit-font-smoothing: antialiased; touch-action: none; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

.stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
.stage:active { cursor: grabbing; }

/* 题头 */
.hd { position: fixed; left: 28px; top: 22px; z-index: 5; pointer-events: none; max-width: 360px; }
.hd::before { content: ""; position: absolute; left: -60px; top: -60px; width: 460px; height: 260px; background: radial-gradient(closest-side, rgba(11, 9, 8, .82), rgba(11, 9, 8, 0)); z-index: -1; }
.hd__t { margin: 0; font: 900 64px/1 var(--serif); letter-spacing: .12em; color: var(--ink); text-shadow: 0 4px 30px rgba(0, 0, 0, .7); }
.hd__s { margin: 12px 0 0; font: 500 14px/1.5 var(--serif); letter-spacing: .14em; color: var(--gold); }
.hd__q { margin: 8px 0 0; font: 400 14px/1.6 var(--serif); letter-spacing: .08em; color: var(--ink-2); }
.hd__q span { margin-left: 8px; font-size: 12px; color: var(--ink-3); }

/* 右上：车头与木人 */
.read { position: fixed; right: 20px; top: 66px; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dial { width: 96px; height: 96px; display: block; }
.dial__ring { fill: rgba(244, 233, 212, .03); stroke: var(--line); stroke-width: 1.2; }
.dial__ticks line { stroke: rgba(217, 173, 91, .4); stroke-width: 1; }
.dial__ticks line.is-major { stroke: var(--gold); stroke-width: 1.6; }
.dial text { font: 700 11px/1 var(--serif); fill: var(--ink-3); text-anchor: middle; dominant-baseline: middle; }
.dial .dial__s { fill: var(--gold-2); font-size: 13px; }
.dial__car path { fill: var(--zhu-2); stroke: rgba(0, 0, 0, .4); stroke-width: .8; }
.dial__arm path { stroke: var(--gold-2); stroke-width: 3; stroke-linecap: round; }
.dial__arm circle { fill: var(--gold-2); }
.dial__hub { fill: var(--bg); stroke: var(--gold); stroke-width: 1.4; }
.read__dl { margin: 0; display: grid; gap: 6px; min-width: 128px; }
.read__dl div { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; }
.read__dl dt { font: 500 12px/1.4 var(--serif); letter-spacing: .2em; color: var(--ink-3); }
.read__dl dd { margin: 0; font: 600 15px/1.4 var(--mono); color: var(--ink); white-space: nowrap; }
#r-arm { color: var(--gold-2); }

/* 右侧：齿轮链 */
.gears { position: fixed; right: 20px; top: 194px; z-index: 4; width: 300px; padding: 16px 16px 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.gears__h { margin: 0 0 12px; font: 700 15px/1.3 var(--serif); letter-spacing: .2em; color: var(--gold); }
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.chain__side, .chain__mid { display: grid; gap: 6px; }
.chain__mid { align-self: center; }
.node { display: grid; gap: 1px; padding: 7px 8px 6px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel-2); transition: border-color .2s, background .2s, box-shadow .2s; }
.node b { font: 700 12.5px/1.25 var(--serif); letter-spacing: .04em; }
.node i { font: 400 11px/1.3 var(--mono); font-style: normal; color: var(--ink-3); }
.node em { font: 600 12.5px/1.35 var(--mono); font-style: normal; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node { min-width: 0; }
.node b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node--big { border-color: var(--line); }
.chain__mid .node em { white-space: normal; }
.node--fig em { color: var(--gold-2); }
.node.is-on { border-color: rgba(241, 160, 80, .85); background: rgba(241, 140, 60, .12); box-shadow: 0 0 0 1px rgba(241, 160, 80, .25), 0 0 22px -6px rgba(241, 140, 60, .7); }
.node.is-on em { color: #ffcf8a; }
.gears__say { margin: 12px 0 0; min-height: 4.2em; font: 400 13px/1.65 var(--sans); color: var(--ink-2); }
.gears__sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--ink-3); }
.gears__sum b { font: 600 12px/1.5 var(--mono); color: var(--gold); letter-spacing: .02em; }
.gears__note { margin: 8px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-3); }

/* 左侧：看法 */
.opts { position: fixed; left: 28px; top: 214px; z-index: 5; display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px 0 8px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); font: 500 14px/1 var(--serif); letter-spacing: .12em; color: var(--ink-2); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .2s, color .2s, background .2s; }
.opt__i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(244, 233, 212, .07); font: 600 13px/1 var(--mono); color: var(--gold); letter-spacing: 0; }
.opt:hover { color: var(--ink); border-color: var(--line); }
.opt[aria-pressed="true"], .opt[aria-expanded="true"] { color: var(--ink); border-color: rgba(241, 160, 80, .8); background: rgba(192, 50, 31, .28); }
.opt[aria-pressed="true"] .opt__i, .opt[aria-expanded="true"] .opt__i { background: var(--zhu); color: var(--ink); }
.opt[data-opt="snd"][aria-pressed="false"] .opt__i { color: var(--ink-3); text-decoration: line-through; }

/* 下方：驾车 */
.drive { position: fixed; left: 50%; bottom: 22px; z-index: 5; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; }
.drive__hint { margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(11, 9, 8, .62); font: 400 13px/1.5 var(--sans); color: var(--ink-2); text-align: center; transition: opacity .4s; }
.drive__hint.is-off { opacity: 0; }
.pad { display: flex; gap: 8px; padding: 8px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pad__b { display: grid; place-items: center; gap: 2px; width: 74px; height: 64px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(244, 233, 212, .04); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; transition: background .15s, border-color .15s, transform .1s; }
.pad__b span { font: 600 20px/1 var(--mono); color: var(--gold-2); }
.pad__b small { font: 500 12px/1 var(--serif); letter-spacing: .14em; color: var(--ink-2); }
.pad__b:hover { border-color: var(--line); }
.pad__b.is-down { background: var(--zhu); border-color: var(--zhu-2); transform: translateY(1px); }
.pad__b.is-down span, .pad__b.is-down small { color: var(--ink); }
.quick { display: flex; gap: 8px; }
.quick__b { min-height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); font: 500 13.5px/1 var(--serif); letter-spacing: .1em; color: var(--ink-2); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.quick__b:hover { color: var(--ink); border-color: var(--line); }
.quick__b:active { background: rgba(192, 50, 31, .35); }

/* 剖开时的构件名 */
.tags { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.tag { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); padding: 3px 8px 4px; border: 1px solid rgba(241, 160, 80, .55); border-radius: 6px; background: rgba(11, 9, 8, .78); font: 600 12px/1.35 var(--serif); letter-spacing: .06em; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .3s; }
.tag small { display: block; font: 500 10.5px/1.3 var(--mono); color: var(--gold); letter-spacing: .02em; }
.tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 14px; background: rgba(241, 160, 80, .55); }
.tags.is-on .tag { opacity: 1; }
.tag.is-hid { opacity: 0 !important; }

.target { position: fixed; left: 0; top: 0; z-index: 2; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid var(--gold-2); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .3s; }
.target::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--gold-2); }
.target.is-on { opacity: .9; }

/* 说明 */
.info { position: fixed; left: 0; top: 0; bottom: 0; z-index: 8; width: min(460px, 100%); background: rgba(14, 10, 8, .96); border-right: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.info__in { padding: 34px 32px 48px; }
.info__x { position: sticky; top: 0; float: right; width: 40px; height: 40px; margin: -14px -14px 0 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); font: 400 22px/1 var(--sans); cursor: pointer; }
.info h2 { margin: 0 0 14px; font: 900 34px/1.2 var(--serif); letter-spacing: .14em; }
.info h3 { margin: 26px 0 10px; font: 700 16px/1.4 var(--serif); letter-spacing: .14em; color: var(--gold); }
.info p { margin: 0 0 12px; font: 400 14.5px/1.9 var(--serif); color: var(--ink-2); }
.info blockquote { margin: 0 0 12px; padding: 12px 16px; border-left: 3px solid var(--zhu); background: rgba(192, 50, 31, .1); font: 500 15px/1.95 var(--serif); color: var(--ink); }
.info cite { display: block; margin-top: 6px; font: 400 12px/1.5 var(--serif); font-style: normal; color: var(--ink-3); }
.info__t { width: 100%; margin: 0 0 10px; border-collapse: collapse; font: 400 13.5px/1.5 var(--serif); }
.info__t th, .info__t td { padding: 7px 6px; border-bottom: 1px solid var(--line-2); text-align: left; }
.info__t th { font-weight: 700; font-size: 12px; letter-spacing: .14em; color: var(--ink-3); }
.info__t td:last-child, .info__t th:last-child { text-align: right; }
.info__note { font-size: 13.5px !important; }

.nojs { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; font: 500 16px/1.6 var(--serif); }

/* 中等宽度：右栏收窄 */
@media (max-width: 1180px) {
	.gears { width: 270px; }
	.hd__t { font-size: 54px; }
}
@media (max-height: 760px) and (min-width: 761px) {
	.gears__note { display: none; }
	.hd__t { font-size: 48px; }
	.opts { top: 172px; gap: 6px; }
	.opt { min-height: 36px; }
	.gears { top: 180px; }
	.gears__say { min-height: 3.2em; }
	.pad__b { height: 56px; }
	.drive__hint { display: none; }
}

/* 手机 */
@media (max-width: 760px) {
	body { font-size: 14px; }
	.hd { left: 16px; top: 14px; max-width: calc(100vw - 190px); }
	.hd__t { font-size: 34px; letter-spacing: .1em; }
	.hd__s { margin-top: 6px; font-size: 11.5px; letter-spacing: .06em; }
	.hd__q { display: none; }
	.read { right: 12px; top: 58px; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px; }
	.dial { width: 62px; height: 62px; }
	.read__dl { min-width: 0; gap: 2px; }
	.read__dl dt { font-size: 11px; letter-spacing: .1em; }
	.read__dl dd { font-size: 12.5px; }
	.opts { left: 12px; right: 12px; top: auto; bottom: 238px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
	.opts::-webkit-scrollbar { display: none; }
	.opt { flex: none; min-height: 34px; padding: 0 11px 0 5px; gap: 6px; font-size: 13px; letter-spacing: .06em; }
	.opt__i { width: 22px; height: 22px; font-size: 12px; }
	.gears { left: 12px; right: 12px; top: auto; bottom: 128px; width: auto; padding: 8px 10px; border-radius: 12px; }
	.gears__h, .gears__sum, .gears__note { display: none; }
	.chain { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
	.chain__side { gap: 4px; }
	.chain__side .node[data-k="foot"], .chain__side .node[data-k="zi"] { display: none; }
	.chain__mid .node--fig { display: none; }
	.node { padding: 4px 6px; border-radius: 7px; }
	.node b { font-size: 11px; }
	.node i { display: none; }
	.node em { font-size: 11px; }
	.gears__say { margin-top: 6px; min-height: 0; font-size: 11.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.drive { left: 12px; right: 12px; bottom: 12px; transform: none; gap: 8px; }
	.drive__hint { display: none; }
	.pad { width: 100%; justify-content: space-between; gap: 6px; padding: 6px; border-radius: 16px; }
	.pad__b { flex: 1; width: auto; height: 54px; border-radius: 12px; }
	.quick { width: 100%; }
	.quick__b { flex: 1; min-height: 36px; padding: 0 6px; font-size: 13px; }
	.info__in { padding: 64px 20px 40px; }
	.info__x { margin-top: -50px; }
	.info h2 { font-size: 28px; }
}
@media (max-width: 380px) {
	.hd__t { font-size: 30px; }
	.read__dl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
/* 海报模式：只留画面 */
.is-poster .hd, .is-poster .read, .is-poster .gears, .is-poster .opts, .is-poster .drive, .is-poster .tags, .is-poster .target, .is-poster .wk-pill { display: none !important; }
