/* 蒋澈 · 学术名片 · 检索表与标本柜
   博物学史家的名片做成一只标本柜：左边一张检索表（可以切换成系统表），右边一张张台纸。
   台纸右下角贴标本签，旁边是后来人贴上的追问。色板取自柜子与标本：灰绿的柜体、台纸白、
   墨黑，抽屉框的深青，标本签的赭黄，模式标本的红。 */

:root {
  --cab: #d5dcd2;
  --cab-2: #c3ccbf;
  --slip: #eef1ea;
  --sheet: #f8f8f3;
  --bed: #ecebe3;
  --ink: #1f1c17;
  --ink-2: #504c44;
  --ink-3: #847f74;
  --rule: rgba(31, 28, 23, .16);
  --teal: #23423d;
  --verd: #2b675f;
  --verd-2: rgba(43, 103, 95, .12);
  --ochre: #c38c27;
  --ochre-2: rgba(195, 140, 39, .2);
  --red: #b0261c;
  --manila: #d3c294;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --disp: "ZCOOL XiaoWei", "Noto Serif SC", "Songti SC", serif;
  --lat: "IM Fell English", "Noto Serif SC", "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--cab); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.jc {
  margin: 0; color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.9;
  background: var(--cab) radial-gradient(circle, rgba(31, 28, 23, .085) 1px, transparent 1.6px) 0 0 / 22px 22px;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
a { color: var(--ink); text-decoration-color: rgba(43, 103, 95, .45); text-underline-offset: .22em; }
a:hover { color: var(--verd); text-decoration-color: var(--verd); }
:focus-visible { outline: 2px solid var(--verd); outline-offset: 2px; }
::selection { background: var(--ochre-2); }
button { font: inherit; color: inherit; }
i[lang="la"], .la { font-family: var(--lat); font-style: italic; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--sheet); padding: 6px 12px; }
.skip:focus { top: 12px; }

/* ---------- 顶栏 ---------- */
.jbar { display: flex; align-items: center; gap: 16px; max-width: 1300px; margin: 0 auto; padding: 18px 24px 0; font-size: 14px; }
.jbar__logo { display: grid; place-items: center; width: 36px; height: 36px; background: var(--teal); color: var(--bed); }
.jbar__logo svg { width: 16px; height: 18px; }
.jbar__t { margin: 0; letter-spacing: .04em; }
.jbar__t span { margin-left: 10px; color: var(--ink-3); }
.jbar__nav { margin-left: auto; display: flex; gap: 20px; }
.jbar__nav a { text-decoration: none; color: var(--ink-2); }
.jbar__nav a:hover { color: var(--verd); }

.wrap { display: grid; grid-template-columns: 300px minmax(0, 900px); justify-content: center; gap: 40px; max-width: 1300px; margin: 0 auto; padding: 22px 24px 80px; }

/* ---------- 检索表 ---------- */
.key { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; }
.key__in { position: relative; padding: 18px 16px 16px; background: var(--slip); border: 1px solid var(--rule); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 14px 30px -22px rgba(20, 40, 36, .5); }
.key__h { margin: 0 0 10px; font-family: var(--disp); font-size: 24px; line-height: 1.2; }
.key__h small { display: block; margin-top: 4px; font-family: var(--serif); font-size: 12.5px; color: var(--ink-3); }
.key__note { margin: 14px 0 0; padding-top: 10px; border-top: 1px dashed var(--rule); font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--ink); background: var(--sheet); }
.seg button { padding: 5px 14px; border: 0; border-left: 1px solid var(--ink); background: transparent; font-size: 14px; line-height: 1.5; cursor: pointer; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--verd-2); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--sheet); }
.seg--key { margin-bottom: 14px; }

.kl { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.55; }
.kc { position: relative; padding: 3px 0 3px calc(var(--lv) * 15px); color: var(--ink-2); transition: color .2s; }
.kn { display: inline-block; min-width: 1.4em; font-family: var(--lat); font-size: 15px; color: var(--ink-3); }
.kc--leaf .kt { color: inherit; }
.kq { position: relative; display: flex; align-items: baseline; gap: 6px; margin: 2px 0 4px; padding: 2px 6px 2px 50px; text-decoration: none; color: var(--ink); line-height: 1.5; border-radius: 2px; }
.kd { position: absolute; left: 4px; top: .95em; width: 40px; border-top: 2px dotted var(--ink-3); }
.kno { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border: 1px solid currentColor; font-family: var(--lat); font-size: 12px; line-height: 1; }
.kq:hover { background: var(--verd-2); color: var(--ink); }
.kl.has-on .kc { color: var(--ink-3); }
.kl.has-on .kc.on { color: var(--ink); font-weight: 600; }
.kl.has-on .kc.on .kn { color: var(--red); }
.kc--leaf.on .kq { background: var(--ochre-2); }
.kc--leaf.on .kd { opacity: 0; }

.sys { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.5; }
.sys th, .sys td { border: 1px solid var(--rule); padding: 6px 6px; vertical-align: top; text-align: left; }
.sys thead th { font-weight: 400; font-size: 12px; color: var(--ink-3); background: rgba(31, 28, 23, .04); }
.sys .sc { width: 50px; font-weight: 400; color: var(--ink-3); }
.sys .sc b { display: block; color: var(--ink); font-weight: 600; }
.sys .so { width: 44px; color: var(--ink-2); }
.sys .so i { font-style: normal; color: var(--ink-3); }
.sys .ss { position: relative; }
.sys .ss a { display: flex; gap: 6px; align-items: baseline; text-decoration: none; }
.sys .ss--empty span { display: block; padding: 2px 6px; border: 1px dashed var(--ink-3); color: var(--ink-3); font-size: 12.5px; }
.sys tr.on .ss { background: var(--ochre-2); }
.sys tr.on .ss a { font-weight: 600; }

.hopper { position: absolute; left: 0; top: 0; z-index: 3; width: 46px; height: 25px; padding: 0; border: 0; background: none; cursor: pointer; will-change: transform; }
.hopper img { display: block; width: 100%; height: auto; filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .25)); }
.hopper:hover img { transform: translateY(-2px) rotate(-6deg); transition: transform .15s; }
.hopper.jump img { animation: jump .45s ease-out; }
@keyframes jump { 40% { transform: translateY(-12px) rotate(-14deg); } }
.key-open { display: none; }

/* ---------- 名片（标本盒） ---------- */
.hero { margin-bottom: 64px; }
.drawer { position: relative; padding: 16px; background: var(--teal); border-radius: 3px; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 24px 44px -28px rgba(10, 30, 26, .8); }
.drawer::after { content: ""; position: absolute; inset: 16px; pointer-events: none; background: linear-gradient(118deg, rgba(255, 255, 255, .2) 0 14%, transparent 14% 62%, rgba(255, 255, 255, .09) 62% 66%, transparent 66%); }
.drawer__bed { position: relative; aspect-ratio: 16 / 8.6; background: var(--bed) radial-gradient(circle, rgba(31, 28, 23, .09) .9px, transparent 1.4px) 0 0 / 12px 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), inset 0 3px 10px rgba(0, 0, 0, .18); overflow: hidden; }
.pins { list-style: none; margin: 0; padding: 0; }
.pin { position: absolute; left: var(--x); top: var(--y); width: var(--w); transform: rotate(var(--r)); }
.pin img { display: block; width: 100%; height: auto; filter: drop-shadow(3px 7px 5px rgba(20, 24, 20, .28)); }
.pin::before { content: ""; position: absolute; z-index: 2; left: 50%; top: 42%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d9d6cc 0 18%, #2a2723 40%); box-shadow: 1px 2px 2px rgba(0, 0, 0, .35); }
.pin__no { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%) rotate(calc(var(--r) * -1)); padding: 0 6px; background: #fffef9; border: 1px solid rgba(31, 28, 23, .35); font-family: var(--lat); font-style: italic; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.drawer__lab { position: absolute; z-index: 3; left: 3.5%; bottom: 7%; padding: 14px 22px 12px; background: #fffef9; border: 1px solid var(--ink); box-shadow: 0 0 0 4px #fffef9, 0 0 0 5px var(--ink), 4px 8px 10px -4px rgba(0, 0, 0, .3); }
.drawer__lab h1 { margin: 0; font-family: var(--disp); font-weight: 400; font-size: clamp(54px, 7vw, 86px); line-height: 1; letter-spacing: .06em; }
.drawer__lab .en { margin: 8px 0 0; font-family: var(--lat); font-style: italic; font-size: 20px; line-height: 1.2; color: var(--ink-2); }
.drawer__lab .en span { margin-left: 12px; font-style: normal; }
.drawer__cap { margin: 10px 2px 26px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

.id { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.who { margin: 0 0 10px; font-weight: 700; font-size: 23px; line-height: 1.55; }
.now { margin: 0 0 16px; padding: 8px 12px; background: var(--sheet); border-left: 4px solid var(--verd); font-size: 15.5px; line-height: 1.75; }
.facts { margin: 0 0 18px; font-size: 15px; line-height: 1.9; color: var(--ink-2); }
.go { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.jb { display: inline-block; padding: 7px 16px; border: 1px solid var(--ink); background: var(--sheet); font-size: 15px; line-height: 1.5; text-decoration: none; color: var(--ink); }
.jb:hover { background: var(--ink); color: var(--sheet); }
.jb--on { background: var(--ink); color: var(--sheet); }
.jb--on:hover { background: var(--verd); border-color: var(--verd); color: #fff; }
.note { margin: 22px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* 目录卡：横线、红线、穿杆孔 */
.card { position: relative; padding: 14px 20px 40px; background: #fbfbf7 repeating-linear-gradient(to bottom, transparent 0 27px, rgba(73, 110, 160, .16) 27px 28px) 0 44px / 100% 100% no-repeat; border: 1px solid rgba(31, 28, 23, .2); box-shadow: 0 10px 22px -18px rgba(0, 0, 0, .5); font-size: 14px; line-height: 28px; }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 40px; border-top: 1.5px solid rgba(176, 38, 28, .55); }
.card__hole { position: absolute; left: 50%; bottom: 12px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--cab); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.mk { margin: 0; font-size: 12.5px; letter-spacing: .1em; color: var(--ink-3); }
.card .mk { line-height: 28px; }
.card .mk:first-child { margin-bottom: 0; }
.feats, .works { list-style: none; margin: 0 0 6px; padding: 0; }
.feats li { position: relative; padding-left: 14px; }
.feats li::before { content: ""; position: absolute; left: 0; top: 12px; width: 5px; height: 5px; background: var(--ochre); }
.works li { line-height: 1.6; margin: 4px 0 8px; }
.works small { display: block; font-size: 12.5px; color: var(--ink-3); }
.links { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 0; font-size: 13.5px; }

/* ---------- 台纸 ---------- */
.sheet { position: relative; margin: 0 0 64px; scroll-margin-top: 16px; }
.sheet::before { content: ""; position: absolute; inset: 10px -10px -10px 10px; background: var(--manila); box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.sheet__in { position: relative; padding: 40px 52px 36px; background: var(--sheet); box-shadow: 0 1px 1px rgba(0, 0, 0, .07), 0 18px 40px -26px rgba(20, 40, 36, .55); }
.path { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 18px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.path__h { margin-right: 6px; padding: 0 6px; border: 1px solid var(--ink-3); font-size: 12px; }
.path b { margin-right: 3px; font-family: var(--lat); font-weight: 400; font-size: 14px; color: var(--red); }
.path .sep { color: var(--ink-3); }
.sheet h2 { margin: 0 0 18px; font-family: var(--disp); font-weight: 400; font-size: clamp(34px, 4.2vw, 50px); line-height: 1.2; letter-spacing: 0; }
.lede { max-width: 37em; margin: 0 0 24px; font-size: 17.5px; line-height: 1.95; }
.say { max-width: 34em; margin: 0 0 30px; padding: 4px 0 4px 20px; border-left: 3px solid var(--verd); }
.say p { margin: 0; font-size: 20px; line-height: 1.75; color: var(--teal); }
.say cite { display: block; margin-top: 8px; font-style: normal; font-size: 13px; color: var(--ink-3); }

.wg { margin: 30px 0; padding-top: 14px; border-top: 2px solid var(--ink); }
.wg__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 14px; font-weight: 700; font-size: 16px; }
.wg__h small { font-weight: 400; font-size: 13px; color: var(--ink-3); }
.wg figcaption, .plate figcaption { margin-top: 12px; font-size: 13px; line-height: 1.7; color: var(--ink-3); }
.wg__out { min-height: 3.6em; max-width: 40em; margin: 12px 0 0; font-size: 15.5px; line-height: 1.85; }

/* 装裱：图贴在台纸上，两角压着纸胶带 */
.mount { position: relative; display: inline-block; max-width: 100%; padding: 8px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 10px 18px -14px rgba(0, 0, 0, .5); }
.mount img { display: block; max-width: 100%; height: auto; }
.tape { position: absolute; width: 74px; height: 22px; background: rgba(236, 229, 205, .82); box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.tape.t1 { left: -18px; top: 12px; transform: rotate(-36deg); }
.tape.t2 { right: -18px; bottom: 12px; transform: rotate(-36deg); }
.plate { margin: 30px 0; }
.plate--narrow .mount { max-width: 340px; }
.plate--wide .mount { max-width: 100%; }
.plate figcaption { max-width: 44em; }

/* 台纸底部：文献、追问、标本签 */
.foot { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 250px); gap: 26px; align-items: end; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--rule); }
.refs .go { margin-top: 10px; }
.slips { display: grid; gap: 10px; align-self: end; }
.slip { display: block; padding: 8px 12px 9px; background: #f1f3ec; border: 1px solid rgba(31, 28, 23, .14); border-left: 5px solid var(--ochre); text-decoration: none; line-height: 1.55; }
.slip small { display: block; font-size: 11.5px; letter-spacing: .1em; color: var(--ink-3); }
.slip b { display: block; font-size: 15px; }
.slip span { display: block; font-size: 12.5px; color: var(--ink-2); }
.slip:hover { background: #e8ece2; border-left-color: var(--verd); color: var(--ink); }
.label { padding: 10px 12px 8px; background: #fffef9; border: 1.5px solid var(--ink); box-shadow: 3px 4px 0 rgba(31, 28, 23, .12); font-size: 13px; line-height: 1.6; }
.label__h { display: flex; justify-content: space-between; margin: 0 0 6px; padding-bottom: 5px; border-bottom: 1px solid var(--ink); font-size: 12px; letter-spacing: .06em; }
.label dl { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin: 0; }
.label dl div { display: flex; gap: 8px; }
.label dl div.w { grid-column: 1 / -1; }
.label dt { flex: none; color: var(--ink-3); }
.label dd { margin: 0; }

/* ---------- 机关：讲法 ---------- */
.wg-rev svg { display: block; width: 100%; height: auto; margin-top: 12px; color: var(--red); font-family: var(--serif); }
.wg-rev .ax line, .wg-rev .ax path { stroke: var(--ink-3); stroke-width: 1.2; fill: none; }
.wg-rev .ax text, .wg-rev .tk text { font-size: 12px; fill: var(--ink-3); text-anchor: middle; }
.wg-rev .tk line { stroke: var(--ink-3); }
.wg-rev .sr rect { fill: var(--verd-2); stroke: var(--verd); stroke-width: 1.2; }
.wg-rev .sr text { font-size: 14px; fill: var(--verd); text-anchor: middle; }
.wg-rev .sr .yr { font-family: var(--lat); font-size: 13px; text-anchor: start; }
.wg-rev .sr .yr[text-anchor="end"] { text-anchor: end; }
.wg-rev .nh-l { font-size: 14px; font-weight: 700; fill: var(--ink); }
.wg-rev[data-v="jiang"] .nh-l { display: none; }
.wg-rev .v { display: none; }
.wg-rev .v text { font-size: 13px; fill: var(--ink-2); }
.wg-rev[data-v="sarton"] .v-sarton, .wg-rev[data-v="foucault"] .v-foucault, .wg-rev[data-v="ogilvie"] .v-ogilvie, .wg-rev[data-v="jiang"] .v-jiang { display: inline; }
.wg-rev .nh { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; fill: none; }
.wg-rev .nh--dim { stroke: var(--ink-3); stroke-dasharray: 3 7; stroke-width: 3; }
.wg-rev .nh--hot { stroke: var(--ochre); stroke-width: 7; }
.wg-rev .nh--th { stroke: var(--ink-2); stroke-width: 2.5; }
.wg-rev .back { stroke: var(--red); stroke-width: 2; stroke-dasharray: 5 4; fill: none; }
.wg-rev .brk { stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.wg-rev .link { stroke: var(--verd); stroke-width: 1.6; stroke-dasharray: 2 4; }
.wg-rev .dot { fill: var(--ochre); stroke: var(--ink); stroke-width: 1.5; }

/* ---------- 机关：方法与系统 ---------- */
.wg-ray { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px 30px; }
.wg-ray > figcaption { grid-column: 1 / -1; margin-top: 0; }
.ray__ctx { margin: 0 0 10px; font-size: 13px; color: var(--ink-3); }
.ray__q { display: grid; gap: 8px; }
.ray__q button { display: grid; grid-template-columns: 28px 1fr; align-items: baseline; gap: 2px 6px; width: 100%; padding: 9px 12px; text-align: left; background: var(--sheet); border: 1px solid var(--ink); cursor: pointer; line-height: 1.55; }
.ray__q button:hover { background: var(--ochre-2); }
.ray__q .n { grid-row: span 2; font-family: var(--lat); font-size: 17px; color: var(--red); }
.ray__q i { font-size: 14px; color: var(--ink-3); }
.ray__res { padding: 12px 14px; border: 2px solid var(--ink); background: #fffef9; }
.ray__res b { display: block; font-family: var(--lat); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: .08em; }
.ray__res span { display: block; margin-top: 4px; font-size: 16px; }
.ray__trail { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); counter-reset: t; }
.ray__trail li { counter-increment: t; padding-left: 22px; position: relative; }
.ray__trail li::before { content: counter(t) "."; position: absolute; left: 0; font-family: var(--lat); color: var(--ink-3); }
.ray__re { margin-top: 10px; padding: 4px 12px; border: 1px solid var(--ink-3); background: transparent; font-size: 13.5px; cursor: pointer; }
.ray__re:hover { border-color: var(--ink); }
.lin__r { display: grid; grid-template-columns: 88px 1fr; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.lin__c { grid-row: span 2; margin: 0; font-size: 13.5px; line-height: 1.4; }
.lin__c b { display: block; font-weight: 600; }
.lin__c i { font-size: 13px; color: var(--ink-3); }
.lin__o { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.lin__g { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.lin__g li { padding: 2px 8px; border: 1px solid var(--ink-3); background: var(--sheet); font-size: 12.5px; line-height: 1.5; transition: background .25s, border-color .25s; }
.lin__g li i { margin-right: 4px; font-size: 13.5px; }
.lin__g li span { color: var(--ink-2); }
.lin__g li.gap { border-style: dashed; color: var(--ink-3); }
.lin__g li.on { background: var(--ochre); border-color: var(--ink); }
.lin__g li.alt { border-color: var(--red); border-style: dashed; }
.lin__out { min-height: 4.8em; margin: 10px 0 0; font-size: 14.5px; line-height: 1.75; }

/* ---------- 机关：三种媒介 ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 18px; border-bottom: 1px solid var(--ink); }
.tabs button { padding: 7px 14px; border: 1px solid transparent; border-bottom: 0; background: transparent; font-size: 14.5px; cursor: pointer; margin-bottom: -1px; }
.tabs button:hover { color: var(--verd); }
.tabs button[aria-selected="true"] { background: var(--sheet); border-color: var(--ink); border-bottom: 1px solid var(--sheet); font-weight: 700; }
.hb__p { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.hb__p p { margin: 0; font-size: 15.5px; line-height: 1.9; }
.hb__im { justify-self: start; }

/* ---------- 机关：轮图 ---------- */
.rota { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: center; }
.rota svg { display: block; width: 100%; height: auto; font-family: var(--serif); }
.rota .rim { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.rota .rq { cursor: pointer; outline: none; }
.rota .rq path { stroke: var(--sheet); stroke-width: 2; transition: opacity .25s; }
.rota .rq[data-q="ver"] path { fill: #5f8452; }
.rota .rq[data-q="aes"] path { fill: var(--red); }
.rota .rq[data-q="aut"] path { fill: #b9862a; }
.rota .rq[data-q="hie"] path { fill: #3f5c80; }
.rota .rq .r2 { opacity: .78; }
.rota .rq .r1 { opacity: .55; }
.rota .rq text { fill: #fff; font-size: 17px; pointer-events: none; }
.rota .rq .t1 { font-size: 13.5px; }
.rota .rq:focus-visible path { stroke: var(--ink); stroke-width: 3; }
.rota svg.picked .rq:not(.on) path { opacity: .2; }
.rota svg.picked .rq:not(.on) text { fill: var(--ink-3); }
.rota .tq { font-size: 14px; fill: var(--ink); font-weight: 700; }
.rota .hub { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.2; }
.rota .th { font-size: 12.5px; fill: var(--ink); }
.rota__out { margin: 0; font-size: 16px; line-height: 1.9; }
.rota__out b { font-family: var(--disp); font-weight: 400; font-size: 26px; display: block; }

/* ---------- 机关：谱系校勘 ---------- */
.stem { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 26px; align-items: start; }
.stem svg { display: block; width: 100%; height: auto; font-family: var(--lat); }
.stem .edges path { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.stem .edges .cp { stroke-dasharray: 3 3; }
.stem .lost circle { fill: var(--sheet); stroke: var(--ink-3); stroke-dasharray: 3 3; stroke-width: 1.5; }
.stem .lost text { font-size: 17px; font-style: italic; fill: var(--ink-3); }
.stem .ms { cursor: pointer; outline: none; }
.stem .ms rect { fill: #fffef9; stroke: var(--ink); stroke-width: 1.5; transition: fill .2s, opacity .2s; }
.stem .ms text { font-size: 17px; fill: var(--ink); pointer-events: none; }
.stem .ms:hover rect, .stem .ms.on rect { fill: var(--ochre); }
.stem .ms:focus-visible rect { stroke: var(--verd); stroke-width: 3; }
.wg-stem[data-s] .ms[data-m="d"] { opacity: .35; }
.wg-stem[data-s="2"] .ms[data-m="c"] rect, .wg-stem[data-s="3"] .ms[data-m="c"] rect { stroke: var(--red); }
.wg-stem[data-s="3"] .lost circle:first-child { fill: var(--ochre); stroke: var(--ink); stroke-dasharray: none; }
.wg-stem[data-s="3"] .lost text:nth-of-type(1) { fill: var(--ink); }
.stem__read { min-height: 3.4em; margin: 0 0 6px; font-family: var(--lat); font-style: italic; font-size: 21px; line-height: 1.55; }
.stem__read .hint { font-family: var(--serif); font-style: normal; font-size: 15px; color: var(--ink-3); }
.stem__read b { font-weight: 400; color: var(--red); text-decoration: underline wavy rgba(176, 38, 28, .5); text-underline-offset: .2em; }
.stem__note { min-height: 3.2em; margin: 0 0 12px; font-size: 14.5px; line-height: 1.8; color: var(--ink-2); }
.stem__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stem__steps li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; font-size: 13.5px; line-height: 1.7; color: var(--ink-3); }
.stem__steps button { padding: 3px 12px; border: 1px solid var(--ink); background: var(--sheet); font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.stem__steps button:hover { background: var(--ochre-2); }
.stem__steps li.done { color: var(--ink); }
.stem__steps li.done button { background: var(--ink); color: var(--sheet); }

/* ---------- 机关：模式 ---------- */
.tray { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 0; margin-top: 16px; padding: 18px; background: var(--bed) radial-gradient(circle, rgba(31, 28, 23, .09) .9px, transparent 1.4px) 0 0 / 12px 12px; border: 10px solid var(--teal); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .18); }
.pop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 12px; list-style: none; margin: 0; padding: 0 12px 0 0; align-items: center; }
.ind { position: relative; display: grid; place-items: center; transition: opacity .35s, filter .35s, transform .35s; }
.ind img { display: block; width: calc(100% * var(--s)); height: auto; filter: hue-rotate(var(--h)) brightness(var(--b)) drop-shadow(2px 4px 3px rgba(20, 24, 20, .25)); }
.ind .tl { position: absolute; right: -2px; bottom: -10px; padding: 0 6px; background: var(--red); color: #fff; font-size: 12px; line-height: 18px; letter-spacing: .1em; }
.wg-type[data-v="ess"] .ind:not(.is-type) { opacity: .32; filter: grayscale(.8); }
.wg-type[data-v="ess"] .is-type { transform: scale(1.18); z-index: 1; }
.other { display: grid; place-items: center; align-content: center; gap: 8px; padding-left: 14px; border-left: 2px dashed var(--red); transition: opacity .35s; }
.other img { width: 100%; height: auto; filter: drop-shadow(2px 4px 3px rgba(20, 24, 20, .25)); }
.other span { font-size: 13px; color: var(--red); }
.wg-type[data-v="ess"] .other { opacity: .12; }

/* ---------- 机关：四部书 ---------- */
.bks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.bk { padding: 10px 10px 8px; background: #fffef9; border: 1px solid rgba(31, 28, 23, .3); border-top: 4px solid var(--ink); transition: opacity .25s; }
.bk__t { margin: 0 0 8px; line-height: 1.4; }
.bk__t b { display: block; font-family: var(--disp); font-weight: 400; font-size: 19px; }
.bk__t small { font-size: 12px; color: var(--ink-3); }
.bk ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.bk li { padding: 0 6px; border: 1px solid var(--rule); font-size: 12.5px; line-height: 1.75; transition: background .25s; }
.bk li.on { background: var(--ochre); border-color: var(--ink); }
.bk__n { min-height: 3em; margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.wg-books.picked .bk.none { opacity: .6; }
.wg-books.picked .bk.none ul { opacity: .45; }

/* ---------- 师承 ---------- */
.cast { list-style: none; margin: 10px 0 0; padding: 0; columns: 2; column-gap: 34px; }
.cast li { break-inside: avoid; margin: 0 0 16px; font-size: 14.5px; line-height: 1.75; }
.cast li p { margin: 0; }
.cast li p:first-child { display: flex; align-items: baseline; gap: 10px; }
.cast b { font-size: 17px; }
.cast b a { text-decoration-color: var(--verd); }
.cast span { padding: 0 6px; border: 1px solid var(--ink-3); font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.foot--end { grid-template-columns: 1fr; align-items: start; }
.fine p { max-width: 46em; margin: 0 0 8px; font-size: 13px; line-height: 1.8; color: var(--ink-3); }
.fine a { color: var(--ink-2); }

/* ---------- 窄屏 ---------- */
@media (max-width: 1080px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 18px 16px 70px; }
  .key { position: fixed; z-index: 60; inset: 0; align-self: stretch; justify-self: stretch; max-height: none; padding: 16px 16px 80px; background: rgba(213, 220, 210, .97); display: none; overflow-y: auto; }
  body.key-on .key { display: block; }
  body.key-on { overflow: hidden; }
  .key__in { max-width: 420px; margin: 0 auto; }
  .key-open { position: fixed; z-index: 55; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border: 1px solid var(--ink); background: var(--sheet); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5); font-size: 14px; cursor: pointer; }
  .key-open img { width: 40px; height: auto; }
  body.key-on .key-open { z-index: 70; }
  .jbar { padding: 14px 16px 0; }
}
@media (max-width: 760px) {
  body.jc { font-size: 16px; }
  .hide-s { display: none; }
  .jbar__nav { gap: 14px; }
  .drawer { padding: 10px; }
  .drawer::after { inset: 10px; }
  .drawer__bed { aspect-ratio: 4 / 3.6; }
  .pin { width: calc(var(--w) * 1.25); }
  .pin__no { display: none; }
  .drawer__lab { left: 4%; bottom: 5%; padding: 10px 14px 8px; }
  .drawer__lab .en { font-size: 16px; }
  .id { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .who { font-size: 23px; }
  .sheet::before { inset: 6px -6px -6px 6px; }
  .sheet__in { padding: 26px 18px 24px; }
  .sheet h2 { font-size: 32px; }
  .lede { font-size: 16.5px; }
  .say p { font-size: 18px; }
  .foot { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .wg-ray, .hb__p, .rota, .stem { grid-template-columns: minmax(0, 1fr); }
  .hb__im { max-width: 300px; }
  .rota svg { max-width: 330px; }
  .tray { grid-template-columns: minmax(0, 1fr); padding: 12px; border-width: 7px; }
  .pop { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
  .other { grid-template-columns: 110px auto; justify-content: start; gap: 12px; padding: 12px 0 0; border-left: 0; border-top: 2px dashed var(--red); margin-top: 12px; }
  .bks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cast { columns: 1; }
  .wg-rev svg { min-width: 520px; }
  .wg-rev .svgx { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ind, .bk, .lin__g li, .rota .rq path { transition: none; }
  .hopper.jump img { animation: none; }
}
/* 追问署名里的关系标签：标本签上的小框 */
.slip span.rel { display: inline-block; margin-right: 6px; padding: 0 5px; border: 1px solid var(--verd); color: var(--verd); font-size: 11.5px; line-height: 1.55; letter-spacing: .08em; }

/* ---------- 群聊（对话录）：追问纸条下面，标本签式的小卡；点开是多人群聊窗口（窗口在 dlg.css，这里只配色） ---------- */
.jc .av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--av-bg); color: var(--av-fg);
  font: 700 11px/1 var(--serif); font-style: normal; letter-spacing: 0; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12) inset; }
.jc .slipcol { display: grid; gap: 14px; align-self: end; min-width: 0; }
.jc .talks { display: grid; gap: 8px; }
.jc .talk { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av n" "t t"; gap: 5px 10px; align-items: center; padding: 8px 12px 9px 9px;
  background: #fffef9; border: 1.5px solid var(--ink); box-shadow: 3px 4px 0 rgba(31, 28, 23, .12); color: var(--ink); text-decoration: none; line-height: 1.5; }
.jc .talk:hover, .jc .talk:focus-visible { background: #f2f5ee; border-color: var(--verd); color: var(--ink); }
.jc .talk__av { grid-area: av; display: flex; align-items: center; }
.jc .talk__av .av { width: 26px; height: 26px; font-size: 10px; margin-left: -8px; box-shadow: 0 0 0 2px #fffef9; }
.jc .talk__av .av:first-child { margin-left: 0; }
.jc .talk__av b { margin-left: 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.jc .talk__t { grid-area: t; font-weight: 700; font-size: 15px; }
.jc .talk__n { grid-area: n; font-size: 12.5px; color: var(--ink-2); letter-spacing: .04em; }
.jc .wm { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 2px 0 0; font-size: 15px; }
.jc .wm a { text-decoration-color: var(--verd); }
/* 群聊窗口：标本柜的灰绿，铜绿作强调 */
body.jc .dlg { --dlg-bg: #e3e8df; --dlg-paper: #f8f8f3; --dlg-ink: #1f1c17; --dlg-ink-2: #504c44; --dlg-ink-3: #67635a; --dlg-rule: rgba(31, 28, 23, .16);
  --dlg-me: #2b675f; --dlg-me-ink: #ffffff; --dlg-acc: #2b675f; --dlg-mod: rgba(43, 103, 95, .1); --dlg-font: var(--serif); }
