/* HAIZ homepage — one tree, one walk around it.
   The picture carries the work. Type is editorial: a fine display serif for
   the English line, a Chinese serif for meaning, Sora for small labels. */
@font-face { font-family: Sora; src: url(../assets/fonts/sora-300.woff2) format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: Sora; src: url(../assets/fonts/sora-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Sora; src: url(../assets/fonts/sora-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Cormorant; src: url(fonts/cormorant-garamond-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Cormorant; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Cormorant; src: url(fonts/cormorant-garamond-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #f6f1e7;
  --ink-2: rgba(246, 241, 231, .82);
  --ink-3: rgba(246, 241, 231, .56);
  --edge: rgba(246, 241, 231, .22);
  --glass: rgba(20, 26, 23, .32);
  --paper: #f7f3eb;
  --charcoal: #292e2a;
  --green: #293f36;
  --gold: #ecd9ae;
  --display: Cormorant, "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --serif: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans: Sora, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(18px, 2.6vw, 44px);
  --top: max(22px, env(safe-area-inset-top));
  --bottom: max(24px, env(safe-area-inset-bottom));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #0d1210; }
body { margin: 0; color: var(--ink); font: 14px/1.6 var(--sans); background: #0d1210; }
html.js body.spatial { overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ------------------------------------------------------------ stage */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.poster, #world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.poster { object-fit: cover; transition: opacity 2.4s var(--ease); }
#world { opacity: 0; transition: opacity 2.4s var(--ease); touch-action: pan-y; outline: none; }
body.ready #world { opacity: 1; }
body.ready .poster { opacity: 0; }
/* soft reading shade only where type sits: top-left corner and bottom edge */
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(42% 34% at 0% 0%, rgba(6, 10, 8, .42), transparent 72%),
              radial-gradient(48% 40% at 0% 100%, rgba(6, 10, 8, .5), transparent 70%),
              linear-gradient(transparent 82%, rgba(6, 10, 8, .28)); }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.leaders path { fill: none; stroke: rgba(246, 241, 231, .5); stroke-width: 1; }
.leaders circle.pin { fill: rgba(246, 241, 231, .9); }
.leaders circle.halo { fill: none; stroke: rgba(246, 241, 231, .5); stroke-width: 1; }

.track { position: relative; z-index: -1; pointer-events: none; }
.stop { height: 100vh; height: 100svh; }
/* 05 → 06 is the walker's film: a longer stretch of page, so each scroll lands on one beat of it */
.js body.spatial .stop.film { height: 300vh; height: 300svh; }

/* ------------------------------------------------------------ bar: tools, then the mark (top right) */
.bar { position: fixed; z-index: 10; top: var(--top); right: var(--pad); display: flex; align-items: flex-start; gap: 22px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { text-decoration: none; display: grid; justify-items: end; gap: 3px; }
.brand b { font: 500 26px/1 var(--display); letter-spacing: .14em; margin-right: -.14em; }
.brand small { font-size: 8.5px; letter-spacing: .2em; color: var(--ink-3); text-transform: uppercase; }
.tools { display: flex; gap: 6px; padding-top: 2px; }
.tool { border: 1px solid var(--edge); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 999px; padding: 5px 12px; font-size: 11.5px; display: inline-flex; gap: 7px; align-items: center; transition: border-color .3s, background .3s; }
.tool:hover { border-color: rgba(246, 241, 231, .55); background: rgba(20, 26, 23, .5); }
.tool kbd { font: 10px ui-monospace, monospace; opacity: .55; }
.tool b { color: var(--gold); font-weight: 600; }
.tool .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.tool[aria-pressed="true"] .dot { background: #cfe3a0; box-shadow: 0 0 8px #cfe3a0; }
body.home #experienceDock { display: none; }

/* ------------------------------------------------------------ sections (static flow by default) */
.panels { position: relative; z-index: 5; }
.panel { padding: 14vh var(--pad) 8vh; max-width: 820px; }
.chap-label { margin: 0 0 12px; display: flex; gap: 12px; align-items: baseline; font: 400 15px/1.4 var(--serif); letter-spacing: .14em; }
.chap-label b { font: 400 22px/1 var(--display); letter-spacing: .02em; }
.lede { margin: 0; font: 400 13px/1.95 var(--serif); color: var(--ink-2); max-width: 27em; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.display { margin: 28px 0 0; font: 400 clamp(40px, 4.1vw, 66px)/1.02 var(--display); letter-spacing: -.005em; text-shadow: 0 2px 26px rgba(0, 0, 0, .28); }
.panel-intro .display { font-size: clamp(46px, 4.8vw, 76px); }
.display .line { display: block; overflow: hidden; padding-bottom: .06em; }
.display .line > span { display: inline-block; will-change: transform; }
.zh { margin: 12px 0 0; font: 400 12px/1.5 var(--serif); letter-spacing: .32em; color: var(--ink-2); }
.begin { display: flex; align-items: baseline; gap: 14px; margin: 22px 0 0; }
/* a herbarium label for the tree (opening only) */
.specimen-label { margin: 18px 0 0; display: grid; gap: 1px; padding-left: 12px; border-left: 1px solid rgba(246, 241, 231, .4); font-size: 10.5px; color: var(--ink-3); letter-spacing: .08em; }
.specimen-label i { font: italic 400 15px/1.3 var(--display); color: var(--ink-2); letter-spacing: .02em; }
.begin a { font: 400 13px var(--sans); letter-spacing: .14em; text-decoration: none; }
.begin a i { font-style: normal; display: inline-block; margin-left: 6px; animation: nudge 2.4s var(--ease) infinite; }
.begin small { font-size: 11px; color: var(--ink-3); }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateY(4px); } }
.note { margin: 14px 0 0; font-size: 10px; color: var(--ink-3); line-height: 1.6; }

/* the glass slab: a section's real entries, pinned into the scene */
.slab { margin-top: 26px; width: min(100%, 340px); padding: 18px 18px 14px; border-radius: 18px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05) 55%, rgba(255, 255, 255, .08)), rgba(14, 20, 17, .26);
  border: 1px solid rgba(255, 255, 255, .3); box-shadow: 0 24px 60px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .25);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.slab-head { margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; font-size: 10.5px; letter-spacing: .26em; color: var(--ink-2); }
.slab-head b { font: 400 34px/1 var(--display); letter-spacing: 0; color: var(--ink); }
.entries { list-style: none; margin: 0; padding: 0; }
.entries li + li { border-top: 1px solid rgba(255, 255, 255, .16); }
.entries a, .entries button { display: grid; grid-template-columns: 22px 1fr auto; grid-template-rows: auto auto; align-items: baseline; column-gap: 10px;
  width: 100%; padding: 10px 2px 9px; text-decoration: none; text-align: left; background: none; border: 0; transition: padding .45s var(--ease); }
.entries i { font: 400 13px/1 var(--display); font-style: normal; color: var(--ink-3); grid-row: 1 / 3; align-self: center; }
.entries .t { font: 500 15px/1.35 var(--serif); letter-spacing: .08em; }
.entries .en { font: 400 italic 13px/1.2 var(--display); color: var(--ink-2); justify-self: end; }
.entries .n { grid-column: 2 / 4; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.entries a:hover, .entries a:focus-visible, .entries button:hover, .entries button:focus-visible { padding-left: 8px; }
.entries a:hover .t, .entries button:hover .t { color: #fff; }
/* the section's flagship leads the slab (reference 05: number, title, round arrow) */
.entries [data-primary] { grid-template-columns: 1fr 40px; padding: 4px 2px 14px; }
.entries [data-primary] i { display: none; }
.entries [data-primary] .t { font-size: 21px; letter-spacing: .14em; grid-column: 1; }
.entries [data-primary] .en { grid-column: 1; grid-row: 2; justify-self: start; font-size: 14px; margin-top: 3px; }
.entries [data-primary] .n { grid-column: 1; grid-row: 3; }
.entries [data-primary]::after { content: "→"; grid-column: 2; grid-row: 1 / 4; align-self: center; justify-self: end; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .5); font: 14px var(--sans); transition: transform .45s var(--ease), background .3s; }
.entries [data-primary]:hover::after { transform: translateX(3px); background: rgba(255, 255, 255, .16); }

/* ------------------------------------------------------------ spatial layout (WebGL running) */
.js body.spatial .panel { position: fixed; inset: 0; padding: 0; max-width: none; visibility: hidden; pointer-events: none; }
.js body.spatial .panel.is-active { visibility: visible; }
.js body.spatial .panel > * { pointer-events: auto; }
.js body.spatial .chap { position: absolute; top: var(--top); left: var(--pad); max-width: min(380px, 40vw); }
.js body.spatial .titling { position: absolute; left: var(--pad); bottom: calc(var(--bottom) + 8px); max-width: 46vw; }
.js body.spatial .display { margin: 0; }
.js body.spatial .note-intro { position: absolute; left: var(--pad); bottom: 8px; margin: 0; }
.js body.spatial .slab { position: absolute; left: 0; top: 0; margin: 0; will-change: transform;
  transform: translate3d(var(--sx, 70vw), calc(var(--sy, 30vh) + var(--lift, 0px)), 0) perspective(900px) rotateY(var(--ry, -6deg)) rotateX(var(--rx, 2deg)); transform-origin: 50% 50%; }
/* the last section gathers everything: the flagship on top, the rest in two columns */
.js body.spatial .panel[data-slab="grid"] .slab, body .panel[data-slab="grid"] .slab { width: min(100%, 400px); }
.panel[data-slab="grid"] .entries { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.panel[data-slab="grid"] .entries li:first-child { grid-column: 1 / -1; }
.panel[data-slab="grid"] .entries li + li { border-top: 0; }
.panel[data-slab="grid"] .entries li { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.panel[data-slab="grid"] .entries li:not(:first-child) .n { display: none; }
.panel[data-slab="grid"] .entries li:not(:first-child) .en { display: none; }
.panel[data-slab="grid"] .entries li:not(:first-child) a, .panel[data-slab="grid"] .entries li:not(:first-child) button { grid-template-columns: 22px 1fr; padding: 9px 2px 8px; }

/* 06 回望: the frame holds, so its doors are not a panel over it but an index along the foot of the
   picture, set like a caption: one line of names, the flagship first. Nothing is removed. */
.panel[data-slab="index"] .slab { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; width: auto; border-radius: 0; }
.panel[data-slab="index"] .slab-head, .panel[data-slab="index"] .slab .note { display: none; }
.panel[data-slab="index"] .entries { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 20px; }
.panel[data-slab="index"] .entries li { border: 0 !important; }
/* the hit area is larger than the words (8 px round, invisible); gaps keep neighbours from touching */
.panel[data-slab="index"] .entries a, .panel[data-slab="index"] .entries button { display: inline-block; width: auto; padding: 8px 6px; margin: -8px -6px; font: inherit; }
.panel[data-slab="index"] .entries i, .panel[data-slab="index"] .entries .en, .panel[data-slab="index"] .entries .n, .panel[data-slab="index"] .entries [data-primary]::after { display: none; }
.panel[data-slab="index"] .entries .t, .panel[data-slab="index"] .entries [data-primary] .t { font: 400 12.5px/1.6 var(--serif); letter-spacing: .12em; color: var(--ink-2); text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
  border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.panel[data-slab="index"] .entries [data-primary] .t { color: var(--ink); }
.panel[data-slab="index"] .entries a:hover .t, .panel[data-slab="index"] .entries button:hover .t,
.panel[data-slab="index"] .entries a:focus-visible .t, .panel[data-slab="index"] .entries button:focus-visible .t { color: #fff; border-bottom-color: rgba(255, 255, 255, .6); }
.panel[data-slab="index"] .entries a:hover, .panel[data-slab="index"] .entries button:hover { padding-left: 0; }
@media (min-width: 761px) { .js body.spatial .panel[data-slab="index"] .slab { transform: none; left: var(--pad); top: auto; bottom: var(--bottom); max-width: min(40vw, 560px); } }
@media (max-width: 760px) {
  .js body.spatial .panel[data-slab="index"] .slab { padding: 2px 0 0; }
  /* phones: every name is a full 40 px target, rows touch but never overlap */
  .panel[data-slab="index"] .entries { gap: 0 14px; }
  .panel[data-slab="index"] .entries a, .panel[data-slab="index"] .entries button { display: inline-flex; align-items: center; min-height: 40px; min-width: 44px; justify-content: center; padding: 0 4px; margin: 0 -4px; }
  .panel[data-slab="index"] .entries .t, .panel[data-slab="index"] .entries [data-primary] .t { font-size: 13.5px; }
}
.js body.spatial .panel[data-slab="index"] .titling { bottom: calc(var(--bottom) + 72px); }

/* ------------------------------------------------------------ navigator: the camera's real path, seen from above */
.orbit { position: fixed; z-index: 9; right: var(--pad); bottom: var(--bottom); width: 128px; text-align: right; }
.orbit svg { width: 128px; height: 128px; overflow: visible; }
.orbit .path { fill: none; stroke: rgba(246, 241, 231, .25); stroke-width: 1; stroke-dasharray: 1.5 2.5; }
.orbit .done { fill: none; stroke: rgba(246, 241, 231, .75); stroke-width: 1; }
.orbit .core { fill: rgba(150, 190, 110, .35); stroke: rgba(246, 241, 231, .6); stroke-width: .8; }
.orbit .eye { fill: var(--ink); filter: drop-shadow(0 0 4px rgba(255, 255, 255, .8)); }
.orbit .dot { fill: rgba(13, 18, 16, .6); stroke: rgba(246, 241, 231, .7); stroke-width: 1; cursor: pointer; transition: fill .4s var(--ease), r .4s var(--ease); }
.orbit .dot.on { fill: var(--ink); }
.orbit .dot:hover { fill: rgba(246, 241, 231, .5); }
.orbit .lab { font: 7.5px var(--display); fill: var(--ink-2); pointer-events: none; }
.orbit ol { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; padding: 0; }
.orbit .where { margin: 4px 0 0; display: flex; justify-content: flex-end; gap: 6px; align-items: baseline; font: 12px var(--display); color: var(--ink-3); }
.orbit .where b { font: 400 26px/1 var(--display); color: var(--ink); font-weight: 400; }
.orbit .where em { font: normal 11px var(--serif); letter-spacing: .2em; color: var(--ink-2); margin-left: 8px; }

.rail { position: fixed; z-index: 8; right: calc(var(--pad) - 2px); top: 34vh; height: 26vh; width: 1px; background: rgba(246, 241, 231, .28); }
.rail i { position: absolute; left: -3px; top: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); transform: translateY(-50%); }

/* growth line (reference 07): bare → bud → unfold → full */
.growth { position: fixed; z-index: 8; left: 50%; bottom: var(--bottom); width: min(380px, 34vw); transform: translateX(-50%); }
.growth svg { display: block; width: 100%; height: 34px; overflow: visible; }
.growth .base { stroke: rgba(246, 241, 231, .22); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.growth .curve { stroke: rgba(246, 241, 231, .7); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.growth circle { fill: var(--ink); }
.growth ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; justify-content: space-between; }
.growth li { display: grid; justify-items: center; gap: 1px; font: 10px var(--serif); letter-spacing: .2em; color: var(--ink-3); transition: color .5s; }
.growth li b { font: 400 13px/1 var(--display); letter-spacing: 0; }
.growth li.on { color: var(--ink); }

/* ------------------------------------------------------------ veil (leaving) */
.js body::before { content: ""; position: fixed; inset: 0; z-index: 30; background: #0d1210; pointer-events: none; transition: opacity 1.8s var(--ease); }
.js body.painted::before { opacity: 0; }
.veil-map { position: absolute; left: 50%; top: 50%; width: min(88vmin, 820px); height: min(88vmin, 820px); transform: translate(-50%, -50%); overflow: visible; }
.veil-map path { fill: none; stroke: #5d6a52; stroke-width: 1.1; stroke-dasharray: 400; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.veil-map path:first-child { stroke: #2f3a2a; stroke-width: 2; }
.veil { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: var(--veil, var(--paper));
  clip-path: circle(0 at var(--vx, 50%) var(--vy, 50%)); }
.colophon { position: relative; z-index: 5; padding: 30px var(--pad) 40px; font-size: 11px; color: var(--ink-3); max-width: 900px; }
.js body.spatial .colophon { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom) + 4px); padding: 0; width: min(520px, 40vw); text-align: center;
  opacity: 0; transition: opacity .8s; pointer-events: none; font-size: 10px; }
.js body.spatial[data-chapter="5"] .colophon { opacity: .9; pointer-events: auto; }
/* 06: the index takes the foot of the frame on the left; provenance sits beside the navigator */
@media (max-width: 1180px) and (min-width: 761px) { .js body.spatial[data-chapter="5"] .colophon { display: none; } }
@media (min-width: 1181px) { .js body.spatial[data-chapter="5"] .colophon { left: auto; right: calc(var(--pad) + 150px); transform: none; width: min(340px, 26vw); text-align: right; opacity: .75; } }
.js body.spatial[data-chapter="5"] .growth { opacity: 0; }
.growth { transition: opacity .8s; }
.colophon p { margin: 0; line-height: 1.7; }

/* ------------------------------------------------------------ specimen + book (paper) */
dialog { border: 0; padding: 0; background: transparent; color: var(--charcoal); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(6, 10, 8, .6); backdrop-filter: blur(4px); }
dialog[open] { animation: open .55s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.specimen .paper { width: min(92vw, 880px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
#specCanvas { width: 100%; height: auto; display: block; background: var(--paper); }
.spec-text { padding: 38px 34px 30px; display: flex; flex-direction: column; gap: 10px; }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .18em; color: #7a6f5c; }
.spec-text h2 { margin: 0; font: 500 34px/1.3 var(--serif); letter-spacing: .14em; color: var(--green); }
.spec-text dl { margin: 6px 0 4px; display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 13.5px; }
.spec-text dt { color: #7a6f5c; }
.spec-text dd { margin: 0; font-family: var(--serif); }
.note-in { display: grid; gap: 6px; font-size: 12px; color: #626e62; margin-top: 8px; }
.note-in input { border: 0; border-bottom: 1px solid #b9b2a3; background: transparent; padding: 8px 0; font: 16px var(--serif); color: var(--charcoal); outline: none; }
.spec-actions, .book footer { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; flex-wrap: wrap; }
.solid { background: var(--green); color: var(--paper); border: 0; border-radius: 999px; padding: 10px 20px; }
.paper .ghost, .book .ghost { background: transparent; border: 1px solid #b9b2a3; border-radius: 999px; padding: 10px 18px; color: var(--charcoal); }
.book .book-page { width: min(94vw, 980px); max-height: 88vh; overflow: auto; background: var(--paper); border-radius: 14px; padding: 30px 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.book header { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: start; }
.book h2 { margin: 0; font: 500 28px var(--serif); letter-spacing: .16em; color: var(--green); }
.book header p { grid-column: 1; margin: 0; color: #626e62; font-size: 13px; }
.book .close { grid-column: 2; grid-row: 1 / 3; background: transparent; border: 1px solid #b9b2a3; border-radius: 999px; padding: 6px 14px; color: var(--charcoal); }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin: 24px 0 8px; }
.book-grid figure { margin: 0; text-align: center; }
.book-grid canvas { width: 100%; height: auto; }
.book-grid figcaption { font: 13px/1.5 var(--serif); }
.book-grid figcaption small { display: block; color: #7a6f5c; font: 11px var(--sans); }
.book-empty { grid-column: 1 / -1; color: #7a6f5c; font: 15px/1.9 var(--serif); padding: 30px 0; }

/* ------------------------------------------------------------ static page */
body.static .poster { opacity: .5; }
body.static .track, body.static .orbit, body.static .growth, body.static .leaders, body.static .rail { display: none !important; }
body.static .panel { position: relative !important; visibility: visible !important; opacity: 1 !important; }
body.static .bar, html:not(.js) .bar { position: absolute; }
html:not(.js) .track, html:not(.js) .orbit, html:not(.js) .growth, html:not(.js) .rail { display: none; }

/* ------------------------------------------------------------ phones and narrow windows */
@media (max-width: 760px) {
  .brand small, #searchButton { display: none; }
  .bar { gap: 12px; }
  .brand b { font-size: 22px; }
  .tool { padding: 4px 10px; font-size: 11px; }
  .js body.spatial .chap { top: var(--top); max-width: 58vw; }
  .chap-label { font-size: 13px; margin-bottom: 6px; }
  .chap-label b { font-size: 19px; }
  .js body.spatial .lede { font-size: 11.5px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  /* the section's words and links gather at the bottom, above the safe area */
  .js body.spatial .panel { display: flex; flex-direction: column; justify-content: flex-end; padding: 0 14px calc(var(--bottom) + 2px); }
  .js body.spatial .titling { position: static; max-width: 100%; margin-bottom: 12px; }
  .js body.spatial .slab, .js body.spatial .panel[data-slab="grid"] .slab { position: static; transform: none !important; width: 100%; max-width: none; padding: 12px 14px 8px; border-radius: 16px; }
  .js body.spatial .note-intro { position: static; margin-top: 10px; }
  .display { font-size: clamp(32px, 9.5vw, 44px); }
  .panel-intro .display { font-size: clamp(38px, 11vw, 52px); }
  .zh { font-size: 11px; margin-top: 8px; }
  .slab-head { margin-bottom: 2px; }
  .slab-head b { font-size: 24px; }
  .entries a, .entries button { padding: 7px 2px 6px; }
  .entries .t { font-size: 14px; }
  .entries .n { display: none; }
  .entries [data-primary] .t { font-size: 17px; }
  .entries [data-primary] { padding-bottom: 9px; }
  .slab .note { display: none; }
  .orbit { right: 12px; bottom: auto; top: calc(var(--top) + 46px); width: 74px; }
  .orbit svg { width: 74px; height: 74px; }
  .orbit .lab, .orbit .where em { display: none; }
  .orbit .where b { font-size: 19px; }
  .rail, .growth, .leaders { display: none !important; }
  .js body.spatial .colophon { display: none; }
  .specimen .paper { grid-template-columns: 1fr; max-height: 90vh; overflow: auto; }
  #specCanvas { max-height: 44vh; object-fit: contain; }
  .spec-text { padding: 22px 20px 20px; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .growth { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------ chapter 02 · 根脉 */
.entries li.group { padding: 12px 0 2px; font-size: 10.5px; letter-spacing: .24em; color: var(--ink-3); }
.entries li.group + li { border-top: 0; }
/* the walk-out links under 02 stay compact so the climb leads */
.entries li.group ~ li .n { display: none; }
.entries li.group ~ li a { padding-top: 6px; padding-bottom: 6px; }
/* the history without the film: shown when there is no 3D (or no script); the film has its own reading sheet */
.roots-static { list-style: none; margin: 22px 0 0; padding: 0; max-width: 44em; }
.js body.spatial .roots-static { display: none; }
.roots-static li { padding: 18px 0; border-top: 1px solid var(--edge); }
.roots-static .y { margin: 0; font: 400 34px/1 var(--display); }
.roots-static h3 { margin: 6px 0 8px; font: 500 18px/1.4 var(--serif); letter-spacing: .08em; }
.roots-static p { margin: 0 0 8px; color: var(--ink-2); line-height: 1.8; }
.roots-static img { display: block; width: 100%; max-width: 520px; height: auto; border-radius: 12px; margin: 6px 0 4px; }
.roots-static small, .roots-static .g { display: block; font-size: 12px; color: var(--ink-3); }
.roots-static .g a { color: inherit; }

/* Mobile Safari's browser chrome resizes the visual viewport mid-swipe.
   Anchor WebGL to the stable largest viewport; do not shrink/stretch the
   framebuffer or recompute the portrait lens as the URL bar moves.
   Fixed reading panels still follow the visible viewport as before. */
@media (max-width: 760px) and (pointer: coarse) {
  @supports (height: 100lvh) {
    .stage { height: 100lvh; bottom: auto; }
  }
}
