:root {
  --ink: #120d09;
  --paper: #f6ead2;
  --gold: #e9b44c;
  --rust: #c8642e;
  --teal: #4fb8b0;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --display: "Anton", "Impact", sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --vh: 100svh;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { display: block; }

/* film grain + letterbox */
.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-4%,3%)} 50%{transform:translate(3%,-5%)} 75%{transform:translate(-2%,4%)} 100%{transform:translate(0,0)} }
.letterbox { position: fixed; left: 0; right: 0; height: var(--lb, 0px); background: #000; z-index: 35; pointer-events: none; transition: height .6s ease; }
.letterbox.top { top: 0; } .letterbox.bottom { bottom: 0; }

/* HUD */
.hud-nav {
  position: fixed; z-index: 50; top: max(14px, env(safe-area-inset-top)); left: 16px; right: 16px;
  display: flex; align-items: center; gap: 14px; font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  pointer-events: none; mix-blend-mode: difference; color: #fff;
}
.hud-dots { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; pointer-events: auto; }
.hud-dots button { width: 22px; height: 3px; padding: 0; border: 0; background: rgba(255,255,255,.35); cursor: pointer; }
.hud-dots button.on { background: #fff; }
.hud-sound { margin-left: auto; pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.hud-sound .bars { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.hud-sound .bars i { width: 2px; height: 3px; background: currentColor; }
.hud-sound.on .bars i { animation: eq 1.1s ease-in-out infinite alternate; }
.hud-sound.on .bars i:nth-child(2) { animation-delay: -.4s; } .hud-sound.on .bars i:nth-child(3) { animation-delay: -.8s; }
@keyframes eq { from { height: 2px; } to { height: 11px; } }
.hud-sound:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }
.hud-classic { margin-left: 18px; pointer-events: auto; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* scenes */
.scene { position: relative; height: calc(var(--len, 300) * 1svh); }
.stage { position: fixed; inset: 0; height: var(--vh); overflow: hidden; background: var(--ink); visibility: hidden; }
.frame {
  position: absolute; left: 0; top: 0;
  width: max(100vw, calc(var(--vh) * var(--ar))); height: max(var(--vh), calc(100vw / var(--ar)));
  transform-origin: 0 0; will-change: transform;
}
.layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.stage > * { will-change: opacity, transform; }

/* 01 plains */
.mesas { will-change: transform; }
.grass { will-change: transform; transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite alternate; }
@keyframes sway { from { rotate: -.4deg; } to { rotate: .5deg; } }
.dust {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle, rgba(255,240,200,.7) 0 1px, transparent 2px), radial-gradient(circle, rgba(255,240,200,.5) 0 1px, transparent 2px);
  background-size: 180px 140px, 260px 220px; animation: drift 18s linear infinite;
}
@keyframes drift { to { background-position: 360px -140px, -260px -220px; } }
.title { position: absolute; left: 0; right: 0; top: 17%; text-align: center; padding: 0 16px; text-shadow: 0 2px 30px rgba(90,40,10,.35); }
.kicker { font: 600 11px/1.4 var(--mono); letter-spacing: .3em; text-transform: uppercase; margin: 0 0 14px; color: #fff6e2; }
.title h1 { margin: 0; font: 400 clamp(64px, 14vw, 190px)/.86 var(--display); letter-spacing: .01em; text-transform: uppercase; color: #fffaf0; }
.t-line { display: block; }
.roles { margin: 18px 0 0; font: 500 clamp(12px, 1.4vw, 16px)/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #3b2412; }
.roles i { font-style: normal; color: var(--rust); padding: 0 .3em; }
.scroll-cue { position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%); margin: 0; font: 600 11px var(--mono); letter-spacing: .25em; text-transform: uppercase; color: #fff6e2; display: grid; justify-items: center; gap: 10px; }
.scroll-cue b { width: 1px; height: 42px; background: linear-gradient(#fff6e2, transparent); animation: cue 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* captions */
.caption { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; padding: 0 16px; opacity: 0; pointer-events: none; }
.caption p { display: inline-block; margin: 0; padding: 12px 18px; font: 500 clamp(16px, 2.2vw, 26px)/1.35 var(--sans); color: #fff8e8; background: rgba(18,13,9,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.caption strong { color: var(--gold); }

/* 03 door */
.door-open { opacity: 0; }
.flash { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, #fff3d0, #ffb85c 45%, rgba(255,160,60,0) 75%); opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.prompt {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 12px; cursor: pointer;
  background: rgba(10,8,6,.78); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 6px;
  font: 600 14px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; opacity: 0;
  box-shadow: 0 0 0 0 rgba(233,180,76,.6); animation: ping 1.8s ease-out infinite;
}
.prompt kbd {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; font: 700 20px var(--mono);
  background: linear-gradient(#fdf2dc, #d9c39a); color: #1b120a; box-shadow: 0 4px 0 #7d6440, inset 0 -2px 0 rgba(0,0,0,.15);
}
.prompt:active kbd, .prompt.pressed kbd { transform: translateY(3px); box-shadow: 0 1px 0 #7d6440; }
.prompt:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(233,180,76,.55); } 100% { box-shadow: 0 0 0 18px rgba(233,180,76,0); } }
.p-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .p-desk { display: none; } .p-touch { display: inline; } .prompt kbd { font-size: 0; } .prompt kbd::after { content: "☝"; font-size: 20px; } }
.gate-note { position: absolute; left: 16px; right: 16px; bottom: calc(16% - 40px); margin: 0; text-align: center; font: 500 11px var(--mono); letter-spacing: .15em; text-transform: uppercase; color: rgba(255,245,225,.7); opacity: 0; }
.opened .prompt, .opened .gate-note { display: none; }

/* 04 lab tags */
.tag {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%) scale(var(--ts, 0)); opacity: var(--ts, 0);
  font: 600 12px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #fff;
  padding: 8px 12px; background: rgba(12,10,8,.75); border-left: 3px solid var(--gold); white-space: nowrap;
}
.tag em { display: block; font-style: normal; color: var(--gold); font-weight: 400; margin-top: 3px; letter-spacing: .1em; }
.tag::before { content: ""; position: absolute; left: -9px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 6px rgba(233,180,76,.25); }

/* 05 cook table */
.flasks { position: absolute; left: 6%; right: 6%; top: var(--bench-top, 40%); height: 30%; display: flex; justify-content: space-between; align-items: flex-end; }
.flask { position: relative; width: 8%; aspect-ratio: 740/1218; transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .5s; transform-origin: 50% 100%; filter: brightness(.7) saturate(.7); }
.flask.on { transform: scale(1.35) translateY(-4%); filter: none; z-index: 2; }
.flask img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2; }
.flask .liquid {
  position: absolute; left: 5%; right: 5%; bottom: 2%; height: 56%; border-radius: 50%; z-index: 3; mix-blend-mode: multiply; opacity: .95;
  background: radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--c) 40%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000));
  clip-path: inset(calc(100% - var(--lvl, 35%)) 0 0 0 round 0 0 50% 50%); transition: clip-path .8s ease;
}
.flask .shine { position: absolute; left: 5%; right: 5%; bottom: 2%; height: 56%; border-radius: 50%; z-index: 4; mix-blend-mode: screen; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle at 50% 70%, var(--c), transparent 65%); }
.flask.on .shine { opacity: .55; }
.flask.on .liquid { --lvl: 92%; }
.flask .liquid::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,.8) 0 2px, transparent 3px); background-size: 22px 30px; animation: bubble 2.4s linear infinite; opacity: .55; }
@keyframes bubble { to { background-position: 0 -60px; } }
.flask .glow { position: absolute; left: 50%; bottom: -10%; width: 160%; height: 50%; transform: translateX(-50%); background: radial-gradient(ellipse, var(--c), transparent 70%); opacity: 0; transition: opacity .6s; mix-blend-mode: screen; }
.flask.on .glow { opacity: .6; }
.flask .num { position: absolute; left: 50%; bottom: -18%; transform: translateX(-50%); font: 600 10px var(--mono); letter-spacing: .1em; color: rgba(255,255,255,.6); z-index: 3; white-space: nowrap; }
.flask.on .num { color: var(--gold); }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 60%, transparent 40%, rgba(0,0,0,.55)); }

.batch {
  position: absolute; right: 4vw; top: 50%; transform: translateY(-50%); width: min(470px, 42vw);
  display: grid; grid-template-columns: 1fr; gap: 16px; padding: 20px;
  background: rgba(250,242,226,.95); color: #1d140c; box-shadow: 0 30px 60px rgba(0,0,0,.5);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.batch .meta { font: 600 10px/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--rust); margin: 0 0 6px; }
.batch h2 { font: 400 clamp(26px, 3vw, 38px)/.95 var(--display); text-transform: uppercase; margin: 0 0 10px; }
.batch .why { font-size: 13px; line-height: 1.5; margin: 0 0 12px; color: #3b2a1a; }
.batch .stats { display: flex; gap: 16px; margin: 0 0 12px; padding: 10px 0; border-top: 1px dashed #b49a74; border-bottom: 1px dashed #b49a74; }
.batch .stats div { font: 400 24px/1 var(--display); }
.batch .stats small { display: block; font: 600 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #7a6148; margin-top: 4px; }
.batch ol { list-style: none; margin: 0; padding: 0; font: 500 12px/1.3 var(--mono); }
.batch li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.batch li a { text-decoration: none; border-bottom: 1px solid #c9b190; }
.batch li a:hover { color: var(--rust); }
.batch .all { display: inline-block; margin-top: 8px; font: 600 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rust); }
.batch .foot { margin: 6px 0 0; font: 500 9px var(--mono); color: #8a7258; }
.batch .enter { animation: batchIn .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes batchIn { from { opacity: 0; transform: translateY(14px); } }

/* reel panel: the reel being talked about plays beside the batch card */
.reel-panel {
  position: absolute; top: 50%; transform: translateY(-50%); right: calc(4vw + min(470px, 42vw) + 22px); width: min(300px, 22vw);
  padding: 10px; background: #0d0a07; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; opacity: 0; color: #f6ead2;
  box-shadow: 0 0 0 4px rgba(0,0,0,.35), 0 0 60px color-mix(in srgb, var(--c, #e9b44c) 35%, transparent);
}
.np { margin: 0 0 8px; font: 600 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; display: flex; align-items: center; gap: 7px; color: var(--c, #e9b44c); }
.np .dot { width: 7px; height: 7px; border-radius: 50%; background: #ff3b30; animation: blink 1s steps(2) infinite; }
.reel-screen { position: relative; width: 100%; aspect-ratio: 400 / 554; overflow: hidden; border-radius: 6px;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 4px), radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c, #e9b44c) 40%, transparent), #120d09 70%); }
.reel-screen::before { content: "loading reel…"; position: absolute; inset: 0; display: grid; place-items: center; font: 600 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,240,215,.6); }
.reel-screen.loaded::before { display: none; }
.reel-screen iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; opacity: 0; transition: opacity .4s; }
.reel-screen.loaded iframe { opacity: 1; }
.reel-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.np-title { margin: 8px 0 0; display: flex; justify-content: space-between; gap: 8px; font: 500 11px/1.3 var(--mono); }
.np-title a { color: var(--c, #e9b44c); white-space: nowrap; text-decoration: none; }
.batch li.now a { color: var(--rust); font-weight: 600; }
.batch li.now a::before { content: "▶ "; }

/* clip slot (placeholder or video) */
.clip { position: relative; aspect-ratio: 9/16; background: #15100b; overflow: hidden; color: rgba(255,240,215,.75); align-self: start; }
.clip video, .clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip .slot { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; padding: 10px; font: 600 9px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 4px), radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c, #e9b44c) 45%, transparent), transparent 70%); }
.clip .slot b { font: 400 30px var(--display); color: #fff; letter-spacing: 0; }
.clip .rec { position: absolute; top: 8px; left: 8px; font: 600 9px var(--mono); letter-spacing: .1em; display: flex; gap: 5px; align-items: center; }
.clip .rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff3b30; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 06 board */
.pins { position: absolute; inset: 0; }
.card {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%) rotate(var(--r)) translateY(var(--dy, -40px)); opacity: var(--o, 0);
  padding: 10px 14px 9px; background: #fbf5e6; color: #1a120b; font: 700 clamp(11px, 1.15vw, 17px)/1 var(--sans); letter-spacing: .02em; text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(0,0,0,.35); white-space: nowrap;
}
.card::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a7a, #b3261e); box-shadow: 0 2px 3px rgba(0,0,0,.4); }
.card.y { background: #f3d36b; } .card.b { background: #cfe3e6; }
.logo-card { display: grid; justify-items: center; align-content: center; gap: .35em; width: calc(var(--fw, 1440px) * .078); min-height: calc(var(--fw, 1440px) * .046);
  padding: .55em .6em .45em; white-space: normal; text-align: center; font: 700 calc(var(--fw, 1440px) * .0062)/1.1 var(--sans); letter-spacing: .02em; }
.logo-card img { display: block; max-width: 100%; max-height: calc(var(--fw, 1440px) * .024); width: auto; height: auto; object-fit: contain; }
.logo-card span { display: none; color: #4a3828; }
.logo-card.mark img { width: calc(var(--fw, 1440px) * .02); height: calc(var(--fw, 1440px) * .02); border-radius: 4px; }
.logo-card.mark span, .logo-card.noimg span { display: block; }
.logo-card.noimg span { font-size: 1.4em; color: #1a120b; }
.logo-card.tall img { max-height: calc(var(--fw, 1440px) * .032); }
.logo-card.thin img { max-height: calc(var(--fw, 1440px) * .014); }
.logo-card.dark { background: #1d1813; }
.logo-card.dark span { color: #f6ead2; }
.polaroid { padding: 8px 8px 26px; background: #fff; width: clamp(90px, 13%, 190px); white-space: normal; text-align: center; font: 600 10px var(--mono); letter-spacing: .1em; }
.polaroid img { width: 100%; aspect-ratio: 4/5; object-fit: cover; filter: grayscale(1) contrast(1.1); margin-bottom: 6px; }
.strings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.strings path { fill: none; stroke: #c4241b; stroke-width: .28; stroke-linecap: round; filter: drop-shadow(0 .3px .2px rgba(0,0,0,.4)); }

/* 07 desk screens */
.screen {
  position: absolute; overflow: hidden; border-radius: 10% / 14%; padding: .6em .8em;
  background: radial-gradient(ellipse at 50% 50%, #0f2f2b, #061513 80%); color: #8ff5d9;
  font: 500 calc(var(--fw, 1440px) * .0052)/1.3 var(--mono); text-shadow: 0 0 6px rgba(120,255,210,.6);
  box-shadow: inset 0 0 30px rgba(0,0,0,.8);
}
.screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px); pointer-events: none; }
.screen h3 { margin: 0 0 .5em; font: 600 1em var(--mono); color: #e9b44c; text-shadow: 0 0 6px rgba(233,180,76,.6); letter-spacing: .1em; }
.screen .big { font: 400 1.7em/1 var(--display); color: #dfffee; letter-spacing: .02em; }
.screen .row { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed rgba(143,245,217,.25); padding: .1em 0; }
.screen .step { opacity: .25; transition: opacity .3s; } .screen .step.on { opacity: 1; }
.screen .step.on::before { content: "▶ "; color: #e9b44c; }
.screen .clip { position: absolute; inset: 6%; aspect-ratio: auto; background: transparent; }
/* ashtray on the desk, between the mug and the power strip; the ember sits at 55% / 43% of ashtray.webp */
.ashtray { position: absolute; left: 67.2%; bottom: 40.6%; width: 5%; aspect-ratio: 871 / 589; }
.ashtray > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ember { position: absolute; left: 55.4%; top: 42.6%; width: 14%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,140,.95) 0 18%, rgba(255,110,30,.75) 38%, rgba(255,80,20,0) 70%); animation: ember 2.6s ease-in-out infinite; }
@keyframes ember { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.85); } 45% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } }
.wisp { position: absolute; left: 55.4%; top: 42.6%; width: 34%; aspect-ratio: 240 / 471; transform-origin: 50% 100%; pointer-events: none; opacity: 0; animation: wisp 6s linear infinite; }
.wisp img { position: absolute; left: -50%; bottom: 0; width: 100%; height: 100%; }
.wisp.w2 { animation-delay: -2s; } .wisp.w3 { animation-delay: -4s; }
@keyframes wisp {
  0% { opacity: 0; transform: translate(0, -96%) scale(.45, .5) rotate(4deg); }
  20% { opacity: .55; }
  70% { opacity: .3; }
  100% { opacity: 0; transform: translate(-18%, -150%) scale(1.1, 1.35) rotate(-6deg); }
}
.desk-readout { position: absolute; left: 4vw; bottom: 8%; max-width: 520px; opacity: 0; }
.desk-readout h2 { margin: 0 0 8px; font: 400 clamp(30px, 4vw, 54px)/.95 var(--display); text-transform: uppercase; }
.desk-readout p { margin: 0; font-size: 14px; line-height: 1.55; color: #f1e2c6; background: rgba(12,10,8,.6); padding: 10px 14px; }

/* 08 exit */
.stars { position: absolute; inset: 0 0 45% 0; pointer-events: none; background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 60%, #fff, transparent), radial-gradient(1px 1px at 85% 55%, #fff, transparent); background-size: 300px 220px; animation: twinkle 3s ease-in-out infinite alternate; opacity: .6; }
@keyframes twinkle { to { opacity: .15; } }
.exit { position: absolute; left: 0; right: 0; top: 12%; text-align: center; padding: 0 16px; opacity: 0; }
.exit h2 { margin: 0 0 24px; font: 400 clamp(44px, 7vw, 100px)/.9 var(--display); text-transform: uppercase; }
.links { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.links a { display: grid; gap: 4px; padding: 12px 18px; text-decoration: none; background: rgba(246,234,210,.95); color: #1b120a; font: 400 22px/1 var(--display); text-transform: uppercase; min-width: 190px; transition: transform .2s, background .2s; }
.links a:hover { transform: translateY(-3px); background: var(--gold); }
.links span { font: 600 10px var(--mono); letter-spacing: .12em; text-transform: none; color: #6b5438; }
.credits { margin-top: 18px; font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,245,225,.55); }
.noscript { position: fixed; inset: auto 16px 16px; z-index: 60; background: #000; padding: 12px; }

/* phone */
@media (max-width: 760px) {
  .hud-scene { display: none; }
  .hud-sound .lbl { display: none; }
  .hud-sound .bars { height: 14px; } .hud-sound .bars i { width: 3px; }
  .hud-nav { white-space: nowrap; }
  .hud-dots { gap: 4px; } .hud-dots button { width: 15px; height: 12px; background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) center / 100% 3px no-repeat; }
  .hud-dots button.on { background: linear-gradient(#fff, #fff) center / 100% 3px no-repeat; }
  .title { top: 14%; }
  .batch { left: 16px; right: 16px; top: auto; bottom: 16px; transform: none; width: auto; grid-template-columns: 1fr; gap: 12px; padding: 14px; max-height: 50svh; overflow: auto; }
  .reel-panel { top: 56px; right: 12px; transform: none; width: 46vw; padding: 7px; border-radius: 10px; }
  .np { font-size: 8px; margin-bottom: 5px; } .np-title { font-size: 9px; }
  .batch .why { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; }

  .batch .stats div { font-size: 20px; }
  .card { font-size: 10px; padding: 7px 9px 6px; }
  .tag { font-size: 10px; padding: 6px 9px; }
  .links a { min-width: 0; width: 100%; }
  .desk-readout { left: 16px; right: 16px; bottom: 6%; }
  .caption { bottom: 18%; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .dust, .grass, .scroll-cue b, .stars, .prompt, .flask .liquid::after, .ember { animation: none; }
  .wisp { animation: none; opacity: .3; transform: translate(0, -110%) scale(.8); }
}

/* 09 delivery: truck drops a parcel, parcel holds a dossier, the paper tears to show the CV */
.cvframe { --road: 16.5%; }
.truck { position: absolute; left: 105%; bottom: var(--road); width: 27%; aspect-ratio: 1272 / 711; pointer-events: none; }
.truck img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.truck .beam { position: absolute; right: 96%; bottom: 18%; width: 70%; height: 36%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 100% 50%, rgba(255,226,160,.45), rgba(255,200,110,.12) 45%, rgba(255,190,90,0) 70%); mix-blend-mode: screen; }
.parcel { position: absolute; left: 60.5%; bottom: calc(var(--road) - 1%); width: 9.5%; aspect-ratio: 1; opacity: 0; pointer-events: none; }
.parcel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transition: opacity .35s; }
.parcel .po { opacity: 0; }
.opened-parcel .parcel .po { opacity: 1; } .opened-parcel .parcel .pc { opacity: 0; }

.cv-intro { position: absolute; left: 0; right: 0; top: 13%; padding: 0 16px; text-align: center; opacity: 0; transition: transform .5s ease; }
.cv-intro h2 { margin: 0 0 26px; font: 400 clamp(44px, 7vw, 100px)/.9 var(--display); text-transform: uppercase; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.deliver { display: inline-flex; align-items: center; gap: 14px; padding: 16px 24px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--gold); color: #1b120a; font: 400 24px/1 var(--display); text-transform: uppercase; letter-spacing: .02em;
  box-shadow: 6px 6px 0 var(--rust); transition: transform .2s, box-shadow .2s; }
.deliver:hover { transform: translate(2px, -3px); box-shadow: 8px 9px 0 var(--rust); }
.deliver:focus-visible, .cv-again:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.cv-plain { display: block; width: max-content; margin: 18px auto 0; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,245,225,.75); }
.cv-busy .cv-intro { opacity: 0 !important; transform: translateY(-30px); pointer-events: none; }
.cv-prompt { transition: opacity .3s; animation: none; }
.cv-prompt.show { opacity: 1; animation: ping 1.8s ease-out infinite; }
.cv-prompt:not(.show) { pointer-events: none; }
.dossier-on .cv-prompt { bottom: max(16px, 3%); }

.dossier { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,.25), rgba(0,0,0,.72)); transition: opacity .5s; }
.dossier-on .dossier { opacity: 1; pointer-events: auto; }
.folder { --w: min(440px, 82vw, calc((var(--vh) - 150px) * .7076)); position: relative; width: var(--w); aspect-ratio: 1055 / 1491;
  transform: translateY(40vh) scale(.25) rotate(-8deg); transition: transform .8s cubic-bezier(.2,1.25,.35,1); }
.dossier-on .folder { transform: none; }
.folder-back { position: absolute; inset: -5% -4% -3%; background: #b98d4f; border-radius: 6px; box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.folder-back::before { content: ""; position: absolute; left: 6%; top: -4%; width: 34%; height: 6%; background: #b98d4f; border-radius: 6px 6px 0 0; }
.folder-front { position: absolute; inset: -2% -4% -3%; background: linear-gradient(170deg, #e0b878, #c99a58); border-radius: 4px 4px 6px 6px;
  display: grid; align-content: center; justify-items: center; gap: 18px; text-align: center; color: #4a3317;
  transform-origin: 50% 100%; transition: transform .9s cubic-bezier(.5,0,.3,1), opacity .9s; box-shadow: 0 -2px 0 rgba(255,255,255,.25) inset; }
.folder-front .tab { position: absolute; left: 7%; top: 5%; font: 600 12px var(--mono); letter-spacing: .14em; }
.folder-front p { margin: 0; font: 500 12px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.stamp { display: inline-block; padding: .25em .5em; border: 4px double #b3261e; color: #b3261e; font: 400 clamp(26px, 4.2vw, 44px)/1 var(--display);
  text-transform: uppercase; letter-spacing: .06em; transform: rotate(-9deg); opacity: .85; mix-blend-mode: multiply; }
.package-open .folder-front { transform: translateY(105%) rotate(6deg); opacity: 0; pointer-events: none; }

.sheet { position: absolute; inset: 0; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.sheet:active { cursor: grabbing; }
.cv-under { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.half { position: absolute; inset: 0; transform-origin: 50% 100%; will-change: transform; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.half .paper { position: absolute; inset: 0; background: #f3ead6; background-image: repeating-linear-gradient(transparent 0 27px, rgba(80,110,160,.18) 27px 28px);
  display: grid; align-content: start; justify-items: center; padding: 18% 10% 0; gap: 26px; }
.half .paper .stamp { font-size: clamp(30px, 5vw, 52px); }
.memo { margin: 0; width: 100%; font: 600 12px/2.3 var(--mono); letter-spacing: .12em; color: #2c241a; }
.tear-hint { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); width: max-content; max-width: 90%; margin: 0; padding: 9px 13px;
  background: #1b120a; color: #fff6e2; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; opacity: 0; transition: opacity .4s; pointer-events: none; }
.package-open .tear-hint { opacity: 1; }
.torn .tear-hint { opacity: 0; }

.cv-view { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: rgba(8,6,4,.86); }
.cv-scroll { overflow: auto; overscroll-behavior: contain; padding: max(64px, 8vh) 16px 20px; }
.cv-scroll img { width: min(760px, 100%); height: auto; margin: 0 auto; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.cv-view.pop .cv-scroll img { animation: cvpop .7s cubic-bezier(.2,1.3,.35,1) both; }
@keyframes cvpop { from { transform: scale(.55) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cv-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 14px 16px max(16px, env(safe-area-inset-bottom)); background: #120d09; border-top: 1px solid rgba(255,255,255,.12); }
.cv-actions .deliver { font-size: 20px; padding: 13px 20px; box-shadow: 4px 4px 0 var(--rust); }
.cv-again { padding: 13px 20px; border: 1px solid rgba(255,245,225,.4); background: transparent; color: var(--paper); cursor: pointer; font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 759px) {
  .truck { width: 30%; } .parcel { width: 10%; }
  .deliver { font-size: 21px; padding: 14px 20px; }
  .memo { font-size: 10px; line-height: 2.1; }
}
@media (prefers-reduced-motion: reduce) { .folder, .folder-front { transition-duration: .01s; } .cv-view.pop .cv-scroll img { animation: none; } }
.cv-view[hidden] { display: none; }
.cv-prompt { bottom: 7%; z-index: 3; }
.dossier { z-index: 2; }
