/* Not My Event: the look of "The Age Recall" (public/templates/age-recall.html). One page that scrolls DOWN through five places of a made-up bureaucracy. Each scene is a section with a
   pinned picture behind it (.stage, drawn by recall-art.js for the size of the screen) and its words and toys in front (.flow), which simply scroll: nothing is clipped on a small phone and
   nothing has to be finished to go on. The scroll frame in recall.js writes only transform and opacity on a few layers. Five palettes: parchment, rust and slate (intake), mint, steel and
   caution yellow (workshop), beige and faded teal (warranty), copper turning to party colors (the machine), warm wood and gold (the service order). */
:root { --ac: #DDB65C; --ac2: #FFF2BE; --rust: #C4532A; --red: #B5281E; --slate: #2E3840; --mono: 'Courier Prime', 'Courier New', ui-monospace, monospace; --head: 'Anton', 'Arial Narrow', Impact, sans-serif; --serif: 'Fraunces', Georgia, serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #E9D9B4; color: var(--slate); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.45; overflow-x: clip; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 9100; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid #1F6FE0; outline-offset: 3px; }

/* ---------- the two controls at the top, the details pill, the sound hint ---------- */
#menu-wrap { position: fixed; left: 10px; top: 10px; z-index: 9040; }
#b-menu { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(30, 36, 42, .86); color: #fff; font-family: var(--mono); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
#menu { margin-top: 8px; display: grid; gap: 6px; padding: 8px; border-radius: 14px; background: rgba(30, 36, 42, .97); border: 1px solid rgba(255, 255, 255, .25); min-width: 210px; }
#menu button { min-height: 44px; text-align: left; padding: 0 12px; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 15px; }
#menu button[aria-pressed="true"] { background: #F4C430; color: #1A1408; }
#ev-pill { position: fixed; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9030; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(30, 36, 42, .88); color: #fff; font-size: 13px; letter-spacing: .04em; }
#snd-hint { position: fixed; left: 50%; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 48px); transform: translateX(-50%); z-index: 9030; padding: 6px 12px; border-radius: 14px; background: rgba(30, 36, 42, .88); color: #fff; font-size: 12px; white-space: nowrap; transition: opacity .4s; pointer-events: none; }
#snd-hint.gone { opacity: 0; }
.bub { position: fixed; z-index: 9020; transform: translate(-50%, -110%); max-width: 240px; padding: 9px 12px; border-radius: 12px; background: #fff; color: #16121E; font-size: 14px; line-height: 1.3; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); animation: bub 2.5s ease both; pointer-events: none; }
@keyframes bub { 0% { opacity: 0; transform: translate(-50%, -90%); } 10%, 85% { opacity: 1; transform: translate(-50%, -110%); } 100% { opacity: 0; } }

/* ---------- a scene: a pinned picture, and the words in front ---------- */
.sc { position: relative; }
#s1 { background: #4A5560; } #s2 { background: #9FAAB2; } #s3 { background: #B7AC8E; } #s4 { background: #241612; color: #fff; } #s5 { background: #5A3620; }
.stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; z-index: 0; }
.flow { position: relative; z-index: 1; margin-top: -100vh; margin-top: -100lvh; }
/* the words lie over the picture, but only the words take taps: the gaps between them let a tap through to the things in the picture */
.flow, .beat { pointer-events: none; }
.beat > * { pointer-events: auto; }
.ly, .ov { position: absolute; inset: 0; pointer-events: none; }
.ly svg { display: block; width: 100%; height: 100%; }
.ov { opacity: 0; }
.hit { pointer-events: auto; cursor: pointer; }
.beat { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 76px 16px 70px; text-align: center; }
.beat.out { min-height: 70vh; justify-content: flex-end; padding-bottom: 22vh; }
.cue { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 7px 14px; border-radius: 16px; background: rgba(30, 36, 42, .86); color: #fff; }
.cue::after { content: '  ↓'; }
.cue.light { background: rgba(255, 255, 255, .16); }
.linkish { background: none; border: 0; padding: 10px 8px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; color: inherit; opacity: .9; }
.linkish.light { color: #fff; }
.minor { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.fine { font-size: 12px; opacity: .78; }
.status { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.plate { font-family: var(--mono); font-weight: 700; letter-spacing: .16em; font-size: clamp(11px, 3.2vw, 14px); padding: 8px 14px; border-radius: 4px; box-shadow: 0 3px 8px rgba(0, 0, 0, .22); }
.plate.rust { background: var(--rust); color: #FFF4DC; }
.plate.caution { background: #F4C430; color: #1A1408; border: 2px solid #1A1408; }
.plate.teal { background: #467A78; color: #F3F0E2; }
.unit { width: 100%; max-width: 600px; padding: 22px 18px 14px; border-radius: 14px; display: grid; gap: 14px; justify-items: center; }
.unit h2 { font-family: var(--head); font-weight: 400; font-size: clamp(26px, 7vw, 38px); letter-spacing: .03em; line-height: 1.05; text-transform: uppercase; }
.unit .how { font-size: 15px; max-width: 32em; }
.head { font-family: var(--head); font-weight: 400; font-size: clamp(32px, 9vw, 64px); line-height: 1.02; letter-spacing: .02em; text-transform: uppercase; max-width: 14em; }
.lede { font-size: clamp(16px, 4.4vw, 20px); max-width: 30em; padding: 8px 14px; border-radius: 10px; background: rgba(255, 255, 255, .82); }
.caption { max-width: 32em; font-size: clamp(15px, 4.2vw, 19px); padding: 9px 14px; border-radius: 10px; background: rgba(30, 36, 42, .88); color: #fff; opacity: 0; transition: opacity .5s; }
.caption.on, .hero.said .caption { opacity: 1; }
.caption .who { font-family: var(--mono); font-weight: 700; font-size: .8em; letter-spacing: .1em; color: #FFC24A; }
.btn-stamp { min-height: 52px; padding: 8px 22px; border-radius: 8px; border: 3px solid var(--red); background: #FBF3DC; color: var(--red); font-family: var(--head); font-size: clamp(18px, 5vw, 24px); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 5px 0 #7A1A14; }
.btn-stamp:active { transform: translateY(3px); box-shadow: 0 2px 0 #7A1A14; }

/* ---------- 1. the recall notice ---------- */
.dossier { width: 100%; max-width: 600px; filter: drop-shadow(0 16px 24px rgba(40, 24, 8, .4)); transform: rotate(-1.2deg); }
.d-tab { display: inline-block; margin-left: 18px; padding: 6px 16px 4px; border-radius: 8px 8px 0 0; background: #C9A15A; font-family: var(--mono); font-weight: 700; font-size: clamp(11px, 3vw, 13px); letter-spacing: .14em; float: left; }
.d-page { clear: both; position: relative; display: grid; grid-template-columns: clamp(84px, 26%, 140px) 1fr; gap: 12px 14px; align-items: start; padding: 14px; background: #FBF3DC; border: 10px solid #E3C27E; border-radius: 4px 6px 6px 6px; text-align: left; min-height: 210px; }
.d-photo { border: 2px solid #8E8468; background: #D9C79C; }
.d-photo svg { display: block; width: 100%; height: auto; }
.d-photo img { display: block; width: 100%; height: auto; aspect-ratio: 120 / 172; object-fit: cover; }
.d-lines { display: grid; gap: 5px; font-family: var(--mono); font-weight: 700; font-size: clamp(12.5px, 3.5vw, 17px); line-height: 1.3; }
.d-lines b { color: var(--red); overflow-wrap: anywhere; }
.dossier .tw { clip-path: inset(0 100% 0 0); }
.dossier.typed .tw { clip-path: inset(0 0 0 0); transition: clip-path .5s steps(14); }
.dossier.typed .tw:nth-child(2) { transition-delay: .5s; } .dossier.typed .tw:nth-child(3) { transition-delay: 1s; } .dossier.typed .tw:nth-child(4) { transition-delay: 1.5s; } .dossier.typed .tw:nth-child(5) { transition-delay: 2s; }
.rstamp { grid-column: 1 / -1; justify-self: end; margin: 2px 4px 2px 0; opacity: 0; transform: rotate(-8deg) scale(2.8); }
.rstamp span { display: inline-block; font-family: var(--head); font-size: clamp(22px, 7vw, 40px); letter-spacing: .05em; line-height: 1.1; color: var(--red); border: 5px solid var(--red); border-radius: 8px; padding: 2px 12px; background: rgba(251, 243, 220, .7); }
.dossier.open .rstamp { opacity: .92; transform: rotate(-8deg) scale(1); transition: opacity .12s .25s, transform .3s cubic-bezier(.2, 1.5, .4, 1) .25s; }
.d-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; background: #E3C27E; background-image: repeating-linear-gradient(45deg, rgba(120, 80, 20, .06) 0 10px, transparent 10px 20px); text-align: center; transition: transform .5s cubic-bezier(.5, 0, .3, 1), opacity .3s .3s; transform-origin: 50% 0; }
.d-cover .in { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .2em; color: var(--red); }
.dossier.open .d-cover { transform: perspective(900px) rotateX(-96deg); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .5s cubic-bezier(.5, 0, .3, 1), opacity .3s .3s, visibility 0s .6s; }
.tagline { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(17px, 4.8vw, 23px); max-width: 24em; padding: 6px 12px; border-radius: 8px; background: rgba(251, 243, 220, .86); }
.cond { font-family: var(--mono); font-weight: 700; font-size: clamp(12px, 3.4vw, 15px); letter-spacing: .08em; padding: 7px 12px; border-radius: 6px; background: #1A1F24; color: #FFC24A; border: 2px solid #B98B3A; opacity: 0; transition: opacity .5s; overflow-wrap: anywhere; }
.lampdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #FFC24A; animation: breathe 2.4s ease-in-out infinite; }
.hero.said .cond, .hero.said #cue1 { opacity: 1; }
#cue1 { opacity: 0; transition: opacity .5s; }
.unit.parch { background: #FBF3DC; border: 3px solid var(--slate); box-shadow: 0 8px 0 var(--rust), 0 20px 40px rgba(40, 24, 8, .3); }
.beltbox { position: relative; width: 100%; height: 150px; overflow: hidden; border-radius: 10px; background: linear-gradient(180deg, #59646E 0 62%, #1A1F24 62% 74%, #3A444C 74%); border: 3px solid var(--slate); }
.scanner { position: absolute; left: 50%; top: 0; width: 92px; height: 100%; margin-left: -46px; border-left: 6px solid #B98B3A; border-right: 6px solid #B98B3A; border-top: 12px solid #B98B3A; border-radius: 12px 12px 0 0; pointer-events: none; }
.scanner i { position: absolute; left: 0; right: 0; top: 0; height: 62%; background: linear-gradient(180deg, rgba(255, 194, 74, .34), rgba(255, 194, 74, 0)); }
.rollers { position: absolute; left: 0; right: 0; bottom: 6px; height: 22px; background: radial-gradient(circle at 11px 11px, #C5CED4 0 7px, #2E3840 7.5px 9px, transparent 9.5px) 0 0 / 34px 22px repeat-x; pointer-events: none; }
.track { position: absolute; inset: 0; }
.it { position: absolute; left: 0; top: 12px; width: 66px; height: 82px; padding: 2px; border: 0; border-radius: 10px; background: rgba(251, 243, 220, .96); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); display: grid; justify-items: center; align-content: start; gap: 0; animation: ride var(--dur, 19s) linear infinite; animation-delay: var(--dl, 0s); will-change: transform; }
.it svg { width: 50px; height: 50px; display: block; }
.it .nm { font-family: var(--mono); font-weight: 700; font-size: 9.5px; line-height: 1.05; color: var(--slate); }
@keyframes ride { from { transform: translateX(var(--from, 560px)); } to { transform: translateX(-90px); } }
.it::after { position: absolute; left: 50%; top: 28px; transform: translateX(-50%) rotate(-10deg); font-family: var(--head); font-size: 12px; letter-spacing: .05em; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.it.flag { background: #FFE9E4; outline: 3px solid var(--red); }
.it.flag::after { content: 'FLAGGED'; background: var(--red); color: #fff; }
.it.pass { opacity: .78; }
.it.pass::after { content: 'CLEARED'; background: #59646E; color: #fff; }
.beltbox.stop .it { animation-play-state: paused; }
.remark { min-height: 2.7em; font-size: 15px; font-style: italic; max-width: 30em; }
.bigstamp span { display: inline-block; font-family: var(--head); font-size: clamp(22px, 7vw, 38px); letter-spacing: .05em; line-height: 1.1; color: #1F7A52; border: 5px solid #1F7A52; border-radius: 8px; padding: 2px 14px; transform: rotate(-4deg); animation: slam .4s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes slam { from { opacity: 0; transform: rotate(-4deg) scale(2.6); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }
.alt { width: 100%; font-size: 14px; text-align: left; }
.alt summary { cursor: pointer; padding: 10px 4px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; text-align: center; }
#flag-list { display: grid; gap: 7px; grid-template-columns: 1fr 1fr; }
#flag-list button { width: 100%; min-height: 48px; padding: 6px 10px; border-radius: 8px; border: 2px solid var(--slate); background: #fff; text-align: left; font-size: 15px; }
#flag-list button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
#flag-list button[aria-pressed="true"]::after { content: ' (flagged)'; }
#flag-list button.pass::after { content: ' (cleared)'; }

/* ---------- 2. the Diagnostic Workshop ---------- */
#s2 .head { color: #154A3C; text-shadow: 0 2px 0 rgba(255, 255, 255, .7); }
.unit.steel { background: linear-gradient(180deg, #F2F5F6, #D9E0E4); border: 3px solid var(--slate); box-shadow: 0 8px 0 #F4C430, 0 20px 40px rgba(20, 50, 40, .3); }
.bench { display: grid; grid-template-columns: minmax(110px, 170px) 1fr; gap: 14px; width: 100%; align-items: start; }
@media (max-width: 480px) { .bench { grid-template-columns: 1fr; justify-items: center; } .diagram { width: 46%; min-width: 130px; } }
.diagram svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.zone { opacity: .22; transition: opacity .3s; }
.diagram.z-knees .z-knees, .diagram.z-memory .z-memory, .diagram.z-energy .z-energy, .diagram.z-music .z-music, .diagram.z-patience .z-patience { opacity: 1; }
.scanline { opacity: 0; }
.diagram.scan .scanline { opacity: .85; animation: scan 1.5s ease-in-out both; }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(274px); } }
.t-side { display: grid; gap: 10px; width: 100%; }
.t-btns { display: grid; gap: 8px; }
.t-b { min-height: 56px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-radius: 28px; border: 3px solid var(--slate); background: #F4C430; color: #1A1408; font-family: var(--head); font-size: 20px; letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 5px 0 var(--slate); transition: transform .12s, box-shadow .12s; }
.t-b:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--slate); }
.t-b .st { font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .04em; padding: 3px 8px; border-radius: 10px; background: rgba(0, 0, 0, .16); white-space: nowrap; }
.t-b.run { background: #FFE27A; } .t-b.run .st { background: var(--slate); color: #fff; }
.t-b.ok { background: #5ED6A4; box-shadow: 0 2px 0 var(--slate); transform: translateY(3px); }
.t-b:disabled:not(.ok):not(.run) { opacity: .45; box-shadow: none; }
.printout { width: 100%; padding: 14px 14px 10px; background: #FBF3DC; border: 1px solid #C9B98E; border-top: 8px solid var(--slate); text-align: left; font-family: var(--mono); box-shadow: 0 6px 14px rgba(0, 0, 0, .14); }
.p-head { font-weight: 700; letter-spacing: .14em; font-size: 12px; margin-bottom: 6px; }
#t-report { display: grid; gap: 8px; font-size: 14.5px; font-weight: 700; line-height: 1.3; min-height: 1.3em; }
#t-report li { padding-left: 1.4em; text-indent: -1.4em; overflow-wrap: anywhere; animation: typed .4s ease both; }
#t-report li::before { content: '▸ '; color: var(--rust); }
#t-report li small { display: block; text-indent: 0; font-weight: 400; font-size: 11px; letter-spacing: .1em; color: #6A5E44; }
@keyframes typed { from { opacity: 0; transform: translateY(-6px); } }
.p-score { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--rust); }

/* ---------- 3. the Warranty Department ---------- */
.term { width: 100%; max-width: 520px; padding: 14px 16px 16px; border-radius: 14px; background: #10151A; border: 10px solid #C9C0A6; box-shadow: 0 14px 30px rgba(0, 0, 0, .35), inset 0 0 30px rgba(0, 0, 0, .8); font-family: var(--mono); font-weight: 700; color: #FFB52E; text-align: left; display: grid; gap: 9px; }
.t-top { font-size: 12px; letter-spacing: .14em; color: #8A8468; }
.t-line { font-size: clamp(15px, 4.4vw, 20px); min-height: 1.4em; }
.t-bar { height: 12px; border: 2px solid #FFB52E; padding: 1px; }
.t-bar i { display: block; height: 100%; background: #FFB52E; transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s steps(9); }
.term.b1 .t-bar i { transform: scaleX(.34); } .term.b2 .t-bar i { transform: scaleX(.68); } .term.done .t-bar i { transform: scaleX(1); }
.t-final { font-family: var(--head); font-weight: 400; font-size: clamp(22px, 6.6vw, 36px); letter-spacing: .04em; line-height: 1.08; color: #FF6A4A; opacity: 0; }
.term.done .t-final { opacity: 1; transition: opacity .2s; }
.term.done .t-line { color: #8A8468; }
.rcpt-wrap { position: relative; width: min(100%, 370px); overflow: clip; padding-bottom: 4px; }
.rcpt { background: #fff; color: #1A1F24; font-family: var(--mono); padding: 22px 18px 96px; text-align: left; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); display: grid; gap: 12px; }
.r-head { font-weight: 700; font-size: 18px; letter-spacing: .1em; text-align: center; border-bottom: 2px dashed #1A1F24; padding-bottom: 10px; }
.r-sub { font-size: 12.5px; text-align: center; overflow-wrap: anywhere; }
#receipt { display: grid; gap: 16px; font-size: 15px; line-height: 1.3; }
#receipt li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding-bottom: 14px; border-bottom: 1px dotted #9FAAB2; overflow-wrap: anywhere; }
#receipt li b { font-weight: 700; } #receipt li span { color: #4A5560; text-align: right; }
.r-total { font-weight: 700; font-size: 17px; border-top: 2px dashed #1A1F24; padding-top: 12px; text-align: center; }
.r-bar { height: 44px; background: repeating-linear-gradient(90deg, #1A1F24 0 3px, transparent 3px 5px, #1A1F24 5px 6px, transparent 6px 10px, #1A1F24 10px 14px, transparent 14px 17px); }
.r-thanks { text-align: center; font-size: 12.5px; letter-spacing: .1em; }
/* the printer rides at the bottom of the screen while the receipt is on it, so the paper comes up out of it as the guest scrolls */
.printer { position: sticky; bottom: 58px; z-index: 2; height: 70px; margin: -70px -4px 0; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #7A8790, #4A5560); border: 3px solid var(--slate); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; }
.printer i { position: absolute; left: 8%; right: 8%; top: 9px; height: 9px; border-radius: 5px; background: #10151A; }
.printer span { font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .2em; color: #F4C430; }
.printer::after { content: ''; position: absolute; left: -3px; right: -3px; top: 100%; height: 100vh; background: #4A5560; border: 3px solid var(--slate); border-top: 0; }
.sheet i { position: absolute; left: 50%; top: 8%; width: min(82vw, 560px); height: 110%; margin-left: calc(min(82vw, 560px) / -2); background: repeating-linear-gradient(180deg, transparent 0 30px, #D9CDB0 30px 32px) #FBF3DC; box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); }
.sheet b { position: absolute; left: 50%; top: 34%; width: min(74vw, 500px); margin-left: calc(min(74vw, 500px) / -2); text-align: center; opacity: 0; }
.sheet b span { display: inline-block; font-family: var(--head); font-weight: 400; font-size: clamp(24px, 7.6vw, 52px); line-height: 1.08; letter-spacing: .04em; color: var(--red); border: 6px solid var(--red); border-radius: 10px; padding: 6px 16px; transform: rotate(-7deg); }
.sheet { opacity: 1; transform: translateY(105%); }

/* ---------- 4. the Party Rejuvenator 5000 ---------- */
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#s4 .lights, #s4 .balls, #s4 .balloons { opacity: 0; transition: opacity 1.4s; }
#s4.go3 .lights, #s4.go3 .balls, #s4.go3 .balloons { opacity: 1; }
#s4 .dark { background: #1E120A; }
#s4 .ticket { opacity: 0; }
.readout { display: grid; gap: 8px; justify-items: center; }
.machine { font-family: var(--mono); font-weight: 700; font-size: clamp(17px, 5vw, 30px); letter-spacing: .06em; line-height: 1.25; padding: 12px 16px; border-radius: 6px; max-width: 22em; opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .45s; background: #10151A; }
.m1 { color: #FF6A4A; border: 2px solid #FF6A4A; } .m2 { color: #FFD36A; border: 2px solid #FFD36A; }
#s4.go1 .m1, #s4.go2 .m2 { opacity: 1; transform: none; }
#s4.go2 .m1 { text-decoration: line-through; opacity: .55; }
.reveal { font-family: var(--head); font-size: clamp(30px, 9.4vw, 72px); line-height: 1.04; letter-spacing: .03em; max-width: 12em; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .45), 0 0 30px rgba(255, 111, 192, .5); opacity: 0; transform: scale(.7); }
.reveal span { display: block; } .reveal .gold { color: #FFD36A; }
#s4.go3 .reveal { opacity: 1; transform: none; transition: opacity .3s, transform .5s cubic-bezier(.2, 1.4, .4, 1); }
.btn-lever { min-height: 54px; padding: 8px 24px; border-radius: 27px; border: 3px solid #3A2416; background: linear-gradient(180deg, #F3DFA0, #B98B3A); color: #2A1A0A; font-family: var(--head); font-size: 20px; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 5px 0 #3A2416; }
.btn-lever:active { transform: translateY(3px); box-shadow: 0 2px 0 #3A2416; }
.unit.copper { background: rgba(36, 22, 18, .92); border: 3px solid #D08A58; color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); }
.unit.copper h2 { color: #FFD36A; }
#sum-list { width: 100%; display: grid; gap: 8px; text-align: left; }
#sum-list div { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: baseline; padding-bottom: 7px; border-bottom: 1px dashed rgba(255, 255, 255, .25); }
#sum-list dt { font-size: 15px; } #sum-list dd { font-family: var(--mono); font-weight: 700; color: #FFD36A; font-size: 15px; text-align: right; }

/* ---------- 5. the service order ---------- */
#s5 .beat { padding-top: 90px; }
.order { width: 100%; max-width: 600px; padding: clamp(16px, 4.5vw, 34px); display: grid; gap: 14px; justify-items: center; color: #1A1612; background: linear-gradient(90deg, rgba(120, 96, 40, .07), transparent 12%, transparent 88%, rgba(120, 96, 40, .09)), #FBF5E6; border: 2px solid #B88A2A; outline: 6px solid #FBF5E6; box-shadow: 0 0 0 8px #DDB65C, 0 0 46px 14px rgba(255, 214, 130, .35), 0 26px 50px rgba(0, 0, 0, .5); border-radius: 3px; margin: 14px; transform: rotate(.6deg); }
.o-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.o-no { font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: .12em; text-align: left; }
.seal { width: 86px; flex: none; transform: rotate(9deg); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); }
.seal svg { display: block; width: 100%; height: auto; }
#t-title { font-family: var(--head); font-weight: 400; font-size: clamp(27px, 8vw, 50px); line-height: 1.04; letter-spacing: .02em; text-transform: uppercase; overflow-wrap: anywhere; }
.o-sub { font-family: var(--mono); font-weight: 700; font-size: clamp(12px, 3.4vw, 15px); letter-spacing: .08em; color: #6B4F12; overflow-wrap: anywhere; }
.o-grid { width: 100%; border: 2px solid #1A1612; text-align: left; }
.o-row { padding: 9px 12px; border-bottom: 1px solid #1A1612; display: grid; gap: 1px; }
.o-row:last-child { border-bottom: 0; }
.o-row .k { font-family: var(--mono); font-weight: 700; font-size: 10.5px; letter-spacing: .16em; color: #6B4F12; }
.o-row .v { font-family: var(--serif); font-weight: 600; font-size: clamp(17px, 4.8vw, 21px); line-height: 1.25; overflow-wrap: anywhere; }
.o-row .v.big { font-weight: 800; font-size: clamp(28px, 8.6vw, 46px); line-height: 1.05; }
.o-row .v.small { font-style: italic; font-weight: 500; font-size: 16px; }
.acts, .row-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 22px; border-radius: 26px; border: 2px solid var(--ac); background: var(--ac); color: #14100A; font-weight: 700; font-size: 16px; letter-spacing: .03em; font-family: system-ui, sans-serif; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ac); }
.order .btn { border-color: #1A1612; background: #1A1612; color: #FFF2BE; } .order .btn.ghost { background: transparent; color: #1A1612; }
.btn:disabled { opacity: .5; }

/* ---------- the details, the reply, the certificate ---------- */
.after { position: relative; z-index: 2; background: #1E120A; color: #F6EFDD; padding: 30px 16px calc(96px + env(safe-area-inset-bottom)); display: grid; gap: 34px; justify-items: center; }
.after section { width: 100%; max-width: 560px; display: grid; gap: 14px; }
.after h2 { font-family: var(--serif); font-weight: 800; font-size: 28px; color: var(--ac); }
.det { display: grid; gap: 11px; }
.det div { display: grid; gap: 1px; padding-bottom: 10px; border-bottom: 1px solid rgba(221, 182, 92, .25); }
.det dt { font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ac); }
.det dd { font-size: 17px; overflow-wrap: anywhere; }
.row-acts { justify-content: flex-start; }
.going { font-family: var(--mono); font-size: 14px; color: var(--ac2); }
#rsvp-form { display: grid; gap: 14px; }
.f { display: grid; gap: 6px; font-size: 14px; color: #D8CFB8; }
.f input[type="text"], .f textarea { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(221, 182, 92, .6); background: #2A1B10; color: #fff; font: inherit; font-size: 16px; }
.ans { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.ans label { display: flex; gap: 10px; align-items: center; min-height: 54px; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(221, 182, 92, .45); background: #2A1B10; font-size: 16px; cursor: pointer; }
.ans label:has(input:checked) { border-color: var(--ac); background: #3A2610; box-shadow: inset 0 0 0 1px var(--ac); }
.ans input { width: 20px; height: 20px; accent-color: var(--ac); flex: none; }
.ans b { color: var(--ac2); font-family: var(--mono); letter-spacing: .04em; }
.step { display: flex; align-items: center; gap: 14px; }
.step button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ac); background: transparent; color: var(--ac); font-size: 22px; }
.step output { min-width: 1.5em; text-align: center; font-size: 20px; color: #fff; }
#err { min-height: 1.3em; font-size: 14px; color: #D8CFB8; } #err.err { color: #FF9AA2; }
#done { display: grid; gap: 8px; padding: 18px; border-radius: 10px; border: 1px solid var(--ac); background: #2A1B10; }
#done-t { font-family: var(--head); font-weight: 400; font-size: 30px; letter-spacing: .04em; color: var(--ac2); } #done-t:focus { outline: none; }
#r-closed { padding: 14px; border-radius: 10px; background: #2A1B10; }
#cert { text-align: center; justify-items: center; padding: 24px 16px; border: 3px double var(--ac); border-radius: 6px; background: radial-gradient(ellipse at 50% 0, rgba(221, 182, 92, .16), transparent 70%), #2A1B10; }
#cert .c-top { font-family: var(--mono); font-weight: 700; letter-spacing: .16em; font-size: 11.5px; color: var(--ac); }
#cert h2 { font-size: clamp(26px, 7.4vw, 36px); line-height: 1.1; }
.c-rank { font-size: 18px; } .c-rank b { color: var(--ac2); }
.c-find { display: grid; gap: 5px; font-family: var(--mono); font-size: 13px; color: #D8CFB8; max-width: 30em; }
.foot { font-size: 12px; opacity: .65; text-align: center; max-width: 30em; }

/* ---------- the small motion in the pictures (slow, and never a strobe) ---------- */
.glw { animation: breathe 2.8s ease-in-out infinite; } .glw.g1 { animation-delay: -1.4s; }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ndl { animation: wander 3.4s ease-in-out infinite alternate; } .ndl.n1 { animation-duration: 4.3s; animation-delay: -2s; }
@keyframes wander { from { transform: rotate(-70deg); } to { transform: rotate(60deg); } }
.pb { animation: blink 2.2s steps(2, jump-none) infinite; } .pb.b { animation-delay: -1.1s; }
#s3 .sheet { z-index: 2; }
@keyframes blink { from { opacity: 1; } to { opacity: .55; } }
.arm { animation: nod 3.6s ease-in-out infinite alternate; }
/* the whole arm swings out from its mount towards the middle of the room and back, slowly; the two arms are out of step */
.swing { animation: swing 7s ease-in-out infinite alternate; } .swing.b { animation-duration: 8.6s; animation-delay: -3s; }
@keyframes swing { from { transform: rotate(7deg); } to { transform: rotate(-17deg); } }
@keyframes nod { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
.spin { animation: turn 5s linear infinite; } .spin.slow { animation-duration: 9s; } .spin.back { animation-duration: 6.3s; animation-direction: reverse; }
@keyframes turn { to { transform: rotate(360deg); } }
.tired { animation: tired 5s steps(1) infinite; }
@keyframes tired { 0%, 100% { opacity: .5; } 46% { opacity: .3; } 50% { opacity: .5; } 54% { opacity: .34; } 58% { opacity: .5; } }
.beam { animation: sway 8s ease-in-out infinite alternate; } .beam.b1 { animation-duration: 9.5s; animation-delay: -3s; } .beam.b2 { animation-duration: 7s; animation-delay: -5s; } .beam.b3 { animation-duration: 10s; animation-delay: -1s; }
@keyframes sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.core { opacity: .25; } #s4.go3 .core { animation: breathe 1.8s ease-in-out infinite; }
.ridecakes { animation: cakes 14s linear infinite; }
@keyframes cakes { to { transform: translateX(var(--step, -480px)); } }
.hit.tap { animation: tap .4s ease; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes tap { 40% { transform: scale(1.08); } }
/* a scene off the screen rests */
.sc.off .stage *, .sc.off .flow * { animation-play-state: paused !important; }

/* ---------- reduced motion: every word and control stays, the sweeping and bursting goes ---------- */
body.rm *, body.rm *::before, body.rm *::after { animation: none !important; transition: none !important; }
body.rm .ov, body.rm .gate, body.rm #s4 .ticket, body.rm #confetti, body.rm .doss, body.rm .cap { display: none; }
body.rm .machine, body.rm .reveal, body.rm .caption, body.rm .cond, body.rm #cue1 { opacity: 1; transform: none; }
body.rm .dossier .tw { clip-path: none; }
body.rm .beltbox { height: auto; overflow: visible; background: #59646E; padding: 10px; }
body.rm .beltbox .scanner, body.rm .beltbox .rollers { display: none; }
body.rm .track { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 12px 8px; justify-items: center; }
body.rm .it { position: relative; top: 0; }
body.rm .printer { position: relative; bottom: 0; }
body.rm .printer::after { display: none; }
body.rm .rcpt { padding-bottom: 80px; }
@media (max-width: 380px) { .beat { padding-left: 10px; padding-right: 10px; } .unit { padding: 18px 12px 12px; } .d-page { border-width: 7px; padding: 10px; } .order { margin: 10px 6px; } }
.gate.gt { transform: translateY(-101%); } .gate.gb { transform: translateY(101%); }
