/* Strollbook homepage, v3. The route is the layout: one line, drawn under the headline, then walking down the page.
   Every site colour is a token below. Journal pages, screenshots and the hedgehog keep their own colours. */
@font-face { font-family: "DM Sans"; src: url("assets/fonts/DMSans.ttf") format("truetype"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("assets/fonts/CormorantGaramond.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("assets/fonts/Caveat.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

/* ---------- Palette: "Ink & route" (picked in OKLCH; hex values) ----------
   Cool off-white field, ink-navy text and privacy block, the app's route orange. */
:root {
  --field: #eef0f3;      /* oklch(.955 .004 250)  hero, §4 */
  --hi: #fbfcfd;         /* oklch(.99 .002 250)   §2, §6, footer */
  --lo: #dce0e5;         /* oklch(.905 .008 250)  §3 */
  --text: #424a58;       /* body text: 80% ink over the field (8.7 on hi, 7.8 on field, 6.7 on lo) */
  --hand: #914430;       /* handwritten note: route darkened with ink, 65/35 (6.6 on hi, 6.0 on field, 5.2 on lo) */
  --ink: #172031;        /* oklch(.245 .035 262) */
  --muted: #4c5666;      /* oklch(.45 .03 262) */
  --route: #d2582f;      /* the app's route orange */
  --gap: #7c8088;        /* oklch(.60 .012 262) */
  --deep: #172031;
  --on-deep: #eceff1;
  --on-deep-muted: #b7becb;
  --on-deep-link: #eeac8b;
}
:root {
  /* Derived roles */
  --ink-hover: color-mix(in oklab, var(--ink) 84%, var(--field));
  --line: color-mix(in oklab, var(--ink) 15%, transparent);
  --tag-bg: color-mix(in oklab, var(--hi) 60%, #fff);
  --tag-line: color-mix(in oklab, var(--ink) 30%, transparent);
  --warn: color-mix(in oklab, var(--route) 62%, var(--ink));
  --shadow-1: color-mix(in oklab, var(--ink) 48%, transparent);
  --shadow-2: color-mix(in oklab, var(--ink) 13%, transparent);
  --paper-shadow: 0 18px 34px -18px var(--shadow-1), 0 2px 6px -2px var(--shadow-2);
  --ground: var(--field);   /* ground under the current section; hollow marks are filled with it */

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --gutter: clamp(16px, 3.4vw, 48px);
  --lane: 80px;   /* left lane that carries the thread in sections 2-4 */
  --rail: 22px;   /* thread position inside the lane */
  --section: clamp(72px, 9vw, 128px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--field); color: var(--text); overflow-x: clip;
  font: 400 18px/1.55 "DM Sans", system-ui, sans-serif;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
  scrollbar-color: color-mix(in oklab, var(--ink) 35%, var(--field)) var(--field);
  caret-color: var(--route);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
/* Type: five levels. Display (h1 DM Sans; h2 Cormorant Garamond), sub-heading 24/600, body 18/400 in --text,
   small 14/400 muted, label 12/600 uppercase .06em. Bold only on headings and buttons; dates that are the data are 600.
   Headings, labels and data keep full ink (:where keeps this weak, so section colours such as the privacy block win). */
:where(h1, h2, h3, .wordmark, .book-title b, .chapters .n, .leaf .cap, .sp time, .shots .when, .window span, .sample, .size-label, .ch-head b, .exp .fmt, .close-hint) { color: var(--ink); }
::selection { background: var(--route); color: #fff; }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }   /* controls that only work with script stay out until main.js reveals them */
html:not(.js) .size-label, html:not(.js) .seg-ctl { display: none; }   /* the size switch needs main.js */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
/* Full-bleed grounds carry their own inline inset, so their content never sits on the edge of the colour. */
.stop, .privacy, .closing, .foot { padding-inline: var(--gutter); }
.stop .wrap, .privacy .wrap, .closing .wrap, .foot .wrap { width: min(100%, 1200px); }

.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 60; background: var(--ink); color: var(--field); padding: 12px 16px; border-radius: 4px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 8px; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; padding-block: 10px; }
.wordmark { font: 700 32px/1 "Caveat", cursive; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; border-radius: 4px; transition: background-color .2s ease; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { background: var(--line); } }

/* Action */
.cta { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; text-decoration: none; font: 700 16px/1 "DM Sans", system-ui, sans-serif; color: var(--field); background: var(--ink); border-radius: 4px; transition: background-color .2s ease, transform .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .cta:hover { background: var(--ink-hover); } }
.cta:active { transform: translateY(1px); }
.fine { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Sample tag: same treatment everywhere */
.sample { position: absolute; z-index: 5; font: 600 12px/1 "DM Sans", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: var(--tag-bg); border: 1px solid var(--tag-line); padding: 5px 7px 4px; border-radius: 4px; white-space: nowrap; }

/* ---------- 1 Hero ---------- */
.hero { padding-top: clamp(16px, 3vw, 36px); padding-bottom: clamp(28px, 4vw, 56px); }
.hero-head { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px clamp(24px, 4vw, 64px); align-items: end; }
h1 { font-weight: 700; font-size: clamp(36px, min(11vw, 6.7vw + 18px), 96px); line-height: .98; letter-spacing: -.038em; text-wrap: balance; }
.lede { font-size: 18px; line-height: 1.55; max-width: 34em; }
.hero-side .act { margin-top: 22px; }

.band { position: relative; container-type: inline-size; margin-top: clamp(24px, 3.2vw, 44px); }
.band-wide { aspect-ratio: 1200 / 310; }
.band-narrow { display: none; aspect-ratio: 360 / 250; }
.route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route .seg { fill: none; stroke: var(--route); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.route .gap { fill: none; stroke: var(--gap); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 13; }
.route .start { fill: var(--field); stroke: var(--ink); stroke-width: 5; }
.route .end { fill: var(--ink); }

.pin { position: absolute; width: 6.6cqw; translate: -50% 0; display: flex; flex-direction: column; align-items: center; }
.pin img { order: 2; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: max(3px, .36cqw) solid #fff; border-radius: 3px; box-shadow: 0 10px 20px -12px var(--shadow-1); }
.pin figcaption { order: 1; margin-bottom: max(4px, .5cqw); font: 600 max(12px, 1.05cqw)/1 "DM Sans", sans-serif; color: var(--muted); white-space: nowrap; }
.pin::after { content: ""; order: 3; width: 2px; height: 1.3cqw; background: var(--ink); }
.band-wide .pin-a { left: 53.33%; bottom: 48.39%; }
.band-wide .pin-b { left: 79.17%; bottom: 58.71%; }
.band-wide .pin-c { left: 66.25%; bottom: 58.71%; }

.tag-t { position: absolute; font: 600 max(12px, 1.12cqw)/1.25 "DM Sans", sans-serif; color: var(--muted); white-space: nowrap; }
.band-wide .t-start { left: 1.6%; top: 47%; }
.band-wide .t-gap { left: 67.5%; top: 85.5%; translate: -50% 0; text-align: center; }
.band-wide .t-end { left: 36.4%; top: 84.6%; }
.s-walk { right: 0; top: 0; }

.walk-hog { position: absolute; left: 14.4%; bottom: 58.9%; width: 3.9cqw; }
.endpage { position: absolute; left: 20%; top: 47.6%; width: 10.8cqw; rotate: -4deg; }
.endpage .jpage { box-shadow: var(--paper-shadow); border-radius: 2px; }
.s-page { left: -10px; top: -12px; rotate: 4deg; }

/* Photos flying from the pins into the page are made by main.js (.hero-fly). */
.hero-fly { position: absolute; left: 0; top: 0; z-index: 3; object-fit: cover; border-radius: 2px; pointer-events: none; transform-origin: 50% 50%; will-change: transform; }
.endpage .wp { box-shadow: var(--paper-shadow); }

/* Journal page object in the app's 1000-unit page space (4:5) */
.jpage { position: relative; aspect-ratio: 1000 / 1250; container-type: inline-size; background: #fff8ef; overflow: hidden; color: #3b2e25; }
.jpage .paper { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .58; }
.jpage .el { position: absolute; transform-origin: 50% 50%; }
.jpage .el > img { width: 100%; height: 100%; }
.jpage .frame .ph { position: absolute; object-fit: cover; }
.jpage .frame .fr { position: absolute; inset: 0; width: 100%; height: 100%; }
.jpage .frame.f43 .ph { left: 3.19%; top: 3.68%; width: 93.62%; height: 80.98%; }
.jpage .frame.f34 .ph { left: 4.26%; top: 2.93%; width: 91.48%; height: 83.78%; }
.jpage .frame.f11 .ph { left: 4.29%; top: 3.81%; width: 91.43%; height: 81.27%; }
.jpage .t-title { font: 600 11.2cqw/1.05 "Caveat", cursive; white-space: nowrap; }
.jpage .t-meta { font: 500 5.2cqw/1.15 "Caveat", cursive; white-space: pre; color: #4e4035; }
.jpage .routecard { background: #fffdf8; border-radius: 1.6cqw; box-shadow: 0 .3cqw 1.2cqw rgba(59, 46, 37, .14); padding: 1.2cqw 1.6cqw; }
.jpage .routecard svg { width: 100%; height: 100%; }

/* ---------- Thread: one line from the hero's end dot to the closing hedgehog (built by main.js) ---------- */
main { position: relative; }
.thread { position: absolute; left: 0; top: 0; width: 100%; height: 0; overflow: visible; pointer-events: none; z-index: 1; }
.thread .ln { fill: none; stroke: var(--route); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.thread .stopdot { stroke: var(--ink); stroke-width: 3; transition: fill .3s ease; }
.thread .stopdot.deep { stroke: var(--on-deep); }
.thread .stopdot.on { fill: var(--route) !important; }
.thread .enddot { fill: var(--ink); }
.rider { position: absolute; left: 0; top: 0; width: 42px; z-index: 1; pointer-events: none; will-change: transform; transition: opacity .25s ease; }
.rider.away { opacity: 0; }
.rider img { display: block; }
.hero .wrap, .privacy .wrap, .closing .wrap { position: relative; z-index: 2; }
.privacy .wrap, .closing .wrap { padding-left: var(--lane); }
.stop { position: relative; padding-block: var(--section); background: var(--ground); }
.stop[data-ground="hi"] { --ground: var(--hi); }
.stop[data-ground="lo"] { --ground: var(--lo); }
.stop[data-ground="field"] { --ground: var(--field); }
.stop .wrap { position: relative; z-index: 2; padding-left: var(--lane); }

h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: clamp(36px, 4.7vw, 65px); line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; }
h3 { font-weight: 600; font-size: 24px; line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; }
.intro { margin-top: 16px; font-size: 18px; line-height: 1.55; color: var(--text); max-width: 36em; }

.screen { border-radius: 18px; overflow: hidden; box-shadow: var(--paper-shadow); background: #fff8ef; }
.screen img { width: 100%; }
.obj { position: relative; }
.obj > .sample { left: -8px; top: -12px; }
.pg { box-shadow: var(--paper-shadow); border-radius: 2px; background: #fff8ef; }
.pg .jpage { border-radius: 2px; }

/* ---------- 2 How it works: three equal columns, each text under its own picture ---------- */
.seq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: clamp(28px, 3.2vw, 52px); margin-top: clamp(40px, 5vw, 72px); }
.step { position: relative; display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.step .vis { position: relative; align-self: end; }
.txt { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.txt p { margin-top: 8px; max-width: 30em; }
.obj-screen { width: min(100%, 250px); margin-inline: auto; }
.obj-page { width: min(88%, 268px); margin-inline: auto; rotate: 2deg; }

/* Photos step: the walk's clock. The range thumb (the hedgehog) travels from --tw/2 to (axis width - --tw/2),
   so photos, ticks and the walked line are placed with the same formula. */
.timed { --tw: 44px; --axisw: 76%; --pw: 28%; --band: 108px; --line-y: 54px; width: min(100%, 360px); margin-inline: auto; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 44px; }
.window { font-size: 14px; line-height: 1.45; color: var(--muted); }
.window span { margin-right: 8px; font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .06em; text-transform: uppercase; }
.play { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border: 1.5px solid var(--ink); border-radius: 4px; background: transparent; color: var(--ink); font: 700 14px/1 "DM Sans", system-ui, sans-serif; cursor: pointer; transition: background-color .18s ease, color .18s ease, transform .12s var(--ease-out); }
.play svg { width: 12px; height: 12px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) { .play:hover { background: var(--ink); color: var(--hi); } }
.play:active { transform: scale(.97); }
.play[aria-disabled="true"] { opacity: .55; cursor: default; }
.s-timed { right: 0; top: -30px; }
.tl { position: relative; height: 292px; margin-top: 8px; }

.shots { position: absolute; inset: 0; }
.shots li { position: absolute; bottom: calc(var(--band) - var(--line-y) + var(--stem)); width: var(--pw); display: flex; flex-direction: column; align-items: center; }
.shots .shot { left: calc(var(--tw) / 2 + var(--t) * (var(--axisw) - var(--tw))); translate: -50% 0; }
.shots .out { right: 0; }
.shots li:nth-child(1), .shots li:nth-child(3) { --stem: 128px; }
.shots li:nth-child(2) { --stem: 22px; }
.shots .out { --stem: 62px; flex-direction: column-reverse; }   /* above the hedgehog's head when it stands at 3:36; caption on top */
.shots .when { margin-bottom: 6px; font-size: 14px; font-weight: 600; line-height: 1.25; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shots .when em { display: block; font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.shots .out .when { margin: 0 0 6px; text-align: right; align-self: flex-end; }
.shots .ph { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; }
.shots .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 3px solid #fff; border-radius: 3px; box-shadow: 0 10px 20px -12px var(--shadow-1); }
/* Stem down to the walk line, and the dot where the photo was taken */
.shots li::after { content: ""; position: absolute; top: 100%; left: 50%; width: 2px; height: var(--stem); margin-left: -1px; background: var(--ink); transform-origin: 50% 100%; }
.shots li::before { content: ""; position: absolute; top: calc(100% + var(--stem) - 5px); left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ink); z-index: 1; }
/* After the walk: in colour, held back, its stem never reaches the line */
.shots .out .ph { opacity: .5; }
.shots .out::after { width: 0; border-left: 2px dotted var(--gap); background: none; height: calc(var(--stem) - 8px); }
.shots .out::before { background: var(--ground); border: 2px solid var(--gap); }

.axis { position: absolute; left: 0; bottom: 0; width: var(--axisw); height: var(--band); }
.axis .line { position: absolute; left: calc(var(--tw) / 2); right: calc(var(--tw) / 2); top: calc(var(--line-y) - 2px); height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--route) calc(var(--p, 1) * 100%), color-mix(in oklab, var(--ink) 20%, transparent) 0); }
.axis .line::before, .axis .line::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; }
.axis .line::before { left: -6px; background: var(--ground); border: 3px solid var(--ink); }
.axis .line::after { right: -6px; background: var(--ink); }
.tk { position: absolute; top: calc(var(--line-y) + 14px); translate: -50% 0; font-size: 14px; line-height: 1.45; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.tk-start { left: calc(var(--tw) / 2); }
.tk-end { left: calc(100% - var(--tw) / 2); }
.hog-static { position: absolute; left: calc(100% - var(--tw) / 2); top: calc(var(--line-y) - 53px); width: 39px; translate: -50% 0; pointer-events: none; }

/* The scrubber: a native range input. The hedgehog is its thumb; the line under it is drawn separately. */
.scrub { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.scrub:active { cursor: grabbing; }
.scrub:focus { outline: none; }
.scrub::-webkit-slider-runnable-track { height: var(--band); background: transparent; border: 0; box-shadow: none; -webkit-appearance: none; appearance: none; }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: var(--tw); height: var(--band); border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.scrub::-moz-range-track { height: var(--band); background: transparent; border: 0; box-shadow: none; }
.scrub::-moz-range-thumb { width: var(--tw); height: var(--band); border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.scrub::-moz-range-progress { background: transparent; }
/* The hedgehog that rides the scrubber: a plain image placed from --p, so WebKit never paints a box behind it. */
.scrub-hog { position: absolute; left: calc(var(--tw) / 2 + var(--p, 1) * (100% - var(--tw))); top: calc(var(--line-y) - 53px); width: 39px; translate: -50% 0; pointer-events: none; border-radius: 8px; }
.scrub:focus-visible + .scrub-hog { outline: 3px solid var(--route); outline-offset: 3px; }
.walk-hint { display: flex; align-items: center; gap: 6px; margin-top: 2px; min-height: 30px; transition: opacity .2s ease; }   /* a handwritten note; see Handwritten notes */
.seq[data-walk="end"] .walk-hint, .walk-hint.gone { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s .2s; }

/* Scrubber states (set by main.js). Without JS the finished state shows: every photo on the line, the page filled. */
.shot .ph, .shot .when { transition: opacity .24s ease, translate .3s var(--ease-out); }
.shots li::after, .shots li::before { transition: transform .22s var(--ease-out); }
.shot:not(.on) .ph { opacity: .42; translate: 0 -8px; }
.shot:not(.on) .when { opacity: .62; }
.shot:not(.on)::after { transform: scaleY(0); }
.shot:not(.on)::before { transform: scale(0); }
.obj-page .frame .ph { transition: opacity .2s ease; }
.obj-page .frame .ph.off { opacity: 0; }
/* Empty photo windows while the walk is still on: a faint tint where each photo will go */
.obj-page .frame::before { content: ""; position: absolute; background: #eadfcd; }
.obj-page .frame.f43::before { left: 3.19%; top: 3.68%; width: 93.62%; height: 80.98%; }
.obj-page .frame.f34::before { left: 4.26%; top: 2.93%; width: 91.48%; height: 83.78%; }
.obj-page .frame.f11::before { left: 4.29%; top: 3.81%; width: 91.43%; height: 81.27%; }
.seq { position: relative; }
.walk-fly { position: absolute; left: 0; top: 0; z-index: 6; object-fit: cover; border-radius: 2px; box-shadow: 0 12px 22px -12px var(--shadow-1); pointer-events: none; transform-origin: 50% 50%; will-change: transform; }

/* ---------- 3 Making the page: text and kit on the left, the page on the right ---------- */
.making-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px clamp(40px, 5vw, 88px); align-items: center; }
.making-side { display: flex; flex-direction: column; gap: 34px; }
.size-label { font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .06em; text-transform: uppercase; }
.kit-label { display: flex; align-items: center; gap: 8px; }   /* a handwritten note; see Handwritten notes */
.seg-ctl { position: relative; display: inline-grid; grid-template-columns: repeat(3, 72px); margin-top: 10px; padding: 4px; gap: 4px; border-radius: 8px; background: color-mix(in oklab, var(--ink) 8%, var(--ground)); }
.seg-ctl button { position: relative; z-index: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); font: 700 16px/1 "DM Sans", system-ui, sans-serif; font-variant-numeric: tabular-nums; cursor: pointer; transition: color .22s ease; }
@media (hover: hover) and (pointer: fine) { .seg-ctl button:not([aria-pressed="true"]):hover { background: color-mix(in oklab, var(--ink) 6%, transparent); } }
.seg-ctl button[aria-pressed="true"] { color: var(--field); }
/* Without script the pressed button carries its own dark fill; with script a single indicator slides under it. */
html:not(.js) .seg-ctl button[aria-pressed="true"] { background: var(--ink); }
.seg-ind { position: absolute; left: 4px; top: 4px; bottom: 4px; width: calc((100% - 16px) / 3); border-radius: 5px; background: var(--ink); transform: translateX(calc(var(--i, 0) * (100% + 4px))); pointer-events: none; }
.seg-ctl button:focus:not(:focus-visible) { outline: none; }
.seg-ctl button:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; border-radius: 5px; }
.size-note { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 30em; }
.route-note { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
.route-note svg { width: 96px; }
.route-note p { font-size: 18px; }
.rn-line { fill: none; stroke: var(--route); stroke-width: 4; stroke-linecap: round; }
.rn-gap { fill: none; stroke: var(--gap); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 7; }
.rn-start { fill: var(--ground); stroke: var(--ink); stroke-width: 2.5; }
.rn-end { fill: var(--ink); }

.stage { position: relative; }
/* A fixed 4:5 box. The page keeps this height; 2:3 and 9:16 pages are narrower, centred in it. */
.sizer { position: relative; width: min(100%, 500px); aspect-ratio: 4 / 5; margin-inline: auto; }
.sizer .wp { position: absolute; top: 0; left: 50%; translate: -50% 0; box-shadow: 0 22px 32px -18px color-mix(in oklab, var(--ink) 52%, transparent), 0 2px 4px -1px var(--shadow-2); }
.sizer .wp[data-size="2x3"] { width: 83.333%; }
.sizer .wp[data-size="9x16"] { width: 70.313%; }
.lay { position: absolute; top: 0; bottom: 0; left: 50%; width: 100%; translate: -50% 0; pointer-events: none; z-index: 4; }
.lay .sample { left: -8px; top: -12px; }
.sizer[data-size="2x3"] .lay { width: 83.333%; }
.sizer[data-size="9x16"] .lay { width: 70.313%; }
/* The paper behind the page while it changes size: the same sheet, grid and shadow, sized to the new page and
   scaled sideways from the old width (main.js). Hidden at rest; during the change the page itself goes clear. */
.wp-paper { position: absolute; top: 0; left: 50%; width: 100%; aspect-ratio: 1000 / 1250; translate: -50% 0; container-type: inline-size; visibility: hidden; border-radius: 2px;
  background: linear-gradient(rgba(250, 246, 238, .5), rgba(250, 246, 238, .5)), url("assets/page/paper_cozy_cream.jpg") center / cover, #f6f1e7;
  box-shadow: 0 22px 32px -18px color-mix(in oklab, var(--ink) 52%, transparent), 0 2px 4px -1px var(--shadow-2); }
.wp-paper::before { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(96, 110, 128, .09) .2cqi, transparent .2cqi) 0 0 / 2.5cqi 2.5cqi,
    linear-gradient(to bottom, rgba(96, 110, 128, .09) .2cqi, transparent .2cqi) 0 0 / 2.5cqi 2.5cqi; }
.sizer[data-size="2x3"] .wp-paper { width: 83.333%; aspect-ratio: 1000 / 1500; }
.sizer[data-size="9x16"] .wp-paper { width: 70.313%; aspect-ratio: 1000 / 1778; }
.sizer.morph .wp-paper { visibility: visible; }
.sizer.morph .wp { background: none; box-shadow: none; overflow: visible; }
.sizer.morph .wp-in { background: none; }
.sizer.morph .stamp { transition: none; }

/* ---- The sample page (HTML stand-in for the app's walk template). Page units: 1cqi = 10 units of the 1000-unit width. ---- */
.wp { position: relative; width: 100%; aspect-ratio: 1000 / 1250; container-type: inline-size; overflow: hidden; border-radius: 2px; color: #2f2a26;
  background:
    linear-gradient(rgba(250, 246, 238, .5), rgba(250, 246, 238, .5)),
    url("assets/page/paper_cozy_cream.jpg") center / cover,
    #f6f1e7; }
.wp[data-size="2x3"] { aspect-ratio: 1000 / 1500; }
.wp[data-size="9x16"] { aspect-ratio: 1000 / 1778; }
/* The grid is drawn on .wp-in, inside the page's container, so 2.5cqi is 25 page units (on .wp itself, cqi would
   resolve against the viewport). Lines are .2cqi too (1px on the 500px page), so small copies stay faint. */
.wp-in { position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(96, 110, 128, .09) .2cqi, transparent .2cqi) 0 0 / 2.5cqi 2.5cqi,
    linear-gradient(to bottom, rgba(96, 110, 128, .09) .2cqi, transparent .2cqi) 0 0 / 2.5cqi 2.5cqi; }
.wp-in > * { position: absolute; margin: 0; }
.wp-title { left: 7cqi; top: 4.2cqi; font: 600 11.5cqi/1 "Cormorant Garamond", Georgia, serif; color: #1f3a5f; letter-spacing: -.01em; white-space: nowrap; }
.wp-big { left: 7cqi; top: 20cqi; width: 56cqi; height: 36cqi; border-radius: 1.2cqi; overflow: hidden; background: #e6dfd2; box-shadow: 0 .3cqi .8cqi rgba(47, 42, 38, .16); }
.wp .ph { transition: opacity .2s ease; }
.wp .ph.off { opacity: 0; }
.wp-big img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.wp-tape { height: auto; }
.wp-ta { left: 46cqi; top: 18cqi; width: 18cqi; rotate: -3deg; }
.wp-tb { left: 9cqi; top: 53.8cqi; width: 15cqi; rotate: 2deg; opacity: .92; }
.wp-col { top: 64cqi; }
.wp-c1 { left: 7cqi; width: 29cqi; }
.wp-c2 { left: 39.5cqi; width: 24cqi; }
.wp-c3 { left: 66cqi; width: 27cqi; }
.wp-h { font: 500 4.8cqi/1.15 "Caveat", cursive; color: #1f3a5f; }
.wp-card { margin-top: 2cqi; height: 22cqi; border: 1px solid rgba(31, 58, 95, .2); border-radius: 1.2cqi; padding: 1.4cqi;
  background: linear-gradient(to right, rgba(31, 58, 95, .1) 1px, transparent 1px) 0 0 / 3.6cqi 3.6cqi, linear-gradient(to bottom, rgba(31, 58, 95, .1) 1px, transparent 1px) 0 0 / 3.6cqi 3.6cqi, #f7f4ee; }
.wp-card svg { width: 100%; height: 100%; overflow: visible; }
.wr-ln { fill: none; stroke: #1f3a5f; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.wr-gap { fill: none; stroke: #8a8f96; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0.5 14; }
.wr-start { fill: #f7f4ee; stroke: #1f3a5f; stroke-width: 5; }
.wr-end { fill: #1f3a5f; }
.wp-tag { margin-top: .9cqi; font: 600 1.7cqi/1 "DM Sans", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #77706a; }
.wp-stats { margin-top: 2.4cqi; display: flex; flex-direction: column; font: 500 4cqi/1.2 "DM Sans", sans-serif; color: #625a53; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.wp-hand { margin-top: 1.4cqi; font: 455 4.2cqi/1.75 "Caveat", cursive; color: #2f2a26; }
.wp-c2 .wp-hand li { padding-left: 1.6cqi; text-indent: -1.6cqi; }
.wp-sm { padding: 1.4cqi; background: linear-gradient(#e6dfd2, #e6dfd2) content-box, #fbfaf6; border-radius: .8cqi; box-shadow: 0 .4cqi 1.2cqi rgba(47, 42, 38, .18); }
.wp-sm img { width: 100%; object-fit: cover; }
.wp-s1 img { aspect-ratio: 3 / 4; }
/* 4:5: the bridge on the left, the path and the meadow framed beside it */
.wp-s1 { left: 67cqi; top: 18.5cqi; width: 26cqi; rotate: 2.5deg; }
.wp[data-size="4x5"] .wp-s1 img { aspect-ratio: 4 / 3; }
.wp-s2 { left: 66cqi; top: 41cqi; width: 27cqi; rotate: -2deg; }
.wp-s2 img { aspect-ratio: 4 / 3; }
.wp-sample { right: 7cqi; bottom: 3cqi; font: 600 1.7cqi/1 "DM Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #77706a; }
/* 2:3 and 9:16: the bridge across the page, the path and the meadow framed lower down */
.wp[data-size="2x3"] .wp-big, .wp[data-size="9x16"] .wp-big { top: 21cqi; width: 86cqi; }
.wp[data-size="2x3"] .wp-ta, .wp[data-size="9x16"] .wp-ta { left: 67cqi; top: 18.6cqi; width: 22cqi; }
.wp[data-size="2x3"] .wp-tb, .wp[data-size="9x16"] .wp-tb { left: 10cqi; width: 17cqi; }
.wp[data-size="2x3"] .wp-big { height: 42cqi; }
.wp[data-size="2x3"] .wp-tb { top: 60.6cqi; }
.wp[data-size="2x3"] .wp-col { top: 69cqi; }
.wp[data-size="2x3"] .wp-card { height: 25cqi; }
.wp[data-size="2x3"] .wp-s1 { left: 36cqi; top: 104cqi; width: 18cqi; rotate: -3deg; }
.wp[data-size="2x3"] .wp-s2 { left: 58cqi; top: 112cqi; width: 33cqi; rotate: 2.5deg; }
/* 9:16: taller again; the path photo joins the meadow at the bottom */
.wp[data-size="9x16"] .wp-big { height: 50cqi; }
.wp[data-size="9x16"] .wp-tb { top: 68.6cqi; }
.wp[data-size="9x16"] .wp-col { top: 77cqi; }
.wp[data-size="9x16"] .wp-card { height: 30cqi; }
.wp[data-size="9x16"] .wp-s1 { left: 8cqi; top: 142cqi; width: 21cqi; rotate: -3deg; }
.wp[data-size="9x16"] .wp-s2 { left: 57cqi; top: 134cqi; width: 35cqi; rotate: 2.5deg; }

/* Stamps: positioned in page units of the page they sit on; main.js sets the slot for the current size. */
.stamps { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.stamp { position: absolute; left: 0; top: 0; width: calc(var(--w) * 1cqi); translate: calc(var(--x) * 1cqi - 50%) calc(var(--y) * 1cqi - 50%); rotate: var(--r, 0deg); filter: drop-shadow(0 .5cqi .6cqi rgba(59, 46, 37, .2)); }
.stamp > img { width: 100%; height: auto; }
.stamp.st-frame { aspect-ratio: 420 / 472; }
.stamp.st-frame .ph { position: absolute; left: 4.29%; top: 3.81%; width: 91.43%; height: 81.27%; object-fit: cover; }
.stamp.st-frame .fr { position: absolute; inset: 0; width: 100%; height: 100%; }
.stamp.st-text { width: auto; font: 600 calc(var(--fs) * 1cqi)/1 "Caveat", cursive; color: #4e4035; white-space: nowrap; filter: none; }
.stamp.st-draw { filter: none; }
.stamp.st-draw svg { width: 100%; height: auto; overflow: visible; }
.stamp.st-draw path { fill: none; stroke: #c4553a; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.stamp.leaving { opacity: 0; transition: opacity .16s ease; }

.kit-box { width: min(100%, 460px); }
.kit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.kit { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.kit li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.kit button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 10px 2px 10px; border: 1.5px solid color-mix(in oklab, var(--ink) 16%, transparent); border-radius: 8px; background: color-mix(in oklab, var(--hi) 70%, transparent); color: var(--ink); font: 600 14px/1.2 "DM Sans", system-ui, sans-serif; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, transform .12s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .kit button:hover { background: var(--hi); border-color: color-mix(in oklab, var(--ink) 34%, transparent); } }
.kit button:active { transform: scale(.96); }
/* Icons: one 44px box each, drawn at a similar weight */
.ico { display: grid; place-items: center; width: 44px; height: 44px; }
.ico > img { width: 44px; height: 44px; object-fit: contain; }
.ico > img.ico-tape { width: 44px; height: 16px; object-fit: cover; rotate: -12deg; filter: drop-shadow(0 0 .5px rgba(23, 32, 49, .9)) saturate(1.3); }
.ico-frame { display: block; width: 38px; padding: 3px 3px 7px; background: #fff; border: 1.5px solid var(--ink); border-radius: 2px; rotate: -4deg; }
.ico-frame img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.ico-draw { width: 38px; height: 34px; overflow: visible; }
.ico-draw path { fill: none; stroke: #c4553a; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.kit .aa { display: grid; place-items: center; font: 700 38px/1 "Caveat", cursive; color: #4e4035; }
.clear { min-height: 44px; padding: 0 16px; border: 1.5px solid color-mix(in oklab, var(--ink) 30%, transparent); border-radius: 4px; background: transparent; color: var(--ink); font: 700 14px/1 "DM Sans", system-ui, sans-serif; cursor: pointer; transition: background-color .18s ease, opacity .18s ease; }
@media (hover: hover) and (pointer: fine) { .clear:not(:disabled):hover { background: var(--hi); } }
.clear:disabled { opacity: .45; cursor: default; }

/* ---------- 4 Memories: pages along a date axis ---------- */
.memories { padding-bottom: 0; overflow-x: clip; }   /* page copies flying in from the strip never widen the page */
/* The last .wrap, counted among wraps only: the copies that fly in during Collect and Put back are appended to the
   section, and with :last-child the wrap lost this padding while they were there (the section shrank and came back). */
.memories > :nth-last-child(1 of .wrap) { padding-bottom: var(--section); }
.strip-wrap { --sg: 28px; margin-top: clamp(32px, 4vw, 56px); }
.strip-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding: 28px 12px 6px; margin-inline: -12px; border-radius: 4px; }
.strip { display: flex; gap: var(--sg); }
.sp { position: relative; flex: 0 0 calc((100% - 4 * var(--sg)) / 5); min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; }
.sp .pg { position: relative; z-index: 1; }
.sp:nth-child(1) .pg { rotate: -1.6deg; }
.sp:nth-child(2) .pg { rotate: 1.2deg; }
.sp:nth-child(3) .pg { rotate: -.8deg; }
.sp:nth-child(4) .pg { rotate: 1.6deg; }
.sp:nth-child(5) .pg { rotate: -1.2deg; }
.page-img { width: 100%; border-radius: 2px; }
.sp time { position: relative; display: block; margin-top: 26px; padding-top: 18px; text-align: center; font-size: 14px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* The date axis: one 2px piece per page, from its left edge to the next page (on .sp, so it can draw on its own
   while the date fades in with the page). The time box is 38px tall, so the axis sits 36px above the bottom. */
.sp::after { content: ""; position: absolute; left: 0; right: calc(-1 * var(--sg)); bottom: 36px; height: 2px; background: var(--ink); transform-origin: 0 50%; }
.sp:last-child::after { right: 0; }
.sp time::after { content: ""; position: absolute; top: -5px; left: 50%; width: 2px; height: 12px; margin-left: -1px; background: var(--ink); }
.s-strip { top: -4px; left: var(--lane); }

/* Collection: a few of those journals, gathered under one title. States: none / closed / open (data-coll).
   Text on the left, the collection on the right. The row has the same size in every state: before anything is
   collected the stage shows the blank book, and everything that comes and goes (buttons, counts, captions) is
   swapped by opacity in place, so nothing reflows and the thread never has to rebuild. */
.coll { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px clamp(40px, 5vw, 88px); margin-top: clamp(48px, 5vw, 72px); align-items: center; }
.coll-stage { --sh: 56.25; position: relative; aspect-ratio: 16 / 9; container-type: inline-size; grid-column: 2; grid-row: 1; }
.coll-info { grid-column: 1; grid-row: 1; }
.s-coll { left: -8px; top: -12px; }
.book { position: absolute; inset: 0; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-radius: 6px; }
button.book { cursor: pointer; }
button.book:disabled { cursor: default; }
/* "No chapters yet" shares a cell with the description; the count and the hint fade out below it. */
.book-title .desc, .book-title .m-none, .book-title .meta { transition: opacity .25s ease; }
.book-title .hint { transition: opacity .15s ease; }
.desc-wrap { display: grid; }
.desc-wrap > span { grid-area: 1 / 1; }
.book-title .m-none { font-size: 14px; line-height: 1.45; color: var(--muted); }
.book-title .m-none, .coll[data-coll="none"] .book-title .desc, .coll[data-coll="none"] .book-title .meta, .coll[data-coll="none"] .book-title .hint { opacity: 0; }
.coll[data-coll="none"] .book-title .m-none { opacity: 1; }
/* The blank book: the empty collection, same size and place as the closed stack. Pages land on it and leave it. */
.blank { position: absolute; left: 4cqw; top: calc((var(--sh) * 1cqw - 42cqw) / 2); width: 30.6cqw; aspect-ratio: 4 / 5; transform-origin: 0 0; rotate: -2deg; transition: opacity .25s ease; }
.blank-cover, .blank-sheet { position: absolute; inset: 0; border-radius: 2px; background: #fbf7ef; box-shadow: var(--paper-shadow); }
.blank-cover { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 7%, transparent), var(--paper-shadow); }
.blank-sheet { translate: 1.4cqw .9cqw; rotate: 3deg; background: #f4efe4; }
.coll[data-coll="open"] .blank { opacity: 0; }
.coll[data-coll="none"] .leaf { opacity: 0; }
/* Leaves are laid out at their stacked (largest) size and only ever scale down, so they never re-raster blurry.
   Open and close are FLIP animations on transform in main.js; CSS holds the two end states. */
.leaf { position: absolute; left: 4cqw; top: calc((var(--sh) * 1cqw - 42cqw) / 2); width: 30.6cqw; transform-origin: 0 0; }
/* Each page is its own paint island; a flying or turning page never repaints its neighbours or the row. */
.leaf .lf { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: #fff8ef; box-shadow: var(--paper-shadow); contain: layout paint; }
.leaf .lf > img { width: 100%; height: 100%; object-fit: cover; }
.leaf .lf .jpage, .leaf .lf .wp { width: 100%; }
/* Captions sit inside the scaled-down leaf, so they are set larger to read at 13px. */
.leaf .cap { position: absolute; left: -10%; right: -10%; top: 100%; margin-top: 20px; font-size: 24px; font-weight: 600; line-height: 1.25; text-align: center; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .25s ease; }
.leaf .cap span { display: block; font-size: 24px; font-weight: 400; color: var(--muted); }   /* the open fan scales leaves to .588: 24px reads as 14px */
/* Closed: a stack, cover on top */
.leaf-1 { z-index: 5; rotate: -2deg; }
.leaf-2 { z-index: 4; translate: 1.4cqw .6cqw; rotate: 1.5deg; }
.leaf-3 { z-index: 3; translate: 2.8cqw 1.2cqw; rotate: 4deg; }
.leaf-4 { z-index: 2; translate: 4.2cqw 1.8cqw; rotate: 6deg; }
.leaf-5 { z-index: 1; translate: 5.6cqw 2.4cqw; rotate: 8deg; }
.book-title { position: absolute; left: 44cqw; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 4px; transition: opacity .25s ease; }
.book-title b { font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -.015em; }
.book-title .desc { font-size: 14px; line-height: 1.45; color: var(--muted); }
.book-title .meta { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.close-hint { position: absolute; right: 0; bottom: 0; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1.5px solid color-mix(in oklab, var(--ink) 30%, transparent); border-radius: 4px; background: var(--hi); font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .06em; text-transform: uppercase; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.coll[data-coll="open"] .close-hint { opacity: 1; }
.leaf.landing { opacity: 0; }
.leaf .lf .pg { box-shadow: none; }
/* ---------- Handwritten notes: the three interactive hints (§2 drag, §3 kit, §4 open the collection) ----------
   Caveat in --hand (5.2 on lo, 6.0 on field, 6.6 on hi), tilted about the left edge, each with a hand-drawn arrow
   (a mask, so it takes the text colour). They are written on (main.js, writeOn): .is-written, plus .is-writing when
   it should play. Until then the words and the arrow are clipped away, so the note keeps its place and nothing
   moves; with script off they are simply shown. The words are uncovered left to right in 900ms, pausing a little
   after each word (per-note keyframes), then the arrow is drawn from its tail to its head in 400ms. The clip runs
   past the box so Caveat's strokes are never cut. */
.note { width: fit-content; font: 600 24px/1.1 "Caveat", cursive; color: var(--hand); transform-origin: left center; rotate: -2deg; }
.walk-hint::before, .kit-label::after, .book-title .hint::before {
  content: ""; flex: none; display: block; background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
}
/* §2: the hedgehog rides the line above and to the right; the arrow curls up toward it (tail low left). */
.walk-hint::before { width: 34px; height: 30px; margin-top: -16px; --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 27C5 16 13 8 28 5.5'/%3E%3Cpath d='M22 1.5 28.5 5.5 23.5 11'/%3E%3C/svg%3E"); }
/* §3: the kit is below; the arrow drops toward it after the words (tail at the words). */
.kit-label::after { width: 34px; height: 28px; margin-top: 14px; --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 28' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5c11-3 20 2 22 17'/%3E%3Cpath d='M20 17.5 25 23l4.5-6'/%3E%3C/svg%3E"); }
/* §4: the book is to the left; the arrow points back at it (tail at the words, on the right). */
.book-title .hint { display: flex; align-items: center; gap: 6px; margin-top: 12px; margin-left: -4px; }
.book-title .hint::before {
  width: 30px; height: 18px;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M28 12C20 6 11 6 4 9'/%3E%3Cpath d='M8.5 3.5 3.5 9l6 3.5'/%3E%3C/svg%3E");
}
.js .note:not(.is-written) .note-t { clip-path: inset(-40% 100% -40% -12%); }
.js .walk-hint:not(.is-written)::before, .js .kit-label:not(.is-written)::after { clip-path: inset(-30% 100% -30% 0); }
.js .book-title .hint:not(.is-written)::before { clip-path: inset(-30% 0 -30% 100%); }
.walk-hint.is-writing .note-t { animation: note-write-walk 900ms ease-in-out both; }
.kit-label.is-writing .note-t { animation: note-write-kit 900ms ease-in-out both; }
.book-title .hint.is-writing .note-t { animation: note-write-coll 900ms ease-in-out both; }
.walk-hint.is-writing::before, .kit-label.is-writing::after { animation: note-arrow-ltr 400ms cubic-bezier(.45, 0, .25, 1) 900ms both; }
.book-title .hint.is-writing::before { animation: note-arrow-rtl 400ms cubic-bezier(.45, 0, .25, 1) 900ms both; }
@keyframes note-write-walk {
  0% { clip-path: inset(-40% 100% -40% -12%); }
  11% { clip-path: inset(-40% 85% -40% -12%); }   /* Drag */
  16% { clip-path: inset(-40% 85% -40% -12%); }
  25% { clip-path: inset(-40% 73.6% -40% -12%); }   /* the */
  30% { clip-path: inset(-40% 73.6% -40% -12%); }
  50% { clip-path: inset(-40% 46% -40% -12%); }   /* hedgehog */
  56% { clip-path: inset(-40% 46% -40% -12%); }
  61% { clip-path: inset(-40% 38.2% -40% -12%); }   /* to */
  66% { clip-path: inset(-40% 38.2% -40% -12%); }
  77% { clip-path: inset(-40% 24.4% -40% -12%); }   /* keep */
  82% { clip-path: inset(-40% 24.4% -40% -12%); }
  100% { clip-path: inset(-40% -12% -40% -12%); }   /* walking. */
}
@keyframes note-write-kit {
  0% { clip-path: inset(-40% 100% -40% -12%); }
  14% { clip-path: inset(-40% 82.8% -40% -12%); }   /* Add */
  19% { clip-path: inset(-40% 82.8% -40% -12%); }
  28% { clip-path: inset(-40% 70.8% -40% -12%); }   /* to */
  33% { clip-path: inset(-40% 70.8% -40% -12%); }
  47% { clip-path: inset(-40% 53.4% -40% -12%); }   /* the */
  52% { clip-path: inset(-40% 53.4% -40% -12%); }
  77% { clip-path: inset(-40% 22% -40% -12%); }   /* sample */
  82% { clip-path: inset(-40% 22% -40% -12%); }
  100% { clip-path: inset(-40% -12% -40% -12%); }   /* page */
}
@keyframes note-write-coll {
  0% { clip-path: inset(-40% 100% -40% -12%); }
  24% { clip-path: inset(-40% 73.3% -40% -12%); }   /* Open */
  29% { clip-path: inset(-40% 73.3% -40% -12%); }
  48% { clip-path: inset(-40% 51.9% -40% -12%); }   /* the */
  53% { clip-path: inset(-40% 51.9% -40% -12%); }
  100% { clip-path: inset(-40% -12% -40% -12%); }   /* collection */
}
@keyframes note-arrow-ltr {
  from { clip-path: inset(-30% 100% -30% 0); }
  to   { clip-path: inset(-30% 0 -30% 0); }
}
@keyframes note-arrow-rtl {
  from { clip-path: inset(-30% 0 -30% 100%); }
  to   { clip-path: inset(-30% 0 -30% 0); }
}
/* Open: the chapters fan out in one row, each with its number and date */
.coll[data-coll="open"] .leaf { scale: .588; }
.coll[data-coll="open"] .leaf-1 { translate: -2cqw 7cqw; rotate: -2.5deg; }
.coll[data-coll="open"] .leaf-2 { translate: 17.6cqw 7cqw; rotate: .5deg; }
.coll[data-coll="open"] .leaf-3 { translate: 37.2cqw 7cqw; rotate: 2deg; }
.coll[data-coll="open"] .leaf-4 { translate: 56.8cqw 7cqw; rotate: -1deg; }
.coll[data-coll="open"] .leaf-5 { translate: 76.4cqw 7cqw; rotate: 1.5deg; }
.coll[data-coll="open"] .cap { opacity: 1; transition-delay: .35s; }
.coll[data-coll="open"] .book-title { opacity: 0; }
.book-title .hint.is-hidden { opacity: 0; }   /* Open and Put back: the note fades out in 150ms at once */
.book:focus { outline: none; }
.book:focus-visible { outline: 3px solid var(--route); outline-offset: 6px; }
#coll-title:focus { outline: none; }

.coll-info h3 { margin-bottom: 8px; }
.coll-info p + p { margin-top: 10px; }
.coll-info p { max-width: 34em; }
.coll-ctl { display: grid; justify-items: start; margin-top: 22px; }
.coll-ctl button { min-height: 48px; padding: 0 18px; border-radius: 4px; font: 700 16px/1 "DM Sans", system-ui, sans-serif; cursor: pointer; transition: background-color .26s ease, border-color .26s ease, color .26s ease, transform .12s var(--ease-out); }
.coll-ctl button:active { transform: scale(.97); }
.collect { border: 1.5px solid var(--ink); background: var(--ink); color: var(--field); }
.putback { border: 1.5px solid color-mix(in oklab, var(--ink) 30%, transparent); background: transparent; color: var(--ink); }
/* With script there is one button: its two labels share one cell (so it keeps the longer label's width), and it
   goes from filled (Collect) to outlined (Put back). main.js slides the labels. */
.collect:has(.lbl) { display: inline-grid; place-items: center; overflow: hidden; }
.collect .lbl { grid-area: 1 / 1; }
.collect .lbl[aria-hidden="true"] { opacity: 0; }
.collect.is-back { border-color: color-mix(in oklab, var(--ink) 30%, transparent); background: transparent; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .collect:hover { background: var(--ink-hover); } .putback:hover, .collect.is-back:hover { background: var(--hi); } }
.chapters { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.ch-head b { font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .06em; text-transform: uppercase; }
.chapters ol { margin-top: 10px; }
.chapters li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.chapters .n { font-weight: 600; }
.chapters .t { color: var(--text); }
.chapters time { font-size: 14px; line-height: 1.45; color: var(--muted); }
/* With script, the pages themselves show chapter and date; the list stays for screen readers. */
html.js .chapters { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.coll-fly { position: absolute; left: 0; top: 0; z-index: 8; pointer-events: none; transform-origin: 50% 50%; will-change: transform; box-shadow: var(--paper-shadow); border-radius: 2px; background: #fff8ef; overflow: hidden; contain: layout paint; }
.coll-fly .pg { box-shadow: none; }

/* Same columns as the collection row above, so the left edges line up. Both pictures sit in a media box of the same
   height (--mh): same top, same bottom, "Sample" tags at the same y, and both titles level with the top of the
   pictures. */
/* --sw and --ew are the two picture widths. The first column gives up half their difference, so the two text
   columns come out the same width. */
.mem-more { --mh: 188px; --cg: clamp(40px, 5vw, 88px); --sw: calc(var(--mh) * 660 / 896); --pw: calc((var(--mh) - 15px) * .8); --ew: calc(var(--pw) * 1.62 + 12px); display: grid; grid-template-columns: minmax(0, calc((100% - var(--cg) - var(--ew) + var(--sw)) / 2)) minmax(0, 1fr); gap: 40px var(--cg); margin-top: clamp(64px, 7vw, 104px); align-items: start; }
.mem { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.media { position: relative; height: var(--mh); margin: 0; }
.media > .sample { left: -8px; top: -12px; }
.mem h3 { line-height: 1.25; }
.mem h3 ~ p { margin-top: 8px; max-width: 30em; }
/* The Walk tab screen, fitted to the box height */
.slot-sm { width: var(--sw); }
.slot-sm .screen { height: 100%; border-radius: 14px; }
.slot-sm .screen img { height: 100%; object-fit: cover; }
/* Export: the Nov 3 page alone (PNG), and on top of its journal (PDF). Same page size, mirrored tilt, and the two
   tags on one line along the bottom of the box. */
.exp { width: var(--ew); }
.exp-item { position: absolute; top: 0; width: var(--pw); }
.exp-png { left: 0; z-index: 2; }
.exp-pdf { left: calc(var(--pw) * .62); z-index: 1; }
.exp-page { position: relative; z-index: 2; display: block; aspect-ratio: 4 / 5; background: #f6f1e7; border-radius: 2px; box-shadow: var(--paper-shadow); overflow: hidden; }
.exp-png .exp-page { rotate: -2deg; }
.exp-pdf .exp-page { rotate: 2deg; }
.exp-page .wp { width: 100%; }
.exp-sheet { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 4 / 5; background: #fbf7ef; border-radius: 2px; box-shadow: 0 1px 3px var(--shadow-2), 0 8px 16px -10px var(--shadow-1); }
.exp-sheet:nth-child(1) { translate: 8px 5px; rotate: 5deg; }
.exp-sheet:nth-child(2) { translate: 4px 2.5px; rotate: 3.5deg; }
.exp .fmt { position: absolute; z-index: 3; left: 50%; top: calc(var(--mh) - 30px); translate: -50% 0; display: inline-grid; place-items: center; min-width: 52px; height: 30px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--hi); font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- 5 Privacy ---------- */
.privacy { background: var(--deep); color: var(--on-deep); padding-block: var(--section); }
.privacy h2 { max-width: 14em; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px clamp(32px, 6vw, 96px); margin-top: clamp(36px, 4vw, 56px); max-width: 980px; }
/* Four short items: one row of four on wide screens, each under its own rule, so the one without a sentence sits
   on the same line as the others. */
@media (min-width: 1000px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px clamp(28px, 3vw, 48px); max-width: none; } }
/* Below 1200px four columns are too narrow for the 24px item titles (they break onto two or three lines): stay at two. */
@media (min-width: 1000px) and (max-width: 1199px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px clamp(32px, 6vw, 96px); max-width: 980px; } }
.facts li { border-top: 1px solid color-mix(in oklab, var(--on-deep) 24%, transparent); padding-top: 20px; }
.privacy :is(h2, h3) { color: var(--on-deep); }
.facts p { margin-top: 6px; font-size: 18px; color: var(--on-deep-muted); max-width: 34em; }
.policy { margin-top: clamp(36px, 4vw, 52px); }
.policy a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--on-deep-link); }
.privacy :focus-visible { outline-color: var(--on-deep-link); }

/* ---------- 6 Closing ---------- */
.closing { background: var(--hi); padding-block: var(--section) clamp(48px, 6vw, 80px); }
.closing-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.closing h2 { font-size: clamp(42px, 6vw, 85px); }
.closing .act { margin-top: 28px; }
.read-hog { width: clamp(180px, 22vw, 300px); }

/* ---------- Footer ---------- */
.foot { background: var(--hi); border-top: 1px solid var(--line); padding-block: 20px 28px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.foot .wordmark { font-size: 26px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.foot-links a { color: var(--ink); }
.copy { margin-left: auto; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (min-width: 1000px) and (max-width: 1199px) {
  /* Narrower columns: a taller collection box, so it matches the text beside it */
  .coll-stage { aspect-ratio: 4 / 3; --sh: 75; }
  .mem-more { --mh: 164px; }
}
@media (max-width: 999px) {
  /* §2: one step per row, picture and text side by side */
  .seq { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 64px; }
  .step { grid-row: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; gap: 24px 40px; align-items: center; }
  .step .vis { align-self: center; }
  .txt { margin-top: 0; }
  .obj-screen { width: min(100%, 240px); }
  .obj-page { width: min(84%, 260px); }

  /* §3 stacks: text, the page, then the kit right under it */
  .making-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .making-side { display: contents; }
  .making-in .stop-head { order: 1; }
  .stage { order: 2; }
  .kit-box { order: 3; }
  .size-ctl { order: 4; }
  .route-note { order: 5; max-width: 34em; }
  .sizer { width: min(100%, 440px); margin-inline: 0; }

  .strip-wrap { --sg: 22px; }
  .strip-scroll { scroll-snap-type: x mandatory; scroll-padding-inline: 12px; }
  .sp { flex-basis: clamp(200px, 36vw, 260px); }
  .coll { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .coll-stage, .coll-info { grid-column: auto; grid-row: auto; }
  .mem-more { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}
@media (max-width: 860px) {
  :root { --lane: 34px; --rail: 9px; }
  .hero-head { grid-template-columns: minmax(0, 1fr); }
  .band-wide { display: none; }
  .band-narrow { display: block; max-width: 520px; }
  .band-narrow .route .seg { stroke-width: 4.5; }
  .band-narrow .route .gap { stroke-width: 3; stroke-dasharray: 1 8; }
  .band-narrow .route .start { stroke-width: 3.5; }
  .band-narrow .pin { width: 12cqw; }
  .band-narrow .pin::after { height: 2.6cqw; }
  .band-narrow .pin figcaption { font-size: max(12px, 3.3cqw); }
  .band-narrow .pin-a { left: 36%; bottom: 63.2%; }
  .band-narrow .pin-c { left: 57%; bottom: 63.2%; }
  .band-narrow .pin-b { left: 78%; bottom: 63.2%; }
  .band-narrow .s-walk { right: auto; left: 0; top: 0; }
  .band-narrow .tag-t { font-size: max(12px, 3.3cqw); }
  .band-narrow .t-start { left: 0; top: 24.6%; }
  .band-narrow .t-gap { left: 64%; top: 89%; translate: -50% 0; text-align: center; line-height: 1.2; }
  .band-narrow .endpage { left: 3.9%; top: 51%; width: 25cqw; }
  .band-narrow .s-page { left: -10px; top: -14px; }
  .thread .ln { stroke-width: 3; }
  .thread .stopdot { stroke-width: 2.5; }
  .rider { width: 28px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .top { gap: 0 12px; padding-block: 6px 0; }
  .hero-head { gap: 16px; }
  .hero-side .act { margin-top: 18px; }
  .band { margin-top: 20px; }
  .nav { order: 3; width: 100%; margin-left: -12px; }
  .seq { row-gap: 56px; }
  .step { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; }
  .obj-screen { width: min(72%, 260px); margin-inline: auto; }
  .obj-page { width: min(76%, 280px); margin-inline: auto; }
  .timed { margin-inline: auto; }
  .route-note { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sizer { width: 100%; }
  .seg-ctl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .kit-box { width: 100%; }
  .kit { gap: 5px; margin-top: 4px; }
  .kit button { font-size: 12px; gap: 4px; padding: 8px 0; }
  .ico { width: 36px; height: 36px; }
  .ico > img { width: 36px; height: 36px; }
  .ico > img.ico-tape { width: 36px; height: 13px; }
  .ico-frame { width: 30px; padding: 2px 2px 5px; }
  .ico-draw { width: 30px; height: 28px; }
  .kit .aa { font-size: 30px; }
  /* Phone: all five pages at once, three over two (the second row centred), each small page with its date under
     it on a short stretch of the axis. No sideways scrolling. */
  .strip-wrap { --sg: 14px; }
  .strip-scroll { overflow: visible; scroll-snap-type: none; padding: 26px 0 0; margin-inline: 0; }
  .strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px var(--sg); }
  .sp { grid-column: span 2; }
  .sp:nth-child(4) { grid-column: 2 / span 2; }
  .sp:nth-child(5) { grid-column: 4 / span 2; }
  .sp time { margin-top: 14px; padding-top: 14px; font-size: 14px; line-height: 18px; }
  .sp::after { bottom: 30px; }
  .sp:nth-child(3)::after { right: 0; }
  .coll { margin-top: 28px; gap: 16px; }
  /* A shorter stage: the empty book sits closer to the button under it; the open row and its dates still fit. */
  .coll-stage { aspect-ratio: 100 / 54; --sh: 54; }
  /* The stage sits right under the strip and the button right under the stage, so the pages fly into view of
     the finger that sent them. */
  .coll-info { display: flex; flex-direction: column; }
  .coll-ctl { order: -1; margin: 0 0 28px; }
  .leaf .cap { font-size: 0; margin-top: 14px; }   /* five leaves in a row: dates only */
  .leaf .cap span { font-size: 20px; font-weight: 600; color: var(--text); white-space: nowrap; }
  .book-title { left: 46cqw; }
  .note { font-size: 22px; }   /* each note stays on one line at 390 */
  .book-title b { font-size: 22px; }
  h3, .facts h3 { font-size: 22px; }
  :is(.lede, .intro, .txt p, .route-note p, .coll-info > p, .mem h3 ~ p, .facts p) { font-size: 17px; }
  /* Phone: each picture above its text, both boxes the same height */
  .mem-more { --mh: 200px; }
  .mem { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .closing-in { grid-template-columns: minmax(0, 1fr); }
  /* Phone: the thread runs 12px from the left edge (3px stroke, right edge at 13.5) with a 24px rider. The content
     sits in the middle of the space between the line and the screen's right edge: 24px on each side. */
  :root { --lane: 37.5px; --rail: 12px; }
  .stop, .privacy, .closing { padding-left: 0; padding-right: 24px; }
  .rider { width: 24px; }
  .read-hog { width: 200px; justify-self: center; }
  .mem .media { justify-self: center; }
  .copy { margin-left: 0; width: 100%; }
}

/* ---------- Motion ----------
   The finished picture is the default. The hero plays once, on time, from load. Sections 2-4 move only when the
   visitor drives them (main.js); their state changes use transitions, so a second press retargets instead of
   restarting. Under reduced motion nothing travels: states still change, with short fades at most. */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: the walk is drawn once, in walking order, at a constant pace. */
  .band .seg { stroke-dasharray: 1 1.1; animation: draw linear backwards; }
  .band-wide .s1 { animation-duration: 1.32s; }
  .band-wide .gap, .band-wide .t-gap { animation: appear .3s linear 1.32s backwards; }
  .band-wide .s2 { animation-duration: .28s; animation-delay: 1.5s; }
  .band-wide .end { animation: appear .24s var(--ease-out) 1.78s backwards; }
  .band-wide .t-end { animation: appear .3s var(--ease-out) 1.8s backwards; }
  .band-wide .endpage { animation: pagein .46s var(--ease-out) 1.74s backwards; }
  .band-wide .walk-hog { animation: appear .4s var(--ease-out) .12s backwards; }
  .band-wide .pin-a { animation: pinin .42s var(--ease-out) .56s backwards; }
  .band-wide .pin-c { animation: pinin .42s var(--ease-out) .72s backwards; }
  .band-wide .pin-b { animation: pinin .42s var(--ease-out) .87s backwards; }

  .band-narrow .s1 { animation-duration: 1.1s; }
  .band-narrow .gap, .band-narrow .t-gap { animation: appear .3s linear 1.1s backwards; }
  .band-narrow .s2 { animation-duration: .1s; animation-delay: 1.32s; }
  .band-narrow .end { animation: appear .24s var(--ease-out) 1.42s backwards; }
  .band-narrow .endpage { animation: pagein .46s var(--ease-out) 1.38s backwards; }
  .band-narrow .pin-a { animation: pinin .42s var(--ease-out) .32s backwards; }
  .band-narrow .pin-c { animation: pinin .42s var(--ease-out) .45s backwards; }
  .band-narrow .pin-b { animation: pinin .42s var(--ease-out) .57s backwards; }

  /* Thread: never shows before the hero's walk has ended; then main.js draws it with the scroll. */
  .thread, .rider { animation: appear .5s var(--ease-out) 2.3s backwards; }
  .skip-intro .thread, .skip-intro .rider { animation: none; }
  .settling *, .settling *::before, .settling *::after { transition: none !important; }

  .stamp { transition: translate .48s var(--ease-io), opacity .16s ease; }
  .seg-ind { transition: transform .3s cubic-bezier(0.23, 1, 0.32, 1); }
  /* §4 strip, once, when it scrolls into view (main.js adds .go): the axis draws left to right, piece by piece,
     and each page drops in with its date tick, in order. */
  .strip.wait .sp .pg, .strip.wait .sp time { opacity: 0; }
  .strip.wait .sp::after { transform: scaleX(0); }
  /* Slow enough to watch: the axis takes 1.6s in all, each page 0.9s, one every 0.24s; about 2s in all. */
  .strip.go .sp::after { animation: axis 320ms linear calc(var(--i) * 320ms) backwards; }
  .strip.go .sp .pg, .strip.go .sp time { animation: drop .9s var(--ease-out) calc(var(--i) * 240ms + 60ms) backwards; }
  .stamp.new { animation: stamp-in .34s var(--ease-out) both; }
  .stamp.st-draw.new { animation: wipe .5s var(--ease-out) both; }   /* drawn left to right with a clip, not a stroke offset */
}
@media (prefers-reduced-motion: reduce) {
  /* Fewer and gentler: no travel, no scale; states swap with a short fade. */
  .leaf, .shot .ph, .shot .when, .shots li::after, .shots li::before { transition-duration: 0s; }
  .stamp.new { animation: appear .15s ease both; }
}
@keyframes draw { from { stroke-dashoffset: 1.05; } to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } }
@keyframes axis { from { transform: scaleX(0); } }
@keyframes drop { from { opacity: 0; transform: translateY(-18px); } }
@keyframes pinin { from { opacity: 0; translate: -50% 8px; } }
@keyframes pagein { from { opacity: 0; translate: 0 12px; } }
@keyframes wipe { from { clip-path: inset(-20% 100% -20% -20%); } to { clip-path: inset(-20% -20% -20% -20%); } }
@keyframes stamp-in { 0% { opacity: 0; scale: 1.16; } 55% { opacity: 1; scale: .97; } 100% { opacity: 1; scale: 1; } }

/* The current page in the main nav, as on the other pages. */
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--route); border-radius: 0; }

/* ---------- Chinese pages (html lang="zh-Hans", the /zh/ copies load this same file). System fonts only, nothing downloaded:
   the brand faces stay first, so Latin letters and digits keep them, and the CJK face that follows draws the Chinese.
   No faux italic, no tracking on label styles (it pulls Chinese apart), no negative tracking on headings (it makes
   Chinese glyphs touch), and a little more line height where Chinese runs as body text or wraps in headings. */
html:lang(zh) :is(body, .cta, .sample, .pin figcaption, .tag-t, .play, .seg-ctl button, .wp-tag, .wp-stats, .wp-sample, .kit button, .clear, .coll-ctl button) { font-family: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
html:lang(zh) :is(h2, .wp-title) { font-family: "Cormorant Garamond", "Songti SC", "Noto Serif SC", serif; }
html:lang(zh) :is(.wordmark, .jpage .t-title, .jpage .t-meta, .wp-h, .wp-hand, .stamp.st-text, .kit .aa, .note) { font-family: "Caveat", "Kaiti SC", "STKaiti", "KaiTi", cursive; }
html:lang(zh) :is(.sample, .window span, .size-label, .wp-tag, .wp-sample, .close-hint, .ch-head b, .exp .fmt, h1, h2, h3, .wp-title, .wp-stats, .book-title b) { letter-spacing: 0; }
html:lang(zh) :is(em, i, cite, dfn, var, address) { font-style: normal; }
html:lang(zh) body { line-height: 1.7; }
html:lang(zh) h1 { line-height: 1.12; }
html:lang(zh) h2 { line-height: 1.2; }
/* Short Chinese footer labels (支持) still get a 44 px wide target. */
html:lang(zh) .foot-links a { min-width: 44px; justify-content: center; }
