/* 北辰動物急診醫院 — production design.
   Night ground with one sodium pool from above; paper ground with one exam-lamp pool.
   One accent (amber): the light is on, act here. Every figure in Martian Mono. */
:root {
  --night: #0b1417;
  --night-2: #101c20;
  --night-ink: #e9efe9;
  --night-dim: #a7b6b2;
  --night-rule: rgba(233, 239, 233, .16);
  --paper: #f3f1ea;
  --paper-2: #e8e5db;
  --ink: #10181b;
  --ink-dim: #46525a;
  --rule: rgba(16, 24, 27, .16);
  --amber: #ffb43a;
  --amber-hot: #ffc764;
  --cjk: "Chiron GoRound TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --slate-h: 60px;
  --bar-h: 0px;
  --gut: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}
@media (max-width: 760px) and (max-aspect-ratio: 5/4) {
  :root { --slate-h: 52px; --bar-h: 76px; }
}

* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--slate-h) + 12px); }
body { background: var(--night); color: var(--night-ink); font: 400 17px/1.8 var(--cjk); font-kerning: normal; text-rendering: optimizeLegibility; }
::selection { background: var(--amber); color: var(--ink); }
.num { font-family: var(--mono); font-variation-settings: "wdth" 82; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.body .num, .lede .num, .opt-t .num, .kit .num, .facts .num, .q .num, h2 .num, .addr .num, .statement .num { font-size: .92em; font-weight: 500; }
h1, h2, h3 { margin: 0; font-weight: 700; }
/* Headlines break at phrases, never inside a word: authored .ph phrases, and keep-all / strict / balance as the fallback */
h1, h2 { word-break: keep-all; line-break: strict; text-wrap: balance; }
.ph { display: inline-block; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--amber); color: var(--ink); padding: 12px 16px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- the slate: identity, live status, index, the call (the pole star) ---------- */
.slate { position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--slate-h); display: flex; align-items: center; gap: clamp(14px, 2vw, 32px); padding: 0 var(--gut); background: var(--night); border-bottom: 1px solid var(--night-rule); }
.brand { display: flex; align-items: baseline; gap: .5em; text-decoration: none; white-space: nowrap; }
.brand-name { font-weight: 900; font-size: 17px; letter-spacing: .04em; }
.brand-h { font-size: 12px; color: var(--night-dim); }
.status { font: 400 12px/1 var(--mono); font-variation-settings: "wdth" 82; color: var(--night-dim); white-space: nowrap; letter-spacing: .02em; }
.status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-right: .7em; vertical-align: 1px; }
.status .sep { margin: 0 .6em; }
.status .clock { color: var(--night-ink); }
.index { display: flex; gap: clamp(10px, 1.4vw, 22px); margin-left: auto; font-size: 14px; }
.index a { position: relative; text-decoration: none; color: var(--night-dim); padding: 18px 0; }
.index a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 12px; height: 2px; background: var(--night-ink); transform: scaleX(var(--on, 0)); transform-origin: 0 50%; }
.index a[aria-current="true"] { color: var(--night-ink); }
.index a:hover { color: var(--night-ink); }
.call-top { display: flex; align-items: center; gap: 10px; }

/* The call control: amber is the door's light. One press behaviour everywhere: it sinks 1 px, it never bounces. */
.btn-call { display: inline-flex; align-items: center; justify-content: center; gap: .7em; min-height: 44px; padding: 0 18px; background: var(--amber); color: var(--ink); text-decoration: none; font-weight: 900; font-size: 15px; letter-spacing: .04em; border-radius: 3px; white-space: nowrap; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.btn-call .num { font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.btn-call:hover { background: var(--amber-hot); }
.btn-call:active { transform: translateY(1px); box-shadow: none; }
.btn-call::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); flex: none; }
.btn-map { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; color: var(--night-ink); text-decoration: none; font-weight: 700; font-size: 15px; border: 1.5px solid var(--night-rule); border-radius: 3px; white-space: nowrap; }
.btn-map:hover { border-color: var(--night-ink); }
.btn-map:active { transform: translateY(1px); }
.big { min-height: 58px; padding: 0 24px; font-size: 17px; }
.btn-call.big .num { font-size: 16px; }
.picked { font: 500 12px/1.3 var(--mono); font-variation-settings: "wdth" 82; color: var(--night-ink); max-width: 21em; text-align: right; }
.picked b { color: var(--amber); font-weight: 600; }

.callbar { display: none; }

/* ---------- the stage: ground, paper iris, the lead line ---------- */
.ground { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(90% 70% at 18% -12%, rgba(255, 180, 58, .085), transparent 60%),
  radial-gradient(120% 90% at 50% 120%, #071012, transparent 70%), var(--night); }
.ground .paper { position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% -14%, #fbfaf6, transparent 70%), var(--paper); clip-path: inset(50% 50% 50% 50%); }
.lead { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; height: 100lvh; pointer-events: none; overflow: visible; }
.lead path { fill: none; stroke: var(--line, var(--night-ink)); stroke-linecap: round; stroke-linejoin: round; }
.lead .lbl { font-family: var(--mono); font-variation-settings: "wdth" 82; fill: var(--line, var(--night-ink)); opacity: .82; }
.lead .lbl.cjk { font-family: var(--cjk); font-weight: 700; }
.lead .hair { stroke-dasharray: 3 5; opacity: .6; }
.lead .win { fill: var(--amber); }
.lead .eye { fill: var(--line, var(--night-ink)); stroke: none; }
main { position: relative; z-index: 1; }

/* ---------- pinned scenes: copy is small and exact; the line carries the scale ---------- */
.sc > .frame { padding: calc(var(--slate-h) + 5vmin) var(--gut) calc(5vmin + var(--bar-h) + var(--safe-bottom)); }
.sc:not([data-flow]) > .frame { display: grid; align-content: center; }
.copy { position: relative; max-width: min(34rem, 42vw); z-index: 2; }
.super { font-size: 12.5px; letter-spacing: .06em; color: var(--night-dim); margin-bottom: 22px; min-height: 1.3em; line-height: 1.3; font-weight: 400; }
.super .tfx-stage { font-family: var(--mono) !important; font-weight: 400 !important; font-variation-settings: "wdth" 82; }
h1 { font-size: clamp(30px, 3.5vw + .4vh, 54px); line-height: 1.32; font-weight: 900; letter-spacing: .01em; margin-bottom: 22px; }
h2 { font-size: clamp(26px, 2.6vw + .5vh, 42px); line-height: 1.36; font-weight: 900; letter-spacing: .01em; margin-bottom: 18px; }
.line { display: block; overflow: clip; padding-bottom: .04em; }
.line > span { display: block; }
.lede, .body { font-size: clamp(16px, 1.05vw + .35vh, 18.5px); line-height: 1.85; color: var(--night-dim); max-width: 27em; }
.lede { color: var(--night-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.aside { margin-top: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--night-dim); }
.link { color: var(--night-ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; text-decoration-color: var(--night-dim); font-weight: 700; padding: 8px 0; }
.link:hover { text-decoration-color: var(--amber); }
.note { font-size: 14px; }

/* paper scenes */
.paper-scene, .paper-doc { color: var(--ink); }
.paper-scene .super, .paper-doc .eyebrow { color: var(--ink-dim); }
.paper-scene .body, .paper-doc .body { color: var(--ink-dim); }

/* ---------- 3 · the check: the visitor triages ---------- */
.check > .frame { background: var(--night-2); padding-top: calc(var(--slate-h) + 11vh); padding-bottom: calc(11vh + var(--bar-h)); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4vw 6vw; align-items: start; border-top: 1px solid var(--night-rule); }
.eyebrow::before { content: ""; display: inline-block; width: 46px; height: 12px; margin-right: 12px; vertical-align: -1px; background: currentColor; -webkit-mask: var(--trace) center / 100% 100% no-repeat; mask: var(--trace) center / 100% 100% no-repeat; }
:root { --trace: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 12'%3E%3Cpath d='M0 9 H6 C9 9 10 2 13.5 2 S18 9 21 9 S25 2 28.5 2 S33 9 36 9 H46' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E"); }
.eyebrow { font-size: 12.5px; letter-spacing: .08em; color: var(--night-dim); margin-bottom: 18px; }
.check-head .body { margin-top: 4px; }
.triage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 4vw; }
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; z-index: 1; }
.opt { width: 100%; min-height: 60px; display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 16px; background: transparent; color: var(--night-ink); border: 1.5px solid var(--night-rule); border-radius: 3px; font: 500 16px/1.5 var(--cjk); cursor: pointer; }
.opt:hover { border-color: var(--night-dim); }
.opt-k { font-size: 12px; color: var(--night-dim); flex: none; }
.opt[aria-pressed="true"] { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.opt[aria-pressed="true"] .opt-k { color: var(--ink); font-weight: 600; }
.opt:active { transform: translateY(1px); }
.route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.route-path { fill: none; stroke: var(--night-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.results { position: relative; z-index: 1; align-self: start; min-height: 100%; display: grid; align-content: start; gap: 18px; }
.results-empty { font-size: 15px; color: var(--night-dim); border-left: 2px solid var(--night-rule); padding: 6px 0 6px 18px; }
/* The triage tag: paper, a punched hole at the tied end, the level numeral as the image */
.result { display: none; outline: none; }
.tag { position: relative; background: var(--paper); color: var(--ink); padding: 22px 24px 20px 46px;
  grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px;
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
  -webkit-mask: radial-gradient(circle 7px at 22px 36px, transparent 6.5px, #000 7px);
          mask: radial-gradient(circle 7px at 22px 36px, transparent 6.5px, #000 7px); }
.tag::before { content: ""; position: absolute; left: 12px; top: 26px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule); box-sizing: border-box; }
.tag-n { grid-column: 1; grid-row: 1 / span 2; align-self: start; font-size: clamp(72px, 6.6vw, 118px); line-height: .78; font-weight: 600; font-variation-settings: "wdth" 75; letter-spacing: -.02em; color: var(--ink); margin-top: 2px; }
.result .lv { grid-column: 2; font-size: 13px; letter-spacing: .08em; color: var(--ink-dim); margin-bottom: 2px; }
.result h3 { grid-column: 2; font-size: clamp(24px, 2vw, 32px); font-weight: 900; line-height: 1.3; word-break: keep-all; }
.result h3 > .tfx-stage { margin-left: -.1em; }
.result h3 + p { grid-column: 1 / -1; color: var(--ink); font-size: 16.5px; line-height: 1.8; margin-top: 16px; padding-top: 14px; border-top: 1.5px solid var(--ink); }
.tag-echo { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.5; color: var(--ink-dim); margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.tag-echo:empty { display: none; }
.result-call { display: none; justify-self: start; min-height: 58px; padding: 0 24px; font-size: 17px; }
.js .triage.has .results-empty { display: none; }
.js .result.on { display: grid; }
.js .triage.has .result-call { display: inline-flex; }
html:not(.js) .result { display: grid; margin-bottom: 18px; }
html:not(.js) .results-empty { display: none; }

/* ---------- 3b · counting breaths: the visitor taps along with the chest ---------- */
.check-head { grid-column: 1; grid-row: 1; }
.check .triage { grid-column: 2; grid-row: 1 / span 2; }
.breathcount { grid-column: 1; grid-row: 2; border-top: 1px solid var(--night-rule); padding-top: 26px; max-width: 30rem; }
.breathcount .eyebrow { margin-bottom: 10px; }
.breathcount h3 { font-size: clamp(20px, 1.4vw + .4vh, 24px); line-height: 1.45; margin-bottom: 8px; }
.breathcount .body { font-size: 16px; }
.bc-tool { margin-top: 18px; display: grid; gap: 10px; }
html:not(.js) .bc-tool { display: none; }
.bc-tap { min-height: 72px; width: 100%; padding: 12px 18px; background: rgba(233,239,233,.04); color: var(--night-ink); border: 1.5px solid var(--night-ink); border-radius: 3px; font: 700 18px/1.4 var(--cjk); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
.bc-tap:hover { background: rgba(233,239,233,.08); }
.bc-tap:active { transform: translateY(1px); }
.bc-tap[aria-disabled="true"] { border-color: var(--night-rule); color: var(--night-dim); cursor: default; transform: none; }
.bc-meter { font-size: 15px; color: var(--night-dim); }
.bc-meter .num { color: var(--night-ink); font-size: .95em; font-weight: 500; }
.bc-meter .sep { margin: 0 .6em; }
.bc-bar { height: 2px; background: var(--night-rule); }
.bc-bar i { display: block; height: 100%; background: var(--night-ink); transform-origin: 0 50%; transform: scaleX(1); }
.reduced-motion .bc-bar { display: none; }
.bc-out { margin-top: 18px; border-left: 2px solid var(--night-ink); padding: 2px 0 2px 18px; }
[hidden] { display: none !important; }
.bc-rate { font-size: 17px; font-weight: 700; line-height: 1.5; }
.bc-n { font-size: 1.9em; font-weight: 600; vertical-align: -.12em; margin: 0 .1em; }
.bc-verdict { font-size: 16.5px; line-height: 1.8; margin-top: 4px; }
.bc-out.over .bc-verdict b { color: var(--amber); }
.bc-reset { margin-top: 10px; min-height: 48px; padding: 0 16px; background: transparent; color: var(--night-ink); border: 1.5px solid var(--night-rule); border-radius: 3px; font: 700 15px/1 var(--cjk); cursor: pointer; }
.bc-reset:hover { border-color: var(--night-ink); }
.bc-reset:active { transform: translateY(1px); }

/* FAQ: the answer's first clause is the answer; attention (hover, focus, tap) draws a marker behind it */
.q { cursor: default; }
.q .key > .tfx-stage { padding: 0 !important; }
.q:focus-visible { outline-offset: 6px; }

/* ---------- 2, 4 · the line takes the upper frame; copy sits under it or above it ---------- */
.breath > .frame { align-content: end !important; }
.door > .frame { align-content: start !important; padding-top: calc(var(--slate-h) + 9vh); }

/* ---------- 5 · arrival: paper, the procedure printed under the trace ---------- */
.arrival > .frame { align-content: stretch !important; grid-template-rows: auto 1fr auto; }
.arrival .copy { max-width: none; }
.arrival h2 { font-size: clamp(24px, 2.3vw + .5vh, 38px); }
.persist { font-size: 15px; color: var(--ink); background: var(--paper-2); border-left: 3px solid var(--ink); padding: 8px 14px; max-width: 34em; margin-top: 4px; }
.persist b { font-weight: 900; }
.mini-trace { display: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3vw; grid-row: 3; }
.step { border-top: 2px solid var(--rule); padding-top: 14px; color: var(--ink-dim); }
.step h3 { font-size: clamp(17px, 1.2vw + .3vh, 21px); color: var(--ink); margin: 4px 0 6px; }
.step p:last-child { font-size: clamp(14.5px, .8vw + .3vh, 16.5px); line-height: 1.75; }
.step-k { font-size: 12px; letter-spacing: .06em; }
.step.on { border-top-color: var(--ink); color: var(--ink); }
.step.on .step-k { color: var(--ink); font-weight: 600; }

/* ---------- flow documents: calm, readable, lit plainly ---------- */
.doc > .frame { padding-top: calc(var(--slate-h) + 13vh); padding-bottom: calc(13vh + var(--bar-h)); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 5vw 6vw; align-items: start; }
.paper-doc > .frame { background: radial-gradient(70% 40% at 50% 0%, #fbfaf6, transparent 75%), var(--paper); }
.team > .frame { border-top: 1px solid var(--rule); }
.cost > .frame { border-top: 1px solid var(--rule); }
.faq > .frame { border-top: 1px solid var(--rule); }
.doc-head .body { max-width: 24em; }
.kit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3vw; }
.kit li { border-top: 1px solid var(--rule); padding: 18px 0 22px; }
.kit h3 { font-size: 18px; margin-bottom: 4px; }
.kit p { color: var(--ink-dim); font-size: 16px; line-height: 1.75; }

.statement { font-size: clamp(19px, 1.4vw + .3vh, 24px); line-height: 1.75; font-weight: 500; max-width: 19em; margin-top: 8px; }
.slip { margin: 0; background: #fbfaf5; color: var(--ink); padding: 34px clamp(20px, 3vw, 40px) 30px; position: relative; max-width: 34rem; justify-self: end; width: 100%;
  -webkit-mask: radial-gradient(circle 6px at 50% 0, transparent 5.5px, #000 6px) 0 0 / 18px 51% repeat-x, radial-gradient(circle 6px at 50% 100%, transparent 5.5px, #000 6px) 0 100% / 18px 51% repeat-x;
          mask: radial-gradient(circle 6px at 50% 0, transparent 5.5px, #000 6px) 0 0 / 18px 51% repeat-x, radial-gradient(circle 6px at 50% 100%, transparent 5.5px, #000 6px) 0 100% / 18px 51% repeat-x;
  box-shadow: 0 1px 0 rgba(0,0,0,.04); filter: drop-shadow(0 10px 18px rgba(16,24,27,.08)); }
.slip-h { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-dim); border-bottom: 1.5px solid var(--ink); padding-bottom: 12px; margin-bottom: 6px; letter-spacing: .04em; }
.slip dl { margin: 0; }
.slip dl > div { display: flex; align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--rule); font-size: 16px; }
.slip dt { flex: 1 1 auto; }
.slip dt .num { font-size: 12.5px; color: var(--ink-dim); margin-left: .4em; }
.slip dd { margin: 0; font-size: 15.5px; font-weight: 500; white-space: nowrap; }
.slip-f { margin-top: 16px; font-size: 15px; color: var(--ink-dim); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.slip-f .demo { font-family: var(--mono); font-variation-settings: "wdth" 82; font-size: 12px; }

.qa { display: grid; gap: 0; }
.q { border-top: 1px solid var(--rule); padding: 22px 0 26px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 10px 3vw; }
.q h3 { font-size: 18px; line-height: 1.6; }
.q p { color: var(--ink-dim); font-size: 16.5px; line-height: 1.85; }

.location > .frame { background: var(--night); border-top: 1px solid var(--night-rule); align-items: center; padding-bottom: calc(4vh + var(--bar-h)); }
.addr { font-style: normal; font-size: 19px; font-weight: 700; margin: 6px 0 18px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: var(--night-dim); font-size: 16.5px; line-height: 1.8; max-width: 26em; }
.facts b { display: block; color: var(--night-ink); font-size: 14px; letter-spacing: .06em; }
.map { width: 100%; height: auto; max-height: 70vh; overflow: visible; }
.map .roads path { fill: none; stroke: var(--night-dim); stroke-width: 1.2; opacity: .55; }
.map .roads .minor { opacity: .3; }
.map .block { fill: none; stroke: var(--night-dim); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; }
.map .trip { fill: none; stroke: var(--night-ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.map .door-dot { fill: var(--amber); }
.map .tick { stroke: var(--night-dim); stroke-width: 1; }
.map .curb { stroke: var(--night-dim); stroke-width: 1.5; stroke-dasharray: 4 3; }
.map text { paint-order: stroke; stroke: var(--night); stroke-width: 6px; stroke-linejoin: round; }
.map-l { font: 700 15px var(--cjk); fill: var(--night-ink); letter-spacing: .1em; }
.map-s { font: 400 12px var(--mono); font-variation-settings: "wdth" 82; fill: var(--night-dim); }
.map-b { font: 900 16px var(--cjk); fill: var(--night-ink); }
.map-door { font: 700 12px var(--cjk); fill: var(--amber); letter-spacing: .06em; }

/* ---------- 10 · final card ---------- */
.final > .frame { align-content: start !important; padding-top: calc(var(--slate-h) + 9vh); }
.reel-ready:not(.reduced-motion) .final { margin-top: -22vh; margin-top: -22lvh; } /* its empty top slides over the end of the map: about 40vh less run-in */
.giant { position: absolute; left: var(--gut); right: var(--gut); bottom: calc(5vmin + var(--bar-h) + var(--safe-bottom)); font-size: clamp(44px, 11.4vw, 210px); line-height: .9; font-weight: 600; font-variation-settings: "wdth" 75; letter-spacing: -.02em; color: var(--night-ink); text-decoration: none; white-space: nowrap; }
.giant:hover { color: var(--amber); }

/* ---------- credits ---------- */
.credits { position: relative; z-index: 1; background: var(--night); border-top: 1px solid var(--night-rule); padding: 44px var(--gut) calc(44px + var(--bar-h) + env(safe-area-inset-bottom)); display: grid; gap: 14px; color: var(--night-dim); font-size: 14.5px; line-height: 1.85; }
.fiction { max-width: 44em; color: var(--night-ink); }
.made { font-size: 11.5px; }

/* ---------- the reduced cut: each pinned scene carries its own ground and its own still of the line ---------- */
.reduced-motion .ground, .reduced-motion #lead { display: none; }
.reduced-motion .sc:not([data-flow]) > .frame { background: var(--night); }
.reduced-motion .sc.paper-scene > .frame { background: var(--paper); }
.still-lead { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.still-lead path { fill: none; stroke: var(--line, var(--night-ink)); stroke-linecap: round; stroke-linejoin: round; }
.still-lead .lbl { font-family: var(--mono); font-variation-settings: "wdth" 82; fill: var(--line, var(--night-ink)); opacity: .82; }
.still-lead .lbl.cjk { font-family: var(--cjk); font-weight: 700; }
.still-lead .hair { stroke-dasharray: 3 5; opacity: .6; }
.still-lead .win { fill: var(--amber); }
.still-lead .eye { fill: var(--line, var(--night-ink)); stroke: none; }
.reduced-motion .sc.arrival > .frame { min-height: 100vh; }

/* ---------- laptop: short frames scale the shot ---------- */
@media (max-height: 700px) and (min-width: 761px) {
  .sc > .frame { padding-top: calc(var(--slate-h) + 3.5vmin); padding-bottom: 3.5vmin; }
  .super { margin-bottom: 12px; }
  h1 { margin-bottom: 14px; }
  .actions { margin-top: 20px; }
  .aside { margin-top: 12px; }
  .big { min-height: 52px; }
  .step p:last-child { font-size: 14.5px; line-height: 1.65; }
}

/* ---------- a phone on its side: the shortest frame ---------- */
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .index, .status .clock-label, .status .sep { display: none; }
  .status { margin-left: auto; }
  .sc > .frame { padding-top: calc(var(--slate-h) + 2.5vmin); padding-bottom: 2.5vmin; }
  .copy { max-width: min(34rem, 54vw); }
  .super { margin-bottom: 8px; }
  h1 { font-size: 25px; margin-bottom: 8px; }
  h2 { font-size: 22px; margin-bottom: 8px; }
  .lede, .body { font-size: 15px; line-height: 1.65; }
  .actions { margin-top: 12px; flex-wrap: nowrap; }
  .big { min-height: 48px; padding: 0 16px; font-size: 15px; }
  .aside { margin-top: 6px; }
  .night .aside .note { display: none; }
}
/* ---------- ultrawide: the room grows, so the type does too ---------- */
@media (min-width: 1900px) {
  h1 { font-size: clamp(54px, 2.6vw, 72px); }
  h2 { font-size: clamp(42px, 2vw, 56px); }
  .lede, .body { font-size: 21px; }
  .copy { max-width: min(44rem, 40vw); }
  .super { font-size: 14px; }
}

/* ---------- the portrait cut: re-blocked for the hand, not shrunk ---------- */
@media (max-width: 760px) and (max-aspect-ratio: 5/4) {
  body { font-size: 17px; }
  .has-pick { --bar-h: 108px; }
  .slate { gap: 10px; }
  .brand-name { font-size: 16px; }
  .status { margin-left: auto; font-size: 11.5px; }
  .status .clock-label, .status .sep { display: none; }
  .status .clock { margin-left: .5em; }
  .index, .call-top { display: none; }
  .callbar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--night); border-top: 1px solid var(--night-rule); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .callbar .picked { text-align: left; max-width: none; padding: 0 2px 7px; font-size: 12px; }
  .callbar-row { display: flex; gap: 8px; }
  .callbar .btn-call { flex: 2.3 1 0; min-height: 58px; font-size: 16px; padding: 0 10px; gap: .55em; }
  .callbar .btn-call .num { font-size: 13px; }
  .callbar .btn-map { flex: 1 1 0; min-height: 58px; font-size: 16px; }
  .sc:not([data-flow]) > .frame { align-content: end; padding-top: calc(var(--slate-h) + 3vh); padding-bottom: calc(4vh + var(--bar-h) + var(--safe-bottom)); }
  .copy { max-width: none; }
  h1 { font-size: clamp(27px, 7.6vw, 34px); }
  h2 { font-size: clamp(24px, 6.6vw, 30px); }
  .night .actions { display: none; } /* the bottom bar is the same two buttons, one thumb away */
  .night .aside { margin-top: 14px; }
  .check > .frame, .doc > .frame { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--slate-h) + 8vh); padding-bottom: calc(8vh + var(--bar-h)); gap: 28px; }
  .triage { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .check-head, .check .triage, .breathcount { grid-column: 1; grid-row: auto; }
  .breathcount { max-width: none; }
  .route { display: none; }
  .door > .frame { align-content: end !important; padding-top: calc(var(--slate-h) + 3vh); }
  .arrival > .frame { background: var(--paper); padding-top: calc(var(--slate-h) + 8vh) !important; padding-bottom: calc(8vh + var(--bar-h)) !important; display: block !important; }
  .mini-trace { display: block; width: 100%; height: 48px; margin: 26px 0 8px; fill: none; stroke: var(--ink); stroke-width: 2; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { padding: 16px 0 18px; }
  .kit { grid-template-columns: minmax(0, 1fr); }
  .q { grid-template-columns: minmax(0, 1fr); }
  .slip { justify-self: stretch; }
  .final > .frame { padding-top: calc(var(--slate-h) + 4vh) !important; align-content: end !important; padding-bottom: calc(5vmin + 12vw + 36px + var(--bar-h) + var(--safe-bottom)) !important; }
  .giant { font-size: 12.2vw; }
  .credits { font-size: 14px; }
}
