/* PAN-GALACTIC GARGLE TRADING — a voice with a picture.
   Two layers and nothing else. The picture (canvas) fills the screen: every stop is a flat
   screenprint in its own inks, set from js as --ground, --ink, --plate, --second, --third, --pop.
   The voice is one running text on the ground colour. Words in --pop can be touched.
   No bars, tabs, rows or cards. Boxes belong to the Vogons ([data-bureau]). */

:root {
    --ground: #0d0d0a; --ink: #f6f1e2; --plate: #12306b; --second: #f2e63c; --third: #ff4d2e; --pop: #f2e63c;
    --text: "Space Mono", ui-monospace, Menlo, monospace;
    --display: "Bungee Inline", "Bungee", "Space Mono", sans-serif;
    --block: "Bungee", "Space Mono", sans-serif;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
html.big body { font-size: clamp(18px, 0.6vw + 13.5px, 23px); }
body {
    background: var(--ground); color: var(--ink); font-family: var(--text);
    font-size: clamp(16px, 0.55vw + 11.5px, 20px); line-height: 1.55; overflow: hidden;
    -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; touch-action: manipulation; }
:focus-visible { outline: 2px dashed var(--pop); outline-offset: 2px; }
[hidden] { display: none !important; }

#poster, #warp { position: fixed; inset: 0; width: 100%; height: 100%; }
#poster { z-index: 0; }
#warp { z-index: 40; }
#app { position: relative; z-index: 1; height: 100dvh; }

/* ── the voice ───────────────────────────────────────────────────────────── */
#voice, #sheet { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
#voice::-webkit-scrollbar, #sheet::-webkit-scrollbar { display: none; }
#voice:focus { outline: none; }
#app:has(#sheet:not([hidden])) #voice { visibility: hidden; }
/* wide screens: the left page is the voice, the right page is the picture */
#page, #sheet-card {
    width: min(43vw, 64ch); margin-left: clamp(28px, 6vw, 120px);
    padding: calc(7vh + var(--safe-t)) 0 26vh;
}

h1 {
    font-family: var(--display); font-weight: 400; text-transform: uppercase;
    font-size: clamp(2.3rem, 4.6vw, 5rem); line-height: 0.96; letter-spacing: 0.01em;
    margin: 0.5em 0 0.35em; text-wrap: balance;
}
.status { opacity: 0.78; }
.cash { font-weight: 700; transition: color 0.3s; }
.cash.gain, .cash.loss { color: var(--pop); }
.entry { font-style: italic; font-size: 1.12em; line-height: 1.5; }
.entry b { font-style: normal; }
/* the footnote: upright, small, hung on its asterisk, so it is plainly an aside and not more entry */
.foot { margin: 1.3em 0 0; padding-left: 1.5em; text-indent: -1.5em; font-size: 0.78em; line-height: 1.5; opacity: 0.6; min-height: 1.6em; }
.foot:not(:empty)::before { content: '*  '; font-weight: 700; white-space: pre; }
.foot.typing::after { content: '▌'; font-style: normal; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { margin: 2.6em 0 0.5em; opacity: 0.55; font-size: 0.74em; letter-spacing: 0.14em; text-transform: uppercase; }
.kick { font-size: 0.74em; letter-spacing: 0.1em; opacity: 0.6; margin-top: 1.6em; }
.kick + h1 { margin-top: 0.15em; }
.aside { opacity: 0.7; font-style: italic; }
.aside.small, .colophon { font-size: 0.84em; }
.aside.wanted { margin-top: 0.8em; }
.colophon { margin-top: 3em; opacity: 0.7; }
.colophon .live { padding: 0.95em 0; }
.bad { color: var(--pop); font-style: normal; opacity: 1; }
.off { opacity: 0.5; }
/* what just happened: upright and in the stop's ink, so it stands apart from the entry above it */
.said { margin: 2em 0 0; font-size: 1em; color: var(--pop); font-weight: 700; }
.said.bad { font-weight: 400; }
/* an announcement about the whole run */
.said.notice { color: var(--ink); font-weight: 400; }
.said.notice b { display: block; font-family: var(--block); font-weight: 400; font-size: 1.15em; line-height: 1.1; color: var(--pop); margin-bottom: 0.35em; text-transform: uppercase; }
.verse { font-style: italic; margin: 0.8em 0 1em 1.4em; line-height: 1.7; color: var(--pop); }
.when { font-weight: 700; }

/* the tally: the one fixed thing. What you have, at a glance, while the voice scrolls beneath. */
.tally {
    position: sticky; top: 0; z-index: 3; background: var(--ground);
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.3em; align-items: center;
    padding: calc(12px + var(--safe-t)) 0 12px; margin: 0 0 0.4em;
    box-shadow: 0 10px 12px -8px var(--ground);
}
.tally .cash { grid-row: span 2; font-family: var(--block); font-weight: 400; font-size: clamp(1.7rem, 2.6vw, 2.7rem); line-height: 1; }
.t-row { display: flex; align-items: center; gap: 0.8em; font-size: 0.74em; white-space: nowrap; }
.t-row > span:first-child { min-width: 7.4em; opacity: 0.8; }
.t-row .dots { flex: 1; flex-wrap: nowrap; gap: 3px; min-width: 0; align-items: center; }
.t-row .dots i { flex: 1 1 0; max-width: 5px; min-width: 2px; width: auto; height: auto; aspect-ratio: 1; }
.t-row.low > span:first-child { color: var(--pop); opacity: 1; font-weight: 700; }
.t-row.low .dots i.on { animation: blink 1.2s steps(1) infinite; }
.t-cargo { grid-column: 1 / -1; font-size: 0.74em; opacity: 0.75; margin-top: 0.5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cond { font-weight: 700; color: var(--pop); }
/* a story, waiting to be picked up */
.hook { margin: 2em 0 0; font-style: italic; font-size: 1.05em; }
.hook .live { font-style: normal; display: block; width: fit-content; margin: 0.5em 0 0; }
.hook.quiet { font-size: 0.9em; opacity: 0.75; }

/* in the catalogue: what you cannot afford yet */
.g.beyond { opacity: 0.5; }

/* a word you can touch */
.live {
    display: inline-block; padding: 0.6em 0; margin: -0.3em 0; min-width: 44px;
    color: var(--pop); font-weight: 700;
    text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 2px; text-underline-offset: 0.28em;
}
.live:hover { text-decoration-style: solid; }
.live.on { background: var(--ink); color: var(--ground); text-decoration: none; padding-inline: 0.35em; margin-inline: -0.35em; }
/* the one thing the sentence is asking you to do */
.live.do { background: var(--pop); color: var(--ground); text-decoration: none; padding-inline: 0.7em; }
.live.do:hover { background: var(--ink); }

.g { padding: 0; }
/* a line of the price list: name, a row of dots, the price */
.pl { display: flex; align-items: baseline; gap: 0.6em; }
.pl > b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl small { font-size: 0.74em; opacity: 0.7; white-space: nowrap; }
.pl .live { flex: 0 0 auto; max-width: 78%; min-width: 44px; }
/* small notes about a line sit under it, so they can never squeeze the name */
.tags { font-size: 0.74em; opacity: 0.8; margin: -0.5em 0 0.45em; }
.tags small { font-size: 1em; }
.pl .leader { flex: 1; min-width: 1.2em; border-bottom: 2px dotted color-mix(in srgb, var(--ink) 28%, transparent); transform: translateY(-0.28em); }
.pl.quiet { font-size: 0.88em; opacity: 0.8; padding: 0.15em 0; }
.pl.more { display: block; opacity: 0.85; margin-top: 0.3em; }
.remark { font-style: italic; font-size: 0.84em; opacity: 0.72; margin: -0.45em 0 0.5em; }
.also { margin-top: 1.2em; }
.unfold { padding: 0 0 1em 1.3em; }
.unfold .lore { font-style: italic; opacity: 0.85; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1em 1.2em; margin-top: 0.2em; }
.acts.big { margin-top: 1.4em; }

/* a stop's mark: a chip of its poster */
.mark { display: inline-block; width: 0.62em; height: 0.62em; background: var(--c); margin-right: 0.6em; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--ink); }

/* light through holes */
.lights { margin: 0.5em 0 0; line-height: 1; }
.dots { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: 0.16; }
.dots i.on { background: var(--pop); opacity: 1; }
.lights.low .dots i.on { animation: blink 1.2s steps(1) infinite; }

/* revisions: the Guide strikes a phrase and writes over it, in front of you */
.rev del { opacity: 0.5; text-decoration-color: var(--pop); text-decoration-thickness: 2px; }
.rev ins { text-decoration: none; color: var(--pop); font-style: normal; font-weight: 700; }
.rev.writing del { opacity: 1; text-decoration-color: transparent; animation: strike 0.6s ease-out forwards; animation-delay: calc(var(--k, 0) * 0.9s + 1.2s); }
.rev.writing ins { opacity: 0; animation: write 0.8s ease-out forwards; animation-delay: calc(var(--k, 0) * 0.9s + 1.7s); }
@keyframes strike { to { text-decoration-color: var(--pop); opacity: 0.5; } }
@keyframes write { to { opacity: 1; } }

/* arriving: the page is spoken, top to bottom */
#page.arrive > *:not(.tally) { animation: spoken 0.5s ease-out both; }
#page.arrive > h1 { animation-delay: 0.1s; }
#page.arrive > .entry { animation-delay: 0.35s; }
#page.arrive > .lead { animation-delay: 0.7s; }
#page.arrive > .g { animation-delay: calc(var(--i, 0) * 55ms + 0.8s); }
#page.arrive > .colophon { animation-delay: 1.6s; }
@keyframes spoken { from { opacity: 0; transform: translateY(6px); } }

/* the entry about you: a few plain facts */
.check { opacity: 0.75; }
.check.done { opacity: 1; font-weight: 700; }
.seen { overflow-x: auto; margin-top: 0.4em; }
.seen table { border-collapse: collapse; font-size: 0.78em; font-variant-numeric: tabular-nums; }
.seen th, .seen td { padding: 0.2em 0.9em 0.2em 0; text-align: right; white-space: nowrap; font-weight: 400; }
.seen thead small { display: block; opacity: 0.6; }
.seen tbody th { text-align: left; }
.seen td { opacity: 0.6; }
.seen td.here { opacity: 1; }
.seen td.hi { opacity: 1; font-weight: 700; color: var(--pop); }
.seen td.lo { opacity: 1; text-decoration: underline; }
.log p { font-size: 0.84em; opacity: 0.65; display: grid; grid-template-columns: 2.2em 1fr; padding: 0.1em 0; }
.log .k-bad { color: var(--pop); opacity: 1; }

/* ── the ending: the picture takes the whole screen, and one thing is said, very large ───────── */
#app[data-screen="end"] #page { width: min(980px, 92vw); margin: 0 auto; padding: 46dvh 0 6vh; text-align: center; background: none; min-height: 0; }
.finale .kick { margin: 0 0 0.6em; letter-spacing: 0.22em; text-transform: uppercase; }
h1.final { font-size: clamp(2.5rem, 8.2vw, 7rem); line-height: 0.92; margin: 0 0 0.35em; color: var(--pop); }
h1.final span { display: inline-block; }
.finale .entry { max-width: 34ch; margin: 0 auto; }
.verdict { margin: 1.1em auto 0; max-width: 40ch; font-size: 0.9em; opacity: 0.85; }
.verdict b { display: block; font-family: var(--block); font-weight: 400; font-size: 1.7em; line-height: 1.1; color: var(--ink); opacity: 1; margin-top: 0.15em; }
#page.landing .verdict { animation: spoken 0.7s ease-out both; animation-delay: 3.9s; }
/* the thing you bought can be picked up: the page must not scroll or select under your finger */
#app[data-screen="end"] { user-select: none; -webkit-user-select: none; }
@media (max-width: 899px) { #app[data-screen="end"] #page { padding-bottom: 24vh; } }
.finale .aside { max-width: 52ch; margin: 1em auto 0; }
.finale .acts { justify-content: center; }
.stamp {
    display: inline-block; margin: 1.3em 0 0; padding: 0.35em 0.7em 0.25em; transform: rotate(-5deg);
    font-family: var(--block); font-size: clamp(1.3rem, 3vw, 2.2rem); line-height: 1; letter-spacing: 0.04em;
    color: var(--third); box-shadow: inset 0 0 0 4px var(--third); border-radius: 6px;
}
/* the moment itself: the name lands a word at a time, then the stamp comes down */
#page.landing .kick, #page.landing .finale .entry, #page.landing .finale .acts, #page.landing .finale .aside { animation: spoken 0.7s ease-out both; animation-delay: 2.9s; }
#page.landing h1.final span { animation: land 0.5s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(1.5s + var(--w) * 0.22s); }
#page.landing .stamp { animation: thunk 0.35s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: 3.4s; }
@keyframes land { from { opacity: 0; transform: translateY(-0.5em) scale(1.25); } }
@keyframes thunk { from { opacity: 0; transform: rotate(-16deg) scale(3); } }

/* ── the page reacting to what you did with your cargo ───────────────────── */
#app.nudge #page { animation: nudge 0.5s ease-out; }
#app.recoil #page { animation: recoil 0.8s ease-out; }
/* a Gargle Blaster: everything sways, and the colours are not where you left them */
#app.woozy #page { animation: sway 3.2s ease-in-out infinite; }
#app.woozy #sticker { animation: sway 2.1s ease-in-out infinite reverse; }
html:has(#app.woozy) #poster { animation: swim 5s ease-in-out infinite; }
@keyframes nudge { 30% { transform: translateY(-5px); } }
@keyframes recoil { 15% { transform: translateX(-14px) rotate(-0.6deg); } 40% { transform: translateX(8px); } 70% { transform: translateX(-3px); } }
@keyframes sway { 0%, 100% { transform: rotate(-0.7deg) translateX(-6px); } 50% { transform: rotate(0.7deg) translateX(6px) skewX(1.2deg); } }
@keyframes swim { 0%, 100% { filter: hue-rotate(0deg) saturate(1.2); } 33% { filter: hue-rotate(120deg) saturate(1.5); } 66% { filter: hue-rotate(240deg) saturate(1.5); } }

/* ── the decision bar: fixed at the foot of the left page ─────────────────── */
#dock {
    position: fixed; z-index: 15; left: 0; bottom: 0; width: 50vw;
    padding: 14px clamp(28px, 6vw, 120px) calc(16px + var(--safe-b));
    background: var(--ground); border-top: 3px solid var(--ink);
    max-height: 62dvh; overflow-y: auto;
}
#dock:empty { display: none; }
.d-title { font-size: 0.78em; letter-spacing: 0.06em; opacity: 0.75; margin-bottom: 0.3em; }
#dock .acts { gap: 0.3em 1.1em; }
#dock .live { margin: 0; }
.count { display: inline-flex; align-items: center; gap: 0.2em; }
.count b { min-width: 2.2em; text-align: center; font-variant-numeric: tabular-nums; font-size: 1.15em; }
.live.step { text-decoration: none; min-width: 44px; text-align: center; font-size: 1.3em; padding: 0.3em 0; }
.live.alt { text-decoration: none; box-shadow: inset 0 0 0 2px var(--pop); padding-inline: 0.7em; }
#dock .option { border-bottom: 0; padding: 0.45em 0.6em; margin-left: -0.6em; width: calc(100% + 1.2em); grid-template-columns: 1fr; }
#dock .option b { color: var(--pop); }
#dock .option:hover:not(:disabled) b { color: var(--ground); }
#dock .option small { grid-column: 1; }
#dock .option:has(.box) { grid-template-columns: 1.6em 1fr; }
#dock .option:has(.box) small { grid-column: 2; }
#dock .option:has(.box) b { color: var(--ink); }
/* while something is being decided, the text above keeps clear of the bar */
#app:has(#dock:not(:empty)) #page, #app:has(#dock:not(:empty)) #sheet-card { padding-bottom: 46vh; }

/* ── settings: clear pills and thin faders, as on the homepage ───────────── */
#menu-pill {
    position: fixed; z-index: 21; top: max(14px, var(--safe-t)); right: max(16px, env(safe-area-inset-right, 0px));
    display: flex; align-items: center; gap: 0.6em; min-height: 44px; padding: 0 1.1em 0 1em;
    border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent); border-radius: 999px;
    background: color-mix(in srgb, var(--ground) 82%, transparent); color: var(--ink);
    font-size: 0.8rem; letter-spacing: 0.08em; transition: background-color 0.2s, color 0.2s;
}
#menu-pill:hover { background: var(--ink); color: var(--ground); }
.burger { position: relative; width: 1.05rem; height: 0.8rem; }
.burger i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 1px; background: currentColor; }
.burger i:nth-child(1) { top: 0; } .burger i:nth-child(2) { top: calc(50% - 1px); } .burger i:nth-child(3) { bottom: 0; }
#menu { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--ground) 94%, transparent); overflow-y: auto; }
.menu-card { width: min(420px, 100%); display: grid; gap: 0.5rem; font-size: 0.95rem; }
.menu-head { font-size: 0.8rem; letter-spacing: 0.2em; opacity: 0.6; margin-bottom: 0.6rem; }
.menu-row, .fader { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.9rem; }
.menu-foot { font-size: 0.74rem; opacity: 0.6; margin-top: 1rem; line-height: 1.5; }
.dim { opacity: 0.4; }
.pills { display: flex; gap: 0.4rem; }
.pill {
    min-height: 2.75rem; padding: 0 1.15rem; border-radius: 999px; text-align: center; letter-spacing: 0.08em; font-size: 0.85rem;
    border: 1.5px solid color-mix(in srgb, var(--ink) 55%, transparent); color: var(--ink);
}
.pill:hover, .pill.on, .pill.solid { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.pill.warn { border-color: var(--pop); color: var(--pop); }
.pill.warn:hover { background: var(--pop); color: var(--ground); }
.fader input {
    --v: 70%; width: min(13rem, 55%); height: 2.75rem; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.fader input::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--ink) var(--v), color-mix(in srgb, var(--ink) 25%, transparent) var(--v)); }
.fader input::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--ink) var(--v), color-mix(in srgb, var(--ink) 25%, transparent) var(--v)); }
.fader input::-webkit-slider-thumb { -webkit-appearance: none; width: 0.95rem; height: 0.95rem; margin-top: calc(-0.475rem + 1.5px); border: 0; border-radius: 50%; background: var(--ink); }
.fader input::-moz-range-thumb { width: 0.95rem; height: 0.95rem; border: 0; border-radius: 50%; background: var(--ink); }

/* ── two words, in large friendly letters ────────────────────────────────── */
#sticker {
    position: fixed; z-index: 20; right: clamp(14px, 3vw, 44px); bottom: calc(clamp(14px, 3vw, 40px) + var(--safe-b));
    transform: rotate(-11deg); transform-origin: center;
    background: var(--ground); color: var(--pop); box-shadow: 0 0 0 4px var(--pop), 6px 8px 0 4px color-mix(in srgb, var(--ink) 25%, transparent);
    font-family: var(--block); font-size: clamp(1.1rem, 2.1vw, 2.2rem); line-height: 0.95; text-align: center;
    padding: 0.5em 0.7em 0.42em; transition: transform 0.3s;
}
#sticker:hover { transform: rotate(-7deg) scale(1.06); }
#app[data-mood="uneasy"] #sticker { animation: fret 3.2s ease-in-out infinite; }
#app[data-mood="alarm"] #sticker { animation: shake 0.5s linear infinite; background: var(--pop); color: var(--ground); }
@keyframes fret { 50% { transform: rotate(-13deg) scale(1.08); } }
@keyframes shake { 0%, 100% { transform: rotate(-11deg) scale(1.16); } 25% { transform: rotate(-14deg) scale(1.16) translate(-2px, 1px); } 75% { transform: rotate(-8deg) scale(1.16) translate(2px, -1px); } }

/* ═══ the bureau ════════════════════════════════════════════════════════════
   At the Vogon Fleet, and in Vogon business, the page is a form. Boxes at last. */
#app[data-bureau] #page { counter-reset: section; }
#app[data-bureau] #page .lead { counter-increment: section; opacity: 1; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8em; color: var(--pop); border-bottom: 2px solid var(--pop); padding-bottom: 0.3em; }
#app[data-bureau] #page .lead::before { content: 'SECTION ' counter(section) '. '; opacity: 0.6; }
#app[data-bureau] #page .g { border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
#app[data-bureau] #page h1::after { content: 'FORM PG/42 · VISITOR’S DECLARATION · PRESS HARD'; display: block; font-family: var(--text); font-size: 0.16em; letter-spacing: 0.2em; margin-top: 1em; color: var(--pop); }
.said.stamped { display: inline-block; font-style: normal; text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--block); font-size: 0.9em; color: var(--pop); border: 3px solid var(--pop); padding: 0.5em 0.8em; transform: rotate(-2deg); }
.said.stamped::before { content: 'PROCESSED · '; opacity: 1; }
#sheet[data-bureau] #sheet-card { border: 2px solid var(--pop); outline: 2px solid var(--pop); outline-offset: 5px; padding: 1.4em; margin-top: 8vh; margin-bottom: 26vh; background: var(--ground); }
.form-no, .form-label { font-size: 0.72em; letter-spacing: 0.14em; opacity: 0.7; }
.form-no { border-bottom: 1px solid currentColor; padding-bottom: 0.5em; }
.form-label { margin-top: 1em; }
#sheet[data-bureau] h2 { font-family: var(--block); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1; color: var(--pop); margin: 0.5em 0; }
#sheet[data-bureau] .entry { font-style: normal; font-size: 1em; }
.option { display: grid; grid-template-columns: 1.6em 1fr; column-gap: 0.5em; align-items: baseline; width: 100%; min-height: 52px; padding: 0.55em 0.3em; border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.option .box { width: 0.9em; height: 0.9em; border: 2px solid var(--pop); grid-row: span 2; align-self: start; margin-top: 0.3em; }
.option small { grid-column: 2; opacity: 0.7; font-size: 0.84em; }
.option:hover:not(:disabled) { background: var(--pop); color: var(--ground); }
.option:hover:not(:disabled) .box { background: var(--ground); border-color: var(--ground); }
.option:disabled { opacity: 0.45; cursor: default; }

/* ── phones: the picture on top, the voice beneath ───────────────────────── */
@media (max-width: 899px) {
    #page, #sheet-card {
        width: 100%; margin: 36dvh 0 0; padding: 22px 20px calc(150px + var(--safe-b));
        background: var(--ground); min-height: 64dvh;
    }
    #sheet[data-bureau] #sheet-card { margin: 36dvh 10px 150px; width: auto; min-height: 0; }
    h1 { font-size: clamp(2rem, 10.5vw, 3.2rem); margin-top: 0.4em; }
    .tally { margin: -22px -20px 0.4em; padding: 12px 20px 10px; }
    .t-row .dots { overflow: hidden; }
    .t-row .dots { gap: 2px; }
    .t-row { gap: 0.6em; }
    .t-row > span:first-child { min-width: 6.6em; }
    .dots { gap: 4px; }
    .dots i { width: 6px; height: 6px; }
    #sticker { font-size: 1.05rem; }
    /* the menu shrinks to its three lines, and the tally leaves it room */
    #menu-pill { padding: 0 0.85em; top: max(8px, var(--safe-t)); right: 10px; }
    #menu-pill > span:last-child { display: none; }
    .tally { padding-right: 64px !important; }
    h1.final { font-size: clamp(2.2rem, 12vw, 3.6rem); }
    #dock { width: 100%; padding: 12px 20px calc(14px + var(--safe-b)); }
    /* the bar needs the corner: the sticker steps aside while you decide */
    #app:has(#dock:not(:empty)) #sticker { display: none; }
    #app:has(#dock:not(:empty)) #page, #app:has(#dock:not(:empty)) #sheet-card { padding-bottom: 60dvh; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .rev.writing del, .rev.writing ins { opacity: 1; }
}
