/* Loose Nuts. One world, three surfaces: the TV (a garage seen from the sofa), the phone (a controller), the front door.
   Everything on screen is a thing from the workshop: enamel plates bolted on, job sheets on clipboards, masking tape
   with marker on it, a red roller door for the cuts. On the TV one rem is 1/108 of the screen height (html.tv), so
   a size of 2.2rem is 22 px on a 1080p set and nothing a player has to read is smaller than that. */
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-800-latin.woff2') format('woff2'); }

:root {
  --ink: #20262b; --steel: #3b4046; --chrome: #cfd3d6;
  --paper: #f3ecd9; --slip: #fffaf0; --cream: #efe6d2; --pencil: #58544a;
  --door: #b53a2a; --amber: #e3a21a; --marker: #f2c64a; --teal: #1fa39a; --wall: #205f5b;
  --wood: #b98a55; --wood-d: #8c6238; --lime: #9be870; --hazard: #e3b21a; --tape: #e6d9a8; --ok: #25783f; --no: #a32a1a;
  --mist: #d5e6e1;
  --out: cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #9aa1a8 transparent; scrollbar-width: thin; }
html.tv { font-size: min(calc(100vh / 108), calc(100vw / 192)); height: 100%; overflow: hidden; }
body { margin: 0; font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 600; color: var(--cream); background: var(--ink);
  -webkit-tap-highlight-color: transparent; caret-color: var(--door); }
::selection { background: var(--marker); color: var(--ink); }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; }
button { font: inherit; color: inherit; }
/* the corrugated wall of the garage, late afternoon */
body.is-home, body.is-phone {
  background-color: var(--wall);
  background-image: radial-gradient(120% 55% at 85% 0%, rgba(255, 210, 130, 0.17), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 3px, transparent 3px 13px, rgba(0, 0, 0, 0.15) 13px 17px, transparent 17px 26px);
  background-attachment: fixed;
}
/* before the script has drawn anything the door is simply shut */
#app:empty { position: fixed; inset: 0; background: var(--door) repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0 5px, transparent 5px 24px, rgba(0, 0, 0, 0.2) 24px 30px, transparent 30px 42px); }

/* ---- shared pieces ---- */
.ic { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.14em; }
.pt { display: block; flex: none; width: 3em; height: 3em; border-radius: 50%; object-fit: cover; background: var(--c, #9aa1a8); box-shadow: 0 0 0 0.12em var(--paper), 0 0 0 0.2em var(--ink); }
.stars { display: inline-flex; gap: 0.06em; }
.stars .ic.on { fill: var(--amber); stroke: #86580a; }
.stars .ic.off { fill: none; stroke: #9a927f; }
.dn { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0.14em 0.5em 0.2em; border-radius: 0.24em; background: var(--door); color: var(--cream);
  font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dn:not(.ico)::before { content: 'Day\00a0'; }
.dn.ico { padding: 0.2em 0.34em; }

/* the sign over the door: enamel on steel, four bolts, and one of the two nuts is working loose */
.logo { position: relative; display: inline-grid; justify-items: center; font-size: 64px; line-height: 0.84; padding: 0.3em 0.52em 0.26em; border-radius: 0.14em;
  background: var(--door); color: var(--cream); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; transform: rotate(-1.5deg);
  box-shadow: inset 0 0 0 0.05em var(--door), inset 0 0 0 0.08em var(--cream), inset 0 0.16em 0.24em rgba(255, 255, 255, 0.13), 0 0.1em 0.3em rgba(8, 12, 14, 0.5); }
.lg1 { display: flex; align-items: baseline; text-shadow: 0 0.03em 0 rgba(0, 0, 0, 0.25); }
.nut { width: 0.7em; height: 0.7em; margin: 0 0.03em; fill: currentColor; filter: drop-shadow(0 0.03em 0 rgba(0, 0, 0, 0.25)); }
.nut circle { stroke: rgba(32, 38, 43, 0.3); }
.n2 { transform: translateY(0.06em) rotate(24deg); animation: loosen 6s var(--out) infinite; }
.lg2 { font-size: 1.62em; letter-spacing: 0.03em; color: var(--marker); text-shadow: 0 0.03em 0 rgba(0, 0, 0, 0.28); }
.lg3 { margin-top: 0.7em; padding: 0.42em 1.2em 0.5em; border-radius: 99em; background: var(--ink); color: var(--cream); font-size: 0.25em; font-weight: 700; line-height: 1; letter-spacing: 0.3em; }
.bolt { position: absolute; width: 0.085em; height: 0.085em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f5f5f2, #9aa1a8 62%, #5d646a); box-shadow: 0 0.012em 0.03em rgba(0, 0, 0, 0.55); }
.b1 { left: 0.13em; top: 0.13em; } .b2 { right: 0.13em; top: 0.13em; } .b3 { left: 0.13em; bottom: 0.13em; } .b4 { right: 0.13em; bottom: 0.13em; }
/* a hex nut looks the same after a sixth of a turn, so the loop has no seam */
@keyframes loosen { 0%, 72% { transform: translateY(0.06em) rotate(24deg); } 100% { transform: translateY(0.06em) rotate(84deg); } }

.clip { position: absolute; left: 50%; top: -2.4em; width: 13em; height: 4.2em; transform: translateX(-50%); font-size: 10px; border-radius: 0.8em 0.8em 0.4em 0.4em;
  background: linear-gradient(#e6e9eb, #aab0b6 46%, #d2d6d9 56%, #8b9298); box-shadow: 0 0.3em 0.7em rgba(8, 12, 14, 0.45); }
.clip::after { content: ''; position: absolute; left: 50%; top: 0.9em; width: 1.5em; height: 1.5em; margin-left: -0.75em; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0.2em 0.3em rgba(0, 0, 0, 0.6); }
.is-tv .clip { font-size: 1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 9px 20px 11px; border: 0; border-radius: 10px; cursor: pointer;
  font-weight: 800; font-size: 20px; line-height: 1.05; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; color: var(--ink); background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3.5px rgba(32, 38, 43, 0.5), 0 4px 10px rgba(8, 12, 14, 0.38);
  transition: transform 0.14s var(--out), filter 0.14s var(--out); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.btn .ic { font-size: 1.3em; }
.btn.go { background: var(--amber); box-shadow: inset 0 0 0 2px var(--amber), inset 0 0 0 3.5px rgba(32, 38, 43, 0.5), 0 4px 10px rgba(8, 12, 14, 0.38); }
.btn.ghost { background: rgba(16, 20, 23, 0.35); color: var(--cream); box-shadow: inset 0 0 0 2px rgba(239, 230, 210, 0.6); }
.btn.sm { min-height: 46px; font-size: 17px; align-self: center; }
.btn.big { min-height: 76px; font-size: 24px; justify-content: flex-start; padding-left: 22px; }
.btn span i { display: block; font-style: normal; font-weight: 600; font-size: 0.72em; letter-spacing: 0.01em; text-transform: none; }
.btn:active { transform: translateY(2px) scale(0.985); filter: brightness(0.94); }
.btn:disabled { opacity: 0.55; cursor: default; }
@media (hover: hover) { .btn:hover:not(:disabled) { filter: brightness(1.06); } }

.conn { position: fixed; left: 50%; top: 10px; z-index: 90; transform: translateX(-50%); padding: 6px 18px 8px; border-radius: 6px; background: var(--hazard); color: var(--ink);
  font-weight: 800; font-size: 18px; white-space: nowrap; box-shadow: 0 4px 12px rgba(8, 12, 14, 0.45); }
.is-tv .conn { top: 9rem; padding: 0.8rem 2.6rem 1rem; border-radius: 0.8rem; font-size: 3rem; }

/* ---- the front door ---- */
.home { min-height: 100vh; min-height: 100dvh; }
.hm-art { position: relative; }
.hm-key { display: block; width: 100%; height: min(44vh, 58vw); object-fit: cover; object-position: 50% 26%; }
.hm-art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: linear-gradient(transparent, rgba(8, 12, 14, 0.55)); }
.hm-art .logo { position: absolute; left: 50%; bottom: -0.62em; z-index: 1; transform: translateX(-50%) rotate(-1.5deg); font-size: clamp(46px, 12.5vw, 88px); }
.hm-body { display: grid; gap: 26px; width: 100%; max-width: 1060px; margin: 0 auto; padding: 70px 18px calc(30px + env(safe-area-inset-bottom)); }
.hm-tag { margin: 0; font-size: clamp(23px, 5.8vw, 32px); font-weight: 700; line-height: 1.14; text-wrap: balance; }
.hm-facts { margin: 10px 0 0; max-width: 44ch; font-size: 19px; line-height: 1.32; color: var(--mist); }
.hm-join { position: relative; display: grid; gap: 4px; margin: 14px 10px 4px; padding: 36px 22px 22px; border: 10px solid var(--wood); border-radius: 12px; color: var(--ink);
  background: var(--paper) repeating-linear-gradient(transparent 0 33px, rgba(47, 111, 181, 0.12) 33px 34px); box-shadow: 0 0 0 1px var(--wood-d), 0 14px 28px rgba(8, 12, 14, 0.45); transform: rotate(0.5deg); }
.hm-join h1 { margin: 0 0 6px; font-size: 38px; font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: 0.03em; }
.hm-join label { margin-top: 8px; font-size: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pencil); }
.hm-join input { width: 100%; min-height: 54px; padding: 6px 12px 8px; border: 0; border-bottom: 3px solid var(--ink); border-radius: 6px 6px 0 0; background: rgba(32, 38, 43, 0.07);
  font: inherit; font-weight: 800; font-size: 28px; color: var(--ink); }
.hm-join input::placeholder { color: #6f6a5d; font-weight: 600; letter-spacing: 0.02em; }
.hm-join input:focus-visible { outline: 3px solid var(--door); outline-offset: 2px; }
#code { letter-spacing: 0.3em; text-transform: uppercase; }
.hm-err { min-height: 24px; margin: 6px 0 4px; font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--no); }
.hm-host { display: grid; gap: 10px; justify-items: start; }
.hm-host h2 { margin: 0; font-size: 28px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.hm-host p { margin: 0 0 8px; max-width: 42ch; font-size: 18px; line-height: 1.3; color: var(--mist); }
.hm-host .btn { min-width: min(100%, 300px); }
@media (min-width: 880px) {
  .hm-key { height: min(60vh, 42vw); object-position: 50% 12%; }
  .hm-art .logo { left: max(18px, calc(50% - 512px)); bottom: -0.5em; transform: rotate(-2deg); transform-origin: 0 100%; font-size: clamp(60px, 6.2vw, 90px); }
  .hm-body { grid-template-columns: 1.05fr 0.95fr; grid-template-areas: 'pitch join' 'host join' 'chip chip'; column-gap: 56px; padding-top: 96px; align-items: start; }
  .hm-pitch { grid-area: pitch; } .hm-join { grid-area: join; margin-top: 4px; } .hm-host { grid-area: host; } .hm-chip { grid-area: chip; }
}

/* ---- the phone between shifts: the captain's remote ---- */
.ph { min-height: 100vh; min-height: 100dvh; }
.mn { display: flex; flex-direction: column; gap: 14px; min-height: 100vh; min-height: 100dvh; max-width: 580px; margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.mh { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border-radius: 12px; background: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3.5px rgba(239, 230, 210, 0.38), 0 5px 14px rgba(8, 12, 14, 0.4); }
.mh .pt { font-size: 17px; }
.mi { display: grid; flex: 1; min-width: 0; }
.mi b { overflow: hidden; font-size: 25px; font-weight: 800; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.mi span { font-size: 16px; line-height: 1.15; color: #c9d1d4; }
.rc { display: grid; justify-items: end; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #c9d1d4; }
.rc b { font-size: 25px; font-weight: 800; line-height: 1; letter-spacing: 0.14em; color: var(--marker); }
.mb { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 12px; }
.mf { position: sticky; bottom: 0; display: flex; gap: 10px; margin-top: auto; padding: 14px 0 4px; background: linear-gradient(transparent, var(--wall) 34%); }
.mf .btn { flex: 1; }
.mf .btn.go { flex: 1.6; }
.mf.wrap { flex-wrap: wrap; }
.mf.wrap .btn.go { flex: 1 1 100%; }
.wait { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.1; text-align: center; text-transform: uppercase; letter-spacing: 0.02em; text-wrap: balance; }
.look, .turn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font-size: 19px; color: var(--mist); }
.look .ic, .turn .ic { font-size: 24px; }
.look { gap: 12px; font-size: 25px; font-weight: 700; color: var(--cream); }
.look .ic { font-size: 34px; }
.turn { font-weight: 700; color: var(--marker); }
.warn { display: grid; gap: 10px; padding: 12px 16px 14px; border-radius: 10px; background: var(--hazard); color: var(--ink); font-size: 18px; line-height: 1.25; }
.warn p { margin: 0; }
.warn b { font-weight: 800; word-break: break-all; }
.mates { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mates li { display: flex; align-items: center; gap: 9px; padding: 5px 16px 5px 6px; border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 19px; font-weight: 700; }
.mates .pt { font-size: 11px; }
.alone { margin: 0; font-size: 18px; text-align: center; color: var(--mist); }
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 9px 14px 11px; border: 0; border-radius: 8px; cursor: pointer; text-align: left;
  background: var(--paper); color: var(--ink); box-shadow: 0 3px 9px rgba(8, 12, 14, 0.32); transition: transform 0.14s var(--out); }
.row .dn { font-size: 17px; }
.rt { display: grid; flex: 1; min-width: 0; }
.rt b { font-size: 22px; font-weight: 800; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.02em; }
.rt i { font-style: normal; font-size: 16px; line-height: 1.15; color: var(--pencil); }
.rt i:empty { display: none; }
.row .stars { font-size: 22px; }
.row .lk { font-size: 24px; color: var(--pencil); }
.row.sel { background: var(--marker); box-shadow: inset 0 0 0 3px var(--ink), 0 3px 9px rgba(8, 12, 14, 0.32); }
.row.sel .rt i { color: var(--ink); }
.row:disabled { cursor: default; background: #cfc8b6; }
.row:disabled .dn { background: #6f6a5d; }
.row:active:not(:disabled) { transform: scale(0.985); }
.ph .segs { display: flex; gap: 5px; padding: 5px; border-radius: 12px; background: rgba(8, 12, 14, 0.34); }
.ph .segs button { flex: 1; min-height: 48px; padding: 4px 6px 6px; border: 0; border-radius: 8px; cursor: pointer; background: transparent; color: var(--cream); font-weight: 700; font-size: 18px; line-height: 1.05; }
.ph .segs button.sel { background: var(--paper); color: var(--ink); font-weight: 800; box-shadow: 0 2px 7px rgba(8, 12, 14, 0.4); }
.how { display: grid; gap: 9px; }
.hw { display: flex; align-items: center; gap: 13px; padding: 9px 16px 11px 11px; border-radius: 10px; background: var(--paper); color: var(--ink); }
.hk { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; font-size: 25px; font-weight: 800; line-height: 1; }
.hk.ha { background: var(--amber); } .hk.hb { background: var(--teal); } .hk.hs { background: var(--ink); color: var(--cream); }
.hw p { margin: 0; font-size: 17px; line-height: 1.2; color: var(--pencil); }
.hw p b { display: block; font-size: 22px; font-weight: 800; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); }
.res { display: grid; justify-items: center; gap: 6px; padding: 18px 16px; border-radius: 10px; background: var(--paper); color: var(--ink); text-align: center; }
.stars.big { font-size: 50px; }
.rs { margin: 0; font-size: 20px; color: var(--pencil); }
.rs b { margin-right: 6px; font-size: 44px; font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.aw { display: flex; align-items: center; gap: 9px; margin: 6px 0 0; font-size: 17px; line-height: 1.15; text-align: left; color: var(--pencil); }
.aw .ic { font-size: 28px; fill: var(--amber); stroke: #86580a; }
.aw b { display: block; font-size: 20px; font-weight: 800; text-transform: uppercase; color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30; transform: translateX(-50%); padding: 10px 18px 12px; border-radius: 8px; background: var(--ink);
  color: var(--cream); font-size: 18px; white-space: nowrap; box-shadow: 0 5px 14px rgba(8, 12, 14, 0.5); }

/* ---- the phone in a shift: a steel tray with a stick and two buttons. Sizes hang off the pad itself (cqh), so the
   same rules hold when an upright phone gets the pad drawn a quarter turn round ---- */
.ph.play { position: fixed; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pad { position: absolute; inset: 0; overflow: hidden; container-type: size; touch-action: none; background-color: #262c31;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 6px, transparent 6px 24px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 0 6px, transparent 6px 24px); }
.ph.rot .pad { inset: auto; left: 100vw; top: 0; width: 100vh; width: 100dvh; height: 100vw; transform-origin: 0 0; transform: rotate(90deg); }
.pbar { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 10px 0 12px; background: var(--ink); box-shadow: 0 3px 10px rgba(8, 12, 14, 0.45); }
.who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.who .pt { font-size: 12px; }
.who b { overflow: hidden; max-width: 9ch; font-size: 20px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hold { display: flex; flex: 1; align-items: center; justify-content: center; gap: 9px; min-width: 0; }
.hi { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 8px; background: rgba(239, 230, 210, 0.13); font-size: 23px; }
.hn { font-size: 19px; font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; color: #b4bcc0; }
.hold.has .hi { background: var(--paper); color: var(--ink); }
.hold.has .hn { font-weight: 800; color: var(--cream); }
.note { overflow: hidden; min-width: 0; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; color: var(--marker); }
.stat { display: flex; gap: 13px; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { display: flex; align-items: center; gap: 5px; }
.sc .ic { color: var(--marker); }
.tm.hot { color: #ff9279; }
.pz { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9px; cursor: pointer; background: rgba(239, 230, 210, 0.13); font-size: 24px; }
.zone { position: absolute; left: 0; top: 52px; bottom: 0; width: 52%; touch-action: none; }
.zone::before { content: ''; position: absolute; left: 50%; top: 50%; width: 150px; width: min(48cqh, 180px); aspect-ratio: 1; border: 3px dashed rgba(239, 230, 210, 0.3); border-radius: 50%;
  transform: translate(-50%, -50%); transition: opacity 0.2s; }
.zl { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 18px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(239, 230, 210, 0.66); transition: opacity 0.2s; }
.zone.on::before, .zone.on .zl { opacity: 0; }
.ring { position: absolute; left: 0; top: 0; width: 136px; height: 136px; margin: -68px 0 0 -68px; border-radius: 50%; pointer-events: none; background: rgba(8, 12, 14, 0.5); box-shadow: inset 0 0 0 3px rgba(239, 230, 210, 0.5); }
.ring i { position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f8f2e2, #cbc2a9 72%); box-shadow: 0 4px 10px rgba(8, 12, 14, 0.55); }
.btns { position: absolute; right: 0; top: 52px; bottom: 0; width: 48%; }
.ba, .bb { position: absolute; display: grid; place-content: center; justify-items: center; gap: 2px; padding: 8px; border: 0; border-radius: 50%; cursor: pointer; text-align: center; color: var(--ink);
  touch-action: none; transition: transform 0.09s var(--out), filter 0.09s var(--out); }
.ba { right: 18px; bottom: 16px; bottom: 5cqh; width: 160px; width: min(48cqh, 200px); aspect-ratio: 1; background: var(--amber);
  box-shadow: inset 0 0 0 3px var(--amber), inset 0 0 0 5.5px rgba(32, 38, 43, 0.42), 0 7px 16px rgba(8, 12, 14, 0.55); }
.bb { right: 168px; right: calc(18px + min(44cqh, 184px)); bottom: 120px; bottom: 36cqh; width: 124px; width: min(38cqh, 158px); aspect-ratio: 1; background: var(--teal);
  box-shadow: inset 0 0 0 3px var(--teal), inset 0 0 0 5.5px rgba(32, 38, 43, 0.42), 0 7px 16px rgba(8, 12, 14, 0.55); }
.ba b, .bb b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--ink); font-size: 17px; font-weight: 800; line-height: 1; }
.ba b { color: var(--marker); } .bb b { color: #6fe0d6; }
.ba span, .bb span { max-width: 8.5ch; font-size: 21px; font-size: clamp(19px, 6.6cqh, 27px); font-weight: 800; line-height: 0.98; text-transform: uppercase; letter-spacing: 0.02em; text-wrap: balance; }
.ba em, .bb em { font-style: normal; font-size: 15px; font-weight: 700; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase; }
.ba.pr, .bb.pr { transform: translateY(3px) scale(0.95); filter: brightness(0.88); }
.ba.off { background: #8a7a55; color: #2a2f33; }
.ba.off span { font-size: clamp(16px, 5.4cqh, 22px); }
.ba.off em { visibility: hidden; }
.ouch { position: absolute; left: 50%; top: 56%; z-index: 4; padding: 2px 34px 8px; border-block: 12px solid; border-image: repeating-linear-gradient(-45deg, #20262b 0 12px, #e3b21a 12px 24px) 12;
  background: var(--hazard); color: var(--ink); font-size: 60px; font-weight: 800; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-4deg); animation: ouch 0.45s var(--out); }
.pov { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 12px; background: rgba(16, 20, 23, 0.92); }
.pcard { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 10px; max-width: 760px; }
.pcard h2 { flex: 1 0 100%; margin: 0 0 6px; font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: 0.06em; text-align: center; text-transform: uppercase; color: var(--marker); }
@keyframes ouch { from { opacity: 0; transform: translate(-50%, -50%) rotate(-4deg) scale(1.5); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-4deg) scale(1); } }

/* ---- the big screen ---- */
body.is-tv { height: 100%; overflow: hidden; background: #14181b; }
.stage { position: fixed; inset: 0; display: block; width: 100%; height: 100%; transition: opacity 0.18s linear; }
.stage.dip { opacity: 0; }
.tags, .tix, .pops, .bubw { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.tags { z-index: 2; } .tix { z-index: 3; } .bubw, .pops { z-index: 5; }
.tags > div, .tix > div, .pop { position: absolute; left: 0; top: 0; will-change: transform; }

/* the plates along the top: which day, the clock, the till */
.hud { position: fixed; left: 2.4rem; right: 2.4rem; top: 1.5rem; z-index: 4; display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.pl { display: flex; align-items: center; gap: 1.1rem; height: 5.6rem; padding: 0 2rem 0.2rem; border-radius: 0.9rem; background: var(--ink); color: var(--cream);
  font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap;
  box-shadow: inset 0 0 0 0.25rem var(--ink), inset 0 0 0 0.44rem rgba(239, 230, 210, 0.42), 0 0.5rem 1.3rem rgba(8, 12, 14, 0.5); }
.pl-day { padding-left: 1rem; background: var(--cream); color: var(--ink); box-shadow: inset 0 0 0 0.25rem var(--cream), inset 0 0 0 0.44rem rgba(32, 38, 43, 0.45), 0 0.5rem 1.3rem rgba(8, 12, 14, 0.5); }
.pl-day .dn { font-size: 2.6rem; }
.pl-clock { position: absolute; left: 50%; justify-content: center; min-width: 18rem; font-size: 4rem; font-variant-numeric: tabular-nums; transform: translateX(-50%); }
.pl-clock.hot { background: var(--door); animation: hot 1s ease-in-out infinite; }
.pl-cash { font-size: 4rem; font-variant-numeric: tabular-nums; }
.pl-cash .ic { color: var(--marker); }
.combo { padding: 0.1rem 0.9rem 0.3rem; border-radius: 0.5rem; background: var(--marker); color: var(--ink); font-style: normal; font-size: 2.8rem; }
.combo:empty { display: none; }
.pl-cash.bump { animation: bump 0.45s var(--out); }
@keyframes hot { 50% { transform: translateX(-50%) scale(1.07); } }
@keyframes bump { 30% { transform: scale(1.14); } }

/* a job ticket hangs over each bay: who is waiting, how patient they are, what the car needs */
.tk { position: absolute; left: 0; top: 0; width: 25rem; padding: 2.3rem 1.4rem 1.4rem; border-radius: 0.5rem; color: var(--ink); transform: translate(-50%, 0) rotate(var(--r, 0deg)); transform-origin: 50% 0;
  background: var(--paper) repeating-linear-gradient(transparent 0 3.5rem, rgba(47, 111, 181, 0.12) 3.5rem 3.6rem); box-shadow: 0 0.5rem 1.4rem rgba(8, 12, 14, 0.5); }
.tk-clip { position: absolute; left: 50%; top: -1.2rem; width: 8.4rem; height: 2.7rem; border-radius: 0.6rem 0.6rem 0.3rem 0.3rem; transform: translateX(-50%);
  background: linear-gradient(#e6e9eb, #aab0b6 46%, #d2d6d9 56%, #8b9298); box-shadow: 0 0.2rem 0.5rem rgba(8, 12, 14, 0.45); }
.tk-top { display: flex; align-items: center; gap: 1rem; }
.tk-top .pt { font-size: 1.5rem; }
.tk-top b { overflow: hidden; font-size: 2.8rem; font-weight: 800; line-height: 1; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.tk-pat, .tk-scan { overflow: hidden; height: 1.1rem; margin: 1rem 0 0.9rem; border-radius: 0.55rem; background: rgba(32, 38, 43, 0.2); }
.tk-pat i, .tk-scan i { display: block; height: 100%; background: var(--ok); transform-origin: 0 50%; transition: transform 0.3s linear; }
.tk-scan { margin-bottom: 0; }
.tk-scan i { background: var(--teal); transform: scaleX(0); }
.tk.hot .tk-pat i { background: var(--door); }
.tk.hot { animation: fret 0.45s ease-in-out infinite; }
.tk-jobs { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.tk-jobs li { display: flex; align-items: center; gap: 0.8rem; border-radius: 0.4rem; font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.tk-jobs li > .ic { font-size: 2.8rem; }
.tk-jobs li > span:first-of-type { flex: 1; }
.pips { display: flex; flex: none; gap: 0.4rem; }
.pips i { width: 1.2rem; height: 1.2rem; border-radius: 50%; box-shadow: inset 0 0 0 0.24rem var(--ink); }
.pips i.on { background: var(--ink); }
.tk-jobs li.done { color: #68645a; }
.tk-jobs li.done > span:first-of-type { text-decoration: line-through; text-decoration-thickness: 0.22rem; }
.tk-jobs li.done .ok { font-size: 2.8rem; stroke-width: 3; color: var(--ok); }
.tk-jobs li.fresh { animation: fresh 0.9s var(--out); }
.tk-unk { display: flex; align-items: center; gap: 0.8rem; font-size: 2.4rem; font-weight: 700; }
.tk-unk .ic { font-size: 2.8rem; }
.stamp { position: absolute; right: 1rem; bottom: 0.9rem; padding: 0 1.2rem 0.3rem; border: 0.42rem solid; border-radius: 0.7rem; background: rgba(243, 236, 217, 0.9);
  font-size: 3.6rem; font-weight: 800; line-height: 1.05; letter-spacing: 0.08em; text-transform: uppercase; transform: rotate(-12deg); animation: stamp 0.35s var(--out) both; }
.stamp.paid { color: var(--ok); } .stamp.gone { color: var(--no); }
@keyframes fret { 0%, 100% { transform: translate(-50%, 0) rotate(calc(var(--r, 0deg) - 1.3deg)); } 50% { transform: translate(-50%, 0) rotate(calc(var(--r, 0deg) + 1.3deg)); } }
@keyframes fresh { from { background: var(--marker); } to { background: transparent; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(2.2); } to { opacity: 1; transform: rotate(-12deg) scale(1); } }

/* what the car wants next, pinned where the work is: amber = tap A, teal = hold B, steel = wait. The ring is how far along */
.chip { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 5.6rem; height: 5.6rem; margin: -2.8rem 0 0 -2.8rem; border-radius: 50%;
  background: var(--paper); color: var(--ink); font-size: 3.5rem; box-shadow: 0 0.4rem 1rem rgba(8, 12, 14, 0.55); }
.chip.ka { background: var(--amber); animation: nudge 1.1s ease-in-out infinite; }
.chip.kb { background: var(--teal); }
.chip.kw { background: var(--steel); color: var(--cream); }
.chip.sm { width: 4.6rem; height: 4.6rem; margin: -2.3rem 0 0 -2.3rem; font-size: 2.8rem; }
.chip .ring { position: absolute; inset: -0.75rem; width: auto; height: auto; margin: 0; border-radius: 50%; background: conic-gradient(var(--lime) calc(var(--p, 0) * 1turn), rgba(8, 12, 14, 0.6) 0); box-shadow: none;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 0.75rem), #000 calc(100% - 0.7rem)); mask: radial-gradient(farthest-side, transparent calc(100% - 0.75rem), #000 calc(100% - 0.7rem)); }
.chip.ka .ring { display: none; }
.chip.ka::after, .chip.kb::after { position: absolute; right: -1.1rem; bottom: -1.1rem; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; padding-bottom: 0.2rem; border-radius: 50%;
  background: var(--ink); font-size: 2.2rem; font-weight: 800; line-height: 1; }
.chip.ka::after { content: 'A'; color: var(--marker); }
.chip.kb::after { content: 'B'; color: #6fe0d6; }
.bdg { position: absolute; right: -1.1rem; top: -1.1rem; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 2rem; box-shadow: 0 0 0 0.22rem var(--ink); }
@keyframes nudge { 50% { transform: translateY(-0.5rem); } }
.nt { position: absolute; left: 0; top: 0; padding: 0 1.1rem 0.2rem; border-bottom: 0.45rem solid var(--c, var(--chrome)); border-radius: 0.5rem; background: var(--ink); color: var(--cream);
  font-size: 2.2rem; font-weight: 800; line-height: 1.25; letter-spacing: 0.03em; white-space: nowrap; transform: translate(-50%, -100%); box-shadow: 0 0.2rem 0.7rem rgba(8, 12, 14, 0.5); }

.pop b { position: absolute; left: 0; top: 0; padding: 0 1.2rem 0.3rem; border-radius: 0.6rem; background: var(--ink); color: var(--cream); font-size: 3.6rem; font-weight: 800; line-height: 1.15; white-space: nowrap;
  box-shadow: 0 0.4rem 1rem rgba(8, 12, 14, 0.5); animation: pop 1.35s var(--out) forwards; }
.pop b.good { color: var(--lime); }
.pop b.no { background: var(--door); font-size: 3rem; }
.pop b.pay { background: var(--marker); color: var(--ink); font-size: 5.2rem; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -20%) scale(0.6); } 14% { opacity: 1; transform: translate(-50%, -70%) scale(1.08); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -210%) scale(1); } }
.bub { position: absolute; left: 0; top: 0; width: max-content; max-width: 42rem; padding: 1rem 1.9rem 1.3rem; border-radius: 1.6rem; background: var(--paper); color: var(--ink);
  transform: translate(-50%, calc(-100% - 1.7rem)); box-shadow: 0 0.5rem 1.4rem rgba(8, 12, 14, 0.5); animation: bub 0.32s var(--out); }
.bub::after { content: ''; position: absolute; left: 50%; bottom: -1rem; width: 2.2rem; height: 2.2rem; border-radius: 0.3rem; background: inherit; transform: translateX(-50%) rotate(45deg); }
.bub p { position: relative; z-index: 1; margin: 0; font-size: 2.6rem; font-weight: 700; line-height: 1.12; text-align: center; text-wrap: balance; }
@keyframes bub { from { opacity: 0; transform: translate(-50%, calc(-100% - 0.4rem)) scale(0.7); } }

/* the pit board counts the doors up; the hazard strip shouts */
.count { position: fixed; left: 50%; top: 43%; z-index: 7; min-width: 30rem; padding: 0.6rem 5rem 2rem; border-radius: 1.8rem; background: var(--ink); color: var(--marker); pointer-events: none;
  font-size: 19rem; font-weight: 800; line-height: 1; letter-spacing: 0.02em; text-align: center; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums;
  transform: translate(-50%, -50%) rotate(-2deg); box-shadow: inset 0 0 0 0.5rem var(--ink), inset 0 0 0 0.95rem rgba(239, 230, 210, 0.45), 0 1.4rem 3.2rem rgba(8, 12, 14, 0.55); }
.count:empty { display: none; }
.count.open { background: var(--lime); color: var(--ink); font-size: 13rem; padding-bottom: 1.6rem; box-shadow: inset 0 0 0 0.5rem var(--lime), inset 0 0 0 0.95rem rgba(32, 38, 43, 0.4), 0 1.4rem 3.2rem rgba(8, 12, 14, 0.55); animation: doorsup 0.9s var(--out) both; }
@keyframes doorsup { 0% { transform: translate(-50%, -50%) rotate(-2deg) scale(0.7); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) rotate(-2deg) scale(1.05); } }
.shout { --hz: var(--hazard); position: fixed; left: 50%; top: 17rem; z-index: 7; padding: 0.4rem 3.4rem 0.9rem; border: 0 solid transparent; border-inline-width: 2.8rem; border-radius: 0.7rem; opacity: 0; pointer-events: none;
  background: linear-gradient(var(--hz), var(--hz)) padding-box, repeating-linear-gradient(-45deg, var(--ink) 0 1.1rem, var(--hz) 1.1rem 2.2rem) border-box;
  color: var(--ink); font-size: 5.2rem; font-weight: 800; line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); box-shadow: 0 0.8rem 2rem rgba(8, 12, 14, 0.5); }
.shout.good { --hz: var(--lime); }
.shout.big { top: 38rem; font-size: 11rem; }
.shout.go { animation: shout 2.4s var(--out) both; }
@keyframes shout { 0% { opacity: 0; transform: translateX(-50%) translateY(-2.4rem) scale(0.86); } 9% { opacity: 1; transform: translateX(-50%) scale(1); } 82% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) translateY(-1.2rem); } }
.paused { position: fixed; inset: 0; z-index: 8; display: grid; place-content: center; justify-items: center; gap: 0.6rem; background: rgba(16, 20, 23, 0.74); }
.paused b { font-size: 13rem; font-weight: 800; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; color: var(--marker); }
.paused span { font-size: 3.6rem; }

/* ---- the screens between shifts: the street is on the left of the picture, the paperwork on the right ---- */
.screen { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.scr { position: absolute; inset: 0; }
.scr.lobby, .scr.map, .scr.quick, .scr.result { background: linear-gradient(90deg, rgba(16, 20, 23, 0) 44%, rgba(16, 20, 23, 0.52) 70%, rgba(16, 20, 23, 0.66)); }
.col { position: absolute; right: 7rem; top: 3rem; bottom: 3rem; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 2.4rem; width: 78rem; }
.scr.enter .col > * { animation: slidein 0.7s var(--out) both; }
.scr.enter .col > :nth-child(2) { animation-delay: 0.07s; } .scr.enter .col > :nth-child(3) { animation-delay: 0.14s; } .scr.enter .col > :nth-child(4) { animation-delay: 0.21s; }
@keyframes slidein { from { opacity: 0; transform: translateX(6rem); } }
.hint, .tape { align-self: center; margin: 0; padding: 0.5rem 3rem 0.9rem; background: var(--tape); color: var(--ink); font-size: 2.9rem; font-weight: 700; line-height: 1.15; text-align: center; transform: rotate(-1deg);
  clip-path: polygon(0.9rem 0, calc(100% - 0.9rem) 0, 100% 14%, calc(100% - 0.7rem) 28%, 100% 42%, calc(100% - 0.7rem) 58%, 100% 72%, calc(100% - 0.7rem) 86%, calc(100% - 0.2rem) 100%, 0.2rem 100%, 0.7rem 86%, 0 72%, 0.7rem 58%, 0 42%, 0.7rem 28%, 0 14%); }

.lobby .logo { align-self: center; font-size: 9.4rem; }
.join { display: flex; align-items: center; gap: 3rem; padding: 2rem 2.6rem; border-radius: 1.3rem; background: var(--cream); color: var(--ink);
  box-shadow: inset 0 0 0 0.3rem var(--cream), inset 0 0 0 0.52rem rgba(32, 38, 43, 0.45), 0 0.9rem 2.2rem rgba(8, 12, 14, 0.5); }
.qr { flex: none; width: 21rem; height: 21rem; padding: 0.9rem; border-radius: 0.6rem; background: #fcf8ec; }
.qr svg { display: block; width: 100%; height: 100%; }
.jn { min-width: 0; }
.code { display: block; font-size: 14rem; font-weight: 800; line-height: 0.88; letter-spacing: 0.07em; }
.jn p { margin: 1.2rem 0 0; font-size: 2.9rem; line-height: 1.15; }
.jn strong { font-weight: 800; white-space: nowrap; }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin: 0; padding: 0; list-style: none; }
.seat { position: relative; display: flex; align-items: center; gap: 1.5rem; min-width: 0; padding: 1.1rem 1.5rem 1.2rem 1.3rem; border-radius: 1rem; background: var(--paper); color: var(--ink); box-shadow: 0 0.5rem 1.3rem rgba(8, 12, 14, 0.42); }
.seat .pt { font-size: 2.5rem; }
.st { display: grid; min-width: 0; }
.st b { overflow: hidden; font-size: 3.4rem; font-weight: 800; line-height: 1.05; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.st span { font-size: 2.2rem; line-height: 1.12; color: var(--pencil); }
.seat.empty { background: rgba(16, 20, 23, 0.66); color: var(--cream); box-shadow: inset 0 0 0 0.25rem rgba(239, 230, 210, 0.36); }
.seat.empty .pt { opacity: 0.6; filter: grayscale(1); }
.seat.empty .st b { font-weight: 700; color: #c9d1d4; }
.seat.empty .st span { color: #c9d1d4; }
.seat.away { background: #cfc8b6; }
.seat.away .pt { filter: grayscale(1); }
.seat .cr { position: absolute; right: 1.2rem; top: 0.9rem; font-size: 3rem; fill: var(--amber); stroke: #86580a; }

/* the clipboard: hardboard, a sheet of ruled paper, a steel clip */
.board, .sheet { position: relative; margin: 2.6rem 0 0; padding: 4.6rem 3rem 2.8rem; border: 1.2rem solid var(--wood); border-radius: 1.4rem; color: var(--ink);
  background: var(--paper) repeating-linear-gradient(transparent 0 4.5rem, rgba(47, 111, 181, 0.1) 4.5rem 4.6rem); box-shadow: 0 0 0 0.15rem var(--wood-d), 0 1.6rem 3.4rem rgba(8, 12, 14, 0.55); }
.board h2, .sheet h2 { margin: 0; font-size: 4.8rem; font-weight: 800; line-height: 1; letter-spacing: 0.03em; text-transform: uppercase; }
.days { display: grid; gap: 1rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.day { display: flex; align-items: center; gap: 1.8rem; padding: 1.3rem 1.6rem 1.5rem; border-radius: 0.7rem; }
.day .dn { font-size: 2.8rem; }
.dt { display: grid; flex: 1; min-width: 0; }
.dt b { font-size: 3.8rem; font-weight: 800; line-height: 1.04; text-transform: uppercase; letter-spacing: 0.02em; }
.dt span { font-size: 2.4rem; line-height: 1.15; color: var(--pencil); }
.day .stars { font-size: 4.4rem; }
.day .lk { font-size: 3.6rem; color: var(--pencil); }
.day.sel { background: var(--marker); box-shadow: inset 0 0 0 0.3rem var(--ink); transform: rotate(-0.5deg); }
.day.sel .dt span { color: var(--ink); }
.day.shut { color: #68645a; }
.day.shut .dn { background: #6f6a5d; }
.is-tv .segs { display: flex; gap: 1rem; margin-top: 1.4rem; }
.is-tv .segs span { flex: 1; padding: 0.6rem 1rem 0.9rem; border-radius: 0.7rem; font-size: 2.6rem; font-weight: 700; line-height: 1.1; text-align: center; box-shadow: inset 0 0 0 0.22rem rgba(32, 38, 43, 0.35); }
.is-tv .segs span.sel { background: var(--marker); font-weight: 800; box-shadow: inset 0 0 0 0.3rem var(--ink); }
.bestline { margin: 1.6rem 0 0; font-size: 2.6rem; color: var(--pencil); }
.bestline b { font-weight: 800; color: var(--ink); }

/* story: the street plays, the line sits under it */
.scr.story { background: linear-gradient(rgba(16, 20, 23, 0.34), rgba(16, 20, 23, 0) 20%, rgba(16, 20, 23, 0) 60%, rgba(16, 20, 23, 0.56)); }
.dayplate { position: absolute; left: 5rem; top: 4.4rem; display: flex; align-items: center; gap: 1.6rem; padding: 1.2rem 2.8rem 1.5rem 1.4rem; border-radius: 1.1rem; background: var(--cream); color: var(--ink);
  font-size: 4.8rem; font-weight: 800; line-height: 1; letter-spacing: 0.03em; text-transform: uppercase; transform: rotate(-1.2deg);
  box-shadow: inset 0 0 0 0.3rem var(--cream), inset 0 0 0 0.52rem rgba(32, 38, 43, 0.45), 0 0.9rem 2.2rem rgba(8, 12, 14, 0.5); }
.dayplate .dn { font-size: 3.6rem; }
.scr.enter .dayplate { animation: plate 0.7s var(--out) both; }
@keyframes plate { from { opacity: 0; transform: translateX(-6rem) rotate(-4deg); } }
.sub { position: absolute; left: 50%; bottom: 6rem; display: flex; align-items: center; gap: 2.4rem; width: max-content; max-width: 156rem; padding: 1.8rem 3.8rem 2.1rem 2.2rem; border-radius: 1.5rem;
  background: var(--paper); color: var(--ink); transform: translateX(-50%); box-shadow: 0 1rem 2.6rem rgba(8, 12, 14, 0.55); }
.sub .pt { font-size: 4rem; }
.sb { display: grid; justify-items: start; gap: 0.7rem; min-width: 0; }
.nm { padding: 0 1.3rem 0.3rem; border-radius: 0.5rem; background: var(--c, var(--chrome)); color: var(--ink); font-size: 2.6rem; font-weight: 800; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; }
.sub p { margin: 0; max-width: 44ch; font-size: 4rem; font-weight: 600; line-height: 1.14; text-wrap: pretty; }
.sub.nar { padding: 2rem 4.4rem 2.4rem; background: var(--ink); color: var(--cream); text-align: center; box-shadow: inset 0 0 0 0.3rem var(--ink), inset 0 0 0 0.52rem rgba(239, 230, 210, 0.4), 0 1rem 2.6rem rgba(8, 12, 14, 0.55); }
.sub.nar .sb { justify-items: center; }
.sub.nar p { max-width: 50ch; }
.sub.fin { bottom: 26rem; flex-direction: column; gap: 4rem; padding: 0; background: none; box-shadow: none; }
.sub.fin .logo { font-size: 15rem; }
.sub.fin p { padding: 1rem 3.4rem 1.4rem; border-radius: 1.1rem; background: var(--ink); color: var(--cream); font-size: 4.4rem; font-weight: 700; }

/* the briefing: today's job sheet, held up to the garage before the doors go up */
.scr.brief { display: grid; place-items: center; background: rgba(16, 20, 23, 0.5); }
.sheet { width: 150rem; margin: 0; padding: 5.4rem 4.4rem 3.2rem; transform: rotate(-0.5deg); }
.scr.enter .sheet { animation: dropin 0.7s var(--out) both; }
@keyframes dropin { from { opacity: 0; transform: translateY(-8rem) rotate(-3deg); } }
.sheet header { display: flex; align-items: center; gap: 2.2rem; }
.sheet header .dn { font-size: 3.6rem; }
.sheet header h2 { flex: 1; font-size: 6.2rem; }
.place { font-size: 2.9rem; font-weight: 700; color: var(--pencil); }
.cards { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 3.4rem; margin-top: 4rem; }
.card { position: relative; padding: 2.4rem 2.6rem 2.4rem; border-radius: 0.6rem; background: var(--slip); transform: rotate(0.7deg); box-shadow: 0 0.5rem 1.4rem rgba(8, 12, 14, 0.24); }
.card:nth-child(even) { margin-top: 1.6rem; transform: rotate(-0.9deg); }
.card::before { content: ''; position: absolute; left: 50%; top: -1.5rem; width: 10rem; height: 3rem; background: rgba(226, 212, 160, 0.92); transform: translateX(-50%) rotate(-3deg); }
.card h3 { display: flex; align-items: center; gap: 1.3rem; margin: 0 0 1.6rem; font-size: 4.4rem; font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; }
.card h3 .ic { font-size: 4.8rem; color: var(--door); }
.steps { display: grid; gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 1.3rem; font-size: 3.1rem; line-height: 1.1; }
.steps li .ic { font-size: 3.5rem; }
.steps li span { flex: 1; }
kbd { flex: none; padding: 0.2rem 1.4rem 0.5rem; border-radius: 99rem; font: inherit; font-size: 2.5rem; font-weight: 800; line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; color: var(--ink); }
kbd.ka { background: var(--amber); } kbd.kb { background: var(--teal); }
.note { margin: 1.6rem 0 0; font-size: 2.6rem; line-height: 1.16; color: var(--pencil); }
.sheet .tape { display: table; margin: 3rem auto 0; }
.sheet footer { display: flex; align-items: center; gap: 3.4rem; margin-top: 2.8rem; }
.marks { display: flex; gap: 2.6rem; font-size: 2.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.marks span { display: flex; align-items: center; gap: 0.8rem; }
.marks .stars { font-size: 3rem; }
.fuse { overflow: hidden; flex: 1; height: 1.5rem; border-radius: 0.75rem; background: rgba(32, 38, 43, 0.2); }
.fuse i { display: block; height: 100%; background: var(--door); transform-origin: 0 50%; animation-name: fuse; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes fuse { to { transform: scaleX(0); } }

/* the result: stars land one at a time, then the rest of the sheet is filled in */
.result .board { text-align: center; }
.bigstars { display: flex; justify-content: center; gap: 3rem; margin: 2.2rem 0 0.4rem; }
.bs { display: grid; justify-items: center; }
.bs:nth-child(2) { transform: translateY(-1.3rem); }
.bs .ic { font-size: 12rem; stroke-width: 1.3; fill: rgba(32, 38, 43, 0.07); stroke: #a39b88; }
.bs b { font-size: 2.5rem; font-weight: 700; color: var(--pencil); font-variant-numeric: tabular-nums; }
.bs.lit .ic { fill: var(--amber); stroke: #86580a; }
.bs.dud .ic { fill: none; stroke: #6f6a5d; stroke-dasharray: 3 2.4; }
.bs.lit.new .ic { animation: starin 0.5s var(--out); }
.bs.dud.new .ic { animation: dud 0.4s ease-in-out; }
@keyframes starin { from { opacity: 0; transform: scale(2.6) rotate(-40deg); } }
@keyframes dud { 25% { transform: translateX(-0.8rem); } 75% { transform: translateX(0.8rem); } }
.take { display: flex; align-items: baseline; justify-content: center; gap: 1.4rem; margin-top: 0.6rem; }
.take b { font-size: 9.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.take span { font-size: 2.9rem; color: var(--pencil); }
.take em { padding: 0 0.9rem 0.3rem; border-radius: 0.4rem; background: var(--marker); color: var(--ink); font-style: normal; font-weight: 800; }
.tally { display: flex; justify-content: center; gap: 3.2rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: 2.7rem; color: var(--pencil); }
.tally li { display: flex; align-items: center; gap: 0.7rem; }
.tally b { font-weight: 800; color: var(--ink); }
.tally .ic { font-size: 3rem; color: var(--ink); }
.review { margin: 2rem 0 0; padding: 1.4rem 2.2rem 1.7rem; border-radius: 0.6rem; background: var(--slip); text-align: left; transform: rotate(0.5deg); box-shadow: 0 0.4rem 1.1rem rgba(8, 12, 14, 0.22); }
.review p { margin: 0; font-size: 2.9rem; line-height: 1.18; text-wrap: pretty; }
.review p::before { content: '\201C'; } .review p::after { content: '\201D'; }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; margin: 1.8rem 0 0; padding: 0; list-style: none; text-align: left; }
.awards li { display: flex; align-items: center; gap: 1.2rem; min-width: 0; }
.awards .pt { font-size: 1.9rem; }
.awards b { display: block; font-size: 2.7rem; font-weight: 800; line-height: 1.05; text-transform: uppercase; }
.awards span { font-size: 2.2rem; line-height: 1.12; color: var(--pencil); }
.upg { display: flex; align-items: center; gap: 1.7rem; margin-top: 2rem; padding: 1.2rem 2.2rem 1.5rem; border-radius: 0.9rem; background: var(--ink); color: var(--cream); text-align: left; }
.upg .ic { font-size: 4.6rem; color: var(--marker); }
.upg b { display: block; font-size: 3.2rem; font-weight: 800; line-height: 1.05; letter-spacing: 0.03em; text-transform: uppercase; color: var(--marker); }
.upg span { font-size: 2.6rem; line-height: 1.14; }
.result:not(.told) .take, .result:not(.told) .tally, .result:not(.told) .review, .result:not(.told) .awards, .result:not(.told) .upg { opacity: 0; }
.result.told .take, .result.told .tally, .result.told .review, .result.told .awards, .result.told .upg { animation: told 0.6s var(--out) both; }
.result.told .tally { animation-delay: 0.08s; } .result.told .review { animation-delay: 0.16s; } .result.told .awards { animation-delay: 0.24s; } .result.told .upg { animation-delay: 0.5s; }
@keyframes told { from { opacity: 0; transform: translateY(1.6rem); } }

/* the roller door is the cut between the street and the floor, and the loading screen */
.shutter { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; pointer-events: none; will-change: transform; transform: translateY(-104%); transition: transform 0.44s var(--out);
  background: var(--door) repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0 0.5rem, transparent 0.5rem 2.4rem, rgba(0, 0, 0, 0.2) 2.4rem 3rem, transparent 3rem 4.2rem); }
.shutter.down { transform: none; transition: transform 0.38s cubic-bezier(0.6, 0, 0.9, 0.5); }
.shutter::before { content: 'Lot 13'; font-size: 34rem; font-weight: 800; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(239, 230, 210, 0.2); }
.shutter.loading::before, .shutter.failed::before { content: none; }
.shutter::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3.6rem; background: repeating-linear-gradient(-45deg, var(--ink) 0 2.4rem, var(--hazard) 2.4rem 4.8rem); box-shadow: 0 0.8rem 2rem rgba(8, 12, 14, 0.65); }
.sh-load { display: none; justify-items: center; gap: 3.4rem; }
.shutter.loading .sh-load, .shutter.failed .sh-load { display: grid; }
.sh-load .logo { font-size: 13rem; }
.sh-bar { overflow: hidden; width: 46rem; height: 1.5rem; border-radius: 0.75rem; background: rgba(16, 20, 23, 0.55); }
.sh-bar i { display: block; height: 100%; background: var(--marker); transform: scaleX(0.04); transform-origin: 0 50%; transition: transform 0.3s linear; }
.shutter.failed .sh-bar { display: none; }
.sh-msg { margin: 0; max-width: 60rem; font-size: 3.2rem; font-weight: 700; text-align: center; color: var(--cream); }
.soundbtn { position: fixed; left: 2rem; bottom: 2rem; z-index: 21; display: flex; align-items: center; justify-content: center; gap: 1rem; min-width: 6rem; height: 6rem; padding: 0; border: 0; border-radius: 99rem; cursor: pointer;
  background: var(--ink); color: var(--cream); font-size: 3.2rem; opacity: 0.72; box-shadow: 0 0.5rem 1.3rem rgba(8, 12, 14, 0.5); }
.soundbtn.ask { padding: 0 2.6rem 0 2rem; background: var(--marker); color: var(--ink); opacity: 1; animation: ask 1.4s ease-in-out infinite; }
.soundbtn.ask::after { content: 'Tap for sound'; padding-bottom: 0.3rem; font-size: 2.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
@keyframes ask { 50% { transform: scale(1.06); } }

@media (prefers-reduced-motion: reduce) {
  .n2, .chip.ka, .tk.hot, .pl-clock.hot, .soundbtn.ask { animation: none; }
  .scr.enter .col > *, .scr.enter .sheet, .scr.enter .dayplate, .result.told .take, .result.told .tally, .result.told .review, .result.told .awards, .result.told .upg, .bs.new .ic, .stamp, .bub, .ouch { animation: none; }
  .shutter, .shutter.down, .btn, .row { transition-duration: 0.01s; }
}
