/* Glimpse: time attack. Asphalt black, cold white, taillight red. Green only for "beat the pace".
   Fonts (self-hosted, OFL): Barlow Condensed by Jeremy Tribby, JetBrains Mono by JetBrains.
   Rule: nothing moves on the board while the clock runs. All motion lives between rounds. */
:root {
  --asph: #0c0c0d; --panel: #131315; --panel2: #1b1b1e; --line: #26262a; --line2: #34343a;
  --dim: #6c6c72; --mid: #a3a3a8; --ink: #f1f0ec; --red: #e5261c; --green: #36c46a;
  --skew: -12deg; --gap: clamp(4px, 0.45vw, 6px); --pad: clamp(14px, 2.2vw, 32px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--ink); background: var(--asph); }
body {
  font: 500 16px/1.3 'Barlow Condensed', 'Arial Narrow', sans-serif; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; overflow: hidden;
  background:
    radial-gradient(120% 90% at 60% 40%, transparent 55%, rgba(0, 0, 0, 0.5) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--asph);
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--ink); }
.lab { font-weight: 600; font-size: 13px; letter-spacing: 0.18em; color: var(--dim); text-transform: uppercase; }
#app { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }

/* header */
.bar { height: 64px; display: flex; align-items: center; gap: clamp(14px, 2.6vw, 40px); padding: 0 var(--pad); border-bottom: 1px solid var(--line); }
.mark { display: flex; align-items: center; font-weight: 900; font-style: italic; font-size: 30px; letter-spacing: 0.01em; }
.mark i { width: 20px; height: 22px; background: var(--red); transform: skewX(var(--skew)); margin-right: 24px;
  box-shadow: 9px 0 0 -4px var(--asph), 13px 0 0 -4px var(--red), 21px 0 0 -8px var(--asph), 24px 0 0 -8px var(--red); }
.meta { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.meta b { font-weight: 700; font-size: 22px; }
.meta a { margin-left: 8px; font-weight: 600; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mid); text-decoration: none; border-bottom: 1px solid var(--line2); }
.meta a:hover { color: var(--ink); }
.grow { flex: 1; }
a.mark { color: inherit; text-decoration: none; cursor: pointer; }
.nav { display: flex; gap: 8px; }
.nav button { height: 36px; padding: 0 14px; border: 1px solid var(--line2); background: none; color: var(--mid); font: inherit; font-weight: 700; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; }
.nav button:hover, .nav button:focus-visible { color: var(--ink); border-color: var(--ink); outline: none; }
@media (max-width: 760px) { .nav { gap: 6px; } .nav button { height: 32px; padding: 0 8px; font-size: 11px; letter-spacing: 0.08em; } .bar.has-nav .meta .lab { display: none; } }
.read { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.read div { display: grid; justify-items: end; gap: 2px; }
.read b { font-weight: 800; font-style: italic; font-size: 30px; line-height: 1; transform-origin: right center; transition: color 0.2s; }
.score.flash-good { color: var(--green); } .score.flash-bad { color: var(--red); }
.score.bump { animation: bump 0.32s ease-out; }
@keyframes bump { 30% { transform: scale(1.14); } }

/* layout: side column (target + splits) and the track (board + points) */
.race { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; padding: 22px var(--pad) 18px; min-height: 0; }
.race.solo { grid-template-columns: minmax(0, 1fr); padding: 0; }
.side { display: grid; align-content: start; gap: 22px; min-height: 0; }
.col { display: grid; grid-template-rows: auto auto; align-content: center; gap: 18px; min-height: 0; padding-bottom: 4vh; }
.solo .col { grid-template-rows: minmax(0, 1fr); }
.stage { position: relative; display: grid; place-items: start center; min-height: 0; }
.solo .stage { place-items: start center; overflow: auto; padding: 0 var(--pad); }
.foot { min-height: 53px; }
.solo .foot { display: none; }

/* target card */
.target { border-left: 4px solid var(--red); padding: 2px 0 0 14px; transition: opacity 0.2s; }
.target.dim { opacity: 0.25; }
.target.empty { border-left-color: var(--line2); }
.target .lab { color: var(--red); margin-bottom: 10px; display: block; }
.target.empty .lab { color: var(--dim); }
.target .peek img, .target .slot { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #09090a; outline: 1px solid var(--line); }
.target .nm { font-weight: 700; font-size: 22px; margin-top: 8px; line-height: 1.05; min-height: 1.05em; }
.target.empty .slot { background: repeating-linear-gradient(-12deg, #161618 0 6px, #0d0d0f 6px 12px); }
.target.empty .nm { color: var(--dim); }

/* splits tower (also the results sheet) */
.splits { border-top: 1px solid var(--line); padding-top: 12px; }
.splits .head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.row { display: grid; grid-template-columns: 38px 64px 1fr 62px; align-items: center; height: 36px; padding-left: 8px; border-bottom: 1px solid var(--line); font-size: 19px; }
.row .n { color: var(--dim); font-weight: 600; font-size: 15px; }
.row .k { font-weight: 600; font-size: 14px; letter-spacing: 0.14em; color: var(--mid); text-transform: uppercase; }
.row .t { font-weight: 700; text-align: right; padding-right: 14px; }
.row .d { font-weight: 700; font-size: 16px; text-align: center; height: 24px; line-height: 24px; transform: skewX(var(--skew)); }
.row .d span { display: inline-block; transform: skewX(12deg); }
.d.g { background: var(--green); color: #06140b; }
.d.r { background: var(--red); color: #fff; }
.d.w { background: var(--ink); color: var(--asph); }
.row.todo { opacity: 0.38; }
.row.now { background: linear-gradient(90deg, rgba(229, 38, 28, 0.16), transparent 85%); box-shadow: inset 3px 0 0 var(--red); }
.row.now .n, .row.now .k { color: var(--ink); }
.row.new .d { animation: flip 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.25); }
.row.new .t { animation: rise 0.3s ease-out; }
@keyframes flip { from { transform: skewX(var(--skew)) scaleY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* board rig: grid refs + corner ticks. The board itself never animates. */
.rig { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); grid-template-rows: 16px auto; gap: 6px;
  width: min(100%, calc((100dvh - 236px) * var(--aspect) + 22px)); }
.cl { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--gap); }
.rl { grid-row: 2; display: grid; gap: var(--gap); }
.cl span, .rl span { display: grid; place-items: center; font-weight: 600; font-size: 12px; color: var(--dim); }
.rig .board { grid-row: 2; grid-column: 2; }
.ticks { position: absolute; left: 12px; top: 12px; right: -10px; bottom: -10px; pointer-events: none; }
.ticks b { position: absolute; width: 16px; height: 16px; border: 2px solid var(--mid); }
.ticks b:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.ticks b:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.ticks b:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.ticks b:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.board { display: grid; gap: var(--gap); width: 100%; position: relative; }
.rig.hold { visibility: hidden; } .rig.hold .fix { visibility: visible; }
.board > .mask { position: absolute; inset: -2px; width: auto; aspect-ratio: auto; z-index: 3; }
.tile { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 0; padding: 0; outline: none; touch-action: manipulation; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.tile:focus-visible { box-shadow: 0 0 0 3px var(--ink); }
.tile.hit { box-shadow: 0 0 0 3px var(--green); z-index: 1; }
.tile.miss { box-shadow: 0 0 0 3px var(--red); z-index: 1; }
.tile.answer { box-shadow: 0 0 0 3px var(--ink); z-index: 1; }
.board.done .tile:not(.hit):not(.answer):not(.miss) { opacity: 0.22; transition: opacity 0.25s; }

/* start lights: the cue. Same 1.4 s + 0.6 s as before; only the look changed. */
.start { display: grid; justify-items: center; gap: clamp(22px, 4vh, 46px); }
.gantry { display: flex; gap: clamp(10px, 1.5vw, 22px); padding: clamp(10px, 1.3vw, 18px) clamp(14px, 1.8vw, 26px); background: #050505; border: 1px solid var(--line2); position: relative; }
.gantry::before { content: ''; position: absolute; left: -140px; right: -140px; top: 50%; height: 6px; background: #050505; z-index: -1; border-block: 1px solid var(--line2); }
.pod { display: grid; gap: clamp(8px, 1vw, 14px); padding: clamp(7px, 0.8vw, 12px); background: #0e0e10; border: 1px solid var(--line); }
.pod i { width: clamp(30px, 3.8vw, 56px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #2a1312, #120a0a 70%); box-shadow: inset 0 0 0 3px #1c1c1f, inset 0 6px 12px rgba(0, 0, 0, 0.6); }
.pod.on i { background: radial-gradient(circle at 50% 45%, #fff2ea 0 10%, #ff4a35 26%, #d01a10 62%, #6e0a05 100%); box-shadow: inset 0 0 0 3px #1c1c1f, 0 0 28px 4px rgba(229, 38, 28, 0.45); }
.cue { display: grid; justify-items: center; gap: 12px; }
.cue.gone { visibility: hidden; }
.cue .lab { color: var(--red); }
.cue .card { width: min(64vw, 420px); outline: 1px solid var(--line2); outline-offset: 8px; }
.cue .card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.cue .name { font-weight: 800; font-style: italic; font-size: clamp(28px, 3.2vw, 44px); line-height: 1; text-align: center; margin-top: 8px; }
.fix { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; translate: -50% -50%; }
.fix::before, .fix::after { content: ''; position: absolute; background: var(--red); }
.fix::before { left: 10px; top: 0; width: 2px; height: 22px; } .fix::after { top: 10px; left: 0; height: 2px; width: 22px; }
.mask { width: min(100%, calc((100dvh - 236px) * var(--aspect))); aspect-ratio: var(--aspect);
  background: repeating-linear-gradient(-12deg, #161618 0 6px, #0d0d0f 6px 12px), #0d0d0f; }

/* points: the revs. Drains while the clock runs (it sits below the board, not on it). */
.pbar { display: grid; grid-template-columns: 70px minmax(0, 1fr) 120px; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.rev { display: grid; grid-template-columns: repeat(40, 1fr); gap: 5px; height: 24px; padding-left: 4px; }
.rev i { transform: skewX(var(--skew)); background: #1d1d20; }
.rev i.on { background: var(--ink); } .rev i.on.hot { background: var(--red); }
.pts { text-align: right; font-weight: 800; font-style: italic; font-size: 38px; line-height: 1; }
.pts small { font-size: 14px; font-style: normal; font-weight: 600; letter-spacing: 0.16em; color: var(--dim); margin-left: 6px; }
.pts.good span { color: var(--green); } .pts.bad span { color: var(--red); }
.note { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 53px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--mid); font-size: 18px; }

/* glance question and gut pick */
.ask { display: grid; gap: 16px; justify-items: center; width: min(100%, 1100px); }
.ask .lab { color: var(--red); }
.ask h2 { margin: 0; font-weight: 800; font-style: italic; font-size: clamp(28px, 3.4vw, 44px); line-height: 1; text-align: center; }
.ask > .board { width: min(100%, calc((100dvh - 330px) * var(--aspect))); margin-top: 6px; }
.probe { width: min(72vw, 420px); aspect-ratio: 16 / 9; overflow: hidden; background: #000; outline: 1px solid var(--line2); outline-offset: 8px; margin: 10px 0; transition: outline-color 0.15s; }
.probe img { width: 100%; height: 100%; object-fit: cover; display: block; }
.probe.hit { outline: 3px solid var(--green); outline-offset: 6px; }
.probe.miss { outline: 3px solid var(--red); outline-offset: 6px; }
.probe.answer { outline: 3px solid var(--ink); outline-offset: 6px; }
.yn { justify-content: center; }
.yn .btn { min-width: 140px; }

/* buttons: parallelograms */
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { border: 0; background: var(--panel2); color: var(--ink); padding: 14px 30px; font-weight: 700; font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); transition: background 0.15s, transform 0.1s; }
.btn:hover { background: #26262a; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); color: #fff; } .btn.primary:hover { background: #f2382d; }
.btn.light { background: var(--ink); color: var(--asph); } .btn.light:hover { background: #fff; }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ink); }
.btn.primary:focus-visible, .btn.light:focus-visible { box-shadow: inset 0 0 0 3px var(--asph); }

/* home + results pages */
.page { width: min(100%, 780px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: clamp(16px, 4vh, 40px) 0 32px; }
.page > .gantry { justify-self: start; margin-left: 140px; }
.page > .gantry .pod i { width: 26px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.steps div { color: var(--mid); font-size: 17px; line-height: 1.22; }
.steps b { display: block; color: var(--ink); font-weight: 800; font-style: italic; font-size: 24px; margin: 2px 0 4px; }
.fine { color: var(--dim); font-size: 15px; }
.fine summary { cursor: pointer; font-weight: 600; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.fine summary:hover { color: var(--mid); }
.fine p { color: var(--mid); line-height: 1.4; max-width: 62ch; }
.result-top { display: grid; gap: 6px; }
.result-top .big { font-weight: 900; font-style: italic; font-size: clamp(76px, 11vw, 132px); line-height: 0.84; }
.result-top .fine { font-size: 18px; color: var(--mid); }
.strip { display: flex; gap: 6px; padding-left: 4px; }
.strip span { flex: 1 1 0; max-width: 38px; height: 12px; transform: skewX(var(--skew)); font-size: 0; }
.s-top { background: var(--green); } .s-mid { background: var(--ink); } .s-low { background: #8b8b91; }
.s-miss { background: var(--red); } .s-recall { background: var(--green); } .s-pick { background: var(--line2); }
.sheet { border-top: 0; padding-top: 0; }
.sheet .row { animation: rise 0.35s calc(var(--i) * 55ms) ease-out both; }
.credits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.credits a { display: grid; gap: 6px; text-decoration: none; font-size: 15px; color: var(--mid); }
.credits a:hover { color: var(--ink); }
.credits img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.credits .cv { position: relative; overflow: hidden; }
.credits .play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 0.02em; text-align: center; opacity: 0; transition: opacity 0.15s; }
.credits a:hover .play, .credits a:focus-visible .play { opacity: 1; }
.toast { position: fixed; left: 50%; bottom: 28px; translate: -50% 0; background: var(--ink); color: var(--asph); padding: 10px 26px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }

/* phone: target becomes a strip above the board, splits hide */
@media (max-width: 760px) {
  .bar { height: 54px; gap: 12px; }
  .mark { font-size: 22px; } .mark i { width: 14px; height: 17px; margin-right: 18px; box-shadow: 7px 0 0 -3px var(--asph), 10px 0 0 -3px var(--red); }
  .meta b { font-size: 18px; }
  .read { gap: 14px; } .read b { font-size: 22px; } .read .lab { font-size: 10px; }
  .race { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 14px; padding: 10px 12px 6vh; }
  .col { align-content: start; padding-bottom: 0; }
  .race.solo { grid-template-rows: minmax(0, 1fr); padding: 0; }
  .solo .stage { padding: 0 16px; }
  .side .splits { display: none; }
  .target { display: grid; grid-template-columns: 104px 1fr; column-gap: 12px; align-items: center; padding: 0 0 0 10px; }
  .target.empty { display: none; }
  .target .lab { grid-column: 2; margin: 0; }
  .target .peek, .target .slot { grid-row: 1 / 3; grid-column: 1; }
  .target .nm { grid-column: 2; margin: 0; font-size: 19px; }
  .rig { width: 100%; }
  .ticks { display: none; }
  .pbar { grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; } .pbar .lab { display: none; }
  .rev { gap: 3px; height: 20px; } .pts { font-size: 28px; }
  .page > .gantry { margin-left: 0; }
  .steps { grid-template-columns: 1fr; }
  .yn .btn { min-width: 0; padding: 14px 22px; }
}
/* ---------- home: the start grid (art: Kenney Racing Pack, CC0) ---------- */
.home { position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; overflow: hidden auto; --t: clamp(46px, 7.4vh, 78px); }
.hcopy { display: grid; justify-items: center; align-content: center; gap: 18px; padding: 28px 20px 22px; text-align: center; }
.mark.big { font-size: clamp(58px, 8.5vw, 104px); line-height: 0.9; }
.mark.big i { width: 0.6em; height: 0.66em; margin-right: 0.72em; box-shadow: 0.27em 0 0 -0.12em var(--asph), 0.39em 0 0 -0.12em var(--red), 0.63em 0 0 -0.24em var(--asph), 0.72em 0 0 -0.24em var(--red); }
.pitch { margin: 0; font-weight: 700; font-size: clamp(22px, 2.4vw, 30px); }
.bul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--mid); font-size: 19px; }
.bul li::before { content: ''; display: inline-block; width: 9px; height: 9px; background: var(--red); transform: skewX(var(--skew)); margin-right: 12px; vertical-align: 2px; }
.home .cta { justify-content: center; margin-top: 6px; }
.home .btn.primary { min-width: 220px; font-size: 22px; padding: 16px 40px; }
.howto { max-width: 520px; color: var(--mid); }
.howto summary { cursor: pointer; font-weight: 600; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); list-style: none; }
.howto summary::before { content: '\25B8  '; } .howto[open] summary::before { content: '\25BE  '; }
.howto summary:hover { color: var(--ink); }
.howto ol { text-align: left; margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; font-size: 18px; line-height: 1.25; }
.howto ol li::marker { color: var(--red); font-weight: 700; }

.scene { position: relative; display: grid; grid-template-rows: calc(var(--t) * 1.5) calc(var(--t) * 3) calc(var(--t) * 1.1); background: url(/src/art/grass.png) 0 0 / var(--t) var(--t); overflow: hidden;
  box-shadow: inset 0 18px 30px -12px rgba(0, 0, 0, 0.55); }
.side-a, .side-b { display: flex; align-items: flex-end; gap: calc(var(--t) * 0.35); padding: 0 4vw calc(var(--t) * 0.1); white-space: nowrap; }
.side-b { align-items: center; padding-bottom: 0; }
.side-a img, .side-b img { flex: none; image-rendering: auto; }
.tribune { height: calc(var(--t) * 1.4); } .stand { position: relative; flex: none; aspect-ratio: 448 / 223; } .stand > img:first-child { display: block; width: 100%; height: 100%; }
.stand .fan { position: absolute; cursor: pointer; transform-origin: 50% 90%; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15)); }
.stand .fan:hover { filter: brightness(1.12) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15)); }
.stand .fan.scared { animation: scared 0.95s cubic-bezier(0.3, 0.7, 0.4, 1); z-index: 2; }
@keyframes scared {
  0% { transform: translateY(0) scale(1); }
  14% { transform: translateY(-30%) scale(1.12, 1.1); }
  20% { transform: translateY(-30%) scale(1.12) rotate(-9deg); } 26% { transform: translateY(-30%) scale(1.12) rotate(9deg); }
  32% { transform: translateY(-30%) scale(1.12) rotate(-9deg); } 38% { transform: translateY(-30%) scale(1.12) rotate(9deg); }
  44% { transform: translateY(-30%) scale(1.12) rotate(-7deg); } 50% { transform: translateY(-30%) scale(1.12) rotate(7deg); }
  56% { transform: translateY(-30%) scale(1.12) rotate(-4deg); } 62% { transform: translateY(-30%) scale(1.12) rotate(0); }
  84% { transform: translateY(4%) scale(1.06, 0.92); } 100% { transform: translateY(0) scale(1); }
}
.scene img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; } .scene { user-select: none; -webkit-user-select: none; }
.prop { cursor: pointer; transform-origin: 50% 100%; } .prop.wiggle { animation: wiggle 0.6s ease-out; }
@keyframes wiggle { 15% { transform: rotate(-6deg) scale(1.04, 0.96); } 30% { transform: rotate(5deg) scale(0.97, 1.04); } 45% { transform: rotate(-3.5deg); } 60% { transform: rotate(2.5deg); } 75% { transform: rotate(-1deg); } 100% { transform: none; } }
.tent { height: calc(var(--t) * 1.2); }
.tree { height: calc(var(--t) * 1.25); } .tree.s { height: calc(var(--t) * 0.85); } .tires { height: calc(var(--t) * 0.5); }
.road { position: relative; background: url(/src/art/road_top.png) 0 0 / var(--t) var(--t) repeat-x, url(/src/art/road_mid.png) 0 var(--t) / var(--t) var(--t) repeat-x, url(/src/art/road_bot.png) 0 calc(var(--t) * 2) / var(--t) var(--t) repeat-x; }
.checker { position: absolute; top: 0; bottom: 0; left: 58%; width: var(--t); background: url(/src/art/check_top.png) 0 0 / var(--t) var(--t) no-repeat, url(/src/art/check_mid.png) 0 var(--t) / var(--t) var(--t) no-repeat, url(/src/art/check_bot.png) 0 calc(var(--t) * 2) / var(--t) var(--t) no-repeat; }
.road .slot { position: absolute; border: 0; padding: 0; background: none; cursor: pointer; transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.road .slot .car { display: block; width: calc(var(--t) * 1.6); height: auto; animation: idle 0.14s steps(2) infinite; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.35)); }
.road .slot:hover { transform: translateX(6px); }
.road .slot.jump { animation: hop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1); }
.s0 { left: calc(58% - var(--t) * 1.95); top: calc(var(--t) * 0.42); }
.s1 { left: calc(58% - var(--t) * 3.25); top: calc(var(--t) * 1.82); }
.s2 { left: calc(58% - var(--t) * 4.85); top: calc(var(--t) * 0.42); }
.s3 { left: calc(58% - var(--t) * 6.15); top: calc(var(--t) * 1.82); }
@keyframes idle { 50% { transform: translate(0.5px, -0.5px); } }
@keyframes hop { 40% { transform: translateX(calc(var(--t) * 0.6)); } }
.home { transition: transform 0.85s cubic-bezier(0.6, 0, 0.3, 1); }
.home.launch { transform: translateY(var(--lift, 0)); }
.home.launch .road .slot { transition: transform 0.85s cubic-bezier(0.55, 0, 0.9, 0.5); transform: translateX(18vw); }
.home.launch .s1 { transition-delay: 0.06s; } .home.launch .s2 { transition-delay: 0.12s; } .home.launch .s3 { transition-delay: 0.18s; }
.home.launch .hcopy, .home.launch .hfoot, .home.launch .side-b { opacity: 0; transition: opacity 0.4s; }
.hfoot { padding: 8px 20px 10px; text-align: center; }
.hfoot .fine p { margin-inline: auto; text-align: left; }

/* ---------- results ---------- */
.res { gap: 34px; }
.res section { display: grid; gap: 12px; }
.sh { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.early { margin: 0; color: var(--mid); font-size: 19px; max-width: 60ch; }
.cmp { font-size: 18px; color: var(--mid); } .cmp b { color: var(--ink); font-weight: 800; font-size: 22px; }
.result-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.result-top .big small { font-size: 0.2em; font-style: normal; font-weight: 600; letter-spacing: 0.16em; color: var(--dim); margin-left: 10px; }
.tier { display: flex; align-items: center; gap: 14px; padding-bottom: 8px; }
.tier .car { width: 74px; height: auto; }
.tier b { display: block; font-weight: 800; font-style: italic; font-size: 30px; line-height: 1; text-transform: uppercase; }
.tier span { color: var(--mid); font-size: 17px; }
.dist { position: relative; height: 130px; margin-top: 18px; }
.dist svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dist .a { fill: rgba(241, 240, 236, 0.07); } .dist .a.you { fill: rgba(229, 38, 28, 0.38); }
.dist .l { fill: none; stroke: var(--ink); stroke-width: 2; }
.dist .mk { position: absolute; left: var(--x); top: var(--y); bottom: 0; width: 2px; translate: -1px 0; background: var(--red); }
.dist .dot { position: absolute; left: var(--x); top: var(--y); width: 12px; height: 12px; translate: -50% -50%; background: var(--red); border: 2px solid var(--ink); border-radius: 50%; }
.dist .yl { position: absolute; left: var(--x); top: var(--y); translate: -50% -34px; white-space: nowrap; font-weight: 800; font-style: italic; font-size: 18px; text-transform: uppercase; color: var(--red); }
.dist .yl.l { translate: calc(-100% - 12px) -50%; } .dist .yl.r { translate: 12px -50%; }
.ticks2 { position: relative; height: 18px; border-top: 1px solid var(--line2); }
.ticks2 span { position: absolute; top: 4px; translate: -50% 0; font-size: 13px; color: var(--dim); }
.ticks2 span:first-child { translate: 0 0; } .ticks2 span:last-child { translate: -100% 0; }
.lane { position: relative; height: 44px; background: url(/src/art/road_mid.png) 0 0 / 44px 44px repeat-x; border-block: 4px solid; border-image: repeating-linear-gradient(90deg, var(--red) 0 14px, var(--ink) 14px 28px) 4; }
.lane .car { position: absolute; left: var(--x); top: 50%; width: 60px; translate: -100% -50%; animation: drive 1.2s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.lane .flag { position: absolute; right: 0; top: 0; bottom: 0; width: 22px; background: repeating-conic-gradient(#111 0 25%, #eee 0 50%) 0 0 / 11px 11px; }
@keyframes drive { from { left: 0; translate: -100% -50%; } }
.bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; align-items: end; }
.pb { display: grid; grid-template-rows: 20px 110px 18px 16px; text-align: center; }
.pb i { align-self: end; display: block; height: var(--h); background: var(--ink); transform: skewX(var(--skew)); animation: grow 0.5s calc(var(--i) * 60ms) ease-out both; transform-origin: bottom; }
.pb .v { font-weight: 700; font-size: 15px; color: var(--mid); align-self: end; }
.pb .n { font-weight: 700; font-size: 15px; padding-top: 2px; } .pb .k { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.pb.ok i { background: var(--ink); } .pb.gl i { background: var(--green); } .pb.bad i { background: var(--red); } .pb.bad .v { color: var(--red); }
.pb.pk i { height: 2px; background: var(--line2); }
@keyframes grow { from { transform: skewX(var(--skew)) scaleY(0); } }
.bands { display: grid; }
.bands div { display: grid; grid-template-columns: 54px 110px 150px 1fr; align-items: center; gap: 12px; height: 44px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 17px; }
.bands .car { width: 46px; height: auto; opacity: 0.5; } .bands b { font-weight: 700; font-size: 19px; text-transform: uppercase; letter-spacing: 0.04em; }
.bands .rg { font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.bands .me { color: var(--ink); background: linear-gradient(90deg, rgba(229, 38, 28, 0.2), transparent 85%); box-shadow: inset 3px 0 0 var(--red); }
.bands .me .car { opacity: 1; }
.rds { display: grid; }
.rd { display: grid; grid-template-columns: 28px 128px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rd .n { color: var(--dim); font-weight: 700; font-size: 17px; text-align: center; }
.rd .th img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.rd .tx { display: grid; gap: 2px; min-width: 0; }
.rd .nm { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd .cr { color: var(--mid); font-size: 16px; } .rd .cr em { font-style: normal; color: var(--ink); font-weight: 700; }
.rd .yo b { font-weight: 800; font-style: italic; font-size: 22px; white-space: nowrap; }
.rd .yo .g { color: var(--green); } .rd .yo .r { color: var(--red); }
.log { grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); gap: 0 !important; }
.log div { padding: 14px 0 14px 18px; } .log div:first-child { padding-left: 0; } .log div + div { border-left: 1px solid var(--line); }
.log b { display: block; font-weight: 800; font-style: italic; font-size: 30px; line-height: 1; margin-top: 6px; }

@media (max-width: 760px) {
  .home { --t: 60px; }
  .hcopy { gap: 14px; padding-top: 22px; }
  .bul { font-size: 17px; text-align: left; }
  .home .btn.primary { min-width: 0; }
  .side-a .tribune:nth-child(2), .side-a > img:nth-child(n+6) { display: none; }
  .checker { left: 80%; } .s0 { left: calc(80% - var(--t) * 1.95); } .s1 { left: calc(80% - var(--t) * 3.25); } .s2 { left: calc(80% - var(--t) * 4.85); } .s3 { left: calc(80% - var(--t) * 6.15); }
  .result-top .big { font-size: 84px; }
  .bars { gap: 5px; height: 150px; } .pb .v { font-size: 11px; } .pb .k { display: none; }
  .bands div { grid-template-columns: 34px 1fr auto; grid-template-areas: 'c n r' 'c d d'; row-gap: 0; height: auto; padding: 8px; }
  .bands .car { grid-area: c; } .bands b { grid-area: n; } .bands .rg { grid-area: r; white-space: nowrap; font-size: 13px; }
  .bands div > span:last-child { grid-area: d; font-size: 15px; }
  .rd { grid-template-columns: 22px 84px minmax(0, 1fr); gap: 10px; }
  .rd .yo { grid-column: 3; } .rd .yo b { font-size: 18px; }
  .rd .nm { font-size: 17px; } .rd .cr { font-size: 14px; }
  .log { grid-template-columns: 1fr 1fr; } .log div:nth-child(3) { padding-left: 0; border-left: 0; } .log div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sh { flex-direction: column; gap: 2px; }
}
/* ---------- race strip (above the board during the daily) ---------- */
#app.has-track { grid-template-rows: auto auto minmax(0, 1fr); }
.track { position: relative; height: clamp(130px, 22vh, 210px); margin: 10px var(--pad) 0; overflow: hidden;
  background: url(/src/art/road_mid.png) 0 0 / 64px 64px repeat; border-block: 5px solid; border-image: repeating-linear-gradient(90deg, var(--red) 0 18px, var(--ink) 18px 36px) 5; }
.track canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.track .tflag { position: absolute; left: 95%; top: 0; bottom: 0; width: 16px; background: repeating-conic-gradient(#111 0 25%, #eee 0 50%) 0 0 / 8px 8px; }
.track .me { position: absolute; left: 5%; top: 50%; translate: -50% -50%; transition: left 0.9s cubic-bezier(0.2, 0.8, 0.3, 1); z-index: 2; display: grid; justify-items: end; }
.track .me img { width: clamp(46px, 4.4vw, 62px); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5)); }
.track.rolling .me { animation: rollin 1.6s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes rollin { from { left: -6%; } }
.track .me img.swap { animation: carswap 0.45s ease-out; }
@keyframes carswap { 0% { transform: scale(0.6); opacity: 0.3; } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.ready { display: grid; justify-items: center; gap: 8px; margin-top: 12vh; text-align: center; animation: fadein 0.4s ease-out; }
.ready h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; font-style: italic; text-transform: uppercase; margin: 0; }
.ready p { color: var(--mid); margin: 0; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
.track .me span { position: absolute; bottom: 100%; right: 4px; font-weight: 800; font-style: italic; font-size: 14px; text-transform: uppercase; color: #fff; background: var(--red); padding: 0 6px; transform: skewX(var(--skew)); }
.track .tinfo { position: absolute; right: 7%; bottom: 6px; font-size: 13px; color: var(--ink); background: rgba(10, 10, 12, 0.82); padding: 2px 8px; font-weight: 600; z-index: 3; }
.track .tinfo b { font-weight: 800; }
.tlights { position: absolute; inset: 0; display: none; place-items: center; z-index: 4; background: rgba(8, 8, 9, 0.55); }
.tlights.on { display: grid; }
.tl { display: flex; gap: 12px; padding: 8px 14px; background: #050505; border: 1px solid var(--line2); }
.tl i { width: clamp(22px, 2.6vw, 34px); aspect-ratio: 1; border-radius: 50%; background: #2a1312; box-shadow: inset 0 0 0 3px #1c1c1f; }
.tl i.lit { background: radial-gradient(circle at 50% 45%, #fff2ea 0 10%, #ff4a35 26%, #d01a10 62%, #6e0a05 100%); box-shadow: inset 0 0 0 3px #1c1c1f, 0 0 20px 3px rgba(229, 38, 28, 0.5); }
.tlights .go { position: absolute; font-weight: 900; font-style: italic; font-size: 54px; color: var(--green); opacity: 0; }
.tlights.out .tl { opacity: 0; transition: opacity 0.1s; }
.tlights.out .go { opacity: 1; animation: bump 0.4s ease-out; }
.has-track .race { padding-top: 14px; }
.has-track .rig { width: min(100%, calc((100dvh - 236px - clamp(130px, 22vh, 210px) - 24px) * var(--aspect) + 22px)); }
.has-track .mask { width: min(100%, calc((100dvh - 236px - clamp(130px, 22vh, 210px) - 24px) * var(--aspect))); }
.has-track .ask > .board { width: min(100%, calc((100dvh - 330px - clamp(130px, 22vh, 210px) - 24px) * var(--aspect))); }
.snd { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line2); background: none; color: var(--dim); padding: 0; }
.snd svg { width: 18px; height: 18px; }
.snd:hover { color: var(--ink); }
@media (max-width: 760px) {
  .track { margin: 6px 12px 0; height: 120px; }
  .track .tinfo { font-size: 11px; right: 8%; bottom: 4px; }
  .has-track .read div:first-child { display: none; }
  .has-track .race { align-content: start; padding-top: 10px; }
  .snd { width: 30px; height: 30px; } .bar { gap: 10px; }
  .has-track .rig { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.track.cockpit { background: #000; border-radius: 6px; }
.track.cockpit canvas { image-rendering: auto; }

/* home: random covers drifting behind the title */
.hcopy { position: relative; isolation: isolate; }
.hcovers { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
 }
.hcovers img { position: absolute; aspect-ratio: 16 / 9; object-fit: cover; rotate: var(--r); opacity: 0; scale: 0.94; filter: saturate(0.85) blur(3px); transition: opacity 3s ease-in-out, scale 3s ease-out, filter 3s ease-out;
  border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6); animation: coverfloat ease-in-out infinite alternate; }
.hcovers img.in { opacity: 0.32; scale: 1; filter: saturate(0.85) blur(0); }
@keyframes coverfloat { from { transform: translate(0, 0); } to { transform: translate(var(--dx), var(--dy)); } }
@media (max-width: 760px) { .hcovers img.in { opacity: 0.2; } }

/* "Remove my game": present but quiet, close to the background */
.removegame summary { color: rgba(255, 255, 255, 0.22); }
.removegame summary:hover, .removegame[open] summary { color: rgba(255, 255, 255, 0.45); }
.removegame p { color: rgba(255, 255, 255, 0.4); }
.removegame p a { color: rgba(255, 255, 255, 0.55); }

/* ---------- Garage ---------- */
.garage { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
.g-scene { position: absolute; inset: 0; overflow: hidden; }
.wx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wx i { position: absolute; top: -5%; animation: fall linear infinite; }
.wx .drop { width: 2px; height: 22px; background: rgba(200, 220, 255, 0.6); }
.wx .flake { width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: 0.9; animation-name: snow; }
@keyframes fall { to { transform: translate(-40px, 115vh); } }
@keyframes snow { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(30px, 55vh) rotate(180deg); } 100% { transform: translate(-10px, 115vh) rotate(360deg); } }
.wx-rain::before, .wx-storm::before, .wx-cloudy::before { content: ''; position: absolute; inset: 0; background: rgba(40, 50, 70, 0.28); }
.wx .flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash 7s infinite; }
@keyframes flash { 0%, 90%, 94%, 100% { opacity: 0; } 91%, 93% { opacity: 0.6; } }
.g-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 22px; padding: 12px 20px; background: linear-gradient(rgba(12, 12, 13, 0.85), rgba(12, 12, 13, 0)); flex-wrap: wrap; }
.g-back, .g-out { color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.g-out { font-size: 13px; color: var(--mid); }
.g-stat { display: grid; line-height: 1.05; }
.g-stat b { font-size: 26px; font-weight: 800; font-style: italic; }
.g-stat small { color: var(--mid); font-size: 13px; }
.g-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.g-right .btn { padding: 10px 18px; font-size: 15px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.g-login { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 20px; text-align: center; }
.g-login p { max-width: 420px; color: var(--mid); margin: 0; }
.g-login form { display: grid; gap: 10px; width: min(340px, 90vw); }
.g-login input { background: var(--panel2); border: 1px solid var(--line2); color: var(--ink); padding: 12px 14px; font: inherit; font-size: 18px; }
.g-login .cta { justify-content: center; }
.g-err { color: #ff6b5e !important; min-height: 1.3em; }
.g-login .g-back { color: var(--mid); }

/* Garage 3D yard */
.g-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.g-load { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mid); background: var(--asph); }
.g-tip { position: fixed; left: 0; top: 0; translate: 14px -130%; pointer-events: none; background: rgba(12, 12, 13, 0.82); color: var(--ink); padding: 4px 10px; font-weight: 700; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; z-index: 5; }
.g-badge { position: fixed; left: 0; top: 0; width: 64px; margin: -32px 0 0 -32px; display: grid; justify-items: center; pointer-events: none; z-index: 4; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)); }
.g-badge svg { width: 64px; height: 64px; rotate: -90deg; }
.g-badge circle { fill: rgba(12, 12, 13, 0.78); stroke: rgba(255, 255, 255, 0.18); stroke-width: 5; }
.g-badge .g-ring { fill: none; stroke: var(--green); stroke-dasharray: 100; stroke-linecap: round; transition: stroke-dashoffset 0.2s linear; }
.g-badge span { margin-top: -44px; font-weight: 800; font-size: 14px; color: #fff; height: 24px; }
.g-badge::after { content: ''; width: 2px; height: 18px; background: rgba(255, 255, 255, 0.6); margin-top: 6px; }
.g-pop { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(3px); z-index: 6; animation: gfade 0.18s ease-out; }
.g-pop[hidden] { display: none; }
@keyframes gfade { from { opacity: 0; } }
@keyframes gpop { from { transform: scale(0.94); opacity: 0; } }
.g-studio { width: 100%; height: 100%; min-height: 360px; display: block; background: radial-gradient(70% 70% at 50% 45%, #3a3f48, #16181c); cursor: grab; }
.g-info { padding: 26px 26px 22px; display: grid; align-content: start; gap: 10px; overflow: auto; }
.g-info h3 { margin: 0; font-size: 32px; font-style: italic; text-transform: uppercase; line-height: 1; }
.g-info p { margin: 0; color: var(--mid); }
.g-x { position: absolute; top: 8px; right: 10px; z-index: 1; background: none; border: 0; color: var(--mid); font-size: 30px; line-height: 1; cursor: pointer; }
.g-x:hover { color: var(--ink); }
@media (max-width: 760px) { .g-studio { min-height: 240px; height: 240px; } }

.g-badge[hidden], .g-tip[hidden] { display: none; }

/* Hover level circle over a car part */
.g-lvl { position: fixed; left: 0; top: 0; width: 46px; height: 46px; margin: -78px 0 0 -23px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1; pointer-events: none; z-index: 5;
  background: radial-gradient(circle at 35% 30%, #ffe27a, #f2a516 60%, #b86f00); border: 3px solid #fff4c9; box-shadow: 0 4px 0 #6b4100, 0 8px 14px rgba(0,0,0,.45); color: #3b2300; }
.g-lvl small { font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.g-lvl b { font-size: 20px; font-weight: 900; }
.g-lvl::after { content: ''; position: absolute; left: 50%; bottom: -12px; translate: -50% 0; border: 7px solid transparent; border-top-color: #fff4c9; }
.g-lvl.pop { animation: lvlpop .22s cubic-bezier(.2,1.6,.4,1); }
.g-lvl[hidden] { display: none; }
@keyframes lvlpop { from { transform: scale(.4); opacity: 0; } }

/* ===== Garage: mechanic's work order (matches the game: asphalt, red accent, italic uppercase) ===== */
.g-wrench { display: inline-flex; gap: 4px; align-items: center; }
.g-wrench i { width: 14px; height: 22px; transform: skewX(var(--skew)); background: var(--line2); }
.g-wrench i.on { background: var(--red); box-shadow: 0 0 10px rgba(229, 38, 28, .45); }
.g-gear { background: none; border: 0; color: var(--mid); font-size: 22px; cursor: pointer; padding: 0 4px; }
.g-gear:hover { color: var(--ink); }
.g-menu { position: absolute; top: 58px; right: 16px; z-index: 7; background: var(--panel2); border: 1px solid var(--line2); padding: 6px; }
.g-menu button { display: block; width: 100%; background: none; border: 0; color: #ff6b5e; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 10px 14px; cursor: pointer; text-align: left; }
.g-menu button:hover { background: rgba(229, 38, 28, .12); }
.g-menu[hidden] { display: none; }

.wo-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); width: min(940px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  background: var(--panel); border: 1px solid var(--line2); border-top: 4px solid var(--red); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: gpop .24s cubic-bezier(.2,1.2,.4,1); }
.wo-small { display: block; width: min(420px, calc(100vw - 32px)); padding: 24px; }
.wo-small h3 { margin: 0 0 8px; font-style: italic; text-transform: uppercase; font-size: 26px; }
.wo-small p { color: var(--mid); margin: 0 0 18px; }
.wo-row { display: flex; gap: 10px; justify-content: flex-end; }
.wo-photo { position: relative; background: #0a0a0b; padding: 14px; border-right: 1px dashed var(--line2); }
.wo-photo canvas { width: 100%; height: 100%; min-height: 360px; display: block; border: 6px solid #e9e6dc; border-bottom-width: 22px; box-shadow: 0 6px 18px rgba(0,0,0,.5); transform: rotate(-1.2deg); background: #222; }
.wo-clip { position: absolute; top: 4px; left: 50%; width: 70px; height: 20px; translate: -50% 0; background: linear-gradient(#7d828a, #4b4f55); border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.wo-sheet { padding: 22px 24px 20px; display: grid; align-content: start; gap: 12px; overflow: auto;
  background: repeating-linear-gradient(transparent 0 31px, rgba(255,255,255,.035) 31px 32px), var(--panel); }
.wo-top { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line2); padding-bottom: 8px; }
.wo-sheet h3 { margin: 0; font-size: 38px; font-style: italic; text-transform: uppercase; line-height: 1; letter-spacing: -.01em; }
.wo-line { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; }
.wo-line > span:first-child { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.wo-line b { font-weight: 700; } .wo-line em { font-style: normal; font-family: 'JetBrains Mono', monospace; color: var(--mid); }
.wo-boxes { display: flex; gap: 6px; }
.wo-boxes span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--line2); font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--dim); }
.wo-boxes span.x { border-color: var(--ink); color: var(--ink); background: linear-gradient(45deg, transparent 46%, var(--red) 46% 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, var(--red) 46% 54%, transparent 54%); }
.wo-boxes span.w { border-color: var(--red); border-style: dashed; color: var(--red); }
.wo-gauge { height: 10px; background: var(--line); transform: skewX(var(--skew)); overflow: hidden; }
.wo-gauge i { display: block; height: 100%; background: var(--green); }
.wo-gauge.meh i { background: #e2b33a; } .wo-gauge.bad i { background: var(--red); }
.wo-job { display: grid; gap: 6px; padding: 12px 14px; border: 1px dashed var(--line2); background: rgba(0,0,0,.25); }
.wo-job > span { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.wo-job > b { font-size: 20px; font-style: italic; text-transform: uppercase; }
.wo-cost { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.wo-cost span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); display: grid; }
.wo-cost b { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--ink); letter-spacing: 0; text-transform: none; }
.wo-time { font-family: 'JetBrains Mono', monospace; font-size: 28px !important; color: var(--red); font-style: normal !important; }
.wo-stamp { justify-self: start; padding: 6px 14px; border: 3px solid var(--green); color: var(--green); font-weight: 900; font-size: 20px; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-6deg); }
.wo-acts { display: grid; gap: 8px; margin-top: 4px; }
.wo-btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border: 0; cursor: pointer; transform: skewX(var(--skew));
  background: var(--red); color: #fff; font-weight: 900; font-size: 20px; font-style: italic; text-transform: uppercase; letter-spacing: .04em; }
.wo-btn small { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-style: normal; text-transform: none; opacity: .85; }
.wo-btn:hover:not([disabled]) { filter: brightness(1.12); }
.wo-btn:active:not([disabled]) { transform: skewX(var(--skew)) translateY(2px); }
.wo-btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line2); font-size: 16px; padding: 10px 18px; }
.wo-btn.danger { background: var(--red); }
.wo-btn[disabled] { background: var(--line); color: var(--dim); cursor: not-allowed; }
.wo-why { margin: 0; color: #ff8a80; font-size: 13px; font-weight: 700; }
.wo-chores { position: absolute; left: 16px; top: 84px; z-index: 3; width: 250px; padding: 12px 14px; display: grid; gap: 6px;
  background: rgba(19, 19, 21, .92); border: 1px solid var(--line2); border-top: 3px solid var(--red); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.wo-chore { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; text-align: left; background: none; border: 0; color: var(--ink); padding: 6px 2px; cursor: default; font-weight: 700; }
.wo-chore small { display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--dim); font-weight: 400; }
.wo-chore.off, .wo-chore.done { color: var(--dim); }
.wo-chore[disabled] { cursor: default; color: var(--dim); }
.wo-check { width: 20px; height: 20px; border: 2px solid var(--line2); }
.wo-chore.done .wo-check { border-color: var(--green); background: linear-gradient(45deg, transparent 40%, var(--green) 40% 60%, transparent 60%), linear-gradient(-45deg, transparent 40%, var(--green) 40% 60%, transparent 60%); }
.wo-chore.done span:last-child { text-decoration: line-through; }
.g-warns { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.g-warn { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; display: grid; place-items: center; font-size: 16px; background: var(--red); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.5); animation: warnbob 1.2s ease-in-out infinite; }
@keyframes warnbob { 50% { margin-top: -6px; } }
@media (max-width: 760px) { .wo-card { grid-template-columns: 1fr; } .wo-photo canvas { min-height: 220px; height: 220px; } .wo-chores { top: auto; bottom: 12px; width: calc(100% - 32px); } }
.wo-sheet .wo-top { padding-right: 34px; }

/* ---------- Garage jobs: away badge, pay badge, fade, and the iPad (src/tablet.js) ---------- */
.g-badge span em { position: absolute; left: 50%; top: -30px; translate: -50% 0; white-space: nowrap; font-style: normal; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; background: rgba(12, 12, 13, 0.85); color: #fff; padding: 4px 10px; border-radius: 99px; }
.g-pay { position: fixed; left: 0; top: 0; margin: -22px 0 0 -40px; width: 80px; height: 44px; display: grid; place-items: center; pointer-events: none; z-index: 4; }
.g-pay b { display: grid; place-items: center; min-width: 64px; height: 40px; padding: 0 12px; border-radius: 99px; background: #ffc531; color: #3a2500; border: 3px solid #fff; font-size: 18px; font-weight: 900; box-shadow: 0 5px 12px rgba(0, 0, 0, 0.45); animation: paybob 0.9s ease-in-out infinite; }
.g-pay[hidden] { display: none; }
@keyframes paybob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.g-coin { position: fixed; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #ffc531; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); pointer-events: none; z-index: 9; }
.g-fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; z-index: 12; }
.g-fade.on { opacity: 1; pointer-events: auto; }
.g-letter { position: absolute; inset: 0; z-index: 13; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 16px; background: rgba(0, 0, 0, 0.35); animation: gfade 0.4s ease-out; }
.g-letter.put { opacity: 0; transition: opacity 0.5s ease, translate 0.5s ease; translate: 0 40px; }
.g-sheet { position: relative; width: min(520px, calc(100vw - 32px)); rotate: -1.5deg; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.g-paper { --lh: 27.55px; --pt: 28px; position: relative; box-sizing: border-box; width: 100%; max-height: calc(100vh - 140px); overflow: auto; padding: var(--pt) 30px 28px 38px; clip-path: polygon(0 0, calc(100% - 58px) 0, 100% 58px, 100% 100%, 0 100%); background: linear-gradient(180deg, transparent 49.3%, rgba(90, 70, 40, 0.14) 50%, rgba(255, 255, 255, 0.4) 50.6%, transparent 51.4%), linear-gradient(90deg, transparent 0 24px, rgba(200, 50, 55, 0.55) 24px 25.5px, transparent 25.5px), repeating-linear-gradient(180deg, transparent 0 calc(var(--lh) - 1px), rgba(70, 110, 170, 0.38) calc(var(--lh) - 1px) var(--lh)) 0 var(--pt), radial-gradient(circle, rgba(120, 90, 50, 0.07) 0 1px, transparent 1.5px) 0 0 / 7px 9px, #f4ecd8; background-attachment: local; color: #14203a; border-radius: 2px; font-family: 'Segoe Script', 'Bradley Hand', 'Snell Roundhand', cursive; font-size: 19px; line-height: var(--lh); }
.g-paper p { margin: 0 0 var(--lh); }
.g-paper p:first-child { padding-right: 40px; }
.g-paper .sig { text-align: right; margin: 0; font-size: 22px; }
.g-fold { position: absolute; top: 0; right: 0; width: 58px; height: 58px; background: linear-gradient(to bottom left, #8f7d55 0%, #b8a67c 18%, #d9cba6 55%, #e6dabb 100%); box-shadow: inset 1px -1px 0 rgba(60, 45, 20, 0.35); clip-path: polygon(0 0, 100% 100%, 0 100%); pointer-events: none; }
.g-lx { position: absolute; top: 25px; right: 27px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #8a1f1f; font: 900 20px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; cursor: pointer; transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
.g-lx:hover, .g-lx:focus-visible { transform: scale(1.2); }
.g-lx:focus-visible { outline: 2px solid #14203a; outline-offset: 2px; }
.g-hint { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; padding: 6px 12px; background: rgba(12, 12, 13, 0.85); border-radius: 3px; cursor: default; }
@media (max-width: 480px) { .g-paper { --lh: 24px; --pt: 22px; font-size: 17px; padding: var(--pt) 20px 22px 30px; } }
.g-teach { font-weight: 900; font-size: 20px; }
.g-hammer { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 5; }
.g-hammer span { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; display: grid; place-items: center; background: var(--red); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); }
.g-hammer span { font-size: 19px; line-height: 1; }
.tb { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(8, 10, 14, 0.5); backdrop-filter: blur(4px); animation: gfade 0.25s ease-out; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0; text-transform: none; user-select: none; }
.tb[hidden] { display: none; }
.tb.out { animation: tbfade 0.3s ease-in forwards; }
.tb-dev { width: min(900px, 92vw); height: min(640px, 86vh); padding: 16px; border-radius: 34px; background: #1b1d22; box-shadow: 0 0 0 2px #3a3d45, 0 30px 80px rgba(0, 0, 0, 0.6); animation: tbup 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.tb.out .tb-dev { animation: tbdown 0.3s ease-in forwards; }
@keyframes tbup { from { transform: translateY(105vh) rotate(7deg); } 70% { transform: translateY(-8px) rotate(-0.6deg); } to { transform: none; } }
@keyframes tbdown { to { transform: translateY(105vh) rotate(5deg); } }
@keyframes tbfade { to { background: rgba(8, 10, 14, 0); backdrop-filter: blur(0); } }
.tb-screen { position: relative; height: 100%; border-radius: 20px; overflow: hidden; background: #f4f6fa; color: #1c2230; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
.tb-status { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px 4px; font-size: 13px; font-weight: 700; color: #1c2230; }
.tb-icons { display: flex; gap: 8px; align-items: center; }
.tb-banner { position: absolute; left: 50%; top: 34px; translate: -50% -160%; width: min(520px, 86%); padding: 12px 16px; border-radius: 16px; background: #1c2230; color: #fff; font-size: 14px; font-weight: 700; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transition: translate 0.35s cubic-bezier(0.2, 0.9, 0.3, 1); z-index: 3; }
.tb-banner.on { translate: -50% 0; }
.tb-head { display: flex; align-items: center; gap: 10px; padding: 8px 22px 12px; }
.tb-head b { font-size: 22px; font-weight: 900; }
.tb-head small { margin-left: auto; font-size: 13px; color: #6d7688; font-weight: 600; }
.tb-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #ff8a3d, #f6453f); color: #fff; font-weight: 900; font-size: 19px; }
.tb-body { overflow: hidden auto; padding: 0 18px 12px; overscroll-behavior: contain; }
.tb-list { display: grid; gap: 10px; }
.tb-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(20, 30, 50, 0.12); cursor: pointer; }
.tb-card.open { box-shadow: 0 0 0 2px #2f7df6, 0 6px 18px rgba(47, 125, 246, 0.18); }
.tb-card.locked { background: #eceef2; box-shadow: none; }
.tb-card.locked .tb-av, .tb-card.locked .tb-pay, .tb-card.locked .tb-row, .tb-card.locked .tb-msg { opacity: 0.5; filter: grayscale(1); }
.tb-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; flex: none; }
.tb-row { display: flex; align-items: baseline; gap: 8px; }
.tb-row b { font-size: 16px; font-weight: 800; }
.tb-row span { font-size: 13px; color: #6d7688; font-weight: 600; }
.tb-msg { margin: 2px 0 6px; font-size: 14px; color: #47505f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-card.open .tb-msg { white-space: normal; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #e3e6ec; color: #7b8494; }
.tb-chip.ok { background: #dcf5e4; color: #1d8a47; }
.tb-pay { font-size: 21px; font-weight: 900; white-space: nowrap; color: #1c2230; }
.tb-more, .tb-card > .tb-why { grid-column: 1 / -1; }
.tb-more { padding-top: 8px; }
.tb-why { margin: 0; font-size: 13px; font-weight: 600; color: #8a92a0; }
.tb-send { width: 100%; height: 50px; border: 0; border-radius: 14px; background: #2f7df6; color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.tb-send:hover { background: #1f6be0; }
.tb-send.done { background: #1d8a47; }
.tb-send.ghost { width: auto; padding: 0 24px; background: #e3e6ec; color: #1c2230; }
.tb-tabs { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #e0e3ea; background: #fff; }
.tb-tabs button { height: 46px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 800; color: #8a92a0; cursor: pointer; }
.tb-tabs button.on { color: #2f7df6; box-shadow: inset 0 3px 0 #2f7df6; }
.tb-home { height: 22px; display: grid; place-items: center; background: #fff; cursor: grab; touch-action: none; }
.tb-home i { width: 140px; height: 5px; border-radius: 99px; background: #1c2230; }
.tb-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; color: #6d7688; font-size: 17px; font-weight: 700; }
.tb-empty p { margin: 0; }
.tb-cur { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; }
.tb-map { width: 100%; height: 100%; border-radius: 16px; display: block; }
.tb-map text { font-size: 15px; font-weight: 800; fill: #1c2230; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.tb-curinfo { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(20, 30, 50, 0.12); }
.tb-curinfo div { display: grid; }
.tb-curinfo b { font-size: 17px; font-weight: 800; }
.tb-curinfo span { font-size: 13px; color: #6d7688; font-weight: 600; }
.tb-left { margin-left: auto; text-align: right; }
.tb-left b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.g-badge span { position: relative; }
.tb-banner { opacity: 0; } .tb-banner.on { opacity: 1; }
.tb-body { scrollbar-width: thin; scrollbar-color: #c3c8d2 transparent; padding-top: 4px; }
.tb-curinfo .tb-av { color: #fff; font-size: 20px; font-weight: 800; }
