/* 注意力博物馆 · 样式
   颜色全部走 token。数据色取自 dataviz 参考调色板（已验证），浅深两套各自选定。 */

:root {
  color-scheme: light;
  --bg: #ecedea;
  --surface: #fcfcfb;
  --surface-2: #f4f4f2;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #6e6d69;
  --line: #d6d6d1;
  --line-strong: #a9a8a2;
  --focus: #2a78d6;

  /* 分类色：作者原版 / 官方移植 / 照论文复现；第三方整理用中性灰 */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c-other: #8f8e88;
  /* 顺序色阶（蓝），0 档贴近底色 */
  --s0: #eceeee; --s1: #cde2fb; --s2: #9ec5f4; --s3: #6da7ec; --s4: #3987e5; --s5: #256abf; --s6: #104281;
  --b4-ink: #0b0b0b; --b56-ink: #ffffff;
  --mat: #ffffff; --mat-pad: 6px;        /* 论文图的衬底 */

  --font-latin: "Archivo", system-ui, sans-serif;
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font: var(--font-latin), var(--font-cjk);
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --r: 3px;
  --gap: 16px;
  --max: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111110; --surface: #1a1a19; --surface-2: #222220;
    --ink: #f0efec; --ink-2: #c3c2b7; --ink-3: #9a998f;
    --line: #2f2f2c; --line-strong: #55544f; --focus: #6da7ec;
    --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c-other: #77766f;
    --s0: #20201f; --s1: #0d366b; --s2: #104281; --s3: #184f95; --s4: #256abf; --s5: #6da7ec; --s6: #cde2fb;
    --b4-ink: #ffffff; --b56-ink: #0b0b0b;
    --mat: #ecebe6; --mat-pad: 10px;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111110; --surface: #1a1a19; --surface-2: #222220;
  --ink: #f0efec; --ink-2: #c3c2b7; --ink-3: #9a998f;
  --line: #2f2f2c; --line-strong: #55544f; --focus: #6da7ec;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c-other: #77766f;
  --s0: #20201f; --s1: #0d366b; --s2: #104281; --s3: #184f95; --s4: #256abf; --s5: #6da7ec; --s6: #cde2fb;
  --b4-ink: #ffffff; --b56-ink: #0b0b0b;
  --mat: #ecebe6; --mat-pad: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.6 var(--font); font-stretch: 100%;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .86em; }
p, .label-mech { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font); line-height: 1.15; margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px max(16px, calc((100vw - var(--max)) / 2));
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.emblem { width: 26px; height: 26px; flex: none; }
.em-0 { fill: var(--s0); } .em-1 { fill: var(--s2); } .em-2 { fill: var(--s4); } .em-3 { fill: var(--s6); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-zh { font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.brand-en { font-size: 11px; color: var(--ink-3); font-stretch: 85%; letter-spacing: .02em; }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 6px 10px; text-decoration: none; color: var(--ink-2); border-radius: var(--r); white-space: nowrap; font-size: 14px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.tools { display: flex; gap: 6px; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-size: 13px;
}
.tool:hover { border-color: var(--line-strong); }
.tool svg { width: 16px; height: 16px; }

main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 32px 16px 64px; }
main:focus { outline: none; }
.loading { color: var(--ink-3); }
.foot { border-top: 1px solid var(--line); padding: 18px max(16px, calc((100vw - var(--max)) / 2)); color: var(--ink-3); font-size: 13px; }
.foot p { margin: 0; }

/* ---------- 通用版式 ---------- */
.page-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 760px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: .01em; font-stretch: 92%; }
.page-head p { margin: 0; color: var(--ink-2); }
.section { margin-top: 48px; }
.section > h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.section > .lede { color: var(--ink-2); margin: 0 0 16px; max-width: 760px; }
.muted { color: var(--ink-3); }
.miss { color: var(--ink-3); border-bottom: 1px dotted var(--line-strong); cursor: help; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: var(--r);
  cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 600;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn:hover { opacity: .88; }

/* ---------- 序厅 ---------- */
.foyer-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.foyer-title { font-size: clamp(40px, 7vw, 84px); font-weight: 800; line-height: .98; letter-spacing: .02em; font-stretch: 88%; }
.foyer-title .en { display: block; font-size: .32em; font-weight: 500; letter-spacing: .01em; color: var(--ink-2); margin-top: 14px; font-stretch: 100%; }
.curator { display: grid; gap: 14px; color: var(--ink-2); }
.curator p { margin: 0; }
.curator .sig { font-size: 13px; color: var(--ink-3); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.fact { padding: 16px 12px 16px 0; }
.fact + .fact { padding-left: 16px; border-left: 1px solid var(--line); }
.fact dt { font-size: 13px; color: var(--ink-3); }
.fact dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 注意力的注意力图 */
.amap-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; }
.amap { border-collapse: separate; border-spacing: 2px; font-size: 12px; min-width: 640px; width: 100%; }
.amap th { font-weight: 500; color: var(--ink-2); text-align: right; padding: 0 8px 0 0; white-space: nowrap; }
.amap thead th { text-align: center; padding: 0 0 4px; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.amap thead th.k { text-align: right; }
.amap td { padding: 0; }
.cell {
  display: block; width: 100%; height: 26px; border: 0; border-radius: 2px; cursor: pointer;
  font-size: 11px; font-variant-numeric: tabular-nums; color: transparent; background: var(--s0);
}
.cell[data-n="0"] { cursor: default; }
.cell:hover, .cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.cell.b1 { background: var(--s1); color: var(--ink); } .cell.b2 { background: var(--s2); color: var(--ink); } .cell.b3 { background: var(--s3); color: var(--ink); }
.cell.b4 { background: var(--s4); color: var(--b4-ink); } .cell.b5 { background: var(--s5); color: var(--b56-ink); } .cell.b6 { background: var(--s6); color: var(--b56-ink); }
.amap tfoot td { font-size: 11px; color: var(--ink-3); text-align: center; padding-top: 4px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 2px; vertical-align: -2px; margin-right: 5px; }
.legend .ramp { display: inline-flex; gap: 2px; align-items: center; }
.legend .ramp i { display: inline-block; width: 22px; height: 12px; border-radius: 2px; }

/* ---------- 论文图 ----------
   论文图多是白底。浅色模式直接放在白底上，深色模式给它一块浅色衬底，像装裱的版画。
   容器固定比例，图片加载前后版面不跳。 */
.fig { position: relative; aspect-ratio: 16 / 10; background: var(--mat); overflow: hidden; container-type: inline-size; }
.fig img { position: absolute; inset: var(--mat-pad); width: calc(100% - 2 * var(--mat-pad)); height: calc(100% - 2 * var(--mat-pad)); object-fit: contain; }
.fig.big { aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--r); }
.fig.thumb { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 2px; --mat-pad: 3px; }
.fig.mini { aspect-ratio: 4 / 3; width: 72px; flex: none; border: 1px solid var(--line); border-radius: 2px; --mat-pad: 2px; }
.fig-ph { background: var(--surface-2); }
.fig-ph .ph-name { position: absolute; left: 6%; bottom: 10%; max-width: 46%; font-size: clamp(14px, 6.2cqw, 40px); font-weight: 800; font-stretch: 85%; line-height: 1.05; color: var(--ink); overflow-wrap: break-word; hyphens: auto; }
.fig-ph .ph-note { position: absolute; left: 6%; top: 8%; font-size: 11.5px; color: var(--ink-3); }
.fig.thumb.fig-ph .ph-name, .fig.thumb.fig-ph .ph-note, .fig.mini.fig-ph .ph-name, .fig.mini.fig-ph .ph-note { display: none; }
.fig-cap { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 12px; color: var(--ink-3); }
.fig-no { font-variant-numeric: tabular-nums; }
.out { position: relative; z-index: 2; color: var(--ink-2); }
.out:hover { color: var(--ink); }

/* ---------- 展签卡片 ---------- */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.label {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
}
.label:hover { border-color: var(--line-strong); }
.label > .fig { border-bottom: 1px solid var(--line); }
.label > .fig-cap { padding: 7px 14px 0; }
.label.pending, .label.candidate { background: transparent; border-style: dashed; }
.label.skipped { background: transparent; border-style: dotted; opacity: .8; }
.label-body { display: grid; gap: 6px; padding: 8px 14px 12px; flex: 1; align-content: start; }
.label-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.label-year { font-size: 20px; font-weight: 800; font-stretch: 80%; font-variant-numeric: tabular-nums; line-height: 1; }
.label-year.none { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.label-name { font-size: 18px; font-weight: 700; line-height: 1.2; font-stretch: 90%; word-break: break-word; }
.label-name a { text-decoration: none; }
.label-name a::after { content: ""; position: absolute; inset: 0; }
.label-name small { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-top: 3px; font-stretch: 100%; }
.label-mech { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.label-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.label-venue { font-size: 12px; color: var(--ink-3); text-align: right; }

/* ---------- 导览 ---------- */
.thesis { font-size: 19px; line-height: 1.6; color: var(--ink); }
.thesis p { margin: 0 0 .6em; }
.rooms { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.room-entry a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: center; }
.room-entry a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.room-no { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.room-entry h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; font-stretch: 90%; margin: 4px 0 6px; }
.room-entry p { margin: 0; color: var(--ink-2); max-width: 640px; }
.room-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.room { max-width: 980px; }
.room-crumb { display: flex; gap: 14px; font-size: 13px; color: var(--ink-3); margin-bottom: 26px; }
.room-head { display: grid; gap: 8px; margin-bottom: 26px; max-width: 760px; }
.room-years { font-size: clamp(36px, 6vw, 64px); font-weight: 800; font-stretch: 75%; line-height: .95; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.room-head h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; font-stretch: 88%; }
.room-lede { margin: 0; font-size: 18px; color: var(--ink-2); }
.room-body { max-width: 680px; font-size: 16.5px; line-height: 1.75; }
.room-body p { margin: 0 0 1em; }
.room-objects-h { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; margin: 44px 0 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.room-objects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 28px; margin: 0 0 40px; }
.anchor { margin: 0; display: grid; gap: 10px; align-content: start; }
.anchor-fig { display: block; }
.anchor figcaption { display: grid; gap: 6px; }
.anchor-meta { display: flex; gap: 12px; align-items: baseline; }
.anchor h3 { font-size: 20px; font-weight: 800; font-stretch: 90%; }
.anchor h3 a { text-decoration: none; }
.anchor h3 small { display: inline; margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.anchor p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.room-all { margin: 8px 0 40px; }
.room-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }
.pager { display: grid; gap: 2px; text-decoration: none; padding: 10px 0; }
.pager small { color: var(--ink-3); font-size: 12.5px; }
.pager b { font-size: 17px; font-stretch: 92%; }
.pager.next { text-align: right; }
.pager:hover b { text-decoration: underline; text-underline-offset: 3px; }

.src { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.src::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--c-other); flex: none; }
.src.author::before { background: var(--c1); }
.src.port::before { background: var(--c2); }
.src.repro::before { background: var(--c3); }
.src.unknown::before { background: transparent; border: 1px dashed var(--line-strong); }
.src.pending::before, .src.candidate::before { background: transparent; border: 1.5px dashed var(--c2); }
.src.skipped::before { background: transparent; border: 1.5px dotted var(--ink-3); }

/* ---------- 展厅 ---------- */
.gallery { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; }
.rail { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; padding-right: 4px; font-size: 14px; }
.rail h3 { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; margin: 18px 0 6px; }
.rail h3:first-child { margin-top: 0; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail li a { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; text-decoration: none; color: var(--ink-2); border-radius: var(--r); }
.rail li a:hover { background: var(--surface-2); color: var(--ink); }
.rail li a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.rail li a .n { font-variant-numeric: tabular-nums; color: inherit; opacity: .7; }
.rail li.sub a { padding-left: 20px; font-size: 13px; }
.rail li.off a { color: var(--ink-3); }
.rail-toggle { display: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search { flex: 1 1 260px; position: relative; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r); font: inherit; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--ink-3); }
.field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
select { height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r); font: inherit; font-size: 13px; padding: 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip-t {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; font-size: 13px;
  border: 1px solid var(--line); background: transparent; border-radius: var(--r); cursor: pointer; color: var(--ink-2);
}
.chip-t[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.chip-t .src { pointer-events: none; }
.result-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.result-line strong { color: var(--ink); font-size: 15px; }
.hall-head { margin-bottom: 14px; }
.hall-head h2 { font-size: 24px; font-weight: 800; font-stretch: 90%; }
.hall-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.more { margin: 20px auto 0; display: flex; }
.empty { padding: 40px 0; color: var(--ink-3); }

/* ---------- 时间线 ---------- */
.yearbar { position: sticky; top: 57px; z-index: 5; background: var(--bg); padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 4px; overflow-x: auto; align-items: flex-end; }
.yearbar a { display: grid; justify-items: center; gap: 3px; min-width: 42px; text-decoration: none; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding: 0 2px; }
.yearbar a i { display: block; width: 18px; background: var(--s4); border-radius: 2px 2px 0 0; min-height: 2px; }
.yearbar a:hover { color: var(--ink); }
.tl { position: relative; margin-top: 8px; }
.tl-year { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.tl-y { position: sticky; top: 132px; align-self: start; }
.tl-y b { display: block; font-size: 44px; font-weight: 800; font-stretch: 75%; line-height: 1; font-variant-numeric: tabular-nums; }
.tl-y span { font-size: 12px; color: var(--ink-3); }
.tl-items { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.tli {
  display: inline-grid; gap: 1px; padding: 6px 10px 6px 9px; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r); text-decoration: none; max-width: 260px; position: relative;
}
.tli b { font-size: 13.5px; font-weight: 650; font-stretch: 92%; line-height: 1.25; }
.tli small { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tli::before { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 1px; background: var(--c-other); }
.tli.author::before { background: var(--c1); } .tli.port::before { background: var(--c2); } .tli.repro::before { background: var(--c3); }
.tli.pending, .tli.candidate { background: transparent; border-style: dashed; }
.tli:hover { border-color: var(--line-strong); }
.tl-intro { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }

/* ---------- 谱系 ---------- */
.lin-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); }
.lin-svg { display: block; }
.lin-svg .yr { font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.lin-svg .grid { stroke: var(--line); stroke-width: 1; }
.lin-svg .node circle { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.lin-svg .node.pending circle, .lin-svg .node.candidate circle { stroke-dasharray: 2 2; }
.lin-svg .node text { font-size: 12px; fill: var(--ink); font-family: var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.lin-svg .node text.zh { font-size: 10.5px; fill: var(--ink-3); }
.lin-svg .node { cursor: pointer; }
.lin-svg .node:hover circle, .lin-svg .node:focus circle { fill: var(--ink); }
.lin-svg .edge { fill: none; stroke-width: 2; }
.lin-svg .edge.r0 { stroke: var(--c1); } .lin-svg .edge.r1 { stroke: var(--c2); } .lin-svg .edge.r2 { stroke: var(--c3); }
.lin-svg .hit { fill: none; stroke: transparent; stroke-width: 14; cursor: help; }
.lin-svg .fam { font-size: 11px; fill: var(--ink-3); }
.lin-svg .band { fill: var(--surface-2); }
.lin-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.lin-fam { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px 14px; font-size: 13px; }
.lin-fam h3 { font-size: 14px; margin-bottom: 6px; }
.lin-fam ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.lin-fam .ev { display: block; color: var(--ink-3); font-size: 12px; }

/* ---------- 普查 ---------- */
.census-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); }
.census-table th, .census-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.census-table th { font-weight: 600; color: var(--ink-2); font-size: 12.5px; background: var(--surface-2); }
.census-table td.num, .census-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.census-table tr.off td { color: var(--ink-3); }
.sbar { display: flex; gap: 2px; height: 14px; min-width: 120px; }
.sbar i { display: block; height: 100%; border-radius: 0; min-width: 2px; }
.sbar i:first-child { border-radius: 2px 0 0 2px; } .sbar i:last-child { border-radius: 0 2px 2px 0; }
.sbar i:only-child { border-radius: 2px; }
.sbar .k-collected { background: var(--c1); } .sbar .k-pending { background: var(--c2); } .sbar .k-candidate { background: var(--c3); } .sbar .k-skipped { background: var(--c-other); }
.sbar.unscanned { border: 1px dashed var(--line-strong); border-radius: 2px; }
.tag-off { font-size: 11.5px; border: 1px solid var(--line-strong); border-radius: 2px; padding: 0 5px; color: var(--ink-2); white-space: nowrap; }
details.reasons { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-top: 10px; }
details.reasons summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 14px; }
details.reasons ul { margin: 0; padding: 0 14px 12px 32px; display: grid; gap: 8px; font-size: 13px; }
details.reasons li span { color: var(--ink-3); }
.table-scroll { overflow-x: auto; }

/* ---------- 展品详情（抽屉） ---------- */
.drawer-back { position: fixed; inset: 0; background: rgb(0 0 0 / .35); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); z-index: 41;
  background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; padding: 0 0 48px;
}
.drawer-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 24px; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 2; font-size: 13px; color: var(--ink-3); }
.drawer-body { padding: 24px; display: grid; gap: 26px; }
.obj-head { display: grid; gap: 8px; }
.obj-year { font-size: 44px; font-weight: 800; font-stretch: 75%; line-height: .9; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 12px; }
.obj-year span { font-size: 15px; font-weight: 500; font-stretch: 100%; color: var(--ink-3); }
.obj-name { font-size: 34px; font-weight: 800; font-stretch: 88%; line-height: 1.05; word-break: break-word; }
.obj-zh { font-size: 17px; color: var(--ink-2); }
.obj-title { font-size: 15px; color: var(--ink-2); }
.tomb { display: grid; grid-template-columns: 120px minmax(0, 1fr); border-top: 1px solid var(--line); font-size: 14px; }
.tomb dt, .tomb dd { padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; }
.tomb dt { color: var(--ink-3); font-size: 13px; padding-right: 12px; }
.tomb dd { word-break: break-word; }
.obj-sec h3 { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; margin-bottom: 8px; }
.obj-fig { margin: 0; display: grid; gap: 8px; }
.obj-fig > a { display: block; }
.obj-fig figcaption { display: grid; gap: 4px; }
.fig-caption { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.fig-lic { margin: 0; font-size: 11.5px; color: var(--ink-3); }
.obj-mech { margin-top: -8px; }
.obj-mech p { margin: 0; font-size: 17px; line-height: 1.65; }
.obj-mech small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.in-tour { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding: 12px 14px; display: grid; gap: 6px; font-size: 14px; }
.in-tour-h { font-size: 12.5px; color: var(--ink-3); }
.in-tour p { margin: 0; line-height: 1.6; }
.rel-col h4 { font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--ink-2); }
.rel-item { display: flex; gap: 10px; align-items: center; text-decoration: none; padding: 4px 0; }
.rel-item span { display: grid; font-size: 14px; }
.rel-item small { color: var(--ink-3); font-size: 12px; }
.rel-item:hover b { text-decoration: underline; text-underline-offset: 3px; }
.queue-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.copy { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px 14px; display: grid; gap: 6px; font-size: 13.5px; }
.copy + .copy { margin-top: 8px; }
.copy .path { font-family: var(--mono); font-size: 12px; color: var(--ink-2); word-break: break-all; }
.rel { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; }
.codebox { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.codebox summary { cursor: pointer; padding: 10px 14px; font-family: var(--mono); font-size: 12.5px; }
.codebox pre { margin: 0; padding: 12px 14px; overflow: auto; max-height: 480px; font-family: var(--mono); font-size: 12px; line-height: 1.55; border-top: 1px solid var(--line); background: var(--surface-2); }
.closer { height: 32px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); cursor: pointer; font-size: 13px; }

/* ---------- 提示框 ---------- */
.tip {
  position: fixed; z-index: 60; max-width: 340px; pointer-events: none;
  background: var(--ink); color: var(--bg); border-radius: var(--r); padding: 8px 10px; font-size: 12.5px; line-height: 1.45;
}
.tip b { font-weight: 700; }

/* ---------- 关于 ---------- */
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { font-size: 20px; margin: 36px 0 8px; }
.prose dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 16px; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0; color: var(--ink-2); }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--r); overflow-x: auto; font-family: var(--mono); font-size: 12.5px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .foyer-hero { grid-template-columns: 1fr; gap: 22px; }
  .gallery { grid-template-columns: 1fr; }
  .room-entry a { grid-template-columns: 1fr; gap: 12px; }
  .room-objects { grid-template-columns: 1fr; }
  .rail { position: static; max-height: none; display: none; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); }
  .rail.open { display: block; }
  .rail-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 0; }
  .brand-en { display: none; }
  .tools { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0 -4px; padding-bottom: 2px; }
  .nav a { padding: 8px 9px; font-size: 13.5px; }
  main { padding-top: 22px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tl-year { grid-template-columns: 1fr; gap: 10px; }
  .tl-y { position: static; display: flex; align-items: baseline; gap: 10px; }
  .tl-y b { font-size: 34px; }
  .yearbar { top: 96px; }
  .tl-year { scroll-margin-top: 170px; }
  .labels { grid-template-columns: 1fr; }
  .tomb { grid-template-columns: 92px minmax(0, 1fr); }
  .drawer-body { padding: 18px 16px; }
  .drawer-bar { padding: 10px 16px; }
  .obj-name { font-size: 28px; }
  .prose dl { grid-template-columns: 1fr; gap: 2px; }
  .prose dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* ---------- 知识图谱 ----------
   画布像天象厅一样始终是深色，泛光效果要深色底才看得出。面板随站点主题。 */
body.on-graph main { max-width: none; padding: 0; }
body.on-graph .foot { display: none; }
.gpage { position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100dvh - var(--tb, 58px)); }
.gpanel { overflow-y: auto; border-right: 1px solid var(--line); padding: 18px 16px 24px; background: var(--bg); font-size: 13px; }
.gtitle { font-size: 22px; font-weight: 800; font-stretch: 90%; }
.glede { color: var(--ink-2); margin: 6px 0 10px; line-height: 1.5; }
.gcount { font-variant-numeric: tabular-nums; color: var(--ink-3); margin: 0 0 6px; }
.gsec { border-top: 1px solid var(--line); padding: 12px 0; }
.gsec-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; margin-bottom: 8px; }
.gsec-h button { background: none; border: 0; padding: 0; color: var(--ink-3); cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.gchips { display: flex; flex-wrap: wrap; gap: 5px; }
.gchip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; cursor: pointer; font-size: 12px; color: var(--ink-3); }
.gchip i { width: 8px; height: 8px; border-radius: 50%; opacity: .45; }
.gchip span { font-variant-numeric: tabular-nums; opacity: .7; }
.gchip[aria-pressed="true"] { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.gchip[aria-pressed="true"] i { opacity: 1; }
.glegend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; color: var(--ink-3); font-size: 12px; }
.glegend span { display: inline-flex; align-items: center; gap: 4px; }
.glegend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.gopts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gopts label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.gsearch { position: relative; }
.gsearch input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: var(--r); font: inherit; }
.gsearch input::placeholder { color: var(--ink-3); opacity: 1; }
#g-hits { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
#g-hits button, .gtree button { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 0; padding: 5px 6px; border-radius: var(--r); cursor: pointer; color: var(--ink-2); font-size: 13px; }
#g-hits button:hover, .gtree button:hover { background: var(--surface-2); color: var(--ink); }
#g-hits i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
#g-hits small { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.gtree { list-style: none; margin: 0; padding: 0; }
.gtree button span { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12px; }
.gtree li.sub button { padding-left: 18px; font-size: 12.5px; }
.gstage { position: relative; overflow: hidden; background: #0d161c; }
.gcanvas { position: absolute; inset: 0; }
.gmsg { color: #9aa3ad; padding: 40px; max-width: 520px; }
.glabels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glabel { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; line-height: 18px; padding: 0 5px; color: #dfe6ee; background: rgb(6 8 11 / .62); border-radius: 2px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; will-change: transform; }
.glabel.k-hall { color: #ffffff; font-weight: 600; }
.glabel.k-direction { color: #f3a3c2; } .glabel.k-venue { color: #f2c562; } .glabel.k-repo { color: #c3bbff; } .glabel.k-year { color: #7fdc7f; }
.glabel.sel { outline: 1px solid #ffd2c4; color: #fff; }
.gtools { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.gbtn { height: 30px; padding: 0 10px; border: 1px solid #2c333b; background: rgb(12 15 19 / .85); color: #dfe6ee; border-radius: var(--r); cursor: pointer; font-size: 12.5px; }
.gbtn:hover { border-color: #55606b; }
.gpanel-toggle { display: none; }
.gcard { position: absolute; right: 12px; bottom: 12px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 70px); overflow-y: auto;
  background: rgb(12 15 19 / .94); color: #dfe6ee; border: 1px solid #2c333b; border-radius: var(--r); padding: 14px 16px; font-size: 13px; }
.gcard h2 { font-size: 20px; font-weight: 800; font-stretch: 90%; margin: 2px 0; }
.gcard p { margin: 8px 0; line-height: 1.5; }
.gcard .muted, .gcard .miss { color: #8d97a3; }
.gcard .src { color: #c3cad2; }
.gcard-y { font-size: 12px; color: #8d97a3; font-variant-numeric: tabular-nums; }
.gcard-zh { color: #b9c2cc; }
.gcard-t { color: #b9c2cc; font-size: 12.5px; }
.gcard-x { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: #8d97a3; cursor: pointer; font-size: 14px; }
.gcard-a .btn { background: #f0efec; color: #0b0b0b; border-color: #f0efec; height: 32px; }
.gtip { font: 12px/1.4 var(--font); padding: 2px 0; }
.gtip span { color: #9aa3ad; }
.scene-tooltip { background: rgb(12 15 19 / .94) !important; border: 1px solid #2c333b; border-radius: 3px; padding: 6px 8px !important; color: #dfe6ee !important; }
@media (max-width: 900px) {
  .gpage { grid-template-columns: 1fr; }
  .gpanel { position: absolute; z-index: 6; top: 0; left: 0; bottom: 0; width: min(320px, 88vw); transform: translateX(-102%); transition: transform .18s ease-out; box-shadow: none; }
  .gpanel.open { transform: none; border-right: 1px solid var(--line-strong); }
  .gpanel-toggle { display: inline-flex; align-items: center; }
  .gtools { left: 12px; right: 12px; justify-content: space-between; }
  .gcard { max-height: 46%; }
}

/* ---------- 展室：一段展墙文字，旁边挂它讲到的展品（馆长 2026-11-25 重排） ---------- */
:root { --serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", Georgia, serif; }
.room { max-width: var(--max); }
.room-head { max-width: 46rem; padding-bottom: 28px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.room-head h1 { font-family: var(--serif); font-weight: 700; letter-spacing: 0; }
.room-years { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--ink-2); }
.room-lede { font-family: var(--serif); font-size: 19px; line-height: 1.75; color: var(--ink); }
.wall { display: grid; grid-template-columns: minmax(0, 31rem) minmax(0, 1fr); gap: 20px 56px; padding: 36px 0; border-bottom: 1px solid var(--line); align-items: start; }
.wall.alone { grid-template-columns: minmax(0, 31rem); }
.wall-text p { font-family: var(--serif); font-size: 17px; line-height: 1.9; margin: 0 0 1.1em; color: var(--ink); }
.wall-text p:last-child { margin-bottom: 0; }
.wall-objects { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 24px; align-content: start; }
.plate { margin: 0; }
.plate-fig { display: block; margin-bottom: 10px; }
.plate .fig.big { border-radius: 0; }
.plate figcaption { border-top: 1px solid var(--line-strong); padding-top: 8px; }
.plate.plain figcaption { border-top: 2px solid var(--ink); }
.plate-year { font-family: var(--mono); font-size: 12px; color: var(--ink-2); letter-spacing: .06em; }
.plate h3 { margin: 2px 0 4px; font-size: 16px; line-height: 1.3; }
.plate h3 a { color: var(--ink); text-decoration: none; }
.plate h3 a:hover { color: var(--c1); text-decoration: underline; }
.plate h3 small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.plate p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-2); }
html[lang="en"] .wall-text p, html[lang="en"] .room-lede { font-family: Georgia, "Times New Roman", serif; line-height: 1.7; }
@media (max-width: 860px) {
  .wall { grid-template-columns: minmax(0, 1fr); padding: 28px 0; }
  .wall-objects { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* ---------- 首页：开场白加八室入口（馆长 2026-11-25 重排） ---------- */
.foyer-hero { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: start; gap: 56px; border-bottom: 2px solid var(--ink); }
.thesis { font-family: var(--serif); font-size: 18px; line-height: 1.9; }
.thesis p { margin: 0 0 1em; }
html[lang="en"] .thesis { font-family: Georgia, "Times New Roman", serif; line-height: 1.65; }
.curator .sig { font-family: var(--mono); letter-spacing: .08em; }
.rooms-h { font-family: var(--serif); }
.rooms { border-top: 0; }
.room-entry a { grid-template-columns: 7.5rem minmax(0, 1fr) 220px; gap: 28px; padding: 26px 0; align-items: start; }
.room-entry-text { display: contents; }
.room-no { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; color: var(--ink-2); padding-top: 6px; }
.room-entry h3 { font-family: var(--serif); font-stretch: 100%; font-weight: 700; margin: 0 0 8px; grid-column: 2; }
.room-entry p { grid-column: 2; font-size: 15px; line-height: 1.75; max-width: 40rem; }
.room-thumbs { grid-template-columns: 1fr; grid-column: 3; grid-row: 1 / span 2; }
.room-thumbs .fig.thumb { border-radius: 0; aspect-ratio: 16 / 10; }
@media (max-width: 860px) {
  .foyer-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .room-entry a { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .room-entry h3, .room-entry p, .room-thumbs { grid-column: 1; grid-row: auto; }
  .room-thumbs { max-width: 260px; margin-top: 10px; }
}
.room-entry a { grid-template-columns: 9.5rem minmax(0, 1fr) 220px; grid-template-rows: auto 1fr; }
.room-no { white-space: nowrap; }
@media (max-width: 860px) { .room-entry a { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; } }

/* ---------- 展签：图，简介，前后作，档案收起（馆长 2026-11-25 重排） ---------- */
.obj-name { font-family: var(--serif); }
.obj-mech p { font-family: var(--serif); font-size: 18px; line-height: 1.85; margin: 0; color: var(--ink); }
html[lang="en"] .obj-mech p { font-family: Georgia, "Times New Roman", serif; line-height: 1.6; }
.obj-links { display: flex; gap: 20px; margin: 14px 0 0; font-size: 14px; }
.obj-links:empty { display: none; }
.archive { margin-top: 28px; border-top: 1px solid var(--line-strong); }
.archive > summary { cursor: pointer; padding: 14px 0; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--ink-2); list-style: none; }
.archive > summary::-webkit-details-marker { display: none; }
.archive > summary::before { content: "+ "; }
.archive[open] > summary::before { content: "− "; }
.archive > summary:hover { color: var(--ink); }

/* ---------- 博物馆的氛围：墙、装裱、门口的编号、平面图（馆长 2026-11-25） ---------- */
:root { --bg: #f2eee6; --surface: #faf7f1; --surface-2: #ebe6dc; --ink: #1a1714; --ink-2: #5a544b; --ink-3: #7a7368; --line: #d9d2c4; --line-strong: #a89f8f; --mat: #ffffff; --wall: #7b2d26; --frame: #1f1b17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #161411; --surface: #1e1b17; --surface-2: #26221d; --ink: #efe9dd; --ink-2: #b3ab9d; --ink-3: #8a8377; --line: #332e27; --line-strong: #5a5247; --mat: #f4f1ea; --wall: #d08a5b; --frame: #0b0a08; } }
:root[data-theme="dark"] { --bg: #161411; --surface: #1e1b17; --surface-2: #26221d; --ink: #efe9dd; --ink-2: #b3ab9d; --ink-3: #8a8377; --line: #332e27; --line-strong: #5a5247; --mat: #f4f1ea; --wall: #d08a5b; --frame: #0b0a08; }
body { background: var(--bg); }

/* 装裱：白卡纸、细黑框、墙上的投影 */
.plate .fig.big, .obj-fig .fig.big, .room-thumbs .fig.thumb {
  --mat-pad: 22px; background: var(--mat); border: 5px solid var(--frame); border-radius: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.18), 0 18px 28px -16px rgba(20,14,8,.55);
}
.room-thumbs .fig.thumb { --mat-pad: 10px; border-width: 4px; }
.plate-fig { margin-bottom: 18px; transition: transform .18s ease; }
.plate-fig:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .plate-fig { transition: none; } .plate-fig:hover { transform: none; } }

/* 展品旁的小展签 */
.plate figcaption, .plate.plain figcaption { border: 0; background: var(--surface); padding: 12px 14px 12px; max-width: 21rem; box-shadow: 0 1px 0 var(--line); }
.plate-year { display: block; }
.plate h3 { font-family: var(--serif); font-size: 17px; margin: 4px 0 6px; }
.plate-acc { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-3); }
.wall { border-bottom: 0; padding: 56px 0; gap: 24px 72px; }
.wall-objects { gap: 44px 36px; }

/* 展室门口 */
.room-head { position: relative; border-bottom: 0; padding: 12px 0 36px 0; margin-bottom: 0; max-width: 52rem; }
.room-num { display: block; font-family: Georgia, var(--serif); font-size: clamp(96px, 16vw, 190px); line-height: .82; font-weight: 400; color: var(--wall); margin: 0 0 18px -6px; }
.room-head h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.15; margin: 8px 0 18px; }
.room-years { text-transform: uppercase; }

/* 首页：门厅 */
.foyer-hero { border-bottom: 0; padding: 40px 0 56px; }
.foyer-title { font-family: var(--serif); font-weight: 700; font-stretch: 100%; letter-spacing: .04em; line-height: 1.08; }
.btn:not(.ghost) { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* 平面图 */
.plan-note { color: var(--ink-2); margin: 0 0 18px; }
.plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; background: var(--ink); border: 3px solid var(--ink); }
.plan a { background: var(--bg); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; min-height: 168px; padding: 16px 16px 14px; transition: background .15s ease; }
.plan a:hover, .plan a:focus-visible { background: var(--surface); }
.plan-n { font-family: Georgia, var(--serif); font-size: 46px; line-height: 1; color: var(--wall); }
.plan-t { font-family: var(--serif); font-weight: 700; font-size: 16px; line-height: 1.35; margin-top: auto; }
.plan-y { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-top: 6px; letter-spacing: .04em; }
@media (max-width: 860px) {
  .plan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan a { order: 0 !important; min-height: 128px; }
  .wall { padding: 36px 0; }
}

/* ---------- 古典：论文图当画挂，鎏金画框、米色卡纸、铜牌展签（馆长 2026-11-25） ---------- */
:root { --bg: #f1ebdd; --surface: #f8f3e7; --surface-2: #e8e0cf; --line: #d6ccb6; --line-strong: #a3957a; --mat: #fbf7ee; --wall: #7b2d26; --gilt: #b08a3e; --gilt-hi: #ecd592; --gilt-lo: #6f5222; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #18211d; --surface: #202b26; --surface-2: #28352f; --ink: #efe9d9; --ink-2: #b9b5a2; --ink-3: #8d8a7a; --line: #33423b; --line-strong: #5d6a60; --mat: #f6f1e4; --wall: #cda85f; --gilt: #b08a3e; --gilt-hi: #ecd592; --gilt-lo: #5c4418; } }
:root[data-theme="dark"] { --bg: #18211d; --surface: #202b26; --surface-2: #28352f; --ink: #efe9d9; --ink-2: #b9b5a2; --ink-3: #8d8a7a; --line: #33423b; --line-strong: #5d6a60; --mat: #f6f1e4; --wall: #cda85f; --gilt: #b08a3e; --gilt-hi: #ecd592; --gilt-lo: #5c4418; }

/* 画框：外圈鎏金，内圈一道细线，卡纸有斜切口的阴影 */
.plate .fig.big, .obj-fig .fig.big, .room-thumbs .fig.thumb {
  --mat-pad: 34px; background: var(--mat); border-radius: 0;
  border: 16px solid var(--gilt);
  border-image: linear-gradient(135deg, var(--gilt-lo) 0%, var(--gilt-hi) 18%, var(--gilt) 38%, var(--gilt-hi) 56%, var(--gilt) 74%, var(--gilt-lo) 100%) 1;
  box-shadow:
    inset 0 0 0 1px var(--gilt-lo), inset 0 0 0 4px var(--gilt-hi), inset 0 0 0 5px var(--gilt-lo),
    inset 0 3px 12px 6px rgba(70, 48, 12, .22),
    0 0 0 1px var(--gilt-lo), 0 3px 0 rgba(40, 26, 6, .55), 0 26px 34px -20px rgba(18, 10, 2, .7);
}
.room-thumbs .fig.thumb { --mat-pad: 14px; border-width: 9px; }
.plate-fig { margin-bottom: 22px; }

/* 铜牌展签：居中，上下双线 */
.plate figcaption, .plate.plain figcaption {
  background: transparent; box-shadow: none; text-align: center; max-width: 22rem; margin: 0 auto; padding: 12px 10px 10px;
  border-top: 3px double var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.plate-year { letter-spacing: .14em; text-transform: uppercase; }
.plate h3 { font-size: 18px; }
.plate p { font-family: var(--serif); font-size: 14.5px; line-height: 1.7; }
html[lang="en"] .plate p { font-family: Georgia, "Times New Roman", serif; }

/* 展墙文字：每个展室第一段首字下沉；展室标题下一道双线 */
.room-head { border-bottom: 3px double var(--line-strong); padding-bottom: 30px; }
.room > .wall:first-of-type .wall-text p:first-child::first-letter { float: left; font-family: Georgia, var(--serif); font-size: 3.6em; line-height: .86; padding: .06em .1em 0 0; color: var(--wall); }
.brand-zh, .topnav a, .rooms-h, .page-head h1 { font-family: var(--serif); }
.plan { border-width: 4px; outline: 1px solid var(--line-strong); outline-offset: 5px; }
.obj-fig { margin-top: 8px; }
.drawer { background: var(--bg); }
.plate .fig.big { --mat-pad: 18px; border-width: 13px; }

/* ---------- 哥特：玫瑰窗、线刻画框、尖拱、手抄本首字。只用平涂和线，不仿材质（馆长 2026-11-25） ---------- */
:root { --bg: #ebe5d6; --surface: #f4efe2; --surface-2: #dfd7c4; --ink: #17140f; --ink-2: #544d42; --ink-3: #756d60; --line: #cfc5ae; --line-strong: #9a8e76; --mat: #fbf8ef; --wall: #7d1a2b; --glass: #1f3c73; --ochre: #b8892b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #101218; --surface: #181b23; --surface-2: #20242e; --ink: #ece6d6; --ink-2: #b4ae9f; --ink-3: #878275; --line: #2a2e3a; --line-strong: #555a69; --mat: #f3eee0; --wall: #c8475a; --glass: #4f74bd; --ochre: #c9a045; } }
:root[data-theme="dark"] { --bg: #101218; --surface: #181b23; --surface-2: #20242e; --ink: #ece6d6; --ink-2: #b4ae9f; --ink-3: #878275; --line: #2a2e3a; --line-strong: #555a69; --mat: #f3eee0; --wall: #c8475a; --glass: #4f74bd; --ochre: #c9a045; }

/* 线刻画框：几道细线套在一起，没有渐变和高光 */
.plate .fig.big, .obj-fig .fig.big, .room-thumbs .fig.thumb {
  --mat-pad: 16px; margin: 10px; background: var(--mat); border: 1px solid var(--ink); border-image: none; border-radius: 0;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--ink), 0 0 0 8px var(--bg), 0 0 0 9px var(--ochre);
}
.room-thumbs .fig.thumb { --mat-pad: 8px; }
/* 画框上面的一排尖拱 */
.plate-fig::before, .obj-fig::before {
  content: ""; display: block; height: 20px; margin: 0 1px 12px; background: var(--ink-2);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='20'><path d='M1 20V10C1 5 6 2 12 1C18 2 23 5 23 10V20' fill='none' stroke='black' stroke-width='1.3'/><circle cx='12' cy='10' r='2.3' fill='none' stroke='black'/></svg>") repeat-x center / 24px 20px;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='20'><path d='M1 20V10C1 5 6 2 12 1C18 2 23 5 23 10V20' fill='none' stroke='black' stroke-width='1.3'/><circle cx='12' cy='10' r='2.3' fill='none' stroke='black'/></svg>") repeat-x center / 24px 20px;
}
.plate-fig:hover { transform: none; }

/* 手抄本首字：红底浅字 */
.room > .wall:first-of-type .wall-text p:first-child::first-letter { background: var(--wall); color: #f6efdf; border: 1px solid var(--ink); padding: .1em .16em .06em; margin: .06em .14em 0 0; font-size: 3.1em; line-height: .9; }
.room-num { font-size: clamp(72px, 11vw, 132px); letter-spacing: .02em; margin-left: 0; }

/* 玫瑰窗 */
.plan-wrap { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 56px; align-items: center; }
.rose { width: 100%; height: auto; display: block; }
.rose .ring { fill: none; stroke: var(--ink); stroke-width: 3; }
.rose .ring.thin { stroke-width: 1; }
.rose .petal { stroke: var(--ink); stroke-width: 2; transition: fill .15s ease; }
.rose .p0 { fill: var(--wall); }
.rose .p1 { fill: var(--glass); }
.rose a:hover .petal, .rose a:focus-visible .petal { fill: var(--ochre); }
.rose a:focus-visible { outline: none; }
.rose .foil { fill: var(--ochre); stroke: var(--ink); stroke-width: 2; }
.rose .foil.core { fill: var(--glass); }
.rose .petal-n { fill: #f6efdf; font: 600 19px Georgia, "Times New Roman", serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.rose-legend { list-style: none; margin: 0; padding: 0; border-top: 3px double var(--line-strong); }
.rose-legend a { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 17px; }
.rose-legend a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.rose-legend b { font-family: Georgia, serif; font-weight: 400; color: var(--wall); }
.rose-legend small { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
@media (max-width: 860px) { .plan-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; } .rose { max-width: 340px; margin: 0 auto; } }

/* ---------- 暗色哥特：午夜蓝黑的墙，蓝紫和银线，蓝玫瑰窗（馆长 2026-11-25） ---------- */
:root { --bg: #ececf3; --surface: #f6f6fa; --surface-2: #dfe0ea; --ink: #14152a; --ink-2: #4b4d68; --ink-3: #6f7190; --line: #cfd0de; --line-strong: #9093b0; --mat: #fbfbfd; --wall: #3344aa; --glass: #5b2a86; --ochre: #8d90ad; --rose: #a52a63; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0a0b13; --surface: #121424; --surface-2: #1a1d33; --ink: #e9e7f3; --ink-2: #aeb0c9; --ink-3: #7f829d; --line: #262943; --line-strong: #4c507a; --mat: #f1f0f6; --wall: #8795ff; --glass: #7a45b8; --ochre: #c4c6dc; --rose: #d0558f; } }
:root[data-theme="dark"] { --bg: #0a0b13; --surface: #121424; --surface-2: #1a1d33; --ink: #e9e7f3; --ink-2: #aeb0c9; --ink-3: #7f829d; --line: #262943; --line-strong: #4c507a; --mat: #f1f0f6; --wall: #8795ff; --glass: #7a45b8; --ochre: #c4c6dc; --rose: #d0558f; }
.rose .p0 { fill: #3344aa; }
.rose .p1 { fill: #241a52; }
.rose .foil { fill: var(--bg); stroke: var(--ochre); }
.rose .foil.core { fill: #3344aa; }
.rose .ring, .rose .petal { stroke: var(--ochre); }
.rose a:hover .petal, .rose a:focus-visible .petal { fill: var(--rose); }
.plate .fig.big, .obj-fig .fig.big, .room-thumbs .fig.thumb { border-color: var(--ochre); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--ochre), 0 0 0 8px var(--bg), 0 0 0 9px var(--line-strong); }
.plate-fig::before, .obj-fig::before { background: var(--ochre); }
.room > .wall:first-of-type .wall-text p:first-child::first-letter { background: #3344aa; color: #f1f0f6; border-color: var(--ochre); }
.btn:not(.ghost) { background: #3344aa; color: #f1f0f6; border-color: #3344aa; }
.room-head, .rose-legend { border-color: var(--line-strong); }

/* ---------- 两套哥特（用户 2026-11-25 定）：浅色是经典哥特（石墙、宝石红、群青、赭石），深色是暗色哥特（午夜蓝黑、蓝紫、银线） ---------- */
:root {
  --bg: #ebe5d6; --surface: #f4efe2; --surface-2: #dfd7c4; --ink: #17140f; --ink-2: #544d42; --ink-3: #756d60; --line: #cfc5ae; --line-strong: #9a8e76; --mat: #fbf8ef;
  --wall: #7d1a2b; --glass: #1f3c73; --ochre: #b8892b; --rose: #b8892b;
  --petal-a: #7d1a2b; --petal-b: #1f3c73; --foil: #b8892b; --frame-line: #17140f; --frame-line-2: #b8892b; --arcade: #544d42; --initial-bg: #7d1a2b; --btn-bg: #17140f;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0a0b13; --surface: #121424; --surface-2: #1a1d33; --ink: #e9e7f3; --ink-2: #aeb0c9; --ink-3: #7f829d; --line: #262943; --line-strong: #4c507a; --mat: #f1f0f6;
  --wall: #8795ff; --glass: #7a45b8; --ochre: #c4c6dc; --rose: #d0558f;
  --petal-a: #3344aa; --petal-b: #241a52; --foil: #0a0b13; --frame-line: #c4c6dc; --frame-line-2: #4c507a; --arcade: #c4c6dc; --initial-bg: #3344aa; --btn-bg: #3344aa;
} }
:root[data-theme="dark"] {
  --bg: #0a0b13; --surface: #121424; --surface-2: #1a1d33; --ink: #e9e7f3; --ink-2: #aeb0c9; --ink-3: #7f829d; --line: #262943; --line-strong: #4c507a; --mat: #f1f0f6;
  --wall: #8795ff; --glass: #7a45b8; --ochre: #c4c6dc; --rose: #d0558f;
  --petal-a: #3344aa; --petal-b: #241a52; --foil: #0a0b13; --frame-line: #c4c6dc; --frame-line-2: #4c507a; --arcade: #c4c6dc; --initial-bg: #3344aa; --btn-bg: #3344aa;
}
.rose .p0 { fill: var(--petal-a); }
.rose .p1 { fill: var(--petal-b); }
.rose .foil { fill: var(--foil); stroke: var(--frame-line); }
.rose .foil.core { fill: var(--petal-b); }
.rose .ring, .rose .petal { stroke: var(--frame-line); }
.rose a:hover .petal, .rose a:focus-visible .petal { fill: var(--rose); }
.plate .fig.big, .obj-fig .fig.big, .room-thumbs .fig.thumb { border-color: var(--frame-line); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--frame-line), 0 0 0 8px var(--bg), 0 0 0 9px var(--frame-line-2); }
.plate-fig::before, .obj-fig::before { background: var(--arcade); }
.room > .wall:first-of-type .wall-text p:first-child::first-letter { background: var(--initial-bg); color: #f6efdf; border-color: var(--frame-line); }
.btn:not(.ghost) { background: var(--btn-bg); color: #f6efdf; border-color: var(--btn-bg); }

/* ---------- 玫瑰窗（make_rose.py 生成）：每块玻璃一个类名，颜色按主题给 ---------- */
.rose2 svg { width: 100%; height: auto; display: block; }
.rose2 path { stroke: var(--lead); stroke-width: 1.1; stroke-linejoin: round; }
.rose2 .stone { fill: var(--stone); stroke: var(--lead); stroke-width: 2; }
.rose2 .bd { fill: var(--g-bd); }
.rose2 .fm { fill: var(--g-m); }
.rose2 .fa1 { fill: var(--g-a1); } .rose2 .fa2 { fill: var(--g-a2); } .rose2 .fa3 { fill: var(--g-a3); }
.rose2 .fb1 { fill: var(--g-b1); } .rose2 .fb2 { fill: var(--g-b2); } .rose2 .fb3 { fill: var(--g-b3); }
.rose2 .fc1 { fill: var(--g-c1); } .rose2 .fc2 { fill: var(--g-c2); } .rose2 .fc3 { fill: var(--g-c3); }
.rose2 .fd1 { fill: var(--g-d1); } .rose2 .fd2 { fill: var(--g-d2); } .rose2 .fd3 { fill: var(--g-d3); }
.rose2 .fe1 { fill: var(--g-e1); } .rose2 .fe2 { fill: var(--g-e2); } .rose2 .fe3 { fill: var(--g-e3); }
.rose2 .lancet { cursor: pointer; outline: none; }
.rose2 .lancet:hover .fm, .rose2 .lancet:focus-visible .fm { fill: var(--g-hot); }
.rose2 .lancet:hover path:not(.fm):not(.bd), .rose2 .lancet:focus-visible path:not(.fm):not(.bd) { filter: brightness(1.25); }
.rose2 .rose-n { font: 600 27px Georgia, "Times New Roman", serif; text-anchor: middle; dominant-baseline: central; fill: var(--g-num); pointer-events: none; }
:root {
  --stone: #cfc6b0; --lead: #17140f; --g-bd: #c9a84a; --g-m: #efe6c8; --g-num: #17140f; --g-hot: #f7d774;
  --g-a1: #8e1b2a; --g-a2: #a8283a; --g-a3: #5e1220; --g-b1: #1f3c73; --g-b2: #2c539c; --g-b3: #162a52;
  --g-c1: #2f5d46; --g-c2: #3f7a5c; --g-c3: #214333; --g-d1: #b8892b; --g-d2: #d3aa4c; --g-d3: #8f6a1c;
  --g-e1: #8e1b2a; --g-e2: #b63a4c; --g-e3: #d9667a;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --stone: #0d0f1c; --lead: #b9bcd6; --g-bd: #5d6190; --g-m: #d5d7ee; --g-num: #14152a; --g-hot: #f0a5c8;
  --g-a1: #3344aa; --g-a2: #4a5cc9; --g-a3: #263488; --g-b1: #3a2470; --g-b2: #513292; --g-b3: #281850;
  --g-c1: #8f2d63; --g-c2: #ad3f7a; --g-c3: #691f49; --g-d1: #7f84ad; --g-d2: #a9adcf; --g-d3: #5c6088;
  --g-e1: #27358a; --g-e2: #3f52c4; --g-e3: #7f90ff;
} }
:root[data-theme="dark"] {
  --stone: #0d0f1c; --lead: #b9bcd6; --g-bd: #5d6190; --g-m: #d5d7ee; --g-num: #14152a; --g-hot: #f0a5c8;
  --g-a1: #3344aa; --g-a2: #4a5cc9; --g-a3: #263488; --g-b1: #3a2470; --g-b2: #513292; --g-b3: #281850;
  --g-c1: #8f2d63; --g-c2: #ad3f7a; --g-c3: #691f49; --g-d1: #7f84ad; --g-d2: #a9adcf; --g-d3: #5c6088;
  --g-e1: #27358a; --g-e2: #3f52c4; --g-e3: #7f90ff;
}
.plan-wrap { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); }

/* ---------- 关系图页：两种看法的切换 ---------- */
.map-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.map-head p { max-width: 44rem; }
.view-switch { display: inline-flex; border: 1px solid var(--line-strong); }
.view-switch button { font: inherit; font-family: var(--serif); padding: 7px 16px; background: transparent; color: var(--ink-2); border: 0; cursor: pointer; }
.view-switch button + button { border-left: 1px solid var(--line-strong); }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.view-switch button:focus-visible { outline: 2px solid var(--wall); outline-offset: 2px; }
.gpanel .view-switch { margin-bottom: 14px; }
.rose2 .bar { fill: var(--stone); }
@media (max-width: 860px) { .plan-wrap { grid-template-columns: minmax(0, 1fr); } .rose2 { max-width: 360px; margin: 0 auto; width: 100%; } }

/* ---------- 画框：make_ornaments.py 生成的镶嵌边带，用 border-image 绕在论文图外面 ---------- */
.plate .fig.big, .obj-fig .fig.big, .room-thumbs .fig.thumb {
  --mat-pad: 14px; margin: 0; border: 22px solid transparent; border-image: url("frame-light.svg") 48 / 22px round;
  box-shadow: 0 16px 24px -16px rgba(0, 0, 0, .5);
}
.room-thumbs .fig.thumb { --mat-pad: 6px; border-width: 12px; border-image-width: 12px; }
.obj-fig .fig.big { border-width: 28px; border-image-width: 28px; --mat-pad: 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plate .fig.big, :root:not([data-theme="light"]) .obj-fig .fig.big, :root:not([data-theme="light"]) .room-thumbs .fig.thumb { border-image-source: url("frame-dark.svg"); } }
:root[data-theme="dark"] .plate .fig.big, :root[data-theme="dark"] .obj-fig .fig.big, :root[data-theme="dark"] .room-thumbs .fig.thumb { border-image-source: url("frame-dark.svg"); }
.plate-fig::before, .obj-fig::before { display: none; }

/* ---------- 画框分两种：展室里一页挂很多幅，用细线加公版角花；展签只挂一幅，用镶嵌边带 ---------- */
.plate .fig.big {
  --mat-pad: 30px; position: relative; border: 2px solid var(--frame-line); border-image: none;
  outline: 1px solid var(--frame-line); outline-offset: -8px; box-shadow: 0 16px 24px -18px rgba(0, 0, 0, .55);
}
:root .plate .fig.big { border-image-source: none; }
.plate .fig.big::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none; background: var(--frame-line);
  -webkit-mask: url("ornaments/corner-tl.svg") left top / 28px no-repeat, url("ornaments/corner-tr.svg") right top / 28px no-repeat, url("ornaments/corner-bl.svg") left bottom / 28px no-repeat, url("ornaments/corner-br.svg") right bottom / 28px no-repeat;
  mask: url("ornaments/corner-tl.svg") left top / 28px no-repeat, url("ornaments/corner-tr.svg") right top / 28px no-repeat, url("ornaments/corner-bl.svg") left bottom / 28px no-repeat, url("ornaments/corner-br.svg") right bottom / 28px no-repeat;
}
.room-thumbs .fig.thumb { border: 2px solid var(--frame-line); border-image: none; outline: 1px solid var(--frame-line); outline-offset: -6px; --mat-pad: 12px; }
:root .room-thumbs .fig.thumb { border-image-source: none; }
/* 玫瑰窗的线分两级：窗洞轮廓粗，玻璃之间的铅线细 */
.rose2 path { stroke-width: .55; }
.rose2 .rim { fill: none; stroke-width: 3.2; }
.rose2 .stone { stroke-width: 3.2; }
.rose2 .bar { stroke-width: 1.2; }
/* 角花和内线画在浅色卡纸上，两套主题都要用深色 */
:root { --orn: #362c25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --orn: #3344aa; } }
:root[data-theme="dark"] { --orn: #3344aa; }
html:root .plate .fig.big, html:root .room-thumbs .fig.thumb { border-image: none !important; outline-color: var(--orn); }
.plate .fig.big::after { background: var(--orn); }

/* ---------- 按两份哥特报告定的几处小装饰：展室收尾的花叶带、页脚的花饰、顶栏的线、首字的尺寸 ---------- */
.room-end { height: 28px; margin: 8px 0 40px; background: var(--ink-2); -webkit-mask: url("ornaments/band-foliage.svg") center / 126px 28px no-repeat; mask: url("ornaments/band-foliage.svg") center / 126px 28px no-repeat; }
.foot { border-top: 0; text-align: center; padding-top: 34px; position: relative; }
.foot::before { content: ""; position: absolute; left: 50%; top: 0; width: 22px; height: 22px; margin-left: -11px; background: var(--ink-2); -webkit-mask: url("ornaments/divider-rosette.svg") center / contain no-repeat; mask: url("ornaments/divider-rosette.svg") center / contain no-repeat; }
.foot::after { content: ""; position: absolute; left: calc(50% - 76px); top: 10px; width: 152px; height: 1px; background: linear-gradient(90deg, var(--line-strong) 0 56px, transparent 56px 96px, var(--line-strong) 96px 152px); }
.topbar { border-bottom: 1px solid var(--line-strong); }
.nav a { font-family: var(--serif); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--wall); }
.room > .wall:first-of-type .wall-text p:first-child::first-letter { font-size: 34px; line-height: 64px; width: 64px; padding: 0 14px; margin: 4px 12px 0 0; }
.room-head h1, .foyer-title { line-height: 1.12; }

/* ---------- 展品列表：卡片和导览同一个调子。细线、卡纸、宋体的名称，占位块安静 ---------- */
.label { background: var(--surface); border: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.label:hover { border-color: var(--line-strong); }
.label > .fig { border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; --mat-pad: 12px; }
.label-name { font-family: var(--serif); font-stretch: 100%; font-size: 19px; }
.label-year { font-family: var(--mono); letter-spacing: .04em; }
.label-mech { font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.fig-ph { background: var(--surface-2); }
.fig-ph .ph-name { left: 8%; right: 8%; top: 50%; bottom: auto; transform: translateY(-50%); max-width: none; text-align: center; font-family: var(--serif); font-weight: 700; font-stretch: 100%; font-size: clamp(15px, 7cqw, 30px); line-height: 1.2; color: var(--ink-2); }
.fig-ph .ph-note { left: 0; right: 0; top: auto; bottom: 9%; text-align: center; font-size: 12px; letter-spacing: .08em; }
.fig-ph::before { content: ""; position: absolute; left: 50%; top: 12%; width: 18px; height: 18px; margin-left: -9px; background: var(--line-strong); -webkit-mask: url("ornaments/divider-rosette.svg") center / contain no-repeat; mask: url("ornaments/divider-rosette.svg") center / contain no-repeat; }
.page-head h1, .rail h2, .rail h3 { font-family: var(--serif); }
.page-head { border-bottom: 3px double var(--line-strong); padding-bottom: 18px; margin-bottom: 22px; }
.emblem { color: var(--wall); width: 28px; height: 28px; }

/* ---------- 展签上的论文图：不用镶嵌边带，只留两道细线（2026-11-25 用户嫌边带丑） ---------- */
html:root .obj-fig .fig.big { border: 2px solid var(--frame-line); border-image: none !important; outline: 1px solid var(--orn); outline-offset: -8px; --mat-pad: 26px; }
