*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#04040e;--s1:rgba(255,255,255,0.04);--s2:rgba(255,255,255,0.08);
  --border:rgba(255,255,255,0.1);--border2:rgba(255,255,255,0.22);
  --cyan:#00f5ff;--pink:#ff0090;--lime:#39ff14;--gold:#ffd700;
  --purple:#a855f7;--orange:#ff6600;--red:#ff2442;
  /* Leaderboard: podium metals + the "that's you" blue */
  --silver:#c9d4e0;--bronze:#cd7f32;--blue:#3b82f6;
  --text:#fff;--dim:rgba(255,255,255,0.55);--dimmer:rgba(255,255,255,0.28);
  --fd:'Orbitron',monospace;--fb:'Rajdhani',sans-serif;--r:12px;--rl:18px;
  /* Reaction Time's state colors. Named by MEANING, not hue, so the
     colorblind-safe palette can repoint them without touching the game. */
  --rx-wait:var(--red);--rx-go:var(--lime);--rx-early:var(--orange);--rx-hit:var(--cyan)
}

/* ── 🎨 COLORBLIND-SAFE PALETTE ──
   Okabe-Ito derived: the red/green pair that carries meaning in this game
   becomes blue/orange, which stays distinguishable for all three common
   types of color vision deficiency. Neon character is kept where it's
   decorative; only the load-bearing signals are repointed. */
html.cb-safe{
  --cyan:#56b4e9;--pink:#cc79a7;--lime:#f0e442;--gold:#e69f00;
  --purple:#9a7fd1;--orange:#e69f00;--red:#0072b2;
  --rx-wait:#0072b2;--rx-go:#f0e442;--rx-early:#e69f00;--rx-hit:#56b4e9;
}
html,body{height:100%;background:var(--bg);color:var(--text);font-family:var(--fb);overflow:hidden;-webkit-font-smoothing:antialiased}
/* 📱 v131 · An iPhone turned on its side enlarges a page's text on its own unless told not to, so every
   layout here — measured and fitted upright — met different type in landscape than it was built for. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* ── ⬍ SCROLLBARS ──
   The browser default (grey thumb, white track) is the one piece of chrome
   that ignores the palette, and it shows on every scrolling surface: .screen,
   .market-body, .lb-panel, .mp-body, .fb-modal, .fb-textarea. Same neon
   gradient + glow as the rest of the UI. Colors are palette vars, so the
   cb-safe overrides above repoint the scrollbar for free. */
:root{--sb-track:rgba(255,255,255,.04);--sb-glow:rgba(0,245,255,.4)}
html.cb-safe{--sb-glow:rgba(86,180,233,.4)}

/* Firefox has no ::-webkit-scrollbar, so it gets the flat-accent fallback.
   Scoped to browsers that lack the pseudo-element on purpose: Chrome ignores
   every ::-webkit-scrollbar rule on any element that sets scrollbar-width or
   scrollbar-color, and both properties inherit — setting them on <html> would
   silently kill the gradient everywhere. */
@supports not selector(::-webkit-scrollbar){
  html{scrollbar-width:thin;scrollbar-color:var(--cyan) var(--sb-track)}
  .fb-modal{scrollbar-color:var(--lime) var(--sb-track)}
}

::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:var(--sb-track);border-radius:10px;box-shadow:inset 0 0 0 1px var(--border)}
::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,var(--cyan),var(--purple));
  border:2px solid transparent;background-clip:padding-box;border-radius:10px;
  box-shadow:0 0 8px var(--sb-glow)
}
::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,var(--pink),var(--cyan));background-clip:padding-box;box-shadow:0 0 14px var(--sb-glow)}
::-webkit-scrollbar-thumb:active{background:linear-gradient(180deg,var(--pink),var(--purple));background-clip:padding-box}
::-webkit-scrollbar-corner{background:transparent}

/* Form fields are small — a 10px bar swamps them. */
textarea::-webkit-scrollbar,select::-webkit-scrollbar,.input::-webkit-scrollbar{width:7px;height:7px}
textarea::-webkit-scrollbar-thumb,select::-webkit-scrollbar-thumb,.input::-webkit-scrollbar-thumb{border-width:1px}

/* The feedback modal is lime-accented, so its scrollbar follows suit. */
.fb-modal::-webkit-scrollbar-thumb{background:linear-gradient(180deg,var(--lime),var(--cyan));background-clip:padding-box;box-shadow:0 0 8px rgba(57,255,20,.35)}
.fb-modal::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,var(--cyan),var(--lime));background-clip:padding-box;box-shadow:0 0 14px rgba(57,255,20,.5)}
#bg-canvas{position:fixed;inset:0;z-index:0;pointer-events:none}

/* ── SCREEN SYSTEM ── */
/* 📱 v131 · A SCREEN THAT IS NOT UP IS HIDDEN, NOT JUST CLEAR. All six screens
   are laid out and painted all the time, and opacity:0 only made the five that
   are not up see-through: an iPhone kept a compositing layer, with a bitmap
   behind it, for every 3D-lifted card, glyph and dialog in all of them (the 3D
   chrome's translateZ() and perspective(), § 3D MODE), and with every sheet's
   (.fb-overlay, below). Those layers are WIDER in landscape. Measured on the
   Flight Deck in phone emulation at 3 pixels a point: 1,043 MB of composited
   layer area on an 844×340 screen against 850 MB on a 390×664 one, ~460 MB of
   it in screens and sheets nobody could see — and turning the phone over is
   what got the tab killed ("Can't open this page" / "A problem repeatedly
   occurred"). WebKit's own diagnosis of a page that crashed in landscape only
   (bug 232374): "large numbers of layers which are much bigger in landscape,
   triggering jetsam of the web content process". visibility:hidden paints
   nothing and keeps the layout, so whatever measures a screen before it comes
   up still can. It turns AFTER the fade-out (the delay on the way out, none on
   the way in), so a screen still fades both ways; and a screen that is not up
   is out of the tab order now as well as inert. */
.screen{position:fixed;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;overflow-y:auto;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .3s ease,transform .3s ease,visibility 0s linear .3s;transform:translateY(10px)}
.screen.active{opacity:1;visibility:visible;pointer-events:all;transform:translateY(0);transition:opacity .3s ease,transform .3s ease,visibility 0s}

/* ── TYPE ── */
.logo{font-family:var(--fd);font-weight:900;font-size:clamp(1.8rem,5vw,3.5rem);background:linear-gradient(90deg,var(--cyan),var(--pink));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;letter-spacing:.05em;line-height:1;text-align:center}
.tagline{font-family:var(--fd);font-size:.55rem;letter-spacing:.3em;color:var(--dim);text-transform:uppercase;margin-top:14px;text-align:center}
.sec-label{font-family:var(--fd);font-size:.6rem;font-weight:700;color:var(--cyan);letter-spacing:.2em;text-transform:uppercase;margin-bottom:20px}

/* ── BUTTONS ── */
.btn{font-family:var(--fd);font-size:.7rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:11px 26px;border:none;border-radius:8px;cursor:pointer;transition:all .2s ease;white-space:nowrap}
.btn-primary{background:linear-gradient(135deg,var(--cyan),var(--purple));color:#000;box-shadow:0 0 20px rgba(0,245,255,.25)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 0 35px rgba(0,245,255,.45)}
.btn-primary:active{transform:scale(.96)}
.btn-secondary{background:var(--s2);color:var(--text);border:1px solid var(--border)}
.btn-secondary:hover{background:rgba(255,255,255,.14);border-color:var(--border2)}
.btn-full{width:100%}.btn-lg{padding:14px 36px;font-size:.8rem}.btn-sm{padding:7px 16px;font-size:.6rem}

/* ── CARD / INPUT ── */
.card{background:var(--s1);border:1px solid var(--border);border-radius:var(--rl);backdrop-filter:blur(20px);padding:24px}
.input{width:100%;background:var(--s2);border:1.5px solid var(--border);border-radius:8px;color:var(--text);font-family:var(--fb);font-size:1rem;font-weight:600;padding:11px 16px;outline:none;transition:border-color .2s,box-shadow .2s}
.input::placeholder{color:var(--dimmer)}
.input:focus{border-color:var(--cyan);box-shadow:0 0 0 3px rgba(0,245,255,.1)}
.input-label{display:block;font-size:.7rem;font-weight:600;color:var(--dim);letter-spacing:.12em;text-transform:uppercase;margin-bottom:9px;font-family:var(--fd)}
.field{margin-bottom:18px}

/* ── AUTH SCREEN ── */
#auth-screen .wrap{width:100%;max-width:400px;text-align:center}
.auth-icon{font-size:4rem;display:block;margin-bottom:16px;animation:float 3s ease-in-out infinite}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
.auth-tabs{display:flex;gap:8px;margin-bottom:22px}
.auth-tab{flex:1;font-family:var(--fd);font-size:.65rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:10px;background:var(--s2);border:1px solid var(--border);border-radius:8px;color:var(--dim);cursor:pointer;transition:all .2s}
.auth-tab.active{background:rgba(0,245,255,.1);border-color:var(--cyan);color:var(--cyan)}
.auth-err{min-height:20px;font-size:.8rem;color:var(--pink);font-weight:600;margin-top:10px;text-align:center}
/* ✨ v97 · forgot password: the link, a good-news line, and the new-password panel */
.auth-forgot{display:block;margin:-6px 0 14px auto;background:none;border:0;padding:2px 0;color:var(--cyan);font:inherit;font-size:.72rem;letter-spacing:.04em;cursor:pointer;opacity:.85}
.auth-forgot:hover{opacity:1;text-decoration:underline}
.auth-forgot:disabled{opacity:.4;cursor:default;text-decoration:none}
.auth-err.auth-note{color:var(--lime)}
.pw-modal{position:fixed;inset:0;z-index:10050;display:flex;align-items:center;justify-content:center;background:rgba(3,4,12,.84);padding:16px}
.pw-modal .card{width:min(420px,100%)}
.pw-reset-title{font-family:var(--fd),monospace;font-size:1rem;letter-spacing:.08em;margin-bottom:4px}
.pw-reset-for{font-size:.78rem;color:var(--dimmer);margin-bottom:16px;word-break:break-all}
.auth-divider{display:flex;align-items:center;gap:12px;margin:16px 0 14px;font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.28em;text-transform:uppercase;color:var(--dimmer)}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:var(--border)}
.btn-guest{background:rgba(57,255,20,.08);color:var(--lime);border:1px solid rgba(57,255,20,.45)}
.btn-guest:hover:not(:disabled){background:rgba(57,255,20,.16);border-color:var(--lime);transform:translateY(-2px);box-shadow:0 0 30px rgba(57,255,20,.25)}
.btn-guest:active:not(:disabled){transform:scale(.96)}
.btn-guest:disabled{opacity:.5;cursor:progress;transform:none;box-shadow:none}
.guest-note{font-size:.72rem;color:var(--dimmer);text-align:center;margin-top:10px;line-height:1.4}
/* ✨ v169 · THE SIGN-IN SCREEN, FROM ITS TOP. It was centred by .screen's justify-content, and a column taller than
   the window overflows a centred flexbox at BOTH ends: what goes over the top cannot be scrolled to. On an iPhone 13
   the logo was 32 px above the screen's edge, on an iPhone SE 116, on a 1366 × 768 laptop the 🎮 was gone. Auto
   margins centre the column while it fits and fall to zero when it does not, so it starts at the top and scrolls.
   The guest door comes first (index.html), the sign-in card after it, the Terms and Privacy links under both. */
#auth-screen{justify-content:flex-start}
#auth-screen .wrap{margin-top:auto;margin-bottom:auto}
.guest-door{margin-top:18px}
.auth-divider-out{margin:18px 0 16px}
.auth-legal{margin:16px 0 0;font-size:.72rem;line-height:1.5;color:var(--dimmer)}
.auth-legal a,.set-legal a{color:var(--cyan)}
/* ⏳ v142 · A SLOW BOOT, SAID. index.html's watchdog reveals .boot-wait-in six seconds into a boot that has not
   finished and marks the sign-in buttons aria-disabled; app.js puts both away when it runs. A bar fixed to the
   bottom edge, as the offline banner is, and a child of <body> rather than of the screen: this screen is centred
   and taller than a phone, so a note in its flow would sit below the fold and shove the logo off the top, and the
   screen's own transform would make `fixed` mean "fixed to the screen". Gold, like the other notes on this screen
   (.cl-auth): news about the visit, not a fault of the player's. The outer box lets the pointer through; only the
   note itself takes it. The <noscript> line is the same box. No animation, so Reduce Motion has nothing to take away. */
.boot-wait{position:fixed;left:0;right:0;bottom:0;z-index:9000;padding:0 12px;pointer-events:none}
.boot-wait-in{pointer-events:auto;max-width:400px;margin:0 auto calc(12px + env(safe-area-inset-bottom,0px));padding:12px 14px;text-align:center;border:1px solid rgba(255,215,0,.5);border-radius:var(--r);background:linear-gradient(135deg,rgba(255,215,0,.13),rgba(255,0,144,.08)),#07071a;box-shadow:0 0 24px rgba(255,215,0,.12)}
.boot-wait [hidden]{display:none !important}
.boot-wait-msg{font-size:.82rem;line-height:1.45;color:var(--text)}
.boot-wait-btns{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:10px}
/* Dead until app.js runs: dimmed as the network-only doors are offline, and no lift under the pointer (an ID outranks
   the 3D buttons' :hover transform). */
#auth-screen button[aria-disabled="true"]{opacity:.45;filter:grayscale(.7);cursor:progress;transform:none}

/* ── OFFLINE / LOCAL ENTRY BUTTONS ──
   These two are built in JS, and their labels are longer than the ~350px the
   auth card gives them — "Continue Offline as <name>" carries a username of up
   to 20 characters. They inherit .btn's white-space:nowrap, so the label used
   to spill straight past the rounded border instead of stopping at it.
   Trimming the oversized .btn-lg side padding buys back room, and overflow
   +text-overflow turn whatever still doesn't fit into an ellipsis. */
#btn-offline-resume,#btn-local-play{padding-left:14px;padding-right:14px;overflow:hidden;text-overflow:ellipsis}
/* Laid out as a row so the two halves can be told apart: the static part keeps
   its full width and only the username is clipped, which means the button
   always still reads "CONTINUE OFFLINE AS …" rather than losing the verb. */
#btn-offline-resume{display:flex;align-items:center;justify-content:center;gap:.5ch}
#btn-offline-resume .ofr-label{flex:0 0 auto}
#btn-offline-resume .ofr-name{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-guest-tag{background:rgba(57,255,20,.1);border:1px solid rgba(57,255,20,.35);border-radius:20px;padding:4px 10px;font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.12em;color:var(--lime)}

/* ── HUB SCREEN ── */
#hub-screen{justify-content:flex-start;padding-top:20px}
.hub-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;max-width:1060px;background:var(--s1);border:1px solid var(--border);border-radius:var(--r);padding:12px 20px;margin-bottom:20px;flex-shrink:0}
.hub-logo-sm{font-family:var(--fd);font-size:.85rem;font-weight:900;background:linear-gradient(90deg,var(--cyan),var(--pink));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.hub-right{display:flex;align-items:center;gap:10px}
.hub-uname{font-family:var(--fd);font-size:.65rem;color:var(--cyan)}
.hub-pts{background:rgba(255,215,0,.1);border:1px solid rgba(255,215,0,.3);border-radius:20px;padding:5px 14px;font-family:var(--fd);font-size:.6rem;font-weight:700;color:var(--gold)}
.hub-credits{background:rgba(0,245,255,.08);border:1px solid rgba(0,245,255,.3);border-radius:20px;padding:5px 14px;font-family:var(--fd);font-size:.6rem;font-weight:700;color:var(--cyan)}

/* ── BLACK MARKET SCREEN ── */
#market-screen{justify-content:flex-start;padding-top:20px}
.market-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;max-width:1060px;background:var(--s1);border:1px solid var(--border);border-radius:var(--r);padding:12px 20px;margin-bottom:16px;flex-shrink:0}
.market-title{font-family:var(--fd);font-size:.9rem;font-weight:900;letter-spacing:.08em;background:linear-gradient(90deg,var(--gold),var(--orange));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.market-bal{display:flex;gap:10px;font-family:var(--fd);font-size:.62rem;font-weight:700;color:var(--dim);flex-wrap:wrap}
.market-bal span{background:var(--s2);border:1px solid var(--border);border-radius:20px;padding:5px 14px}
.market-tabs{display:flex;gap:8px;width:100%;max-width:1060px;margin-bottom:16px;flex-wrap:wrap;flex-shrink:0}
.market-tab{font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:10px 18px;background:var(--s2);border:1px solid var(--border);border-radius:8px;color:var(--dim);cursor:pointer;transition:all .2s}
.market-tab:hover{border-color:var(--border2);color:var(--text)}
.market-tab.active{background:rgba(255,215,0,.1);border-color:var(--gold);color:var(--gold)}
.market-body{width:100%;max-width:1060px;flex:1;overflow-y:auto;padding-bottom:20px}
.market-panel{display:none}
.market-panel.active{display:block}
.convert-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}
.convert-card{text-align:center}
.convert-rate{font-family:var(--fd);font-size:.6rem;color:var(--gold);letter-spacing:.1em;margin:12px 0 20px}
.convert-preview{font-family:var(--fd);font-size:1rem;color:var(--cyan);margin:16px 0;font-weight:700}
.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:18px 14px}
.shop-card{position:relative;background:var(--s1);border:1px solid var(--border);border-radius:var(--rl);padding:20px 14px;text-align:center;transition:all .2s ease}
.shop-card.equipped{border-color:var(--gold);box-shadow:0 8px 24px rgba(255,215,0,.15)}
.shop-swatch{width:56px;height:56px;border-radius:50%;margin:0 auto 12px;border:2px solid rgba(255,255,255,.2)}
.shop-emoji{font-size:2.4rem;margin-bottom:10px}
.shop-name{font-family:var(--fd);font-size:.62rem;font-weight:700;margin-bottom:11px;letter-spacing:.04em}
.shop-tag{display:inline-block;font-family:var(--fd);font-size:.5rem;color:var(--gold);border:1px solid var(--gold);border-radius:20px;padding:2px 10px;margin-bottom:10px;letter-spacing:.1em}
.shop-btn{width:100%}

/* ── RARITY TIERS (pricier Black Market items get flashier treatment) ── */
.rarity-badge{display:inline-block;font-family:var(--fd);font-size:.48rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;padding:2px 10px;border-radius:20px;margin-bottom:8px}
.rarity-badge.rare{color:var(--cyan);border:1px solid var(--cyan);background:rgba(0,245,255,.08)}
.rarity-badge.epic{color:#e879f9;border:1px solid #e879f9;background:rgba(232,121,249,.08)}
/* LEGENDARY badge — the shimmer IS the text: the gradient is clipped to the
   glyphs, so this badge's `background-image` is not decoration that can be
   swapped out, it is the only thing painting the word. Two consequences the
   rules below have to respect:
     · the pill can have no background FILL — background-clip:text clips every
       background layer, colour included — so the tint arrives as an inset
       shadow, which paints over the background box and under the text.
     · any later rule that sets `background-image` on .rarity-badge erases the
       word entirely (see the mode-3d override further down).
   `color` is the safety net for engines without background-clip:text, where
   -webkit-text-fill-color is skipped and the flat gold shows instead. */
.rarity-badge.legendary{
  --legend-shimmer:linear-gradient(90deg,var(--gold),var(--pink),var(--cyan),var(--gold));
  position:relative;color:var(--gold);border:1px solid var(--gold);
  box-shadow:inset 0 0 0 20px rgba(255,215,0,.10);
  background-image:var(--legend-shimmer);background-size:300% 100%;
  -webkit-background-clip:text;background-clip:text;
  filter:drop-shadow(0 0 3px rgba(255,215,0,.5));
  animation:legendary-text-shift 3s linear infinite
}
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  .rarity-badge.legendary{-webkit-text-fill-color:transparent}
}
@keyframes legendary-text-shift{0%{background-position:0% 50%}100%{background-position:300% 50%}}

/* RARE — gentle cyan breathing glow */
@keyframes pulse-rare{0%,100%{box-shadow:0 0 0 rgba(0,245,255,0)}50%{box-shadow:0 0 16px rgba(0,245,255,.4)}}
.shop-card.rarity-rare{animation:pulse-rare 2.6s ease-in-out infinite}

/* EPIC — stronger glow + a diagonal light sweep across the card */
@keyframes pulse-epic{0%,100%{box-shadow:0 0 0 rgba(232,121,249,0)}50%{box-shadow:0 0 24px rgba(232,121,249,.45)}}
.shop-card.rarity-epic{animation:pulse-epic 2.2s ease-in-out infinite;overflow:hidden}
.shop-card.rarity-epic::after{content:'';position:absolute;top:0;left:-150%;width:60%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.28),transparent);animation:shimmer-sweep 2.6s ease-in-out infinite;pointer-effects:none}
@keyframes shimmer-sweep{0%{left:-150%}60%,100%{left:150%}}

/* LEGENDARY — pulsing gold glow + colour-shifting badge text (no rotation) */
.shop-card.rarity-legendary{border-color:var(--gold);animation:pulse-legendary 2.2s ease-in-out infinite}
@keyframes pulse-legendary{0%,100%{box-shadow:0 0 20px rgba(255,215,0,.22)}50%{box-shadow:0 0 38px rgba(255,215,0,.5)}}
.shop-card.rarity-legendary .shop-emoji{animation:float-icon 2.4s ease-in-out infinite}
@keyframes float-icon{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-6px) scale(1.08)}}

/* Matrix Cascade — animated "digital rain" swatch, always legendary tier */
.shop-swatch.matrix-swatch{background:repeating-linear-gradient(0deg,rgba(0,255,65,.95) 0 2px,rgba(0,20,5,.95) 2px 6px);background-size:100% 24px;box-shadow:0 0 20px rgba(0,255,65,.6);animation:matrix-fall 1s linear infinite,pulse-legendary 2.2s ease-in-out infinite,float-icon 2.4s ease-in-out infinite}
@keyframes matrix-fall{0%{background-position:0 0}100%{background-position:0 24px}}

/* ── ANIMATED EQUIPPED CURSORS (epic & legendary tiers) ── */
#custom-cursor-fx{position:fixed;top:0;left:0;display:none;pointer-events:none;z-index:99999;transform:translate(-50%,-50%)}
.ccur-epic{font-size:26px;filter:drop-shadow(0 0 6px #e879f9)}
.ccur-epic .ccur-inner{display:inline-block;animation:ccur-epic-spin 1.2s ease-in-out infinite}
@keyframes ccur-epic-spin{0%,100%{transform:scale(1) rotate(0deg)}50%{transform:scale(1.3) rotate(180deg)}}
.ccur-legendary .ccur-code{font-family:var(--fd),monospace;font-size:12px;font-weight:700;letter-spacing:2px;color:#00ff41;text-shadow:0 0 6px #00ff41,0 0 14px #00ff41;white-space:nowrap;display:inline-block;animation:ccur-code-flicker 1.4s ease-in-out infinite}
@keyframes ccur-code-flicker{0%,100%{opacity:1;transform:translateY(0)}50%{opacity:.75;transform:translateY(-3px)}}

/* ── HUB BODY (Leaderboard & Games) ── */
.hub-body{display:grid;grid-template-columns:1fr 300px;gap:26px;width:100%;max-width:1060px}
.games-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;align-content:start}
.game-card{background:var(--s1);border:1px solid var(--border);border-radius:var(--rl);padding:22px 16px;text-align:center;cursor:pointer;transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease;position:relative;overflow:hidden}
.game-card:hover{transform:translateY(-5px) scale(1.02)}
.game-card[data-c="cyan"]:hover  {border-color:var(--cyan);  box-shadow:0 8px 30px rgba(0,245,255,.2)}
.game-card[data-c="pink"]:hover  {border-color:var(--pink);  box-shadow:0 8px 30px rgba(255,0,144,.2)}
.game-card[data-c="lime"]:hover  {border-color:var(--lime);  box-shadow:0 8px 30px rgba(57,255,20,.2)}
.game-card[data-c="gold"]:hover  {border-color:var(--gold);  box-shadow:0 8px 30px rgba(255,215,0,.2)}
.game-card[data-c="purple"]:hover{border-color:var(--purple);box-shadow:0 8px 30px rgba(168,85,247,.2)}
.game-card[data-c="orange"]:hover{border-color:var(--orange);box-shadow:0 8px 30px rgba(255,102,0,.2)}
.game-card[data-c="red"]:hover   {border-color:var(--red);   box-shadow:0 8px 30px rgba(255,36,66,.2)}
.gc-icon{font-size:2.8rem;display:block;margin-bottom:12px}
.gc-name{font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.08em;margin-bottom:11px}
.gc-name[data-c="cyan"]  {color:var(--cyan)}
.gc-name[data-c="pink"]  {color:var(--pink)}
.gc-name[data-c="lime"]  {color:var(--lime)}
.gc-name[data-c="gold"]  {color:var(--gold)}
.gc-name[data-c="purple"]{color:var(--purple)}
.gc-name[data-c="orange"]{color:var(--orange)}
.gc-name[data-c="red"]   {color:var(--red)}
.gc-desc{font-size:.75rem;color:var(--dim);line-height:1.45;margin-bottom:15px}
.gc-pts{display:inline-block;padding:3px 12px;border-radius:20px;font-family:var(--fd);font-size:.5rem;font-weight:700;border:1px solid}
.gc-pts[data-c="cyan"]  {color:var(--cyan);  border-color:var(--cyan);  background:rgba(0,245,255,.06)}
.gc-pts[data-c="pink"]  {color:var(--pink);  border-color:var(--pink);  background:rgba(255,0,144,.06)}
.gc-pts[data-c="lime"]  {color:var(--lime);  border-color:var(--lime);  background:rgba(57,255,20,.06)}
.gc-pts[data-c="gold"]  {color:var(--gold);  border-color:var(--gold);  background:rgba(255,215,0,.06)}
.gc-pts[data-c="purple"]{color:var(--purple);border-color:var(--purple);background:rgba(168,85,247,.06)}
.gc-pts[data-c="orange"]{color:var(--orange);border-color:var(--orange);background:rgba(255,102,0,.06)}
.gc-pts[data-c="red"]   {color:var(--red);   border-color:var(--red);   background:rgba(255,36,66,.06)}

/* ── LEADERBOARD ── */
.lb-panel{background:var(--s1);border:1px solid var(--border);border-radius:var(--rl);padding:18px;overflow-y:auto;max-height:520px}
.lb-title{font-family:var(--fd);font-size:.65rem;font-weight:700;color:var(--gold);letter-spacing:.15em;text-transform:uppercase;margin-bottom:14px;text-align:center}
.lb-row{position:relative;display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;border:1px solid var(--border);background:var(--s2);margin-bottom:7px}

/* "You" is declared before the podium tints on purpose: a logged-in player
   who is also on the podium keeps their medal colour on the row, and the blue
   shows as the edge marker, name and glow instead of overwriting it. */
.lb-row.me{border-color:var(--blue);background:rgba(59,130,246,.07)}
.lb-row.me .lb-name{color:var(--blue)}
/* The glow would swamp a medal tint, so only a player outside the top three
   gets it — on the podium the edge marker and blue name carry the signal. */
.lb-row.me:not(.r1):not(.r2):not(.r3){box-shadow:0 0 14px rgba(59,130,246,.18)}
.lb-row.me::before{content:'';position:absolute;left:0;top:7px;bottom:7px;width:3px;border-radius:0 3px 3px 0;background:var(--blue);box-shadow:0 0 8px var(--blue)}

/* Podium: gold, silver, bronze. */
.lb-row.r1{border-color:rgba(255,215,0,.55);background:rgba(255,215,0,.07)}
.lb-row.r2{border-color:rgba(201,212,224,.7);background:rgba(201,212,224,.09)}
.lb-row.r3{border-color:rgba(205,127,50,.6);background:rgba(205,127,50,.08)}
.lb-row.r1 .lb-score{color:var(--gold)}
.lb-row.r2 .lb-score{color:var(--silver)}
.lb-row.r3 .lb-score{color:var(--bronze)}

.lb-rank{font-family:var(--fd);font-size:.9rem;font-weight:900;width:26px;text-align:center;color:var(--dimmer)}
.lb-name{flex:1;font-weight:700;font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-score{font-family:var(--fd);font-size:.65rem;color:var(--gold)}
.lb-fresh{margin:-8px 0 12px;text-align:center;font-size:.58rem;color:var(--dim);letter-spacing:.04em}
.lb-refresh{background:none;border:0;padding:4px 2px;font:inherit;color:var(--cyan);cursor:pointer;text-decoration:underline}
.lb-refresh:hover,.lb-refresh:focus-visible{color:var(--text)}
@media (pointer:coarse){.lb-refresh{padding:10px 6px}}
.lb-empty{color:var(--dim);font-size:.82rem;text-align:center;padding:30px 0}

/* ── DIFFICULTY SELECTOR ── */
.difficulty-selector{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:20px;
}
.difficulty-label{
  font-family:var(--fd);
  font-size:.65rem;
  color:var(--dim);
  text-transform:uppercase;
  letter-spacing:.1em;
}
.difficulty-options{
  display:flex;
  gap:8px;
}
.diff-btn{
  font-family:var(--fd);
  font-size:.65rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:10px 16px;
  border:none;
  border-radius:6px;
  background:var(--s2);
  color:var(--text);
  cursor:pointer;
  transition:all .2s;
  position:relative;
  overflow:hidden;
}
.diff-btn:hover{
  background:rgba(255,255,255,.14);
  border-color:var(--border2);
  transform:translateY(-2px);
}
.diff-btn:active{
  transform:scale(0.96);
}
.diff-btn.stable-active{
  background:rgba(0,255,102,.1);
  color:#00ff66;
  box-shadow:0 0 10px #00ff66;
}
.diff-btn.stable-active:hover{
  box-shadow:0 0 15px #00ff66;
}
.diff-btn.overclock-active{
  background:rgba(255,204,0,.1);
  color:#ffcc00;
  box-shadow:0 0 10px #ffcc00;
}
.diff-btn.overclock-active:hover{
  box-shadow:0 0 15px #ffcc00;
}
.diff-btn.meltdown-active{
  background:rgba(255,0,51,.1);
  color:#ff0033;
  box-shadow:0 0 10px #ff0033;
  animation:pulse 1.5s infinite;
}
.diff-btn.meltdown-active:hover{
  box-shadow:0 0 15px #ff0033;
}
@keyframes pulse{
  0%,100%{box-shadow:0 0 0 rgba(255,0,51,.4);}
  50%{box-shadow:0 0 12px rgba(255,0,51,.6);}
}

/* Difficulty Selector (new naming) */
.diff-selector{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
  flex-direction:column;
  position:relative;
  isolation:isolate;
  background:var(--s1);
  border:1px solid var(--border);
  border-radius:var(--r);
  padding:12px 20px;
  transition:border-color .4s ease;
}
/* Ambient glow "emitted from behind" the panel — color follows the active tier */
.diff-selector::before{
  content:'';
  position:absolute;
  inset:-4px;
  z-index:-1;
  border-radius:inherit;
  background:transparent;
  filter:blur(22px);
  opacity:.45;
  transition:background .5s ease, opacity .3s ease;
  pointer-events:none;
}
.diff-selector.tier-stable{border-color:rgba(0,255,102,.4)}
.diff-selector.tier-stable::before{background:#00ff66}
.diff-selector.tier-overclocked{border-color:rgba(255,204,0,.4)}
.diff-selector.tier-overclocked::before{background:#ffcc00}
.diff-selector.tier-meltdown{border-color:rgba(255,0,51,.45)}
.diff-selector.tier-meltdown::before{background:#ff0033}
/* Brief brighter pulse the instant a tier button is clicked */
.diff-selector.flash::before{opacity:.9}
.diff-label{
  font-family:var(--fd);
  font-size:.65rem;
  color:var(--dim);
  text-transform:uppercase;
  letter-spacing:.1em;
}
.diff-btns{
  display:flex;
  gap:8px;
}
.diff-stable,
.diff-overclocked,
.diff-meltdown{
  /* inherit from .diff-btn */
}
/* Active glow now matches the specific tier, not a hardcoded green */
.diff-btn.diff-stable.active{
  background:rgba(0,255,102,.1);
  color:#00ff66;
  box-shadow:0 0 10px #00ff66;
}
.diff-btn.diff-stable.active:hover{
  box-shadow:0 0 15px #00ff66;
}
.diff-btn.diff-overclocked.active{
  background:rgba(255,204,0,.1);
  color:#ffcc00;
  box-shadow:0 0 10px #ffcc00;
}
.diff-btn.diff-overclocked.active:hover{
  box-shadow:0 0 15px #ffcc00;
}
.diff-btn.diff-meltdown.active{
  background:rgba(255,0,51,.1);
  color:#ff0033;
  box-shadow:0 0 10px #ff0033;
  animation:pulse 1.5s infinite;
}
.diff-btn.diff-meltdown.active:hover{
  box-shadow:0 0 15px #ff0033;
}
.diff-mult{
  font-family:var(--fd);
  font-size:.65rem;
  color:var(--gold);
  margin-top:6px;
}
/* A frozen dial: mid-round anywhere, and for the guest of a room — the round
   runs on the HOST'S tier, so the guest's panel is a readout, not a control.
   Dimmed rather than hidden, because the tier is the thing they most need to
   know before the countdown starts. */
.diff-selector.locked .diff-btn{cursor:not-allowed}
.diff-selector.locked .diff-btn:not(.active){opacity:.4}
/* The active tier keeps its full glow — the hover reset is only for the ones
   that are no longer choices. */
.diff-selector.locked .diff-btn:not(.active):hover{background:var(--s2);transform:none}
.diff-selector.locked .diff-btn:active{transform:none}
.diff-note{
  font-family:var(--fd);
  font-size:.5rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--dim);
  text-align:center;
  margin-top:2px;
}
.diff-note:empty{display:none}
/* The arena's copy is sized by its own content and centred, like the hub's —
   left to stretch it became a full-width banner over the duel grid and stopped
   reading as the same control. */
.mp-diff{width:max-content;max-width:100%;margin-left:auto;margin-right:auto}

/* ── GAME LAYOUT ENGINE ── */
/* Every pixel of chrome above the board comes straight off the play field,
   which is aspect-locked and therefore sized by the height left over. */
#game-screen{justify-content:flex-start;padding-top:10px}
/* The header used to be one space-between row: Quit · title · hint · pills.
   Every minigame supplies a different hint length, and Tetris adds a LEVEL
   pill, so the title landed in a different spot in each game — and in the
   crowded ones it ended up pressed against the Quit button. Between them
   those four items nearly fill the 700px row, so there is no width left to
   centre the title reliably. It gets its own line instead: dead-centre,
   identical in every game, with Quit and the pills on the row beneath. */
/* THREE tracks on the control row, not two: Quit, the readouts, and the action
   cluster. The cluster used to live inside .g-stats and therefore inside the
   readouts' track, which meant a long readout row could push it around, break
   it up, or shove it off the edge. Its own track cannot be reached into. */
.g-hdr{display:grid;grid-template-columns:auto 1fr auto;align-items:center;column-gap:16px;row-gap:12px;width:100%;max-width:max(var(--board-w,560px),560px);margin-bottom:12px}
.g-title{grid-column:1/-1;grid-row:1;text-align:center;font-family:var(--fd);font-size:.95rem;font-weight:700;letter-spacing:.05em}
.g-hdr > #btn-quit{grid-column:1;grid-row:2;justify-self:start}
.g-hdr > .g-actions{grid-column:3;grid-row:2;justify-self:end}
/* The reserved slots below cost this row width, and the busiest one it ever
   carries — LEVEL + ping + clock + score, in a Matrix Stack-Off duel — has only
   520px to live in (the header keeps a 20px notch inset each side). So the
   pills tighten by the few px the slots take back: the row then fits that duel
   at any score, which it did NOT before — a five-digit score used to push it
   ~18px past the board edge. */
.g-stats{grid-column:2;grid-row:2;justify-self:end;display:flex;align-items:center;gap:6px;
  /* Wrapping is allowed at EVERY width now, not only on a phone. The readouts
     are a variable-length list — Boss Rush and Endless each insert a pill at
     the front, Tetris adds LEVEL, a duel adds ping — so the row can outgrow
     its track on a desktop too, and a row that cannot wrap overflows the board
     edge instead. What made wrapping look broken was never the wrap: it was
     the BUTTONS wrapping one at a time. They are one item now (.g-actions), so
     a wrap can only ever put the pills on their own line. */
  flex-wrap:wrap;justify-content:flex-end;row-gap:6px}

/* ══ 📐 THE COMPACTION TIERS — applied by fitHud(), never by hand ══
   Three steps of increasingly aggressive tightening, added one at a time and
   cumulatively until the readout row fits on ONE line. See fitHud() in app.js
   for why the header cannot simply be made wider.
   Tier 1 takes only padding and gaps — nothing is lost, and it is enough on its
   own for the common case of a 560px board carrying a pace ghost. */
.g-hdr.hud-t1{column-gap:10px}
.g-hdr.hud-t1 .g-stats{gap:5px}
.g-hdr.hud-t1 .stat-pill{padding:4px 7px}
.g-hdr.hud-t1 .ghost-pace{padding:4px 8px;gap:5px}
.g-hdr.hud-t1 .g-actions{gap:5px}
.g-hdr.hud-t1 .g-actions .btn-sm{min-width:30px;min-height:30px;padding:4px 6px}

/* Tier 2 drops the pace ghost's TARGET — "PB 1,200". It is the only thing in
   the row that never changes during a round, so it is the only thing a player
   can afford to lose: the delta beside it still says everything actionable,
   and the target is on the results card at the end either way. */
.g-hdr.hud-t2 .gp-target{display:none}
.g-hdr.hud-t2 .ghost-pace{gap:4px}

/* Tier 3 is a genuinely full row on a genuinely narrow board — Boss Rush with a
   pace ghost, say. The ghost icon goes (the colour already says ahead/behind)
   and everything shrinks a step. The delta keeps a fixed slot, just a tighter
   one: it must not start moving again. */
.g-hdr.hud-t3 .gp-ico{display:none}
.g-hdr.hud-t3 .stat-pill,
.g-hdr.hud-t3 .ghost-pace{font-size:.53rem;padding:4px 6px}
.g-hdr.hud-t3 .gp-delta{min-width:8ch}

/* ⚙️ THE ACTION CLUSTER — audio, photo, fullscreen.
   One flex item, never broken up, never squeezed: these are the only controls
   on the screen the player NEEDS to be able to hit mid-round (mute, and the
   way back out of fullscreen), so they are the one thing in the header that is
   not allowed to move somewhere else when the readouts beside them grow. */
.g-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;flex-shrink:0}
/* A comfortable, EQUAL target for all three. They were sized by their glyphs
   before, so 🔊 / 📸 / ⛶ came out three different widths and the cluster read
   as an accident rather than a set. 34px is the smallest square that still
   looks deliberate beside a 24px pill; the phone block below takes it to 44. */
.g-actions .btn-sm{min-width:34px;min-height:34px;display:inline-flex;
  align-items:center;justify-content:center;padding:5px 8px;line-height:1}
.stat-pill{background:var(--s2);border:1px solid var(--border);border-radius:20px;padding:5px 10px;font-family:var(--fd);font-size:.6rem;font-weight:700;white-space:nowrap;
  /* Equal-width digits: without this a 1 is narrower than a 0 and the readout
     twitches on every tick even when the digit COUNT hasn't changed. */
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
/* Every number in here is a live counter, and the row is right-aligned — so a
   score going 9 → 10 → 100 widened its pill and shoved every pill to its left
   along with it, mid-game. Each readout now owns a fixed slot wide enough for
   the biggest number it can reach, so the row is laid out once and then holds
   still no matter what the numbers do. */
.stat-pill em{font-style:normal;color:var(--cyan);display:inline-block;text-align:center}
#g-pts{min-width:5ch}        /* uncapped in Cyber Arena — five digits of room */
/* Every other game counts down from a two-digit clock (90s at most), so 3ch
   used to be plenty — but the Hover-Bike Run has no clock at all: elapsed just
   climbs for as long as the run survives, same shape as Cyber Arena's score.
   4ch covers that (and Battle Bots' fixed "M:SS", and the ∞ / — placeholders)
   without reserving Arena-sized room for a number that stays two digits. */
#g-time{min-width:4ch}
#tetris-lvl{min-width:2ch}
#bb-ram{min-width:3ch}
#mp-ping{min-width:5ch}      /* "999ms" — mpPing() clamps to keep it in the slot */
.prog-bar{width:100%;max-width:max(var(--board-w,560px),560px);height:5px;background:var(--s2);border-radius:3px;margin-bottom:12px;overflow:hidden;flex-shrink:0}
.prog-fill{height:100%;border-radius:3px;transition:width .2s ease-out;background:linear-gradient(90deg,var(--cyan),var(--purple))}
.g-area{width:100%;max-width:1060px;display:flex;flex-direction:column;align-items:center}

/* Game Controls Hint — a full-width caption on its own row, so a long hint
   ("DRAG = MOVE · TAP = SLASH · DOUBLE-TAP = ABILITY · ⚡ = DASH") can never
   squeeze the title or the Quit button. */
.g-controls{
  grid-column:1/-1;
  grid-row:3;
  text-align:center;
  font-family:var(--fd);
  font-size:.65rem;
  color:var(--dim);
  letter-spacing:.02em;
}
/* Games with no hint (Click Frenzy, Memory, Math) skip the row entirely. */
.g-controls:empty{display:none}

/* Canvas & Controls */
#arcade-canvas{background:#0d0d11;border:2px solid var(--border);border-radius:8px;display:block}
/* The pad spans the board rather than a fixed 400px, so it stays flush with
   the play field's edges now that the board grows to fill the screen. */
#arcade-controls{display:flex;width:100%;max-width:100%;gap:10px;margin-top:10px}
.ctrl-btn{flex:1;background:var(--s2);border:1px solid var(--border);color:#fff;padding:14px;font-family:var(--fd);border-radius:8px;cursor:pointer}

/* Marks a control that permanently commits something (Tetris's hard drop), so
   it reads as its own thing rather than another grey sibling of ◀ / ⟳ / ▶.
   Opt-in via setControls({accentDrop:true}) — Snake's ↓ is just an arrow. */
.ctrl-btn.accent{background:rgba(168,85,247,.16);border-color:rgba(168,85,247,.55);color:#d8b4fe;font-weight:700;letter-spacing:.04em}
.ctrl-btn.accent:active{background:rgba(168,85,247,.34);transform:scale(.96)}
/* Bare-glyph buttons (◀ ↑ ⟳) get a size of their own — at label size a lone
   arrow is a speck, while worded buttons still need the smaller type. */
.ctrl-btn.glyph{font-size:1.3rem;line-height:1}

/* Shrink-wraps the canvas so #tetris-next-wrap and #touch-hint position
   against the play field, not against the holder that also owns the pad. */
#board-frame{position:relative;width:fit-content;max-width:100%;margin:0 auto}

/* ── ⚔️ BATTLE BOTS — DEPLOY DECK ── */
/* The deploy deck under the board — the whole bot roster plus the EMP surge
   and the RAM upgrade. Tracks the board's width like .g-hdr and .prog-bar do,
   so the whole game reads as one column, and is allowed to wrap: fitCanvas()
   measures the deck's real height, so on a narrow screen a second row of
   cards costs the board height instead of running off the bottom.
   Built by startBattleBots() and emptied by stopGame(). */
#bb-deck{display:flex;flex-wrap:wrap;gap:10px;width:100%;max-width:max(var(--board-w,560px),560px);margin-top:10px;flex-shrink:0}
.bb-btn{
  position:relative;overflow:hidden;flex:1;min-width:0;
  display:flex;flex-direction:column;align-items:center;gap:3px;
  background:var(--s2);border:1.5px solid var(--bc);border-radius:10px;
  padding:9px 4px;cursor:pointer;color:#fff;font-family:var(--fd);
  box-shadow:0 0 14px -4px var(--bc),inset 0 0 18px -12px var(--bc);
  transition:transform .12s ease,box-shadow .2s ease,opacity .2s ease,border-color .2s ease
}
.bb-btn:hover:not(.broke):not(.maxed){transform:translateY(-2px);box-shadow:0 0 24px -4px var(--bc)}
.bb-btn:active{transform:scale(.96)}
.bb-ico{font-size:1.35rem;line-height:1}
.bb-name{font-size:.55rem;font-weight:700;letter-spacing:.1em;color:var(--bc);white-space:nowrap}
.bb-cost{font-size:.52rem;font-weight:700;letter-spacing:.06em;color:var(--dim);white-space:nowrap}
/* Unaffordable, but still clickable — the deny blip and the toast are how you
   find out how much more RAM you need. */
.bb-btn.broke{opacity:.4;border-color:var(--border);box-shadow:none}
.bb-btn.broke .bb-name{color:var(--dim)}
.bb-btn.maxed{opacity:.55;border-color:var(--border);box-shadow:none}
/* Deploy cooldown — a shade that recedes upward as the bay reloads. */
.bb-btn::after{content:'';position:absolute;left:0;right:0;top:0;height:calc(var(--cd,0) * 100%);background:rgba(4,4,14,.72);pointer-events:none;transition:height .08s linear}
/* …and the seconds left, over the top of it. The shade says how MUCH of the
   reload is left; this says how LONG, because "about a third of a bar" is not
   something you can plan the next deploy around, and the whole skill of the
   deck is knowing what will be back before the next wave lands.

   An attribute rather than a text node: paintDeck() runs every frame, and the
   DOM is only touched when the whole second changes. The rule keys off the
   attribute's presence, so a card that is ready simply has no data-cd. */
.bb-btn[data-cd]::before{
  content:attr(data-cd);
  position:absolute;inset:0;z-index:2;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--fd);font-weight:900;font-size:1.2rem;letter-spacing:.02em;
  color:#fff;text-shadow:0 0 4px rgba(4,4,14,.95),0 0 12px rgba(4,4,14,.9);
  pointer-events:none
}

/* NEXT-piece preview (was inline styles; moved here so the mobile rules below
   can actually shrink it — inline wins over a stylesheet otherwise). */
#tetris-next-wrap{position:absolute;top:10px;right:10px;background:var(--s2);border:1px solid var(--border);border-radius:8px;padding:8px;text-align:center;pointer-events:none}
#tetris-next-wrap .next-label{font-family:var(--fd);font-size:.6rem;color:var(--cyan);margin-bottom:4px}
#nextCanvas{display:block;width:80px;height:80px}

/* ── TOUCH TUTORIAL OVERLAY ──
   One line of "here's how you play this with a finger", shown over the canvas
   for the first few seconds and dismissed by the first touch. */
#touch-hint{
  position:absolute;left:50%;bottom:18px;transform:translateX(-50%);
  /* Sized against the viewport, not the board — on a scaled-down board 88%
     of the frame wrapped one sentence into six lines and buried the game.
     Overflowing into the margin beside the board is fine and stays centred. */
  display:none;width:max-content;max-width:min(86vw,420px);padding:10px 18px;
  background:rgba(4,4,14,.82);border:1px solid rgba(0,245,255,.45);border-radius:24px;
  font-family:var(--fd);font-size:.58rem;line-height:1.7;letter-spacing:.08em;
  color:var(--cyan);text-align:center;text-shadow:0 0 10px rgba(0,245,255,.5);
  box-shadow:0 0 24px rgba(0,245,255,.18);
  pointer-events:none;z-index:5;opacity:0;transition:opacity .35s ease
}
#touch-hint.show{display:block;opacity:1}

/* ── Click Frenzy ── */
.click-wrap{display:flex;flex-direction:column;align-items:center;gap:16px}
/* ✨ v106 · A fast hand's near-misses land on the count and the label as double
   and triple clicks, and a triple selected the page around the pad. Nothing in
   this block is text anyone means to select, and a double tap beside the pad
   must not zoom the page either (iOS still does, without manipulation). */
#g-click{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}
/* Five-rem digits: an uneven 1 is very visible at this size, and Click Frenzy
   redraws this number several times a second. */
#click-count{font-family:var(--fd);font-size:5rem;font-weight:900;color:var(--cyan);line-height:1;
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;min-width:4ch;text-align:center}
.click-label{color:var(--dim);font-weight:600;font-size:.8rem;letter-spacing:.2em;text-transform:uppercase}
/* ✨ v107 · A REAL BUTTON. It was a flat gradient disc, while the Flight
   Deck's beacon for this mission turns a lit reactor core. Now it is a piece
   of arcade hardware: a brushed-steel bezel (the border, painted by its own
   conic layer), a glossy dome inside it — shaded as a sphere, a hot highlight
   up and left, light bouncing back off its lower rim — set in a recess, with
   a shadow under it, and a press that travels: the cap sinks and the shadow
   and glow tuck in under it. The dome's three tones are variables, so a Brick
   Lab second recolours the cap and keeps the hardware. */
#click-btn{
  --cb-hi:#a8fbff;--cb-mid:#00d4f0;--cb-lo:#0b3f7a;--cb-glow:rgba(0,245,255,.35);
  width:180px;height:180px;border-radius:50%;border:11px solid transparent;font-size:3.5rem;cursor:pointer;
  background:
    radial-gradient(circle at 34% 27%,rgba(255,255,255,.95) 0 3%,rgba(255,255,255,.6) 8%,rgba(255,255,255,0) 24%) padding-box,
    radial-gradient(ellipse 70% 38% at 50% 100%,rgba(255,255,255,.3),rgba(255,255,255,0) 70%) padding-box,
    radial-gradient(circle at 46% 40%,var(--cb-hi) 0%,var(--cb-mid) 34%,var(--cb-lo) 88%,#07142c 100%) padding-box,
    conic-gradient(from 215deg,#4b5563,#e6ebf2 11%,#6c7787 24%,#cfd6e0 38%,#4b5563 52%,#e6ebf2 66%,#6c7787 80%,#aeb8c6 92%,#4b5563) border-box;
  box-shadow:
    0 0 0 2px #0b0f18,0 0 0 4px rgba(255,255,255,.08),
    0 14px 22px -6px rgba(0,0,0,.75),0 0 46px var(--cb-glow),
    inset 0 -12px 22px rgba(0,10,30,.5),inset 0 7px 12px rgba(255,255,255,.28);
  text-shadow:0 3px 4px rgba(0,0,0,.35);
  transition:transform .05s ease-out,box-shadow .05s ease-out
}
#click-btn:active{
  transform:translateY(3px) scale(.97);
  box-shadow:
    0 0 0 2px #0b0f18,0 0 0 4px rgba(255,255,255,.06),
    0 5px 9px -4px rgba(0,0,0,.8),0 0 30px var(--cb-glow),
    inset 0 -6px 14px rgba(0,10,30,.55),inset 0 10px 18px rgba(0,0,0,.25)
}
/* 🧱 A Brick Lab timeline's seconds (§ 25): gold pays double, a surge
   triple, a jam nothing — the button says which second this is. */
#g-click.fz-gold #click-btn{--cb-hi:#fffbd0;--cb-mid:#ffd700;--cb-lo:#8a5a00;--cb-glow:rgba(255,215,0,.6)}
#g-click.fz-surge #click-btn{--cb-hi:#ffc4ea;--cb-mid:#ff1aa0;--cb-lo:#6a0040;--cb-glow:rgba(255,0,144,.6)}
#g-click.fz-jam #click-btn{filter:grayscale(1) brightness(.55);--cb-glow:transparent}
#g-click.fz-gold .click-label{color:#ffd700}
#g-click.fz-surge .click-label{color:#ff5ab8}
#g-click.fz-jam .click-label{color:var(--dimmer)}

/* ── Memory Match Layout ─ */
.memory-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;width:100%;max-width:340px}
.mem-card{height:75px;background:var(--s2);border:1px solid var(--border);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:2rem;cursor:pointer;user-select:none;transition:background .2s}
.mem-card.flipped{background:rgba(57,255,20,0.15);border-color:var(--lime)}

/* ── Math Blitz Layout ─ */
.math-wrap{text-align:center;width:100%;max-width:340px}
#math-question{font-family:var(--fd);font-size:3rem;margin-bottom:20px;color:var(--gold)}
#math-answer{width:100%;background:var(--s2);border:1px solid var(--border);color:#fff;padding:12px;font-size:1.5rem;text-align:center;border-radius:8px;margin-bottom:14px;outline:none}

/* ── Reaction Time Layout ─ */
.reaction-box{width:100%;max-width:400px;height:300px;border-radius:12px;border:2px solid var(--border);display:flex;align-items:center;justify-content:center;cursor:pointer;user-select:none;transition:background 0.1s}
#reaction-text{font-family:var(--fd);font-weight:700;font-size:1.5rem}

/* ── Node Hacker Layout ─ */
/* The keypad is aspect-locked to a square and sized by whichever runs out
   first — the column, 380px, or the viewport height. Same reasoning as
   fitCanvas(): a board whose bottom row is under the fold is unplayable. */
.hack-wrap{display:flex;flex-direction:column;align-items:center;gap:14px;width:100%;max-width:400px}
.hack-readout{width:100%;text-align:center;background:var(--s1);border:1px solid rgba(57,255,20,.28);border-radius:var(--r);padding:12px 14px}
.hack-status{font-family:var(--fd);font-size:.7rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--lime);text-shadow:0 0 10px rgba(57,255,20,.55);min-height:17px;line-height:1.4}
.hack-status.warn{color:var(--gold);text-shadow:0 0 10px rgba(255,215,0,.55)}
.hack-status.fail{color:var(--red);text-shadow:0 0 10px rgba(255,36,66,.6)}

/* One pip per node in the current sequence — fills left-to-right as you
   replicate it, so progress through a 9-long chain is readable at a glance. */
.hack-seq{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;margin-top:10px;min-height:7px}
.hack-pip{width:16px;height:5px;border-radius:3px;background:var(--s2);border:1px solid var(--border);transition:background .18s,box-shadow .18s}
.hack-pip.done{background:var(--lime);border-color:var(--lime);box-shadow:0 0 8px rgba(57,255,20,.7)}

.hack-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;width:min(100%,380px,54vh);aspect-ratio:1/1}
/* --nc is the node's own neon, assigned per row in startHacker(). */
.hack-node{
  position:relative;display:flex;align-items:center;justify-content:center;
  background:var(--s2);border:1.5px solid var(--border);border-radius:10px;
  cursor:pointer;overflow:hidden;
  transition:background .12s ease,border-color .12s ease,box-shadow .12s ease,transform .12s ease
}
.hack-node::before{
  content:'';position:absolute;inset:0;border-radius:inherit;
  background:radial-gradient(circle at 50% 50%,var(--nc),transparent 70%);
  opacity:.07;transition:opacity .12s ease
}
.hack-node .hack-key{
  font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.06em;
  color:var(--dimmer);position:relative;transition:color .12s ease,text-shadow .12s ease
}
/* Scoped to real pointers — on a phone :hover latches after a tap and would
   leave half the keypad glowing as if it were part of the sequence. */
@media (hover: hover){
  .hack-node:not(.lit):hover{border-color:var(--nc);transform:translateY(-2px)}
  .hack-node:not(.lit):hover .hack-key{color:var(--dim)}
}
/* Lit = the mainframe is broadcasting this node, or you just pressed it. */
/* --nc-soft/--nc-glow are pre-mixed rgba by startHacker() via hexToRgba(),
   rather than color-mix() — same result, no dependency on a newer colour
   function than the rest of the sheet assumes. */
.hack-node.lit{background:var(--nc-soft);border-color:var(--nc);box-shadow:0 0 22px var(--nc),inset 0 0 18px var(--nc-glow);transform:scale(1.05)}
.hack-node.lit::before{opacity:.5}
.hack-node.lit .hack-key{color:#fff;text-shadow:0 0 10px var(--nc)}
.hack-node.err{background:rgba(255,36,66,.24);border-color:var(--red);box-shadow:0 0 24px rgba(255,36,66,.75);animation:hackShake .4s ease}
.hack-node.err .hack-key{color:#fff;text-shadow:0 0 10px var(--red)}
@keyframes hackShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
/* Locked out while the sequence is playing back, so you can't queue taps. */
.hack-grid.locked .hack-node{cursor:default}
.hack-grid.locked{opacity:.94}

/* ── 🔌 OVERCLOCK PATH ──
   --pc is the board's neon, assigned by startOverclockPath() from the equipped
   Black Market colour; --pc-soft / --pc-glow are pre-mixed rgba of it, the same
   way Node Hacker mixes --nc, rather than color-mix(). */
.path-wrap{display:flex;flex-direction:column;align-items:center;gap:14px;width:100%;max-width:420px}
.path-readout{width:100%;text-align:center;background:var(--s1);border:1px solid rgba(168,85,247,.28);border-radius:var(--r);padding:12px 14px}
.path-status{font-family:var(--fd);font-size:.7rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--purple);text-shadow:0 0 10px rgba(168,85,247,.55);min-height:17px;line-height:1.4}
.path-status.warn{color:var(--gold);text-shadow:0 0 10px rgba(255,215,0,.55)}
/* The RECALIBRATING flash. steps(2) rather than a fade, because a clean blink
   reads as a fault light and a fade reads as a transition. */
.path-status.fail{color:var(--red);text-shadow:0 0 10px rgba(255,36,66,.6);animation:pathBlink .34s steps(2,end) 2}
.path-status.win{color:var(--lime);text-shadow:0 0 12px rgba(57,255,20,.65)}
@keyframes pathBlink{0%,100%{opacity:1}50%{opacity:.24}}

/* How much of the circuit is carrying current. */
.path-meter{margin-top:10px;height:5px;border-radius:3px;background:var(--s2);border:1px solid var(--border);overflow:hidden}
.path-meter-fill{height:100%;width:0;border-radius:3px;background:linear-gradient(90deg,var(--pc,var(--purple)),#fff);box-shadow:0 0 10px var(--pc,var(--purple));transition:width .18s ease}

/* The board is one square box with the grid and the trace stacked inside it,
   both pinned to its edges — that shared box is what lets the SVG be drawn in
   the grid's own pixel coordinates. */
.path-board{position:relative;width:min(100%,400px,52vh);aspect-ratio:1/1}
.path-grid{position:absolute;inset:0;z-index:1;display:grid;grid-template-columns:repeat(5,1fr);gap:9px;touch-action:none}
/* Above the nodes so the current reads as one continuous wire threading
   through them, and pointer-transparent so the nodes stay what you touch. */
.path-trace{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:visible}
.trace-glow{fill:none;stroke:var(--pc,var(--purple));stroke-width:15;stroke-linecap:round;stroke-linejoin:round;opacity:.20;filter:blur(3px)}
.trace-core{fill:none;stroke:var(--pc,var(--purple));stroke-width:5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 6px var(--pc,var(--purple)))}

.path-node{
  position:relative;display:flex;align-items:center;justify-content:center;
  background:var(--s2);border:1.5px solid var(--border);border-radius:10px;
  cursor:pointer;overflow:hidden;
  transition:background .12s ease,border-color .12s ease,box-shadow .12s ease,transform .12s ease
}
.path-node::before{
  content:'';position:absolute;inset:0;border-radius:inherit;
  background:radial-gradient(circle at 50% 50%,var(--pc,var(--purple)),transparent 70%);
  opacity:.06;transition:opacity .12s ease
}
.path-dot{width:9px;height:9px;border-radius:50%;background:var(--dimmer);position:relative;transition:background .12s ease,box-shadow .12s ease,transform .12s ease}
.path-glyph{font-family:var(--fd);font-size:.72rem;font-weight:900;letter-spacing:.06em;color:var(--dimmer);position:relative;transition:color .12s ease,text-shadow .12s ease}
/* Node A — where the current has to start, so it is lit before anything else is. */
.path-node.start{border-color:var(--pc,var(--purple));background:var(--pc-soft,rgba(168,85,247,.2))}
.path-node.start .path-glyph{color:var(--pc,var(--purple));text-shadow:0 0 10px var(--pc,var(--purple))}
/* Dead code — dashed and struck through, because "you cannot route here" has to
   survive being read at a glance with five seconds left. */
.path-node.dead{background:rgba(255,36,66,.10);border-color:rgba(255,36,66,.34);border-style:dashed;cursor:not-allowed}
.path-node.dead::before{background:radial-gradient(circle at 50% 50%,var(--red),transparent 70%);opacity:.05}
.path-node.dead .path-glyph{color:rgba(255,36,66,.7)}
.path-node.on{background:var(--pc-soft,rgba(168,85,247,.2));border-color:var(--pc,var(--purple));box-shadow:0 0 18px var(--pc-glow,rgba(168,85,247,.34)),inset 0 0 16px var(--pc-glow,rgba(168,85,247,.34))}
.path-node.on::before{opacity:.34}
.path-node.on .path-dot{background:#fff;box-shadow:0 0 10px var(--pc,var(--purple));transform:scale(1.15)}
.path-node.on .path-glyph{color:#fff;text-shadow:0 0 10px var(--pc,var(--purple))}
.path-node.head{box-shadow:0 0 26px var(--pc,var(--purple)),inset 0 0 18px var(--pc-glow,rgba(168,85,247,.34));transform:scale(1.06)}
/* Scoped to real pointers — on a phone :hover latches after a tap and would
   leave half the board looking energised. */
@media (hover: hover){
  .path-node:not(.dead):not(.on):hover{border-color:var(--pc,var(--purple));transform:translateY(-2px)}
  .path-node:not(.dead):not(.on):hover .path-dot{background:var(--dim)}
}
/* Invalid move: the whole board kicks red for the length of the lockout. */
.path-grid.recal{animation:pathRecal .5s ease}
.path-grid.recal .path-node:not(.dead){border-color:rgba(255,36,66,.55);background:rgba(255,36,66,.10)}
@keyframes pathRecal{0%,100%{transform:translateX(0)}20%{transform:translateX(-5px)}60%{transform:translateX(5px)}}
.path-grid.done{animation:pathDone .6s ease}
@keyframes pathDone{0%,100%{transform:scale(1)}45%{transform:scale(1.035)}}

/* ── 🎚️ FREQUENCY MODULATOR CONSOLE ──
   Matches #bb-deck's geometry: a full-width row under the board that tracks the
   board's own width rather than the screen's, so the sliders stay the same
   length as the scope they drive. */
#g-freq-ctl{display:flex;gap:14px;width:100%;max-width:max(var(--board-w,560px),560px);margin-top:10px;flex-shrink:0}
.freq-slider{flex:1;min-width:0;background:var(--s1);border:1px solid var(--border);border-radius:var(--r);padding:9px 13px 12px}
.freq-lbl{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--dim);margin-bottom:8px}
.freq-lbl em{font-style:normal;font-size:.74rem;color:var(--cyan);text-shadow:0 0 8px rgba(0,245,255,.5)}
.freq-range{
  -webkit-appearance:none;appearance:none;display:block;width:100%;height:6px;
  border-radius:3px;background:linear-gradient(90deg,rgba(0,245,255,.30),rgba(255,0,144,.30));
  border:1px solid var(--border);outline:none;cursor:pointer
}
/* Both vendor thumbs, spelled out separately — a browser drops the WHOLE rule
   if it cannot parse one selector in the list, so these must not be grouped. */
.freq-range::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;
  background:var(--cyan);border:2px solid #fff;box-shadow:0 0 12px var(--cyan);cursor:pointer
}
.freq-range::-moz-range-thumb{
  width:18px;height:18px;border-radius:50%;
  background:var(--cyan);border:2px solid #fff;box-shadow:0 0 12px var(--cyan);cursor:pointer
}
.freq-range:focus-visible{box-shadow:0 0 0 2px rgba(0,245,255,.45)}

/* ── 🗂️ PACKET SORT RULE STRIP ──
   Same geometry as the two consoles above: a full-width row under the board,
   tracking the BOARD's width rather than the screen's. It carries the one fact
   the mission re-writes every twenty seconds, so it is loud on purpose — the
   flip has to be noticed peripherally, while the player's eyes are on a packet
   halfway down a conveyor. .flip is a one-shot pulse the mission adds and
   removes; the transition on the text is what makes a changed rule read as an
   EVENT rather than as a value that was always that. */
#g-sort-rule{
  display:flex;align-items:center;gap:12px;width:100%;
  max-width:max(var(--board-w,560px),560px);margin-top:10px;flex-shrink:0;
  background:var(--s1);border:1px solid var(--border);border-radius:var(--r);
  padding:9px 14px;overflow:hidden
}
.sr-tag{
  font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.12em;
  text-transform:uppercase;color:var(--dim);border:1px solid var(--border);
  border-radius:999px;padding:3px 9px;flex-shrink:0;white-space:nowrap
}
.sr-txt{
  flex:1;min-width:0;font-family:var(--fd);font-size:.86rem;font-weight:700;
  letter-spacing:.05em;text-transform:uppercase;color:var(--orange);
  text-shadow:0 0 12px rgba(255,102,0,.55);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  transition:color .18s ease,text-shadow .18s ease,transform .18s ease
}
.sr-next{
  font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.08em;
  color:var(--dim);flex-shrink:0;white-space:nowrap
}
#g-sort-rule.flip{border-color:var(--orange);box-shadow:0 0 22px rgba(255,102,0,.30)}
#g-sort-rule.flip .sr-txt{color:#fff;text-shadow:0 0 18px var(--orange);transform:scale(1.04)}
#g-sort-rule.warn .sr-next{color:var(--gold)}

/* ── RESULTS SCREEN ── */
/* v54 — THE CARD GREW WITH THE RUN. It was 560px wide when it had two buttons;
   it has six now (Play Again, Hub, Share, Clip, Replay, Challenge), and they
   wrapped into three rows on a desktop and five on a phone, so the card ran
   off the bottom of a laptop screen and under the offline bar. Now it is
   wider, a wide screen stands the headline beside the breakdown (see the
   media query further down), the two ways off the card are one big row, and
   everything you can do WITH the run sits in one even grid under them.
   Centred with auto margins rather than the screen's justify-content: a
   centred flex column that overflows loses its TOP, which scrolling can never
   reach — the emoji and the score were the part that went. */
#results-screen{justify-content:flex-start}
html.is-offline #results-screen{padding-bottom:calc(64px + env(safe-area-inset-bottom, 0px))}
#results-screen .res-card{max-width:920px;width:100%;text-align:center;margin:auto 0}
.res-head{min-width:0}
.res-emoji{font-size:4.5rem;display:block;margin-bottom:18px}
.res-gname{font-family:var(--fd);font-size:.6rem;color:var(--dim);letter-spacing:.15em;text-transform:uppercase;margin-bottom:12px}
.res-bonus{display:inline-block;font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:5px 14px;border-radius:20px;margin:0 0 14px;border:1px solid var(--border);background:var(--s2);color:var(--dim)}
.res-bonus.res-bonus-stable{border-color:#00ff66;color:#00ff66;background:rgba(0,255,102,.08);box-shadow:0 0 10px rgba(0,255,102,.35)}
.res-bonus.res-bonus-overclocked{border-color:#ffcc00;color:#ffcc00;background:rgba(255,204,0,.08);box-shadow:0 0 10px rgba(255,204,0,.35)}
.res-bonus.res-bonus-meltdown{border-color:#ff0033;color:#ff0033;background:rgba(255,0,51,.08);box-shadow:0 0 10px rgba(255,0,51,.35);animation:pulse 1.5s infinite}
.res-pts{font-family:var(--fd);font-size:4.5rem;font-weight:900;line-height:1;background:linear-gradient(135deg,var(--gold),var(--orange));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin-bottom:10px}
.res-pts-lbl{color:var(--dim);font-weight:600;font-size:.8rem;margin-bottom:24px}
.res-bd{background:var(--s2);border-radius:10px;padding:14px;margin-bottom:20px;text-align:left}
.res-row{display:flex;justify-content:space-between;padding:5px 0;border-bottom:1px solid var(--border);font-size:.85rem}
.res-row:last-child{border:none}
.res-row .rv{color:var(--cyan);font-weight:700}
.res-btns{display:flex;flex-direction:column;gap:10px}
.res-main{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:10px}
.res-main .btn{padding:16px 18px;font-size:.84rem;min-height:52px}
/* auto-fit: however many of the four are showing share the width equally —
   four across on a desktop, two by two on a phone. Labels may wrap to two
   lines rather than force a third row. */
.res-more{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.res-more .btn{padding:11px 10px;white-space:normal;line-height:1.3;min-height:46px;font-size:.66rem}
/* ✨ v142 · NEXT UP (§ 95 in app.js): a row of its own under PLAY AGAIN and HUB — what it is for in small lime type, then
   where it goes. Palette tokens only, so the colourblind palette repoints the lime. */
.res-next{display:flex;flex-direction:column;align-items:center;gap:3px;width:100%;padding:10px 14px;min-height:52px;
  white-space:normal;line-height:1.3;border-color:color-mix(in srgb,var(--lime) 45%,transparent);
  background:color-mix(in srgb,var(--lime) 6%,var(--s2))}
.res-next[hidden]{display:none}
.res-next:hover,.res-next:focus-visible{border-color:var(--lime);box-shadow:0 0 14px color-mix(in srgb,var(--lime) 22%,transparent)}
.res-next .rx-k{font-size:.5rem;font-weight:700;letter-spacing:.18em;color:var(--lime)}
.res-next .rx-m{font-size:.78rem;overflow-wrap:anywhere}
/* A wide screen: the headline on the left, the breakdown on the right, the
   buttons across the bottom under both. */
@media (min-width:860px){
  #results-screen .res-card{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);
    grid-template-areas:"head bd" "btns btns" "replay replay";
    column-gap:32px;align-items:center;padding:30px 34px 28px
  }
  #results-screen .res-head{grid-area:head}
  #results-screen .res-bd{grid-area:bd;margin-bottom:0;align-self:center}
  #results-screen .res-btns{grid-area:btns;margin-top:24px}
  #results-screen .res-replay{grid-area:replay}
  #results-screen .res-head #res-medal{margin-bottom:0}
}
/* A phone: a smaller headline buys the buttons their room. */
@media (max-width:560px){
  #results-screen{padding-left:12px;padding-right:12px}
  #results-screen .res-card{padding:18px 16px}
  .res-emoji{font-size:3rem;margin-bottom:8px}
  .res-pts{font-size:3.4rem}
  .res-pts-lbl{margin-bottom:16px}
  .res-bd{margin-bottom:16px}
}

/* Toast */
#toast{position:fixed;bottom:-60px;left:50%;transform:translateX(-50%);background:rgba(4,4,14,.9);border:1px solid var(--cyan);padding:12px 24px;border-radius:30px;font-family:var(--fd);font-size:.75rem;color:var(--cyan);z-index:9999;transition:bottom .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease;box-shadow:0 10px 30px rgba(0,245,255,.2)}
#toast.show{bottom:30px}
/* A toast is a message, never a control, so it never takes a click. At the
   bottom of a desktop screen it lands squarely on #photo-bar (z 9999 over
   120): for the 3.6 seconds the "📸 PHOTO MODE" toast was up, RESUME,
   CAPTURE, HIDE HUD and RESET VIEW were all dead to the mouse. The phone
   layout below moves toasts to the top for the same reason; this covers every
   size at once. */
#toast{pointer-events:none}
/* Tier-tinted variants used for SYSTEM STABILITY change messages */
#toast.toast-stable{border-color:#00ff66;color:#00ff66;box-shadow:0 10px 30px rgba(0,255,102,.25)}
#toast.toast-overclocked{border-color:#ffcc00;color:#ffcc00;box-shadow:0 10px 30px rgba(255,204,0,.25)}
#toast.toast-meltdown{border-color:#ff0033;color:#ff0033;box-shadow:0 10px 30px rgba(255,0,51,.25)}

/* Countdown Overlay */
/* 📱 v131 · Hidden once it has faded, as a screen is (SCREEN SYSTEM): a full-screen blur layer between rounds. */
#cd-ov{position:fixed;inset:0;background:rgba(2,2,8,.85);backdrop-filter:blur(10px);z-index:999;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .3s ease,visibility 0s linear .3s}
#cd-ov.show{opacity:1;visibility:visible;pointer-events:all;transition:opacity .3s ease,visibility 0s}
/* v85 — 🌀 The chaos banner rides the countdown (chaosBannerPlace in app.js): it sat under this overlay, read
   through the blur, with Signal Filter's REROLL unclickable. In here it sits under the number, full size. */
#cd-ov{flex-direction:column;padding:0 16px}
#cd-ov #chaos-banner{margin:26px auto 0;width:100%;max-width:660px;box-sizing:border-box;position:relative;z-index:1}
#cd-num{font-family:var(--fd);font-size:7rem;font-weight:900;color:#fff}
.cd-pop{animation:cdPop .6s ease forwards}
@keyframes cdPop{0%{transform:scale(.4);opacity:0}20%{opacity:1}100%{transform:scale(1.4);opacity:0}}
/* ══════════════════════════════════════════════════════════════
   💬 FEEDBACK TERMINAL
   z-index sits above .screen (10) and #cd-ov (999) but below
   #toast (9999), so confirmation toasts stay readable.
   ══════════════════════════════════════════════════════════════ */
/* ── HUB BAR: ONE ROW ──
   The controls used to drop onto a second row the moment the bar ran out of
   width — Exit landed underneath the others and the bar stood two rows tall for
   the sake of one button. Two things keep it to a single row.

   First, room: tighter padding on the bar, its buttons and the stat pills gives
   back ~90px, which already covers the ~26px the signed-in layout was short by.

   Second, an order of sacrifice. Save Account only appears for local and guest
   sessions, and with six buttons up there the bar can still come up ~120px
   short. Wrapping is a flex container's first answer to that, but it is the
   wrong one here: it costs a whole row to save a few pixels. nowrap makes the
   overflow get absorbed by shrinking instead, and the shrink factors below
   decide what gives — the username first (it is the only part whose width is
   unbounded by its own label, and it stays legible as an ellipsis), the
   wordmark only once the username has hit its floor, and the controls never.
   (Save Account and Feedback have since moved behind the ⚙️ Settings gear, so
   the bar is two buttons lighter; the order of sacrifice still holds.) */
.hub-bar{padding-left:16px;padding-right:16px}
.hub-right{flex-wrap:nowrap;justify-content:flex-end;gap:8px;min-width:0}
.hub-right>*{flex:0 0 auto}
.hub-right .btn{padding-left:10px;padding-right:10px}
.hub-pts,.hub-credits{padding-left:10px;padding-right:10px}
.hub-logo-sm{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* shrink:100 — drained almost to the floor before the wordmark gives anything. */
.hub-uname{flex:0 100 auto;min-width:44px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* The row cannot hold this many controls however hard it shrinks, and nowrap
   pushes the surplus out through the border instead — leftwards, because the
   row is justified to the end, so the overflow lands ON the wordmark rather
   than off the edge where it would at least be visible as a mistake.

   This used to be gated at max-width:900px. That was the wrong axis: the bar is
   capped at 1060px, so how much room the controls have barely changes above
   that — a guest session (which adds the GUEST tag and the long SAVE PROGRESS
   ONLINE button) overflowed by ~110px at 1440px just as it did at 1024px, and
   the media query never fired because the VIEWPORT was wide. The number of
   controls is what varies, not the width available to them.

   Unconditional wrapping fixes every width at once, and costs nothing at the
   sizes that already fit: flex-wrap only ever engages when the content
   genuinely does not fit, which is exactly the condition we want it on. */
.hub-right{flex-wrap:wrap;row-gap:8px}
.btn-feedback{color:var(--lime);border-color:rgba(57,255,20,.35)}
.btn-feedback:hover{background:rgba(57,255,20,.14);border-color:var(--lime);box-shadow:0 0 18px rgba(57,255,20,.22)}

/* ── 🔊 AUDIO TOGGLE ──
   One button, three states: effects+music → effects only → silent. The icon
   carries the state, the colour makes "you have muted something" readable at a
   glance without reading the glyph. Square-ish so it sits next to ⛶ evenly. */
.btn-sound{padding:7px 12px;color:var(--cyan);border-color:rgba(0,245,255,.35);font-size:.85rem;line-height:1}
.btn-sound:hover{background:rgba(0,245,255,.14);border-color:var(--cyan);box-shadow:0 0 18px rgba(0,245,255,.22)}
.btn-sound.snd-partial{color:var(--gold);border-color:rgba(255,215,0,.35)}
.btn-sound.snd-partial:hover{background:rgba(255,215,0,.14);border-color:var(--gold);box-shadow:0 0 18px rgba(255,215,0,.22)}
.btn-sound.snd-off{color:var(--dim);border-color:var(--border);opacity:.72}
.btn-sound.snd-off:hover{background:rgba(255,255,255,.1);border-color:var(--border2);box-shadow:none}

/* 📱 v131 · A closed sheet is HIDDEN once it has faded, as a screen is (SCREEN
   SYSTEM): thirty-seven of these stood over the page at every moment, each a
   full-screen blur with a 3D-lifted dialog in it, painted and composited while
   nobody could see them. It also takes a closed sheet's buttons out of the tab
   order, which openPartyPicker() had to do by hand with `inert`. */
.fb-overlay{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(2,2,10,.82);backdrop-filter:blur(7px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s ease,visibility 0s linear .22s}
/* 📴 The offline banner is position:fixed at bottom:0 with z-index 9000 — above
   every overlay — so a full-height modal ran its last ~60px underneath it. That
   is invisible on the overlays whose bottom row is just text, and not invisible
   at all on the briefing, whose bottom row is CLOSE and PLAY IT. The overlay
   gives the bar its own room instead of the modal having to know about it. */
html.is-offline .fb-overlay{padding-bottom:calc(20px + 3.4rem + env(safe-area-inset-bottom, 0px))}
.fb-overlay.show{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .22s ease,visibility 0s}

.fb-modal{position:relative;width:100%;max-width:470px;max-height:90vh;overflow-y:auto;padding:28px 26px 26px;border:1px solid rgba(57,255,20,.4);border-radius:var(--rl);background:linear-gradient(160deg,rgba(11,14,30,.97),rgba(4,4,14,.99));box-shadow:0 0 70px rgba(57,255,20,.13),inset 0 0 0 1px rgba(255,255,255,.03);transform:translateY(18px) scale(.97);transition:transform .26s cubic-bezier(.2,.9,.3,1.25)}
.fb-overlay.show .fb-modal{transform:none}
/* Neon scan-line across the top edge */
.fb-modal::before{content:'';position:absolute;top:0;left:12%;right:12%;height:1px;background:linear-gradient(90deg,transparent,var(--lime),transparent);box-shadow:0 0 12px var(--lime)}

/* z-index is load-bearing. The ✕ comes BEFORE .fb-head in every modal, and the
   title is a full-width block under it. In the 3D interface the title carries a
   filter, which makes it a stacking context painted in DOM order with the
   positioned ✕ — later, so on top, and hit-testing on top: the ✕ could not be
   clicked in any modal until it was lifted explicitly. */
.fb-close{position:absolute;z-index:2;top:14px;right:14px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:var(--s2);border:1px solid var(--border);border-radius:8px;color:var(--dim);font-size:.8rem;cursor:pointer;transition:all .2s}
.fb-close:hover{color:var(--pink);border-color:var(--pink);background:rgba(255,0,144,.1)}

.fb-head{text-align:center;margin-bottom:28px}
.fb-title{font-family:var(--fd);font-size:.95rem;font-weight:900;letter-spacing:.1em;background:linear-gradient(90deg,var(--lime),var(--cyan));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.fb-sub{font-family:var(--fd);font-size:.5rem;letter-spacing:.26em;text-transform:uppercase;color:var(--dimmer);margin-top:13px}

.fb-opt{font-size:.85em;color:var(--dimmer);letter-spacing:.08em;text-transform:none}
.fb-select{appearance:none;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,var(--dim) 50%),linear-gradient(135deg,var(--dim) 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:40px}
/* The one part of a <select> the page cannot paint is the open list: that is
   an OS window, and its frame, its scrollbar and its highlight bar are drawn
   from the colour scheme, not from CSS. Left at the default light, a
   dark-styled select dropped a white slab with a white scrollbar over the
   hub. The rows themselves need an OPAQUE colour for the same reason: .input
   paints var(--s2), rgba(255,255,255,.08), which Chrome cannot composite into
   a popup, so it fell back to white and left every white-texted label
   invisible. Keyed off the element, not one class, so the next select in the
   game is born themed. */
select{color-scheme:dark}
select option{background:#0b0e1e;color:var(--text)}
.fb-textarea{min-height:110px;resize:vertical;font-size:.92rem;line-height:1.5;font-family:var(--fb)}
.fb-textarea::placeholder{color:var(--dimmer);font-family:var(--fd);font-size:.62rem;letter-spacing:.06em;line-height:1.9}
.fb-count{font-family:var(--fd);font-size:.5rem;letter-spacing:.14em;color:var(--dimmer);text-align:right;margin-top:6px}
.fb-count.warn{color:var(--gold)}

/* ── Core node rating ── */
.fb-rating{display:flex;gap:10px}
.fb-node{flex:1;padding:11px 0;background:var(--s2);border:1px solid var(--border);border-radius:8px;color:var(--dimmer);font-size:1.05rem;line-height:1;cursor:pointer;transition:all .18s ease}
.fb-node:hover{border-color:rgba(57,255,20,.5);transform:translateY(-2px)}
.fb-node.lit{background:rgba(57,255,20,.12);border-color:var(--lime);color:var(--lime);text-shadow:0 0 10px var(--lime);box-shadow:0 0 16px rgba(57,255,20,.2)}
.fb-node:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.fb-rating-lbl{font-family:var(--fd);font-size:.52rem;letter-spacing:.16em;text-transform:uppercase;color:var(--dimmer);margin-top:9px;min-height:12px}
.fb-rating-lbl.set{color:var(--lime)}

.fb-err{min-height:20px;font-size:.8rem;font-weight:600;color:var(--pink);text-align:center;margin-bottom:10px}

/* ── Success / terminal readout ── */
.fb-success{display:none;text-align:center;padding:14px 0 6px}
.fb-success.show{display:block}
.fb-success-icon{font-size:3rem;margin-bottom:18px;animation:fbPulse 1.4s ease-in-out infinite}
@keyframes fbPulse{0%,100%{transform:scale(1);opacity:.85}50%{transform:scale(1.12);opacity:1}}
.fb-term{background:rgba(0,0,0,.5);border:1px solid rgba(57,255,20,.28);border-radius:10px;padding:16px;text-align:left;font-family:var(--fd);font-size:.6rem;line-height:2;letter-spacing:.06em;color:var(--lime);min-height:104px;text-shadow:0 0 8px rgba(57,255,20,.5)}
.fb-term .ok{color:#fff;text-shadow:0 0 10px var(--lime)}
.fb-term .caret{animation:fbBlink 1s step-end infinite}
@keyframes fbBlink{50%{opacity:0}}

@media (max-width:520px){
  .fb-modal{padding:24px 18px}
  .fb-rating{gap:6px}
  .fb-node{font-size:.9rem;padding:9px 0}
}

/* ══════════════════════════════════════════════════════════════
   ❓ THE CONFIRM SHEET (§ 97, ✨ v142) — confirmSheet() in app.js.
   One question on the .fb-overlay shell, built on first use. It stands over everything a question can be asked from: the pause menu is 2100,
   the briefing raised over it 2150, and the tour (2600) can still point at it. .danger turns the card pink; the safe choice is the primary button.
   ══════════════════════════════════════════════════════════════ */
.cf-tint{z-index:2300}
.cf-modal{max-width:420px;border-color:rgba(0,245,255,.45);box-shadow:0 0 70px rgba(0,245,255,.14),inset 0 0 0 1px rgba(255,255,255,.03)}
.cf-modal::before{background:linear-gradient(90deg,transparent,var(--cyan),transparent);box-shadow:0 0 12px var(--cyan)}
.cf-tint.danger .cf-modal{border-color:rgba(255,0,144,.55);box-shadow:0 0 70px rgba(255,0,144,.16),inset 0 0 0 1px rgba(255,255,255,.03)}
.cf-tint.danger .cf-modal::before{background:linear-gradient(90deg,transparent,var(--pink),transparent);box-shadow:0 0 12px var(--pink)}
.cf-tint .fb-head{margin-bottom:16px}
.cf-tint .fb-title{background:linear-gradient(90deg,var(--cyan),var(--purple));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.cf-tint.danger .fb-title{background:linear-gradient(90deg,var(--pink),var(--gold));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.cf-body{display:grid;gap:10px;text-align:left}
.cf-body p{margin:0;font-size:.9rem;line-height:1.55;color:var(--dim);overflow-wrap:anywhere}
.cf-rows{margin-top:2px;padding:2px 14px;background:var(--s2);border:1px solid var(--border);border-radius:12px}
.cf-row{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:9px 0;font-family:var(--fd);font-size:.58rem;letter-spacing:.1em}
.cf-row + .cf-row{border-top:1px solid var(--border)}
.cf-row span{color:var(--dimmer)}
.cf-row b{color:#fff;font-size:.7rem;letter-spacing:.05em;text-align:right;white-space:pre-wrap}
.cf-btns{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.cf-btns .btn{width:100%;white-space:normal;line-height:1.3}
.cf-btns .btn:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
.cf-btns .btn.cf-yes.danger{background:rgba(255,0,144,.1);color:var(--pink);border:1px solid rgba(255,0,144,.55)}
.cf-btns .btn.cf-yes.danger:hover{background:rgba(255,0,144,.2);border-color:var(--pink);box-shadow:0 0 22px rgba(255,0,144,.3)}
html.cs-hc .cf-body p,html.cs-hc .cf-row span{color:#eef3f8}

/* ══════════════════════════════════════════════════════════════
   💾 SAVE ACCOUNT — guest → permanent upgrade
   Reuses the .fb-overlay/.fb-modal shell; .up-tint recolours it cyan.
   ══════════════════════════════════════════════════════════════ */
.btn-save-acct{background:rgba(57,255,20,.1);color:var(--lime);border:1px solid rgba(57,255,20,.5);animation:saveGlow 2.4s ease-in-out infinite}
.btn-save-acct:hover{background:rgba(57,255,20,.2);border-color:var(--lime);animation:none;box-shadow:0 0 24px rgba(57,255,20,.35)}
@keyframes saveGlow{0%,100%{box-shadow:0 0 0 rgba(57,255,20,0)}50%{box-shadow:0 0 18px rgba(57,255,20,.3)}}

.up-tint .fb-modal{border-color:rgba(0,245,255,.42);box-shadow:0 0 70px rgba(0,245,255,.14),inset 0 0 0 1px rgba(255,255,255,.03)}
.up-tint .fb-modal::before{background:linear-gradient(90deg,transparent,var(--cyan),transparent);box-shadow:0 0 12px var(--cyan)}
.up-tint .fb-title{background:linear-gradient(90deg,var(--cyan),var(--purple));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.up-tint .fb-term{border-color:rgba(0,245,255,.28);color:var(--cyan);text-shadow:0 0 8px rgba(0,245,255,.5)}
.up-tint .fb-term .ok{color:#fff;text-shadow:0 0 10px var(--cyan)}

.up-carry{background:rgba(0,245,255,.06);border:1px solid rgba(0,245,255,.28);border-radius:10px;padding:12px 14px;margin-bottom:18px;text-align:center;font-family:var(--fd);font-size:.56rem;letter-spacing:.1em;color:var(--cyan);line-height:2}
.up-carry b{color:#fff;font-weight:700}
.up-hint{font-size:.68rem;color:var(--dimmer);margin-top:6px;letter-spacing:.02em}

/* ══════════════════════════════════════════════════════════════
   📱 MOBILE / TOUCH
   ══════════════════════════════════════════════════════════════ */

/* Double-tap-to-zoom is what made every button press zoom the page.
   touch-action:manipulation removes the double-tap gesture (and its
   ~300ms click delay) while LEAVING pinch-to-zoom intact, so the page
   stays accessible to anyone who needs to magnify it. */
button, .btn, .auth-tab, .market-tab, .diff-btn, .game-card, .shop-card,
.memory-card, .hack-node, .fb-node, .fb-close, select, #click-btn, #math-submit {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Stop long-press selecting label text or raising the iOS callout menu
   mid-game. Inputs and the feedback textarea stay selectable. */
button, .btn, .auth-tab, .market-tab, .diff-btn, .game-card, .shop-card,
.memory-card, .hack-node, .path-node, .fb-node, .ctrl-btn, .hub-bar, .g-hdr, .market-bar {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
/* Deliberately NOT in the touch-action:manipulation list above: Overclock Path
   is drag-driven, and .path-grid claims touch-action:none so a finger tracing a
   route draws on the board rather than scrolling the page out from under it.
   The tap-highlight still has to go, or every node flashes grey as the drag
   crosses it. */
.path-node { -webkit-tap-highlight-color: transparent; }

/* Play surfaces: swallow every browser gesture so a drag or hold never
   scrolls, zooms, or pulls-to-refresh the page out from under the game. */
#arcade-canvas, .ctrl-btn, #click-btn, .reaction-box { touch-action: none; }
body { overscroll-behavior: none; }

/* A canvas game is driven entirely by finger-on-canvas — no page scrolling to
   preserve — so lock the screen down and let fitCanvas() size the board. */
#game-screen.canvas-game { overflow: hidden; }
#g-canvas-holder { max-width: 100%; }

/* iOS zooms the viewport when focusing any field under 16px. Everything
   the player can type into is pinned to 16px so that never fires. */
.input, .fb-textarea, .fb-select, #math-answer, input, textarea, select {
  font-size: 16px;
}
.fb-textarea { line-height: 1.5; }

/* Real viewport height on mobile — 100% ignores the collapsing browser
   chrome, leaving the hub cut off behind the address bar. */
@supports (height: 100dvh) {
  html, body { height: 100dvh; }
}

/* Keep the UI clear of notches and the home indicator. */
.hub-bar, .market-bar, .g-hdr {
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.screen { padding-bottom: max(20px, env(safe-area-inset-bottom)); }

/* A finger has no hover, but tapping still latches :hover on most mobile
   browsers — cards stayed lifted and glowing long after you'd moved on. Drop
   the hover treatment entirely there and give taps a real press state. */
@media (hover: none) {
  .game-card:hover, .shop-card:hover, .btn-primary:hover, .diff-btn:hover,
  .fb-node:hover, .btn-guest:hover:not(:disabled), .btn-save-acct:hover {
    transform: none;
    box-shadow: none;
  }
  .game-card[data-c]:hover { border-color: var(--border); }
  .game-card:active { transform: scale(.97); border-color: var(--border2); }
  .shop-card:active, .btn:active { transform: scale(.97); }
  /* .lit is applied by the game itself, so it must survive the press state. */
  .hack-node:not(.lit):active { border-color: var(--nc); transform: scale(.96); }
  /* Same reasoning for the circuit board: .on and .dead are game state, and a
     press must not repaint a node the route is already running through. */
  .path-node:not(.on):not(.dead):active { border-color: var(--pc, var(--purple)); transform: scale(.96); }
  .btn-primary { box-shadow: 0 0 20px rgba(0,245,255,.25); }
}

/* Finger-sized targets on touch devices (44px is the accessibility floor). */
@media (max-width: 520px) {
  /* Seven cards can't share one phone-width row — a 22% basis breaks the
     deck into a 4 + 3 grid instead of squeezing every label to nothing. */
  #bb-deck { gap: 6px; }
  .bb-btn { padding: 7px 3px; gap: 2px; flex-basis: 22%; }
  .bb-ico { font-size: 1.15rem; }
  .bb-name { font-size: .5rem; letter-spacing: .06em; }
  .bb-cost { font-size: .48rem; }
  .bb-btn[data-cd]::before { font-size: 1rem; }
}

@media (pointer: coarse) {
  .btn-sm { padding: 11px 16px; min-height: 44px; }
  .btn { min-height: 44px; }
  .ctrl-btn { min-height: 68px; font-size: 1.05rem; }
  .auth-tab, .market-tab, .diff-btn { min-height: 44px; }
  .fb-node { padding: 15px 0; }
  .fb-close { width: 38px; height: 38px; }

  /* Tetris runs four buttons (◀ ROTATE DROP ▶) on a ~340px row — the 3-button
     sizing overflows there, so the 4-up layout gets its own scale. */
  #arcade-controls.four-up { gap: 7px; }
  #arcade-controls.four-up .ctrl-btn { font-size: .7rem; padding: 12px 2px; min-width: 0; }
  #arcade-controls.four-up .ctrl-btn.glyph { font-size: 1.15rem; }

  /* Games driven by finger-on-canvas keep one wide button instead of a pad. */
  #arcade-controls.solo-action .ctrl-btn { font-size: .82rem; }
}

/* ── Narrow screens ── */
@media (max-width: 700px) {
  /* The hub bar carries 5 buttons plus 3 stats — let it stack instead of
     overflowing off-screen. */
  .hub-bar, .market-bar {
    flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px;
  }
  .hub-right { justify-content: center; gap: 8px; }
  .hub-logo-sm, .market-title { text-align: center; }
  /* Stacked, the leaderboard's label lands right under the last game card —
     widen the gap so the two section headings stay clearly separated. */
  .hub-body { grid-template-columns: 1fr; gap: 30px; }

  /* One full-bleed card per row meant scrolling past eleven screen-tall tiles
     to reach the last game. Two compact tiles per row makes the roster
     scannable; the blurb is clamped so every card is the same height. */
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card { padding: 15px 10px; }
  .gc-icon { font-size: 1.9rem; margin-bottom: 8px; }
  .gc-name { font-size: .52rem; margin-bottom: 8px; }
  .gc-desc {
    font-size: .68rem; line-height: 1.35; margin-bottom: 11px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .gc-pts { font-size: .44rem; padding: 2px 8px; }
  .lb-panel { max-height: 320px; }

  /* Same three-row header, just tighter — the phone needs the height. */
  .g-hdr { column-gap: 12px; row-gap: 8px; }
  .g-title { font-size: .8rem; }
  .g-controls { font-size: .52rem; line-height: 1.6; }
  /* Tighter than the desktop pill: the reserved slots are kept at full width
     here (a five-digit Cyber Arena score has to sit still on a phone too), so
     the room comes out of the padding instead. */
  .stat-pill { padding: 5px 8px; font-size: .55rem; }
  /* The pace ghost is an extra pill that shows up only once the mission has a
     personal best to race, and on a phone it is the one that used to push Audio
     and Fullscreen clean off the right edge: .g-stats is a flex line inside a
     grid track, and a grid item will not shrink below its content unless it is
     told to. Letting the row wrap fixed the overflow and created a worse
     problem — the three buttons wrapped INDIVIDUALLY, one per line, and a
     375×812 phone carrying a pace ghost got a four-row, 168px header with
     Fullscreen sitting alone on the last row. A fifth of the screen, spent on
     chrome, before the board got a pixel.
     Two things fix it and both are above: the delta owns a fixed slot so the
     pill stops resizing at all, and the buttons are ONE item so a wrap can
     only ever break between the pills and the cluster. Two rows, worst case.
     Nothing has to be re-measured for it — the board sizes itself from the
     header's real bottom edge, so a second line costs the play field exactly
     its own height and no more. */
  .g-hdr, .g-hdr > * { min-width: 0; }
  /* A phone cannot fit Quit, the readouts and the cluster on one line, so the
     header stops pretending: the two groups of CONTROLS share the row, and the
     READOUTS — which nobody taps — get the line beneath. Four rows in total,
     none of them ragged, and the tallest thing on the control row is a 44px
     thumb target instead of a 23px pill. */
  .g-hdr > .g-actions { grid-column: 3; grid-row: 2; }
  .g-stats { grid-column: 1 / -1; grid-row: 3; justify-content: flex-end; }
  .g-controls { grid-row: 4; }
  .g-stats > .stat-pill, .g-stats > .ghost-pace { flex-shrink: 0; }
  /* A real thumb target on the one row the player has to hit while playing. */
  .g-actions { gap: 8px; }
  .g-actions .btn-sm { min-width: 44px; min-height: 44px; font-size: .9rem; }
  .prog-bar { margin-bottom: 10px; }
  .g-area { max-width: 100%; }
  #arcade-controls { max-width: 100%; }

  /* The 560×500 board is width-bound in portrait — it fits the width and then
     leaves a third of the screen empty below the pad. So every pixel of side
     padding comes straight off the play field and buys nothing: at 20px a side
     the board landed at 335px on a 375px phone. The header carried its own
     20px on top of that, indenting Quit and the stat pills from the board edge
     they're supposed to line up with; both shrink to the notch inset here. */
  #game-screen {
    padding-top: 10px;
    padding-left: max(6px, env(safe-area-inset-left));
    padding-right: max(6px, env(safe-area-inset-right));
  }
  .g-hdr {
    padding-left: max(2px, env(safe-area-inset-left));
    padding-right: max(2px, env(safe-area-inset-right));
  }

  /* The NEXT box is a fixed 80px block sitting on top of a play field that is
     now only ~220–340px wide — it swallowed three of Tetris's ten columns.
     Shrink it and make it translucent so the stack underneath stays readable
     right up to the top-out. */
  #tetris-next-wrap {
    top: 5px; right: 5px; padding: 4px 5px;
    background: rgba(10,10,26,.45); border-color: rgba(255,255,255,.14);
  }
  #tetris-next-wrap .next-label { font-size: .42rem; margin-bottom: 1px; opacity: .75; }
  #nextCanvas { width: 46px; height: 46px; opacity: .78; }

  .convert-grid { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  #click-btn { width: 150px; height: 150px; font-size: 3rem; }
}

/* Landscape phones: reclaim vertical space so the canvas still fits. */
@media (max-height: 500px) and (orientation: landscape) {
  #hub-screen, #market-screen { padding-top: 8px; }
  .hub-bar { margin-bottom: 10px; }
  .g-hdr { margin-bottom: 6px; }
  #arcade-controls { margin-top: 8px; }
  .ctrl-btn { min-height: 52px; padding: 10px; }

  /* Every header row here costs the board twice its height (it scales to fit).
     The gesture hint has already been shown as an on-board overlay, and the
     title is in the card you just tapped — drop both and give the space back. */
  #game-screen { padding-top: 6px; }
  .g-controls { display: none; }
  /* Back to a single row — height is the scarce thing here, and with the hint
     gone the title is the only flexible item. It sits in the middle track so
     it stays clear of Quit and the pills without ever overflowing the row. */
  .g-hdr { grid-template-columns: auto 1fr auto auto; column-gap: 12px; row-gap: 0; }
  .g-hdr > #btn-quit { grid-column: 1; grid-row: 1; }
  .g-title { grid-column: 2; grid-row: 1; font-size: .7rem; }
  .g-stats { grid-column: 3; grid-row: 1; }
  /* A fourth track, because the cluster is its own header item now. Landscape
     has the width for all four — it is height that is scarce here. */
  .g-hdr > .g-actions { grid-column: 4; grid-row: 1; }
  .prog-bar { margin-bottom: 6px; height: 4px; }

  /* Landscape has width to spare and no height at all, so the pad moves to the
     side of the board instead of underneath it — the board then gets the full
     column height. !important is needed because each game sets the holder's
     display inline when it mounts — which is also why this is scoped to
     .canvas-game: unscoped, it re-showed the holder (and a stale board) on
     top of Memory Match, Math Blitz and Reaction Time, which hide it. */
  #game-screen.canvas-game #g-canvas-holder { display: flex !important; align-items: center; gap: 12px; }
  #arcade-controls {
    flex-direction: column; width: auto; min-width: 96px; max-width: 130px;
    margin-top: 0; gap: 8px;
  }
  #arcade-controls .ctrl-btn { min-height: 46px; font-size: .68rem; padding: 8px 6px; }
  #arcade-controls .ctrl-btn.glyph { font-size: 1.05rem; }
  #arcade-controls.four-up .ctrl-btn { min-height: 38px; }

  /* The deck stays a full-width row under the board (it's a sibling of the
     holder, not a child), but flattens to one line so it costs the board as
     little height as possible. */
  #bb-deck { margin-top: 6px; gap: 6px; }
  .bb-btn { flex-direction: row; justify-content: center; align-items: baseline; gap: 4px; padding: 6px 3px; }
  .bb-ico { font-size: 1rem; }
  /* Seven cards across the one row — shave the labels so the widest names
     (FIREWALL, RAM SPEED) still fit a seventh of the board. */
  .bb-name { font-size: .48rem; letter-spacing: .04em; }
  .bb-cost { font-size: .44rem; }
  .bb-btn[data-cd]::before { font-size: .9rem; }

  /* The modulator console is a sibling of the holder too, so it also stays a
     full-width row under the scope — just a flatter one, since height is the
     scarce thing in landscape. */
  #g-freq-ctl { margin-top: 6px; gap: 8px; }
  .freq-slider { padding: 5px 10px 7px; }
  #g-sort-rule { margin-top: 6px; gap: 8px; padding: 6px 10px; }
  .sr-txt { font-size: .72rem; }
  .sr-next { font-size: .55rem; }
  .freq-lbl { margin-bottom: 5px; font-size: .5rem; }

  /* Overclock Path is not a canvas game, so it is laid out by .path-board's own
     clamp — which is capped against the viewport HEIGHT here for the same
     reason the board is: in landscape there is width to spare and none of it. */
  .path-wrap { gap: 8px; max-width: 340px; }
  .path-readout { padding: 7px 10px; }
  .path-board { width: min(100%, 340px, 58vh); }
  .path-grid { gap: 6px; }
}

/* Toasts sit at the bottom on desktop, which on a phone lands them right
   on top of the game control buttons. Flip them to the top on narrow
   screens so a confirmation can't swallow a tap mid-game. */
@media (max-width: 700px) {
  #toast {
    bottom: auto; top: -100px;
    max-width: calc(100vw - 32px);
    font-size: .62rem; padding: 10px 16px; text-align: center; line-height: 1.5;
    transition: top .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease;
  }
  #toast.show { top: max(12px, env(safe-area-inset-top)); bottom: auto; }
}

/* ══════════════════════════════════════════════════════════════════════
   🌐 NETWORK ARENA — multiplayer banner, lobby, room and in-round HUD
   ══════════════════════════════════════════════════════════════════════ */

/* ── HUB BANNER ── */
.mp-banner{
  position:relative;overflow:hidden;display:flex;align-items:center;gap:16px;
  background:linear-gradient(120deg,rgba(0,245,255,.09),rgba(168,85,247,.09));
  border:1px solid rgba(0,245,255,.35);border-radius:var(--rl);
  padding:16px 20px;margin-bottom:20px;
  box-shadow:0 0 26px rgba(0,245,255,.1)
}
/* A slow light sweep marks it as the live thing on the page without animating
   anything the eye has to track while reading the mission grid. */
.mp-banner::after{
  content:'';position:absolute;top:0;left:-150%;width:55%;height:100%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.10),transparent);
  animation:mp-sweep 5.5s ease-in-out infinite;pointer-events:none
}
@keyframes mp-sweep{0%{left:-150%}55%,100%{left:160%}}
.mp-banner-icon{font-size:2.3rem;flex-shrink:0;animation:float 3.4s ease-in-out infinite}
.mp-banner-txt{flex:1;min-width:0}
.mp-banner-title{
  font-family:var(--fd);font-size:.72rem;font-weight:900;letter-spacing:.14em;
  background:linear-gradient(90deg,var(--cyan),var(--purple));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
  margin-bottom:5px
}
.mp-banner-sub{font-size:.75rem;color:var(--dim);line-height:1.4}
.mp-banner .btn{flex-shrink:0;position:relative;z-index:1}
/* ✨ v142 · 🌐 WHO IS WAITING (§ 101) — under the banner's copy: a count, and a JOIN for an operative you know. It wraps rather than
   clips, and nothing on it moves, so Reduce Motion has nothing to take away. Hidden unless somebody is waiting. */
.mp-banner-wait{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;margin-top:8px;font-size:.74rem;color:var(--dim);line-height:1.4}
.mp-banner-wait[hidden],.mp-waiting[hidden]{display:none}
.mpw-n{font-family:var(--fd);font-size:.55rem;font-weight:900;letter-spacing:.12em;color:var(--lime)}
.mpw-pair{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 8px}
.mpw-who{color:var(--text);font-weight:600}
.mpw-who em{font-style:normal;font-weight:500;color:var(--dim)}
.mpw-more{font-size:.68rem}
.mp-wait-mark{display:inline-block;min-width:1.3em;margin-right:3px;font-style:normal;text-align:center;color:var(--gold)}
.mpw-join{position:relative;z-index:1;min-height:28px;font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.12em;padding:6px 14px;border:1px solid var(--lime);border-radius:99px;background:rgba(57,255,20,.08);color:var(--lime);cursor:pointer}
.mpw-join:hover{background:rgba(57,255,20,.2)}
.mpw-join:disabled{opacity:.5;cursor:progress}
@media (pointer:coarse){.mpw-join{min-height:38px;padding:8px 18px}}

/* ── LOBBY SHELL ── */
#mp-screen{justify-content:flex-start;padding-top:20px}
.mp-bar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  width:100%;max-width:1060px;background:var(--s1);border:1px solid var(--border);
  border-radius:var(--r);padding:12px 20px;margin-bottom:18px;flex-shrink:0
}
.mp-title{
  font-family:var(--fd);font-size:.9rem;font-weight:900;letter-spacing:.08em;
  background:linear-gradient(90deg,var(--cyan),var(--purple));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text
}
.mp-link{
  font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.14em;
  color:var(--dimmer);background:var(--s2);border:1px solid var(--border);
  border-radius:20px;padding:5px 14px;white-space:nowrap
}
.mp-link.live{color:var(--lime);border-color:rgba(57,255,20,.45);background:rgba(57,255,20,.08)}
.mp-link.busy{color:var(--gold);border-color:rgba(255,215,0,.45);background:rgba(255,215,0,.08)}
.mp-link.down{color:var(--red);border-color:rgba(255,36,66,.45);background:rgba(255,36,66,.08)}

.mp-body{width:100%;max-width:1060px;flex:1;overflow-y:auto;padding-bottom:24px}
.mp-stage{display:none}
.mp-stage.active{display:block}
.mp-sec-2{margin-top:26px}

/* ── MODE PICKER ── */
/* Sixteen duels is more than fits on one screen, so the kinds are filterable.
   The chips read as a segmented control rather than as buttons — picking a
   category is a view change, not an action. */
.mp-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.mp-filter{
  font-family:var(--fd);font-size:.48rem;font-weight:700;letter-spacing:.12em;
  color:var(--dim);background:var(--s2);border:1px solid var(--border);
  border-radius:20px;padding:7px 15px;cursor:pointer;
  transition:color .2s ease,border-color .2s ease,background .2s ease
}
.mp-filter:hover{color:var(--txt);border-color:var(--border2)}
.mp-filter.on{
  color:var(--cyan);border-color:var(--cyan);background:rgba(0,245,255,.09);
  box-shadow:0 0 16px rgba(0,245,255,.18)
}
.mp-filter em{font-style:normal;opacity:.55;margin-left:6px}
/* ✨ v142 · ⚡ ANY DUEL (§ 101) — a way of queueing rather than a view of the table, so it sits at the far end and in gold. */
.mp-any{margin-left:auto;color:var(--gold);border-color:rgba(255,215,0,.4)}
.mp-any.on{color:var(--gold);border-color:var(--gold);background:rgba(255,215,0,.1);box-shadow:0 0 16px rgba(255,215,0,.2)}
.mp-any em{opacity:1;color:var(--lime)}

.mp-modes{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
/* The duel's KIND, top-left, opposite the SELECTED tick. Live rounds share one
   simulation over the wire; races run two independent boards and compare. */
.mp-mode-kind{
  position:absolute;top:10px;left:12px;
  font-family:var(--fd);font-size:.42rem;font-weight:700;letter-spacing:.12em
}
.mp-mode-kind.k-live{color:var(--pink)}
.mp-mode-kind.k-race{color:var(--lime)}
.mp-modes .mp-mode{padding-top:30px}
.mp-mode{
  position:relative;background:var(--s1);border:1px solid var(--border);
  border-radius:var(--rl);padding:20px 16px;text-align:center;cursor:pointer;
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease
}
.mp-mode:hover{transform:translateY(-4px);border-color:var(--border2)}
.mp-mode.sel{border-color:var(--cyan);background:rgba(0,245,255,.07);box-shadow:0 8px 30px rgba(0,245,255,.18)}
.mp-mode.sel::before{
  content:'\2714 SELECTED';position:absolute;top:10px;right:10px;
  font-family:var(--fd);font-size:.44rem;font-weight:700;letter-spacing:.12em;
  color:var(--cyan)
}
.mp-mode-icon{font-size:2.5rem;display:block;margin-bottom:10px}
.mp-mode-name{font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.08em;color:var(--cyan);margin-bottom:9px}
.mp-mode-desc{font-size:.74rem;color:var(--dim);line-height:1.45;margin-bottom:12px}
.mp-mode-meta{
  display:inline-block;font-family:var(--fd);font-size:.46rem;font-weight:700;
  letter-spacing:.1em;padding:3px 11px;border-radius:20px;
  color:var(--gold);border:1px solid var(--gold);background:rgba(255,215,0,.06)
}

/* ── CONNECT CARDS ── */
.mp-connect{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.mp-conn-card{display:flex;flex-direction:column;text-align:center;padding:22px 18px}
.mp-conn-icon{font-size:2rem;margin-bottom:10px}
.mp-conn-name{font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.1em;margin-bottom:10px}
.mp-conn-desc{font-size:.74rem;color:var(--dim);line-height:1.45;margin-bottom:16px;flex:1}
/* The tracking pads the right edge only, so the text-indent pulls the glyphs
   back level and the four characters sit centred in the field. */
.mp-code-input{
  text-align:center;font-family:var(--fd);font-weight:900;
  letter-spacing:.42em;text-indent:.42em;
  text-transform:uppercase;margin-bottom:10px
}
.mp-err{min-height:22px;margin-top:16px;text-align:center;font-size:.82rem;font-weight:600;color:var(--pink)}

/* ✨ v142 · 🌐 WHO IS WAITING (§ 101) — the rooms open right now, above QUICK MATCH. A row gives way before the JOIN does: the duel's name
   shortens, then the operative's. */
.mp-waiting{margin-bottom:16px;padding:10px 14px;border:1px solid rgba(57,255,20,.32);border-radius:var(--r);background:rgba(57,255,20,.04)}
.mp-wait-h{font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.16em;color:var(--lime);margin-bottom:6px}
.mp-wait-row{display:flex;align-items:center;gap:10px;padding:7px 0;border-top:1px solid var(--border)}
.mp-wait-row .mp-wait-mark{flex-shrink:0;margin-right:0}
.mp-wait-who{flex:0 1 auto;min-width:0;max-width:11em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.82rem}
.mp-wait-mode{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.74rem;color:var(--dim)}
.mp-wait-mode em{font-style:normal;margin-left:4px;color:var(--purple)}
.mp-wait-row .btn{flex-shrink:0}
.mp-wait-more{padding-top:7px;border-top:1px solid var(--border);font-size:.68rem;color:var(--dim)}
/* ✨ v142 · CREATE ROOM's tick (§ 103) — the ANY DUEL chip's gold, since both are a way of being found; off it reads as a chip at rest. */
.mp-list-tog{align-self:center;margin:-4px 0 14px;color:var(--dim)}
.mp-list-tog.on{color:var(--gold);border-color:var(--gold);background:rgba(255,215,0,.1);box-shadow:0 0 16px rgba(255,215,0,.2)}

/* ── 🤖 DROID OPPONENT ── */
.mp-bot-card{border-color:rgba(168,85,247,.4);background:linear-gradient(160deg,rgba(168,85,247,.09),transparent 70%)}
.mp-bot-card .mp-conn-name{color:var(--purple)}
.mp-bot-lvls{display:flex;gap:6px;margin-bottom:14px}
.mp-bot-lvl{
  flex:1;min-width:0;font-family:var(--fd);font-size:.44rem;font-weight:700;
  letter-spacing:.08em;color:var(--dim);background:var(--s2);
  border:1px solid var(--border);border-radius:var(--r);padding:9px 4px;
  cursor:pointer;transition:all .2s ease;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.mp-bot-lvl:hover{color:var(--txt);border-color:var(--border2)}
.mp-bot-lvl.on{color:#fff;border-color:var(--purple);background:rgba(168,85,247,.18)}
/* Each rung carries its own warning colour when chosen, so the risk is legible
   before the round rather than after it. */
.mp-bot-lvl[data-lvl="rookie"].on{border-color:var(--lime);background:rgba(57,255,20,.16)}
.mp-bot-lvl[data-lvl="elite"].on{border-color:var(--red);background:rgba(255,36,66,.18)}

/* The droid's seat in the room, and its tag in the versus HUD. */
.mp-seat.bot{border-color:rgba(168,85,247,.45);background:rgba(168,85,247,.07)}
.mp-seat.bot .mp-seat-tag{color:var(--purple)}
.mp-seat-bot-chip{
  display:inline-block;margin-top:7px;font-family:var(--fd);font-size:.4rem;
  font-weight:700;letter-spacing:.14em;color:var(--purple);
  border:1px solid rgba(168,85,247,.5);border-radius:20px;padding:2px 8px
}
#btn-mp-addbot{display:none}

/* Waiting on the rival's board to finish: the score race's one idle state. */
.mp-wait-score{
  display:block;margin-top:10px;font-family:var(--fd);font-size:.62rem;
  letter-spacing:.1em;color:var(--cyan)
}

/* ── ROOM ── */
.mp-room{max-width:560px;margin:0 auto}
.mp-room-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:6px}
.mp-room-lbl{font-family:var(--fd);font-size:.5rem;letter-spacing:.2em;color:var(--dim);margin-bottom:6px}
.mp-room-code{
  font-family:var(--fd);font-size:2.6rem;font-weight:900;letter-spacing:.22em;
  line-height:1;color:var(--cyan);text-shadow:0 0 24px rgba(0,245,255,.45)
}
.mp-room-game{
  font-family:var(--fd);font-size:.58rem;letter-spacing:.14em;color:var(--dim);
  padding-bottom:18px;border-bottom:1px solid var(--border);margin-bottom:18px
}
/* stretch, not center: a name that wraps to two lines would otherwise leave the
   two seats at different heights with a ragged gap between them */
.mp-seats{display:flex;align-items:stretch;gap:12px;margin-bottom:18px}
.mp-seat{
  flex:1;min-width:0;background:var(--s2);border:1px solid var(--border);
  border-radius:var(--r);padding:16px 12px;text-align:center;transition:all .25s ease
}
.mp-seat.filled{border-color:rgba(0,245,255,.4);background:rgba(0,245,255,.05)}
.mp-seat.ready{border-color:var(--lime);background:rgba(57,255,20,.07);box-shadow:0 0 18px rgba(57,255,20,.15)}
.mp-seat.empty{border-style:dashed;color:var(--dimmer)}
.mp-seat-avatar{font-size:1.9rem;display:block;margin-bottom:8px}
.mp-seat-name{
  font-family:var(--fd);font-size:.6rem;font-weight:700;margin-bottom:7px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
.mp-seat-tag{font-family:var(--fd);font-size:.46rem;letter-spacing:.12em;color:var(--dim)}
.mp-seat.ready .mp-seat-tag{color:var(--lime)}
/* ── § 102 · v142 · 🆚 THE ARENA REMEMBERS PEOPLE ── a person's seat is a door to their card, and says what you are against them
   (a brightening and a ring, not a border: the green ring of a seat that is ready is a fact, and a hover must not repaint it) */
.mp-seat[data-uid]{cursor:pointer}
.mp-seat[data-uid]:hover{filter:brightness(1.18)}
.mp-seat[data-uid]:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.mp-seat-h2h{margin-top:7px;font-family:var(--fd);font-size:.46rem;letter-spacing:.1em;line-height:1.5;color:var(--dim);overflow-wrap:anywhere}
.mp-seat-h2h b{color:var(--text)}
.mp-seat-mute{margin-top:6px;font-family:var(--fd);font-size:.44rem;letter-spacing:.12em;color:var(--red)}
.mp-vs{
  font-family:var(--fd);font-size:.8rem;font-weight:900;color:var(--pink);
  text-shadow:0 0 14px rgba(255,0,144,.5);flex-shrink:0;align-self:center
}
.mp-room-status{
  text-align:center;font-size:.8rem;color:var(--dim);font-weight:600;
  min-height:22px;margin-bottom:18px
}
.mp-room-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.mp-room-btns .btn[disabled]{opacity:.4;cursor:not-allowed;transform:none;box-shadow:none}
.btn-mp-unready{background:rgba(57,255,20,.12);color:var(--lime);border:1px solid rgba(57,255,20,.5)}
/* ── § 103 · v142 · 📨 INVITE ── under the status line of a room with a seat free: who can be asked in, then the room's link, then what
   UNLISTED means. A row gives way before its button does (the name ellipsizes; the last-played wraps under it). */
.mp-invite{margin:0 0 18px;padding:12px 14px;border:1px solid rgba(0,245,255,.3);border-radius:var(--r);background:rgba(0,245,255,.04);text-align:left}
.mp-invite[hidden]{display:none}
.inv-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.16em;color:var(--cyan)}
.inv-state{font-size:.48rem;letter-spacing:.12em;color:var(--dim);text-align:right}
.inv-rows:empty{display:none}
.inv-row{display:flex;align-items:center;gap:10px;padding:7px 0;border-top:1px solid var(--border)}
.inv-row.deaf{opacity:.62}
.inv-mark{flex:0 0 1.4em;text-align:center;font-style:normal;color:var(--gold)}
.inv-who{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:1px}
.inv-who b{font-size:.82rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inv-who em{font-style:normal;font-size:.62rem;line-height:1.3;color:var(--dim)}
.inv-who em.on{color:var(--lime)}
.inv-row .btn{flex-shrink:0}
.inv-more{padding:7px 0 0;border-top:1px solid var(--border);font-size:.68rem;color:var(--dim)}
.inv-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.inv-btns .btn{flex:1 1 9em}
.inv-note{margin-top:10px;font-size:.66rem;line-height:1.5;color:var(--dim)}
@media (pointer:coarse){.inv-row .btn,.inv-btns .btn{min-height:40px}}

/* ── IN-ROUND VERSUS STRIP ── */
#mp-hud{
  display:flex;align-items:center;gap:12px;width:100%;
  max-width:max(var(--board-w,560px),560px);margin-bottom:12px;flex-shrink:0
}
.mp-hud-side{display:flex;align-items:baseline;gap:8px;min-width:0;flex:0 0 auto}
.mp-hud-right{justify-content:flex-end}
.mp-hud-name{
  font-family:var(--fd);font-size:.52rem;letter-spacing:.1em;color:var(--dim);
  max-width:11ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
/* Same problem as the stat pills, and worse here: the bar between the two
   scores is the flexible element, so every digit either side gained pulled the
   bar — and with it the cyan/pink boundary you are reading — sideways. A fixed
   slot per score keeps the bar's ends nailed down; each score grows into its
   own room instead of into the bar's. */
.mp-hud-score{
  font-family:var(--fd);font-size:1.05rem;font-weight:900;line-height:1;color:var(--cyan);
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;
  display:inline-block;min-width:5ch;text-align:right
}
/* Mirrored: each score stays hard against the bar it belongs to. */
.mp-hud-right .mp-hud-score{text-align:left}
.mp-hud-right .mp-hud-score{color:var(--pink)}
.mp-hud-bar{
  flex:1;height:7px;border-radius:4px;overflow:hidden;background:rgba(255,0,144,.35)
}
/* The fill is "your share" of the bar, so the cyan/pink boundary IS the score
   difference — readable at a glance while your eyes are on the ball. */
.mp-hud-fill{
  height:100%;width:50%;border-radius:4px;
  background:linear-gradient(90deg,var(--cyan),var(--purple));
  box-shadow:0 0 12px rgba(0,245,255,.5);transition:width .28s ease-out
}

/* ── BOARD OVERLAY (waiting / dropped link / shared countdown) ── */
#mp-overlay{
  position:absolute;inset:0;display:none;align-items:center;justify-content:center;
  padding:24px;border-radius:8px;background:rgba(4,4,14,.78);backdrop-filter:blur(3px);
  z-index:5;pointer-events:none;text-align:center
}
#mp-overlay.show{display:flex}
#mp-overlay-txt{
  font-family:var(--fd);font-size:.85rem;font-weight:700;letter-spacing:.1em;
  line-height:1.7;color:var(--cyan);text-shadow:0 0 18px rgba(0,245,255,.5)
}
#mp-overlay.warn #mp-overlay-txt{color:var(--red);text-shadow:0 0 18px rgba(255,36,66,.5)}
#mp-overlay .mp-ov-sub{
  display:block;margin-top:10px;font-size:.6rem;letter-spacing:.14em;
  color:var(--dim);text-shadow:none
}

/* ── RESULT BADGES ── */
.res-bonus.res-bonus-net{border-color:var(--cyan);color:var(--cyan);background:rgba(0,245,255,.08);box-shadow:0 0 10px rgba(0,245,255,.35)}
.res-bonus.res-bonus-win{border-color:var(--lime);color:var(--lime);background:rgba(57,255,20,.08);box-shadow:0 0 10px rgba(57,255,20,.35)}
.res-bonus.res-bonus-loss{border-color:var(--red);color:var(--red);background:rgba(255,36,66,.08);box-shadow:0 0 10px rgba(255,36,66,.35)}

/* ── NARROW SCREENS ── */
@media (max-width: 700px){
  .mp-bar{flex-direction:column;align-items:stretch;gap:10px;padding:12px 14px}
  .mp-title{text-align:center}
  .mp-link{text-align:center}
  .mp-banner{flex-direction:column;text-align:center;gap:10px;padding:16px 14px}
  .mp-banner .btn{width:100%}
  .mp-banner-wait{justify-content:center}
  .mp-modes{grid-template-columns:1fr}
  .mp-mode{padding:16px 14px}
  .mp-mode-icon{font-size:2rem}
  .mp-room-code{font-size:2rem}
  .mp-seats{gap:8px}
  .mp-seat{padding:12px 8px}
  /* The reserved slot rides the font size down with it — a five-digit score
     still has to leave the bar where it was. */
  .mp-hud-score{font-size:.9rem}
  .mp-hud-name{font-size:.46rem;max-width:8ch}
  #mp-overlay-txt{font-size:.7rem}
}

/* Landscape phones: the versus strip costs the board height it can't spare,
   so it flattens to the bar and the two scores. */
@media (max-height: 500px) and (orientation: landscape){
  #mp-hud{margin-bottom:6px;gap:8px}
  .mp-hud-name{display:none}
  .mp-hud-score{font-size:.8rem}
}

/* ── 🔊 AUDIO POPOVER ── */
#audio-pop{position:fixed;z-index:400;min-width:230px;background:rgba(8,8,24,.97);border:1px solid var(--border2);border-radius:var(--r);padding:14px;box-shadow:0 8px 40px rgba(0,0,0,.6),0 0 24px rgba(0,245,255,.08);opacity:0;pointer-events:none;transform:translateY(-6px);transition:opacity .18s ease,transform .18s ease}
#audio-pop.open{opacity:1;pointer-events:all;transform:translateY(0)}
.ap-sec{font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.25em;color:var(--cyan);margin-bottom:10px}
.ap-sec + .ap-sec, .ap-vol-row + .ap-sec{margin-top:14px}
.ap-modes{display:flex;gap:6px;margin-bottom:12px}
.ap-mode{flex:1;font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.05em;padding:8px 4px;border-radius:8px;border:1px solid var(--border);background:var(--s1);color:var(--dim);cursor:pointer;transition:all .15s ease}
.ap-mode:hover{background:var(--s2);color:var(--text)}
.ap-mode.active{background:rgba(0,245,255,.12);border-color:var(--cyan);color:var(--cyan);box-shadow:0 0 12px rgba(0,245,255,.2)}
.ap-vol-row{display:flex;align-items:center;gap:10px}
.ap-vol-num{font-family:var(--fd);font-size:.65rem;font-weight:700;color:var(--text);min-width:3ch;text-align:right}
#ap-vol{flex:1;appearance:none;-webkit-appearance:none;height:4px;border-radius:2px;background:linear-gradient(90deg,var(--cyan),var(--purple));outline:none;cursor:pointer}
#ap-vol::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:var(--cyan);border:2px solid #04040e;box-shadow:0 0 10px rgba(0,245,255,.6);cursor:pointer}
#ap-vol::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--cyan);border:2px solid #04040e;box-shadow:0 0 10px rgba(0,245,255,.6);cursor:pointer}

/* ── 👁️ REDUCED MOTION ──
   Transitions that only decorate are cut to near-zero; the screen system keeps
   a short fade so navigation doesn't jump-cut. Looping/attention-grabbing
   animations stop entirely — those are the ones that cause trouble. */
html.reduced-motion *,
html.reduced-motion *::before,
html.reduced-motion *::after{
  animation-duration:.001ms !important;
  animation-iteration-count:1 !important;
  transition-duration:.08s !important;
  scroll-behavior:auto !important;
}
html.reduced-motion .screen{transition:opacity .12s ease,visibility 0s linear .12s !important;transform:none !important}
html.reduced-motion .screen.active{transition:opacity .12s ease,visibility 0s !important;transform:none !important}
/* Hover lifts and pulses read as motion on a big card grid — flatten them. */
html.reduced-motion .btn-primary:hover,
html.reduced-motion .btn-secondary:hover,
html.reduced-motion .game-card:hover,
html.reduced-motion .shop-card:hover{transform:none !important}

/* ── 👁️ VISUAL COMFORT POPOVER (shares #audio-pop shell) ── */
.ap-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;cursor:pointer;user-select:none}
.ap-toggle-lbl{font-family:var(--fb);font-size:.82rem;font-weight:600;color:var(--text)}
.ap-switch{position:relative;flex:0 0 38px;height:20px;border-radius:10px;background:var(--s2);border:1px solid var(--border);transition:background .18s ease,border-color .18s ease}
.ap-switch::after{content:'';position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--dim);transition:transform .18s ease,background .18s ease}
.ap-toggle.on .ap-switch{background:rgba(0,245,255,.18);border-color:var(--cyan)}
.ap-toggle.on .ap-switch::after{transform:translateX(18px);background:var(--cyan)}
.ap-divider{height:1px;background:var(--border);margin:12px 0 0}

/* ── 🔥 STREAK CHIP ── */
.hub-streak{font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.06em;padding:5px 10px;border-radius:20px;background:rgba(255,102,0,.14);border:1px solid rgba(255,102,0,.5);color:var(--orange);white-space:nowrap}

/* ── 🏅 BADGE SHELF ── */
.badge-label{margin-top:24px}
#badge-shelf{background:var(--s1);border:1px solid var(--border);border-radius:var(--rl);padding:14px}
.badge-count{font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.18em;color:var(--dim);margin-bottom:12px}
.badge-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:8px}
.badge{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border-radius:10px;background:var(--s1);border:1px solid var(--border);font-size:1.05rem;filter:grayscale(1);opacity:.32;cursor:help;transition:transform .18s ease,opacity .18s ease,filter .18s ease}
.badge.has{filter:none;opacity:1;border-color:rgba(255,215,0,.55);background:rgba(255,215,0,.09);box-shadow:0 0 14px rgba(255,215,0,.14)}
.badge.has:hover{transform:translateY(-2px) scale(1.06)}
.badge-ico{line-height:1}

/* ── 📈 MISSION CARD SPARKLINE ── */
.gc-spark{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid var(--border)}
.gc-spark .spark{flex:1;height:22px;min-width:0}
.spark-best{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.08em;color:var(--dim);white-space:nowrap}

/* ── 🏆 LEADERBOARD SCOPE TABS ── */
#lb-tabs{display:flex;gap:6px;margin-bottom:12px}
.lb-tab{flex:1;font-family:var(--fd);font-size:.52rem;font-weight:700;letter-spacing:.08em;padding:8px 4px;border-radius:8px;border:1px solid var(--border);background:var(--s1);color:var(--dim);cursor:pointer;white-space:nowrap;transition:all .15s ease}
.lb-tab:hover{background:var(--s2);color:var(--text)}
.lb-tab.on{background:rgba(0,245,255,.12);border-color:var(--cyan);color:var(--cyan)}

/* ── ★ RIVAL STAR ── */
.lb-fr{background:none;border:none;color:var(--dimmer);font-size:.95rem;line-height:1;padding:0 6px;cursor:pointer;transition:color .15s ease,transform .15s ease}
.lb-fr:hover{color:var(--gold);transform:scale(1.2)}
.lb-fr.on{color:var(--gold)}
/* ✨ v142 · ★ What a star tells on the rivals tab (§ 100), a line under the name: when they last played and the
   challenge they stand behind. It wraps rather than clips, so the challenge is never the part cut off on a phone. */
.lb-riv{display:flex;flex-wrap:wrap;gap:1px 10px;margin-top:3px;font-style:normal;font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.06em;line-height:1.4;color:var(--dim);white-space:normal}
.lb-riv span{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.lb-riv-t.on{color:var(--lime)}
.lb-riv-c{color:var(--gold)}

/* ── ⏳ FEATURED ROTATION ── */
#shop-rotation{font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.14em;color:var(--dim);text-align:center;padding:10px 0 2px}
#shop-rotation em{font-style:normal;color:var(--gold)}
.shop-card.featured{border-color:rgba(255,215,0,.5);box-shadow:0 0 22px rgba(255,215,0,.12)}
.shop-feat{position:absolute;top:8px;left:8px;font-family:var(--fd);font-size:.46rem;font-weight:700;letter-spacing:.1em;padding:3px 7px;border-radius:20px;background:var(--gold);color:#000}
.shop-was{opacity:.55;margin-right:2px}

/* ── 🔥 BOSS RUSH BANNER ── */
.br-banner{border-color:rgba(255,102,0,.42);background:linear-gradient(120deg,rgba(255,102,0,.12),rgba(255,36,66,.07))}
.br-banner .mp-banner-title{color:var(--orange)}

/* ── 👁️ SPECTATOR ── */
.spec-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:16px}
.spec-code{font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.2em;color:var(--dim)}
.spec-mode{font-family:var(--fd);font-size:.72rem;font-weight:700;color:var(--cyan)}
.spec-board{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;margin-bottom:16px}
.spec-side{background:var(--s1);border:1px solid var(--border);border-radius:var(--r);padding:14px 10px;text-align:center;min-width:0}
.spec-side.spec-empty{color:var(--dimmer);font-family:var(--fd);font-size:.58rem;letter-spacing:.14em}
.spec-name{font-family:var(--fd);font-size:.64rem;font-weight:700;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.spec-score{font-family:var(--fd);font-size:1.7rem;font-weight:900;color:var(--cyan);margin-top:6px;line-height:1}
.spec-vs{font-family:var(--fd);font-size:.66rem;font-weight:900;color:var(--pink);letter-spacing:.1em}
.spec-status{text-align:center;font-family:var(--fb);font-size:.9rem;color:var(--dim)}
.spec-result{text-align:center;font-family:var(--fd);font-size:.72rem;font-weight:700;color:var(--gold);margin-top:10px}
.spec-note{text-align:center;font-family:var(--fb);font-size:.76rem;color:var(--dimmer);margin-top:14px}

/* ══════════════════════════════════════════════════════════════
   📴 OFFLINE BANNER
   Fixed to the bottom rather than the top: the hub bar, the game
   header and the results card all own the top edge already.
   ══════════════════════════════════════════════════════════════ */
#offline-bar{
  display:none;
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:9000;
  padding:8px 14px;
  padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px));
  background:linear-gradient(90deg, rgba(255,145,0,.94), rgba(255,80,0,.94));
  color:#1a0d00;
  font-family:'Rajdhani',sans-serif;
  font-weight:700;
  font-size:.82rem;
  letter-spacing:.03em;
  text-align:center;
  text-shadow:none;
  box-shadow:0 -4px 18px rgba(255,120,0,.4);
  pointer-events:none;
}
#offline-bar b{ letter-spacing:.08em; }

/* The network-only doors stay visible but read as unavailable, so the hub
   does not appear to lose features while the connection is down. */
html.is-offline #btn-market,
html.is-offline #btn-save-acct,
html.is-offline #btn-mp-open,
html.is-offline #btn-boss-rush{
  opacity:.45;
  filter:grayscale(.7);
  cursor:not-allowed;
}

/* ══════════════════════════════════════════════════════════════════════
   ✨ FEATURE SUITE — chaos, squads, levels, kit, drives, exits, terminal
   ══════════════════════════════════════════════════════════════════════
   Everything below reuses the palette vars and the .card / .btn / .lb-row
   furniture already defined above, so a repointed --cyan (an equipped
   colour, or the colourblind-safe palette) carries through all of it. */

/* A third way into the matrix, on the shelf that already names it. */
.badge-label{cursor:pointer;transition:color .16s ease}
.badge-label:hover{color:var(--gold)}
.badge-open{font-style:normal;font-size:.5rem;color:var(--dimmer);letter-spacing:.14em;margin-left:6px}
.badge-label:hover .badge-open{color:var(--gold)}

/* ── 📈 OPERATIVE RAIL ── */
.xp-rail{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:9px 18px;margin:0 auto 18px;max-width:1400px;
  border:1px solid var(--border);border-radius:var(--r);
  background:linear-gradient(90deg,rgba(0,245,255,.05),rgba(255,255,255,.02));
}
.xp-rail.has-points{border-color:rgba(57,255,20,.4);box-shadow:0 0 18px rgba(57,255,20,.1)}
.xp-lvl{font-family:var(--fd);font-size:.68rem;font-weight:900;color:var(--cyan);letter-spacing:.14em;white-space:nowrap}
.xp-track{flex:1;min-width:110px;height:7px;border-radius:7px;background:var(--s2);overflow:hidden;box-shadow:inset 0 0 0 1px var(--border)}
.xp-fill{height:100%;border-radius:7px;background:linear-gradient(90deg,var(--cyan),var(--lime));box-shadow:0 0 12px var(--cyan);transition:width .5s cubic-bezier(.2,.9,.3,1)}
.xp-num{font-family:var(--fd);font-size:.55rem;color:var(--dim);letter-spacing:.1em;white-space:nowrap}
.xp-perk-btn{animation:perkPulse 2s ease-in-out infinite}
@keyframes perkPulse{0%,100%{box-shadow:0 0 0 rgba(57,255,20,0)}50%{box-shadow:0 0 18px rgba(57,255,20,.55)}}

/* ── 📅 DAILY HACK ── */
.dh-banner{border-color:rgba(255,215,0,.38)!important}
.dh-banner .mp-banner-icon{filter:drop-shadow(0 0 10px var(--gold))}
.dh-banner.done{opacity:.82}
.dh-lb-label{margin-top:26px;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.dh-reset{font-style:normal;font-size:.5rem;color:var(--dimmer);letter-spacing:.14em}
.dh-lb-panel{max-height:230px;overflow-y:auto}
.dh-row .lb-score{color:var(--gold)}
.dh-note{padding:12px 0 4px!important;font-size:.66rem!important}

/* ── 📟 GRID TERMINAL ── */
.chat-panel{
  border:1px solid var(--border);border-radius:var(--r);background:var(--s1);
  padding:12px;display:flex;flex-direction:column;gap:10px;
}
.chat-log{
  height:190px;overflow-y:auto;display:flex;flex-direction:column;gap:5px;
  font-family:var(--fd);font-size:.56rem;line-height:1.55;letter-spacing:.04em;
}
.chat-line{display:flex;gap:8px;align-items:baseline;animation:chatIn .3s ease}
@keyframes chatIn{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}
.chat-time{color:var(--dimmer);flex:0 0 auto;font-size:.5rem}
.chat-body{flex:1;min-width:0;word-break:break-word;color:var(--dim)}
.chat-line.said .chat-body{color:var(--text)}
.chat-who{color:var(--cyan);font-weight:700}
.chat-sys{color:var(--lime);opacity:.82}
.chat-input-row{display:flex;gap:8px}
.chat-input{flex:1;min-width:0;font-size:.72rem;padding:8px 11px}

/* ── 📥 REPLAY ── */
.replay-panel{border:1px solid var(--border);border-radius:var(--r);background:var(--s1);padding:12px;display:flex;flex-direction:column;gap:10px}
.replay-row{display:flex;gap:8px}
.replay-input{flex:1;min-width:0;font-family:var(--fd);font-size:.62rem;padding:8px 11px;letter-spacing:.04em}
.replay-out:empty{display:none}
.replay-err{color:var(--red);font-size:.74rem;line-height:1.5}
.replay-card{border:1px solid var(--border2);border-radius:var(--r);background:var(--s2);padding:12px;margin-bottom:10px}
.replay-head{display:flex;align-items:center;gap:11px;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid var(--border)}
.replay-emoji{font-size:1.7rem;line-height:1}
.replay-title{font-family:var(--fd);font-size:.66rem;font-weight:900;letter-spacing:.1em}
.replay-by{font-size:.66rem;color:var(--dim)}
.replay-score{margin-left:auto;font-family:var(--fd);font-size:1.15rem;font-weight:900;color:var(--gold);text-align:right;line-height:1}
.replay-score em{display:block;font-style:normal;font-size:.44rem;color:var(--dimmer);letter-spacing:.16em}
.replay-card .rv.better{color:var(--lime)}
.replay-card .rv.worse{color:var(--red)}
.replay-try{width:100%}
/* The code itself: selectable, wrapping, and monospaced so a retyped
   character can be checked against the one it replaced. */
.res-replay:empty{display:none}
.res-replay{margin-top:14px}
.replay-code{
  font-family:var(--fd);font-size:.56rem;letter-spacing:.06em;line-height:1.6;
  word-break:break-all;user-select:all;-webkit-user-select:all;
  padding:10px 12px;border:1px dashed rgba(0,245,255,.4);border-radius:var(--r);
  background:rgba(0,245,255,.05);color:var(--cyan);text-align:left;
}
.replay-hint{margin-top:6px;font-size:.66rem;color:var(--dim)}

/* ── 🌀 CHAOS MODIFIER ── */
#chaos-banner{
  display:flex;align-items:center;gap:14px;
  margin:10px auto 0;max-width:660px;padding:12px 18px;
  border:1px solid rgba(255,36,66,.5);border-radius:var(--r);
  background:linear-gradient(100deg,rgba(255,36,66,.14),rgba(168,85,247,.1));
  box-shadow:0 0 26px rgba(255,36,66,.22);
  transition:padding .35s ease,gap .35s ease,max-width .35s ease;
}
#chaos-banner.big{animation:chaosIn .45s cubic-bezier(.2,.9,.3,1.35)}
@keyframes chaosIn{from{opacity:0;transform:translateY(-14px) scale(.94)}to{opacity:1;transform:none}}
/* Shrunk to a chip once the round is under way — still legible, out of the way. */
#chaos-banner.chip{max-width:340px;padding:5px 12px;gap:9px}
#chaos-banner.chip .chaos-desc{display:none}
#chaos-banner.chip .chaos-icon{font-size:1rem}
#chaos-banner.chip .chaos-name{font-size:.54rem}
.chaos-icon{font-size:1.7rem;line-height:1;filter:drop-shadow(0 0 10px var(--red))}
.chaos-txt{min-width:0}
.chaos-name{font-family:var(--fd);font-size:.7rem;font-weight:900;color:var(--red);letter-spacing:.16em}
.chaos-desc{font-size:.74rem;color:var(--dim);margin-top:2px}
/* 🕶️ BLIND TERMINAL. Only the play area blanks — the header, the clock and the
   score stay up, so the round remains legible as a round while the board is
   gone. Short and linear on purpose: this should read as a dropped feed, not
   as a fade. */
.g-area{transition:opacity .12s linear}
.g-area.blind-out{opacity:0}
/* ⏳ TIME DILATOR: a single cyan pulse over the board where the seconds landed. */
/* ✨ v100 · An OVERLAY on #board-frame, not a `filter:` on .g-area. A filter on
   an ancestor of the GL canvas pulls the whole board into an offscreen filter
   surface and resamples it on the way back (see the OVERCLOCK CHIP note) — so
   for 0.7s after every dilator the board went soft, which is one of the
   "sometimes it's a bit blurry" moments. The same cyan pulse, painted on top. */
.g-area.dilated #board-frame::after{
  content:'';position:absolute;inset:0;pointer-events:none;z-index:6;border-radius:10px;
  background:rgba(120,250,255,.22);mix-blend-mode:screen;
  box-shadow:0 0 22px var(--cyan),inset 0 0 40px rgba(0,245,255,.55);
  animation:dilate .7s ease forwards
}
@keyframes dilate{0%{opacity:0}30%{opacity:1}100%{opacity:0}}
/* …and a mission with no board (Click Frenzy, Memory, Math, Reaction, Hacker,
   Path in 2D) keeps #board-frame hidden, so its own panel takes v99's pulse:
   a filter there has no GL canvas under it to resample. */
.g-area.dilated > :is(#g-click,#g-memory,#g-math,#g-reaction,#g-hacker,#g-path){animation:dilateDom .7s ease}
@keyframes dilateDom{0%{filter:none}30%{filter:brightness(1.5) drop-shadow(0 0 22px var(--cyan))}100%{filter:none}}

/* ── ⚡ POWER-UP DOCK ── */
#pu-dock{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:8px auto 0;padding:0 12px}
.pu-btn{
  display:flex;align-items:center;gap:7px;padding:6px 12px;
  border:1px solid rgba(57,255,20,.42);border-radius:99px;
  background:rgba(57,255,20,.08);color:var(--text);cursor:pointer;
  font-family:var(--fd);font-size:.52rem;letter-spacing:.12em;
  transition:transform .12s ease,box-shadow .2s ease,background .2s ease;
}
.pu-btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 0 18px rgba(57,255,20,.35);background:rgba(57,255,20,.15)}
.pu-btn:active:not(:disabled){transform:translateY(0)}
.pu-btn.passive{cursor:default;border-color:rgba(0,245,255,.42);background:rgba(0,245,255,.08);opacity:.9}
.pu-emoji{font-size:.95rem;line-height:1}
.pu-count{
  font-weight:900;min-width:17px;height:17px;line-height:17px;text-align:center;
  border-radius:99px;background:rgba(255,255,255,.14);font-size:.5rem;
}
.pu-btn.fired{animation:puFire .55s ease}
@keyframes puFire{0%{box-shadow:0 0 0 rgba(57,255,20,0)}25%{box-shadow:0 0 30px var(--lime);transform:scale(1.14)}100%{box-shadow:none;transform:none}}

/* ── 🛒 MARKET: consumables, drives, exit states ── */
.pu-kit{margin-bottom:20px}
.pu-kit-lbl{font-family:var(--fd);font-size:.56rem;color:var(--lime);letter-spacing:.16em;margin-bottom:9px}
.pu-kit-lbl.empty{color:var(--dim);letter-spacing:.08em;line-height:1.6;font-family:var(--fb);font-size:.78rem}
.pu-kit-row{display:flex;gap:9px;flex-wrap:wrap}
.pu-chip{
  display:inline-flex;align-items:center;gap:6px;padding:6px 12px;
  border:1px solid rgba(57,255,20,.35);border-radius:99px;background:rgba(57,255,20,.07);
  font-size:.74rem;
}
.pu-chip em{font-style:normal;font-family:var(--fd);font-size:.56rem;color:var(--lime)}
/* A drive or an exit state cannot be judged from a name and a price, so those
   cards carry a sentence — which makes them taller than a colour swatch. */
.shop-desc{font-size:.72rem;color:var(--dim);line-height:1.5;margin:6px 0 10px;text-align:center}
.shop-held{font-family:var(--fd);font-size:.5rem;color:var(--dimmer);letter-spacing:.14em;margin-bottom:9px}
.shop-held em{font-style:normal;color:var(--lime)}
.shop-card.consumable{border-color:rgba(57,255,20,.3)}

/* ── 👥 SQUAD SIZE PICKER ── */
.mp-teamsize{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px;padding:9px 14px;border:1px solid var(--border);border-radius:var(--r);background:var(--s1)}
.mp-teamsize.squad{border-color:rgba(168,85,247,.42);background:rgba(168,85,247,.06)}
.mp-teamsize-lbl{font-family:var(--fd);font-size:.55rem;color:var(--purple);letter-spacing:.16em}
.mp-size-btn{
  font-family:var(--fd);font-size:.52rem;letter-spacing:.12em;padding:6px 13px;
  border:1px solid var(--border2);border-radius:99px;background:transparent;
  color:var(--dim);cursor:pointer;transition:all .18s ease;
}
.mp-size-btn:hover{color:var(--text);border-color:var(--purple)}
.mp-size-btn.on{background:rgba(168,85,247,.18);border-color:var(--purple);color:var(--text);box-shadow:0 0 14px rgba(168,85,247,.3)}
.mp-teamsize-note{flex:1;min-width:180px;font-size:.72rem;color:var(--dim)}
/* A duel that cannot be played 2v2 is greyed rather than removed — a mode
   vanishing from the grid reads as a bug. */
.mp-mode.barred{opacity:.4;filter:grayscale(.75);cursor:not-allowed}
.mp-mode.barred:hover{transform:none}
.mp-mode.barred .mp-mode-meta{color:var(--purple)}

/* ── 👥 2v2 CO-OP GRID ── */
.mp-teams{display:grid;grid-template-columns:1fr auto 1fr;gap:14px;align-items:stretch;margin:18px 0}
.mp-team{display:flex;flex-direction:column;gap:9px;padding:12px;border:1px solid var(--border);border-radius:var(--r);background:var(--s1)}
.mp-team[data-team="alpha"]{border-color:rgba(0,245,255,.3)}
.mp-team[data-team="bravo"]{border-color:rgba(255,0,144,.3)}
/* Your own side is the one you should be able to find without reading. */
.mp-team.mine{background:rgba(255,255,255,.05);box-shadow:inset 0 0 0 1px var(--border2)}
.mp-team.mine .mp-team-name::after{content:' · YOUR SQUAD';color:var(--dimmer);font-size:.44rem}
.mp-team-hdr{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-bottom:8px;border-bottom:1px solid var(--border)}
.mp-team-name{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.14em}
.mp-team[data-team="alpha"] .mp-team-name{color:var(--cyan)}
.mp-team[data-team="bravo"] .mp-team-name{color:var(--pink)}
/* The side's headcount, not a score — a lobby has no round to report yet. It
   goes amber while a side is a seat short, which is the state a waiting player
   is actually scanning for. */
.mp-team-score{font-family:var(--fd);font-size:.7rem;font-weight:900;color:var(--lime);letter-spacing:.08em}
.mp-team-score.short{color:var(--gold)}
.mp-vs-teams{align-self:center}

/* ── 🏆 ACHIEVEMENT MATRIX ── */
.ach-tint .fb-modal{max-width:760px;border-color:rgba(255,215,0,.42);box-shadow:0 0 70px rgba(255,215,0,.13),inset 0 0 0 1px rgba(255,255,255,.03)}
.ach-tint .fb-modal::before{background:linear-gradient(90deg,transparent,var(--gold),transparent);box-shadow:0 0 12px var(--gold)}
.ach-progress{height:6px;border-radius:6px;background:var(--s2);overflow:hidden;margin-bottom:20px;box-shadow:inset 0 0 0 1px var(--border)}
.ach-progress-fill{height:100%;border-radius:6px;background:linear-gradient(90deg,var(--gold),var(--lime));box-shadow:0 0 12px var(--gold);transition:width .6s cubic-bezier(.2,.9,.3,1)}
.ach-matrix{display:grid;grid-template-columns:repeat(auto-fill,minmax(178px,1fr));gap:11px}
.ach-cell{
  display:flex;flex-direction:column;gap:5px;padding:13px 12px;
  border:1px solid var(--border);border-radius:var(--r);background:var(--s1);
  transition:transform .16s ease,box-shadow .2s ease;
}
.ach-cell:hover{transform:translateY(-2px)}
/* Locked = dim grey, unlocked = neon green. The state is carried by the border,
   the icon and the text together rather than by colour alone, so it survives
   the colourblind-safe palette and a greyscale print alike. */
.ach-cell.locked{border-color:rgba(255,255,255,.08);background:rgba(255,255,255,.02)}
.ach-cell.locked .ach-ico{filter:grayscale(1);opacity:.34}
.ach-cell.locked .ach-name{color:#8a8a96}
.ach-cell.locked .ach-desc,.ach-cell.locked .ach-cr{color:rgba(255,255,255,.22)}
.ach-cell.locked .ach-state{color:#8a8a96}
.ach-cell.unlocked{border-color:rgba(57,255,20,.5);background:rgba(57,255,20,.07);box-shadow:0 0 20px rgba(57,255,20,.1)}
.ach-cell.unlocked .ach-name{color:var(--lime)}
.ach-cell.unlocked .ach-state{color:var(--lime)}
.ach-cell.unlocked:hover{box-shadow:0 0 30px rgba(57,255,20,.22)}
.ach-ico{font-size:1.6rem;line-height:1}
.ach-name{font-family:var(--fd);font-size:.58rem;font-weight:900;letter-spacing:.1em}
.ach-desc{font-size:.72rem;color:var(--dim);line-height:1.5;flex:1}
.ach-foot{display:flex;justify-content:space-between;gap:8px;align-items:baseline;margin-top:4px;padding-top:7px;border-top:1px solid var(--border)}
.ach-cr{font-size:.66rem;color:var(--gold)}
.ach-state{font-family:var(--fd);font-size:.44rem;letter-spacing:.14em}

/* ── 🌳 PERK TREE ── */
.perk-tint .fb-modal{max-width:600px;border-color:rgba(57,255,20,.45)}
.perk-tree{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.perk-node{
  display:flex;flex-direction:column;gap:6px;padding:16px 14px;
  border:1px solid var(--border);border-radius:var(--rl);background:var(--s1);
  position:relative;transition:transform .16s ease,box-shadow .2s ease;
}
.perk-node.open{border-color:rgba(57,255,20,.45);box-shadow:0 0 22px rgba(57,255,20,.12)}
.perk-node.open:hover{transform:translateY(-3px)}
.perk-node.owned{border-color:var(--lime);background:rgba(57,255,20,.08)}
.perk-node.locked{opacity:.55}
.perk-ico{font-size:1.7rem;line-height:1}
.perk-name{font-family:var(--fd);font-size:.66rem;font-weight:900;letter-spacing:.1em}
.perk-effect{font-family:var(--fd);font-size:.52rem;color:var(--lime);letter-spacing:.1em}
.perk-desc{font-size:.74rem;color:var(--dim);line-height:1.55;flex:1;margin-bottom:6px}
.perk-tag{font-family:var(--fd);font-size:.5rem;color:var(--lime);letter-spacing:.16em}

/* ══════════════════════════════════════════════════════════════
   💀 EXIT STATES
   One stage, three looks. It sits above every screen and below the
   toast, so the flourish covers the board it belongs to without
   hiding a message that outlives it.
   ══════════════════════════════════════════════════════════════ */
#exit-fx{position:fixed;inset:0;z-index:2500;display:none;pointer-events:none;overflow:hidden}
#exit-fx.show{display:block}
#exit-fx-body{position:absolute;inset:0}

/* 🟦 FAKE BSOD — the real proportions: a lot of blue, a small block of text
   pinned about a sixth of the way down, and a percentage that never quite
   explains itself. */
#exit-fx.fx-bsod{background:#0078d7;animation:bsodIn .16s steps(2)}
@keyframes bsodIn{from{opacity:0}to{opacity:1}}
#exit-fx.fx-bsod #exit-fx-body{
  inset:auto 0 0 0;top:16%;padding:0 8vw;max-width:1000px;margin:0 auto;
  font-family:'Segoe UI',var(--fb),sans-serif;color:#fff;text-align:left;
}
.bsod-face{font-size:6.5rem;line-height:1;font-weight:300;margin-bottom:26px}
.bsod-head{font-size:1.55rem;font-weight:400;line-height:1.35;margin-bottom:14px}
.bsod-sub{font-size:1rem;opacity:.92;margin-bottom:26px;line-height:1.5}
.bsod-dump{
  font-family:Consolas,var(--fd),monospace;font-size:.72rem;line-height:1.75;
  white-space:pre;overflow-x:auto;opacity:.9;
  padding:12px 14px;background:rgba(0,0,0,.16);border-radius:4px;margin-bottom:18px;
}
.bsod-pct{font-size:1.15rem;font-variant-numeric:tabular-nums}

/* 🟩 MATRIX DISSOLVE — columns of glyphs falling past a darkening board. */
#exit-fx.fx-matrix{background:rgba(2,6,4,.55);animation:mxFade 1.5s ease forwards}
@keyframes mxFade{0%{background:rgba(2,6,4,0)}45%{background:rgba(2,6,4,.72)}100%{background:rgba(2,6,4,.95)}}
.mx-col{
  position:absolute;top:-115%;font-family:var(--fd),monospace;font-size:1rem;
  line-height:1.05;color:#00ff41;text-shadow:0 0 9px #00ff41;
  opacity:.82;white-space:nowrap;
  animation-name:mxFall;animation-timing-function:linear;animation-fill-mode:forwards;
}
@keyframes mxFall{
  0%{transform:translateY(0);opacity:0}
  12%{opacity:.9}
  100%{transform:translateY(230vh);opacity:0}
}

/* 📺 STATIC EXPLOSION — a CRT flash, a burst of noise, one roll bar. */
#exit-fx.fx-static{background:#000}
.crt-flash{position:absolute;inset:0;background:#fff;animation:crtFlash .9s ease-out forwards}
@keyframes crtFlash{0%{opacity:1}14%{opacity:.15}30%{opacity:.6}100%{opacity:0}}
/* Repeating gradients rather than an image: no asset to load, and it scales to
   any viewport without resampling. */
.crt-noise{
  position:absolute;inset:0;opacity:.72;mix-blend-mode:screen;
  background:
    repeating-linear-gradient(0deg,rgba(255,255,255,.16) 0 1px,transparent 1px 3px),
    repeating-linear-gradient(90deg,rgba(255,255,255,.09) 0 2px,transparent 2px 5px);
  animation:crtNoise .07s steps(2) infinite;
}
@keyframes crtNoise{0%{transform:translate(0,0)}50%{transform:translate(-3px,2px)}100%{transform:translate(2px,-2px)}}
.crt-roll{
  position:absolute;left:0;right:0;height:22vh;
  background:linear-gradient(180deg,transparent,rgba(255,255,255,.22),transparent);
  animation:crtRoll .9s linear forwards;
}
@keyframes crtRoll{from{top:-25vh}to{top:105vh}}

/* ── 👁️ REDUCED MOTION ──
   The blanket html.reduced-motion rule further up already flattens every
   animation and transition added above, and playExitFx() declines to run at
   all when the preference is set — so the only thing left is the one effect
   that is GAMEPLAY rather than decoration.

   🕶️ BLIND TERMINAL is a repeating full-screen blackout, which is precisely
   the pattern the preference exists to avoid. It is not simply switched off —
   that would hand a player an easier round for their accessibility setting —
   so it becomes a heavy dim instead: the board still goes unreadable for the
   same 0.3s, without the strobe. */
html.reduced-motion .g-area.blind-out{opacity:.12}

/* ── 📱 NARROW SCREENS ──
   The canvas is sized by fitCanvas() against the space left over, so anything
   that adds height above the board costs play area on a phone. The two
   round-time additions shrink first. */
@media(max-width:760px){
  .xp-rail{gap:9px;padding:8px 12px;margin-bottom:14px}
  .xp-num{display:none}
  .mp-teams{grid-template-columns:1fr;gap:10px}
  .mp-vs-teams{padding:2px 0}
  .ach-matrix{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:9px}
  .perk-tree{grid-template-columns:1fr}
  .chat-log{height:150px}
  #chaos-banner{margin-top:6px;padding:8px 12px;gap:10px}
  #chaos-banner .chaos-desc{font-size:.68rem}
  .bsod-face{font-size:4rem;margin-bottom:16px}
  .bsod-head{font-size:1.15rem}
  .bsod-sub{font-size:.86rem;margin-bottom:16px}
  .bsod-dump{font-size:.6rem}
  #exit-fx.fx-bsod #exit-fx-body{top:12%;padding:0 7vw}
}
/* Landscape phones have no vertical room at all: the chaos banner collapses to
   its chip immediately and the dock tightens, rather than pushing the board
   off the bottom of the screen. */
@media(max-height:560px) and (orientation:landscape){
  #chaos-banner{max-width:300px;padding:4px 10px;gap:8px;margin-top:4px}
  #chaos-banner .chaos-desc{display:none}
  #chaos-banner .chaos-icon{font-size:.95rem}
  #chaos-banner .chaos-name{font-size:.5rem}
  #pu-dock{margin-top:4px}
  .pu-btn{padding:4px 9px;font-size:.46rem}
  .xp-rail{display:none}
}

/* ══════════════════════════════════════════════════════════════════════
   🧊 3D MODE
   ══════════════════════════════════════════════════════════════════════ */

/* ── LOGIN-SCREEN RENDER PICKER ──
   Two cards above the sign-in form. Deliberately sits OUTSIDE .card so it
   reads as a decision about the whole arcade rather than a field on the
   login form — you are choosing how the game looks, not how you sign in. */
.mode-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0 16px}
.mode-card{
  display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:14px 10px;cursor:pointer;text-align:center;
  background:var(--s1);border:1px solid var(--border);border-radius:var(--r);
  color:#fff;font-family:var(--fb);
  transition:border-color .18s,background .18s,transform .12s,box-shadow .18s
}
.mode-card:hover{background:var(--s2);border-color:var(--border2);transform:translateY(-2px)}
.mode-card:active{transform:translateY(0) scale(.98)}
.mode-ico{font-size:1.7rem;line-height:1}
.mode-name{font-family:var(--fd);font-weight:700;font-size:.78rem;letter-spacing:.06em}
.mode-note{font-size:.7rem;opacity:.6;line-height:1.3}
/* The selected card is lit from its own edge — same visual grammar the
   difficulty tiers use, so "this one is armed" reads the same everywhere. */
.mode-card.on{
  background:rgba(0,245,255,.10);border-color:rgba(0,245,255,.6);
  box-shadow:0 0 0 1px rgba(0,245,255,.25),0 6px 24px -8px rgba(0,245,255,.5)
}
.mode-card.on .mode-name{color:var(--cyan);text-shadow:0 0 14px rgba(0,245,255,.6)}
.mode-card.on .mode-note{opacity:.8}
/* No WebGL2 here. Still clickable so the click can explain itself, but it
   never pretends to be an option. */
.mode-card.unsupported{opacity:.42;cursor:not-allowed}
.mode-card.unsupported .mode-note{color:var(--orange);opacity:.9}

/* ── THE GL SURFACE ──
   Layered exactly over #arcade-canvas inside #board-frame. pointer-events is
   off so every tap and drag falls through to the 2D canvas underneath, which
   is what lets bindCanvasDrag() keep serving both renderers with one code
   path. The border and radius are copied so the two elements occupy the same
   rectangle to the pixel. */
#gl-canvas{
  position:absolute;left:0;top:0;display:none;
  pointer-events:none;
  border:2px solid var(--border);border-radius:8px;
  background:#04040e
}
/* Floating combat text, projected from world space each frame. Lives above
   the GL canvas but below #touch-hint and #mp-overlay. */
#gl-fx{
  position:absolute;left:0;top:0;display:none;
  pointer-events:none;overflow:hidden;border-radius:8px
}
/* ── VIRTUAL THUMBSTICK ──
   Cyber Arena's steering ring. The 2D build paints it straight onto the board
   with the rest of the frame; in 3D the board is an opaque GL surface, so it
   rides in the fx layer instead — same ring, same knob, same place under the
   finger, drawn in the board's own pixel space. `transition:none` for the same
   reason .gl-label has it: this is repositioned every frame. */
.gl-stick,.gl-stick-knob{
  position:absolute;left:0;top:0;border-radius:50%;
  border:2px solid var(--cyan);
  box-shadow:0 0 12px rgba(0,245,255,.55);
  transition:none;pointer-events:none;display:none
}
.gl-stick{opacity:.45}
.gl-stick-knob{opacity:.8;background:rgba(0,245,255,.25)}
.gl-pop{
  position:absolute;left:0;top:0;
  font-family:var(--fd);font-weight:700;font-size:15px;letter-spacing:.04em;
  white-space:nowrap;text-shadow:0 0 12px currentColor,0 2px 6px rgba(0,0,0,.9);
  will-change:transform,opacity
}
/* The 2D canvas is still the input surface in 3D mode, so it stays in the
   layout — it just stops painting a visible board behind the GL one. */
#arcade-canvas.behind-gl{background:transparent;border-color:transparent}

/* ── PERSISTENT WORLD LABELS ──
   .gl-pop is a firework: it fades and dies. Some 3D missions need a caption
   PINNED to an object for the whole round — a status line over the mainframe
   keypad, the match percentage over a scope. Same projected div, no lifetime.
   `transition:none` matters: these are re-positioned every frame, and a
   transition on transform would smear them a frame behind the object. */
.gl-label{transition:none;text-align:center}
.gl-status{font-size:13px;opacity:.95;letter-spacing:.12em;text-transform:uppercase}
.gl-big{font-size:26px;font-weight:900;letter-spacing:.06em}

/* 🔢 MATH BLITZ in 3D keeps its console but not its question readout — the sum
   is an object in the room now, and two of them would be one too many. */
.math-wrap.math-3d{padding-top:6px}
.math-wrap.math-3d #math-question{display:none}

/* A quiet badge on the hub so the player can always tell which renderer a
   session is running, without opening the login screen to check. */
body.mode-3d .hub-bar::after{
  content:'🧊 3D';
  font-family:var(--fd);font-size:.6rem;letter-spacing:.1em;
  color:var(--cyan);opacity:.75;align-self:center;
  padding:3px 8px;border:1px solid rgba(0,245,255,.4);border-radius:20px
}

@media (max-width:420px){
  .mode-picker{gap:8px}
  .mode-card{padding:11px 7px}
  .mode-note{display:none}
}


/* ══════════════════════════════════════════════════════════════════════
   § 10 — THE LANES: endless, anomaly, loadouts, tutorial, photo mode
   ══════════════════════════════════════════════════════════════════════
   Everything here reuses furniture that already exists — .mp-banner for the two
   new lanes, .lb-row for their boards, .fb-overlay for their modals — so the
   arcade gains four screens and the eye has nothing new to learn. Only the
   accents are new. The 3D chrome block at the end of this file picks the new
   selectors up by adding them to the lists that were already there. */

/* ── ♾️ 🌒 THE TWO LANE BANNERS ── */
.en-banner{border-color:rgba(0,245,255,.34);background:linear-gradient(135deg,rgba(0,245,255,.08),rgba(168,85,247,.05))}
.en-banner .mp-banner-title{color:var(--cyan)}
.an-banner{border-color:rgba(168,85,247,.36);background:linear-gradient(135deg,rgba(168,85,247,.10),rgba(255,0,144,.05))}
.an-banner .mp-banner-title{color:var(--purple)}
.en-banner.done,.an-banner.done{opacity:.78}
#btn-endless:disabled{opacity:.45;cursor:not-allowed}
.lb-tag{font-style:normal;font-size:.62rem;opacity:.62;letter-spacing:.06em;margin-left:6px}

/* ── ♾️ THE ENDLESS PILL ── the integrity bar Boss Rush already models. */
.en-pill em{color:var(--cyan)}
.res-bonus-endless{color:var(--cyan);border-color:var(--cyan);background:rgba(0,245,255,.08)}

/* ── ♾️ THE PICKER ── */
.en-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:10px}
.en-card{
  display:flex;flex-direction:column;align-items:flex-start;gap:4px;
  padding:12px 14px;text-align:left;cursor:pointer;
  background:var(--s1);border:1px solid var(--border);border-radius:var(--r);
  color:var(--txt);font-family:var(--fb);transition:border-color .16s,transform .16s
}
.en-card:hover:not(.locked){border-color:var(--cyan);transform:translateY(-2px)}
.en-card.locked{opacity:.4;cursor:not-allowed}
.en-ico{font-size:1.5rem;line-height:1}
.en-name{font-family:var(--fd);font-size:.72rem;font-weight:700;letter-spacing:.06em}
.en-best{font-size:.66rem;color:var(--dim);letter-spacing:.04em}

/* ── 🎒 THE LOADOUT RAIL ── */
.loadout-rail{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  max-width:1060px;margin:0 auto 10px;padding:8px 14px;
  background:var(--s1);border:1px solid var(--border);border-radius:var(--r)
}
.lo-lbl{font-family:var(--fd);font-size:.58rem;font-weight:700;letter-spacing:.12em;color:var(--dim)}
.lo-none{font-size:.72rem;color:var(--dim)}
.lo-chip{
  font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.08em;
  padding:5px 12px;border-radius:999px;cursor:pointer;
  background:rgba(255,255,255,.04);border:1px solid var(--border);color:var(--txt);
  transition:border-color .15s,color .15s,background .15s
}
.lo-chip:hover{border-color:var(--cyan);color:var(--cyan)}
.lo-chip.on{border-color:var(--lime);color:var(--lime);background:rgba(57,255,20,.09)}
.loadout-rail .btn{margin-left:auto}

/* ── 🎒 THE SHELF ── */
.lo-new{display:flex;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.lo-name{flex:1;min-width:180px;text-transform:uppercase;letter-spacing:.08em}
.lo-now{
  font-size:.72rem;color:var(--dim);padding:8px 12px;margin-bottom:14px;
  background:rgba(255,255,255,.03);border:1px dashed var(--border);border-radius:var(--r)
}
.lo-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}
.lo-card{background:var(--s1);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px}
.lo-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:6px}
.lo-card-name{font-family:var(--fd);font-size:.78rem;font-weight:700;letter-spacing:.07em;color:var(--cyan)}
.lo-card-body{font-size:.7rem;color:var(--dim);line-height:1.5;margin-bottom:8px}
.lo-warn{
  font-size:.66rem;color:var(--gold);line-height:1.45;margin-bottom:8px;
  padding:6px 8px;background:rgba(255,215,0,.07);border-left:2px solid var(--gold);border-radius:4px
}
.lo-card-btns{display:flex;gap:8px}

/* ── 🎓 THE HOW FACE ──
   A second face on the card, not a second element beside it, so the 3D chrome's
   extruded card treatment applies to it unchanged. .game-card gets
   transform-style:preserve-3d in the 3D block; here the flip is a plain
   rotateY, which reads correctly flat as well. */
/* The flip needs a perspective on the CARD, in both chromes. perspective is a
   property of the parent and does not need preserve-3d on it, so this works
   under the base .game-card overflow:hidden as well as under the 3D block that
   re-declares it visible. */
.game-card{position:relative;perspective:900px}
/* ⚠️ THE CARD'S OWN TEXT MUST NOT EAT THE BADGE'S CLICKS.
   Every one of these is decorative — an emoji, a name, a blurb, a points chip.
   None of them has a handler; the CARD does. But .gc-icon is a full-width block
   68px tall, and in the 3D chrome it carries translateZ(26px) while the badge
   sat at translateZ(0) — and inside a preserve-3d parent, elements are sorted
   by their position in SPACE, not by z-index. So the icon rendered and
   hit-tested ON TOP of the badge and covered 67% of it: measured with
   elementFromPoint, the badge's own CENTRE returned .gc-icon, and only a ~8px
   sliver along its top edge was actually clickable. That is the whole of "the
   ⓘ is very hard to click", and no amount of z-index would have fixed it.
   Clicks fall through to the card, which is what should have been handling
   them all along. */
.game-card > .gc-icon,
.game-card > .gc-name,
.game-card > .gc-desc,
.game-card > .gc-pts,
.game-card > .gc-lock,
.game-card > .gc-spark{ pointer-events:none }

.gc-howbtn{
  position:absolute;top:8px;right:8px;z-index:3;
  width:30px;height:30px;line-height:28px;padding:0;text-align:center;
  border-radius:50%;cursor:pointer;font-size:1rem;
  background:rgba(255,255,255,.06);border:1px solid var(--border);color:var(--dim);
  transition:color .15s,border-color .15s,background .15s
}
/* The target is bigger than the circle. A 30px dot in a card corner is a small
   thing to hit with a mouse and a hopeless one with a thumb, and growing the
   VISIBLE dot enough to fix that would make it the loudest thing on the card. */
.gc-howbtn::after{content:'';position:absolute;inset:-9px;border-radius:50%}
.gc-howbtn:hover{color:var(--cyan);border-color:var(--cyan);background:rgba(0,245,255,.1)}
/* A real target on a phone. The badge is the only way into the briefing that
   does not require holding the card down for half a second, and at 24px it was
   below every touch-target guideline there is — which is exactly why the long
   press had to exist. It still does, but it is now a shortcut rather than the
   thing that rescues a missed tap. */
@media (pointer: coarse){
  .gc-howbtn{width:40px;height:40px;line-height:38px;font-size:1.15rem;top:6px;right:6px}
  .gc-howbtn::after{inset:-6px}
}

/* ══════════════════════════════════════════════
   📖 MISSION BRIEFING
   The overlay the ⓘ opens. It replaced a flip on the card face, which could
   hold one paragraph and no controls — see buildHowFaces(). Sections are
   ordered summary → controls → steps → tips so a first-timer can stop reading
   at the steps and a returning player can scroll straight to the tips.
   ══════════════════════════════════════════════ */
.brief-modal{max-width:560px;border-color:rgba(0,245,255,.42);
  box-shadow:0 0 70px rgba(0,245,255,.13),inset 0 0 0 1px rgba(255,255,255,.03)}
.brief-modal::before{background:linear-gradient(90deg,transparent,var(--cyan),transparent);
  box-shadow:0 0 12px var(--cyan)}
.brief-body{display:flex;flex-direction:column;gap:16px;text-align:left}

.brf-hero{display:flex;align-items:center;gap:14px}
.brf-ico{font-size:2.4rem;line-height:1;flex-shrink:0}
.brf-name{font-family:var(--fd);font-size:1rem;font-weight:900;letter-spacing:.08em;color:var(--cyan)}
.brf-hook{font-size:.8rem;line-height:1.45;color:var(--dim);margin-top:3px}
/* line-height is explicit because the display face has tall caps and this line
   wraps to two of them on a phone — at the UA default the descenders of the
   second line sat on the border. */
.brf-locked{font-family:var(--fd);font-size:.58rem;letter-spacing:.1em;line-height:1.6;color:var(--gold);
  background:rgba(255,215,0,.08);border:1px solid rgba(255,215,0,.3);border-radius:8px;padding:9px 11px}

.brf-sec{display:flex;flex-direction:column;gap:8px}
.brf-h{font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.16em;color:var(--dimmer)}
.brf-p{font-size:.86rem;line-height:1.6;color:var(--txt);margin:0}

.brf-ctrls{display:flex;flex-direction:column;gap:7px}
/* Grid, not flex: the two tags must share ONE column width so the control text
   starts at the same x on both rows. Auto-width tags put "TOUCH" and "KEYS" a
   few px apart and the block read as two unrelated lines. */
.brf-ctrl{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:baseline;
  background:var(--s2);border:1px solid var(--border);border-radius:9px;padding:9px 12px}
.brf-ctag{font-family:var(--fd);font-size:.5rem;letter-spacing:.12em;color:var(--dimmer);white-space:nowrap}
.brf-ctxt{font-size:.78rem;line-height:1.45;color:var(--txt)}

.brf-steps{margin:0;padding-left:0;list-style:none;counter-reset:brf;
  display:flex;flex-direction:column;gap:9px}
.brf-steps li{counter-increment:brf;position:relative;padding-left:32px;
  font-size:.84rem;line-height:1.55;color:var(--txt)}
.brf-steps li::before{content:counter(brf);position:absolute;left:0;top:-1px;
  width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-family:var(--fd);font-size:.6rem;font-weight:700;
  background:rgba(0,245,255,.12);border:1px solid rgba(0,245,255,.45);color:var(--cyan)}

.brf-tips{margin:0;padding-left:0;list-style:none;display:flex;flex-direction:column;gap:9px}
.brf-tips li{position:relative;padding-left:24px;font-size:.82rem;line-height:1.55;color:var(--dim)}
.brf-tips li::before{content:'▸';position:absolute;left:6px;top:0;color:var(--lime)}

.brf-foot{font-family:var(--fd);font-size:.58rem;letter-spacing:.1em;color:var(--dimmer);
  border-top:1px solid var(--border);padding-top:13px}
.brf-foot em{font-style:normal;color:var(--gold)}
.brf-actions{display:flex;gap:10px;flex-wrap:wrap}   /* v141 · three buttons now (🎓 TUTORIAL): they wrap on a phone */
.brf-actions .btn{flex:1;min-height:42px}

/* ✨ v141 · 🎓 THE WALK (§ 92 in app.js): a tutorial as cards in the briefing — a mission not yet open, and every
   event. One card at a time under a bar of how far; the card's mark is its step number, its emoji or 💡. */
.bw{display:flex;flex-direction:column;gap:14px}
.bw-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  font-family:var(--fd);font-size:.62rem;letter-spacing:.14em;color:var(--dimmer)}
.bw-name{color:var(--cyan);font-weight:700;line-height:1.5}
.bw-n{white-space:nowrap}
.bw-bar{height:3px;border-radius:2px;background:rgba(255,255,255,.08);overflow:hidden}
.bw-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--cyan),var(--lime));transition:width .25s ease}
.bw-card{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;min-height:200px;
  background:var(--s2);border:1px solid var(--border);border-radius:12px;padding:22px 18px}
.bw-ico{width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;
  font-family:var(--fd);font-size:1.5rem;font-weight:900;color:var(--cyan);
  background:rgba(0,245,255,.08);border:1px solid rgba(0,245,255,.4)}
.bw-title{font-family:var(--fd);font-size:.78rem;font-weight:900;letter-spacing:.12em;line-height:1.5;color:var(--txt)}
.bw-body{font-size:.9rem;line-height:1.6;color:var(--txt);max-width:46ch}
html.reduced-motion .bw-bar i{transition:none}
@media (max-width: 640px){ .bw-card{min-height:170px;padding:18px 14px} .bw-body{font-size:.86rem} }

/* ✨ v141 · ⓘ on each event banner (§ 92), the same badge every mission card wears (.gc-howbtn): the way into the
   event's briefing and its tutorial. */
.mp-banner .ev-info{position:absolute;top:8px;right:8px;z-index:3;width:30px;height:30px;line-height:28px;padding:0;text-align:center;
  border-radius:50%;cursor:pointer;font-size:1rem;background:rgba(255,255,255,.06);border:1px solid var(--border);color:var(--dim);
  transition:color .15s,border-color .15s,background .15s}
.mp-banner .ev-info::after{content:'';position:absolute;inset:-9px;border-radius:50%}
.mp-banner .ev-info:hover,.mp-banner .ev-info:focus-visible{color:var(--cyan);border-color:var(--cyan);background:rgba(0,245,255,.1)}
@media (pointer: coarse){
  .mp-banner .ev-info{width:40px;height:40px;line-height:38px;font-size:1.15rem;top:6px;right:6px}
  .mp-banner .ev-info::after{inset:-6px}
}
/* In 3D the banner is preserve-3d and its icon is lifted 26px: at Z 0 the badge would sit behind it, for the eye and
   for the pointer (the mission cards' badge sits at 34px for the same reason). */
body.mode-3d .mp-banner .ev-info{transform:translateZ(34px)}

@media (max-width: 640px){
  .brief-modal{padding:22px 16px 18px}
  .brf-ico{font-size:1.9rem}
  .brf-name{font-size:.85rem}
  /* The tag goes above the text on a narrow screen — side by side, a long key
     list wrapped to three ragged lines beside a one-word label. */
  .brf-ctrl{grid-template-columns:1fr;gap:4px}
}

/* ── 🎓 ONBOARDING ── */
.ob-modal{max-width:520px;text-align:center}
.ob-body-wrap{padding:6px 4px 2px}
.ob-ico{font-size:3rem;line-height:1;margin-bottom:10px}
.ob-title{font-family:var(--fd);font-size:1.05rem;font-weight:900;letter-spacing:.1em;color:var(--cyan);margin-bottom:10px}
.ob-body{font-size:.88rem;line-height:1.65;color:var(--txt);margin-bottom:18px}
.ob-dots{display:flex;gap:7px;justify-content:center;margin-bottom:18px}
.ob-dot{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.16);transition:background .2s,transform .2s}
.ob-dot.on{background:var(--cyan);transform:scale(1.35)}
.ob-btns{display:flex;gap:10px;justify-content:center}
.ob-coach{
  position:relative;z-index:6;max-width:min(620px,94vw);margin:0 auto 6px;
  padding:9px 16px;border-radius:999px;text-align:center;
  font-family:var(--fb);font-size:.8rem;font-weight:600;letter-spacing:.03em;color:#04040e;
  background:linear-gradient(90deg,var(--cyan),var(--lime));
  box-shadow:0 6px 24px rgba(0,245,255,.35);
  opacity:0;transform:translateY(-6px);pointer-events:none;
  transition:opacity .28s ease,transform .28s ease
}
.ob-coach.show{opacity:1;transform:translateY(0)}

/* ── 📸 PHOTO MODE ── */
#photo-bar{
  position:fixed;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);
  z-index:120;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center;
  max-width:94vw;padding:9px 14px;border-radius:999px;
  background:rgba(6,8,18,.92);border:1px solid var(--cyan);
  box-shadow:0 10px 40px rgba(0,0,0,.6),0 0 26px rgba(0,245,255,.22)
}
.pb-tag{font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.14em;color:var(--cyan)}
/* The HUD is hidden by class rather than by inline style, so RESUME puts it
   back by removing one class and cannot leave a stat pill stranded. */
body.photo-nohud .g-hdr,
body.photo-nohud .prog-bar,
body.photo-nohud #pu-dock,
body.photo-nohud #chaos-banner,
body.photo-nohud #mp-hud,
body.photo-nohud .ghost-pace,
body.photo-nohud #arcade-controls,
body.photo-nohud #gl-fx{opacity:0;pointer-events:none;transition:opacity .2s}
body.photo-mode #board-frame{cursor:grab}
body.photo-mode #board-frame:active{cursor:grabbing}
/* The round is frozen, so every control that feeds it is too. The board stays
   live because the orbit drags on it (bindCanvasDrag() is what keeps those
   drags out of the game); the pad, the power-up dock and every panel a mission
   mounts under the board — Battle Bots' deploy deck, the Frequency sliders,
   Math Blitz's answer box — stop taking clicks until RESUME. Before this a
   SLAM on the pad dropped a Tetris piece, and Math Blitz's Submit scored, on
   a round whose clock was held. (Keys are photoBindOrbit()'s job.) By class,
   like the HUD, so RESUME cannot leave a control switched off. */
body.photo-mode #arcade-controls,
body.photo-mode #pu-dock,
body.photo-mode .g-area > :not(#g-canvas-holder){pointer-events:none}
.photo-modal{max-width:820px}
.photo-body{display:flex;flex-direction:column;gap:12px;align-items:center}
.ph-img{max-width:100%;border-radius:var(--r);border:1px solid var(--border)}
.ph-code{
  font-family:monospace;font-size:.66rem;word-break:break-all;text-align:center;
  color:var(--gold);background:rgba(255,215,0,.06);border:1px solid rgba(255,215,0,.24);
  border-radius:var(--r);padding:8px 12px;max-width:100%
}
.ph-btns{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}

/* ── 🎮 THE VIRTUAL POINTER ── */
#pad-cursor{
  position:fixed;left:0;top:0;width:22px;height:22px;border-radius:50%;
  z-index:115;pointer-events:none;display:none;
  border:2px solid var(--cyan);background:rgba(0,245,255,.16);
  box-shadow:0 0 14px rgba(0,245,255,.6);
  transition:background .08s,transform .02s linear
}
#pad-cursor.down{background:rgba(0,245,255,.55);box-shadow:0 0 22px rgba(0,245,255,.9)}
.ctrl-btn.pad-lit{filter:brightness(1.45)}
.inp-toggle.on{border-color:var(--lime);color:var(--lime)}
/* ✨ v142 · HAPTICS where the browser cannot vibrate (paintInputToggles): dimmed and never lit, but still readable, because on a phone the label is the whole explanation. It wraps: the label is long, .btn is nowrap and a 1fr grid column will not shrink below its content, so left alone it would shove the PAD switch off the panel on a small phone. */
#btn-haptics:disabled{opacity:.7;cursor:not-allowed;white-space:normal;line-height:1.3}
/* ✨ GRAPHICS PROFILE — Normal / Ultra Realistic. Gold when Ultra is on: it is
   the premium, heavier setting, and gold is the arcade's colour for that. The
   in-game ✨ is an emoji, which ignores `color`, so its state is carried by the
   border, the glow and the opacity instead. */
.gfx-toggle.on{border-color:var(--gold);color:var(--gold);box-shadow:0 0 14px rgba(255,215,0,.18)}
.g-actions .btn-gfx-game{opacity:.78}
.g-actions .btn-gfx-game.on{opacity:1;border-color:rgba(255,215,0,.55);box-shadow:0 0 14px rgba(255,215,0,.22)}
body.mode-3d .gfx-toggle.on,body.mode-3d .g-actions .btn-gfx-game.on{--wall:#8a6b00;--wallb:#453600}

/* ── 📁 THE MISSION DOSSIER PAGE ── */
.dos-mission[data-dos]{cursor:pointer;transition:border-color .16s,transform .16s}
.dos-mission[data-dos]:hover,
.dos-mission[data-dos]:focus-visible{border-color:var(--cyan);transform:translateY(-2px);outline:none}
.dos-back{margin-bottom:12px}
.dos-hero{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.dos-hero-ico{font-size:2.6rem;line-height:1}
.dos-hero-name{font-family:var(--fd);font-size:1.05rem;font-weight:900;letter-spacing:.08em;color:var(--cyan)}
.dos-hero-sub{font-size:.76rem;line-height:1.5;color:var(--dim);margin-top:4px}
.dos-pace{width:100%;height:180px;display:block;background:rgba(255,255,255,.02);border:1px solid var(--border);border-radius:var(--r)}
.dos-axes{display:flex;justify-content:space-between;font-size:.6rem;color:var(--dim);padding:4px 2px 0}
.dos-legend{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.dl-chip{
  font-family:var(--fd);font-size:.58rem;font-weight:700;letter-spacing:.07em;
  padding:3px 9px;border-radius:999px;color:var(--c);border:1px solid var(--c);background:rgba(255,255,255,.03)
}
.dos-ends{display:flex;align-items:flex-end;gap:4px;height:120px;padding:8px 4px 0;
  background:rgba(255,255,255,.02);border:1px solid var(--border);border-radius:var(--r)}
.de-bar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;gap:4px}
.de-bar>span{
  width:100%;border-radius:3px 3px 0 0;
  background:linear-gradient(180deg,var(--cyan),rgba(0,245,255,.18))
}
.de-bar>em{font-style:normal;font-size:.52rem;color:var(--dim)}
.dos-endnote{font-size:.72rem;color:var(--dim);margin-top:8px;line-height:1.5}
.dos-endnote b{color:var(--cyan);font-weight:700}
/* ✨ v142 · The raw-ledger panel. The tier chips are the grid's own (.mp-filter) lit in the tier's colour; a medal line is a
   tick on the left edge of the bar it opens (the diamond's, the cap, on the right edge of the last); the last-forty trend is a
   bar a run, tinted by tier, with the best one outlined and crowned and the medal lines crossing it as dashed rules. */
.dos-tiers{margin:0 0 10px;gap:6px}
.dos-tiers .mp-filter{padding:6px 11px;letter-spacing:.08em}
.dos-tiers .mp-filter.on{color:var(--c,var(--cyan));border-color:var(--c,var(--cyan));background:rgba(255,255,255,.07);box-shadow:0 0 14px rgba(255,255,255,.1)}
.dos-tiers .mp-filter:disabled{opacity:.35;cursor:default}
.de-bar[data-m]{box-shadow:inset 2px 0 0 var(--mc)}
.de-bar[data-m][data-e="r"]{box-shadow:inset -2px 0 0 var(--mc)}
.de-bar[data-m="0"],.dt-ml[data-m="0"]{--mc:var(--bronze)}
.de-bar[data-m="1"],.dt-ml[data-m="1"]{--mc:var(--silver)}
.de-bar[data-m="2"],.dt-ml[data-m="2"]{--mc:var(--gold)}
.de-bar[data-m="3"],.dt-ml[data-m="3"]{--mc:var(--cyan)}
.dos-trend{height:70px;margin-top:10px;padding:11px 4px 0;background:rgba(255,255,255,.02);border:1px solid var(--border);border-radius:var(--r)}
.dt-bars{position:relative;height:100%;display:flex;align-items:flex-end;gap:2px}
.dt-bar{position:relative;flex:1;min-width:2px;height:var(--h);border-radius:2px 2px 0 0;background:var(--c);opacity:.78}
/* The best run is marked by a shape, not a colour: Overclocked is gold already, and a diamond reads without hue. */
.dt-bar.best{opacity:1;box-shadow:0 0 0 1px #fff,0 0 8px rgba(255,255,255,.5)}
.dt-bar.best::after{content:'';position:absolute;left:50%;top:-9px;width:5px;height:5px;margin-left:-2.5px;background:var(--gold);transform:rotate(45deg)}
.dt-ml{position:absolute;z-index:1;left:0;right:0;height:0;border-top:1px dashed var(--mc);opacity:.55;pointer-events:none}
.dos-prov{font-size:.66rem}
.dos-last{display:flex;align-items:flex-end;gap:5px;height:96px;padding:8px 4px 0;
  background:rgba(255,255,255,.02);border:1px solid var(--border);border-radius:var(--r)}
.dl-cell{flex:1;height:var(--h);min-height:6px;border-radius:3px 3px 0 0;position:relative;
  background:linear-gradient(180deg,var(--lime),rgba(57,255,20,.16))}
.dl-cell>em{position:absolute;inset:auto 0 -16px;font-style:normal;font-size:.5rem;color:var(--dim);text-align:center}
.dos-mbtns{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}

/* Overlay tints — one variable each, the same shape the existing tints use. */
.endless-tint .fb-modal{border-color:rgba(0,245,255,.34)}
.loadout-tint .fb-modal{border-color:rgba(57,255,20,.3)}
.onboard-tint .fb-modal{border-color:rgba(0,245,255,.4)}
.photo-tint .fb-modal{border-color:rgba(255,215,0,.32)}

@media (max-width:760px){
  .loadout-rail{margin-left:10px;margin-right:10px}
  .loadout-rail .btn{margin-left:0}
  .en-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
  .dos-ends{height:96px}
  #photo-bar{gap:6px;padding:7px 10px}
  .pb-tag{display:none}
  .ob-coach{font-size:.72rem;padding:7px 12px}
}

/* ══════════════════════════════════════════════════════════════════════
   🧊 3D CHROME — the whole interface as physical objects
   ══════════════════════════════════════════════════════════════════════
   ⚠️ EVERY SELECTOR BELOW IS SCOPED TO `body.mode-3d`, and that is not a
   decoration — it is the point. The renderer the player picks on the login
   screen is a choice about the WHOLE arcade, not just the board: pick 2D
   CLASSIC and the interface is the flat neon one the rules above draw, pick
   3D CYBERPUNK and every control grows a body. A solid button over a flat
   board was the tell that the setting only reached half the app. PI3D.setMode()
   owns the class, so the switch is live the moment the card is clicked.

   Nothing here may be written unscoped. An unprefixed rule in this section is
   a control that stays extruded in 2D mode, which is exactly the bug this
   scoping exists to prevent.

   Everything below turns the flat neon UI into a set of solids. The rule
   throughout: depth is GEOMETRY, not a drop shadow. Each control is built as

     · a TOP FACE      — the element itself, lit from above by a gradient
     · a SIDE WALL     — a stack of 1px solid offsets in the object's own edge
                         colour. That is the extruded body of the solid, not a
                         blur: it is opaque, it is the same silhouette as the
                         face, and it gets SHORTER when the control is pressed,
                         which is what selling "this moved 6px toward the desk"
                         actually requires
     · a BEVEL         — a lit inner top lip and a dark inner bottom lip, so the
                         edge between face and wall catches light
     · a SPECULAR      — a fixed highlight across the upper third; it is what
                         makes a surface read as glossy plastic or brushed metal
                         rather than as coloured paper
     · a CONTACT SHADE — the only soft shadow here, and it is doing the one job
                         a shadow legitimately does: darkening the surface the
                         object is resting ON

   On top of that geometry, every control lives in a real perspective and moves
   in three axes: hover lifts it toward the viewer and tilts it, press drives it
   down into its own wall. Cards tilt TOWARD THE POINTER (wired in app.js), so
   moving the mouse across the hub visibly rotates the objects — the parallax
   between a lifted glyph and the plate behind it is the depth cue.

   perspective() is applied per-element inside transform rather than as a
   `perspective` property on the containers. A perspective container is also a
   containing block for fixed positioning and a new stacking context, and
   putting one on .screen — which scrolls — costs a repaint of the whole surface
   per frame. Per-element, each object gets its own eye point directly in front
   of it, which is also the projection that keeps a grid of cards from fanning
   outward at the edges of a wide screen. */

:root{
  /* Body colours for the extruded walls. Two tones: the upper wall catches a
     little of the top light, the lower one is in the object's own shade. */
  --w1:#161c30;
  --w2:#0a0e1a;
  --w3:#05070e;
  --lip-hi:rgba(255,255,255,.26);
  --lip-lo:rgba(0,0,0,.55);
  --spec:linear-gradient(180deg,rgba(255,255,255,.16) 0,rgba(255,255,255,.05) 42%,rgba(255,255,255,0) 62%);
  --eye:820px;                       /* viewing distance for interface solids */
  --pop-ease:cubic-bezier(.2,.9,.28,1);
}

/* Every solid gets a 3D context so its raised children — a card's icon, a
   row's rank — are laid out in the same space as its own face rather than
   flattened onto it.

   `position` is deliberately NOT set here. Several of these already position
   themselves and a blanket `position:relative` silently breaks them: #toast is
   fixed to the bottom of the viewport, #tetris-next-wrap is absolute inside
   the board frame, .fb-close is absolute in the modal's corner. Only .btn
   actually needs a positioned box — for its specular pseudo-element — and it
   is given one on its own rule below. */
body.mode-3d .btn,
body.mode-3d .auth-tab,
body.mode-3d .market-tab,
body.mode-3d .lb-tab,
body.mode-3d .mp-filter,
body.mode-3d .diff-btn,
body.mode-3d .ctrl-btn,
body.mode-3d .bb-btn,
body.mode-3d .fb-node,
body.mode-3d .mode-card,
body.mode-3d .game-card,
body.mode-3d .shop-card,
body.mode-3d .mp-mode,
body.mode-3d .card,
body.mode-3d .lb-row,
body.mode-3d .stat-pill,
body.mode-3d .hub-pts,
body.mode-3d .hub-credits,
body.mode-3d .gc-pts,
body.mode-3d .rarity-badge,
body.mode-3d .mem-card,
body.mode-3d .hack-node,
body.mode-3d .path-node,
body.mode-3d .hub-bar,
body.mode-3d .market-bar,
body.mode-3d .mp-bar,
body.mode-3d .g-hdr,
body.mode-3d .freq-slider,
body.mode-3d #g-sort-rule,
body.mode-3d .hack-readout,
body.mode-3d .path-readout,
body.mode-3d .res-bd,
body.mode-3d .mp-banner,
body.mode-3d .market-bal span,
body.mode-3d .hub-guest-tag,
body.mode-3d .up-carry{
  transform-style:preserve-3d;
}

/* ══ BUTTONS — moulded keycaps ══
   The one control the hand expects to depress, so it gets a deep body and real
   travel. translateZ on hover is a move toward the viewer: the wall
   foreshortens and the face grows, which is the difference between a button
   rising and a button merely getting brighter. */
/* ✨ v106 · ⚠️ A SOLID AT REST IS FLAT. Every state a control can SIT in is a
   2D transform — none, translateY(), scale() — and only the moves in depth
   (the hover lift and tilt) are 3D. A resting `perspective(…) translateZ(0)`
   draws exactly what `none` draws, but a 3D transform makes Blink composite the
   element as a layer of its own and give up pixel-snapping it (the failure the
   #board-frame note below describes for the canvas), so a button whose box
   lands on a fractional pixel — most do, centred in flex rows — had its label
   resampled half a pixel off for as long as it sat there. Measured on the round
   header at dpr 1.75: the QUIT label visibly smeared, the header 4.5% softer
   than the same pixels drawn flat. The `perspective()` in a state that does not
   move in z was never doing anything — at z = 0 it is the identity — so
   `perspective(d) translateY(y)` is written translateY(y), and a pop-out of
   `perspective(d) translateZ(z)` is the scale it projects to, d / (d − z),
   about the same origin. No stacking or containing block changes: every one of
   these but #click-btn carries preserve-3d (above), which makes both on its
   own, and #click-btn holds nothing positioned. `none` interpolates to the
   hover transforms like the identity it is. */
body.mode-3d .btn{
  --wall:var(--w1);
  --wallb:var(--w3);
  position:relative;
  border-radius:10px;
  transform:none;
  transform-origin:50% 100%;
  transition:transform .16s var(--pop-ease),box-shadow .16s var(--pop-ease),
             filter .16s ease,background-color .16s ease,border-color .16s ease;
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),
    0 4px 0 var(--wallb),0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),
    0 12px 18px -8px rgba(0,0,0,.8),
    inset 0 1px 0 var(--lip-hi),inset 0 -1px 0 var(--lip-lo);
}
body.mode-3d .btn:hover:not(:disabled){
  transform:perspective(var(--eye)) translateZ(9px) rotateX(6deg);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
    0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),
    0 8px 0 var(--wallb),0 9px 0 var(--wallb),0 10px 0 var(--wallb),
    0 20px 26px -10px rgba(0,0,0,.85),
    inset 0 1px 0 var(--lip-hi),inset 0 -1px 0 var(--lip-lo);
}
/* Pressed: the face travels DOWN by almost the whole body height and the wall
   shrinks to match. Both halves are needed — moving the face alone slides the
   object, shortening the wall alone squashes it. Together it depresses. */
body.mode-3d .btn:active:not(:disabled){
  transform:perspective(var(--eye)) translateZ(0) translateY(5px) rotateX(0deg);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wallb),
    0 4px 6px -3px rgba(0,0,0,.8),
    inset 0 2px 5px rgba(0,0,0,.55),inset 0 -1px 0 rgba(255,255,255,.08);
}
body.mode-3d .btn:disabled{transform:none;filter:saturate(.35) brightness(.8)}
/* The specular rides on a pseudo-element rather than background-image, because
   .btn-primary paints its face with a gradient of its own and a background-image
   here would replace it — which is a button with no face at all, not a button
   with a highlight. Absolutely positioned so it is out of flow: a couple of
   these buttons are flex containers, and an in-flow pseudo becomes a flex item
   and pushes their label sideways. */
body.mode-3d .btn::before{
  content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.2),rgba(255,255,255,.06) 42%,rgba(255,255,255,0) 62%);
}
body.mode-3d .btn:active:not(:disabled)::before{
  background:linear-gradient(180deg,rgba(0,0,0,.28),rgba(255,255,255,0) 55%);
}

body.mode-3d .btn-primary{--wall:#0a8f9a;--wallb:#05545c;color:#01131a}
body.mode-3d .btn-secondary{--wall:#1b2237;--wallb:#0a0e1a}
body.mode-3d .btn-guest{--wall:#1c7a10;--wallb:#0c3d08}
body.mode-3d .btn-feedback{--wall:#1c7a10;--wallb:#0c3d08}
body.mode-3d .btn-sound{--wall:#0a6f7a;--wallb:#053b42}
body.mode-3d .btn-sound.snd-partial{--wall:#8a6b00;--wallb:#453600}
body.mode-3d .btn-sound.snd-off{--wall:#1b2237;--wallb:#0a0e1a}
body.mode-3d .btn-save-acct{--wall:#1c7a10;--wallb:#0c3d08}
body.mode-3d .btn-lg{border-radius:12px}
body.mode-3d .btn-sm{border-radius:8px}

/* ══ ARCADE KEYCAPS — the play-surface pad ══
   The tallest bodies in the interface, because these are hit with a thumb
   rather than clicked, and because a game pad that visibly bottoms out is the
   clearest feedback a touch control can give. */
body.mode-3d .ctrl-btn{
  --wall:#1b2338;--wallb:#070a14;
  border-radius:12px;
  background-image:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.02) 46%,rgba(0,0,0,.22));
  transform:none;
  transform-origin:50% 100%;
  transition:transform .1s var(--pop-ease),box-shadow .1s var(--pop-ease),background-color .12s;
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
    0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),
    0 8px 0 var(--wallb),0 9px 0 var(--wallb),0 10px 0 var(--wallb),
    0 16px 20px -8px rgba(0,0,0,.9),
    inset 0 1px 0 rgba(255,255,255,.3),inset 0 -2px 0 rgba(0,0,0,.55);
}
body.mode-3d .ctrl-btn:active{
  transform:translateY(8px);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wallb),
    0 3px 5px -2px rgba(0,0,0,.85),
    inset 0 3px 7px rgba(0,0,0,.6);
}
body.mode-3d .ctrl-btn.accent{--wall:#5b21a8;--wallb:#2a0e52}
body.mode-3d .ctrl-btn.accent:active{transform:translateY(8px)}

/* ══ DEPLOY DECK ══ Cards standing in a rack, tinted to their unit colour. */
body.mode-3d .bb-btn{
  --wall:#141a2c;--wallb:#070a14;
  border-radius:11px;
  background-image:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,0) 55%);
  transform:none;
  transform-origin:50% 100%;
  transition:transform .14s var(--pop-ease),box-shadow .14s var(--pop-ease),opacity .2s;
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),
    0 4px 0 var(--wallb),0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),
    0 12px 16px -8px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.5);
}
body.mode-3d .bb-btn:hover:not(.broke):not(.maxed){
  transform:perspective(560px) translateZ(10px) rotateX(7deg);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
    0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),
    0 8px 0 var(--wallb),0 9px 0 var(--wallb),0 10px 0 var(--wallb),
    0 20px 26px -10px rgba(0,0,0,.9),0 0 24px -4px var(--bc),
    inset 0 1px 0 rgba(255,255,255,.24),inset 0 -1px 0 rgba(0,0,0,.5);
}
body.mode-3d .bb-btn:active{
  transform:translateY(6px);
  box-shadow:0 1px 0 var(--wall),0 2px 0 var(--wallb),inset 0 3px 6px rgba(0,0,0,.6);
}
body.mode-3d .bb-btn.broke,
body.mode-3d .bb-btn.maxed{
  transform:translateY(5px);
  box-shadow:0 1px 0 var(--wallb),0 2px 0 var(--wallb),inset 0 2px 6px rgba(0,0,0,.55);
}

/* ══ TABS & PILL SWITCHES ══
   Shallower bodies than a button — these read as keys on a strip, and the
   SELECTED one is the one pressed IN, which is how a mechanical tab bank shows
   its state without needing colour to carry the whole message. */
body.mode-3d .auth-tab,
body.mode-3d .market-tab,
body.mode-3d .lb-tab,
body.mode-3d .mp-filter,
body.mode-3d .diff-btn,
body.mode-3d .fb-node{
  --wall:#151b2e;--wallb:#080b16;
  border-radius:9px;
  background-image:var(--spec);
  transform:none;
  transform-origin:50% 100%;
  transition:transform .15s var(--pop-ease),box-shadow .15s var(--pop-ease),
             color .15s,border-color .15s,background-color .15s;
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wallb),0 4px 0 var(--wallb),
    0 9px 12px -6px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.45);
}
body.mode-3d .auth-tab:hover,
body.mode-3d .market-tab:hover,
body.mode-3d .lb-tab:hover,
body.mode-3d .mp-filter:hover,
body.mode-3d .diff-btn:hover:not(.active),
body.mode-3d .fb-node:hover{
  transform:perspective(700px) translateZ(7px) rotateX(5deg);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),
    0 4px 0 var(--wallb),0 5px 0 var(--wallb),0 6px 0 var(--wallb),
    0 16px 20px -9px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.18),inset 0 -1px 0 rgba(0,0,0,.45);
}
body.mode-3d .auth-tab.active,
body.mode-3d .market-tab.active,
body.mode-3d .lb-tab.on,
body.mode-3d .mp-filter.on,
body.mode-3d .diff-btn.active,
body.mode-3d .fb-node.lit{
  transform:translateY(3px);
  box-shadow:
    0 1px 0 var(--wallb),
    inset 0 3px 7px rgba(0,0,0,.55),inset 0 -1px 0 rgba(255,255,255,.1);
}
body.mode-3d .diff-btn.stable-active,
body.mode-3d .diff-btn.diff-stable.active{--wallb:#0a4a12}
body.mode-3d .diff-btn.overclock-active,
body.mode-3d .diff-btn.diff-overclocked.active{--wallb:#4a3a05}
body.mode-3d .diff-btn.meltdown-active,
body.mode-3d .diff-btn.diff-meltdown.active{--wallb:#4a0512}
body.mode-3d .diff-btn.stable-active,
body.mode-3d .diff-btn.overclock-active,
body.mode-3d .diff-btn.meltdown-active{
  transform:translateY(3px);
  box-shadow:0 1px 0 var(--wallb),inset 0 3px 7px rgba(0,0,0,.55),
             inset 0 -1px 0 rgba(255,255,255,.1);
}
body.mode-3d .diff-selector.locked .diff-btn:not(.active):hover{transform:none}
body.mode-3d .diff-selector.locked .diff-btn:active{transform:none}

/* ══ CARDS — plates raised off the desk ══
   The biggest surfaces in the interface, so they get the strongest modelling: a
   lit top edge, a real body, and a pointer-driven tilt wired up in app.js.
   --tx/--ty are written per-element by that code; with no pointer near them
   they are 0 and the card sits square. */
body.mode-3d .game-card,
body.mode-3d .shop-card,
body.mode-3d .card,
body.mode-3d .mp-mode,
body.mode-3d .mode-card,
body.mode-3d .convert-card{
  --wall:#141a2c;--wallb:#070a14;--tx:0deg;--ty:0deg;--tz:0px;
  /* overflow MUST stay visible. Any overflow other than visible forces
     transform-style back to flat, and a flattened card composites its raised
     icon straight onto its own face — no parallax, no standing off, nothing.
     Nothing on these cards was ever being clipped: the sparkline strip is in
     flow, and the one decoration that does need clipping (the legendary
     shimmer sweep) re-declares overflow on its own rarity class. */
  overflow:visible;
  background-image:linear-gradient(170deg,rgba(255,255,255,.07),rgba(255,255,255,0) 46%);
  transform:perspective(var(--eye)) translateZ(var(--tz)) rotateX(var(--tx)) rotateY(var(--ty));
  transform-origin:50% 60%;
  transition:transform .2s var(--pop-ease),box-shadow .2s var(--pop-ease),border-color .2s;
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
    0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),0 8px 0 var(--wallb),
    0 18px 26px -12px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(0,0,0,.5);
}
/* Hover only supplies the LIFT. The rotation arrives as --tx/--ty from the
   pointer, and a rotate declared here would overwrite it every frame. */
/* The [data-c] selectors that carry each mission's neon are specificity 0-3-1
   and were overriding the body on hover — a card that lit up but lost its
   walls. The accent is folded into the object instead: one variable per colour,
   and the lift keeps the full wall stack with the glow added on the end. */
body.mode-3d .game-card[data-c="cyan"],
body.mode-3d .gc-pts[data-c="cyan"]{--acc:#00f5ff}
body.mode-3d .game-card[data-c="pink"],
body.mode-3d .gc-pts[data-c="pink"]{--acc:#ff0090}
body.mode-3d .game-card[data-c="lime"],
body.mode-3d .gc-pts[data-c="lime"]{--acc:#39ff14}
body.mode-3d .game-card[data-c="gold"],
body.mode-3d .gc-pts[data-c="gold"]{--acc:#ffd700}
body.mode-3d .game-card[data-c="purple"],
body.mode-3d .gc-pts[data-c="purple"]{--acc:#a855f7}
body.mode-3d .game-card[data-c="orange"],
body.mode-3d .gc-pts[data-c="orange"]{--acc:#ff6600}
body.mode-3d .game-card[data-c="red"],
body.mode-3d .gc-pts[data-c="red"]{--acc:#ff2442}
body.mode-3d .game-card:hover,
body.mode-3d .game-card[data-c]:hover,
body.mode-3d .shop-card:hover,
body.mode-3d .mp-mode:hover,
body.mode-3d .mode-card:hover{
  transform:perspective(var(--eye)) translateZ(34px) rotateX(var(--tx)) rotateY(var(--ty));
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
    0 5px 0 var(--wall),0 6px 0 var(--wallb),0 7px 0 var(--wallb),0 8px 0 var(--wallb),
    0 9px 0 var(--wallb),0 10px 0 var(--wallb),0 11px 0 var(--wallb),0 12px 0 var(--wallb),
    0 13px 0 var(--wallb),0 14px 0 var(--wallb),
    0 40px 50px -18px rgba(0,0,0,.92),
    0 0 40px -10px var(--acc,rgba(255,255,255,.35)),
    inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.5);
}
body.mode-3d .game-card[data-c]:hover{border-color:var(--acc)}
body.mode-3d .game-card:active,
body.mode-3d .game-card[data-c]:active,
body.mode-3d .shop-card:active,
body.mode-3d .mp-mode:active,
body.mode-3d .mode-card:active{
  transform:perspective(var(--eye)) translateZ(2px) translateY(4px);
  box-shadow:0 1px 0 var(--wall),0 2px 0 var(--wallb),0 6px 10px -5px rgba(0,0,0,.8),
             inset 0 3px 8px rgba(0,0,0,.5);
}
body.mode-3d .mode-card.on{
  transform:perspective(var(--eye)) translateZ(10px);
  box-shadow:
    0 1px 0 #0a5a63,0 2px 0 #0a5a63,0 3px 0 #063a41,0 4px 0 #063a41,0 5px 0 #063a41,
    0 20px 30px -12px rgba(0,0,0,.9),0 0 34px -6px rgba(0,245,255,.5),
    inset 0 1px 0 rgba(255,255,255,.24);
}
/* Icons stand OFF their card rather than being printed on it — the parallax
   between a lifted glyph and the plate behind it is the cheapest and most
   convincing depth cue a flat panel has. */
body.mode-3d .gc-icon,
body.mode-3d .shop-emoji,
body.mode-3d .res-emoji,
body.mode-3d .auth-icon,
body.mode-3d .mp-banner-icon,
body.mode-3d .bb-ico{
  transform:translateZ(26px);
  transform-style:preserve-3d;
}
body.mode-3d .gc-name,
body.mode-3d .gc-pts,
body.mode-3d .gc-desc,
body.mode-3d .shop-name{transform:translateZ(10px)}

/* ══ LEADERBOARD ROWS — a stack of physical plates ══ */
body.mode-3d .lb-row{
  --wall:#121829;--wallb:#080b16;
  background-image:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,0) 60%);
  transform:perspective(760px) translateZ(0);
  transition:transform .16s var(--pop-ease),box-shadow .16s var(--pop-ease);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wallb),
    0 7px 10px -6px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.1);
}
body.mode-3d .lb-row:hover{
  transform:perspective(760px) translateZ(8px) translateX(3px);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wallb),
    0 5px 0 var(--wallb),0 14px 18px -8px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.14);
}
body.mode-3d .lb-row.r1{--wall:#6b5600;--wallb:#3a2f00}
body.mode-3d .lb-row.r2{--wall:#4a525c;--wallb:#252a30}
body.mode-3d .lb-row.r3{--wall:#553318;--wallb:#2b190c}
body.mode-3d .lb-row.me{--wall:#153a72;--wallb:#0a1e3d}
body.mode-3d .lb-rank{transform:translateZ(12px)}

/* ══ BARS & PANELS — the desk everything else sits on ══
   Lower and wider than the controls, with the body colour running underneath.
   These do not move; they are the ground plane, and their job is to give the
   things standing on them something to be raised ABOVE. */
body.mode-3d .hub-bar,
body.mode-3d .market-bar,
body.mode-3d .mp-bar,
body.mode-3d .g-hdr,
body.mode-3d .freq-slider,
body.mode-3d #g-sort-rule,
body.mode-3d .hack-readout,
body.mode-3d .path-readout,
body.mode-3d .res-bd,
body.mode-3d .mp-banner,
body.mode-3d #tetris-next-wrap,
body.mode-3d .up-carry{
  background-image:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,0) 70%);
  box-shadow:
    0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
    0 14px 22px -12px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.11),inset 0 -1px 0 rgba(0,0,0,.5);
}
body.mode-3d #bb-deck{
  border-radius:14px;padding:10px;
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,0));
  box-shadow:inset 0 2px 6px rgba(0,0,0,.6),inset 0 -1px 0 rgba(255,255,255,.08),
             0 1px 0 rgba(255,255,255,.05);
}

/* ══ STATUS PILLS & BADGES — small solids, shallow bodies ══ */
body.mode-3d .stat-pill,
body.mode-3d .hub-pts,
body.mode-3d .hub-credits,
body.mode-3d .gc-pts,
body.mode-3d .rarity-badge,
body.mode-3d .market-bal span,
body.mode-3d .hub-guest-tag,
body.mode-3d .shop-tag,
body.mode-3d .mp-link,
body.mode-3d .res-bonus{
  background-image:var(--spec);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05),0 2px 0 #0b0f1c,0 3px 0 #070a14,
    0 6px 8px -4px rgba(0,0,0,.75),
    inset 0 1px 0 rgba(255,255,255,.18),inset 0 -1px 0 rgba(0,0,0,.45);
}

/* The specular sheen above is a background-image, and on the legendary badge
   the background-image is the word itself — painting --spec there clips a
   16%-white gradient to the glyphs and the text all but disappears. This badge
   keeps its shimmer and forgoes the sheen; it still gets the solid body and
   lit lip from the shared rule, only the face gradient differs. */
body.mode-3d .rarity-badge.legendary{background-image:var(--legend-shimmer)}

/* ══ RECESSED WELLS — the inverse solid ══
   A field you type into is a hole in the panel, not a block on top of it. Same
   modelling logic run backwards: the lit lip goes on the BOTTOM edge (light
   from above reaches the far wall of a pit), the dark lip on the top, and the
   body is an inset gradient rather than an outset stack. */
body.mode-3d .input,
body.mode-3d #math-answer,
body.mode-3d .fb-textarea,
body.mode-3d .fb-select,
body.mode-3d input[type=text],
body.mode-3d input[type=email],
body.mode-3d input[type=password],
body.mode-3d input[type=number],
body.mode-3d textarea,
body.mode-3d select{
  border-radius:10px;
  background-image:linear-gradient(180deg,rgba(0,0,0,.42),rgba(0,0,0,.1) 55%,rgba(255,255,255,.04));
  box-shadow:
    inset 0 3px 7px rgba(0,0,0,.65),inset 0 1px 0 rgba(0,0,0,.7),
    inset 0 -1px 0 rgba(255,255,255,.14),
    0 1px 0 rgba(255,255,255,.07);
}
body.mode-3d .input:focus,
body.mode-3d #math-answer:focus,
body.mode-3d .fb-textarea:focus,
body.mode-3d .fb-select:focus{
  box-shadow:
    inset 0 3px 9px rgba(0,0,0,.7),inset 0 1px 0 rgba(0,0,0,.7),
    inset 0 -1px 0 rgba(0,245,255,.5),
    0 0 0 3px rgba(0,245,255,.13),0 1px 0 rgba(255,255,255,.07);
}

/* ══ PROGRESS & METER CHANNELS ══
   A milled channel with a bar sitting IN it — the fill has its own top light
   and its own bottom shade, so it reads as a lit rod in a groove. */
body.mode-3d .prog-bar,
body.mode-3d .path-meter{
  height:8px;border-radius:5px;
  background:linear-gradient(180deg,#03040a,#0b0e1a);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.85),inset 0 -1px 0 rgba(255,255,255,.1),
    0 1px 0 rgba(255,255,255,.06);
}
body.mode-3d .prog-fill,
body.mode-3d .path-meter-fill{
  border-radius:5px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),inset 0 -2px 3px rgba(0,0,0,.4);
}

/* ══ SLIDERS — a knurled knob on a rail ══ */
body.mode-3d .freq-range{
  background:linear-gradient(180deg,#03040a,#0d1120);
  box-shadow:inset 0 2px 5px rgba(0,0,0,.85),inset 0 -1px 0 rgba(255,255,255,.12);
}
body.mode-3d .freq-range::-webkit-slider-thumb{
  background-image:linear-gradient(180deg,#e8faff 0,var(--cyan) 38%,#036c78 100%);
  box-shadow:
    0 1px 0 #0a5a63,0 2px 0 #0a5a63,0 3px 0 #063a41,0 4px 0 #063a41,
    0 8px 12px -5px rgba(0,0,0,.9),
    inset 0 1px 0 rgba(255,255,255,.85),inset 0 -2px 3px rgba(0,0,0,.4);
}
body.mode-3d .freq-range::-moz-range-thumb{
  background-image:linear-gradient(180deg,#e8faff 0,var(--cyan) 38%,#036c78 100%);
  box-shadow:0 2px 0 #0a5a63,0 4px 0 #063a41,0 8px 12px -5px rgba(0,0,0,.9),
             inset 0 1px 0 rgba(255,255,255,.85);
}
body.mode-3d .freq-range:active::-webkit-slider-thumb{
  box-shadow:0 1px 0 #063a41,0 3px 5px -3px rgba(0,0,0,.9),
             inset 0 2px 4px rgba(0,0,0,.4);
}

/* ══ 2D-MODE PLAY SURFACES ══
   Memory tiles, keypad nodes and circuit contacts are objects the player
   physically presses, so they get the same treatment as the pad. (The 3D
   missions build their own geometry; these are the classic renderer's.) */
body.mode-3d .mem-card,
body.mode-3d .hack-node,
body.mode-3d .path-node{
  transform:none;
  transform-origin:50% 100%;
  transition:transform .16s var(--pop-ease),box-shadow .16s var(--pop-ease),
             background-color .16s,border-color .16s;
  background-image:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,0) 55%);
  box-shadow:
    0 1px 0 #161d31,0 2px 0 #161d31,0 3px 0 #0a0e1a,0 4px 0 #0a0e1a,0 5px 0 #070a14,
    0 12px 16px -8px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.5);
}
body.mode-3d .mem-card:hover,
body.mode-3d .hack-node:hover,
body.mode-3d .path-node:not(.dead):hover{
  transform:perspective(620px) translateZ(10px) rotateX(6deg);
}
body.mode-3d .mem-card.flipped{
  transform:scale(1.023);                /* perspective(620px) translateZ(14px), drawn flat (v106) */
  box-shadow:
    0 1px 0 #1c6b12,0 2px 0 #1c6b12,0 3px 0 #0d3a08,0 4px 0 #0d3a08,
    0 18px 22px -10px rgba(0,0,0,.9),0 0 26px -6px rgba(57,255,20,.6),
    inset 0 1px 0 rgba(255,255,255,.3);
}
body.mode-3d .hack-node.lit,
body.mode-3d .path-node.on{
  transform:scale(1.02);                 /* perspective(620px) translateZ(12px), drawn flat (v106) */
  box-shadow:
    0 1px 0 rgba(0,0,0,.6),0 2px 0 rgba(0,0,0,.6),0 3px 0 rgba(0,0,0,.7),
    0 18px 22px -10px rgba(0,0,0,.9),
    0 0 24px var(--nc,var(--pc,#39ff14)),
    inset 0 1px 0 rgba(255,255,255,.35);
}
body.mode-3d .path-node.dead{
  transform:translateY(4px);
  box-shadow:0 1px 0 #2a0a12,inset 0 3px 8px rgba(0,0,0,.7);
}
/* ✨ v107 · The same hardware as the 2D button (A REAL BUTTON), stood on a
   steel housing: the stacked shadows are the bezel's sides, and a press sinks
   the cap most of the way into it. */
body.mode-3d #click-btn{
  transform:none;
  transition:transform .09s var(--pop-ease),box-shadow .09s var(--pop-ease);
  box-shadow:
    0 2px 0 #3d4653,0 4px 0 #3d4653,0 6px 0 #2c333e,0 8px 0 #2c333e,0 10px 0 #20262f,
    0 24px 30px -10px rgba(0,0,0,.9),0 0 46px var(--cb-glow),
    inset 0 -12px 22px rgba(0,10,30,.5),inset 0 7px 12px rgba(255,255,255,.28);
}
body.mode-3d #click-btn:active{
  transform:translateY(8px) scale(.985);
  box-shadow:0 2px 0 #2c333e,0 3px 0 #20262f,0 6px 10px -5px rgba(0,0,0,.9),0 0 30px var(--cb-glow),
             inset 0 -6px 14px rgba(0,10,30,.55),inset 0 10px 18px rgba(0,0,0,.25);
}

/* ══ MODALS & RESULT CARDS — brought forward off the page ══ */
/* 📱 v131 · DRAWN FLAT, by v106's rule for a solid at rest (BUTTONS, above):
   the walls are the box-shadow stack, and the lift is the scale
   perspective(1200px) translateZ(30px) projects to, 1200 / 1170 ≈ 1.026. The
   1.2° tilt went with the 3D. A dialog is a SCROLLER, and on an iPhone a
   scroller under a 3D transform did not take taps reliably: the Drive Lab, the
   one sheet tall enough to scroll on a phone, was the one whose steps and
   buttons often did nothing (3D transforms and composited scrolling: WebKit
   bugs 274654, 164949). The 3D transform also gave every dialog a layer of its
   own, open or not — all thirty-seven (SCREEN SYSTEM). */
body.mode-3d .fb-modal,
body.mode-3d #results-screen .res-card{
  transform:none;
  box-shadow:
    0 2px 0 #131a2e,0 4px 0 #131a2e,0 6px 0 #080c18,0 8px 0 #080c18,0 10px 0 #05070f,
    0 44px 70px -22px rgba(0,0,0,.95),
    inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.6);
}
body.mode-3d .fb-overlay.show .fb-modal{transform:scale(1.026)}   /* perspective(1200px) translateZ(30px), drawn flat (v131) */
body.mode-3d .fb-close{
  box-shadow:0 1px 0 #171e33,0 2px 0 #0a0e1a,0 4px 6px -3px rgba(0,0,0,.8),
             inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .14s var(--pop-ease),box-shadow .14s var(--pop-ease),color .14s;
}
body.mode-3d .fb-close:hover{transform:perspective(500px) translateZ(6px) scale(1.06)}
body.mode-3d .fb-close:active{transform:translateY(2px)}
body.mode-3d #toast{
  box-shadow:
    0 2px 0 rgba(255,255,255,.06),0 3px 0 #0a0e1a,0 5px 0 #05070f,
    0 22px 34px -14px rgba(0,0,0,.9),
    inset 0 1px 0 rgba(255,255,255,.16);
}

/* ══ TITLES THAT STAND OFF THE PAGE ══
   Extruded type: a stack of solid offsets under the glyphs is the same body the
   controls have, applied to letterforms. It is the one place a text-shadow is
   doing geometry rather than decoration. */
/* ⚠️ The gradient titles take their body from filter:drop-shadow, NOT
   text-shadow. Their face is a background clipped to the glyphs under a
   transparent text fill, and Chrome paints text-shadow ABOVE a
   background-clip:text background — so the extrusion was drawn over the face
   and buried it: the logo came out a flat dull teal, and every modal title a
   near-black word with a thin lit edge. drop-shadow works on the element's
   finished rendering and puts the body behind it. Chained 1px shadows
   accumulate, the first nearest the face, so the stack reads exactly like the
   text-shadow list it replaced. Plain white type (.g-title) keeps text-shadow,
   which is correct there. */
body.mode-3d .logo{
  filter:
    drop-shadow(0 1px 0 rgba(0,90,110,.9)) drop-shadow(0 1px 0 rgba(0,70,90,.85))
    drop-shadow(0 1px 0 rgba(0,52,70,.8)) drop-shadow(0 1px 0 rgba(0,36,52,.75))
    drop-shadow(0 1px 0 rgba(0,22,36,.7)) drop-shadow(0 9px 11px rgba(0,0,0,.8));
}
body.mode-3d .g-title{
  text-shadow:0 1px 0 rgba(0,0,0,.9),0 2px 0 rgba(0,0,0,.7),0 3px 0 rgba(0,0,0,.5),
              0 8px 14px rgba(0,0,0,.85);
}
body.mode-3d .market-title,
body.mode-3d .mp-title,
body.mode-3d .fb-title{
  filter:drop-shadow(0 1px 0 rgba(0,0,0,.9)) drop-shadow(0 1px 0 rgba(0,0,0,.7))
         drop-shadow(0 1px 0 rgba(0,0,0,.5)) drop-shadow(0 5px 7px rgba(0,0,0,.85));
}
body.mode-3d #cd-num{
  text-shadow:
    0 2px 0 rgba(120,120,140,.9),0 4px 0 rgba(80,80,100,.85),0 6px 0 rgba(50,50,70,.8),
    0 8px 0 rgba(28,28,44,.75),0 10px 0 rgba(14,14,26,.7),
    0 26px 40px rgba(0,0,0,.9);
}
body.mode-3d #click-count{transform:scale(1.029)}   /* perspective(700px) translateZ(20px), drawn flat (v106) */

/* ══ SCROLLBARS — a chrome rod in a milled channel ══
   Scrollbar pseudo-elements cannot take 3D transforms, so the solidity has to
   come entirely from shading. A cylinder is a specific and recognisable thing:
   dark at both edges, a bright specular band a third of the way in, and a
   softer bounce light near the far edge. Painted across the bar's SHORT axis
   that reads as a rod you could roll under a finger; the track around it is a
   channel cut into the panel, so the rod is sitting in something. */
body.mode-3d::-webkit-scrollbar,body.mode-3d ::-webkit-scrollbar{width:14px;height:14px}
body.mode-3d::-webkit-scrollbar-track,body.mode-3d ::-webkit-scrollbar-track{
  background:linear-gradient(90deg,#05070f,#0b0f1c 45%,#05070f);
  border-radius:10px;
  box-shadow:
    inset 2px 0 4px rgba(0,0,0,.9),inset -2px 0 4px rgba(0,0,0,.9),
    inset 0 1px 0 rgba(0,0,0,.8),inset 0 -1px 0 rgba(255,255,255,.07);
}
body.mode-3d::-webkit-scrollbar-thumb,body.mode-3d ::-webkit-scrollbar-thumb{
  border:3px solid transparent;background-clip:padding-box;border-radius:10px;
  background-image:linear-gradient(90deg,
    #024a52 0%,#0798a6 22%,#7ff2ff 38%,#00f5ff 52%,#0a8390 76%,#01323a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(0,0,0,.6),
    0 0 10px var(--sb-glow);
}
body.mode-3d::-webkit-scrollbar-thumb:hover,body.mode-3d ::-webkit-scrollbar-thumb:hover{
  background-image:linear-gradient(90deg,
    #4a0230 0%,#c00775 22%,#ff9fd8 38%,#ff0090 52%,#a8085e 76%,#3a0125 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),inset 0 -1px 0 rgba(0,0,0,.6),
    0 0 16px rgba(255,0,144,.55);
}
body.mode-3d::-webkit-scrollbar-thumb:active,body.mode-3d ::-webkit-scrollbar-thumb:active{
  background-image:linear-gradient(90deg,
    #2a0640 0%,#6b21a8 22%,#d8b4fe 38%,#a855f7 52%,#5b21a8 76%,#1e0733 100%);
}
/* A horizontal bar is the same rod lying the other way, so the cylinder shading
   has to rotate with it or it reads as a flat painted strip. */
body.mode-3d::-webkit-scrollbar-thumb:horizontal,body.mode-3d ::-webkit-scrollbar-thumb:horizontal{
  background-image:linear-gradient(180deg,
    #024a52 0%,#0798a6 22%,#7ff2ff 38%,#00f5ff 52%,#0a8390 76%,#01323a 100%);
  box-shadow:inset 1px 0 0 rgba(255,255,255,.5),inset -1px 0 0 rgba(0,0,0,.6),
             0 0 10px var(--sb-glow);
}
body.mode-3d::-webkit-scrollbar-track:horizontal,body.mode-3d ::-webkit-scrollbar-track:horizontal{
  background:linear-gradient(180deg,#05070f,#0b0f1c 45%,#05070f);
  box-shadow:inset 0 2px 4px rgba(0,0,0,.9),inset 0 -2px 4px rgba(0,0,0,.9);
}
body.mode-3d .fb-modal::-webkit-scrollbar-thumb{
  background-image:linear-gradient(90deg,
    #0a3a04 0%,#22a80c 22%,#b6ffa1 38%,#39ff14 52%,#1c7a10 76%,#082806 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(0,0,0,.6),
             0 0 10px rgba(57,255,20,.4);
}
body.mode-3d .fb-modal::-webkit-scrollbar-thumb:hover{
  background-image:linear-gradient(90deg,
    #0a3a04 0%,#39ff14 22%,#e6ffdd 38%,#7cffa1 52%,#1c7a10 76%,#082806 100%);
}
body.mode-3d textarea::-webkit-scrollbar,
body.mode-3d select::-webkit-scrollbar,
body.mode-3d .input::-webkit-scrollbar{width:10px;height:10px}
body.mode-3d textarea::-webkit-scrollbar-thumb,
body.mode-3d select::-webkit-scrollbar-thumb,
body.mode-3d .input::-webkit-scrollbar-thumb{border-width:2px}

/* ══ THE BOARD ITSELF ══
   The play surface is a screen set into a bezel: a raised frame with a lit
   inner lip and the panel dropping away behind it. */
body.mode-3d #arcade-canvas,
body.mode-3d #gl-canvas{
  border-radius:10px;
  box-shadow:
    0 2px 0 #10162a,0 4px 0 #10162a,0 6px 0 #070a14,0 8px 0 #070a14,
    0 26px 40px -16px rgba(0,0,0,.95),
    inset 0 1px 0 rgba(255,255,255,.14);
}
/* ⚠️ DO NOT PUT transform-style:preserve-3d BACK ON #board-frame.
   It was here, it is the canvas's direct parent, and it existed ONLY in 3D mode
   — which is the exact shape of "the 3D board is soft and the 2D one is not".
   A preserve-3d ancestor makes the element a 3D rendering context, and Blink
   stops pixel-snapping descendants of one (snapping would break coplanarity),
   so the canvas quad goes through the general-transform path with bilinear
   filtering instead of the axis-aligned fast path. #board-frame is
   width:fit-content centred in .g-area, so a fractional left edge is the normal
   case, not the exception — and half-pixel bilinear resampling of a 1:1 texture
   is exactly the uniform softness that gets reported.
   It bought nothing: every child (#tetris-next-wrap, #arcade-canvas, #gl-canvas,
   #gl-fx, #touch-hint, #mp-overlay, .gl-pop/.gl-label/.gl-stick) was checked at
   runtime and in the stylesheet, and not one uses a 3D transform. The bezel look
   is the box-shadow stack above, which is untouched by this. */

/* ══ REDUCED MOTION ══
   The geometry stays — it is what the interface IS now, and a static solid is
   not motion. Only the travel is removed. */
@media (prefers-reduced-motion:reduce){
  body.mode-3d .btn,
  body.mode-3d .ctrl-btn,
  body.mode-3d .bb-btn,
  body.mode-3d .game-card,
  body.mode-3d .shop-card,
  body.mode-3d .card,
  body.mode-3d .mp-mode,
  body.mode-3d .mode-card,
  body.mode-3d .lb-row,
  body.mode-3d .auth-tab,
  body.mode-3d .market-tab,
  body.mode-3d .lb-tab,
  body.mode-3d .mp-filter,
  body.mode-3d .diff-btn,
  body.mode-3d .fb-node,
  body.mode-3d .mem-card,
  body.mode-3d .hack-node,
  body.mode-3d .path-node,
  body.mode-3d #click-btn{transition:box-shadow .12s linear}
  body.mode-3d .game-card:hover,
  body.mode-3d .shop-card:hover,
  body.mode-3d .mp-mode:hover,
  body.mode-3d .mode-card:hover{
    transform:perspective(var(--eye)) translateZ(10px)
  }
}

/* ══ SMALL SCREENS ══
   Shallower bodies on a phone: the same object, scaled to a surface held 30cm
   from the eye rather than 60. Deep walls at this size eat the tap target. */
@media (max-width:560px){
  body.mode-3d .ctrl-btn{
    box-shadow:
      0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),
      0 4px 0 var(--wallb),0 5px 0 var(--wallb),0 6px 0 var(--wallb),
      0 12px 16px -8px rgba(0,0,0,.9),
      inset 0 1px 0 rgba(255,255,255,.3),inset 0 -2px 0 rgba(0,0,0,.55)
  }
  body.mode-3d .ctrl-btn:active{transform:translateY(5px)}
  body.mode-3d .gc-icon,
  body.mode-3d .shop-emoji{transform:translateZ(16px)}
  body.mode-3d::-webkit-scrollbar,body.mode-3d ::-webkit-scrollbar{width:10px;height:10px}
}

/* ══════════════════════════════════════════════════════════════
   🌀 CHAOS PROTOCOL — the opt-in dial
   Sits directly under the stability selector and borrows its frame, because
   the two are read together: one sets how hard the round is, the other sets
   whether the round is a gamble. Deliberately NOT the same colour — stability
   is a dial you turn, this is a switch you throw.
   ══════════════════════════════════════════════════════════════ */
.chaos-selector{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  /* #hub-screen is a flex COLUMN, so this is a flex item and shrinks by default
     — which squashed a 26px toggle into a 19px strip on any hub tall enough to
     overflow. .diff-selector above it never hit this because it is taller than
     its content either way. */
  flex:none;width:100%;
  max-width:1060px;margin:8px auto 20px;padding:9px 16px;
  border:1px solid var(--border);border-radius:var(--r);
  background:var(--s1);position:relative;overflow:hidden;
  transition:border-color .25s ease,box-shadow .25s ease,background .25s ease;
}
.chaos-selector.armed{
  border-color:rgba(168,85,247,.5);
  background:linear-gradient(100deg,rgba(168,85,247,.12),rgba(255,36,66,.07));
  box-shadow:0 0 24px rgba(168,85,247,.18);
}
/* A slow sweep across the strip while it is armed — the one piece of motion
   in the hub that says "something is running". Held to a 6s cycle so it reads
   as a system light rather than as an animation demanding attention. */
.chaos-selector.armed::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(100deg,transparent 30%,rgba(168,85,247,.18) 50%,transparent 70%);
  background-size:220% 100%;animation:chaosSweep 6s linear infinite;
}
@keyframes chaosSweep{from{background-position:120% 0}to{background-position:-120% 0}}
html.reduced-motion .chaos-selector.armed::after{animation:none;opacity:.35}

.chaos-toggle{
  display:inline-flex;align-items:center;gap:9px;
  padding:5px 13px 5px 6px;border-radius:20px;cursor:pointer;
  border:1px solid var(--border2);background:var(--s2);
  font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.16em;
  color:var(--dim);transition:all .2s ease;position:relative;z-index:1;
}
.chaos-toggle:hover{border-color:var(--purple);color:var(--text)}
.chaos-toggle .chaos-knob{
  width:15px;height:15px;border-radius:50%;
  background:var(--dimmer);transition:all .22s ease;flex:none;
}
.chaos-toggle.on{border-color:var(--purple);color:var(--purple);background:rgba(168,85,247,.15)}
.chaos-toggle.on .chaos-knob{background:var(--purple);box-shadow:0 0 12px var(--purple)}
.chaos-note{font-size:.72rem;color:var(--dim);position:relative;z-index:1;flex:1;min-width:170px}
.chaos-selector.armed .chaos-note{color:rgba(255,255,255,.72)}

/* A boon has to be readable as GOOD from the first glance, or the banner reads
   as bad news and the round gets played defensively for nothing. */
#chaos-banner.chaos-boon{
  border-color:rgba(57,255,20,.55);
  background:linear-gradient(100deg,rgba(57,255,20,.14),rgba(0,245,255,.1));
  box-shadow:0 0 26px rgba(57,255,20,.22);
}
#chaos-banner.chaos-boon .chaos-name{color:var(--lime)}
#chaos-banner.chaos-boon .chaos-icon{filter:drop-shadow(0 0 10px var(--lime))}
/* 🎲 Signal Filter's reroll. Lives on the banner and disappears with it. */
.chaos-reroll{
  flex:none;margin-left:auto;cursor:pointer;
  padding:6px 12px;border-radius:18px;
  border:1px solid var(--border2);background:var(--s2);color:var(--text);
  font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.14em;
  transition:all .18s ease;
}
.chaos-reroll:hover{border-color:var(--gold);color:var(--gold);transform:translateY(-1px)}
#chaos-banner.chip .chaos-reroll{display:none}

/* 📶 SIGNAL DEGRADATION. A corrupted FEED, not a corrupted round — the board
   underneath is pristine and the mission never learns this happened. Two
   overlaid effects: a chromatic smear on the pixels, and a tear that walks
   down the picture. */
.g-area.sig-degraded{
  /* Scoped to the modifier, never blanket: .g-area is an ancestor of every
     mission's play surface, and giving it a permanent containing block would
     silently repoint any absolutely positioned overlay that currently resolves
     further up the tree. It only needs to be positioned while the scanline
     overlay below exists. */
  position:relative;
  filter:blur(.7px) contrast(1.22) saturate(.72);
  animation:sigJitter 2.4s steps(1,end) infinite;
}
.g-area.sig-degraded::after{
  content:'';position:absolute;inset:0;pointer-events:none;z-index:5;
  background:repeating-linear-gradient(0deg,rgba(0,0,0,.32) 0 2px,transparent 2px 4px);
  mix-blend-mode:multiply;
}
@keyframes sigJitter{
  0%,74%{transform:none;filter:blur(.7px) contrast(1.22) saturate(.72)}
  76%{transform:translateX(-3px);filter:blur(1.4px) contrast(1.5) saturate(.4) hue-rotate(8deg)}
  78%{transform:translateX(4px)}
  80%,100%{transform:none}
}
html.reduced-motion .g-area.sig-degraded{animation:none}

/* 📉 PACKET LOSS. A whisper, never an alert: the modifier's whole character is
   that a dropped input is indistinguishable from your own mistake until the
   pattern adds up, and a big red "DROPPED" would make it a fair, readable
   handicap instead. */
/* ✨ v100 · Painted over the board rather than filtered into it — see the
   TIME DILATOR note: a filter on .g-area resamples the GL canvas under it. */
.g-area.pkt-drop #board-frame::before{
  content:'';position:absolute;inset:0;pointer-events:none;z-index:6;border-radius:10px;
  background:rgba(255,255,255,.12);mix-blend-mode:screen;
  animation:pktDrop .16s ease-out forwards
}
@keyframes pktDrop{0%{opacity:1}100%{opacity:0}}
/* The boardless missions flash their own panel, as the dilator does. */
.g-area.pkt-drop > :is(#g-click,#g-memory,#g-math,#g-reaction,#g-hacker,#g-path){animation:pktDropDom .16s ease-out}
@keyframes pktDropDom{0%{filter:brightness(1.16)}100%{filter:none}}
html.reduced-motion .g-area.pkt-drop #board-frame::before{animation:none;opacity:0}
html.reduced-motion .g-area.pkt-drop > :is(#g-click,#g-memory,#g-math,#g-reaction,#g-hacker,#g-path){animation:none}

/* 🌀 AXIS DRIFT rotates #board-frame from script (boardPos() untilts the
   finger to match). The transition only has to smooth the 60ms steps the
   driver writes — anything longer and the aim correction, which reads the
   angle instantly, leads the picture. */
#board-frame{transition:transform .07s linear}

/* ⚙️ OVERCLOCK CHIP — a standing tint for the rest of the round, so the board
   itself says the points are running hot. */
/* ⚠️ NOT `filter:` ON .g-area — that is an ancestor of the GL canvas, and any
   non-none filter pulls the whole subtree into an offscreen filter surface and
   resamples it on the way back. Spending a full render surface over a WebGL
   board to buy a 12% saturation bump is a bad trade. The tint is painted by an
   overlay that sits on top of the board instead, so the canvas is never inside
   a filtered subtree. */
.g-area.overclocked-run{position:relative}
.g-area.overclocked-run::after{
  content:'';position:absolute;inset:0;pointer-events:none;z-index:5;
  background:radial-gradient(ellipse at 50% 55%,rgba(255,145,0,.07),rgba(255,60,0,.10) 70%);
  mix-blend-mode:screen;
}

/* ══════════════════════════════════════════════════════════════
   👻 PACE GHOST
   How far ahead of your own best run you are right now. Lives in the stat
   strip beside the clock and the score, because it is the third number that
   describes the round in progress.
   ══════════════════════════════════════════════════════════════ */
.ghost-pace{
  display:flex;align-items:center;gap:7px;white-space:nowrap;
  background:var(--s2);border:1px solid var(--border);border-radius:20px;
  padding:5px 11px;font-family:var(--fd);font-size:.6rem;font-weight:700;
  /* Only the BORDER and the shadow may animate. Width must not: see below. */
  transition:border-color .25s ease,box-shadow .25s ease;
  /* Equal-width digits, same reason as .stat-pill — and here it matters far
     more, because this readout is repainted on EVERY frame. */
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;
  flex-shrink:0;
}
.ghost-pace .gp-ico{font-size:.8rem;line-height:1;flex-shrink:0}
/* ⚠️ THE FIXED DELTA SLOT — do not remove the min-width.
   .g-stats is a RIGHT-ALIGNED flex row, so anything that changes width in it
   drags everything to its left along with it. paintPace() rewrites this span
   from a requestAnimationFrame tick, and the delta is the one number in the
   header that moves continuously — so an auto-width span here re-flowed the
   whole row up to sixty times a second. Measured on the shipped build: the
   pill swung 124.6px → 162px between "+0" and "-99,999", sliding the clock and
   the score pills 37px left and back while the player was trying to read them.
   That is the "the pace ghost bar keeps moving" report, and on a phone it was
   also what tipped .g-stats into wrapping mid-round.
   The slot is sized for the widest thing the span can ever hold: an arrow, a
   sign and Cyber Arena's five-digit score with its separator — "▼ − 99,999".
   The score is right-aligned inside it so the digits stay put as they grow. */
.ghost-pace .gp-delta{
  letter-spacing:.06em;
  min-width:9ch;text-align:right;flex-shrink:0;
}
/* No reserved slot needed: the target is the personal best being raced, which
   is fixed for the whole round — it is written once by beginPace() and never
   changes again until the next round. */
.ghost-pace .gp-target{font-size:.5rem;color:var(--dimmer);letter-spacing:.1em;flex-shrink:0}
.ghost-pace.ahead{border-color:rgba(57,255,20,.5);box-shadow:0 0 14px rgba(57,255,20,.16)}
.ghost-pace.ahead .gp-delta{color:var(--lime)}
.ghost-pace.behind{border-color:rgba(255,36,66,.45)}
.ghost-pace.behind .gp-delta{color:var(--red)}

/* ══════════════════════════════════════════════════════════════
   🏅 THE LIVE MEDAL LADDER (v142 · § 96 in app.js)
   ══════════════════════════════════════════════════════════════
   A slim strip between the progress bar and the board: four rungs (bronze, silver, gold, diamond) that fill as the
   live score climbs them, and what comes next written beside them. Built by mladBox() and shown only on a round
   that will settle a medal. Every medal carries its own icon, so the rungs read without colour; the words say the same.
   ⚠️ FIXED SIZE, like the pace ghost's delta slot above. The height is set, and the two halves are fractions of the
   strip's WIDTH (grid fr), not of their content, so a score going 99 → 100 → 1,000 moves nothing but its own digits.
   The board below is sized from where this strip ends (fitCanvas measures), so a strip that grew mid-round would have
   resized the board under the player's hands. `contain` keeps whatever happens inside from reaching outside. */
.med-ladder{
  --ml-h:20px;
  position:relative;
  display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);align-items:center;column-gap:12px;
  width:100%;max-width:max(var(--board-w,560px),560px);height:var(--ml-h);flex-shrink:0;
  margin:-6px 0 8px;padding:0 12px;
  background:var(--s2);border:1px solid var(--border);border-radius:20px;
  font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.08em;white-space:nowrap;
  font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;
  contain:layout style;user-select:none;
  transition:border-color .25s ease,box-shadow .25s ease;
}
.med-ladder[hidden]{display:none}
/* The rungs: one segment per line, each running from the line below it (or from zero) up to its own, with the medal
   sitting on its far end. The last medal hangs half past the track, hence the padding. */
.ml-rungs{display:flex;align-items:center;min-width:0;padding-right:8px}
.ml-r{position:relative;flex:1 1 0;min-width:0;height:5px;background:rgba(255,255,255,.1)}
.ml-r:first-child{border-radius:3px 0 0 3px}
.ml-r:last-child{border-radius:0 3px 3px 0}
.ml-r::before{content:"";position:absolute;left:0;top:0;bottom:0;width:calc(var(--f,0) * 100%);background:var(--mc);border-radius:inherit}
.ml-r[data-i="0"]{--mc:var(--bronze)}
.ml-r[data-i="1"]{--mc:var(--silver)}
.ml-r[data-i="2"]{--mc:var(--gold)}
.ml-r[data-i="3"]{--mc:var(--cyan)}
.ml-p{
  position:absolute;right:0;top:50%;transform:translate(50%,-50%);z-index:1;
  font-size:.8rem;line-height:1;filter:grayscale(1);opacity:.42;
}
.ml-p.lit{filter:none;opacity:1}
/* A line above the medal the player holds, once taken, glows gold: it is the one that will change the card. */
.ml-p.lit.nw{filter:drop-shadow(0 0 4px var(--gold))}
.ml-p.pop{animation:mlPop .6s cubic-bezier(.2,1.4,.4,1)}
@keyframes mlPop{
  0%{transform:translate(50%,-50%) scale(.8)}
  35%{transform:translate(50%,-50%) scale(1.75)}
  100%{transform:translate(50%,-50%) scale(1)}
}
/* The words: NEXT is dropped on a phone, the figures come last, and the name (not the "to go") is what gives way if
   the line is ever too long for its half. */
.ml-txt{display:flex;align-items:baseline;gap:.55em;min-width:0;overflow:hidden}
.ml-w{flex:none;color:var(--dimmer)}
.ml-w:empty{display:none}
.ml-nx{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.ml-go{flex:none;color:var(--cyan)}
.ml-go:empty{display:none}
.ml-go::before{content:"·";margin-right:.55em;color:var(--dimmer)}
/* Visually hidden, read out when a line is crossed (role=status). */
.ml-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* NEW LINE: the round stands above the medal this player holds. */
.med-ladder.new{border-color:rgba(255,215,0,.62);box-shadow:0 0 14px -3px rgba(255,215,0,.4)}
.med-ladder.new .ml-nx,.med-ladder.new .ml-go{color:var(--gold)}
/* The pulse is a glow laid over the strip, not a change to it: opacity only, scaled by COMFORT BAY's FLASH share
   (--ml-k), in the crossed medal's colour (--hit). Never added under REDUCE MOTION. */
.med-ladder::after{
  content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;opacity:0;
  box-shadow:0 0 16px 3px var(--hit,var(--cyan)),inset 0 0 10px var(--hit,var(--cyan));
}
.med-ladder.hit::after{animation:mlHit .75s ease-out}
@keyframes mlHit{0%{opacity:0}22%{opacity:var(--ml-k,1)}100%{opacity:0}}
html.reduced-motion .med-ladder,
html.reduced-motion .med-ladder::after,
html.reduced-motion .ml-p{transition:none;animation:none}
html.cs-hc .med-ladder .ml-w,html.cs-hc .med-ladder .ml-go::before{color:#eef3f8}
/* Photo mode hides the HUD by class (the list under 📸 PHOTO MODE); the strip goes with it. */
body.photo-nohud .med-ladder{opacity:0;pointer-events:none;transition:opacity .2s}
@media (max-width:700px){
  .med-ladder{--ml-h:18px;margin:-4px 0 6px;padding:0 9px;column-gap:9px;grid-template-columns:minmax(0,4fr) minmax(0,8fr);font-size:.5rem;letter-spacing:.05em}
  .ml-w{display:none}
  .ml-p{font-size:.7rem}
}
@media (max-height:500px) and (orientation:landscape){
  .med-ladder{--ml-h:16px;margin:-3px 0 4px;grid-template-columns:minmax(0,5fr) minmax(0,7fr);font-size:.48rem}
  .ml-p{font-size:.6rem}
}

/* ══════════════════════════════════════════════════════════════
   🌳 PERK TREE — the tiers
   The tree is drawn as rows because the one thing that matters about twelve
   perks is that half of them cannot be bought yet, and a flat grid hides
   exactly that.
   ══════════════════════════════════════════════════════════════ */
.perk-tint .fb-modal{max-width:980px}
.perk-tree{display:block}
.perk-row{margin-bottom:20px}
.perk-row:last-child{margin-bottom:0}
.perk-row-nodes{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:12px}
.perk-tier-hdr{
  display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  margin-bottom:9px;padding-bottom:6px;border-bottom:1px solid var(--border);
}
.perk-tier-name{font-family:var(--fd);font-size:.62rem;font-weight:900;letter-spacing:.18em;color:var(--lime)}
.perk-tier-cost{
  font-family:var(--fd);font-size:.44rem;letter-spacing:.14em;color:var(--gold);
  border:1px solid rgba(255,215,0,.35);border-radius:12px;padding:2px 8px;
}
.perk-tier-note{font-size:.7rem;color:var(--dim);flex:1;min-width:180px}
/* BARRED is not LOCKED. "You have the points but not the parent" and "you have
   the parent but not the points" are different problems, and a player has to
   be able to tell at a glance which one they are looking at. */
.perk-node.barred{opacity:.42;border-style:dashed}
.perk-node.barred .perk-ico{filter:grayscale(1)}
.perk-needs{
  font-family:var(--fd);font-size:.46rem;letter-spacing:.12em;
  color:var(--red);border-top:1px solid var(--border);padding-top:6px;margin-top:2px;
}
.perk-needs.met{color:var(--lime)}
.perk-kids{font-size:.66rem;color:var(--dimmer);line-height:1.45}
.perk-node .perk-desc{margin-bottom:2px}

/* 💱 Data Broker repoints the headline conversion rate, so the number says so. */
.convert-rate.perked{color:var(--lime);text-shadow:0 0 12px rgba(57,255,20,.4)}

/* ══════════════════════════════════════════════════════════════
   💀 EXIT STATES II — datamosh, core purge, tape rewind
   Same stage as the first three: fixed, above every screen, below the toast.
   All three are pure CSS over a body the script fills with a handful of
   elements, so nothing here needs a canvas or an image.
   ══════════════════════════════════════════════════════════════ */

/* 🟪 DATAMOSH. A picture arriving in the wrong ORDER — each band carries its
   own offset and its own delay, so the eye keeps trying to reassemble a stream
   that never settles. The RGB layer underneath supplies the channel shred. */
#exit-fx.fx-glitch{background:rgba(4,4,14,.82);animation:glFade 1.2s ease forwards}
@keyframes glFade{0%{opacity:0}8%{opacity:1}82%{opacity:1}100%{opacity:0}}
.gl-band{
  position:absolute;left:0;width:100%;
  background:linear-gradient(90deg,rgba(0,245,255,.22),rgba(255,0,144,.3),rgba(168,85,247,.2));
  transform:translateX(var(--gx));
  animation:glShift .34s steps(3,end) infinite;
  mix-blend-mode:screen;
}
@keyframes glShift{
  0%{transform:translateX(var(--gx))}
  40%{transform:translateX(calc(var(--gx) * -0.6)) scaleY(1.06)}
  70%{transform:translateX(calc(var(--gx) * 1.4))}
  100%{transform:translateX(var(--gx))}
}
.gl-rgb{
  position:absolute;inset:0;
  background:
    repeating-linear-gradient(90deg,rgba(255,0,0,.12) 0 2px,transparent 2px 4px),
    repeating-linear-gradient(90deg,transparent 0 2px,rgba(0,255,255,.12) 2px 4px);
  animation:glRgb .16s steps(2,end) infinite;
}
@keyframes glRgb{0%{transform:translateX(-3px)}50%{transform:translateX(4px)}100%{transform:translateX(-2px)}}

/* ⬜ CORE PURGE. A CRT switching off, run backwards and then forwards: the
   picture collapses to a single line, holds just long enough to register as a
   deliberate pause, then blows out. The hold is what makes it land. */
#exit-fx.fx-purge{background:#000}
.pg-line{
  position:absolute;left:0;right:0;top:50%;height:3px;
  background:#fff;box-shadow:0 0 40px 10px rgba(255,255,255,.85);
  transform:scaleX(0);transform-origin:50% 50%;
  animation:pgLine 1.3s cubic-bezier(.7,0,.3,1) forwards;
}
@keyframes pgLine{
  0%{transform:scaleX(0) scaleY(60);opacity:0}
  14%{transform:scaleX(1) scaleY(60);opacity:1}
  34%{transform:scaleX(1) scaleY(1)}
  62%{transform:scaleX(1) scaleY(1)}
  78%{transform:scaleX(1.02) scaleY(1);box-shadow:0 0 90px 26px rgba(255,255,255,1)}
  100%{transform:scaleX(0) scaleY(1);opacity:0}
}
.pg-flash{position:absolute;inset:0;background:#fff;opacity:0;animation:pgFlash 1.3s ease forwards}
@keyframes pgFlash{0%,72%{opacity:0}80%{opacity:.9}100%{opacity:0}}

/* 📼 TAPE REWIND. The tracking bar IS the effect: a band of noise walking UP
   the picture is what a tape looks like running backwards, and it reads as
   that instantly with no frame of video anywhere. */
#exit-fx.fx-rewind{background:rgba(2,3,10,.9)}
.rw-noise{
  position:absolute;inset:0;opacity:.5;
  background:repeating-linear-gradient(0deg,rgba(255,255,255,.07) 0 1px,transparent 1px 3px);
  animation:rwNoise .1s steps(2,end) infinite;
}
@keyframes rwNoise{0%{transform:translateY(0)}100%{transform:translateY(-3px)}}
.rw-track{
  position:absolute;left:0;right:0;height:16%;
  background:linear-gradient(180deg,transparent,rgba(255,255,255,.32),rgba(0,245,255,.22),transparent);
  filter:blur(1px);
  animation:rwTrack .62s linear infinite;
}
@keyframes rwTrack{from{top:104%}to{top:-20%}}
.rw-lbl{
  position:absolute;top:8%;left:50%;transform:translateX(-50%);
  font-family:var(--fd);font-size:.8rem;font-weight:900;letter-spacing:.3em;
  color:#fff;text-shadow:0 0 18px rgba(0,245,255,.9);
  animation:rwBlink .5s steps(1,end) infinite;
}
@keyframes rwBlink{0%,60%{opacity:1}61%,100%{opacity:.25}}

/* Every exit state is a flourish and nothing else, so reduced motion simply
   holds the first frame rather than trying to find a gentler version of a
   deliberate visual assault. playExitFx() already skips them entirely there —
   this is the belt to that braces. */
html.reduced-motion #exit-fx *{animation:none!important}

/* ══════════════════════════════════════════════════════════════
   🎖️ SEASON TRACK
   Ten tiers, drawn as a rail with a fill behind it so the whole week reads as
   one distance rather than as ten separate goals.
   ══════════════════════════════════════════════════════════════ */
.season-tint .fb-modal{max-width:920px;border-color:rgba(255,215,0,.45)}
.season-bar{
  height:8px;border-radius:6px;background:var(--s2);
  border:1px solid var(--border);overflow:hidden;margin-bottom:16px;
}
.season-bar-fill{
  height:100%;border-radius:6px;
  background:linear-gradient(90deg,var(--cyan),var(--gold));
  box-shadow:0 0 18px rgba(255,215,0,.5);transition:width .5s ease;
}
.season-tiers{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:10px}
.season-tier{
  display:flex;flex-direction:column;gap:5px;align-items:center;text-align:center;
  padding:12px 8px;border:1px solid var(--border);border-radius:var(--r);
  background:var(--s1);transition:border-color .2s ease,box-shadow .2s ease;
}
/* Three states, and they have to be distinguishable at a glance: a tier you
   have been paid for, one being paid right now, and one you are working
   toward. Anything less and the track is ten identical boxes. */
.season-tier.paid{border-color:var(--gold);background:rgba(255,215,0,.09);box-shadow:0 0 18px rgba(255,215,0,.14)}
.season-tier.ready{border-color:var(--lime);background:rgba(57,255,20,.08)}
.season-tier.locked{opacity:.6}
.st-num{
  font-family:var(--fd);font-size:.52rem;font-weight:900;letter-spacing:.14em;
  color:var(--dimmer);
}
.season-tier.paid .st-num{color:var(--gold)}
.st-at{font-family:var(--fd);font-size:.68rem;font-weight:900}
.st-reward{font-size:.72rem;color:var(--lime)}
.st-meter{width:100%;height:4px;border-radius:3px;background:var(--s2);overflow:hidden}
.st-meter span{display:block;height:100%;background:var(--cyan);border-radius:3px}
.season-tier.paid .st-meter span{background:var(--gold)}
.st-state{font-family:var(--fd);font-size:.44rem;letter-spacing:.12em;color:var(--dim)}
.season-tier.paid .st-state{color:var(--gold)}

/* ══════════════════════════════════════════════════════════════
   📁 OPERATIVE DOSSIER
   Read-only, so it is allowed to be dense — nothing here is a control the
   player has to find among the numbers.
   ══════════════════════════════════════════════════════════════ */
.dossier-tint .fb-modal{max-width:1000px;border-color:rgba(0,245,255,.4)}
.dos-sec{
  display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.18em;
  color:var(--cyan);margin:22px 0 10px;padding-bottom:6px;
  border-bottom:1px solid var(--border);
}
.dos-sec:first-child{margin-top:4px}
.dos-sec em{font-family:var(--fb);font-size:.74rem;font-style:normal;letter-spacing:0;color:var(--dim)}
.dos-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:10px}
.dos-tile{
  display:flex;flex-direction:column;gap:2px;
  padding:12px;border:1px solid var(--border);border-radius:var(--r);background:var(--s1);
}
.dos-ico{font-size:1.1rem;line-height:1}
.dos-val{font-family:var(--fd);font-size:1rem;font-weight:900;line-height:1.2}
.dos-lbl{font-size:.72rem;color:var(--dim)}
.dos-note{font-size:.66rem;color:var(--dimmer)}

/* The heatmap. Columns are weeks, rows are weekdays — the shape everybody
   already reads as a calendar, so it needs no legend beyond quiet→busy. */
.dos-heat{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}
.dos-heat-col{display:flex;flex-direction:column;gap:3px;flex:none}
.dos-cell{
  width:12px;height:12px;border-radius:3px;display:block;flex:none;
  background:var(--s2);border:1px solid transparent;
}
.dos-cell.l1{background:rgba(0,245,255,.28)}
.dos-cell.l2{background:rgba(0,245,255,.5)}
.dos-cell.l3{background:rgba(0,245,255,.72)}
.dos-cell.l4{background:var(--cyan);box-shadow:0 0 8px rgba(0,245,255,.6)}
/* A day that has not happened yet must not read as a quiet day. */
.dos-cell.fut{opacity:.25}
.dos-cell.today{border-color:var(--gold)}
.dos-heat-key{
  display:flex;align-items:center;gap:4px;margin-top:8px;
  font-size:.66rem;color:var(--dimmer);
}

.dos-missions{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px}
.dos-mission{
  display:flex;flex-direction:column;gap:5px;
  padding:12px;border:1px solid var(--border);border-radius:var(--r);background:var(--s1);
}
.dm-ico{font-size:1.2rem;line-height:1}
.dm-name{font-family:var(--fd);font-size:.58rem;font-weight:900;letter-spacing:.08em}
.dm-stats{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.dm-best{font-family:var(--fd);font-size:.95rem;font-weight:900;color:var(--cyan)}
.dm-cap{font-size:.66rem;color:var(--dim)}
.dm-bar{height:5px;border-radius:4px;background:var(--s2);overflow:hidden}
.dm-bar span{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,var(--cyan),var(--lime))}
.dm-bar-none{background:repeating-linear-gradient(90deg,var(--s2) 0 4px,transparent 4px 8px)}
.dm-foot{display:flex;justify-content:space-between;gap:8px;font-size:.66rem;color:var(--dimmer)}
/* Bars, not a polyline: at twelve points a line is mostly interpolation and a
   bar is a fact. */
.dm-spark{display:flex;align-items:flex-end;gap:2px;height:24px}
.dm-spark span{flex:1;min-width:2px;background:rgba(0,245,255,.45);border-radius:2px 2px 0 0}
.dm-spark span:last-child{background:var(--cyan)}
.dos-missing{display:flex;flex-wrap:wrap;gap:8px}
.dos-chip{
  cursor:pointer;padding:6px 11px;border-radius:16px;
  border:1px dashed var(--border2);background:var(--s1);
  font-size:.72rem;color:var(--dim);transition:all .18s ease;
}
.dos-chip:hover{border-style:solid;border-color:var(--cyan);color:var(--text);transform:translateY(-1px)}
.dos-empty{font-size:.76rem;color:var(--dim);padding:14px;text-align:center}

/* ══════════════════════════════════════════════════════════════
   🔒 CLEARANCE LEVELS
   A locked card stays legible — you are meant to want it. It is dimmed and
   un-clickable, not hidden or blanked.
   ══════════════════════════════════════════════════════════════ */
.mission-clearance{
  font-family:var(--fb);font-size:.72rem;font-style:normal;letter-spacing:0;
  color:var(--dim);margin-left:8px;
}
.mission-clearance.all-clear{color:var(--lime)}
.game-card.locked{
  opacity:.42;cursor:not-allowed;filter:grayscale(.7);
  border-style:dashed;
}
.game-card.locked:hover{transform:none;box-shadow:none}
.gc-lock{
  position:absolute;inset:auto 10px 10px 10px;
  display:flex;align-items:center;gap:7px;justify-content:center;
  padding:6px 8px;border-radius:10px;
  background:rgba(4,4,14,.82);border:1px solid var(--border2);
  backdrop-filter:blur(2px);
}
.gcl-ico{font-size:.85rem;line-height:1}
.gcl-txt{
  display:flex;flex-direction:column;line-height:1.25;
  font-family:var(--fd);font-size:.46rem;font-weight:900;letter-spacing:.14em;
  color:var(--text);
}
.gcl-txt em{font-family:var(--fb);font-size:.62rem;font-style:normal;letter-spacing:0;color:var(--dim)}
/* The flash a dossier chip leaves on the card it scrolled you to. */
.game-card.gc-flash{animation:gcFlash 1.6s ease}
@keyframes gcFlash{
  0%,100%{box-shadow:none}
  15%,55%{box-shadow:0 0 0 2px var(--cyan),0 0 28px rgba(0,245,255,.45)}
}
html.reduced-motion .game-card.gc-flash{animation:none;box-shadow:0 0 0 2px var(--cyan)}

/* ══════════════════════════════════════════════════════════════
   ⚔️ RIVAL CHALLENGES
   Lives in the hub's right column with the two leaderboards, because it is the
   same kind of thing: other people's numbers.
   ══════════════════════════════════════════════════════════════ */
.chal-panel{display:flex;flex-direction:column;gap:8px}
.chal-mine{margin-bottom:4px}
.chal-mine-lbl{
  font-family:var(--fd);font-size:.44rem;font-weight:900;letter-spacing:.16em;
  color:var(--gold);margin-bottom:6px;
}
.chal-row{
  display:flex;align-items:center;gap:10px;
  padding:9px 11px;border:1px solid var(--border);border-radius:var(--r);
  background:var(--s1);transition:border-color .2s ease;
}
.chal-row:hover{border-color:var(--border2)}
.chal-row.own{border-color:rgba(255,215,0,.45);background:rgba(255,215,0,.07)}
.chal-row.locked{opacity:.5}
.chal-ico{font-size:1.15rem;line-height:1;flex:none}
.chal-txt{min-width:0;flex:1}
.chal-name{font-family:var(--fd);font-size:.52rem;font-weight:900;letter-spacing:.1em}
.chal-meta{font-size:.7rem;color:var(--dim);margin-top:2px}
.chal-meta strong{color:var(--cyan)}
.chal-meta em{color:var(--lime);font-style:normal}
.chal-locked{
  flex:none;font-family:var(--fd);font-size:.44rem;letter-spacing:.12em;color:var(--dim);
}
.chal-take{flex:none}
/* The pace HUD says whose curve it is racing, and a rival is not your ghost. */
.ghost-pace.vs-rival{border-color:rgba(255,215,0,.55);box-shadow:0 0 14px rgba(255,215,0,.18)}
.ghost-pace.vs-rival .gp-target{color:var(--gold)}

/* ══════════════════════════════════════════════════════════════
   🩸 BOSS RUSH CHAIN INTEGRITY
   A pill in the stat strip, because it is a number that describes the round in
   progress — the same category as the clock and the score.
   ══════════════════════════════════════════════════════════════ */
.br-int-pill{display:flex;align-items:center;gap:6px}
.br-int-pill em{font-style:normal;color:var(--lime)}
.br-int-pill.mid em{color:var(--gold)}
.br-int-pill.low em{color:var(--red)}
.br-int-bar{
  display:block;width:38px;height:4px;border-radius:3px;
  background:var(--s2);overflow:hidden;
}
.br-int-bar span{display:block;height:100%;border-radius:3px;background:var(--lime);transition:width .4s ease}
.br-int-pill.mid .br-int-bar span{background:var(--gold)}
.br-int-pill.low .br-int-bar span{background:var(--red)}
.br-int-pill.low{border-color:rgba(255,36,66,.6);box-shadow:0 0 14px rgba(255,36,66,.25)}


/* ══════════════════════════════════════════════════════════════
   🧊 § 10 IN THE SOLID INTERFACE
   ══════════════════════════════════════════════════════════════
   ⚠️ EVERY SELECTOR HERE IS SCOPED TO `body.mode-3d`, like everything else in
   this section. An unscoped rule added down here is a control that stays
   extruded in 2D CLASSIC — the exact bug the scoping exists to prevent.

   The new controls reuse the shells that were already modelled (.btn, .lb-row,
   .mp-banner, .fb-modal), so most of them are already solid. These are the
   three that are genuinely new geometry: the loadout rail (a ground plane, like
   the other bars), its chips (small keycaps), and the photo-mode bar (a raised
   console floating over the board). The HOW face has to keep preserve-3d or the
   flip collapses to a cross-fade. */
body.mode-3d .loadout-rail,
body.mode-3d #photo-bar{
  background-image:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,0) 70%);
  box-shadow:
    0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
    0 14px 22px -12px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.11),inset 0 -1px 0 rgba(0,0,0,.5);
}
body.mode-3d .loadout-rail,
body.mode-3d .en-card,
body.mode-3d .lo-card{ transform-style:preserve-3d; }

/* Small keycaps: a short wall and a lit top lip, the same vocabulary .btn uses,
   at chip scale. */
body.mode-3d .lo-chip,
body.mode-3d .gc-howbtn{
  box-shadow:
    0 1px 0 #131a2e,0 2px 0 #0a0e1c,
    0 6px 10px -6px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(0,0,0,.45);
  transition:transform .12s ease,box-shadow .12s ease,border-color .15s,color .15s;
}
body.mode-3d .lo-chip:hover{ transform:translateY(-1px); }
body.mode-3d .lo-chip:active{
  transform:translateY(2px);
  box-shadow:0 0 0 #131a2e,inset 0 2px 5px rgba(0,0,0,.6);
}

/* The badge needs its OWN transforms in this mode, split out from .lo-chip
   above, because every one of them has to keep the translateZ. The card is
   preserve-3d and its contents are lifted off the face — the icon by 26px, the
   text by 10px — so a badge at Z 0 is behind all of them, both visually and for
   hit-testing. 34px puts it in front of the tallest of them. */
body.mode-3d .gc-howbtn{ transform:translateZ(34px); }
body.mode-3d .gc-howbtn:hover{ transform:translateZ(34px) translateY(-1px); }
body.mode-3d .gc-howbtn:active{
  transform:translateZ(34px) translateY(2px);
  box-shadow:0 0 0 #131a2e,inset 0 2px 5px rgba(0,0,0,.6);
}

/* The briefing modal is a slab standing off the backdrop, like every other
   overlay in this mode — it replaced a flip FACE on the card, which is why the
   preserve-3d above no longer names it. */
body.mode-3d .brief-modal{
  background-image:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,0) 60%);
  box-shadow:0 0 70px rgba(0,245,255,.13),
             inset 0 1px 0 rgba(255,255,255,.10),inset 0 -2px 6px rgba(0,0,0,.6),
             0 22px 44px -18px rgba(0,0,0,.92);
}
body.mode-3d .brf-ctrl{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),inset 0 -1px 0 rgba(0,0,0,.4);
}

/* The endless cards and loadout cards are objects on a shelf, like .shop-card. */
body.mode-3d .en-card,
body.mode-3d .lo-card{
  background-image:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,0) 62%);
  box-shadow:
    0 1px 0 #10162a,0 2px 0 #070a14,0 3px 0 #070a14,
    0 16px 26px -14px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.09);
}
body.mode-3d .en-card:hover:not(.locked){ transform:translateY(-3px); }

/* The coach strip is a lit pill standing off the board, not a label on it. */
body.mode-3d .ob-coach{
  box-shadow:0 6px 24px rgba(0,245,255,.35),
             0 2px 0 rgba(0,0,0,.5),
             inset 0 1px 0 rgba(255,255,255,.4);
}

/* ══════════════════════════════════════════════════════════════
   ⚙️ SETTINGS — the gear on the hub bar, and the panel it opens
   ══════════════════════════════════════════════════════════════
   Purple, because the bar's other doors already own cyan (audio) and gold
   (points), and purple is the other half of the arcade's primary gradient —
   so the gear reads as part of the cabinet, not as a browser widget. */
.btn-settings{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  padding:7px 11px;line-height:1;
  color:var(--purple);border-color:rgba(168,85,247,.42)
}
.btn-settings:hover{background:rgba(168,85,247,.14);border-color:var(--purple);box-shadow:0 0 18px rgba(168,85,247,.28)}
.btn-settings:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
.gear-ico{
  display:block;width:14px;height:14px;fill:currentColor;
  filter:drop-shadow(0 0 3px rgba(168,85,247,.8));
  transition:transform .6s cubic-bezier(.2,.9,.3,1)
}
/* Eight teeth look identical every 45°, so a quarter turn lands on the same
   silhouette: the gear spins and settles, with no pose to snap back from when
   the pointer leaves. */
.btn-settings:hover .gear-ico,
.btn-settings:focus-visible .gear-ico{transform:rotate(90deg)}
/* The nudge the pulsing Save Account button used to give from the bar itself:
   a guest's whole profile is one Exit away from deletion. */
.gear-dot{
  display:none;position:absolute;top:-4px;right:-4px;width:10px;height:10px;border-radius:50%;
  background:var(--lime);box-shadow:0 0 0 2px var(--bg),0 0 10px var(--lime);
  pointer-events:none;animation:gearPing 2.4s ease-in-out infinite
}
.btn-settings.needs-save .gear-dot{display:block}
@keyframes gearPing{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.7);opacity:.6}}
html.reduced-motion .gear-dot{animation:none}
html.reduced-motion .gear-ico{transition:none}
@media (prefers-reduced-motion:reduce){
  .gear-dot{animation:none}
  .gear-ico{transition:none}
}
@media (pointer:coarse){ .btn-settings{min-width:44px} }

/* Under the login screen's picker: the choice is not final. */
.mode-hint{margin:-6px 0 16px;font-size:.72rem;line-height:1.4;color:var(--dimmer);text-align:center}

/* ── The panel: the .fb-overlay shell, tinted purple like the gear ── */
.set-tint .fb-modal{max-width:560px;border-color:rgba(168,85,247,.45);box-shadow:0 0 70px rgba(168,85,247,.14),inset 0 0 0 1px rgba(255,255,255,.03)}
.set-tint .fb-modal::before{background:linear-gradient(90deg,transparent,var(--purple),transparent);box-shadow:0 0 12px var(--purple)}
.set-tint .fb-title{background:linear-gradient(90deg,var(--purple),var(--cyan));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.set-tint .fb-head{margin-bottom:20px}

.set-sec{padding:14px 16px 16px;border:1px solid var(--border);border-radius:var(--r);background:var(--s1)}
.set-sec + .set-sec{margin-top:12px}
.set-sec-h{
  display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;
  font-family:var(--fd);font-size:.58rem;font-weight:700;letter-spacing:.22em;color:var(--cyan)
}
.set-state{flex:none;font-style:normal;font-size:.46rem;letter-spacing:.14em;padding:3px 9px;border-radius:20px;border:1px solid currentColor;color:var(--dim)}
.set-state:empty{display:none}
.set-state.ok{color:var(--lime);background:rgba(57,255,20,.08)}
.set-state.warn{color:var(--gold);background:rgba(255,215,0,.08)}
.set-state.local{color:var(--orange);background:rgba(255,102,0,.08)}
.set-note{font-size:.84rem;line-height:1.45;color:var(--dim);margin-bottom:12px}
.set-note b{color:var(--text);font-weight:700}
.set-picker{margin:0}
/* The INSTRUCTIONS half of each door: what the button will ask of the player,
   read before pressing it rather than discovered after. */
.set-steps{list-style:none;counter-reset:set-step;display:grid;gap:7px;margin:0 0 14px}
.set-steps:empty{display:none}
.set-steps li{counter-increment:set-step;display:flex;align-items:flex-start;gap:9px;font-size:.8rem;line-height:1.35;color:var(--text)}
.set-steps li::before{
  content:counter(set-step);flex:none;display:flex;align-items:center;justify-content:center;
  width:17px;height:17px;border-radius:50%;
  font-family:var(--fd);font-size:.48rem;font-weight:700;
  color:var(--cyan);border:1px solid rgba(0,245,255,.45);background:rgba(0,245,255,.08)
}
.set-sec .btn-full{padding-left:16px;padding-right:16px}
/* Two switches that belong together read as a pair rather than a stack. The
   .btn default is padding:11px 26px + nowrap, which overflows a half-width
   column once paintInputToggles() appends ON/OFF — so the row trims the side
   padding and the tracking instead of letting the label clip. */
.set-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.set-row .btn{width:100%;padding:11px 10px;font-size:.62rem;letter-spacing:.05em}
/* A LOCAL profile always runs in offline mode — that is what local means — so
   the offline rule greys its Save button permanently, including the moment it
   reads "Save Progress Online" and would work. The steps above tell the player
   to press it, so when it can actually claim, it must look like it can.
   refreshClaimUi() sets the class off the same check that picks the label. */
html.is-offline #btn-save-acct.claim-ready{opacity:1;filter:none;cursor:pointer}
@media (max-width:520px){
  .set-sec{padding:12px 12px 14px}
  .set-note{font-size:.8rem}
}

/* ⚠️ The solids below are scoped to body.mode-3d, like everything above. */
body.mode-3d .btn-settings{--wall:#5b21a8;--wallb:#2a0e52}
/* The walls every modal slab gets in this mode. The tint's glow above is more
   specific than that shared rule, so without restating them here this one
   panel would be the only flat modal in the 3D interface. */
body.mode-3d .set-tint .fb-modal{
  box-shadow:
    0 2px 0 #131a2e,0 4px 0 #131a2e,0 6px 0 #080c18,0 8px 0 #080c18,0 10px 0 #05070f,
    0 44px 70px -22px rgba(0,0,0,.95),0 0 60px -10px rgba(168,85,247,.32),
    inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.6);
}
body.mode-3d .set-sec{
  background-image:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,0) 70%);
  box-shadow:
    0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
    0 14px 22px -12px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.11),inset 0 -1px 0 rgba(0,0,0,.5);
}
body.mode-3d .set-sec + .set-sec{margin-top:16px}
body.mode-3d .set-state{
  background-image:var(--spec);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05),0 2px 0 #0b0f1c,0 3px 0 #070a14,
    0 6px 8px -4px rgba(0,0,0,.75),
    inset 0 1px 0 rgba(255,255,255,.18),inset 0 -1px 0 rgba(0,0,0,.45);
}
body.mode-3d .set-steps li::before{
  box-shadow:0 1px 0 #0a4a52,0 2px 0 #05272c,inset 0 1px 0 rgba(255,255,255,.22);
}
/* The Save button's attention pulse animates box-shadow, and an animation beats
   every ordinary rule — so in this mode it replaced the button's whole wall
   stack, and the one control the panel most wants pressed was the one flat
   button in it. The pulse is re-keyed WITH the walls, and handed back to the
   keycap rules on hover and press so the lift and the travel still happen. */
body.mode-3d .btn-save-acct{animation:saveGlow3d 2.4s ease-in-out infinite}
body.mode-3d .btn-save-acct:hover,
body.mode-3d .btn-save-acct:active,
body.mode-3d .btn-save-acct:disabled{animation:none}
@keyframes saveGlow3d{
  0%,100%{box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),
    0 4px 0 var(--wallb),0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),
    0 12px 18px -8px rgba(0,0,0,.8),0 0 0 rgba(57,255,20,0),
    inset 0 1px 0 var(--lip-hi),inset 0 -1px 0 var(--lip-lo)}
  50%{box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),
    0 4px 0 var(--wallb),0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),
    0 12px 18px -8px rgba(0,0,0,.8),0 0 18px rgba(57,255,20,.32),
    inset 0 1px 0 var(--lip-hi),inset 0 -1px 0 var(--lip-lo)}
}

/* ══════════════════════════════════════════════════════════════
   § v40 — 🔵 SAFE MODE · 🏅 MEDALS & GRID RECORDS · ⭐ FAVOURITES & FILTERS
   ══════════════════════════════════════════════════════════════ */

/* ── 🔵 SAFE MODE — the one tier below Stable, in a cool blue ── */
.diff-btns{flex-wrap:wrap;justify-content:center}
.diff-btn.diff-safe.active{background:rgba(77,163,255,.12);color:#4da3ff;box-shadow:0 0 10px #4da3ff}
.diff-btn.diff-safe.active:hover{box-shadow:0 0 15px #4da3ff}
.diff-selector.tier-safe{border-color:rgba(77,163,255,.45)}
.diff-selector.tier-safe::before{background:#4da3ff}
.res-bonus.res-bonus-safe{border-color:#4da3ff;color:#4da3ff;background:rgba(77,163,255,.08);box-shadow:0 0 10px rgba(77,163,255,.35)}
#toast.toast-safe{border-color:#4da3ff;color:#4da3ff;box-shadow:0 10px 30px rgba(77,163,255,.25)}
#toast.toast-medal{border-color:var(--gold);color:var(--gold);box-shadow:0 10px 30px rgba(255,215,0,.25)}
body.mode-3d .diff-btn.diff-safe.active{--wallb:#0a2a4a}
/* Four tiers on a phone: a 2×2 block, not a row that runs off the edge. */
@media (max-width:520px){
  .diff-btns{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:6px}
  .diff-btn{padding:10px 8px}
}

/* ── 🏅 THE CARD STRIP — medal, bar to the next one, the record holder ──
   Decorative: the card handles every click, so it never takes the pointer. */
.gc-medal{
  --mcol:#56607a;
  margin-top:10px;display:flex;flex-direction:column;gap:5px;text-align:left
}
.game-card > .gc-medal{pointer-events:none}
.gc-medal.m-bronze{--mcol:#d08a45}
.gc-medal.m-silver{--mcol:#c9d2e3}
.gc-medal.m-gold{--mcol:#ffd700}
.gc-medal.m-diamond{--mcol:#7df9ff}
.gm-row{display:flex;align-items:center;gap:7px}
.gm-ico{font-size:1rem;line-height:1;width:1.35em;text-align:center;flex-shrink:0}
.gc-medal.m-none .gm-ico{color:var(--dimmer);font-size:.95rem}
.gm-bar{flex:1;height:5px;min-width:0;border-radius:3px;background:rgba(255,255,255,.07);overflow:hidden}
.gm-bar i{display:block;height:100%;border-radius:3px;background:var(--mcol);box-shadow:0 0 8px var(--mcol)}
.gc-medal.m-none .gm-bar i{box-shadow:none}
.gm-next{font-family:var(--fd);font-size:.46rem;font-weight:700;letter-spacing:.06em;color:var(--dim);white-space:nowrap}
.gm-rec{
  font-family:var(--fb);font-size:.66rem;font-weight:600;color:var(--dim);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
/* The lock tag sits across the foot of a locked card; the strip would only
   peek out from under it. */
.game-card.locked .gc-medal{display:none}
body.mode-3d .gc-medal{transform:translateZ(10px)}
@media (max-width:700px){
  .gm-next{font-size:.42rem}
  .gm-rec{font-size:.6rem}
}

/* ── 🏅 THE RESULTS PANEL ── */
#res-medal{
  --mcol:#56607a;
  max-width:440px;margin:-8px auto 20px;padding:12px 14px;border-radius:12px;
  background:var(--s2);border:1px solid var(--mcol);text-align:left
}
#res-medal.m-bronze{--mcol:#d08a45}
#res-medal.m-silver{--mcol:#c9d2e3}
#res-medal.m-gold{--mcol:#ffd700}
#res-medal.m-diamond{--mcol:#7df9ff}
#res-medal.m-safe{--mcol:#4da3ff}
.rm-top{display:flex;align-items:center;gap:12px}
.rm-ico{display:inline-block;font-size:1.9rem;line-height:1}
.rm-txt{
  display:flex;flex-direction:column;
  font-family:var(--fd);font-size:.7rem;font-weight:900;letter-spacing:.12em;color:var(--mcol)
}
.rm-txt b{color:#fff;margin-right:6px}
.rm-txt em{font-family:var(--fb);font-style:normal;font-weight:600;font-size:.76rem;letter-spacing:0;color:var(--dim);margin-top:3px}
.rm-bar{height:6px;border-radius:3px;background:rgba(255,255,255,.07);overflow:hidden;margin:11px 0 6px}
.rm-bar i{display:block;height:100%;border-radius:3px;background:var(--mcol);box-shadow:0 0 10px var(--mcol)}
.rm-next{font-size:.78rem;color:var(--dim)}
.rm-rec{
  margin-top:9px;padding-top:9px;border-top:1px solid var(--border);
  font-family:var(--fd);font-size:.6rem;font-weight:900;letter-spacing:.12em;color:var(--gold)
}
#res-medal.is-new{animation:medalIn .8s cubic-bezier(.2,1.4,.4,1) both;box-shadow:0 0 30px -6px var(--mcol)}
#res-medal.is-new .rm-ico{animation:medalSpin 1.3s ease .15s both}
@keyframes medalIn{0%{transform:scale(.86);opacity:0}100%{transform:none;opacity:1}}
@keyframes medalSpin{
  0%{transform:perspective(300px) rotateY(0) scale(.5)}
  65%{transform:perspective(300px) rotateY(540deg) scale(1.25)}
  100%{transform:perspective(300px) rotateY(720deg) scale(1)}
}
html.reduced-motion #res-medal.is-new,
html.reduced-motion #res-medal.is-new .rm-ico{animation:none}

/* ═════════════════════════════════════════════════
   💰 THE PROGRESS BLOCK on a solo results card (v142 · § 94 in app.js)
   ═════════════════════════════════════════════════
   It lives INSIDE #res-bd, under the breakdown's rows, so the card's grid (headline beside breakdown on a wide
   screen) never learns it is there. A <details>: open on a desktop, folded on a phone to one tappable line that
   already says the XP, the level and the contracts. The bars light the stretch the round added (.rpg-gain) over
   where they stood (.rpg-base), and every figure is also written out, so colour carries nothing alone. The
   blanket reduced-motion rule flattens the mastery pip's swell like any other animation. */
.res-prog{margin-top:4px}
.rpg-sum{display:flex;align-items:center;gap:10px;min-height:36px;padding:2px 0;cursor:pointer;list-style:none;user-select:none;border-radius:8px}
.rpg-sum::-webkit-details-marker{display:none}
.rpg-sum::marker{content:''}
.rpg-sum:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.rpg-h{flex:none;font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.2em;color:var(--lime)}
/* The one-line version: only while folded. */
.rpg-one{display:none;flex:1;min-width:0;font-size:.78rem;font-weight:600;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.res-prog:not([open]) .rpg-one{display:block}
.rpg-chev{flex:none;width:7px;height:7px;margin:0 3px 3px auto;border-right:2px solid var(--dim);border-bottom:2px solid var(--dim);transform:rotate(45deg);transition:transform .15s}
.res-prog[open] .rpg-chev{transform:rotate(-135deg);margin-bottom:-3px}
.rpg-row{display:flex;align-items:flex-start;gap:10px;padding:8px 0;border-top:1px solid var(--border)}
.rpg-ico{flex:none;width:1.6rem;text-align:center;font-size:1.1rem;line-height:1.3}
.rpg-ico.ring{width:44px}
.rpg-ico .mst-big{width:44px;height:44px}
.rpg-ico .mst-num{font-size:.7rem}
.rpg-ico .mst-num em{font-size:.38rem;margin-top:3px}
.rpg-main{flex:1;min-width:0}
.rpg-top{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px}
.rpg-k{font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.16em;color:var(--dimmer)}
.rpg-big{font-family:var(--fd);font-size:.84rem;font-weight:900;color:var(--text);font-variant-numeric:tabular-nums}
.rpg-val{margin-left:auto;display:inline-flex;align-items:center;font-size:.78rem;font-weight:700;color:var(--cyan);font-variant-numeric:tabular-nums}
.rpg-bar{position:relative;height:6px;margin:6px 0 5px;border-radius:3px;background:rgba(255,255,255,.07);overflow:hidden}
.rpg-bar i{position:absolute;top:0;bottom:0;display:block;border-radius:3px}
.rpg-base{left:0;background:var(--cyan);opacity:.5}
.rpg-gain{background:var(--lime);box-shadow:0 0 8px var(--lime)}
.rpg-row[data-r="se"] .rpg-base{background:var(--gold)}
.rpg-row[data-r="se"] .rpg-val{color:var(--gold)}
.rpg-sub{margin-top:2px;font-size:.78rem;line-height:1.4;color:var(--dim);overflow-wrap:anywhere}
.rpg-sub b{color:var(--lime);font-weight:700}
.rpg-sub em{font-style:normal;color:var(--dimmer)}
.rpg-pips{display:inline-flex;gap:5px}
.rpg-pips i{display:block;width:10px;height:10px;border-radius:50%;border:2px solid var(--dim)}
.rpg-pips i.on{background:var(--lime);border-color:var(--lime)}
.rpg-row[data-r="sk"] .cryo-pips{margin-left:0}
.rpg-row[data-r="bk"] .rpg-big{color:var(--gold)}
@media (max-width:560px){
  .rpg-sub{font-size:.74rem}
  .rpg-sum{min-height:44px}
}
html.cs-hc .res-prog .rpg-sub,html.cs-hc .res-prog .rpg-one,html.cs-hc .res-prog .rpg-k{color:#eef3f8!important}

/* ── ⭐ THE FAVOURITE STAR — the ⓘ badge's twin, in the other top corner ── */
.gc-fav{
  position:absolute;top:8px;left:8px;z-index:3;
  width:30px;height:30px;line-height:28px;padding:0;text-align:center;
  border-radius:50%;cursor:pointer;font-size:1rem;
  background:rgba(255,255,255,.06);border:1px solid var(--border);color:var(--dim);
  transition:color .15s,border-color .15s,background .15s
}
.gc-fav::after{content:'';position:absolute;inset:-9px;border-radius:50%}
.gc-fav:hover{color:var(--gold);border-color:var(--gold);background:rgba(255,215,0,.1)}
.gc-fav.on{color:var(--gold);border-color:rgba(255,215,0,.6);background:rgba(255,215,0,.12);text-shadow:0 0 10px rgba(255,215,0,.6)}
@media (pointer: coarse){
  .gc-fav{width:40px;height:40px;line-height:38px;font-size:1.15rem;top:6px;left:6px}
  .gc-fav::after{inset:-6px}
}
.game-card.is-fav{border-color:rgba(255,215,0,.32)}
/* Same reason as the ⓘ: the card is preserve-3d and its contents are lifted
   off the face, so a control at Z 0 is behind them for hit-testing too. */
body.mode-3d .gc-fav{
  transform:translateZ(34px);
  box-shadow:
    0 1px 0 #131a2e,0 2px 0 #0a0e1c,
    0 6px 10px -6px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(0,0,0,.45);
  transition:transform .12s ease,box-shadow .12s ease,border-color .15s,color .15s;
}
body.mode-3d .gc-fav:hover{transform:translateZ(34px) translateY(-1px)}
body.mode-3d .gc-fav:active{
  transform:translateZ(34px) translateY(2px);
  box-shadow:0 0 0 #131a2e,inset 0 2px 5px rgba(0,0,0,.6);
}

/* ── ⭐ GRID TOOLS — the filter chips reuse the Network Arena's .mp-filter ── */
.grid-tools{margin:-2px 0 14px}
.grid-tools .gt-chips{margin-bottom:0;align-items:center}
.grid-tools .gt-sort{margin-left:auto}
.gt-empty{
  margin-top:12px;padding:18px;border:1px dashed var(--border2);border-radius:12px;
  text-align:center;font-size:.86rem;color:var(--dim)
}
.gt-empty:empty{display:none}
.game-card.gf-hide{display:none}
@media (max-width:700px){
  .grid-tools .gt-sort{margin-left:0}
}

/* ══════════════════════════════════════════════════════════════
   § v41 — ⏸️ PAUSE MENU
   The backdrop is near-opaque on purpose: a paused Signal Trace or Defrag
   board that stayed readable would be free thinking time against a clock.
   ══════════════════════════════════════════════════════════════ */
.pause-tint{background:rgba(3,3,12,.965);backdrop-filter:blur(18px);z-index:2100}
.pause-tint .fb-modal{max-width:420px;border-color:rgba(0,245,255,.45);
  box-shadow:0 0 70px rgba(0,245,255,.14),inset 0 0 0 1px rgba(255,255,255,.03)}
.pause-tint .fb-modal::before{background:linear-gradient(90deg,transparent,var(--cyan),transparent);box-shadow:0 0 12px var(--cyan)}
.pause-tint .fb-title{background:linear-gradient(90deg,var(--cyan),var(--pink));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.pause-stats{
  background:var(--s2);border:1px solid var(--border);border-radius:12px;
  padding:12px 14px;margin:4px 0 18px;text-align:center
}
.ps-name{font-family:var(--fd);font-size:.66rem;font-weight:900;letter-spacing:.12em;color:#fff;margin-bottom:8px}
.ps-row{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 16px;font-size:.84rem;color:var(--dim)}
.ps-row b{color:var(--cyan);font-family:var(--fd);font-size:.8rem}
.pause-btns{display:flex;flex-direction:column;gap:10px}
.pause-hint{margin-top:14px;text-align:center;font-size:.74rem;color:var(--dimmer)}
/* The header button: a touch wider than the other glyph buttons, because it
   is the one a player reaches for in a hurry. */
.btn-pause{min-width:40px}
@media (pointer:coarse){ .btn-pause{min-width:48px} }

/* ── ⏸️ THE CONTROL ROOM (§ 98, ✨ v142) — paintPauseMenu() / pauseExtras() in app.js ──
   HOW TO PLAY and COMFORT share a row; the drawer folds out under it (its sliders are Comfort Bay's, styled by .cbay-sl in § 62). The medal
   line and the pace line sit on the stats card under the clock and score. A briefing opened from here stands above the menu's tint (2100). */
.ps-lines{margin-top:9px;padding-top:9px;border-top:1px solid var(--border);
  font-family:var(--fd);font-size:.52rem;line-height:1.8;letter-spacing:.06em;color:var(--dim)}
.ps-lines span.on{color:var(--lime)}
.ps-lines b{color:var(--cyan)}
.ps-lines em{font-style:normal;color:var(--dimmer)}
.pause-more{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pause-more .btn{padding-left:8px;padding-right:8px;white-space:normal;line-height:1.25}
.pause-more .btn[aria-expanded="true"]{border-color:var(--cyan);color:var(--cyan)}
.pause-cbay{padding:14px 14px 4px;background:var(--s2);border:1px solid var(--border);border-radius:12px}
.pause-cbay[hidden]{display:none}
.pause-cbay .cbay-grid{margin:0 0 10px}
@media (max-width:480px){ .pause-cbay .cbay-sl{grid-template-columns:8.6em 1fr 3em} }   /* the phone rule for Settings is narrower than "🔘 INTERFACE" */
body.round-paused #brief-overlay{z-index:2150}
html.cs-hc .ps-lines{color:#eef3f8}

/* ── 🔊 The speaker popover's SHAKE and FLASH (§ 98, ✨ v142): the same rows as Settings, narrower ── */
#audio-pop .ap-cbay{display:grid;gap:8px;margin-top:6px}
#audio-pop .cbay-sl{grid-template-columns:5.8em minmax(64px,1fr) 2.9em;gap:8px;font-size:9px;letter-spacing:.08em}
#audio-pop .cbay-sl em{font-size:10px}

/* ══════════════════════════════════════════════════════════════
   § v42 — 🎃 SEASONAL EVENTS · NEON HAUNT
   Everything here is scoped to body.ev-haunt (set by applyEventTheme() from
   the date), so outside October none of it exists. The player's own colour
   cosmetic owns --cyan, so the event accents with its own two colours rather
   than repainting that variable.
   ══════════════════════════════════════════════════════════════ */
body.ev-haunt{--ev-a:#ff7a1a;--ev-b:#a24dff}

/* A pumpkin-and-violet night behind every screen: two fixed glows, painted
   once, no animation, never in front of anything. */
body.ev-haunt::before{
  content:'';position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(120% 55% at 50% 108%,rgba(255,106,0,.16),transparent 60%),
    radial-gradient(90% 50% at 50% -8%,rgba(150,60,255,.14),transparent 62%);
}
body.ev-haunt .hub-bar{box-shadow:0 0 34px -8px rgba(255,122,26,.45),inset 0 -1px 0 rgba(162,77,255,.35)}
body.ev-haunt .hub-logo-sm::after{content:' 🎃';-webkit-text-fill-color:initial}
body.ev-haunt .sec-label{text-shadow:0 0 12px rgba(255,122,26,.25)}

/* ── The hub banner ── */
.ev-banner{
  border-color:rgba(255,122,26,.55)!important;
  background:linear-gradient(120deg,rgba(255,106,0,.13),rgba(120,40,200,.12) 60%,rgba(8,6,20,.6))!important;
  box-shadow:0 0 40px -10px rgba(255,122,26,.5)
}
/* Gradient text like every banner title — and a drop-shadow FILTER, never a
   text-shadow, which Chrome paints over a background-clip:text face. */
.ev-banner .mp-banner-title{background:linear-gradient(90deg,#ffc08a,#ff7a1a 45%,#c78bff);-webkit-background-clip:text;background-clip:text;filter:drop-shadow(0 0 8px rgba(255,122,26,.45))}
.ev-banner.ev-tease{opacity:.86;border-style:dashed!important}
.ev-prog{height:5px;border-radius:3px;background:rgba(255,255,255,.08);overflow:hidden;margin-top:8px;max-width:320px}
.ev-prog i{display:block;height:100%;border-radius:3px;background:linear-gradient(90deg,#ff7a1a,#a24dff);box-shadow:0 0 10px rgba(255,122,26,.6)}
.ev-lb-label{color:#ffb070}

/* ── Floating decorations (hub only, never over a round) ── */
#ev-deco{position:fixed;inset:0;z-index:1;pointer-events:none;overflow:hidden;display:none}
body.ev-haunt:has(#hub-screen.active) #ev-deco{display:block}
html.reduced-motion #ev-deco{display:none!important}
.evd-bat{position:absolute;left:-60px;opacity:.55;filter:drop-shadow(0 0 6px rgba(162,77,255,.8));
  animation-name:evdFly;animation-timing-function:linear;animation-iteration-count:infinite}
@keyframes evdFly{
  0%{transform:translate(0,0) scaleX(-1)}
  25%{transform:translate(28vw,-3vh) scaleX(-1)}
  50%{transform:translate(55vw,2vh) scaleX(-1)}
  75%{transform:translate(82vw,-2vh) scaleX(-1)}
  100%{transform:translate(112vw,1vh) scaleX(-1)}
}
.evd-float{position:absolute;font-size:2.1rem;opacity:.42;animation:evdBob 6s ease-in-out infinite;
  filter:drop-shadow(0 0 12px rgba(255,122,26,.7))}
.evd-l{left:2.5%;bottom:9%}
.evd-r{right:3%;bottom:14%;animation-delay:-2.2s;font-size:1.7rem}
.evd-g{right:9%;top:22%;animation-delay:-4s;font-size:1.5rem;opacity:.3;filter:drop-shadow(0 0 10px rgba(255,255,255,.5))}
@keyframes evdBob{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-14px) rotate(4deg)}}
@media (max-width:700px){ .evd-float{display:none} }

/* ── The shelf ── */
.market-tab-event{color:#ffb070!important;border-color:rgba(255,122,26,.5)!important}
.market-tab-event.active{background:rgba(255,122,26,.14)!important;box-shadow:0 0 18px rgba(255,122,26,.3)}
/* Nine tabs on one line. The eight stock tabs leave 27px of a 1060px row, and
   the event tab is ~106px, so while it shows (renderEventShelf sets has-event)
   every tab gives up a few pixels of side padding and the gap closes a little.
   Outside an event the row keeps its roomier look.
   ⚠️ The padding must SNAP, not animate: .market-tab's `transition:all` would
   ease it over .2s, and for those frames the nine wide tabs wrap — the very
   two-line row this rule exists to prevent, flashed on every first visit. So
   the 2D transition list here names only what hover and .active change. (3D
   tabs carry their own list, which never included padding — and which this
   must not clobber, or their hover press would stop animating.) */
.market-tabs.has-event{gap:6px}
.market-tabs.has-event .market-tab{padding-left:12px;padding-right:12px}
body:not(.mode-3d) .market-tabs.has-event .market-tab{transition-property:color,background-color,border-color,box-shadow}
.ev-shelf-note{
  margin:0 0 16px;padding:12px 14px;border-radius:12px;
  border:1px dashed rgba(255,122,26,.55);background:rgba(255,106,0,.07);
  font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.1em;line-height:1.7;color:#ffb070
}
.shop-card.shop-event{border-color:rgba(255,122,26,.45)}
.shop-evtag{
  display:inline-block;margin:0 auto 6px;padding:3px 10px;border-radius:20px;
  font-family:var(--fd);font-size:.44rem;font-weight:900;letter-spacing:.12em;
  color:#1a0800;background:linear-gradient(90deg,#ff9a3c,#ff6a00);box-shadow:0 0 12px rgba(255,122,26,.5)
}

/* ── 🪦 GRAVEYARD SHIFT — the event's exit state ── */
/* ⚠️ The layer itself carries a background. With a TRANSPARENT root, Chrome
   drew the 3D chrome's lifted buttons (preserve-3d, translateZ) OVER this
   z-index 2500 layer in 3D mode — the hub's buttons showed through the
   headstones. Every other exit paints its root, which is why only this one
   met it. */
#exit-fx.fx-grave{background:rgba(3,1,8,.35);animation:gvOut 1.8s ease forwards}
@keyframes gvOut{0%,82%{opacity:1}100%{opacity:0}}
.gv-sky{position:absolute;inset:0;
  background:linear-gradient(180deg,#07020f 0%,#1a0630 55%,#3a1236 80%,#5a1d10 100%);
  animation:gvSky .35s ease both}
@keyframes gvSky{from{opacity:0}to{opacity:.97}}
.gv-moon{position:absolute;left:66%;top:14%;width:15vmin;height:15vmin;border-radius:50%;
  background:radial-gradient(circle at 38% 38%,#fff8e0,#ffd98a 55%,#e8a64a);
  box-shadow:0 0 60px 12px rgba(255,210,130,.35);animation:gvMoon 1.1s cubic-bezier(.2,.8,.2,1) .1s both}
@keyframes gvMoon{from{transform:translateY(40vh);opacity:0}to{transform:none;opacity:1}}
.gv-bat{position:absolute;left:-8%;animation-name:gvBat;animation-timing-function:ease-in;animation-fill-mode:both;
  filter:drop-shadow(0 0 4px #000)}
@keyframes gvBat{from{transform:translate(0,0) scaleX(-1)}to{transform:translate(118vw,-18vh) scaleX(-1)}}
.gv-hill{position:absolute;left:-10%;right:-10%;bottom:-30vh;height:52vh;border-radius:50%;
  background:#050208;box-shadow:0 -6px 30px rgba(255,106,0,.25)}
.gv-stones{position:absolute;left:0;right:0;bottom:6vh;display:flex;justify-content:center;align-items:flex-end;gap:4vw}
.gv-stone{width:calc(9vmin * var(--s));height:calc(13vmin * var(--s));border-radius:48% 48% 6% 6%/38% 38% 6% 6%;
  background:linear-gradient(180deg,#5b5a6e,#2a2936);box-shadow:inset 0 3px 0 rgba(255,255,255,.12),0 0 18px rgba(0,0,0,.6);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4vmin;
  animation:gvRise .6s cubic-bezier(.2,1.3,.4,1) both}
@keyframes gvRise{from{transform:translateY(22vh)}to{transform:none}}
.gv-main{width:22vmin;height:28vmin}
.gv-main b{font-family:var(--fd);font-size:2.6vmin;letter-spacing:.2em;color:#e9e6ff}
.gv-main em{font-family:var(--fd);font-style:normal;font-weight:900;font-size:4.6vmin;color:#ffb070;text-shadow:0 0 12px rgba(255,122,26,.7)}
.gv-main i{font-family:var(--fd);font-style:normal;font-size:1.8vmin;letter-spacing:.3em;color:#bdb8d8}

/* ══════════════════════════════════════════════════════════════
   § v43 — 🏷️ TITLES · 🪪 PLAYER CARDS · 📋 DAILY CONTRACTS
   ══════════════════════════════════════════════════════════════ */

/* ── 🏷️ A title under a name on the boards ── */
.lb-ttl{
  display:block;font-style:normal;margin-top:2px;
  font-family:var(--fd);font-size:.42rem;font-weight:900;letter-spacing:.14em;
  color:var(--gold);opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.lb-row[data-uid]{cursor:pointer}
.lb-row[data-uid]:hover .lb-name{text-decoration:underline;text-decoration-color:rgba(255,255,255,.3);text-underline-offset:3px}
.ach-wear{
  margin-top:8px;width:100%;padding:6px 8px;border-radius:8px;cursor:pointer;
  font-family:var(--fd);font-size:.44rem;font-weight:900;letter-spacing:.12em;
  background:rgba(255,215,0,.06);border:1px solid rgba(255,215,0,.3);color:var(--gold)
}
.ach-wear:hover{background:rgba(255,215,0,.14)}
.ach-wear.on{background:rgba(255,215,0,.2);border-color:var(--gold);box-shadow:0 0 12px rgba(255,215,0,.3)}

/* ── 🪪 The player card ── */
.pcard-tint .fb-modal{max-width:500px;border-color:rgba(255,215,0,.4);box-shadow:0 0 70px rgba(255,215,0,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.pcard-tint .fb-modal::before{background:linear-gradient(90deg,transparent,var(--gold),transparent);box-shadow:0 0 12px var(--gold)}
.pcard-body{display:flex;flex-direction:column;gap:14px;text-align:left}
.pc-hero{display:flex;align-items:center;gap:16px;padding-right:34px}
.pc-skin{font-size:3.2rem;line-height:1;filter:drop-shadow(0 0 14px rgba(0,245,255,.35))}
.pc-id{min-width:0}
.pc-name{font-family:var(--fd);font-size:1rem;font-weight:900;letter-spacing:.08em;color:#fff;word-break:break-word}
.pc-you{font-size:.5rem;letter-spacing:.14em;padding:2px 7px;border-radius:10px;background:rgba(0,245,255,.15);color:var(--cyan);vertical-align:middle}
.pc-title{margin-top:5px;font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.14em;color:var(--gold)}
.pc-lvl{margin-top:5px;font-family:var(--fd);font-size:.52rem;letter-spacing:.14em;color:var(--dim)}
.pc-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.pc-tile{background:var(--s2);border:1px solid var(--border);border-radius:10px;padding:10px 8px;text-align:center;display:flex;flex-direction:column;gap:3px}
.pc-tile span{font-size:1.1rem}
.pc-tile b{font-family:var(--fd);font-size:.78rem;color:#fff}
.pc-tile em{font-style:normal;font-size:.62rem;color:var(--dim);line-height:1.3}
.pc-sec{font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.16em;color:var(--dimmer)}
.pc-best{display:flex;flex-direction:column;gap:6px}
.pc-bm{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;
  background:var(--s2);border:1px solid var(--border);border-radius:10px;padding:8px 12px}
.pc-bm-ico{font-size:1.2rem}
.pc-bm-name{font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.08em;color:var(--txt)}
.pc-bm-pts{font-family:var(--fd);font-size:.62rem;color:var(--cyan)}
.pc-badges{display:flex;flex-wrap:wrap;gap:6px}
.pc-badge{font-size:.72rem;padding:4px 9px;border-radius:14px;background:var(--s2);border:1px solid var(--border);color:var(--txt)}
.pc-empty{font-size:.82rem;color:var(--dim)}
.pc-btns{display:flex;flex-direction:column;gap:8px}
@media (max-width:420px){ .pc-tiles{grid-template-columns:repeat(2,1fr)} }

/* ── 📋 Today's contracts ── */
.contracts-panel{
  margin:0 0 18px;padding:14px 16px;border-radius:var(--r);
  background:linear-gradient(135deg,rgba(57,255,20,.05),rgba(0,245,255,.04));
  border:1px solid rgba(57,255,20,.3)
}
.contracts-panel:empty{display:none}
.ct-head{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.ct-title{font-family:var(--fd);font-size:.66rem;font-weight:900;letter-spacing:.14em;color:var(--lime)}
.ct-meta{font-size:.74rem;color:var(--dim)}
.ct-row{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;
  padding:8px 10px;border-radius:10px;background:var(--s2);border:1px solid var(--border);margin-bottom:6px}
.ct-row.done{opacity:.62}
.ct-row.done .ct-txt{text-decoration:line-through;text-decoration-color:rgba(57,255,20,.6)}
.ct-ico{font-size:1.05rem}
.ct-txt{font-size:.84rem;color:var(--txt);line-height:1.35}
.ct-cr{font-family:var(--fd);font-size:.52rem;font-weight:900;letter-spacing:.08em;color:var(--cyan);white-space:nowrap}
.ct-go{padding:6px 10px!important;min-height:0!important;font-size:.5rem!important}
.ct-bonus{margin-top:4px;font-size:.76rem;color:var(--dim);text-align:right}
.ct-bonus.done{color:var(--lime)}
@media (max-width:520px){
  .ct-row{grid-template-columns:auto 1fr auto;row-gap:6px}
  .ct-go{grid-column:1 / -1;justify-self:end}
}

/* ══════════════════════════════════════════════════════════════
   § v47 — 🎉 PARTY MODE
   ══════════════════════════════════════════════════════════════ */
.pt-banner .mp-banner-title{background:linear-gradient(90deg,#ff0090,#ffd700 55%,#39ff14);-webkit-background-clip:text;background-clip:text}
.party-tint .fb-modal{max-width:560px;border-color:rgba(255,0,144,.45);box-shadow:0 0 70px rgba(255,0,144,.14),inset 0 0 0 1px rgba(255,255,255,.03)}
.party-tint .fb-modal::before{background:linear-gradient(90deg,transparent,#ff0090,#ffd700,transparent);box-shadow:0 0 12px #ff0090}
.party-tint .fb-title{background:linear-gradient(90deg,#ff0090,#ffd700);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.party-body{display:flex;flex-direction:column;gap:12px;text-align:left}
.pt-sec{font-family:var(--fd);font-size:.58rem;font-weight:700;letter-spacing:.16em;color:var(--dimmer);margin-top:4px}
.pt-sec em{font-family:var(--fb);font-style:normal;letter-spacing:0;font-size:.74rem;margin-left:6px;color:var(--dim)}
.pt-players{display:flex;flex-direction:column;gap:7px}
.pt-player{display:flex;align-items:center;gap:9px}
.pt-dot{width:12px;height:12px;border-radius:50%;background:var(--pc);box-shadow:0 0 10px var(--pc);flex-shrink:0}
.pt-name{flex:1;min-width:0;padding:9px 12px!important}
/* The same control as the modal's own ✕ (.fb-close) — 30px, glyph centred,
   and flex:none so a long name cannot squash it into an oval. */
.pt-del{flex:none;width:30px;height:30px;display:flex;align-items:center;justify-content:center;
  border-radius:50%;border:1px solid var(--border);background:var(--s2);color:var(--dim);
  font-size:.8rem;cursor:pointer;transition:all .2s}
.pt-del:hover{color:var(--red);border-color:var(--red);background:rgba(255,36,66,.1)}
/* Both section actions hug their text; START THE PARTY is the only full-width
   bar in the sheet. Left to stretch, SHUFFLE came out 507px against ADD
   PLAYER's 110px — two sibling secondary buttons at odds. */
.pt-add,#pt-shuffle{align-self:flex-start}
/* ── the three mission slots ──
   Each round is a plate you press to change it, made of the parts a hub card
   is made of: the mission's art, its name in its own accent, its one-line
   hook. They replaced three native <select>s, whose open list is an OS window
   no stylesheet can paint — a flat grey list in 2D, and the one flat object
   left in the 3D party flow. */
.pt-missions{display:flex;flex-direction:column;gap:8px}
/* --acc is the mission's accent, from the palette NAME the hub card carries
   in data-c (partyCardInfo). var(--cyan) and friends rather than hex, so the
   colour-blind palette re-points these exactly as it does the hub grid. */
.pt-slot,.ptp-card{--acc:var(--cyan)}
.pt-slot[data-c="pink"],.ptp-card[data-c="pink"]{--acc:var(--pink)}
.pt-slot[data-c="lime"],.ptp-card[data-c="lime"]{--acc:var(--lime)}
.pt-slot[data-c="gold"],.ptp-card[data-c="gold"]{--acc:var(--gold)}
.pt-slot[data-c="purple"],.ptp-card[data-c="purple"]{--acc:var(--purple)}
.pt-slot[data-c="orange"],.ptp-card[data-c="orange"]{--acc:var(--orange)}
.pt-slot[data-c="red"],.ptp-card[data-c="red"]{--acc:var(--red)}
.pt-slot{
  position:relative;display:grid;grid-template-columns:24px 40px minmax(0,1fr) auto;align-items:center;gap:12px;
  width:100%;padding:11px 14px 11px 10px;text-align:left;cursor:pointer;
  font:inherit;color:var(--text);
  background:linear-gradient(90deg,color-mix(in srgb,var(--acc) 11%,transparent),transparent 58%),var(--s1);
  border:1px solid var(--border);border-radius:var(--r);
  box-shadow:inset 3px 0 0 var(--acc);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease
}
/* The card is the only hit target. Its parts are lifted off the face in the 3D
   chrome, and a lifted child in a preserve-3d parent hit-tests in front of
   anything at Z 0 — the ⓘ badge's bug on the hub cards. None has a handler. */
.pt-slot > *,.ptp-card > *{pointer-events:none}
.pt-slot-n{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:50%;
  border:1px solid color-mix(in srgb,var(--gold) 50%,transparent);background:color-mix(in srgb,var(--gold) 7%,transparent);
  font-family:var(--fd);font-size:.6rem;font-weight:700;color:var(--gold)}
.pt-slot-ico{font-size:1.75rem;line-height:1;text-align:center;
  filter:drop-shadow(0 0 10px color-mix(in srgb,var(--acc) 38%,transparent))}
.pt-slot-txt{min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:5px 9px}
/* A fixed line box for the name row, taller than the SAME BOARD chip: left to
   size itself, the one slot carrying the chip came out 4px taller. */
.pt-slot-name{font-family:var(--fd);font-size:.64rem;font-weight:700;letter-spacing:.08em;line-height:18px;color:var(--acc)}
.pt-slot-desc{flex-basis:100%;min-width:0;font-size:.8rem;color:var(--dim);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-same{font-style:normal;white-space:nowrap;line-height:1.2;
  font-family:var(--fd);font-size:.44rem;font-weight:700;letter-spacing:.14em;
  color:var(--lime);background:color-mix(in srgb,var(--lime) 8%,transparent);border:1px solid currentColor;
  border-radius:20px;padding:2px 8px}
.pt-slot-go{font-family:var(--fd);font-size:.48rem;font-weight:700;letter-spacing:.14em;color:var(--dim);
  padding:6px 10px;border:1px solid var(--border);border-radius:20px;
  transition:color .2s ease,border-color .2s ease,background-color .2s ease}
/* Hover is gated on a real pointer: a tap latches :hover on most phones, and
   the plate stayed lifted and lit long after the finger had moved on. */
@media (hover:hover){
  .pt-slot:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--acc) 70%,transparent);
    box-shadow:inset 3px 0 0 var(--acc),0 8px 26px -8px color-mix(in srgb,var(--acc) 45%,transparent)}
  .pt-slot:hover .pt-slot-go{color:var(--acc);border-color:var(--acc);background:color-mix(in srgb,var(--acc) 10%,transparent)}
}
.pt-slot:active{transform:scale(.985)}
.pt-slot:focus-visible{outline:2px solid var(--acc);outline-offset:3px}
/* The ring a pick leaves on the slot it changed (both of them, on a swap).
   An overlay that fades, NOT an animated box-shadow: an animation on
   box-shadow replaces the whole stack, 3D walls included, while it runs. */
.pt-slot::after{content:'';position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;opacity:0;
  border:1px solid var(--acc);box-shadow:0 0 24px -2px var(--acc),inset 0 0 18px -8px var(--acc)}
.pt-slot.pt-flash::after{animation:ptFlash 1.1s ease-out}
@keyframes ptFlash{0%,30%{opacity:1}100%{opacity:0}}
html.reduced-motion .pt-slot.pt-flash::after{animation:none}

/* ── the mission picker (#ptpick-overlay) ──
   A second overlay standing ON the setup sheet, so it goes above the shell's
   z-index. Its backdrop is lighter and less blurred than the shell's: the
   sheet is already sitting on a dimmed, blurred page, and the full treatment
   again is the doubled dim the Settings hand-off steps aside to avoid — this
   keeps the party visibly underneath the thing being chosen for it. */
#ptpick-overlay{z-index:2050;background:rgba(2,2,10,.58);backdrop-filter:blur(3px)}
.ptpick-tint .fb-modal{max-width:780px;border-color:rgba(255,215,0,.42);box-shadow:0 0 70px rgba(255,215,0,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.ptpick-tint .fb-modal::before{background:linear-gradient(90deg,transparent,#ffd700,#ff0090,transparent);box-shadow:0 0 12px #ffd700}
.ptpick-tint .fb-title{background:linear-gradient(90deg,#ffd700,#ff0090);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.ptpick-tint .fb-head{margin-bottom:22px}
/* The rows are further apart than the columns: a round tab stands 9px above
   its card, and in the 3D chrome the card above has an 8px wall under it. */
.ptp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:20px 12px}
/* The hub card, at picker scale: art, name in its accent, the hook, the cap. */
.ptp-card{
  position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;
  padding:22px 12px 14px;cursor:pointer;font:inherit;color:var(--text);
  background:var(--s1);border:1px solid var(--border);border-radius:var(--rl);
  transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease
}
.ptp-ico{font-size:2.2rem;line-height:1;margin-bottom:11px}
.ptp-name{font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.08em;line-height:1.5;color:var(--acc);margin-bottom:7px}
.ptp-desc{font-size:.74rem;line-height:1.4;color:var(--dim);margin-bottom:12px;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ptp-pills{margin-top:auto;display:flex;flex-wrap:wrap;justify-content:center;gap:5px}
.ptp-pts,.ptp-same{padding:3px 9px;border-radius:20px;border:1px solid;white-space:nowrap;
  font-family:var(--fd);font-size:.44rem;font-weight:700;letter-spacing:.06em}
.ptp-pts{color:var(--acc);border-color:var(--acc);background:color-mix(in srgb,var(--acc) 6%,transparent)}
/* Borders and washes are mixed from the same variable as the text, so the
   colour-blind palette moves all three together. */
.ptp-same{color:var(--lime);border-color:color-mix(in srgb,var(--lime) 60%,transparent);background:color-mix(in srgb,var(--lime) 7%,transparent)}
/* Which round a card is in: a tab on the top edge. In a corner it ran into
   the centred art. Opaque, because it sits across the card's border line. */
.ptp-badge{position:absolute;top:-9px;left:50%;transform:translateX(-50%);padding:3px 9px;border-radius:20px;white-space:nowrap;
  font-family:var(--fd);font-size:.42rem;font-weight:900;letter-spacing:.1em;line-height:1.2}
/* This round's mission now: lit in its own accent, the way the pass card is. */
.ptp-card.on{border-color:var(--acc);
  background:radial-gradient(120% 90% at 50% 0%,color-mix(in srgb,var(--acc) 18%,transparent),transparent 70%),var(--s2);
  box-shadow:0 0 0 1px var(--acc),0 0 30px -8px var(--acc)}
.ptp-card.on .ptp-badge{color:#05060f;background:var(--acc);box-shadow:0 0 12px -2px var(--acc)}
/* Another round's mission: badged with that round, its print set back, still
   pickable (it swaps). The PRINT dims, not the card — opacity on the card
   would dim the tab too, and in the 3D chrome opacity is a grouping property
   that forces the card flat and drops its raised art onto the face. */
.ptp-card.taken > :not(.ptp-badge){opacity:.5;transition:opacity .2s ease}
.ptp-card.taken .ptp-badge{color:var(--gold);border:1px solid color-mix(in srgb,var(--gold) 60%,transparent);background:#0b0e1e}
@media (hover:hover){
  .ptp-card:hover{transform:translateY(-4px) scale(1.02);border-color:var(--acc);
    box-shadow:0 8px 30px color-mix(in srgb,var(--acc) 22%,transparent)}
  .ptp-card.on:hover{box-shadow:0 0 0 1px var(--acc),0 8px 30px color-mix(in srgb,var(--acc) 32%,transparent)}
  .ptp-card.taken:hover > *{opacity:1}
}
.ptp-card:active{transform:scale(.97)}
.ptp-card:focus-visible{outline:2px solid var(--acc);outline-offset:3px}
.ptp-card.taken:focus-visible > *{opacity:1}
.ptp-foot{margin-top:18px;display:flex;flex-direction:column;gap:4px;
  font-size:.78rem;line-height:1.5;color:var(--dimmer);text-align:center}
/* the legend's ⇄, drawn as the taken tab is */
.ptp-key{display:inline-block;padding:0 7px;border-radius:20px;font-size:.7rem;line-height:1.5;
  color:var(--gold);border:1px solid color-mix(in srgb,var(--gold) 55%,transparent);background:color-mix(in srgb,var(--gold) 8%,transparent)}
.pt-note{font-size:.8rem;line-height:1.5;color:var(--dim);background:var(--s2);border:1px solid var(--border);border-radius:10px;padding:10px 12px}
.pt-note b{color:var(--text)}
/* the pass-the-device card */
.pt-turn{text-align:center;padding:18px 14px;border-radius:14px;border:1px solid var(--pc);
  background:radial-gradient(120% 90% at 50% 0%,color-mix(in srgb,var(--pc) 16%,transparent),transparent 70%),var(--s2);
  box-shadow:0 0 30px -12px var(--pc)}
.pt-pass{font-family:var(--fd);font-size:.54rem;letter-spacing:.2em;color:var(--dim)}
.pt-who{font-family:var(--fd);font-size:1.6rem;font-weight:900;letter-spacing:.06em;color:var(--pc);margin:6px 0 10px;
  filter:drop-shadow(0 0 10px var(--pc));word-break:break-word}
.pt-what{font-family:var(--fd);font-size:.72rem;font-weight:700;letter-spacing:.1em;color:#fff}
.pt-what em{font-style:normal;color:var(--lime);font-size:.6rem}
.pt-how{font-size:.82rem;line-height:1.5;color:var(--dim);margin:8px 0 14px}
/* the scoreboard */
.pt-board{display:flex;flex-direction:column;gap:5px}
.pt-row,.pt-heads{display:grid;grid-template-columns:34px 12px 1fr repeat(3,56px) 64px;align-items:center;gap:8px;padding:7px 10px;border-radius:9px}
.pt-row{background:var(--s2);border:1px solid var(--border)}
.pt-row.on{border-color:var(--pc);box-shadow:0 0 14px -6px var(--pc)}
.pt-heads{padding-top:0;padding-bottom:0;border:1px solid transparent;
  font-family:var(--fd);font-size:.5rem;letter-spacing:.1em;color:var(--dimmer);text-align:right}
/* These emoji ARE the column labels, so they are sized to be read rather than
   to match the TOTAL caption beside them. */
.pt-heads span[title]{font-size:.92rem;line-height:1}
.pt-rank{font-family:var(--fd);font-size:.62rem;color:var(--dim)}
.pt-rname{font-family:var(--fd);font-size:.58rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-cell{font-family:var(--fd);font-size:.56rem;color:var(--dim);text-align:right}
.pt-cell.cur{color:var(--gold)}
.pt-total{font-family:var(--fd);font-size:.66rem;font-weight:900;color:var(--cyan);text-align:right}
.pt-end{align-self:center;margin-top:4px}
/* the winner */
.pt-win{text-align:center;padding:10px 0 6px}
.pt-crown{font-size:2.8rem;animation:ptCrown 1.4s cubic-bezier(.2,1.4,.4,1) both}
@keyframes ptCrown{from{transform:translateY(-30px) scale(.4);opacity:0}to{transform:none;opacity:1}}
html.reduced-motion .pt-crown{animation:none}
.pt-wname{font-family:var(--fd);font-size:1.2rem;font-weight:900;letter-spacing:.08em;color:var(--pc);filter:drop-shadow(0 0 12px var(--pc))}
.pt-wpts{font-family:var(--fd);font-size:.8rem;color:var(--gold);margin-top:4px}
.pt-final-btns{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:6px}
@media (max-width:520px){
  .pt-row,.pt-heads{grid-template-columns:26px 10px 1fr repeat(3,40px) 50px;gap:5px;padding:6px 7px}
  .pt-row .pt-dot{width:10px;height:10px}   /* 12px overran its 10px track */
  .pt-heads span[title]{font-size:.8rem}
  .pt-cell{font-size:.48rem}
  .pt-who{font-size:1.2rem}
  /* REMATCH + NEW MISSIONS do not fit one row here, and wrapping left the
     primary stranded alone above the other two. */
  .pt-final-btns{flex-direction:column;align-items:stretch}
  .pt-final-btns .btn{width:100%}
  .pt-slot{grid-template-columns:22px 32px minmax(0,1fr) auto;gap:9px;padding:10px 10px 10px 8px}
  .pt-slot-ico{font-size:1.45rem}
  .pt-slot-name{font-size:.56rem}
  .pt-slot-desc{font-size:.74rem}
  .pt-slot-go{padding:5px 8px;font-size:.42rem;letter-spacing:.1em}
  /* auto-fill's 158px floor leaves ONE column on a 375px phone; two it is. */
  .ptp-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 10px}
  .ptp-card{padding:22px 8px 12px}
  .ptp-ico{font-size:1.8rem;margin-bottom:8px}
  .ptp-name{font-size:.5rem}
  .ptp-desc{font-size:.7rem}
}

/* ── 🧊 in the 3D chrome: the board is a stack of plates like the
   leaderboard's, and the pass card is the panel the GO button stands on. The
   party sheet was the one screen left flat inside an extruded modal. ── */
body.mode-3d .pt-row,
body.mode-3d .pt-turn,
body.mode-3d .pt-note{transform-style:preserve-3d}
body.mode-3d .pt-row{
  --wall:#121829;--wallb:#080b16;
  background-image:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,0) 60%);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wallb),
    0 7px 10px -6px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.1)
}
/* The leader's plate takes the gold body the leaderboard's #1 has. It is
   the row after the heading — not :first-of-type, which .pt-heads owns. */
body.mode-3d .pt-heads + .pt-row{--wall:#6b5600;--wallb:#3a2f00}
/* Whose turn it is stands one wall taller and keeps its accent glow; same
   specificity as the leader rule, so it comes last and wins when they are
   the same player. */
body.mode-3d .pt-row.on{
  --wall:#1b2340;--wallb:#0a0f1e;
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wallb),
    0 5px 0 var(--wallb),0 12px 16px -8px rgba(0,0,0,.85),
    0 0 20px -7px var(--pc),
    inset 0 1px 0 rgba(255,255,255,.14)
}
/* .pt-turn paints its face with a radial tint through the background
   shorthand, so it gets the body only — a background-image here would wipe it. */
body.mode-3d .pt-turn{
  box-shadow:
    0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
    0 16px 24px -12px rgba(0,0,0,.85),
    0 0 30px -12px var(--pc),
    inset 0 1px 0 rgba(255,255,255,.11),inset 0 -1px 0 rgba(0,0,0,.5)
}
body.mode-3d .pt-note{
  background-image:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,0) 70%);
  box-shadow:
    0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
    0 14px 22px -12px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.11),inset 0 -1px 0 rgba(0,0,0,.5)
}
body.mode-3d .pt-del{
  box-shadow:0 1px 0 #171e33,0 2px 0 #0a0e1a,0 4px 6px -3px rgba(0,0,0,.8),
             inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .14s var(--pop-ease),box-shadow .14s var(--pop-ease),color .14s,border-color .14s
}
body.mode-3d .pt-del:hover{transform:perspective(500px) translateZ(6px) scale(1.06)}
body.mode-3d .pt-del:active{transform:translateY(2px)}

/* The mission slots and the picker's cards are plates like the hub's cards:
   the same wall stack, lip and contact shade, lifted on hover, driven down on
   press, and tilted toward the pointer — .pt-slot and .ptp-card are in the
   tilt registry in app.js (SEL); a class missing there never gets --tx/--ty. */
body.mode-3d .pt-slot,
body.mode-3d .ptp-card{
  --wall:#141a2c;--wallb:#070a14;--tx:0deg;--ty:0deg;
  transform-style:preserve-3d;
  transform-origin:50% 60%;
  transition:transform .2s var(--pop-ease),box-shadow .2s var(--pop-ease),border-color .2s
}
/* A slot is a wide, short plate, so it takes a fraction of the tilt a card
   does: at the full nine degrees its far end swung ~40px out of the sheet.
   Its face keeps the 2D accent wash, restated WITH the specular in one
   background shorthand — a background-image alone would wipe the wash, the
   .pt-turn trap above. */
body.mode-3d .pt-slot{
  background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,0) 55%),
             linear-gradient(90deg,color-mix(in srgb,var(--acc) 12%,transparent),transparent 58%),var(--s1);
  transform:perspective(var(--eye)) translateZ(0) rotateX(calc(var(--tx) * .5)) rotateY(calc(var(--ty) * .15));
  box-shadow:
    inset 3px 0 0 var(--acc),
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),
    0 4px 0 var(--wallb),0 5px 0 var(--wallb),0 6px 0 var(--wallb),
    0 14px 20px -10px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.13),inset 0 -1px 0 rgba(0,0,0,.5)
}
body.mode-3d .ptp-card{
  overflow:visible;           /* anything else flattens the card — see .game-card */
  background-image:linear-gradient(170deg,rgba(255,255,255,.07),rgba(255,255,255,0) 46%);
  transform:perspective(var(--eye)) translateZ(0) rotateX(var(--tx)) rotateY(var(--ty));
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
    0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),0 8px 0 var(--wallb),
    0 18px 26px -12px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(0,0,0,.5)
}
/* This round's mission stands in its own colour — walls mixed from its
   accent, the way .mode-card.on takes cyan ones — a step higher, and lit. Its
   2D face is a radial wash through the shorthand, restated with the specular. */
body.mode-3d .ptp-card.on{
  --wall:color-mix(in srgb,var(--acc) 42%,#070a14);--wallb:color-mix(in srgb,var(--acc) 22%,#05070e);
  background:linear-gradient(170deg,rgba(255,255,255,.09),rgba(255,255,255,0) 46%),
             radial-gradient(120% 90% at 50% 0%,color-mix(in srgb,var(--acc) 18%,transparent),transparent 70%),var(--s2);
  transform:perspective(var(--eye)) translateZ(10px) rotateX(var(--tx)) rotateY(var(--ty));
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
    0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),0 8px 0 var(--wallb),
    0 22px 30px -12px rgba(0,0,0,.9),
    0 0 34px -8px var(--acc),
    inset 0 1px 0 rgba(255,255,255,.22),inset 0 -1px 0 rgba(0,0,0,.5)
}
@media (hover:hover){
  body.mode-3d .pt-slot:hover{
    transform:perspective(var(--eye)) translateZ(12px) rotateX(calc(var(--tx) * .5)) rotateY(calc(var(--ty) * .15));
    box-shadow:
      inset 3px 0 0 var(--acc),
      0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
      0 5px 0 var(--wallb),0 6px 0 var(--wallb),0 7px 0 var(--wallb),0 8px 0 var(--wallb),0 9px 0 var(--wallb),
      0 26px 32px -16px rgba(0,0,0,.9),
      0 0 30px -10px var(--acc),
      inset 0 1px 0 rgba(255,255,255,.18),inset 0 -1px 0 rgba(0,0,0,.5)
  }
  body.mode-3d .ptp-card:hover,
  body.mode-3d .ptp-card.on:hover{
    transform:perspective(var(--eye)) translateZ(28px) rotateX(var(--tx)) rotateY(var(--ty));
    box-shadow:
      0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wall),
      0 5px 0 var(--wall),0 6px 0 var(--wallb),0 7px 0 var(--wallb),0 8px 0 var(--wallb),
      0 9px 0 var(--wallb),0 10px 0 var(--wallb),0 11px 0 var(--wallb),0 12px 0 var(--wallb),
      0 13px 0 var(--wallb),0 14px 0 var(--wallb),
      0 40px 50px -18px rgba(0,0,0,.92),
      0 0 40px -10px var(--acc),
      inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.5)
  }
}
body.mode-3d .pt-slot:active{
  transform:perspective(var(--eye)) translateZ(1px) translateY(4px);
  box-shadow:inset 3px 0 0 var(--acc),0 1px 0 var(--wall),0 2px 0 var(--wallb),
             0 6px 10px -5px rgba(0,0,0,.8),inset 0 3px 8px rgba(0,0,0,.5)
}
body.mode-3d .ptp-card:active,
body.mode-3d .ptp-card.on:active{
  transform:perspective(var(--eye)) translateZ(2px) translateY(4px);
  box-shadow:0 1px 0 var(--wall),0 2px 0 var(--wallb),0 6px 10px -5px rgba(0,0,0,.8),
             inset 0 3px 8px rgba(0,0,0,.5)
}
/* Parts stand off the face, the art furthest — the parallax is the depth cue. */
body.mode-3d .pt-slot-ico{transform:translateZ(18px)}
body.mode-3d .pt-slot-n,
body.mode-3d .pt-slot-txt,
body.mode-3d .pt-slot-go{transform:translateZ(8px)}
body.mode-3d .ptp-ico{transform:translateZ(24px)}
body.mode-3d .ptp-badge{transform:translateX(-50%) translateZ(16px)}
body.mode-3d .ptp-name,
body.mode-3d .ptp-desc,
body.mode-3d .ptp-pills{transform:translateZ(9px)}
/* The modal slab's walls, restated with the picker's gold glow: the tint rule
   above would otherwise leave this the one flat modal in the 3D interface. */
body.mode-3d .ptpick-tint .fb-modal{
  box-shadow:
    0 2px 0 #131a2e,0 4px 0 #131a2e,0 6px 0 #080c18,0 8px 0 #080c18,0 10px 0 #05070f,
    0 44px 70px -22px rgba(0,0,0,.95),0 0 60px -10px rgba(255,215,0,.26),
    inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.6);
}
@media (max-width:560px){
  body.mode-3d .pt-slot-ico{transform:translateZ(12px)}
  body.mode-3d .ptp-ico{transform:translateZ(16px)}
}
/* Reduced motion (html.reduced-motion follows the OS until the player sets
   it): the solids stay, the travel goes. Hover changes the light, not the
   position — and the pointer tilt stops too, which the parallax code cannot
   do itself: it reads the OS preference once, at load. */
html.reduced-motion body:not(.mode-3d) .pt-slot:hover,
html.reduced-motion body:not(.mode-3d) .ptp-card:hover{transform:none}
html.reduced-motion body.mode-3d .pt-slot:hover{transform:perspective(var(--eye)) translateZ(0)}
html.reduced-motion body.mode-3d .ptp-card:hover{transform:perspective(var(--eye)) translateZ(0)}
html.reduced-motion body.mode-3d .ptp-card.on:hover{transform:perspective(var(--eye)) translateZ(10px)}
html.reduced-motion .pt-slot,
html.reduced-motion .ptp-card{--tx:0deg !important;--ty:0deg !important}

/* ══════════════════════════════════════════════════════════════
   § v48 — 🌍 WORLD THEMES
   ══════════════════════════════════════════════════════════════ */
.shop-sky{
  width:100%;height:74px;border-radius:10px;margin-bottom:10px;position:relative;overflow:hidden;
  border:1px solid rgba(255,255,255,.08);box-shadow:inset 0 -18px 30px rgba(0,0,0,.45)
}
.shop-sky span{position:absolute;right:10px;bottom:6px;font-size:1.7rem;filter:drop-shadow(0 0 8px rgba(0,0,0,.6))}
/* A horizon glow line, so the sunset reads as a sunset rather than a gradient. */
.shop-sky::after{content:'';position:absolute;left:0;right:0;top:62%;height:2px;background:rgba(255,255,255,.35);filter:blur(1px)}
.wld-note{border-color:rgba(0,245,255,.4)!important;background:rgba(0,245,255,.05)!important;color:var(--cyan)!important}

/* ══════════════════════════════════════════════════════════════
   § v49 — 📖 CAMPAIGN · ROOT ACCESS
   Terminal green and gold: ARC's console. Same furniture as the party and
   anomaly screens (.mp-banner, .fb-overlay/.fb-modal); only the accents and
   the chapter map are new. Colours are palette vars, so cb-safe repoints them.
   ══════════════════════════════════════════════════════════════ */
.cp-banner{border-color:rgba(57,255,20,.42);background:linear-gradient(120deg,rgba(57,255,20,.11),rgba(0,245,255,.07))}
.cp-banner .mp-banner-title{background:linear-gradient(90deg,var(--lime),var(--cyan) 60%,var(--gold));-webkit-background-clip:text;background-clip:text}
.campaign-tint .fb-modal,.campaign-modal{max-width:620px}
.campaign-tint .fb-modal{border-color:rgba(57,255,20,.45);box-shadow:0 0 70px rgba(57,255,20,.14),inset 0 0 0 1px rgba(255,255,255,.03)}
.campaign-tint .fb-head{margin-bottom:18px}
#campaign-body{display:flex;flex-direction:column;text-align:left}

/* ── the selected chapter: ARC's briefing ── */
.cp-detail{
  position:relative;overflow:hidden;padding:16px 16px 14px;margin-bottom:4px;border-radius:14px;
  border:1px solid rgba(57,255,20,.34);
  background:linear-gradient(160deg,rgba(57,255,20,.08),rgba(0,245,255,.03) 60%),var(--s1);
  box-shadow:0 0 28px -14px var(--lime)
}
/* CRT scanlines, faint enough to read as texture rather than noise. */
.cp-detail::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(0deg,rgba(57,255,20,.035) 0 1px,transparent 1px 3px)
}
.cp-detail > *{position:relative}
.cp-detail.locked{border-color:var(--border);background:var(--s1);box-shadow:none}
.cp-detail.locked .cp-title,.cp-detail.locked .cp-story{opacity:.72}
.cp-kicker{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.2em;line-height:1.6;color:var(--lime)}
.cp-detail.locked .cp-kicker{color:var(--dim)}
.cp-title{font-family:var(--fd);font-size:1.2rem;font-weight:900;letter-spacing:.06em;color:#fff;margin:7px 0 11px;overflow-wrap:anywhere}
.cp-story{
  font-size:.95rem;line-height:1.55;color:rgba(255,255,255,.82);margin-bottom:12px;
  padding-left:12px;border-left:2px solid rgba(57,255,20,.5)
}
.cp-story em{
  font-style:normal;font-family:var(--fd);font-size:.52rem;font-weight:700;letter-spacing:.14em;
  color:var(--lime);margin-left:4px;white-space:nowrap
}
.cp-facts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.cp-facts span{
  font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.08em;line-height:1.3;
  padding:5px 10px;border-radius:999px;border:1px solid var(--border);
  background:rgba(255,255,255,.05);color:var(--text)
}
.cp-targets{font-family:var(--fd);font-size:.56rem;letter-spacing:.05em;line-height:1.7;color:var(--gold);text-align:center;text-wrap:balance;margin:4px 0 2px}
.cp-have{font-size:2.1rem;line-height:1.1;letter-spacing:.18em;color:var(--gold);text-align:center;text-shadow:0 0 16px rgba(255,215,0,.45);margin:2px 0 12px}
.cp-lock{
  font-family:var(--fd);font-size:.58rem;font-weight:700;letter-spacing:.1em;line-height:1.6;text-align:center;
  color:var(--orange);padding:11px 12px;border-radius:10px;
  border:1px dashed rgba(255,102,0,.45);background:rgba(255,102,0,.06)
}

/* ── the map: four acts of five ── */
.cp-act{
  display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  margin:18px 2px 8px;padding-bottom:6px;border-bottom:1px solid rgba(57,255,20,.22);
  font-family:var(--fd);font-size:.58rem;font-weight:700;letter-spacing:.16em;color:var(--lime)
}
.cp-act em{font-style:normal;letter-spacing:.06em;color:var(--gold);white-space:nowrap}
.cp-act.shut{color:var(--dimmer);border-bottom-color:var(--border)}
.cp-act.shut em{color:var(--dim)}
.cp-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.cp-node{
  position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0;
  padding:12px 4px 8px;border-radius:12px;border:1px solid var(--border);background:var(--s1);
  color:var(--text);font-family:var(--fb);cursor:pointer;
  transition:border-color .16s,background .16s,transform .16s
}
.cp-node:hover{border-color:var(--lime);transform:translateY(-2px)}
.cp-node:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.cp-node.done{border-color:rgba(57,255,20,.42)}
.cp-node.locked{border-style:dashed}
.cp-node.locked:hover{border-color:var(--border2)}
.cp-node.sel{border-style:solid;border-color:var(--gold);background:rgba(255,215,0,.08);box-shadow:0 0 16px -6px var(--gold)}
.cp-n{position:absolute;top:5px;left:8px;font-family:var(--fd);font-size:.5rem;font-weight:700;color:var(--dim)}
.cp-node.done .cp-n{color:var(--lime)}
.cp-ico{font-size:1.5rem;line-height:1;margin-top:6px}
.cp-nt{
  font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.04em;line-height:1.3;
  text-align:center;min-height:2.6em;overflow-wrap:anywhere;padding:0 2px
}
.cp-st{font-size:.74rem;letter-spacing:.06em;color:var(--gold)}
.cp-node:not(.done) .cp-st{color:var(--dimmer)}
.cp-node.locked .cp-ico,.cp-node.locked .cp-nt,.cp-node.locked .cp-st{opacity:.5}
@media (max-width:520px){
  .cp-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .campaign-tint .fb-modal{padding:24px 16px 20px}
  .cp-title{font-size:1.02rem}
  .cp-have{font-size:1.8rem}
}

/* ── 🧊 in the 3D chrome: each chapter is a plate, like a leaderboard row ── */
body.mode-3d .cp-node{
  --wall:#121829;--wallb:#080b16;
  background-image:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,0) 60%);
  transform:perspective(760px) translateZ(0);
  transition:transform .16s var(--pop-ease),box-shadow .16s var(--pop-ease),border-color .16s;
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wallb),
    0 7px 10px -6px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.1)
}
body.mode-3d .cp-node:hover{
  transform:perspective(760px) translateZ(8px) translateY(-2px);
  box-shadow:
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wallb),
    0 5px 0 var(--wallb),0 14px 18px -8px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.14)
}
body.mode-3d .cp-node.done{--wall:#0f4a12;--wallb:#062308}
body.mode-3d .cp-node.sel{--wall:#6b5600;--wallb:#3a2f00}
body.mode-3d .cp-node.locked{--wall:#0d1120;--wallb:#05070f}

/* ══════════════════════════════════════════════════════════════════════
   § 22 · v53 — 🔗 CHALLENGE LINKS
   The invitation on the sign-in screen and the INCOMING CHALLENGE modal.
   Gold, because gold is what the arcade already uses for "someone else's
   number to beat" (the challenge board's own rows, the replay card's score).
   ══════════════════════════════════════════════════════════════════════ */
.cl-auth{
  margin:16px auto 0;max-width:430px;padding:12px 14px;text-align:center;
  border:1px solid rgba(255,215,0,.5);border-radius:var(--r);
  background:linear-gradient(135deg,rgba(255,215,0,.13),rgba(255,0,144,.08));
  box-shadow:0 0 24px rgba(255,215,0,.12)
}
.cl-auth-top{font-family:var(--fd);font-size:.6rem;font-weight:900;letter-spacing:.18em;color:var(--gold)}
.cl-auth-mid{margin-top:7px;font-family:var(--fd);font-size:.8rem;font-weight:700;letter-spacing:.05em;color:var(--text);overflow-wrap:anywhere}
.cl-auth-mid strong{color:var(--gold)}
.cl-auth-ico{font-size:1rem}
.cl-auth-sub{margin-top:5px;font-size:.8rem;color:var(--dim)}

.cl-modal{max-width:440px;border-color:rgba(255,215,0,.45);box-shadow:0 0 70px rgba(255,215,0,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.cl-modal .fb-head{margin-bottom:18px}
.cl-card{
  text-align:center;padding:16px 12px 14px;margin-bottom:12px;
  border:1px solid rgba(255,215,0,.4);border-radius:var(--r);background:rgba(255,215,0,.06)
}
.cl-ico{font-size:2.6rem;line-height:1}
.cl-mission{margin-top:8px;font-family:var(--fd);font-size:1rem;font-weight:900;letter-spacing:.08em;color:var(--cyan)}
.cl-by{margin-top:12px;font-family:var(--fd);font-size:.55rem;letter-spacing:.2em;color:var(--dim);overflow-wrap:anywhere}
.cl-pts{font-family:var(--fd);font-size:2.1rem;font-weight:900;color:var(--gold);line-height:1.15}
.cl-pts em{font-style:normal;font-size:.5rem;letter-spacing:.16em;color:var(--dimmer);margin-left:6px}
.cl-tier{margin-top:4px;font-size:.82rem;color:var(--text)}
.cl-how{font-size:.88rem;line-height:1.55;color:var(--text);margin:0 2px 10px}
.cl-note{font-size:.8rem;line-height:1.5;color:var(--text);padding:8px 10px;border-radius:10px;background:var(--s1);border:1px solid var(--border);margin-bottom:8px}
.cl-note.dim{color:var(--dim);background:none;border-color:transparent;padding:2px 2px 0}
.cl-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:14px}
@media (max-width:520px){
  .cl-modal{padding:24px 16px 20px}
  .cl-modal .fb-head{padding:0 30px}          /* keep the title clear of the ✕ */
  .cl-pts{font-size:1.8rem}
  /* Stacked on a phone, the button that starts the race goes on top. */
  .cl-btns{flex-direction:column-reverse}
  .cl-btns .btn{width:100%}
}
.cl-modal::before{background:linear-gradient(90deg,transparent,var(--gold),transparent);box-shadow:0 0 12px var(--gold)}
/* 🧊 3D chrome: restate the walls WITH the gold glow, or body.mode-3d
   .fb-modal's own wall stack wins and the tint is lost (the .x-tint trap). */
body.mode-3d .cl-modal{
  box-shadow:
    0 2px 0 #131a2e,0 4px 0 #131a2e,0 6px 0 #080c18,0 8px 0 #080c18,0 10px 0 #05070f,
    0 44px 70px -22px rgba(0,0,0,.95),0 0 70px rgba(255,215,0,.12),
    inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.6)
}
.cl-modal .fb-title{background:linear-gradient(90deg,var(--gold),var(--pink));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}

/* ══════════════════════════════════════════════════════════════════════
   § 23 · v53 — 📊 GRID TELEMETRY (?stats)
   An operator's panel, so it is quieter than the arcade around it: one hue
   (the cyan) for every magnitude, text in the text tokens, status in chips
   that carry an icon as well as a colour.
   ══════════════════════════════════════════════════════════════════════ */
.st-modal{max-width:940px;border-color:rgba(0,245,255,.4);box-shadow:0 0 70px rgba(0,245,255,.1),inset 0 0 0 1px rgba(255,255,255,.03)}
.st-modal::before{background:linear-gradient(90deg,transparent,var(--cyan),transparent);box-shadow:0 0 12px var(--cyan)}
.st-modal .fb-head{margin-bottom:14px}
.st-modal .fb-title{background:linear-gradient(90deg,var(--cyan),var(--lime));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.st-range{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-bottom:16px}
.st-rg{
  font-family:var(--fd);font-size:.56rem;letter-spacing:.14em;text-transform:uppercase;cursor:pointer;
  color:var(--dim);background:var(--s1);border:1px solid var(--border);border-radius:999px;padding:8px 13px
}
.st-rg:hover{color:var(--text);border-color:var(--border2)}
.st-rg.on{color:#02121a;background:var(--cyan);border-color:var(--cyan)}
.st-rg:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}

.st-tiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:20px}
.st-tile{padding:12px 12px 10px;border:1px solid var(--border);border-radius:var(--r);background:var(--s1);min-width:0}
.st-tl{font-size:.78rem;color:var(--dim)}
.st-tv{font-family:var(--fb);font-weight:700;font-size:1.65rem;line-height:1.15;margin-top:2px;color:var(--text);font-variant-numeric:tabular-nums}
.st-tn{font-size:.7rem;color:var(--dimmer);margin-top:2px}

.st-sec{margin-bottom:20px;min-width:0}
.st-h{font-family:var(--fd);font-size:.6rem;letter-spacing:.14em;text-transform:uppercase;color:var(--cyan);margin-bottom:9px}
.st-h span{font-family:var(--fb);font-size:.76rem;letter-spacing:0;text-transform:none;color:var(--dimmer);margin-left:6px}

.st-chart-wrap{position:relative;padding-top:4px}
.st-chart{display:block;width:100%;height:auto;max-width:100%}
.st-grid{stroke:rgba(255,255,255,.08);stroke-width:1}
.st-axis{fill:rgba(255,255,255,.45);font-size:10px;font-family:var(--fb)}
.st-bar{fill:var(--cyan)}
.st-hit{fill:transparent;cursor:pointer}
.st-hit.on{fill:rgba(0,245,255,.07)}
.st-tip{
  position:absolute;top:-10px;pointer-events:none;white-space:nowrap;z-index:2;
  background:#0b0f22;border:1px solid var(--border2);border-radius:8px;padding:6px 10px;
  font-size:.8rem;line-height:1.35;color:var(--text);box-shadow:0 10px 24px rgba(0,0,0,.6)
}
.st-tip span{color:var(--dim)}

.st-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--r)}
.st-table{width:100%;border-collapse:collapse;font-size:.86rem;font-variant-numeric:tabular-nums}
.st-table th,.st-table td{padding:7px 10px;text-align:left;border-bottom:1px solid rgba(255,255,255,.05);white-space:nowrap}
.st-table thead th{font-family:var(--fd);font-size:.5rem;letter-spacing:.12em;text-transform:uppercase;font-weight:700;color:var(--dim);background:rgba(255,255,255,.03)}
.st-table tbody tr:last-child th,.st-table tbody tr:last-child td{border-bottom:0}
.st-table .n{text-align:right}
.st-table tbody th{font-weight:600;color:var(--text)}
.st-table td{color:rgba(255,255,255,.82)}
.st-table tr.idle th,.st-table tr.idle td{color:var(--dimmer)}
.st-em{margin-right:7px}
.st-mbar{display:inline-block;vertical-align:middle;width:60px;height:6px;margin-right:9px;border-radius:3px;background:rgba(0,245,255,.1);position:relative;overflow:hidden}
.st-mbar::after{content:'';position:absolute;left:0;top:0;bottom:0;width:var(--w);background:var(--cyan);border-radius:0 3px 3px 0}
.st-chip{display:inline-block;padding:1px 8px;border-radius:999px;font-size:.76rem;font-weight:700}
.st-chip.warn{background:rgba(255,215,0,.13);color:#ffe066}
.st-chip.bad{background:rgba(255,36,66,.16);color:#ff8a9a}

.st-cols{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:20px}
.st-lane{display:grid;grid-template-columns:128px minmax(0,1fr) 48px;gap:10px;align-items:center;font-size:.84rem;margin-bottom:7px}
.st-ll{color:var(--text)}
.st-lt{height:8px;border-radius:4px;background:rgba(0,245,255,.08);position:relative;overflow:hidden}
.st-lb{position:absolute;left:0;top:0;bottom:0;width:var(--w);background:var(--cyan);border-radius:0 4px 4px 0}
.st-lv{text-align:right;color:var(--text);font-variant-numeric:tabular-nums}
.st-fun{padding:10px 12px;margin-bottom:8px;border:1px solid var(--border);border-radius:var(--r);background:var(--s1);font-size:.84rem;line-height:1.5;color:var(--dim)}
.st-fun strong{color:var(--text);font-size:1.12rem;font-variant-numeric:tabular-nums}

.st-note{margin-bottom:14px;padding:10px 12px;border-radius:10px;border:1px dashed var(--border2);font-size:.84rem;line-height:1.5;color:var(--dim)}
.st-foot{margin-top:4px;font-size:.74rem;line-height:1.5;color:var(--dimmer);text-align:center}
.st-setup{text-align:left;font-size:.9rem;line-height:1.6;color:var(--text)}
.st-setup-h{font-family:var(--fd);font-size:.72rem;letter-spacing:.1em;color:var(--gold);margin-bottom:8px}
.st-setup p{margin:0 0 10px;color:rgba(255,255,255,.82)}
.st-setup code{font-size:.84em;color:#cfe4ff}
.st-rule{
  max-height:300px;overflow:auto;margin:0 0 10px;padding:10px 12px;white-space:pre;text-align:left;
  font:500 .72rem/1.5 ui-monospace,Consolas,monospace;color:#cfe4ff;background:#02020a;border:1px solid var(--border);border-radius:10px
}
@media (max-width:760px){
  .st-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .st-tile:last-child:nth-child(odd){grid-column:1 / -1}
  .st-cols{grid-template-columns:1fr}
  .st-modal{padding:24px 16px 20px}
  .st-lane{grid-template-columns:110px minmax(0,1fr) 44px}
}
body.mode-3d .st-modal{
  box-shadow:
    0 2px 0 #131a2e,0 4px 0 #131a2e,0 6px 0 #080c18,0 8px 0 #080c18,0 10px 0 #05070f,
    0 44px 70px -22px rgba(0,0,0,.95),0 0 70px rgba(0,245,255,.1),
    inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.6)
}

/* ══════════════════════════════════════════════════════════════════════
   § 24 · v53 — 🔥 HEAT
   Sits directly under CHAOS PROTOCOL and borrows its frame: the two are the
   same kind of offer (hazards that pay), one chosen by the dice and one by the
   player. Its colour runs gold → orange → red with the heat itself, because
   how hot it is IS the setting.
   ══════════════════════════════════════════════════════════════════════ */
.heat-selector{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex:none;width:100%;
  max-width:1060px;margin:-12px auto 20px;padding:9px 16px;
  border:1px solid var(--border);border-radius:var(--r);background:var(--s1);
  --heat:#ffb000;
  transition:border-color .25s ease,box-shadow .25s ease,background .25s ease
}
.heat-selector[data-band="hot"]{--heat:#ff7a00}
.heat-selector[data-band="scorching"]{--heat:#ff3d1f}
.heat-selector[data-band="inferno"]{--heat:#ff1f5a}
.heat-selector.armed{
  border-color:color-mix(in srgb,var(--heat) 55%,transparent);
  background:linear-gradient(100deg,color-mix(in srgb,var(--heat) 14%,transparent),rgba(255,36,66,.05));
  box-shadow:0 0 24px color-mix(in srgb,var(--heat) 18%,transparent)
}
.heat-open{
  display:inline-flex;align-items:center;gap:8px;cursor:pointer;
  padding:6px 14px;border-radius:20px;border:1px solid var(--border2);background:var(--s2);
  font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.16em;color:var(--dim);
  transition:all .2s ease
}
.heat-open:hover{border-color:var(--heat);color:var(--text)}
.heat-open:focus-visible{outline:2px solid var(--heat);outline-offset:2px}
.heat-selector.armed .heat-open{border-color:var(--heat);color:var(--heat);background:color-mix(in srgb,var(--heat) 14%,transparent)}
.heat-selector.armed .chaos-note{color:rgba(255,255,255,.75)}

/* ── the panel ── */
.heat-modal{max-width:640px;border-color:rgba(255,122,0,.45);box-shadow:0 0 70px rgba(255,122,0,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.heat-modal::before{background:linear-gradient(90deg,transparent,#ff7a00,transparent);box-shadow:0 0 12px #ff7a00}
.heat-modal .fb-head{margin-bottom:16px}
.heat-modal .fb-title{background:linear-gradient(90deg,#ffd000,#ff3d1f);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.heat-gauge{padding:12px 14px;margin-bottom:14px;border:1px solid var(--border);border-radius:var(--r);background:var(--s1)}
.hg-top{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:9px}
.hg-n{font-family:var(--fd);font-size:1.9rem;font-weight:900;line-height:1;color:var(--text);font-variant-numeric:tabular-nums}
.hg-of{font-size:.85rem;color:var(--dimmer)}
.hg-band{font-family:var(--fd);font-size:.56rem;letter-spacing:.18em;color:#ffb000;margin-left:4px}
.heat-gauge[data-band="hot"] .hg-band{color:#ff7a00}
.heat-gauge[data-band="scorching"] .hg-band{color:#ff5a3d}
.heat-gauge[data-band="inferno"] .hg-band{color:#ff4d7a}
.heat-gauge[data-band="off"] .hg-band{color:var(--dimmer)}
.hg-pay{margin-left:auto;font-family:var(--fd);font-size:.66rem;font-weight:900;letter-spacing:.08em;color:var(--gold)}
.hg-segs{display:grid;grid-template-columns:repeat(13,1fr);gap:3px}
.hg-segs i{height:9px;border-radius:2px;background:rgba(255,255,255,.07)}

.heat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:14px}
.heat-card{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;cursor:pointer;
  padding:10px 11px;border-radius:var(--r);border:1px solid var(--border);background:var(--s1);color:var(--text);
  font-family:var(--fb);transition:border-color .18s,background .18s,transform .18s
}
.heat-card:hover{border-color:var(--border2)}
.heat-card:focus-visible{outline:2px solid #ff7a00;outline-offset:2px}
.heat-card.on{border-color:rgba(255,122,0,.7);background:linear-gradient(135deg,rgba(255,122,0,.16),rgba(255,31,90,.08))}
.hc-ico{font-size:1.4rem;line-height:1}
.hc-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.hc-name{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.1em}
.hc-desc{font-size:.76rem;line-height:1.35;color:var(--dim)}
.heat-card.on .hc-desc{color:rgba(255,255,255,.78)}
.hc-pts{font-family:var(--fd);font-size:.8rem;font-weight:900;color:#ffb000;text-align:right;line-height:1.2}
.hc-pts em{display:block;font-style:normal;font-family:var(--fb);font-size:.66rem;font-weight:600;color:var(--dimmer)}
.heat-card.on .hc-pts{color:#ff8a3d}
.heat-rules{font-size:.78rem;line-height:1.55;color:var(--dim);margin-bottom:14px}
.heat-recs{margin-bottom:16px}
.hr-h{font-family:var(--fd);font-size:.52rem;letter-spacing:.16em;color:#ff8a3d;margin-bottom:8px}
.hr-chip{display:inline-flex;align-items:center;gap:6px;margin:0 6px 6px 0;padding:4px 10px;border-radius:999px;border:1px solid var(--border);background:var(--s1);font-size:.78rem}
.hr-chip b{color:#ff8a3d;font-variant-numeric:tabular-nums}
.hr-empty{font-size:.8rem;color:var(--dimmer)}
.heat-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
@media (max-width:560px){
  .heat-grid{grid-template-columns:1fr}
  .heat-modal{padding:24px 16px 20px}
  .heat-btns{flex-direction:column-reverse}
  .heat-btns .btn{width:100%}
}

/* the card: the record under the medal strip */
.gm-heat{margin-top:3px;font-family:var(--fd);font-size:.44rem;font-weight:900;letter-spacing:.12em;color:#ff8a3d}
/* the countdown banner when the stack is the player's own */
#chaos-banner.chaos-heat{border-color:rgba(255,122,0,.6);box-shadow:0 0 22px rgba(255,122,0,.25)}

body.mode-3d .heat-modal{
  box-shadow:
    0 2px 0 #131a2e,0 4px 0 #131a2e,0 6px 0 #080c18,0 8px 0 #080c18,0 10px 0 #05070f,
    0 44px 70px -22px rgba(0,0,0,.95),0 0 70px rgba(255,122,0,.12),
    inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.6)
}

/* ══════════════════════════════════════════════════════════════════════
   § v53 — ❄️ SEASONAL EVENTS · COLD BOOT (Dec 1 – Jan 1)
   The second event, built exactly the way NEON HAUNT is: everything scoped to
   body.ev-coldboot (set from the date by applyEventTheme()), plus the banner's
   own .evb-coldboot class, which it wears through the TEASER week too — the
   body class only exists once the window opens.
   ══════════════════════════════════════════════════════════════════════ */
body.ev-coldboot{--ev-a:#8fe3ff;--ev-b:#c9b8ff}
body.ev-coldboot::before{
  content:'';position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(120% 55% at 50% 108%,rgba(120,210,255,.13),transparent 60%),
    radial-gradient(90% 50% at 50% -8%,rgba(190,170,255,.11),transparent 62%);
}
body.ev-coldboot .hub-bar{box-shadow:0 0 34px -8px rgba(143,227,255,.42),inset 0 -1px 0 rgba(201,184,255,.35)}
body.ev-coldboot .hub-logo-sm::after{content:' ❄️';-webkit-text-fill-color:initial}
body.ev-coldboot .sec-label{text-shadow:0 0 12px rgba(143,227,255,.25)}

/* ── the banner (live and teaser) ── */
.ev-banner.evb-coldboot{
  border-color:rgba(143,227,255,.55)!important;
  background:linear-gradient(120deg,rgba(120,210,255,.13),rgba(150,120,255,.10) 60%,rgba(6,10,24,.6))!important;
  box-shadow:0 0 40px -10px rgba(143,227,255,.5)
}
.ev-banner.evb-coldboot .mp-banner-title{background:linear-gradient(90deg,#ffffff,#9fe6ff 45%,#c9b8ff);-webkit-background-clip:text;background-clip:text;filter:drop-shadow(0 0 8px rgba(143,227,255,.45))}
.ev-banner.evb-coldboot .ev-prog i{background:linear-gradient(90deg,#9fe6ff,#c9b8ff);box-shadow:0 0 10px rgba(143,227,255,.6)}
body.ev-coldboot .ev-lb-label{color:#b8ecff}

/* ── snow on the hub (never over a round) ── */
body.ev-coldboot:has(#hub-screen.active) #ev-deco{display:block}
/* The fall rides `translate` and the sway rides `transform` — two properties
   that compose — so neither animation touches layout. */
.evd-snow{
  position:absolute;top:0;color:#eaf8ff;text-shadow:0 0 8px rgba(160,225,255,.8);
  animation-name:evdSnow,evdSway;animation-timing-function:linear,ease-in-out;
  animation-iteration-count:infinite,infinite;animation-direction:normal,alternate
}
@keyframes evdSnow{from{translate:0 -8vh}to{translate:0 108vh}}
@keyframes evdSway{from{transform:translateX(-18px) rotate(-20deg)}to{transform:translateX(18px) rotate(20deg)}}
body.ev-coldboot .evd-float{filter:drop-shadow(0 0 12px rgba(143,227,255,.7))}

/* ── the shelf ── */
body.ev-coldboot .market-tab-event{color:#b8ecff!important;border-color:rgba(143,227,255,.5)!important}
body.ev-coldboot .market-tab-event.active{background:rgba(143,227,255,.13)!important;box-shadow:0 0 18px rgba(143,227,255,.3)}
body.ev-coldboot .ev-shelf-note{border-color:rgba(143,227,255,.55);background:rgba(120,210,255,.07);color:#b8ecff}
.shop-card.ev-item-coldboot{border-color:rgba(143,227,255,.45)}
.shop-card.ev-item-coldboot .shop-evtag{color:#04121c;background:linear-gradient(90deg,#e8faff,#8fe3ff);box-shadow:0 0 12px rgba(143,227,255,.5)}

/* ── 🧊 FLASH FREEZE — the event's exit state ──
   ⚠️ The layer paints its own background, like Graveyard Shift's: with a
   transparent root the 3D chrome's lifted buttons draw OVER a z-index 2500
   layer in 3D mode. */
#exit-fx.fx-freeze{background:rgba(2,8,18,.25);animation:fzOut 1.9s ease forwards}
@keyframes fzOut{0%,84%{opacity:1}100%{opacity:0}}
/* Frost closing in from every edge: an inset glow whose spread grows, over a
   pale wash that thickens behind it. */
.fz-frost{position:absolute;inset:0;
  background:radial-gradient(ellipse at center,rgba(200,238,255,0) 30%,rgba(200,238,255,.35) 75%,rgba(235,250,255,.8));
  box-shadow:inset 0 0 0 0 rgba(225,246,255,.9);animation:fzFrost 1.05s cubic-bezier(.3,.7,.3,1) both}
@keyframes fzFrost{
  from{opacity:0;box-shadow:inset 0 0 0 0 rgba(225,246,255,.9)}
  to{opacity:1;box-shadow:inset 0 0 22vmin 6vmin rgba(225,246,255,.85)}
}
.fz-cracks{position:absolute;left:50%;top:50%;width:0;height:0}
.fz-crack{position:absolute;left:0;top:0;height:2px;width:var(--l);transform-origin:0 50%;
  transform:rotate(var(--a)) scaleX(0);background:linear-gradient(90deg,#ffffff,rgba(200,240,255,.2));
  box-shadow:0 0 6px rgba(200,240,255,.9);animation:fzCrack .5s cubic-bezier(.2,.8,.2,1) both}
@keyframes fzCrack{to{transform:rotate(var(--a)) scaleX(1)}}
.fz-shards{position:absolute;inset:0}
.fz-shard{position:absolute;width:calc(9vmin * var(--s));height:calc(12vmin * var(--s));
  background:linear-gradient(135deg,rgba(240,252,255,.95),rgba(150,215,255,.55));
  clip-path:polygon(50% 0,100% 72%,18% 100%);opacity:0;
  animation:fzShard .8s cubic-bezier(.15,.7,.3,1) 1.05s both}
/* Invisible at 0% on purpose: `both` holds the first keyframe through the
   1.05s delay, and a visible one there stacked every shard in the middle of
   the ice before it had broken. */
@keyframes fzShard{
  0%{opacity:0;transform:translate(-50%,-50%) rotate(0)}
  2%{opacity:1;transform:translate(-50%,-50%) rotate(0)}
  100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) rotate(var(--r))}
}
.fz-block{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  display:flex;flex-direction:column;align-items:center;gap:.4vmin;padding:3vmin 5vmin;border-radius:2vmin;
  background:linear-gradient(160deg,rgba(235,250,255,.92),rgba(150,215,255,.7));
  border:1px solid rgba(255,255,255,.9);box-shadow:0 0 50px rgba(160,225,255,.6),inset 0 0 22px rgba(255,255,255,.7);
  color:#06263a;opacity:0;animation:fzBlock .5s cubic-bezier(.2,1.3,.4,1) 1.05s both}
.fz-block b{font-family:var(--fd);font-size:max(10px,1.6vmin);letter-spacing:.24em}
.fz-block em{font-family:var(--fd);font-style:normal;font-weight:900;font-size:max(26px,6.4vmin);line-height:1}
.fz-block i{font-family:var(--fd);font-style:normal;font-size:max(9px,1.3vmin);letter-spacing:.3em;opacity:.7}
@keyframes fzBlock{from{opacity:0;transform:translate(-50%,-50%) scale(.6)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}

/* ══════════════════════════════════════════════════════════════════════
   § 25 · v53 — 🧱 BRICK LAB
   The wall is drawn in the same colours the mission uses — a row's colour is
   its place in the wall, ARMOUR wears a heavy frame, CORE is gold — so what
   you paint is what the round lays down.
   ══════════════════════════════════════════════════════════════════════ */
.lab-banner{border-color:rgba(0,245,255,.35)}
.lab-modal{max-width:560px;border-color:rgba(0,245,255,.42);box-shadow:0 0 70px rgba(0,245,255,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.lab-modal::before{background:linear-gradient(90deg,transparent,var(--cyan),transparent);box-shadow:0 0 12px var(--cyan)}
.lab-modal .fb-head{margin-bottom:16px}
.lab-modal .fb-title{background:linear-gradient(90deg,#9fe6ff,var(--purple));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}

.lab-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.lab-name-l{font-family:var(--fd);font-size:.5rem;letter-spacing:.16em;color:var(--dim)}
.lab-name{flex:1;min-width:150px;font-family:var(--fd);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;padding:9px 12px}
.lab-count{font-family:var(--fd);font-size:.5rem;letter-spacing:.14em;color:var(--dimmer);font-variant-numeric:tabular-nums}

.lab-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.lab-tool{
  display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;cursor:pointer;
  padding:8px 6px;border-radius:10px;border:1px solid var(--border);background:var(--s1);color:var(--text);
  font-family:var(--fd);font-size:.52rem;font-weight:900;letter-spacing:.1em
}
.lab-tool em{flex-basis:100%;text-align:center;font-style:normal;font-family:var(--fb);font-size:.66rem;font-weight:600;letter-spacing:0;color:var(--dimmer)}
.lab-tool.on{border-color:var(--cyan);background:rgba(0,245,255,.1);box-shadow:0 0 14px rgba(0,245,255,.22)}
.lab-tool:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.lt-sw{width:18px;height:10px;border-radius:3px}

/* The cell colours. --row picks the mission's row colour, cycling every five
   rows the way both builds do. */
.lab-cell{--rc:#ff0090}
.lab-cell[style*="--row:1"]{--rc:#a855f7}
.lab-cell[style*="--row:2"]{--rc:#00f5ff}
.lab-cell[style*="--row:3"]{--rc:#39ff14}
.lab-cell[style*="--row:4"]{--rc:#ffd700}
.lab-cell[style*="--row:5"]{--rc:#ff0090}
.lab-cell[style*="--row:6"]{--rc:#a855f7}
.lab-cell.t0{background:rgba(255,255,255,.035);border:1px dashed rgba(255,255,255,.08)}
.lab-cell.t1{background:var(--rc);border:1px solid rgba(255,255,255,.25);box-shadow:0 0 8px color-mix(in srgb,var(--rc) 55%,transparent),inset 0 2px 0 rgba(255,255,255,.3)}
.lab-cell.t2{background:var(--rc);border:3px solid rgba(8,10,24,.75);outline:1px solid rgba(255,255,255,.55);outline-offset:-4px;box-shadow:0 0 8px color-mix(in srgb,var(--rc) 55%,transparent)}
.lab-cell.t3{background:linear-gradient(135deg,#fff6b0,#ffd700 55%,#e0a800);border:1px solid #fff2a0;box-shadow:0 0 12px rgba(255,215,0,.7);
  display:flex;align-items:center;justify-content:center}
/* The star is what tells a CORE from the fifth row, whose own colour is gold. */
.lab-cell.t3::after{content:'★';font-size:.62rem;line-height:1;color:rgba(60,36,0,.85)}
/* The palette swatches use the same faces, in the cyan row. */
.lt-sw.t1{background:#00f5ff;box-shadow:0 0 6px rgba(0,245,255,.6)}
.lt-sw.t2{background:#00f5ff;border:2px solid rgba(8,10,24,.8);outline:1px solid rgba(255,255,255,.6);outline-offset:-3px}
.lt-sw.t3{background:linear-gradient(135deg,#fff6b0,#ffd700);box-shadow:0 0 6px rgba(255,215,0,.7)}
.lt-sw.t0{background:none;border:1px dashed rgba(255,255,255,.4)}

.lab-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;padding:10px;margin:0 0 8px;
  border-radius:var(--r);border:1px solid var(--border);background:rgba(0,0,0,.35)}
.lab-grid .lab-cell{display:flex;align-items:center;justify-content:center;aspect-ratio:2.1 / 1;border-radius:3px;padding:0;min-width:0}
.lab-grid.edit{touch-action:none;user-select:none;-webkit-user-select:none}
.lab-grid.edit .lab-cell{cursor:pointer;aspect-ratio:1.7 / 1}
.lab-grid.edit .lab-cell:hover{filter:brightness(1.25)}
.lab-grid.edit .lab-cell:focus-visible{outline:2px solid #fff;outline-offset:1px}
.lab-hint{font-size:.76rem;color:var(--dimmer);margin-bottom:12px;line-height:1.45}

.lab-presets{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:14px}
.lab-presets span{font-family:var(--fd);font-size:.48rem;letter-spacing:.16em;color:var(--dimmer);margin-right:4px}
.lab-pre{cursor:pointer;padding:6px 10px;border-radius:999px;border:1px solid var(--border);background:var(--s1);
  color:var(--dim);font-family:var(--fd);font-size:.48rem;font-weight:900;letter-spacing:.12em}
.lab-pre:hover{color:var(--text);border-color:var(--border2)}
.lab-pre:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}

.lab-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-bottom:12px}
.lab-load{display:flex;gap:8px;margin-bottom:8px}
.lab-load .input{flex:1;min-width:0;font-size:.8rem;padding:8px 10px}
.lab-out{margin-bottom:8px;overflow-wrap:anywhere}
.lab-out .replay-code{display:inline;word-break:break-all}
.lab-note{font-size:.76rem;line-height:1.5;color:var(--dimmer);text-align:center}
.lab-note b{color:var(--text)}

.lab-res{text-align:center;margin-bottom:12px}
.lab-res-name{font-family:var(--fd);font-size:.8rem;font-weight:900;letter-spacing:.1em;color:var(--cyan);overflow-wrap:anywhere}
.lab-res-name em{font-family:var(--fb);font-style:normal;font-weight:600;font-size:.8rem;letter-spacing:0;color:var(--dim)}
.lab-res-pts{font-family:var(--fd);font-size:2.3rem;font-weight:900;color:var(--gold);line-height:1.2;margin-top:6px;font-variant-numeric:tabular-nums}
.lab-res-pts span{font-size:.5rem;letter-spacing:.16em;color:var(--dimmer);margin-left:6px}
.lab-res-best{font-family:var(--fd);font-size:.52rem;letter-spacing:.14em;color:var(--dim);margin:4px 0 12px}
.lab-res-rows{text-align:left;margin-bottom:12px}
@media (max-width:520px){
  .lab-modal{padding:24px 14px 18px}
  .lab-grid{gap:3px;padding:7px}
  .lab-tools{gap:6px}
  .lab-btns{flex-direction:column}
  .lab-btns .btn{width:100%}
}
body.mode-3d .lab-modal{
  box-shadow:
    0 2px 0 #131a2e,0 4px 0 #131a2e,0 6px 0 #080c18,0 8px 0 #080c18,0 10px 0 #05070f,
    0 44px 70px -22px rgba(0,0,0,.95),0 0 70px rgba(0,245,255,.12),
    inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.6)
}

/* ── v54: THE LAB HOLDS EVERY MISSION ──────────────────────────────────
   A mission chip at the top of the editor (tap to change), a picker of all
   thirty, and one generic grid: each cell is a tool's own colour (--c) with
   its glyph, sized off the grid's column count (--cols, --ar, --gap and the
   font size are set inline per mission). The wall keeps v53's faces above. */
.lab-modal{max-width:680px}
.lab-mbtn{
  display:flex;align-items:center;gap:12px;width:100%;margin:0 0 14px;padding:10px 14px;cursor:pointer;
  border-radius:12px;border:1px solid rgba(0,245,255,.35);background:rgba(0,245,255,.06);color:var(--text);text-align:left
}
.lab-mbtn:hover{border-color:var(--cyan);background:rgba(0,245,255,.1)}
.lab-mbtn:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.lm-emoji{font-size:1.6rem;line-height:1}
.lm-txt{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.lm-txt b{font-family:var(--fd);font-size:.72rem;font-weight:900;letter-spacing:.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lm-txt em{font-style:normal;font-family:var(--fd);font-size:.48rem;font-weight:700;letter-spacing:.16em;color:var(--cyan)}
.lm-chg{font-family:var(--fd);font-size:.48rem;font-weight:700;letter-spacing:.14em;color:var(--dim);white-space:nowrap}

.lab-picks{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px;margin-bottom:14px}
.lab-pick{
  position:relative;display:flex;flex-direction:column;align-items:center;gap:5px;padding:12px 6px 10px;cursor:pointer;
  border-radius:12px;border:1px solid var(--border);background:var(--s1);color:var(--text)
}
.lab-pick:hover{border-color:var(--border2);background:var(--s2)}
.lab-pick:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.lab-pick.on{border-color:var(--cyan);box-shadow:0 0 14px rgba(0,245,255,.2)}
.lp-emoji{font-size:1.5rem;line-height:1}
.lp-name{font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.08em;text-align:center;line-height:1.35}
.lp-what{font-family:var(--fd);font-size:.42rem;font-weight:700;letter-spacing:.14em;color:var(--cyan)}
.lp-dot{position:absolute;top:7px;right:7px;width:7px;height:7px;border-radius:50%;background:var(--lime);box-shadow:0 0 6px var(--lime)}

.lab-grid{grid-template-columns:repeat(var(--cols,10),minmax(0,1fr));gap:var(--gap,4px);margin:0 auto 8px}
.lab-grid .lab-cell,.lab-grid.edit .lab-cell{aspect-ratio:var(--ar,1)}
.lab-cell.lv{
  background:rgba(255,255,255,.035);border:1px dashed rgba(255,255,255,.08);border-radius:3px;
  color:#fff;line-height:1;font-weight:900;overflow:hidden;padding:0;font-size:inherit
}
.lab-cell.lv.bf{color:rgba(255,255,255,.32)}
.lab-cell.lv.on{
  background:var(--c);border:1px solid rgba(255,255,255,.28);
  box-shadow:0 0 6px color-mix(in srgb,var(--c) 55%,transparent),inset 0 1px 0 rgba(255,255,255,.28);
  text-shadow:0 1px 2px rgba(0,0,0,.75)
}
.lab-cell.lv.lk{background:var(--c,rgba(255,255,255,.08));border:1px solid rgba(255,255,255,.1);opacity:.75;cursor:not-allowed}
/* The chart's time grid: a line on every beat, a brighter one on every bar. */
.lab-grid .lab-cell.beat{box-shadow:inset 0 1px 0 rgba(255,255,255,.14)}
.lab-grid .lab-cell.bar{box-shadow:inset 0 2px 0 rgba(0,245,255,.45)}
.lab-grid .lab-cell.lv.on.beat,.lab-grid .lab-cell.lv.on.bar{box-shadow:0 0 6px color-mix(in srgb,var(--c) 55%,transparent)}
/* A course column with its gap painted: the rest of it is wall. */
.lab-cell.lv.cf{background:var(--c);border:1px solid rgba(255,255,255,.06)}
.lab-grid.dense{padding:6px}
.lab-grid.dense .lab-cell{border-radius:1px}
.lab-grid.dense .lab-cell.lv{border:0;background:rgba(255,255,255,.055)}
.lab-grid.dense .lab-cell.lv.on,.lab-grid.dense .lab-cell.lv.lk{border:0;background:var(--c)}
.lab-grid.dense .lab-cell.lv.bf{background:rgba(255,255,255,.055)}
/* A sequence's step numbers can run to "3·11·17" on one cell. */
.lab-grid.seq .lab-cell.lv{font-size:.9em;letter-spacing:-.02em;word-break:break-all}
.lab-tools.many{grid-template-columns:repeat(auto-fit,minmax(86px,1fr))}
.lt-sw.lv{display:inline-flex;align-items:center;justify-content:center;width:18px;height:14px;border-radius:3px;
  background:var(--c);font-size:.58rem;line-height:1;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.7)}
.lab-arrow{font-family:var(--fd);font-size:.46rem;font-weight:700;letter-spacing:.16em;color:var(--dimmer);text-align:center;margin:0 0 6px}
.lab-check{font-size:.8rem;line-height:1.45;margin:-4px 0 12px;text-align:center}
.lab-check:empty{display:none}
.lab-check.block{color:#ff5a6e}
.lab-check.warn{color:var(--gold)}
.lab-words{width:100%;min-height:112px;margin-bottom:8px;resize:vertical;text-transform:lowercase;
  font:600 .9rem/1.5 ui-monospace,Consolas,Menlo,monospace}
.lab-words-prev{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin-bottom:10px;max-height:170px;overflow:auto}
.lab-words-prev span{padding:3px 8px;border-radius:6px;background:rgba(57,255,20,.1);border:1px solid rgba(57,255,20,.3);
  font:700 .8rem ui-monospace,Consolas,Menlo,monospace;color:#caffd8}
.lab-res-mission{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.16em;color:var(--dim);margin-bottom:5px}
@media (max-width:520px){
  .lab-picks{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:6px}
  .lab-mbtn{padding:9px 11px}
}

/* ══════════════════════════════════════════════════════════════════════
   § 26 · v53 — ⌨️ COMMAND LINE
   The keypad under the board (touch only) and the 3D build's word labels.
   Monospace on purpose: a word you have to type is read letter by letter,
   and a fixed pitch keeps the typed half and the rest lined up.
   ══════════════════════════════════════════════════════════════════════ */
#g-type-keys{
  display:flex;flex-direction:column;gap:6px;margin:10px auto 0;
  width:var(--board-w,100%);max-width:100%;
  user-select:none;-webkit-user-select:none;touch-action:manipulation
}
.tk-row{display:flex;gap:5px;justify-content:center}
.tk-key{
  flex:1 1 0;min-width:0;max-width:46px;height:46px;padding:0;border-radius:8px;cursor:pointer;
  border:1px solid var(--border2);background:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.035));
  color:var(--text);font:700 1.08rem ui-monospace,Consolas,Menlo,monospace;text-transform:lowercase;
  box-shadow:0 2px 0 rgba(0,0,0,.45);transition:background .08s,border-color .08s,transform .08s
}
.tk-key.down{background:rgba(57,255,20,.28);border-color:var(--lime);transform:translateY(1px);box-shadow:0 0 12px rgba(57,255,20,.4)}
.tk-back{flex-grow:1.5;max-width:66px;color:var(--pink);font-size:1.2rem}
@media (max-height:700px){ .tk-key{height:40px} }

.cmd-lbl{
  position:absolute;left:0;top:0;padding:2px 8px;border-radius:5px;white-space:nowrap;pointer-events:none;
  font:700 15px ui-monospace,Consolas,Menlo,monospace;color:#eaf6ff;
  background:rgba(4,4,14,.74);border:1px solid rgba(255,255,255,.16);will-change:transform
}
.cmd-lbl b{color:#00f5ff;text-shadow:0 0 8px rgba(0,245,255,.7)}
.cmd-lbl.lock{border-color:#00f5ff;background:rgba(0,30,40,.86);box-shadow:0 0 12px rgba(0,245,255,.45)}
.cmd-lbl.boss{font-size:18px;border-color:rgba(255,176,0,.65)}

/* ══════════════════════════════════════════════════════════════════════
   § 28 · v55 — 📲 INSTALL · 💾 SAVE WITH GOOGLE
   ══════════════════════════════════════════════════════════════════════ */
/* Google's own dark button: a near-black face, a grey hairline, the four-colour
   G at 20px and the label beside it. Case and letter-spacing follow the arcade. */
.btn-google{display:flex;align-items:center;justify-content:center;gap:12px;
  background:#131314;color:#e3e3e3;border:1px solid #8e918f;letter-spacing:.06em}
.btn-google .g-logo{width:20px;height:20px;flex:none;display:block}
.btn-google:hover:not(:disabled){background:#1f2023;border-color:#c4c7c5;transform:translateY(-2px);box-shadow:0 0 26px rgba(255,255,255,.08)}
.btn-google:active:not(:disabled){transform:scale(.97)}
.btn-google:disabled{opacity:.55;cursor:progress;transform:none;box-shadow:none}
#btn-google{margin-top:12px}
.up-or{margin:14px 0 12px}
body.mode-3d .btn-google{--wall:#3a3d44;--wallb:#17181b}

/* One line on the results card: an icon, a sentence, the action and a ✕. */
.res-nudge{display:flex;align-items:center;gap:10px;margin:10px 0 2px;padding:10px 10px 10px 14px;
  border:1px solid rgba(0,245,255,.32);border-radius:var(--r);background:rgba(0,245,255,.05);text-align:left}
.res-nudge[hidden]{display:none}
.res-nudge.save{border-color:rgba(255,215,0,.42);background:rgba(255,215,0,.06)}
.res-nudge .rn-ico{font-size:1.35rem;flex:none;line-height:1}
.res-nudge .rn-txt{flex:1;min-width:0;font-size:.86rem;line-height:1.35;color:var(--dim)}
.res-nudge .rn-txt b{color:var(--text);font-weight:700}
.res-nudge .rn-go{flex:none;padding:10px 14px;font-size:.62rem;white-space:nowrap}
.res-nudge .rn-go .g-logo{width:16px;height:16px}
.res-nudge .rn-x{flex:none;width:34px;height:34px;padding:0;border-radius:8px;font-size:.8rem;line-height:1;
  background:transparent;color:var(--dimmer);border:1px solid var(--border)}
.res-nudge .rn-x:hover{color:var(--text);border-color:var(--border2)}
@media (max-width:560px){
  .res-nudge{flex-wrap:wrap;padding:10px 12px}
  .res-nudge .rn-txt{flex:1 1 calc(100% - 80px)}
  .res-nudge .rn-go{flex:1 1 auto}
}
body.mode-3d .res-nudge .rn-x{--wall:#1b2237;--wallb:#0a0e1a}

/* The iPhone / iPad how-to: numbered steps with the icon Safari actually shows. */
.inst-tint .fb-modal{border-color:rgba(0,245,255,.42);box-shadow:0 0 70px rgba(0,245,255,.13),inset 0 0 0 1px rgba(255,255,255,.03)}
.inst-steps{list-style:none;margin:6px 0 16px;padding:0;counter-reset:inst}
.inst-steps li{counter-increment:inst;display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--border);font-size:.95rem;line-height:1.4;color:var(--dim)}
.inst-steps li:first-child{border-top:none}
.inst-steps li::before{content:counter(inst);flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;
  font-family:var(--fd);font-size:.62rem;font-weight:700;color:#01131a;background:var(--cyan)}
.inst-steps b{color:var(--text)}
.inst-glyph{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:8px;border:1px solid var(--border2);
  background:var(--s2);color:var(--cyan);vertical-align:middle;margin:0 2px}
.inst-glyph svg{width:18px;height:18px}
.inst-note{font-size:.8rem;color:var(--dimmer);line-height:1.45;margin-bottom:14px}
/* 📱 v155 · The same sheet answers the full-screen button on a device with no full-screen switch (an iPhone):
   one line first, saying why the steps below are the way to a full screen. And the note under the steps now
   opens on what a guest must do first, so that part is lit. */
.inst-lead{margin:2px 0 10px;font-size:.92rem;line-height:1.45;color:var(--dim)}
.inst-lead b,.inst-note b{color:var(--text)}
/* A phone's browser leaves the sheet some 600px between its bars: the steps close up there, so the sheet's
   button is on screen without scrolling for it. */
@media (max-height:720px){
  .inst-steps{margin:2px 0 12px}
  .inst-steps li{padding:8px 0}
}

/* ═════════════════════════════════════════════════
   v155 — 📱 FULL SCREEN, ON EVERY PHONE · the button's icon
   The two full-screen buttons (#btn-fs-hub in the hub bar, #btn-fs-game in a
   round's action cluster) carried a typed glyph, ⛶, and ⛉ on the way back
   out: two characters from a corner of Unicode that not every phone's fonts
   carry, on the buttons a phone needs most. They are drawn now: four corners
   pointing out, four pointing in (FS_ICON in app.js), in the button's own
   colour like the ⚙️ gear. Sized so neither button changes height: the glyph's
   line box was as tall as this.
   ═════════════════════════════════════════════════ */
.fs-ico{display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.6;
  stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
/* (the padding makes the hub's button the 31×28 box the glyph made on a computer, so the bar is not a pixel wider) */
#btn-fs-hub{display:inline-flex;align-items:center;justify-content:center;line-height:1;padding:6px 7.5px}
/* A thumb reads a bigger mark; the button is 44px there either way (§ 32). */
@media (pointer:coarse){ .fs-ico{width:17px;height:17px;stroke-width:2.4} }
/* …except in the header's compaction tiers (fitHud), where a round's buttons are 30px squares with 6px of padding:
   the mark gives back a pixel there, or the square would be 31 wide and the row a pixel longer than fitHud fitted. */
@media (pointer:coarse){ .g-hdr.hud-t1 .fs-ico{width:16px;height:16px} }
/* Pressed in a live round on an iPhone, the button holds the round and opens the Home Screen sheet (fsHomeSheet):
   the sheet stands OVER the pause menu, which sits above every other overlay (2100), as HOW TO PLAY does. */
body.round-paused #inst-overlay{z-index:2150}
/* …and with it a 3D round's cluster is five buttons on an iPhone too (⏸ 🔊 📸 ✨ and this one). Five 44px
   squares and their gaps are 252px: on a 320px screen (a small iPhone, or any iPhone with Display Zoom on) that
   reached 18px into ← QUIT, as it always had on an Android phone that narrow. Under 350px the squares give up
   4px of width each and half their gaps, which clears QUIT with room to spare and keeps the 44px height a
   thumb needs; under 300px (a folded phone's cover screen) they tighten once more. */
@media (max-width:349px){
  .g-actions{gap:4px}
  .g-actions .btn-sm{min-width:40px;padding-left:4px;padding-right:4px}
}
@media (max-width:299px){
  .g-actions{gap:3px}
  .g-actions .btn-sm{min-width:34px;padding-left:2px;padding-right:2px}
}

/* The callsign dialog: a new Google account names itself before the hub. */
.cs-modal{max-width:420px}
.cs-cancel{margin-top:10px}

/* ══════════════════════════════════════════════════════════════════════
   § 29 · v55 — 🌐 LAB GALLERY
   ══════════════════════════════════════════════════════════════════════ */
.lab-switch{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;margin:0 0 14px;border:1px solid var(--border);border-radius:12px;background:rgba(0,0,0,.25)}
.lab-sw{font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.12em;padding:10px 8px;border-radius:9px;border:1px solid transparent;
  background:transparent;color:var(--dim);cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease}
.lab-sw:hover{color:var(--text);background:var(--s1)}
.lab-sw.on{color:#01131a;background:linear-gradient(90deg,var(--cyan),#8b7bff);border-color:rgba(255,255,255,.25)}
body.mode-3d .lab-sw.on{box-shadow:0 1px 0 #0a8f9a,0 2px 0 #0a8f9a,0 3px 0 #05545c,0 6px 10px -4px rgba(0,0,0,.8)}

.gal-msg{text-align:center;padding:26px 10px 18px}
.gal-msg-h{font-family:var(--fd);font-size:.78rem;font-weight:900;letter-spacing:.1em;color:var(--cyan);margin-bottom:10px}
.gal-msg p{font-size:.9rem;line-height:1.5;color:var(--dim);margin-bottom:14px}

.gal-lotd{border:1px solid rgba(255,215,0,.45);border-radius:14px;background:linear-gradient(160deg,rgba(255,215,0,.08),rgba(0,0,0,.2));padding:12px 12px 14px;margin-bottom:14px}
.gal-lotd-h{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.18em;color:var(--gold);margin-bottom:10px;display:flex;justify-content:space-between;gap:8px}
.gal-lotd-h span{color:var(--dimmer);font-weight:700;letter-spacing:.1em}
.gal-lotd-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:12px;align-items:center}
.gal-lotd-prev .lab-grid{margin:0;max-height:180px;overflow:hidden}
.gal-lotd-prev .lab-words-prev{max-height:150px;overflow:hidden}
.gal-lotd-txt{display:flex;flex-direction:column;gap:3px;min-width:0}
.gal-lotd-m{font-family:var(--fd);font-size:.5rem;letter-spacing:.14em;color:var(--dim)}
.gal-lotd-txt b{font-family:var(--fd);font-size:.9rem;font-weight:900;letter-spacing:.06em;color:#fff;overflow-wrap:anywhere}
.gal-lotd-txt em{font-style:normal;font-size:.85rem;color:var(--dim)}
.gal-lotd-s{font-size:.8rem;color:var(--dimmer);margin:2px 0 6px}
.gal-lotd-b{display:flex;gap:8px;flex-wrap:wrap}

.gal-ctl{display:flex;gap:8px;align-items:center;margin-bottom:10px;flex-wrap:wrap}
.gal-sel{flex:1 1 220px;min-width:0;font-size:.82rem;padding:9px 10px}
.gal-sort{display:flex;gap:4px;padding:3px;border:1px solid var(--border);border-radius:10px;flex:none}
.gal-srt{font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.1em;padding:8px 10px;border-radius:7px;border:none;background:transparent;color:var(--dim);cursor:pointer}
.gal-srt.on{background:var(--s2);color:var(--text);box-shadow:inset 0 0 0 1px var(--border2)}

.gal-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.gal-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"em main st" "em acts acts";gap:4px 10px;align-items:center;
  padding:10px 10px 10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--s1)}
.gal-row.flash{border-color:var(--cyan);box-shadow:0 0 0 1px rgba(0,245,255,.35),0 0 18px rgba(0,245,255,.18)}
.gal-em{grid-area:em;font-size:1.5rem;line-height:1}
.gal-main{grid-area:main;display:flex;flex-direction:column;min-width:0}
.gal-main b{font-family:var(--fd);font-size:.66rem;font-weight:900;letter-spacing:.08em;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gal-main em{font-style:normal;font-size:.78rem;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gal-chip{align-self:flex-start;margin-top:4px;font-family:var(--fd);font-size:.44rem;letter-spacing:.12em;color:var(--pink);border:1px solid currentColor;border-radius:20px;padding:2px 8px}
.gal-st{grid-area:st;font-family:var(--fd);font-size:.56rem;letter-spacing:.06em;color:var(--dim);white-space:nowrap}
.gal-lk.on{color:var(--pink)}
.gal-acts{grid-area:acts;display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.gal-acts .btn{padding:7px 12px}
.gal-like.on,#lab-res-like.on{color:var(--pink);border-color:rgba(255,0,144,.55);background:rgba(255,0,144,.1)}
.gal-empty{text-align:center;font-size:.9rem;line-height:1.5;color:var(--dim);padding:22px 8px}
.gal-empty b{color:var(--text)}
.gal-more{margin-bottom:10px}
@media (max-width:560px){
  .gal-lotd-in{grid-template-columns:1fr}
  .gal-lotd-prev .lab-grid{max-height:140px}
}

/* The hub banner's featured level: a slim second line under the banner text. */
.lab-lotd{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin-top:8px;padding:7px 10px;border-radius:9px;cursor:pointer;text-align:left;
  border:1px solid rgba(255,215,0,.4);background:rgba(255,215,0,.07);color:var(--text);font-family:var(--fb);max-width:100%}
.lab-lotd[hidden]{display:none}
.lab-lotd:hover{background:rgba(255,215,0,.13);border-color:var(--gold)}
.lab-lotd-k{font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.14em;color:var(--gold)}
.lab-lotd-n{font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.06em;color:#fff}
.lab-lotd-b{font-size:.8rem;color:var(--dim)}

/* ══════════════════════════════════════════════════════════════
   § v56 — 🌐 OPEN WORLD (app.js § 31)
   Every mission's world with no borders. The grid's mode switch, the
   modes' lane switches and the in-round HUD canvas. Furniture reused
   (.mp-banner, .fb-overlay); only the accents are new.
   ══════════════════════════════════════════════════════════════ */
/* 🌐 v60 · The modes' lane switches: ▶ CLASSIC, 🧊 3D or 🌐 OPEN WORLD on each event
   banner (§ 31), in the grid switch's language at a banner's size. */
.lane-pick{
  display:inline-flex;margin-top:8px;max-width:100%;position:relative;z-index:1;
  border:1px solid var(--border2);border-radius:999px;overflow:hidden;background:rgba(4,8,18,.55)
}
.lp-seg{
  font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.08em;
  padding:6px 11px;border:0;background:transparent;color:var(--dim);cursor:pointer;
  transition:background .18s,color .18s;white-space:nowrap
}
.lp-seg:hover{color:#fff}
.lp-seg:focus-visible{outline:2px solid var(--cyan);outline-offset:-2px}
.lp-seg.on{color:#fff;background:linear-gradient(90deg,rgba(0,245,255,.22),rgba(0,245,255,.08))}
.lp-seg[data-v="open"].on{background:linear-gradient(90deg,rgba(255,45,154,.38),rgba(255,138,58,.26));box-shadow:inset 0 0 14px rgba(255,90,180,.25)}
.lp-seg[data-v="3d"].on{background:linear-gradient(90deg,rgba(168,85,247,.38),rgba(0,245,255,.18));box-shadow:inset 0 0 14px rgba(168,85,247,.25)}
.lp-seg+.lp-seg{border-left:1px solid var(--border2)}
.lane-pick.no-ow .lp-seg[data-v="open"],.lane-pick.no-ow .lp-seg[data-v="3d"]{opacity:.4;cursor:not-allowed}
/* A banner on its open-world lane wears the grid's open-world edge. */
.mp-banner.lane-ow{border-color:rgba(255,120,200,.5);box-shadow:0 0 26px rgba(255,45,154,.12)}
@media(max-width:700px){
  .lane-pick{margin-left:auto;margin-right:auto}
}
@media(max-width:380px){
  .lp-seg{padding:6px 8px;letter-spacing:.04em}
}

/* The mode switch above the grid. */
.ow-switch{
  display:flex;gap:0;margin:2px 0 12px;width:fit-content;max-width:100%;
  border:1px solid var(--border2);border-radius:999px;overflow:hidden;background:var(--s1)
}
.ow-seg{
  font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.08em;
  padding:9px 16px;border:0;background:transparent;color:var(--dim);cursor:pointer;
  transition:background .18s,color .18s;white-space:nowrap
}
.ow-seg em{font-style:normal;font-size:.48rem;opacity:.7;margin-left:4px;letter-spacing:.12em}
.ow-seg:hover{color:#fff}
.ow-seg.on{color:#fff;background:linear-gradient(90deg,rgba(0,245,255,.22),rgba(0,245,255,.08))}
.ow-seg[data-owm="open"].on{background:linear-gradient(90deg,rgba(255,45,154,.35),rgba(255,138,58,.25));box-shadow:inset 0 0 18px rgba(255,90,180,.25)}

/* Cards in OPEN WORLD mode: a ribbon, a warmer edge. */
.gc-ow{
  display:none;position:absolute;top:12px;left:50%;transform:translateX(-50%);
  padding:3px 10px;border-radius:20px;white-space:nowrap;
  font-family:var(--fd);font-size:.42rem;font-weight:900;letter-spacing:.12em;
  color:#fff;background:linear-gradient(90deg,#ff2d9a,#ff8a3a);box-shadow:0 0 12px rgba(255,60,150,.45);
  pointer-events:none;z-index:2
}
.games-grid.ow-mode .gc-ow{display:block}
.games-grid.ow-mode .game-card:not(.locked){border-color:rgba(255,120,200,.38);
  box-shadow:inset 0 0 26px rgba(255,45,154,.07)}
.games-grid.ow-mode .game-card:not(.locked):hover{border-color:#ff8ac8;box-shadow:0 0 22px rgba(255,45,154,.22)}
.games-grid.ow-mode .game-card.ow-none{opacity:.45}

/* The picker. */
.ow-tint .fb-modal{border-color:rgba(255,120,200,.42)}
.ow-tint .fb-title{
  background:linear-gradient(90deg,#ff5ab4,#ffb35c 45%,#5ee7ff);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent
}
.ow-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.ow-card:hover:not(.locked){border-color:#ff8ac8}
.ow-tag{font-size:.74rem;line-height:1.25;color:rgba(255,255,255,.78)}
.res-bonus-ow{color:#ffb35c;border-color:#ff8ac8;background:linear-gradient(90deg,rgba(255,45,154,.12),rgba(255,138,58,.08))}

/* The in-round HUD: one canvas over the board, never in the way of input. */
.ow-hud{position:absolute;left:0;top:0;pointer-events:none}

/* ⚡ v60 · THE ABILITY STRIP — the 3D builds' readout of banked special
   abilities (see abilityStrip() in app.js). Rides the GL fx layer, bottom
   centre, above the board's own edge and clear of the touch pad. */
.gl-abil{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);display:flex;gap:8px;
  align-items:center;pointer-events:none;z-index:3;font:700 11px/1 'Orbitron','Rajdhani',sans-serif;
  letter-spacing:.06em;white-space:nowrap}
.gl-abil:empty{display:none}
.gl-abil.tap .ga-next{pointer-events:auto;cursor:pointer}
.gl-abil .ga-next,.gl-abil .ga-on{position:relative;overflow:hidden;padding:7px 11px;border-radius:7px;
  background:rgba(4,8,18,.72);border:1.5px solid var(--ac,#00f5ff);color:#fff;
  box-shadow:0 0 10px color-mix(in srgb,var(--ac,#00f5ff) 45%,transparent)}
.gl-abil .ga-next b{color:var(--ac,#00f5ff);margin-right:4px}
.gl-abil .ga-next em{font-style:normal;opacity:.65;margin-left:4px}
.gl-abil .ga-on{color:var(--ac,#00f5ff)}
.gl-abil .ga-on i{position:absolute;left:0;bottom:0;height:2px;background:var(--ac,#00f5ff)}
@media (max-width:520px){.gl-abil{font-size:9px;bottom:6px}.gl-abil .ga-next,.gl-abil .ga-on{padding:5px 8px}}

/* ══════════════════════════════════════════════════════════════════════
   § 32 · v62 — 📱 MOBILE · the thumb zone, the phone header, side consoles,
                            grids that fit, and Math Blitz's number pad
   The layout half of the phone pass; app.js § 32 is the behaviour half, and
   fitCanvas() carries the thumb gap. Every rule here is scoped to a phone
   (touch, or a narrow / short viewport): a desktop renders exactly as before.
   ══════════════════════════════════════════════════════════════════════ */

/* ── 👍 A PAD SIZED FOR A THUMB ──
   fitCanvas() lands the pad on the bottom edge of a portrait phone, and the
   dead screen it used to sit over is room the buttons can grow into. A tenth
   of the screen's height, so a short phone keeps the 68px it had and a tall one
   gets a button that can be hit without looking. */
@media (pointer:coarse) and (orientation:portrait){
  .ctrl-btn{min-height:clamp(68px,10vh,92px)}
}

/* ── 📱 THE PHONE HEADER ──
   Four rows on a portrait phone — title, controls, readouts, hint — and every
   row of chrome above an aspect-locked board comes straight off the board on a
   short screen (an iPhone SE in Safari drew Neon Nebula at 296px wide on a
   363px column). In 2D, 📸 and ✨ have nothing to act on: photo mode needs the
   3D renderer and says so, and the graphics profile only draws in 3D. With
   them gone the title fits BETWEEN Quit and the cluster, on the control row,
   in up to two lines. 3D keeps the full cluster and its title row. */
@media (max-width:700px) and (orientation:portrait){
  body:not(.mode-3d) .g-actions #btn-photo,
  body:not(.mode-3d) .g-actions #btn-gfx-game{display:none}
  body:not(.mode-3d) .g-hdr > #btn-quit,
  body:not(.mode-3d) .g-hdr > .g-actions{grid-row:1}
  body:not(.mode-3d) .g-title{
    grid-column:2;grid-row:1;min-width:0;
    font-size:.62rem;line-height:1.35;letter-spacing:.04em;
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    overflow:hidden;overflow-wrap:anywhere
  }
  body:not(.mode-3d) .g-stats{grid-row:2}
  body:not(.mode-3d) .g-controls{grid-row:3}
}
/* A SHORT portrait phone gives up the hint line too — the same trade the
   landscape layout already makes. The gesture was shown over the board as the
   round began, and the pause menu repeats it (paintPauseMenu). */
@media (pointer:coarse) and (orientation:portrait) and (max-height:620px){
  .g-controls{display:none}
}

/* ── ⌨️ CONSOLES BESIDE THE BOARD, ON A LANDSCAPE PHONE ──
   Command Line's keyboard is three rows of keys tracking the board's width.
   Under the board on a 390px-tall screen it left the board 150px wide, squeezed
   the keys to slivers and still ran its bottom row off the glass. In landscape
   the width is the spare thing, so the keyboard (and Math Blitz's 3D answer
   console, with its pad) stands BESIDE the board instead; fitCanvas() sees
   .g-area turn into a row and charges the console to the board's width. */
@media (max-height:500px) and (orientation:landscape){
  #game-screen.type-keys-on .g-area,
  #game-screen.canvas-game:has(#g-math.math-3d.has-keys) .g-area{
    flex-direction:row;justify-content:center;align-items:center;column-gap:12px
  }
  #game-screen.type-keys-on #g-type-keys{width:min(46vw,440px);margin:0;flex-shrink:0}
  #game-screen.canvas-game:has(#g-math.math-3d.has-keys) #g-math{width:min(40vw,300px);margin:0;flex-shrink:0;padding-top:0}
}

/* ── 📐 GRIDS THAT FIT UNDER THE HEADER ──
   --g-avail-h is the height left under the header, measured by fitAreaHeight()
   (app.js) every round. The existing caps stay; this one is added to them, so a
   grid only shrinks where it would otherwise have run under the fold. */
.mem-card{height:clamp(44px,calc((var(--g-avail-h,400px) - 30px) / 4),75px)}
.hack-grid{width:min(100%,380px,54vh,calc(var(--g-avail-h,100vh) - 84px))}
.path-board{width:min(100%,400px,52vh,calc(var(--g-avail-h,100vh) - 84px))}
.reaction-box{height:min(300px,var(--g-avail-h,300px))}
@media (max-height:500px) and (orientation:landscape){
  .path-board{width:min(100%,340px,58vh,calc(var(--g-avail-h,100vh) - 72px))}
  /* Click Frenzy stacks an 80px count, a label and a 180px button: 312px of
     column under a header, on a screen 390px tall. The button's bottom third
     was off the glass — the one mission whose whole game is that button. */
  .click-wrap{gap:8px}
  #click-count{font-size:3.2rem}
  #click-btn{width:min(150px,calc(var(--g-avail-h,300px) - 90px));height:min(150px,calc(var(--g-avail-h,300px) - 90px));font-size:2.6rem}
}

/* ── 🔢 MATH BLITZ'S NUMBER PAD (touch only — built by app.js § 32) ──
   A phone keypad with SUBMIT standing up the whole right-hand column, under
   the right thumb. The keys size themselves from the height under the header,
   so a short phone gets a shorter pad rather than a scrolling one. */
.math-wrap.has-keys #math-submit{display:none}
.mk-pad{
  --mk-h:clamp(44px,calc((var(--g-avail-h,520px) - 190px) / 4),60px);
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,1.15fr);gap:8px;margin-top:14px
}
.mk-key{
  height:var(--mk-h);padding:0;border-radius:10px;cursor:pointer;
  border:1px solid var(--border2);
  background:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.035));
  color:var(--text);font-family:var(--fd);font-size:1.3rem;font-weight:700;line-height:1;
  box-shadow:0 2px 0 rgba(0,0,0,.45);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
  transition:background .08s,border-color .08s,transform .08s
}
.mk-key.down{background:rgba(255,215,0,.22);border-color:var(--gold);transform:translateY(1px)}
.mk-neg,.mk-back{color:var(--pink)}
.mk-ok{
  grid-column:4;grid-row:1 / span 4;height:auto;border:none;color:#000;font-size:1.9rem;
  background:linear-gradient(160deg,var(--cyan),var(--purple));box-shadow:0 0 20px rgba(0,245,255,.25)
}
.mk-ok.down{background:linear-gradient(160deg,var(--cyan),var(--purple));filter:brightness(1.3)}
/* 2D: the sum and the answer up top, the pad on the bottom edge — the same
   thumb zone the canvas missions' pads use. */
.math-wrap.has-keys:not(.math-3d){display:flex;flex-direction:column;min-height:var(--g-avail-h,auto)}
.math-wrap.has-keys:not(.math-3d) .mk-pad{margin-top:auto;padding-top:14px}
/* 3D: the pad rides in the console under the board, which every pixel of
   it costs, so it stays compact. */
.math-wrap.math-3d.has-keys .mk-pad{--mk-h:44px;margin-top:10px}
@media (max-height:500px) and (orientation:landscape){
  /* Side by side: the sum and the answer on the left, the pad on the right. */
  .math-wrap.has-keys:not(.math-3d){
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:18px;
    max-width:600px;min-height:0;align-items:center
  }
  .math-wrap.has-keys:not(.math-3d) #math-question{grid-column:1;grid-row:1;align-self:end;font-size:2.4rem;margin-bottom:10px}
  .math-wrap.has-keys:not(.math-3d) #math-answer{grid-column:1;grid-row:2;align-self:start;margin-bottom:0}
  .math-wrap.has-keys:not(.math-3d) .mk-pad{
    grid-column:2;grid-row:1 / span 2;margin-top:0;padding-top:0;
    --mk-h:clamp(36px,calc((var(--g-avail-h,280px) - 30px) / 4),54px)
  }
  .math-wrap.math-3d.has-keys .mk-pad{--mk-h:36px;margin-top:8px}
}

/* ── ⏸️ The pause menu's controls line (paintPauseMenu) ── */
.ps-ctl{margin-top:9px;padding-top:9px;border-top:1px solid var(--border);
  font-family:var(--fd);font-size:.52rem;line-height:1.7;letter-spacing:.06em;color:var(--dim)}

/* ── 🎮 THE MODE RAIL — the hub's banners, on a phone ──
   Ten banners stacked one under another were ten screen-wide cards: on a
   390×844 phone the first mission card sat 3,400px down the page, behind four
   screens of banners. On a phone they become ONE row you swipe through — the
   next card peeks in from the right edge to say there is more — and the hub
   gets two thousand pixels shorter. On a wider screen the rail is
   display:contents, so the banners lay out exactly as they always have. */
.mode-rail{display:contents}
.mode-rail-label,.mode-rail-dots{display:none}
/* A sideways phone and a touch tablet too: there the banners kept the
   desktop's row layout, whose widest (the Weekly Anomaly's, 577px) forced the
   hub's left column wider than the screen and pushed the leaderboard column
   off the right edge — 79px on a sideways iPhone, 103px on an iPad held
   upright. One column and the rail fit both. */
@media (max-width:700px), (max-height:500px) and (orientation:landscape), (pointer:coarse) and (max-width:1100px){
  .mode-rail-label{
    display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:2px 0 10px;
    font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.2em;color:var(--cyan)
  }
  .mode-rail-label em{font-style:normal;font-size:.5rem;letter-spacing:.18em;color:var(--dimmer)}
  .mode-rail{
    display:flex;gap:10px;align-items:stretch;
    overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;scroll-padding:0 20px;-webkit-overflow-scrolling:touch;
    /* Edge to edge: the rail runs under the screen's 20px side padding, so a
       card scrolls in from the glass's edge rather than from an invisible line. */
    margin:0 -20px 8px;padding:2px 20px 4px
  }
  /* A finger swipes the rail and the dots say where it is, so the scrollbar
     goes. A narrow desktop window keeps it: a mouse has no other way across. */
  @media (pointer:coarse){
    .mode-rail{scrollbar-width:none}
    .mode-rail::-webkit-scrollbar{display:none}
  }
  /* A grid track's floor is its content's min-content width, and a row of ten
     cards has a very wide one: left at 1fr, the hub's single column grew to
     2,500px to hold the rail, and everything under it ran off the glass with
     it. minmax(0,1fr) + min-width:0 keeps the column to the screen, which is
     what makes the rail scroll instead of stretch. */
  .hub-body{grid-template-columns:minmax(0,1fr)}
  .hub-body > *{min-width:0}
  .mode-rail > .mp-banner{flex:0 0 min(84%,340px);margin:0;scroll-snap-align:start;
    flex-direction:column;text-align:center;gap:10px;padding:16px 14px}
  .mode-rail > .mp-banner .btn{width:100%}
  .mode-rail > .mp-banner .lane-pick{margin-left:auto;margin-right:auto}
  /* Every card is as tall as the tallest, so the buttons line up along one
     edge: the text fills, and the lane switch and the button sit at the foot. */
  .mode-rail > .mp-banner .mp-banner-txt{flex:1 1 auto;display:flex;flex-direction:column;align-items:center}
  .mode-rail > .mp-banner .lane-pick{margin-top:auto}
  .mode-rail-dots{display:flex;justify-content:center;gap:6px;margin:0 0 18px;min-height:6px}
  .mode-rail-dots i{width:6px;height:6px;border-radius:50%;background:var(--border2);transition:background .2s,transform .2s}
  .mode-rail-dots i.on{background:var(--cyan);transform:scale(1.35);box-shadow:0 0 8px var(--cyan)}
  /* "Black Market" → "Market": the one word that put Exit on a row of its own. */
  #btn-market .hb-long{display:none}
}

/* ── 👆 THUMB-SIZED HUB CONTROLS ──
   The audit's list of things a finger kept missing: the banners' lane switch
   (22px tall), the Chaos switch (27px), the Heat button (24px), the grid's
   filter chips (26px), a contract's GO (24px) and the grid's mode switch
   (31px). 40px is the floor here — just under the 44px the pad gets, because
   these are picked deliberately, not hit mid-round. */
@media (pointer:coarse){
  .lp-seg{min-height:40px;padding-top:0;padding-bottom:0}
  .chaos-toggle,.heat-open{min-height:40px}
  .mp-filter{min-height:40px}
  .ow-seg{min-height:42px}
  .lo-chip{min-height:38px}
  .ct-go{min-height:40px!important;padding:8px 14px!important;font-size:.56rem!important}
}
/* A contract's GO used to drop onto a row of its own under the text; it is a
   column of its own instead, beside the text and the reward. */
@media (max-width:520px){
  .ct-row{grid-template-columns:auto 1fr auto;grid-template-areas:"ico txt go" "ico cr go";column-gap:10px;row-gap:2px}
  .ct-ico{grid-area:ico}
  .ct-txt{grid-area:txt;font-size:.8rem}
  .ct-cr{grid-area:cr}
  .ct-go{grid-area:go;justify-self:end}
}

/* ── 📈 THE OPERATIVE RAIL ON A PHONE ──
   Portrait: the level bar on a line of its own and the four doors as a 2×2
   block, instead of three ragged rows with DOSSIER alone on the last. The
   bar's 50% basis is what forces the break on every phone width.
   Landscape: the rail used to be display:none (it shares a block with the
   in-round rules that DO need the height), which left the Perk Tree, the
   Season Track and the Dossier with no door at all on a sideways phone. The
   hub scrolls; one 50px row costs it nothing. */
@media (max-width:520px){
  .xp-track{flex:1 1 50%}
  .xp-rail .btn{flex:1 1 calc(50% - 5px)}
}
@media (max-height:560px) and (orientation:landscape){
  .xp-rail{display:flex}
}
/* The hub's ⛶ was the one control left under a thumb's width (30px). */
@media (pointer:coarse){ #btn-fs-hub{min-width:44px} }

/* ═════════════════════════════════════════════════
   § 34 · v69 — 📊 THE DOSSIER, PART TWO · runs by mode
   Eleven counts today and more as modes are added: a wrapping row of chips,
   not eleven more tiles — on a phone that would be six rows of boxes. A mode
   never played is dimmed rather than hidden, so the list is also a map of
   what the arcade has.
   ═════════════════════════════════════════════════ */
.dos-modes{display:flex;flex-wrap:wrap;gap:8px}
.dos-mode{
  display:inline-flex;align-items:baseline;gap:6px;white-space:nowrap;
  padding:7px 10px;border:1px solid var(--border);border-radius:8px;
  font-size:.74rem;color:var(--dim)
}
.dos-mode b{font-family:var(--fd);font-size:.86rem;font-weight:900;color:var(--text)}
.dos-mode.zero{opacity:.45}
@media (max-width:480px){
  .dos-modes{gap:6px}
  .dos-mode{padding:6px 8px;font-size:.7rem}
}

/* ═════════════════════════════════════════════════
   § 35 · v70 — 📜 THE CODEX · a second view inside the campaign overlay
   One column of entries on every screen: these are paragraphs, and a paragraph
   split across two narrow columns is harder to read than one that runs the
   width of a phone. .cp-tools is the tool row above the map — the codex's door
   lives there, and later sections add theirs beside it.
   ═════════════════════════════════════════════════ */
.cp-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.cp-tools .btn{min-height:40px}
@media (pointer:coarse){ .cp-tools .btn{min-height:44px} }
.cx-list{display:flex;flex-direction:column;gap:10px}
.cx-head{
  font-family:var(--fd);font-size:.58rem;font-weight:700;letter-spacing:.18em;color:var(--dim);
  margin:14px 0 2px;padding-bottom:6px;border-bottom:1px solid var(--border)
}
.cx-head:first-child{margin-top:0}
.cx-entry{border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;background:var(--s1)}
.cx-entry.cx-act{border-color:var(--border2);background:var(--s2)}
.cx-entry.cx-boss{border-color:rgba(255,36,66,.42)}
.cx-kicker{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.2em;line-height:1.6;color:var(--lime)}
.cx-entry.cx-boss .cx-kicker{color:var(--red)}
.cx-title{font-family:var(--fd);font-size:.84rem;font-weight:900;letter-spacing:.04em;margin:4px 0 6px}
.cx-text{font-size:.86rem;line-height:1.55}
.cx-text em{font-style:normal;color:var(--dim)}
.cx-new{
  display:inline-block;margin-left:6px;padding:1px 6px;border-radius:6px;
  background:var(--lime);color:var(--bg);letter-spacing:.1em
}
.cx-entry.locked .cx-kicker{color:var(--dim)}
.cx-redact{color:var(--dimmer);user-select:none;overflow-wrap:anywhere;word-break:break-all}
.cx-need{margin-top:8px;font-size:.74rem;color:var(--dim)}
@media (max-width:480px){
  .cx-entry{padding:10px 12px}
  .cx-text{font-size:.82rem}
}

/* ═══════════════════════════════════════
   § 37 · v72 — ⟳ PRESTIGE · the badge, the door on the rail, the confirm
   ═══════════════════════════════════════ */
/* The badge rides inside a name (.lb-name) or the level line (.pc-lvl): it
   takes their size and only brings its own colour. */
.pr-chip{
  display:inline-block;margin-left:5px;padding:0 5px;border-radius:999px;
  font-family:var(--fd);font-size:.82em;font-weight:900;letter-spacing:.04em;line-height:1.5;
  color:#ffd76a;border:1px solid rgba(255,215,106,.45);background:rgba(255,215,106,.08);
  vertical-align:baseline;white-space:nowrap
}
/* The perk button once level 25 is reached. Gold, so it does not read as the
   green "points to spend" state it replaces. */
.xp-rail.can-reboot{border-color:rgba(255,215,106,.45);box-shadow:0 0 18px rgba(255,215,106,.12)}
.xp-rail .btn.xp-reboot-btn{
  background:linear-gradient(135deg,#ffd76a,#ff9f3a);color:#1a1205;border-color:transparent;
  box-shadow:0 0 16px rgba(255,190,80,.35);animation:prPulse 2.4s ease-in-out infinite
}
@keyframes prPulse{0%,100%{box-shadow:0 0 12px rgba(255,190,80,.25)}50%{box-shadow:0 0 22px rgba(255,190,80,.55)}}
.reduced-motion .xp-rail .btn.xp-reboot-btn{animation:none}
@media (prefers-reduced-motion:reduce){ .xp-rail .btn.xp-reboot-btn{animation:none} }

.reboot-modal{max-width:560px}
.rb-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:4px 0 12px}
.rb-col{border:1px solid rgba(255,255,255,.1);border-radius:10px;padding:10px 12px;background:rgba(255,255,255,.03)}
.rb-hdr{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.16em;margin-bottom:6px}
.rb-lose{border-color:rgba(255,80,110,.35)}
.rb-lose .rb-hdr{color:#ff6b88}
.rb-keep{border-color:rgba(57,255,20,.3)}
.rb-keep .rb-hdr{color:var(--green,#39ff14)}
.rb-col ul{list-style:none;margin:0;padding:0}
.rb-col li{font-size:.74rem;line-height:1.45;padding:2px 0 2px 14px;position:relative;color:var(--text,#dfe7ff)}
.rb-col li::before{content:'·';position:absolute;left:3px;top:1px;font-weight:900}
.rb-gain{
  font-size:.74rem;line-height:1.5;padding:9px 12px;border-radius:10px;margin-bottom:12px;
  border:1px solid rgba(255,215,106,.35);background:rgba(255,215,106,.06);color:var(--text,#dfe7ff)
}
.rb-gain b{color:#ffd76a}
.rb-acts{display:flex;flex-wrap:wrap;gap:8px}
.rb-acts .btn{flex:1 1 150px}
@media (max-width:520px){
  .rb-cols{grid-template-columns:1fr}
  .rb-acts .btn{flex:1 1 100%}
}
@media (max-height:560px) and (orientation:landscape){
  .rb-cols{gap:8px;margin-bottom:8px}
  .rb-col{padding:7px 10px}
  .rb-col li{font-size:.68rem;line-height:1.3;padding-top:1px;padding-bottom:1px}
  .rb-gain{padding:6px 10px;margin-bottom:8px}
}
@media (pointer:coarse){ .rb-acts .btn{min-height:44px} }

/* ═══════════════════════════════════════
   § 38 · v73 — 🛸 COMPANIONS · the follower, the shelf, and a tab row told where to break
   ═══════════════════════════════════════ */
/* The companion outside a round. Fixed and moved by transform only; it sits
   under every overlay (2000) and takes no pointer events at all, so whatever
   is beneath it is clicked as if it were not there. */
#cmp-fx{
  position:fixed;left:0;top:0;width:30px;height:30px;margin:-15px 0 0 -15px;
  z-index:1900;pointer-events:none;will-change:transform;contain:layout style
}
#cmp-fx[hidden]{display:none}
.cmp-fx-body{
  display:block;width:30px;height:30px;font-size:21px;line-height:30px;text-align:center;
  filter:drop-shadow(0 0 6px var(--cyan));animation:cmpBob 2.6s ease-in-out infinite
}
@keyframes cmpBob{0%,100%{transform:translateY(-2px)}50%{transform:translateY(3px)}}
#cmp-fx.cmp-react .cmp-fx-body{animation:cmpCheer .9s cubic-bezier(.2,.9,.3,1.2) 1}
@keyframes cmpCheer{
  0%{transform:scale(1) rotate(0)}
  35%{transform:scale(1.7) rotate(200deg);filter:drop-shadow(0 0 14px var(--cyan)) brightness(1.4)}
  100%{transform:scale(1) rotate(360deg)}
}
/* Reduced motion: it stays put, and a big play is a glow rather than a spin. */
#cmp-fx.cmp-still .cmp-fx-body{animation:none}
#cmp-fx.cmp-still.cmp-react .cmp-fx-body{animation:cmpGlow .9s ease-out 1}
@keyframes cmpGlow{
  0%,100%{filter:drop-shadow(0 0 6px var(--cyan))}
  40%{filter:drop-shadow(0 0 16px var(--cyan)) brightness(1.5)}
}

/* ── THE TAB ROW ── (v122: ten aisles and the bank now — see 🔥 THRUSTERS at the end of the file)
   Ten tabs (nine without the seasonal one) do not fit one line at 1060px, and
   a flex row that wraps leaves whatever did not fit alone on a second line. A
   grid breaks where it is told to: five across — two full rows, or 5 + 4 —
   and three across on a phone, where the seasonal tab takes a row of its own
   instead of being the orphan. A label that is too long for its cell wraps
   inside the tab rather than widening the row. */
.market-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.market-tab{min-width:0;padding-left:8px;padding-right:8px;text-align:center;white-space:normal;line-height:1.25}
.market-tab[hidden]{display:none}
@media (max-width:700px){
  .market-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .market-tab{font-size:.56rem;letter-spacing:.05em;padding:8px 4px}
  .market-tab-event{grid-column:1 / -1}
}

/* The shelf's note carries the per-device switch. */
.cmp-note{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.cmp-note .btn{margin-left:auto;flex:0 0 auto}
@media (max-width:520px){ .cmp-note .btn{margin-left:0;flex:1 1 100%} }
@media (pointer:coarse){ .cmp-note .btn{min-height:44px} }

/* ═══════════════════════════════════════
   § 39 · v74 — ⏱️ SPEEDRUN · the clock on the HUD and the briefing in the campaign overlay
   ═══════════════════════════════════════ */
/* The pill rides the round's stat strip, first, the way the boss chain's
   integrity pill does. Tabular figures so the tenths do not make it wobble. */
.spd-pill{display:flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums}
.spd-pill em{font-style:normal;color:var(--cyan)}
.spd-pill .spd-d{font-size:.9em;color:var(--dim)}
.spd-pill .spd-d:empty{display:none}
.spd-pill.ahead .spd-d{color:var(--lime)}
.spd-pill.behind .spd-d{color:var(--red)}

.spd-brief{display:flex;flex-direction:column;gap:12px}
.spd-rules{
  display:flex;flex-direction:column;gap:6px;padding:11px 13px;border-radius:10px;
  border:1px solid rgba(0,245,255,.25);background:rgba(0,245,255,.05);font-size:.76rem;line-height:1.45
}
.spd-lanes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.spd-lane{
  display:flex;flex-direction:column;gap:3px;padding:10px 8px;border-radius:10px;text-align:center;
  border:1px solid var(--border);background:var(--s2);min-width:0
}
.spd-lane.on{border-color:var(--gold);box-shadow:0 0 14px rgba(255,215,0,.14)}
.spd-lane span{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.1em;color:var(--dim)}
.spd-lane.on span{color:var(--gold)}
.spd-lane b{font-family:var(--fd);font-size:.95rem;font-variant-numeric:tabular-nums;color:var(--text)}
.spd-lane em{font-style:normal;font-size:.62rem;color:var(--dim)}
.spd-note{font-size:.68rem;line-height:1.45;color:var(--dim)}
.spd-head{
  font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.16em;color:var(--cyan);margin-top:4px
}
.spd-splits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 14px}
.spd-split{display:flex;justify-content:space-between;gap:8px;font-size:.72rem;padding:3px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.spd-split span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dim)}
.spd-split b{font-variant-numeric:tabular-nums;font-weight:700}
@media (max-width:520px){
  .spd-splits{grid-template-columns:1fr}
  .spd-lane b{font-size:.82rem}
}
@media (pointer:coarse){ .spd-brief .btn{min-height:44px} }

/* ═══════════════════════════════════════
   § 40 · v75 — 🌀 GLITCH RUN · the banner, the map, the relic cards
   ═══════════════════════════════════════ */
.gl-banner{border-color:rgba(168,85,247,.45);background:linear-gradient(120deg,rgba(168,85,247,.14),rgba(0,245,255,.06))}
.gl-banner .mp-banner-title{color:#c084fc}
.gl-pill{display:flex;align-items:center;gap:5px;font-variant-numeric:tabular-nums}
.gl-pill em{font-style:normal;color:#c084fc}

.glitch-modal{max-width:620px;border-color:rgba(168,85,247,.45);box-shadow:0 0 70px rgba(168,85,247,.16),inset 0 0 0 1px rgba(255,255,255,.03)}
#glitch-body{display:flex;flex-direction:column;gap:12px}
.gl-rules{
  display:flex;flex-direction:column;gap:6px;padding:11px 13px;border-radius:10px;font-size:.76rem;line-height:1.45;
  border:1px solid rgba(168,85,247,.3);background:rgba(168,85,247,.06)
}
.gl-seed{display:flex;align-items:center;gap:10px}
.gl-seed span{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.16em;color:#c084fc}
.gl-seed .input{flex:1;min-width:0;text-transform:uppercase;letter-spacing:.12em;font-family:var(--fd)}
.gl-best,.gl-note{font-size:.74rem;color:var(--dim)}
.gl-best b{color:var(--gold)}
.gl-head{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.16em;color:#c084fc;margin-top:2px}
.gl-notebar{font-size:.76rem;line-height:1.4;padding:8px 12px;border-radius:10px;border:1px solid rgba(57,255,20,.3);background:rgba(57,255,20,.06)}

/* The map: one row a layer, top to bottom, the boss last. A node is its
   mission's glyph; where you stand, where you have been and where you can go
   are told by the ring, not by colour alone. */
.gl-map{display:flex;flex-direction:column;gap:5px;padding:10px;border-radius:12px;border:1px solid var(--border);background:rgba(255,255,255,.03)}
.gl-layer{display:flex;align-items:center;justify-content:center;gap:10px;position:relative;min-height:34px;border-radius:8px}
.gl-layer.next{background:rgba(168,85,247,.1)}
.gl-ln{position:absolute;left:6px;font-family:var(--fd);font-size:.48rem;font-weight:700;letter-spacing:.1em;color:var(--dimmer)}
.gl-node{
  display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:30px;padding:0 6px;border-radius:9px;font-size:.95rem;
  border:1px solid var(--border);background:var(--s1);opacity:.5
}
.gl-node.gl-elite{border-style:dashed}
.gl-node.gl-boss{min-width:54px;border-color:rgba(255,36,66,.5)}
.gl-node.been{opacity:.85;border-color:rgba(57,255,20,.5)}
.gl-node.open{opacity:1;border-color:#c084fc;box-shadow:0 0 10px rgba(168,85,247,.35)}
.gl-node.here{opacity:1;border:2px solid var(--gold);box-shadow:0 0 12px rgba(255,215,0,.35)}

.gl-offer,.gl-routes{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px}
.gl-card,.gl-route{
  display:flex;flex-direction:column;gap:5px;text-align:left;padding:11px 12px;border-radius:11px;cursor:pointer;
  border:1px solid rgba(168,85,247,.45);background:rgba(168,85,247,.08);color:var(--text);font-family:var(--fb);min-height:64px
}
.gl-card:hover,.gl-route:hover,.gl-card:focus-visible,.gl-route:focus-visible{border-color:#c084fc;background:rgba(168,85,247,.16);outline:none}
.gl-card b,.gl-route b{font-family:var(--fd);font-size:.62rem;letter-spacing:.08em}
.gl-card span,.gl-route span{font-size:.72rem;line-height:1.4;color:var(--dim)}
.gl-card em,.gl-relic em{font-style:normal;font-size:.64rem;line-height:1.35;color:#ffb070}
.gl-route.gl-boss{border-color:rgba(255,36,66,.55);background:rgba(255,36,66,.08)}
.gl-route.gl-elite{border-style:dashed}
.gl-own{display:flex;flex-wrap:wrap;gap:6px}
.gl-own span{font-family:var(--fd);font-size:.52rem;letter-spacing:.06em;padding:4px 8px;border-radius:999px;border:1px solid var(--border);background:var(--s1)}
.gl-own .none{color:var(--dim)}
.gl-relics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}
.gl-relic{display:flex;flex-direction:column;gap:2px;font-size:.7rem;line-height:1.4;padding:4px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.gl-relic b{font-family:var(--fd);font-size:.56rem;letter-spacing:.06em}
.gl-relic span{color:var(--dim)}
@media (max-width:520px){
  .gl-relics{grid-template-columns:1fr}
  .gl-offer,.gl-routes{grid-template-columns:1fr}
}
@media (pointer:coarse){ #glitch-body .btn{min-height:44px} }

/* ═══════════════════════════════════════
   § 42 · v77 — 💰 BOUNTIES · the hub list, the card block, the posting sheet
   ═══════════════════════════════════════ */
/* A bounty row is a challenge row (.chal-row) wearing gold. */
.bn-row{border-color:rgba(255,215,0,.28)}
.bn-row .chal-name{color:var(--gold)}
.bn-row.own{background:rgba(255,215,0,.06)}
.bn-tag{font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.12em;color:var(--gold);white-space:nowrap}
.bn-news{font-size:.74rem;line-height:1.45;padding:9px 12px;margin-bottom:8px;border-radius:10px;border:1px solid rgba(255,215,0,.3);background:rgba(255,215,0,.06)}
.bn-card{margin-top:10px}
.bn-card .chal-row{margin-bottom:6px}
.bn-why{font-size:.66rem;line-height:1.4;color:var(--dim);margin-top:5px;text-align:center}

.bnty-modal{max-width:500px;border-color:rgba(255,215,0,.4);box-shadow:0 0 70px rgba(255,215,0,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
#bnty-body{display:flex;flex-direction:column;gap:9px}
.bn-lbl{font-family:var(--fd);font-size:.52rem;font-weight:900;letter-spacing:.16em;color:var(--gold);margin-top:2px}
.bn-pick{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.bn-pick.bn-tiers{grid-template-columns:repeat(3,minmax(0,1fr))}
.bn-opt{
  display:flex;flex-direction:column;gap:3px;align-items:flex-start;padding:9px 10px;border-radius:10px;cursor:pointer;min-height:44px;
  border:1px solid var(--border);background:var(--s2);color:var(--text);font-family:var(--fd);font-size:.52rem;letter-spacing:.06em;text-align:left;min-width:0
}
.bn-opt b{font-size:.8rem;font-variant-numeric:tabular-nums;color:var(--gold)}
.bn-opt.on{border-color:var(--gold);background:rgba(255,215,0,.1)}
.bn-tiers .bn-opt{align-items:center;text-align:center}
.bn-amt{display:flex;align-items:center;justify-content:center;gap:14px}
.bn-amt .btn{min-width:48px;min-height:44px;font-size:1rem}
.bn-cr{font-family:var(--fd);font-size:1rem;font-weight:900;color:var(--gold);min-width:110px;text-align:center;font-variant-numeric:tabular-nums}
.bn-sum{font-size:.74rem;line-height:1.5;padding:9px 12px;border-radius:10px;border:1px solid rgba(255,215,0,.3);background:rgba(255,215,0,.05)}
.bn-sum b{color:var(--gold)}
.bn-acts{display:flex;flex-wrap:wrap;gap:8px}
.bn-acts .btn{flex:1 1 150px;min-height:44px}
@media (max-width:420px){ .bn-pick{grid-template-columns:1fr} .bn-pick.bn-tiers{grid-template-columns:repeat(3,minmax(0,1fr))} }

/* ═══════════════════════════════════════
   § 43 · v78 — 🛡️ CREWS · the tag, the fourth board tab, the crew sheet
   ═══════════════════════════════════════ */
/* The tag. It takes its colour from --cc (the crew's, always one of the
   shop's colours) and its size from where it sits. */
.crew-chip{
  display:inline-block;margin-left:5px;padding:0 5px;border-radius:5px;font-style:normal;
  font-family:var(--fd);font-size:.8em;font-weight:900;letter-spacing:.06em;line-height:1.5;white-space:nowrap;vertical-align:baseline;
  color:var(--cc,#00f5ff);border:1px solid var(--cc,#00f5ff);background:rgba(0,0,0,.35)
}
/* In the hub bar it is a button (it opens the sheet). Small on purpose: the
   bar is the tightest strip in the arcade, and the name beside it gives way. */
.hub-crew{margin:0;font-size:.55rem;padding:2px 6px;cursor:pointer;flex:0 0 auto}
.hub-crew[hidden]{display:none}

/* Four tabs now: on a narrow phone they are two rows of two, not four slivers. */
@media (max-width:420px){
  #lb-tabs{flex-wrap:wrap}
  .lb-tab{flex:1 1 calc(50% - 3px)}
}
.cw-mine{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 10px;font-size:.74rem;color:var(--dim)}
.cw-lb .lb-tag{margin-left:6px}

.crew-modal{max-width:520px}
#crew-body{display:flex;flex-direction:column;gap:10px}
.cw-box{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;border:1px solid var(--border);background:rgba(255,255,255,.03)}
.cw-lbl{font-family:var(--fd);font-size:.54rem;font-weight:900;letter-spacing:.16em;color:var(--cyan)}
.cw-head{font-family:var(--fd);font-size:.8rem;font-weight:900;letter-spacing:.06em}
.cw-head .crew-chip{margin-left:0;margin-right:6px}
.cw-field{display:flex;align-items:center;gap:10px}
.cw-field span{flex:0 0 46px;font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.12em;color:var(--dim)}
.cw-field .input{flex:1;min-width:0}
.cw-swatches{display:flex;flex-wrap:wrap;gap:8px}
.cw-sw{width:36px;height:36px;border-radius:50%;cursor:pointer;background:var(--cc);border:2px solid transparent;box-shadow:0 0 10px var(--cc)}
.cw-sw.on{border-color:#fff;transform:scale(1.12)}
.cw-note{font-size:.7rem;line-height:1.45;color:var(--dim)}
.cw-code{display:flex;align-items:center;gap:10px;font-family:var(--fd);font-size:.56rem;letter-spacing:.14em;color:var(--dim)}
.cw-code b{font-size:.95rem;letter-spacing:.2em;color:var(--gold);user-select:all}
.cw-roster{display:flex;flex-direction:column;gap:4px}
.cw-row{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:8px;background:rgba(255,255,255,.04);font-size:.76rem}
.cw-row.ask{background:rgba(255,215,0,.07)}
.cw-who{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-pts{font-family:var(--fd);font-size:.56rem;color:var(--cyan);font-variant-numeric:tabular-nums}
@media (pointer:coarse){ #crew-body .btn{min-height:44px} .cw-sw{width:44px;height:44px} }

/* ═══════════════════════════════════════
   § 44 · v79 — 🏆 TOURNAMENTS · the card in the arena, the lobby, the bracket
   ═══════════════════════════════════════ */
.mp-tourney-card{border-color:rgba(255,215,0,.4)}
.mp-tourney-join{display:flex;gap:8px;margin-top:8px}
.mp-tourney-join .input{flex:1;min-width:0;text-transform:uppercase;letter-spacing:.18em;font-family:var(--fd);text-align:center}

.tn-body{display:flex;flex-direction:column;gap:12px;width:100%;max-width:860px}
.tn-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.tn-code{display:flex;align-items:center;gap:10px;font-family:var(--fd);font-size:.56rem;letter-spacing:.14em;color:var(--dim)}
.tn-code b{font-size:1.3rem;letter-spacing:.24em;color:var(--gold);user-select:all}
.tn-lock{font-family:var(--fd);font-size:.52rem;letter-spacing:.1em;color:var(--cyan)}
.tn-seats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tn-seat{display:flex;flex-direction:column;gap:3px;padding:10px;border-radius:10px;border:1px dashed var(--border);background:var(--s1);min-width:0}
.tn-seat.on{border-style:solid;border-color:rgba(0,245,255,.4)}
.tn-seat span{font-family:var(--fd);font-size:.46rem;letter-spacing:.12em;color:var(--dim)}
.tn-seat b{font-size:.78rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* ── 🎛️ § 44 · v86 — THE ORGANISER'S SETTINGS ──
   The arena's own controls, so nothing here opens an OS window: the lane switch's segments (.lane-pick,
   .lp-seg) for STABILITY, LANE and SEEDING, the droid card's chips (.mp-bot-lvl) for DROIDS, and the duel on a
   plate that opens the arena's duel cards (#tnpick-overlay). They were five native <select>s, whose open list
   the system draws in its own colours — DUEL's was twenty-nine rows tall over the lobby. */
.tn-set{display:flex;flex-direction:column;gap:12px;padding:14px 16px;border:1px solid rgba(255,215,0,.24);border-radius:var(--rl);
  background:linear-gradient(160deg,rgba(255,215,0,.05),transparent 55%),var(--s1)}
.tn-row{display:grid;grid-template-columns:104px minmax(0,1fr);align-items:center;gap:14px}
.tn-lbl{font-family:var(--fd);font-size:.46rem;font-weight:700;letter-spacing:.14em;color:var(--dim)}
.tn-seg{display:flex;width:100%;margin-top:0}
.tn-seg .lp-seg{flex:1 1 0;min-width:0;padding:10px 8px;font-size:.56rem;text-align:center;overflow:hidden;text-overflow:ellipsis}
.tn-seg .lp-seg:disabled{opacity:.4;cursor:not-allowed}
/* STABILITY wears the dial's own colours: the tier a bracket is played at reads as that tier. */
.tn-tiers .lp-seg.on[data-v="safe"]{color:#8fb8ff;background:rgba(59,130,246,.22);box-shadow:inset 0 0 14px rgba(59,130,246,.22)}
.tn-tiers .lp-seg.on[data-v="stable"]{color:#00ff66;background:rgba(0,255,102,.13);box-shadow:inset 0 0 14px rgba(0,255,102,.18)}
.tn-tiers .lp-seg.on[data-v="overclocked"]{color:#ffcc00;background:rgba(255,204,0,.13);box-shadow:inset 0 0 14px rgba(255,204,0,.18)}
.tn-tiers .lp-seg.on[data-v="meltdown"]{color:#ff3355;background:rgba(255,0,51,.15);box-shadow:inset 0 0 14px rgba(255,0,51,.2)}
.tn-droids{margin:0}
.tn-droids .mp-bot-lvl{padding:10px 4px;font-size:.52rem}
/* The duel: a plate you press to change it, as the party sheet's mission slots are (§ 19). Its edge is the
   duel's kind — pink for a live duel, lime for a score race, the colours the duel cards label them in. */
.tn-duel{--acc:var(--lime);display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;
  padding:10px 14px 10px 12px;text-align:left;cursor:pointer;font:inherit;color:var(--text);
  background:var(--s2);border:1px solid var(--border2);border-radius:var(--r);box-shadow:inset 3px 0 0 var(--acc);
  transition:border-color .2s ease,transform .2s ease}
.tn-duel[data-kind="live"]{--acc:var(--pink)}
.tn-duel:hover{border-color:var(--cyan);transform:translateY(-1px)}
.tn-duel:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.tn-duel > *{pointer-events:none}
.tn-duel-ico{font-size:1.7rem;line-height:1;text-align:center}
.tn-duel-txt{display:flex;flex-direction:column;gap:4px;min-width:0}
.tn-duel-txt b,.tn-duel-txt em{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tn-duel-txt b{font-family:var(--fd);font-size:.62rem;letter-spacing:.08em;color:var(--cyan)}
.tn-duel-txt em{font-style:normal;font-family:var(--fd);font-size:.42rem;letter-spacing:.1em;color:var(--dim)}
.tn-duel-go{font-family:var(--fd);font-size:.44rem;font-weight:700;letter-spacing:.12em;color:var(--gold);
  padding:5px 11px;border:1px solid rgba(255,215,0,.45);border-radius:999px;background:rgba(255,215,0,.06)}
body.mode-3d .tn-duel{
  --wall:#141a2c;--wallb:#070a14;
  background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,0) 55%),var(--s1);
  box-shadow:inset 3px 0 0 var(--acc),
    0 1px 0 var(--wall),0 2px 0 var(--wall),0 3px 0 var(--wall),0 4px 0 var(--wallb),0 5px 0 var(--wallb),0 6px 0 var(--wallb),
    0 14px 20px -10px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.13),inset 0 -1px 0 rgba(0,0,0,.5);
  transition:transform .2s var(--pop-ease),box-shadow .2s var(--pop-ease),border-color .2s
}
body.mode-3d .tn-duel:hover{transform:translateY(-2px)}
body.mode-3d .tn-duel:active{transform:translateY(4px);
  box-shadow:inset 3px 0 0 var(--acc),0 1px 0 var(--wall),0 2px 0 var(--wallb),0 6px 10px -5px rgba(0,0,0,.8),inset 0 3px 8px rgba(0,0,0,.5)}
/* The picker: the arena's duel cards, compact, the live duels and then the races. */
.tnpick-tint .fb-modal{max-width:900px;border-color:rgba(255,215,0,.42);box-shadow:0 0 70px rgba(255,215,0,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.tnpick-tint .fb-modal::before{background:linear-gradient(90deg,transparent,#ffd700,var(--cyan),transparent);box-shadow:0 0 12px #ffd700}
.tnpick-tint .fb-title{background:linear-gradient(90deg,#ffd700,var(--cyan));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.tnpick-tint .fb-head{margin-bottom:18px}
.tnp-sec{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin:4px 0 10px;
  font-family:var(--fd);font-size:.52rem;font-weight:700;letter-spacing:.14em;color:var(--text)}
.tnp-sec em{font-style:normal;font-size:.44rem;font-weight:400;letter-spacing:.08em;color:var(--dim)}
.tnp-grid{grid-template-columns:repeat(auto-fill,minmax(176px,1fr));gap:10px;margin-bottom:18px}
.tnp-grid:last-child{margin-bottom:0}
.tnp-card{display:flex;flex-direction:column;align-items:center;width:100%;font:inherit;color:var(--text);padding:30px 12px 14px}
.tnp-card > *{pointer-events:none}
.tnp-card .mp-mode-icon{font-size:1.9rem;margin-bottom:8px}
.tnp-card .mp-mode-name{display:block;margin-bottom:8px}
.tnp-card:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.tn-note{font-size:.74rem;color:var(--dim)}
.tn-mine{padding:10px 12px;border-radius:10px;border:1px solid rgba(57,255,20,.35);background:rgba(57,255,20,.06);font-family:var(--fd);font-size:.6rem;letter-spacing:.08em}
.tn-mine.out{border-color:var(--border);background:var(--s1);color:var(--dim)}
.tn-champ{padding:12px;border-radius:10px;text-align:center;border:1px solid var(--gold);background:rgba(255,215,0,.1);font-family:var(--fd);font-size:.8rem;font-weight:900;letter-spacing:.1em;color:var(--gold)}

/* Three columns, each centred on the pair that feeds it. On a phone they stack. */
.tn-bracket{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:center}
.tn-col{display:flex;flex-direction:column;gap:8px;justify-content:space-around;height:100%}
.tn-col em{font-style:normal;font-family:var(--fd);font-size:.46rem;letter-spacing:.14em;color:var(--dim)}
.tn-match{display:flex;flex-direction:column;gap:2px;padding:7px 8px;border-radius:9px;border:1px solid var(--border);background:rgba(255,255,255,.03)}
.tn-side{display:flex;justify-content:space-between;gap:8px;font-size:.74rem;padding:2px 4px;border-radius:5px}
.tn-side span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tn-side b{font-variant-numeric:tabular-nums;color:var(--dim)}
.tn-side.win{background:rgba(57,255,20,.1);color:var(--lime)}
.tn-side.lost{opacity:.5}
.tn-how{display:flex;align-items:center;justify-content:space-between;gap:6px;font-family:var(--fd);font-size:.42rem;letter-spacing:.12em;color:var(--dim);min-height:14px}
@media (max-width:620px){
  .tn-seats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tn-bracket{grid-template-columns:1fr}
  .tn-set{padding:12px}
  .tn-row{grid-template-columns:1fr;gap:6px}
  /* Four tiers on two rows: on one, OVERCLOCK and MELTDOWN were cut to an ellipsis. */
  .tn-tiers{display:grid;grid-template-columns:1fr 1fr;border-radius:var(--r)}
  .tn-tiers .lp-seg+.lp-seg{border-left:0}
  .tn-tiers .lp-seg:nth-child(even){border-left:1px solid var(--border2)}
  .tn-tiers .lp-seg:nth-child(n+3){border-top:1px solid var(--border2)}
  .tnp-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
}
@media (pointer:coarse){ .tn-body .btn, .tn-body .lp-seg, .tn-body .mp-bot-lvl, .tn-duel, .mp-tourney-join .btn, .mp-tourney-join .input{min-height:44px} }

/* ═══════════════════════════════════════
   § 45 · v80 — 🎓 THE FULL TOUR · the spotlight layer and ARC's card
   ═══════════════════════════════════════ */
/* Body-level, over every overlay (2000), the party picker (2050), the pause
   tint (2100) and the exit animation (2500); under the offline bar (9000) and
   the toast (9999). The root is PAINTED, faintly: with a transparent root
   Chrome draws the 3D chrome's lifted buttons over a fixed layer (#exit-fx met
   that first). It takes no clicks itself — the dim path does, everywhere but
   the cut-out. */
.tut-layer{position:fixed;inset:0;z-index:2600;display:none;pointer-events:none;background:rgba(3,6,14,.01)}
.tut-layer.on{display:block}
.tut-layer [hidden],#btn-tutorial-replay[hidden]{display:none !important}
.tut-mask{position:absolute;left:0;top:0;pointer-events:none}
.tut-mask path{fill:rgba(3,6,14,.76);fill-rule:evenodd;pointer-events:fill}
.tut-ring,.tut-plug{position:absolute;left:0;top:0;box-sizing:border-box}
.tut-ring{pointer-events:none;border:2px solid var(--cyan);border-radius:12px;
  box-shadow:0 0 0 3px rgba(0,245,255,.16),0 0 28px rgba(0,245,255,.55),inset 0 0 18px rgba(0,245,255,.12);
  animation:tutPulse 1.5s ease-in-out infinite}
.tut-layer.calm .tut-ring{animation:none}
@keyframes tutPulse{0%,100%{box-shadow:0 0 0 3px rgba(0,245,255,.16),0 0 28px rgba(0,245,255,.55),inset 0 0 18px rgba(0,245,255,.12)}
  50%{box-shadow:0 0 0 6px rgba(0,245,255,.08),0 0 40px rgba(0,245,255,.8),inset 0 0 18px rgba(0,245,255,.2)}}
/* Lit, but not to be pressed: an explain-only step's control. */
.tut-plug{pointer-events:auto;background:rgba(0,0,0,.001);cursor:default}

.tut-card{position:absolute;left:0;top:0;box-sizing:border-box;width:min(370px,calc(100vw - 20px));max-height:min(62vh,430px);overflow:auto;
  pointer-events:auto;padding:14px 16px 12px;border-radius:14px;
  background:linear-gradient(160deg,rgba(10,14,34,.98),rgba(6,8,22,.98));border:1px solid var(--cyan);
  box-shadow:0 14px 50px rgba(0,0,0,.7),0 0 26px rgba(0,245,255,.18);color:var(--text,#e8f0ff)}
.tut-chap{font-family:var(--fd);font-size:.46rem;letter-spacing:.16em;color:var(--dim)}
.tut-title{margin-top:5px;font-family:var(--fd);font-size:.84rem;font-weight:900;letter-spacing:.08em;color:var(--cyan)}
.tut-body{margin-top:7px;font-size:.84rem;line-height:1.5}
.tut-hint{margin-top:9px;padding:6px 9px;border-radius:8px;font-family:var(--fd);font-size:.5rem;letter-spacing:.1em;
  color:var(--lime);border:1px dashed rgba(57,255,20,.45);background:rgba(57,255,20,.06)}
.tut-btns{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:11px}
.tut-btns #tut-skip{margin-right:auto;opacity:.8}
.tut-card.busy #tut-next,.tut-card.busy #tut-pass,.tut-card.busy #tut-doit{pointer-events:none;opacity:.45}
.tut-prog{margin-top:10px;height:3px;border-radius:3px;background:rgba(255,255,255,.1);overflow:hidden}
.tut-prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--cyan),var(--lime));transition:width .3s ease}

/* During the countdown and the live seconds: a strip under the header. No
   dim, nothing blocked, and the strip itself lets every tap through — only
   its SKIP button can be pressed. */
.tut-layer.coach{background:none}
.tut-layer.coach .tut-mask,.tut-layer.coach .tut-ring,.tut-layer.coach .tut-plug{display:none}
.tut-layer.coach .tut-card{width:min(520px,calc(100vw - 16px));padding:9px 12px;pointer-events:none;display:grid;grid-template-columns:1fr auto;gap:2px 12px;align-items:center}
.tut-layer.coach .tut-chap,.tut-layer.coach .tut-prog{display:none}
.tut-layer.coach .tut-title{margin:0;grid-column:1}
.tut-layer.coach .tut-body{margin:0;grid-column:1;font-size:.78rem}
.tut-layer.coach .tut-btns{margin:0;grid-column:2;grid-row:1 / span 2}
.tut-layer.coach #tut-skip{pointer-events:auto;margin:0}

/* The guided round is held, and the tour is pointing at the header: the pause
   menu steps out of the way without letting go of the round. */
body.tut-peek #pause-overlay{opacity:0 !important;pointer-events:none !important}

@media (max-width:620px){
  .tut-card{width:calc(100vw - 16px);max-height:46vh;padding:12px 13px 10px}
  .tut-body{font-size:.8rem}
}
@media (max-height:480px){ .tut-card{max-height:70vh;padding:9px 12px 8px} .tut-body{font-size:.76rem;line-height:1.4} .tut-hint{margin-top:6px} }
@media (pointer:coarse){ .tut-btns .btn{min-height:40px} }

/* ═══════════════════════════════════════
   § 38 · v82 — 🛸 COMPANIONS · the rarer three are alive (Scout, Nova, Wingmate)
   ═══════════════════════════════════════ */
/* The follower (#cmp-fx) and a shelf card's preview (.cmp-prev) carry the same parts: the emoji
   (.cmp-fx-body) and three spare pieces (.cmp-o1..3). A living companion sets data-look on the holder,
   and everything below is keyed on that — so the three RARE ones, which set nothing, are untouched.
   Sizes are in --u (1px beside the cursor, larger on a card). Only transform, translate, rotate, scale,
   opacity, filter and z-index are animated: nothing here lays anything out again. */
#cmp-fx{--u:1px}
.cmp-o{position:absolute;left:50%;top:50%;width:0;height:0;display:none;pointer-events:none;
  transition-property:none}   /* a part never morphs from one companion's shape into another's (the page's
                                reduced-motion rule gives EVERYTHING a short transition on every property) */
/* A block as wide as its emoji, centred — so the rarity badge stays on the line UNDER it, as on every other card. */
.cmp-prev{position:relative;display:block;width:fit-content;margin-left:auto;margin-right:auto;isolation:isolate;--u:1.9px}
.cmp-prev > .cmp-fx-body{display:inline-block;width:auto;height:auto;font-size:inherit;line-height:1.15;filter:drop-shadow(0 0 8px var(--cyan))}

/* 🪐 NOVA — the sun breathes; three moons, each on an ellipse of its own. An ellipse is two swings a
   quarter-turn apart (translate left-right, transform up-down), and z-index steps with the upper half
   of it, so a moon goes BEHIND the sun and comes round in front. */
[data-look="4"] > .cmp-fx-body{animation:cmpBob 2.6s ease-in-out infinite,cmpSun 1.9s ease-in-out infinite alternate}
@keyframes cmpSun{from{filter:drop-shadow(0 0 5px var(--cyan))}to{filter:drop-shadow(0 0 13px var(--cyan)) brightness(1.25)}}
[data-look="4"] > .cmp-o{display:block;width:calc(var(--u)*5);height:calc(var(--u)*5);margin:calc(var(--u)*-2.5) 0 0 calc(var(--u)*-2.5);
  border-radius:50%;background:var(--cyan);box-shadow:0 0 calc(var(--u)*5) var(--cyan);
  animation:cmpOx 1.25s ease-in-out infinite alternate,cmpOy 1.25s ease-in-out infinite alternate,cmpOz 2.5s steps(1) infinite}
[data-look="4"] > .cmp-o1{animation-delay:0s,-.625s,0s}
[data-look="4"] > .cmp-o2{animation-duration:1.7s,1.7s,3.4s;animation-delay:-.6s,-1.45s,-.6s;opacity:.85}
[data-look="4"] > .cmp-o3{animation-duration:2.3s,2.3s,4.6s;animation-delay:-1.5s,-2.65s,-1.5s;opacity:.7;scale:.8}
@keyframes cmpOx{from{translate:calc(var(--u)*-17) 0}to{translate:calc(var(--u)*17) 0}}
@keyframes cmpOy{from{transform:translateY(calc(var(--u)*-6))}to{transform:translateY(calc(var(--u)*6))}}
@keyframes cmpOz{0%{z-index:1}50%{z-index:-1}}

/* 🛸 SCOUT — hovers on a tilt; a scanner beam under it sweeps and pulses; one running light blinks. */
[data-look="3"] > .cmp-fx-body{animation:cmpBob 2.6s ease-in-out infinite,cmpTilt 1.8s ease-in-out infinite alternate}
@keyframes cmpTilt{from{rotate:-8deg}to{rotate:8deg}}
[data-look="3"] > .cmp-o1{display:block;z-index:-1;margin:calc(var(--u)*4) 0 0 calc(var(--u)*-8);
  border-left:calc(var(--u)*8) solid transparent;border-right:calc(var(--u)*8) solid transparent;border-bottom:calc(var(--u)*17) solid var(--cyan);
  transform-origin:50% 0;opacity:.3;animation:cmpSweep 2.2s ease-in-out infinite alternate,cmpBeam 1.1s ease-in-out infinite alternate}
@keyframes cmpSweep{from{rotate:-22deg}to{rotate:22deg}}
@keyframes cmpBeam{from{opacity:.14}to{opacity:.42}}
[data-look="3"] > .cmp-o2{display:block;width:calc(var(--u)*3);height:calc(var(--u)*3);margin:calc(var(--u)*-3) 0 0 calc(var(--u)*7);
  border-radius:50%;background:#fff;box-shadow:0 0 calc(var(--u)*4) #fff;animation:cmpBlink .8s steps(1) infinite}
@keyframes cmpBlink{0%{opacity:1}50%{opacity:0}}

/* 🚀 WINGMATE — banks from side to side with its engine lit: a flame at the tail (the rocket points up
   and right, so the tail is down and left) and two embers drifting off down its wake. */
[data-look="5"] > .cmp-fx-body{animation:cmpBob 2.6s ease-in-out infinite,cmpBank 2.1s ease-in-out infinite alternate}
@keyframes cmpBank{from{rotate:-7deg}to{rotate:9deg}}
[data-look="5"] > .cmp-o1{display:block;z-index:-1;width:calc(var(--u)*6);height:calc(var(--u)*9);margin:calc(var(--u)*3) 0 0 calc(var(--u)*-11);
  border-radius:50% 50% 50% 50% / 35% 35% 65% 65%;background:linear-gradient(#ffd24a,#ff7a1a);box-shadow:0 0 calc(var(--u)*6) #ff9a3c;
  rotate:45deg;transform-origin:50% 0;animation:cmpFlame .16s ease-in-out infinite alternate}
@keyframes cmpFlame{from{transform:scaleY(.7);opacity:.75}to{transform:scaleY(1.2);opacity:1}}
[data-look="5"] > .cmp-o2,[data-look="5"] > .cmp-o3{display:block;z-index:-1;width:calc(var(--u)*4);height:calc(var(--u)*4);
  margin:calc(var(--u)*8) 0 0 calc(var(--u)*-12);border-radius:50%;background:#ff9a3c;animation:cmpPuff .7s linear infinite}
[data-look="5"] > .cmp-o3{animation-delay:-.35s}
@keyframes cmpPuff{from{translate:0 0;opacity:.7;scale:1}to{translate:calc(var(--u)*-10) calc(var(--u)*10);opacity:0;scale:.3}}

/* Reduced motion: nothing moves. The moons are parked round the sun, the beam and the flame are still,
   the embers are put out. (.cmp-still is the follower's own switch; a card listens to the page's.) */
#cmp-fx.cmp-still > .cmp-o,html.reduced-motion .cmp-prev > .cmp-o,html.reduced-motion .cmp-prev > .cmp-fx-body{animation:none}
#cmp-fx.cmp-still[data-look="4"] > .cmp-o1,html.reduced-motion .cmp-prev[data-look="4"] > .cmp-o1{translate:calc(var(--u)*-16) calc(var(--u)*-3)}
#cmp-fx.cmp-still[data-look="4"] > .cmp-o2,html.reduced-motion .cmp-prev[data-look="4"] > .cmp-o2{translate:calc(var(--u)*15) calc(var(--u)*2)}
#cmp-fx.cmp-still[data-look="4"] > .cmp-o3,html.reduced-motion .cmp-prev[data-look="4"] > .cmp-o3{translate:calc(var(--u)*4) calc(var(--u)*7)}
#cmp-fx.cmp-still[data-look="5"] > .cmp-o2,#cmp-fx.cmp-still[data-look="5"] > .cmp-o3,
html.reduced-motion .cmp-prev[data-look="5"] > .cmp-o2,html.reduced-motion .cmp-prev[data-look="5"] > .cmp-o3{display:none}

/* ═══════════════════════════════════════
   § 46 · v84 — 🔐 THE RESTRICTED AISLE · the tab, the cards, the purchase sheet, exhibitions
   ═══════════════════════════════════════ */
/* Real money wears violet and gold, so it is never mistaken for a 💎 price.
   The tab: the tenth of a 5 + 5 row; while the event tab is also out it takes
   a row of its own (11 would leave an orphan), and on a phone it always does,
   like the event tab. Hidden, the grid skips it and the row is what it was. */
.market-tab-shop{color:#d9c2ff!important;border-color:rgba(168,85,247,.55)!important}
.market-tab-shop.active{background:rgba(168,85,247,.22)!important;border-color:#c9a7ff!important;color:#fff!important;box-shadow:0 0 18px rgba(168,85,247,.4)}
.market-tabs.has-event .market-tab-shop{grid-column:1 / -1}
@media (max-width:700px){ .market-tab-shop{grid-column:1 / -1} }

.sku-note{border-color:rgba(168,85,247,.6);background:rgba(168,85,247,.07);color:#e4d6ff;display:flex;flex-direction:column;gap:8px}
.sku-note b{color:#fff}
.sku-why{color:var(--gold)}
.sku-why[hidden]{display:none}
.sku-legal{margin-top:16px;font-size:.78rem;color:var(--dim);text-align:center}
.sku-legal a,.sku-links a,.sku-set-legal a{color:#d9c2ff}

.shop-card.sku-card{border-color:rgba(168,85,247,.5);background:linear-gradient(180deg,rgba(168,85,247,.1),rgba(255,215,0,.025))}
.shop-card.sku-card.equipped{border-color:var(--gold)}
.sku-badge{
  display:inline-block;margin-bottom:8px;padding:2px 10px;border-radius:20px;
  font-family:var(--fd);font-size:.46rem;font-weight:900;letter-spacing:.14em;
  color:#d9c2ff;border:1px solid rgba(168,85,247,.6);background:rgba(168,85,247,.12)
}
.sku-btn{width:100%}
.btn.sku-buy{background:linear-gradient(135deg,#ffe27a,#ffb347);color:#1a1200;box-shadow:0 0 18px rgba(255,200,80,.25)}
.btn.sku-buy:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 0 30px rgba(255,200,80,.45)}
.btn.sku-buy:disabled{opacity:.55;cursor:default;filter:saturate(.4)}
body.mode-3d .btn.sku-buy{--wall:#8a6b00;--wallb:#453600;color:#1a1200}
.sku-diamond{color:var(--gold);text-shadow:0 0 18px rgba(255,215,0,.6);font-family:var(--fd);font-weight:900}

/* ◆ SUPPORTER — beside a name on the boards, and a line on the player card. */
.lb-sup{font-style:normal;margin-left:5px;color:var(--gold);text-shadow:0 0 8px rgba(255,215,0,.55);font-size:.9em}
.pc-sup{margin-top:5px;font-family:var(--fd);font-size:.52rem;font-weight:900;letter-spacing:.14em;color:var(--gold)}

/* The purchase sheet and the exhibition card share one shell. */
.sku-tint .fb-modal{max-width:480px;border-color:rgba(168,85,247,.5);box-shadow:0 0 70px rgba(168,85,247,.16),inset 0 0 0 1px rgba(255,255,255,.03)}
.sku-tint .fb-modal::before{background:linear-gradient(90deg,transparent,var(--gold),transparent);box-shadow:0 0 12px var(--gold)}
.sku-tint .fb-title{background:linear-gradient(90deg,var(--gold),#d9c2ff);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
#sku-body,#exhib-body{display:flex;flex-direction:column;gap:12px}
.sku-what{display:flex;align-items:center;gap:14px;font-size:.92rem;line-height:1.4}
.sku-pv{flex:none;display:flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:14px;font-size:2rem;background:var(--s2);border:1px solid var(--border)}
.sku-pv.sku-sw{border-radius:50%;border:2px solid rgba(255,255,255,.2)}
.sku-pv.sku-sky{font-size:1.5rem}
.sku-facts{margin:0;padding-left:18px;display:grid;gap:5px;font-size:.84rem;line-height:1.4;color:var(--dim)}
.sku-facts b{color:var(--text)}
.sku-age{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,215,0,.35);background:rgba(255,215,0,.05);font-size:.84rem;line-height:1.4;cursor:pointer}
.sku-age input{flex:none;width:20px;height:20px;margin:1px 0 0;accent-color:var(--gold);cursor:pointer}
.sku-links{font-size:.8rem;text-align:center}
.sku-acts,.xh-acts{display:flex;flex-wrap:wrap;gap:8px}
.sku-acts .btn,.xh-acts .btn{flex:1 1 150px;min-height:44px}
.sku-err{min-height:1em;font-size:.8rem;color:var(--gold);text-align:center}
.sku-err:empty{display:none}

/* ⚙️ Settings → Purchases: one line per order. */
.sku-orders{display:grid;gap:6px;margin:0 0 12px}
.sku-orders:empty{display:none}
.sku-ord{display:grid;grid-template-columns:auto 1fr auto;gap:2px 10px;align-items:baseline;padding:8px 10px;border-radius:10px;border:1px solid var(--border);background:var(--s2);font-size:.8rem}
.sku-ord b{font-family:var(--fd);font-size:.56rem;letter-spacing:.08em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sku-ord-d{color:var(--dim)}
.sku-ord-a{font-variant-numeric:tabular-nums}
.sku-ord-s{grid-column:1 / 3;font-style:normal;font-family:var(--fd);font-size:.46rem;letter-spacing:.12em;color:var(--dim)}
.sku-ord-s.s-paid{color:var(--lime)}
.sku-ord-s.s-pending{color:var(--gold)}
.sku-ord-ref{grid-column:3;justify-self:end;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5;font-size:.66rem;color:var(--dimmer);user-select:all}
.sku-ord-none{font-size:.8rem;color:var(--dim)}
.sku-set-legal{margin:12px 0 0;font-size:.76rem}
@media (pointer:coarse){ .sku-buy,.sku-btn,#btn-shop-restore{min-height:44px} }

/* 🎟️ EXHIBITION — the hub strip (heat's shape, a ticket's colours), the round's
   banner, the dock's two toys and the card it ends on. */
.exhib-selector{--heat:#c9a7ff}
.exhib-selector[hidden]{display:none}
#chaos-banner.chaos-exhib{
  border-color:rgba(201,167,255,.6);
  background:linear-gradient(100deg,rgba(168,85,247,.16),rgba(255,215,0,.08));
  box-shadow:0 0 26px rgba(168,85,247,.25)
}
#chaos-banner.chaos-exhib .chaos-name{color:#d9c2ff}
#chaos-banner.chaos-exhib .chaos-icon{filter:drop-shadow(0 0 10px rgba(201,167,255,.8))}
.pu-btn.pu-exhib{border-color:rgba(201,167,255,.55);background:rgba(168,85,247,.12)}
.pu-btn.pu-exhib:hover:not(:disabled){box-shadow:0 0 18px rgba(201,167,255,.35);background:rgba(168,85,247,.2)}
.xh-score{display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px;border-radius:12px;border:1px dashed rgba(201,167,255,.5);background:rgba(168,85,247,.07)}
.xh-score b{font-family:var(--fd);font-size:2rem;font-weight:900;color:#d9c2ff;font-variant-numeric:tabular-nums}
.xh-score span{font-family:var(--fd);font-size:.5rem;letter-spacing:.18em;color:var(--dim)}
.xh-toys{text-align:center;font-family:var(--fd);font-size:.6rem;letter-spacing:.1em}
.xh-note{margin:0;font-size:.84rem;line-height:1.45;color:var(--dim);text-align:center}

/* <<FH:BEGIN>> */
/* ══════════════════════════════════════════════════════════════════════
   🛸 FLIGHT DECK — the 3D hub you fly (v88, app.js § 47)
   ══════════════════════════════════════════════════════════════════════
   In 3D the hub is a full-bleed WebGL view (#hs-stage holds the borrowed
   #gl-canvas) with a holographic HUD over it. Everything is scoped to
   body.hub-fly (the deck's layout is in force) or to #hub-space itself, so 2D
   CLASSIC and the 3D list hub are untouched. The list hub's own panels are
   MOVED into #hs-top and the drawer panes while the deck flies; the rules
   under "ADOPTED" refit them to a narrow panel without changing what they are.

   ⚠️ NO backdrop-filter ANYWHERE IN HERE. Every panel of the HUD sits over a
   WebGL canvas that redraws every frame, so a blurred backdrop is a blur of a
   moving full-screen layer, recomputed by the compositor each frame: measured
   on an HD 520, the deck fell from 17 fps to 2.5 with the glass blurred. The
   panels are dark, near-opaque glass instead, and read the same.

   Stacking inside #hub-space: stage 0 · input 1 · fx 2 · labels 3 · hint 4 ·
   where 5 · top / rail / map / touch 6 · dock 7 · panels 8. All of it sits in
   #hub-screen (z 10), so every .fb-overlay (z 2000+), the countdown, the toast
   and the tour layer stay above it.                                          */
#hub-space{display:none}
body.hub-fly #hub-screen{padding:0 !important;overflow:hidden;overflow:clip;justify-content:flex-start}
body.hub-fly #hub-screen > :not(#hub-space){display:none !important}
body.hub-fly #hub-space{
  display:block;position:absolute;inset:0;overflow:hidden;overflow:clip;
  background:radial-gradient(ellipse at 50% 40%,#0a0820 0%,#02030a 70%);
  --hs-glass:rgba(5,10,24,.72);--hs-edge:rgba(120,220,255,.24);--hs-ink:#e9f8ff;
  font-family:var(--fb);color:var(--hs-ink)
}
body.hub-fly #hub-space[hidden]{display:none}
/* The 2D field of white dots behind the screens, the DOM companion and the
   seasonal bats would all sit over real space: the 3D view has its own stars,
   flies the companion beside the ship, and tints its light for the event. */
body.hs-live #bg-canvas{visibility:hidden}
body.hs-live #cmp-fx,body.hs-live #ev-deco{display:none !important}

#hs-stage{position:absolute;inset:0;z-index:0}
#hub-space #gl-canvas{position:absolute;left:0;top:0;border:0;border-radius:0;pointer-events:none;background:#02030a}
#hs-input{position:absolute;inset:0;z-index:1;touch-action:none;cursor:grab;-webkit-user-select:none;user-select:none}
#hs-input.grabbing{cursor:grabbing}
#hs-fx{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}
#hs-labels{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden;overflow:clip}

/* ── LABELS ── a pill over every destination; click it to fly there. Moved
   every frame with transform only, so a frame costs no layout. */
.hs-lbl{
  position:absolute;left:0;top:0;pointer-events:auto;cursor:pointer;
  display:flex;align-items:center;gap:6px;white-space:nowrap;
  margin:0;padding:4px 10px 4px 6px;border-radius:999px;
  font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.08em;color:var(--hs-ink);
  background:rgba(4,10,22,.66);border:1px solid color-mix(in srgb,var(--acc,#00f5ff) 55%,transparent);
  box-shadow:0 0 12px color-mix(in srgb,var(--acc,#00f5ff) 30%,transparent);
  /* Centred over its point with `translate`, which commutes with the per-frame
     translate3d in `transform`. Never `scale` here: it would multiply the
     per-frame offset too and throw the label across the screen. */
  translate:-50% -100%;transition:background .15s,box-shadow .15s,padding .15s;will-change:transform
}
/* ⚠️ The `display:flex` above outranks the browser's own [hidden]{display:none}:
   without this rule a label the placer leaves out stays on screen, frozen at
   the spot, distance and fade it had when it was last placed. */
.hs-lbl[hidden]{display:none}
.hs-lbl:hover{background:rgba(8,20,40,.9)}
.hs-lbl-i{font-size:.9rem;line-height:1}
.hs-lbl-n{text-shadow:0 0 8px color-mix(in srgb,var(--acc,#00f5ff) 70%,transparent)}
.hs-lbl-d{font-family:var(--fb);font-weight:600;font-size:.62rem;letter-spacing:.02em;opacity:.65}
.hs-lbl.hs-station{padding:7px 14px 7px 9px;font-size:.78rem;border-width:2px;letter-spacing:.14em}
.hs-lbl.hs-station .hs-lbl-i{font-size:1.15rem}
.hs-lbl.far{padding:3px 5px;gap:0}
.hs-lbl.far .hs-lbl-n,.hs-lbl.far .hs-lbl-d{display:none}
/* A station near enough for its 3D sign to read keeps a nameplate under it:
   its icon and how far it is. */
.hs-lbl.hs-station.far{padding:5px 12px 5px 8px;gap:7px;translate:-50% 0}
.hs-lbl.hs-station.far .hs-lbl-d{display:inline;font-size:.7rem;opacity:.85}

/* The first flight after an update compiles the renderer's shaders: a quiet
   beacon in the middle of the dark until they land. */
#hub-space.hs-warming::after{
  content:'';position:absolute;left:50%;top:50%;width:54px;height:54px;margin:-27px 0 0 -27px;z-index:2;border-radius:50%;
  border:3px solid rgba(0,245,255,.15);border-top-color:#00f5ff;box-shadow:0 0 22px rgba(0,245,255,.35);
  animation:hsSpin 1s linear infinite;pointer-events:none
}
@keyframes hsSpin{to{transform:rotate(360deg)}}
.hs-lbl.focus{background:color-mix(in srgb,var(--acc,#00f5ff) 26%,rgba(4,10,22,.9));box-shadow:0 0 22px color-mix(in srgb,var(--acc,#00f5ff) 60%,transparent);padding-left:9px;padding-right:13px}
.hs-lbl.auto{outline:2px dashed color-mix(in srgb,var(--acc,#00f5ff) 80%,#fff);outline-offset:2px}
.hs-lbl.locked{filter:saturate(.25) brightness(.85)}
/* 🔒 v107 · A locked mission's pill names the level that opens it, and the
   icon chip it shrinks to across the deck wears a padlock: its beacon is boxed
   (app.js, drawLockBox), and the label says so before the box is in sight. */
.hs-lbl.locked .hs-lbl-n::after{content:' 🔒 LVL ' attr(data-need)}
.hs-lbl.far.locked::after{content:'🔒';position:absolute;right:-6px;bottom:-5px;font-size:.6rem;line-height:1}
.hs-lbl.fav .hs-lbl-n::before{content:'★ ';color:var(--gold)}
/* ✨ v142 · 🏅 A mission's label wears its medal as a pip on the icon (app.js, paintLabels → data-m), in the colours of its pad's
   ring (HL_MEDALS): which beacons still need work, read from a distance. No medal, no pip. */
.hs-lbl[data-m] .hs-lbl-i{position:relative}
.hs-lbl[data-m] .hs-lbl-i::after{content:'';position:absolute;right:-5px;bottom:-3px;width:7px;height:7px;border-radius:50%;
  background:var(--mc);box-shadow:0 0 0 1.5px rgba(4,10,22,.92),0 0 7px var(--mc)}
.hs-lbl[data-m="0"]{--mc:#cd7f32}
.hs-lbl[data-m="1"]{--mc:#c9d1dc}
.hs-lbl[data-m="2"]{--mc:#ffd36a}
.hs-lbl[data-m="3"]{--mc:#9ff3ff}

/* ── TOP BAR ── the list hub's own bar (name, PTS, CR, market, sound,
   fullscreen, settings, exit), adopted, on a band of glass. */
#hs-top{position:absolute;left:10px;right:10px;top:8px;z-index:6;pointer-events:none}
body.hub-fly #hs-top .hub-bar{
  pointer-events:auto;max-width:none;width:100%;margin:0;
  background:linear-gradient(180deg,rgba(4,9,22,.86),rgba(4,9,22,.62)) !important;
  border:1px solid var(--hs-edge) !important;border-radius:14px;
  box-shadow:0 8px 28px rgba(0,0,0,.45),inset 0 1px 0 rgba(160,240,255,.12) !important
}
body.hub-fly #hs-top .hub-bar::after{content:'🛸 FLIGHT DECK'}

/* ── WHERE YOU ARE ── one line under the bar; also the live region. */
#hs-where{
  position:absolute;left:50%;top:calc(var(--hs-top-h,70px) + 14px);z-index:5;translate:-50% 0;pointer-events:none;
  font-family:var(--fd);font-size:.72rem;font-weight:700;letter-spacing:.26em;white-space:nowrap;
  color:#bff6ff;text-shadow:0 0 12px rgba(0,245,255,.75),0 0 2px #000;
  max-width:calc(100% - 40px);overflow:hidden;text-overflow:ellipsis
}
#hs-where.flash{animation:hsFlash .9s ease}
@keyframes hsFlash{0%{opacity:0;letter-spacing:.5em}100%{opacity:1;letter-spacing:.26em}}

/* ── THE RAIL ── the deck's own doors, down the left edge. */
#hs-rail{position:absolute;left:10px;top:calc(var(--hs-top-h,70px) + 18px);z-index:6;display:flex;flex-direction:column;gap:8px}
#hub-space .hs-rb{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:62px;padding:8px 6px}
#hub-space .hs-rb b{font-size:1.15rem;line-height:1;font-weight:400}
#hub-space .hs-rb span{font-family:var(--fd);font-size:.52rem;letter-spacing:.14em}

/* ── THE CARD ── what pops up when you are near. */
#hs-dock{
  position:absolute;left:50%;bottom:calc(30px + var(--hs-bottom,0px));z-index:7;translate:-50% 0;
  width:min(600px,calc(100% - 24px));padding:14px 16px 12px;border-radius:16px;
  background:linear-gradient(160deg,rgba(6,14,30,.9),rgba(4,8,20,.8));
  border:1px solid color-mix(in srgb,var(--acc,#00f5ff) 55%,transparent);
  box-shadow:0 0 0 1px rgba(255,255,255,.03),0 14px 40px rgba(0,0,0,.55),0 0 34px color-mix(in srgb,var(--acc,#00f5ff) 22%,transparent);
  animation:hsPop .26s cubic-bezier(.2,.9,.3,1.2)
}
#hs-dock[hidden]{display:none}
/* The command deck opens over the card's corner: the card waits until it closes. */
body.hs-drawer-open #hs-dock{display:none}
#hs-dock::before{
  content:'';position:absolute;left:14px;right:14px;top:-1px;height:2px;border-radius:2px;
  background:linear-gradient(90deg,transparent,var(--acc,#00f5ff),transparent);opacity:.9
}
@keyframes hsPop{0%{opacity:0;transform:translateY(14px) scale(.96)}100%{opacity:1;transform:none}}
/* On a wide screen the card sits bottom-right, clear of the ship the chase
   camera holds at the bottom of the middle of the view. */
@media (min-width:1100px){
  #hs-dock{left:auto;right:14px;bottom:calc(14px + var(--hs-bottom,0px));translate:none;width:min(520px,calc(100% - 260px))}
}
.hs-dk-head{display:flex;align-items:flex-start;gap:12px}
.hs-dk-ico{font-size:2.1rem;line-height:1;filter:drop-shadow(0 0 10px color-mix(in srgb,var(--acc,#00f5ff) 60%,transparent))}
.hs-dk-tx{flex:1;min-width:0}
.hs-dk-title{font-family:var(--fd);font-weight:900;font-size:1rem;letter-spacing:.1em;color:#fff;
  text-shadow:0 0 14px color-mix(in srgb,var(--acc,#00f5ff) 80%,transparent)}
.hs-dk-chip{margin-left:8px;padding:2px 8px;border-radius:999px;font-size:.55rem;letter-spacing:.14em;vertical-align:middle;
  color:var(--acc,#00f5ff);border:1px solid color-mix(in srgb,var(--acc,#00f5ff) 60%,transparent)}
.hs-dk-sub{margin-top:4px;font-size:.92rem;line-height:1.35;color:rgba(233,248,255,.82)}
.hs-dk-facts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.hs-fact{font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.1em;padding:4px 9px;border-radius:999px;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);color:rgba(233,248,255,.9)}
.hs-fact.hs-lock{color:#ffb4a0;border-color:rgba(255,120,90,.45)}
.hs-dk-acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.hs-dk-key{margin-left:auto;font-family:var(--fd);font-size:.52rem;letter-spacing:.14em;color:rgba(233,248,255,.55);
  padding:3px 7px;border:1px solid rgba(255,255,255,.18);border-radius:6px}
.hs-dk-lane{display:inline-flex;margin-top:10px;border:1px solid rgba(255,255,255,.14);border-radius:10px;overflow:hidden}
.hs-seg{font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.1em;padding:6px 10px;cursor:pointer;
  background:transparent;color:rgba(233,248,255,.7);border:0;border-right:1px solid rgba(255,255,255,.1)}
.hs-seg:last-child{border-right:0}
.hs-seg.on{background:color-mix(in srgb,var(--acc,#00f5ff) 24%,transparent);color:#fff}
.hs-seg:focus-visible{outline:2px solid var(--acc,#00f5ff);outline-offset:-2px}
.hs-dk-prog{height:6px;margin-top:10px;border-radius:4px;background:rgba(255,255,255,.08);overflow:hidden}
.hs-dk-prog i{display:block;height:100%;background:linear-gradient(90deg,var(--acc,#ff8a1a),#ffe2a8)}
/* ✨ v142 · 🏅 A MISSION CARD'S RECORDS (app.js, dockRecords): the list hub's card strip on the deck's card — the bar to the next
   medal in the strip's own colours, the grid record with its 👻 RACE #1 and 🎬 WATCH, the next mastery pip; the heat cleared is a fact. */
.hs-dk-medal{--mcol:#56607a;display:flex;flex-wrap:wrap;align-items:center;gap:3px 8px;margin-top:10px}
.hs-dk-medal.m-bronze{--mcol:#d08a45}
.hs-dk-medal.m-silver{--mcol:#c9d2e3}
.hs-dk-medal.m-gold{--mcol:#ffd700}
.hs-dk-medal.m-diamond{--mcol:#7df9ff}
.hs-dm-ico{flex-shrink:0;width:1.35em;font-size:1.05rem;line-height:1;text-align:center}
.hs-dk-medal.m-none .hs-dm-ico{color:rgba(233,248,255,.45);font-size:.95rem}
.hs-dm-bar{flex:1 1 56px;height:6px;border-radius:3px;background:rgba(255,255,255,.08);overflow:hidden}
.hs-dm-bar i{display:block;height:100%;border-radius:3px;background:var(--mcol);box-shadow:0 0 8px var(--mcol)}
.hs-dk-medal.m-none .hs-dm-bar i{box-shadow:none}
.hs-dm-next{font-family:var(--fd);font-size:.54rem;font-weight:700;letter-spacing:.08em;color:rgba(233,248,255,.8);white-space:nowrap}
.hs-dk-rec{display:flex;align-items:center;gap:8px;margin-top:8px}
.hs-dr-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fb);font-size:.8rem;font-weight:600;color:rgba(233,248,255,.82)}
.hs-dr-acts{display:flex;align-items:center;gap:6px;flex-shrink:0}
/* (the grid card's RACE #1 is .46rem, for a card a third of this one's width; here the two are one size, as the card's own buttons are) */
.hs-dk-rec .gm-race,.hs-dk-rec .rt-watch{margin:0;padding:7px 12px;border-radius:8px;font-size:.58rem;line-height:1.2}
.hs-dk-pip{margin-top:8px;font-family:var(--fd);font-size:.54rem;font-weight:900;letter-spacing:.1em;line-height:1.5;color:var(--gold)}
.hs-fact.hs-heat{color:#ff9a5c;border-color:rgba(255,138,61,.45)}
/* ⚠️ The touch buttons ride on the card's height (--hs-dock-h, above): on a short screen the lines this card gained would carry the climb
   button and BOOST off its top. A phone on its side has no height to give — none of them there (the card is what it was); a small phone
   upright (under 660px: the full card needs about 640) keeps the bar and the record and leaves out the heat and the next pip. */
@media (max-height:500px){
  body.hs-touchmode #hs-dock :is(.hs-dk-medal,.hs-dk-rec,.hs-dk-pip,.hs-fact.hs-heat){display:none}
}
@media (max-height:660px){
  body.hs-touchmode #hs-dock :is(.hs-dk-pip,.hs-fact.hs-heat){display:none}
}

.hs-x{flex:none;width:30px;height:30px;border-radius:8px;cursor:pointer;font-size:.85rem;line-height:1;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.16);color:rgba(233,248,255,.8)}
.hs-x:hover{background:rgba(255,255,255,.12);color:#fff}
.hs-x:focus-visible,.hs-lbl:focus-visible,.hs-row-go:focus-visible,.hs-row-run:focus-visible,.hs-chip:focus-visible,.hs-tab:focus-visible{outline:2px solid #00f5ff;outline-offset:2px}

/* ── THE MAP ── */
#hs-mapbox{
  position:absolute;left:10px;bottom:calc(10px + var(--hs-bottom,0px));z-index:6;width:196px;height:132px;padding:6px;border-radius:14px;
  background:var(--hs-glass);
  border:1px solid var(--hs-edge);box-shadow:0 8px 24px rgba(0,0,0,.4)
}
#hs-map{display:block;width:100%;height:100%;cursor:crosshair}

/* ── THE HINT ── the controls for the device in hand. */
#hs-hint{
  position:absolute;left:50%;bottom:calc(8px + var(--hs-bottom,0px));z-index:4;translate:-50% 0;pointer-events:none;white-space:nowrap;
  font-family:var(--fd);font-size:.5rem;letter-spacing:.14em;color:rgba(200,240,255,.58);
  max-width:calc(100% - 440px);overflow:hidden;text-overflow:ellipsis
}
body.hub-fly #hub-space:has(#hs-dock:not([hidden])) #hs-hint{opacity:0}

/* ── TOUCH ── the left-thumb stick and the climb/boost buttons, only while
   a finger is what is flying. */
#hs-touch{position:absolute;inset:0;z-index:6;pointer-events:none;display:none}
body.hs-touchmode #hs-touch{display:block}
.hs-stick{position:absolute;left:0;top:0;width:0;height:0;opacity:0;transition:opacity .15s}
.hs-stick.on{opacity:1}
.hs-stick::before{content:'';position:absolute;left:-58px;top:-58px;width:116px;height:116px;border-radius:50%;
  border:2px solid rgba(0,245,255,.55);box-shadow:0 0 16px rgba(0,245,255,.35);background:rgba(0,245,255,.05)}
.hs-stick i{position:absolute;left:-22px;top:-22px;width:44px;height:44px;border-radius:50%;
  background:radial-gradient(circle at 40% 35%,rgba(180,250,255,.7),rgba(0,245,255,.25));box-shadow:0 0 14px rgba(0,245,255,.6)}
.hs-tbtn{position:absolute;pointer-events:auto;touch-action:none;border-radius:50%;
  font-family:var(--fd);font-weight:700;font-size:.6rem;letter-spacing:.1em;color:#dff8ff;
  background:rgba(4,12,26,.62);border:2px solid rgba(0,245,255,.5);box-shadow:0 0 14px rgba(0,245,255,.25)}
.hs-tbtn.on{background:rgba(0,245,255,.28)}
.hs-t-boost{right:18px;bottom:calc(40px + var(--hs-bottom,0px));width:78px;height:78px}
.hs-t-up{right:108px;bottom:calc(86px + var(--hs-bottom,0px));width:52px;height:52px;font-size:.9rem}
.hs-t-down{right:108px;bottom:calc(26px + var(--hs-bottom,0px));width:52px;height:52px;font-size:.9rem}
/* With a card up, the buttons stand on top of it. */
body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-boost{bottom:calc(var(--hs-dock-h,150px) + 34px + var(--hs-bottom,0px))}
body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-up{bottom:calc(var(--hs-dock-h,150px) + 80px + var(--hs-bottom,0px))}
body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-down{bottom:calc(var(--hs-dock-h,150px) + 20px + var(--hs-bottom,0px))}
body.hs-touchmode #hs-dock{bottom:calc(12px + var(--hs-bottom,0px))}

/* ── PANELS ── the navigator on the left, the command deck on the right. */
.hs-panel{
  position:absolute;top:calc(var(--hs-top-h,70px) + 14px);bottom:calc(10px + var(--hs-bottom,0px));z-index:8;width:min(400px,calc(100% - 20px));
  display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:16px;
  background:linear-gradient(170deg,rgba(6,13,28,.94),rgba(4,8,20,.9));
  border:1px solid var(--hs-edge);box-shadow:0 18px 50px rgba(0,0,0,.6);
  animation:hsSlide .22s ease
}
.hs-panel[hidden]{display:none}
.hs-nav{left:84px}
.hs-drawer{right:10px;width:min(460px,calc(100% - 20px))}
@keyframes hsSlide{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:none}}
.hs-ph{display:flex;align-items:center;gap:8px}
.hs-pt{flex:1;font-family:var(--fd);font-weight:900;font-size:.8rem;letter-spacing:.18em;color:#bff6ff}
.hs-search{width:100%;margin:0}
.hs-chips{display:flex;flex-wrap:wrap;gap:6px}
.hs-chip{font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.08em;padding:5px 10px;border-radius:999px;cursor:pointer;
  background:rgba(255,255,255,.04);color:rgba(233,248,255,.75);border:1px solid rgba(255,255,255,.14)}
.hs-chip.on{color:#001018;background:#7ff7ff;border-color:#7ff7ff}
.hs-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:4px;padding-right:2px}
.hs-lh{margin:8px 2px 2px;font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.2em;color:var(--cyan)}
.hs-row{display:flex;gap:4px;align-items:stretch}
.hs-row-go{flex:1;min-width:0;display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;cursor:pointer;text-align:left;
  background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-left:3px solid var(--acc,#00f5ff);color:var(--hs-ink)}
.hs-row-go:hover{background:rgba(255,255,255,.08)}
.hs-row-i{font-size:1.1rem;line-height:1}
.hs-row-n{flex:1;min-width:0;font-family:var(--fd);font-size:.66rem;font-weight:700;letter-spacing:.08em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hs-row-m{font-size:.8rem;opacity:.85;white-space:nowrap}
.hs-row-run{flex:none;width:40px;border-radius:10px;cursor:pointer;font-size:.8rem;
  background:color-mix(in srgb,var(--acc,#00f5ff) 18%,rgba(255,255,255,.03));border:1px solid color-mix(in srgb,var(--acc,#00f5ff) 45%,transparent);color:#fff}
.hs-row-run:disabled{opacity:.35;cursor:not-allowed}
.hs-row.locked .hs-row-go{opacity:.6}
.hs-empty{padding:18px;text-align:center;color:rgba(233,248,255,.6)}
.hs-tabs{flex:1;display:flex;gap:6px}
.hs-tab{flex:1;font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.1em;padding:8px 6px;border-radius:10px;cursor:pointer;
  background:rgba(255,255,255,.04);color:rgba(233,248,255,.7);border:1px solid rgba(255,255,255,.12)}
.hs-tab.on{background:rgba(0,245,255,.16);color:#fff;border-color:rgba(0,245,255,.55)}
.hs-pane{flex:1;min-height:0;overflow-y:auto;padding:2px 2px 6px}
.hs-pane[hidden]{display:none}

/* ── ADOPTED ── the list hub's panels, refitted to a panel ~430px wide. They
   keep every class and id they had; only their outer box changes here. */
body.hub-fly .hs-pane > *{max-width:none !important;width:auto !important;margin:0 0 12px !important}
body.hub-fly .hs-pane .xp-rail{gap:10px;padding:10px 12px}
body.hub-fly .hs-pane .xp-rail .xp-track{flex:1 1 100%;order:3}
body.hub-fly .hs-pane .diff-btns{flex-wrap:wrap;justify-content:center}
body.hub-fly .hs-pane .chaos-selector,body.hub-fly .hs-pane .heat-selector{flex-wrap:wrap}
body.hub-fly .hs-pane .lb-panel{max-height:none}
body.hub-fly .hs-pane .sec-label{margin:14px 0 8px}
body.hub-fly .hs-pane > div > .sec-label:first-child{margin-top:2px}

/* ── PHONES ── the bar on two compact rows, the deck's rail as a row of icons
   under it and the map beside them, so the bottom of the screen belongs to the
   thumb: the stick on the left, BOOST and climb on the right, and the card. */
@media (max-width:760px){
  body.hub-fly #hs-top{left:6px;right:6px;top:6px}
  body.hub-fly #hs-top .hub-bar{padding:6px 8px;gap:6px;border-radius:12px}
  body.hub-fly #hs-top .hub-logo-sm,body.hub-fly #hs-top .hub-bar::after{display:none}
  body.hub-fly #hs-top .hub-right{gap:5px;justify-content:center;row-gap:6px}
  body.hub-fly #hs-top .hub-right .btn{padding:6px 8px}
  #hs-rail{flex-direction:row;left:6px;top:calc(var(--hs-top-h,92px) + 8px);gap:6px}
  #hub-space .hs-rb{min-width:44px;padding:6px 4px}
  #hub-space .hs-rb span{display:none}
  #hs-mapbox{left:auto;right:6px;bottom:auto;top:calc(var(--hs-top-h,92px) + 8px);width:112px;height:76px;padding:4px;border-radius:10px}
  #hs-where{top:calc(var(--hs-top-h,92px) + 92px);font-size:.58rem;letter-spacing:.16em}
  #hs-hint{display:none}
  .hs-panel{top:auto;bottom:var(--hs-bottom,0px);left:0;right:0;width:100%;max-height:72%;border-radius:18px 18px 0 0}
  .hs-drawer{width:100%}
  #hs-dock{bottom:calc(8px + var(--hs-bottom,0px));padding:12px}
  .hs-dk-title{font-size:.86rem}
  .hs-dk-sub{font-size:.84rem}
  .hs-t-boost{right:14px;bottom:calc(26px + var(--hs-bottom,0px));width:74px;height:74px}
  .hs-t-up{right:100px;bottom:calc(66px + var(--hs-bottom,0px));width:50px;height:50px}
  .hs-t-down{right:100px;bottom:calc(10px + var(--hs-bottom,0px));width:50px;height:50px}
  /* With a card up, the buttons stand on top of it. */
  body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-boost{bottom:calc(var(--hs-dock-h,150px) + 22px + var(--hs-bottom,0px))}
  body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-up{bottom:calc(var(--hs-dock-h,150px) + 62px + var(--hs-bottom,0px))}
  body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-down{bottom:calc(var(--hs-dock-h,150px) + 8px + var(--hs-bottom,0px))}
}
/* 📱 v131 · A PHONE ON ITS SIDE gets the phone's top half. An 844×390 iPhone is
   wider than the 760px the block above asks for, so it took the desktop's: the
   bar on two tall rows over a third of the glass, and the rail running down the
   left edge past the bottom, under the map. Here the bar drops the logo and fits
   on one row, the rail is a row of icons under it, the map stands at the right,
   out of the stick's way, and the line that says where you are drops below
   them. The thumbs' half — the stick, BOOST and climb, the card — keeps the wide
   screen's places: there is room for them side by side. A drawer, while it is
   open, takes the whole height (it has its own ✕): under the bar it was a strip
   with room for two rows of its list. */
@media (pointer:coarse) and (orientation:landscape) and (max-height:500px){
  .hs-panel{top:6px;bottom:calc(6px + var(--hs-bottom,0px))}
  .hs-nav{left:6px}
  body.hub-fly #hs-top{left:6px;right:6px;top:6px}
  body.hub-fly #hs-top .hub-bar{padding:6px 8px;gap:6px;border-radius:12px}
  body.hub-fly #hs-top .hub-logo-sm,body.hub-fly #hs-top .hub-bar::after{display:none}
  body.hub-fly #hs-top .hub-right{gap:5px;justify-content:center;row-gap:6px}
  body.hub-fly #hs-top .hub-right .btn{padding:6px 8px}
  #hs-rail{flex-direction:row;left:6px;top:calc(var(--hs-top-h,70px) + 8px);gap:6px}
  #hub-space .hs-rb{min-width:44px;padding:6px 4px}
  #hub-space .hs-rb span{display:none}
  #hs-mapbox{left:auto;right:6px;bottom:auto;top:calc(var(--hs-top-h,70px) + 8px);width:150px;height:100px;padding:4px;border-radius:10px}
  #hs-where{top:calc(var(--hs-top-h,70px) + 64px);font-size:.58rem;letter-spacing:.16em}
}
/* The arcade's own REDUCE MOTION switch (VFX, html.reduced-motion) as well as
   the system's: no pop, no slide, no flash. The spinner keeps turning — it is
   the only sign the deck is still loading. */
@media (prefers-reduced-motion:reduce){
  #hs-dock,.hs-panel,#hs-where.flash{animation:none}
}
html.reduced-motion #hs-dock,html.reduced-motion .hs-panel,html.reduced-motion #hs-where.flash{animation:none}

/* ── 🎓 v90 · FLIGHT TRAINING rides the tour's layer (§ 45) ──
   Its flying steps are the coach strip, under the status line: no dim, the
   deck flies underneath, and — unlike a round's strip — SKIP STEP can be
   pressed (not every player has the keys a step asks for).
   ⚠️ The deck's containers CLIP rather than hide (above): overflow:hidden still
   scrolls programmatically, and the tour's scrollIntoView on a label shifted
   the whole label layer off its anchors. */
.tut-layer.deck.coach #tut-pass{pointer-events:auto;margin:0}
.tut-layer.deck.coach .tut-btns{gap:6px}
/* A phone: two buttons beside the words left them a column three words wide —
   the strip stacks instead, words across, buttons under them. */
@media (max-width:560px){
  .tut-layer.deck.coach .tut-card{grid-template-columns:1fr}
  .tut-layer.deck.coach .tut-btns{grid-column:1;grid-row:auto;margin-top:6px}
}
#hub-space .hs-train{margin-left:auto;font-size:.95rem}
/* What the tour lights over a station (spotStation): an empty box. Toggled with
   `hidden` — and nothing else sets its display, so the [hidden] rule holds. */
#hs-spot{position:absolute;left:0;top:0;z-index:2;pointer-events:none}
#hs-spot[hidden]{display:none}
#hub-space .hs-train + .hs-x{margin-left:0}
/* <<FH:END>> */

/* ══════════════════════════════════════════════════════════════
   💬 TOOLTIPS (v106, § 48 in app.js)
   The hover text every `title` in the arcade used to hand to the browser,
   which drew it as a grey box in the system font. It is one element, #pi-tip,
   placed by script over (or under) whatever is hovered: a dark glass plate
   with a neon edge and a pointer, in the interface's own type. Its colours are
   palette vars, so the colourblind-safe palette repoints it with everything
   else. At rest it has no transform — the entrance is the only move — so its
   text is drawn on the pixel grid, never resampled (the A SOLID AT REST IS
   FLAT note). pointer-events:none: it can sit over any control and never take
   its click. Above every overlay, under the custom cursor (z 99999).
   ══════════════════════════════════════════════════════════════ */
#pi-tip{
  position:fixed;left:0;top:0;z-index:99990;pointer-events:none;
  max-width:min(300px,calc(100vw - 16px));padding:7px 12px 6px;
  background:linear-gradient(180deg,rgba(16,20,42,.97),rgba(6,8,20,.97));
  border:1px solid color-mix(in srgb,var(--cyan) 60%,transparent);border-radius:9px;
  color:#e9fbff;font-family:var(--fb);font-size:.86rem;font-weight:600;line-height:1.3;
  letter-spacing:.02em;text-align:center;white-space:pre-line;overflow-wrap:anywhere;
  text-shadow:0 0 10px color-mix(in srgb,var(--cyan) 35%,transparent);
  box-shadow:0 10px 26px rgba(0,0,0,.6),0 0 18px color-mix(in srgb,var(--cyan) 22%,transparent),
             inset 0 1px 0 rgba(255,255,255,.08);
  opacity:0;visibility:hidden;transform:translateY(4px) scale(.97);
  transition:opacity .12s ease,transform .14s var(--pop-ease,ease),visibility 0s linear .14s;
}
#pi-tip.show{opacity:1;visibility:visible;transform:none;transition:opacity .12s ease,transform .14s var(--pop-ease,ease),visibility 0s}
#pi-tip.below{transform:translateY(-4px) scale(.97)}
#pi-tip.below.show{transform:none}
/* The pointer: a turned square under the plate (over it when the tip sits
   below), at --ax, the hovered control's centre — clamped by the script so it
   never leaves the plate's rounded corners. */
#pi-tip::after{
  content:'';position:absolute;left:var(--ax,50%);bottom:-5px;width:8px;height:8px;
  background:rgb(6,8,20);border:solid color-mix(in srgb,var(--cyan) 60%,transparent);
  border-width:0 1px 1px 0;transform:translateX(-50%) rotate(45deg);
}
#pi-tip.below::after{bottom:auto;top:-5px;background:rgb(16,20,42);border-width:1px 0 0 1px}
/* 3D CYBERPUNK: the plate gets a body like every other solid, flat on screen. */
body.mode-3d #pi-tip{
  border-radius:10px;
  box-shadow:0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
             0 18px 28px -10px rgba(0,0,0,.95),0 0 18px color-mix(in srgb,var(--cyan) 22%,transparent),
             inset 0 1px 0 rgba(255,255,255,.14);
}
@media (prefers-reduced-motion:reduce){
  #pi-tip,#pi-tip.below,#pi-tip.show{transform:none;transition:none}
}
html.reduced-motion #pi-tip,html.reduced-motion #pi-tip.below,html.reduced-motion #pi-tip.show{transform:none;transition:none}

/* ══════════════════════════════════════════════════════════════
   📦 SMALLER DOWNLOADS (v109, § 49 in app.js)
   The countdown overlay's wait for a 3D round's models: GO! makes way for one
   line, a bar and a count, and — after a moment, for a player who would rather
   not wait — a button that plays the round in 2D. Palette vars only, so the
   colourblind-safe palette repoints it with everything else.
   ══════════════════════════════════════════════════════════════ */
#cd-ov.dl-on #cd-num{display:none}
.dl-wait{display:flex;flex-direction:column;align-items:center;gap:10px;width:min(360px,100%);text-align:center}
.dl-wait[hidden],.dl-wait-2d[hidden]{display:none}
.dl-wait-t{font-family:var(--fd);font-size:1rem;font-weight:700;letter-spacing:.14em;color:var(--text);
  text-shadow:0 0 12px color-mix(in srgb,var(--cyan) 55%,transparent)}
.dl-wait-bar{width:100%;height:6px;border-radius:3px;background:var(--s2);overflow:hidden;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--cyan) 30%,transparent)}
.dl-wait-bar i{display:block;width:0;height:100%;background:var(--cyan);box-shadow:0 0 10px var(--cyan);transition:width .25s ease}
.dl-wait-n{font-family:var(--fd);font-size:.78rem;letter-spacing:.12em;color:var(--dim)}
.dl-wait-2d{margin-top:6px}
@media (prefers-reduced-motion:reduce){ .dl-wait-bar i{transition:none} }
html.reduced-motion .dl-wait-bar i{transition:none}

/* ══════════════════════════════════════════════════════════════
   ⌨️ KEY REMAPPING (v109, § 50 in app.js)
   Settings → INPUT → KEYBOARD KEYS: one row an action, its name and what it
   does on the left, its two keys on the right. A key cap that has been moved
   off the arcade's default carries the accent; the one waiting for a press
   pulses (held still under reduced motion). On a phone the note drops under
   the name and the two caps keep their size. Palette vars only, so the
   colourblind-safe palette repoints it with everything else.
   ══════════════════════════════════════════════════════════════ */
.keys-modal{max-width:560px}
.keys-list{display:flex;flex-direction:column;gap:6px;margin:12px 0 10px}
.keys-row{display:grid;grid-template-columns:1fr 92px 92px;align-items:center;gap:8px;padding:6px 8px;
  border:1px solid var(--border);border-radius:10px;background:var(--s1)}
.keys-act{display:flex;flex-direction:column;min-width:0}
.keys-act b{font-family:var(--fd);font-size:.74rem;letter-spacing:.12em;color:var(--text)}
.keys-act span{font-size:.82rem;color:var(--dim);line-height:1.2;overflow-wrap:anywhere}
.keys-slot{height:38px;border-radius:8px;border:1px solid var(--border2);background:rgba(4,4,14,.7);color:var(--text);
  font-family:var(--fd);font-size:.78rem;font-weight:700;letter-spacing:.06em;cursor:pointer;padding:0 6px;
  box-shadow:inset 0 -3px 0 rgba(255,255,255,.06);transition:border-color .15s ease,box-shadow .15s ease}
.keys-slot:hover,.keys-slot:focus-visible{border-color:var(--cyan);outline:none;box-shadow:inset 0 -3px 0 rgba(255,255,255,.06),0 0 0 2px color-mix(in srgb,var(--cyan) 35%,transparent)}
.keys-slot.empty{color:var(--dimmer)}
.keys-slot.moved{border-color:color-mix(in srgb,var(--gold) 70%,transparent);color:var(--gold)}
.keys-slot.wait{border-color:var(--cyan);color:var(--cyan);font-size:.62rem;animation:keysWait 1s ease-in-out infinite}
@keyframes keysWait{50%{box-shadow:0 0 14px color-mix(in srgb,var(--cyan) 55%,transparent)}}
.keys-warn{min-height:1.2em;margin:2px 0 10px;font-size:.9rem;color:var(--gold);line-height:1.3}
.keys-warn[hidden]{display:none}
body.mode-3d .keys-slot{box-shadow:0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,inset 0 1px 0 rgba(255,255,255,.1)}
@media (max-width:520px){
  .keys-row{grid-template-columns:1fr 74px 74px;padding:6px}
  .keys-slot{height:40px;font-size:.72rem}
}
@media (prefers-reduced-motion:reduce){ .keys-slot.wait{animation:none} }
html.reduced-motion .keys-slot.wait{animation:none}

/* ══════════════════════════════════════════════════════════════
   👻 RECORD GHOSTS (v109, § 51 in app.js)
   👻 RACE #1 sits at the end of a card's GRID RECORD line: the strip itself
   stays out of the pointer's way (the card takes every other click), the
   button takes its own. The line's text gives way first, ellipsised. The
   leaderboard's 👻 RECORDS rows are board rows with the mission named over
   the holder; the sheet is the challenge link's card, gold-edged.
   ══════════════════════════════════════════════════════════════ */
.gm-rec{display:flex;align-items:center;gap:6px}
.gm-rec-t{min-width:0;overflow:hidden;text-overflow:ellipsis}
.gm-race{flex-shrink:0;margin-left:auto;pointer-events:auto;cursor:pointer;padding:2px 7px 1px;border-radius:6px;
  border:1px solid color-mix(in srgb,var(--gold) 55%,transparent);background:rgba(255,215,0,.08);color:var(--gold);
  font-family:var(--fd);font-size:.46rem;font-weight:700;letter-spacing:.08em;white-space:nowrap}
.gm-race:hover,.gm-race:focus-visible{background:rgba(255,215,0,.18);outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--gold) 40%,transparent)}
.rg-row .lb-name{display:flex;flex-direction:column;line-height:1.2}
.rg-mission{font-family:var(--fd);font-size:.5rem;letter-spacing:.12em;color:var(--cyan);overflow:hidden;text-overflow:ellipsis}
.rg-row .rg-race{flex-shrink:0;padding:4px 8px;font-size:.55rem}
.rg-modal{max-width:440px;border-color:rgba(255,215,0,.45);box-shadow:0 0 70px rgba(255,215,0,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.rg-line{font-size:.9rem;line-height:1.5;color:var(--text);margin:0 2px 12px}
.rg-line.dim{color:var(--dim)}
.rg-card{text-align:center;padding:14px 12px 12px;margin-bottom:6px;border:1px solid rgba(255,215,0,.4);border-radius:var(--r);background:rgba(255,215,0,.06)}
.rg-who{font-family:var(--fd);font-size:.55rem;letter-spacing:.2em;color:var(--dim)}
.rg-pts{margin-top:4px;font-family:var(--fd);font-size:1.9rem;font-weight:900;color:var(--gold);line-height:1.15}
.rg-pts em{font-style:normal;font-size:.5rem;letter-spacing:.16em;color:var(--dimmer);margin-left:6px}
.rg-by{margin-top:6px;font-size:.84rem;color:var(--text);overflow-wrap:anywhere}
@media (max-width:700px){ .gm-race{font-size:.42rem;padding:2px 5px 1px} }
@media (max-width:520px){
  .rg-modal{padding:24px 16px 20px}
  .rg-modal .fb-head{padding:0 30px}
  .rg-modal .cl-btns{flex-direction:column-reverse}
  .rg-modal .cl-btns .btn{width:100%}
}

/* ══════════════════════════════════════════════════════════════
   📬 AWAY INBOX (v109, § 52 in app.js)
   The hub bar's 📬 wears its unread count as a pill on its corner — the
   Flight Deck adopts the whole bar, so the pill flies there too. The sheet
   is one list of buttons, an unread one edged in cyan; the WHILE YOU WERE
   AWAY card is the same sheet with the unread four. A board an item opens
   is lit for a moment (aw-flash): an outline, not a flash, when motion is
   reduced. Palette vars only, so the colourblind-safe palette repoints it.
   ══════════════════════════════════════════════════════════════ */
.btn-inbox{position:relative}
.btn-inbox[hidden]{display:none}
.inbox-badge{position:absolute;top:-7px;right:-7px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;
  background:var(--pink);color:#fff;font-family:var(--fd);font-size:.55rem;font-weight:900;line-height:18px;text-align:center;
  box-shadow:0 0 10px color-mix(in srgb,var(--pink) 70%,transparent),0 0 0 2px var(--bg);pointer-events:none}
.inbox-badge[hidden]{display:none}
.aw-modal{max-width:520px}
.aw-list{display:flex;flex-direction:column;gap:6px;margin:4px 0 12px}
.aw-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:10px 12px;border-radius:10px;
  border:1px solid var(--border);background:var(--s1);color:var(--text);font:inherit;cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease}
.aw-item.new{border-color:color-mix(in srgb,var(--cyan) 60%,transparent);background:color-mix(in srgb,var(--cyan) 7%,transparent)}
button.aw-item:hover,button.aw-item:focus-visible{border-color:var(--cyan);outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--cyan) 35%,transparent)}
.aw-ic{flex-shrink:0;width:28px;font-size:1.3rem;line-height:1;text-align:center}
.aw-txt{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.aw-txt b{font-size:.95rem;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.aw-txt em{font-style:normal;font-size:.82rem;color:var(--dim);line-height:1.3;overflow-wrap:anywhere}
.aw-go{flex-shrink:0;color:var(--dimmer);font-size:1.3rem;line-height:1}
.aw-empty{margin:6px 2px 14px;font-size:.92rem;line-height:1.5;color:var(--dim)}
.aw-empty span{display:block;margin-top:8px;color:var(--dimmer)}
.aw-more{margin:-4px 0 12px;text-align:center;font-size:.84rem;color:var(--dim)}
/* ✨ v142 · § 99 · a wish's sale line and its BUY: the line is still the button it was, the BUY is its neighbour (a button cannot hold one). */
.aw-row{display:flex;align-items:stretch;gap:6px}
.aw-row .aw-item{flex:1 1 auto;width:auto;min-width:0}
.aw-buy{flex:none;max-width:38%;white-space:normal;line-height:1.25}
.aw-flash{animation:awFlash 1.6s ease}
@keyframes awFlash{0%,100%{box-shadow:none}25%,65%{box-shadow:0 0 0 2px var(--cyan),0 0 26px color-mix(in srgb,var(--cyan) 40%,transparent)}}
@media (prefers-reduced-motion:reduce){ .aw-flash{animation:none;outline:2px solid var(--cyan);outline-offset:3px} }
html.reduced-motion .aw-flash{animation:none;outline:2px solid var(--cyan);outline-offset:3px}
@media (max-width:520px){
  .aw-modal,.wn-modal{padding:24px 16px 20px}
  .aw-modal .fb-head,.wn-modal .fb-head{padding:0 30px}
  .aw-modal .cl-btns,.wn-modal .cl-btns{flex-direction:column-reverse}
  .aw-modal .cl-btns .btn,.wn-modal .cl-btns .btn{width:100%}
  .aw-item{padding:9px 10px;gap:8px}
}

/* ══════════════════════════════════════════════════════════════
   📰 WHAT'S NEW (v109, § 53 in app.js)
   A release a block: its version and date over its lines, which are the
   inbox's rows (.aw-item) — a line that opens something is a button with
   the inbox's arrow; one that opens nothing is the same row, inert.
   ══════════════════════════════════════════════════════════════ */
.wn-modal{max-width:540px}
.wn-list{display:flex;flex-direction:column;gap:16px;margin:4px 0 12px}
.wn-rel{display:flex;flex-direction:column;gap:6px}
.wn-v{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;padding:0 2px 2px;border-bottom:1px solid var(--border)}
.wn-v b{font-family:var(--fd);font-size:.9rem;font-weight:900;letter-spacing:.08em;color:var(--cyan)}
.wn-v span{font-family:var(--fd);font-size:.55rem;letter-spacing:.16em;color:var(--dim)}
.wn-v em{margin-left:auto;font-style:normal;font-family:var(--fd);font-size:.5rem;letter-spacing:.16em;color:var(--gold)}
.wn-item.static{cursor:default}

/* ══════════════════════════════════════════════════════════════
   ✨ 3D STARS (v111, § 54 in app.js)
   The sky behind every screen in 3D mode: a WebGL canvas in the dots' place,
   on their layer (z-index 0, under every screen, over the event glow it lets
   through). It is shown only while § 54 says it is the page's sky
   (body.sky3d-on) — the dots stand down then and come back the moment it
   stops — and, like the dots, never while the Flight Deck flies.
   v112: the stars fly past now; the Flight Deck draws the same moving stars
   in its own renderer, so this canvas still stands down while it flies.
   ══════════════════════════════════════════════════════════════ */
#sky3d{position:fixed;inset:0;z-index:0;pointer-events:none;visibility:hidden}
body.sky3d-on #sky3d{visibility:visible}
body.sky3d-on #bg-canvas,body.hs-live #sky3d{visibility:hidden}

/* ══════════════════════════════════════════════════════════════
   🌀🚀 HYPERDRIVE AND THE EXPEDITIONS (v113, § 47 and § 55 in app.js)
   The Flight Deck's two HYPERDRIVE beacons jump the ship to Saturn and to the
   black hole. While it jumps (body.hs-warping) and while an expedition plays
   (body.xp-on) the deck's HUD stands down; the expedition's own layer
   (#xp-layer) sits over the same canvas, taking no pointer but its buttons'
   — the pointer is the deck's input layer, which the expedition reads.
   ⚠️ No backdrop-filter here either: it is over a full-screen WebGL view
   (see the Flight Deck's note above).
   ══════════════════════════════════════════════════════════════ */
#hs-flash{position:absolute;inset:0;z-index:30;pointer-events:none;opacity:0;
  background:radial-gradient(ellipse at 50% 50%,#ffffff 0%,#f2f7ff 42%,#d4e6ff 100%)}
body.hs-warping #hub-space > :not(#hs-stage):not(#hs-input):not(#hs-flash):not(#xp-layer),
body.xp-on #hub-space > :not(#hs-stage):not(#hs-input):not(#hs-flash):not(#xp-layer){
  opacity:0;visibility:hidden;transition:opacity .35s ease,visibility 0s .35s}
body.xp-on #hs-input{cursor:crosshair}
/* The OFFLINE strip stands down with them: an expedition is full-screen, and
   its HUD stands on the bottom edge (it is back the moment the ship is home). */
body.xp-on #offline-bar{visibility:hidden}
.hs-lbl.hs-warp{padding:6px 13px 6px 9px;font-size:.74rem;border-width:2px;letter-spacing:.12em;
  box-shadow:0 0 18px color-mix(in srgb,var(--acc,#ffc46b) 55%,transparent)}
.hs-lbl.hs-warp .hs-lbl-i{font-size:1.1rem}

#xp-layer{position:absolute;inset:0;z-index:20;pointer-events:none;font-family:var(--fb);color:#f4ead8;overflow:hidden;overflow:clip}
#xp-hud,#xp-pops{position:absolute;inset:0}
#xp-pops{overflow:hidden;overflow:clip}
/* The entry's heat: the edges of the view glowing as the air burns round the ship. */
#xp-heat{position:absolute;inset:0;opacity:0;pointer-events:none;
  background:radial-gradient(ellipse at 50% 45%,rgba(255,140,40,0) 38%,rgba(255,120,30,.45) 78%,rgba(255,70,10,.85) 100%)}
#xp-black{position:absolute;inset:0;background:#000;opacity:0;pointer-events:none}

/* A title card across the middle: a kicker, the name, a line. */
.xp-card{position:absolute;left:50%;top:30%;transform:translate(-50%,-50%);text-align:center;opacity:0;
  transition:opacity .9s ease,transform .9s ease;pointer-events:none;width:min(92vw,900px)}
.xp-card.on{opacity:1;transform:translate(-50%,-56%)}
.xp-card-k{font-family:var(--fd);font-size:.7rem;letter-spacing:.42em;color:rgba(255,226,180,.85)}
.xp-card-t{font-family:var(--fd);font-weight:900;font-size:clamp(2rem,6.2vw,4.6rem);letter-spacing:.24em;
  color:#fff6e4;text-shadow:0 0 28px rgba(255,190,110,.55),0 4px 18px rgba(0,0,0,.85);margin:.15em 0 .25em}
.xp-card-s{font-size:clamp(.9rem,1.7vw,1.15rem);letter-spacing:.04em;color:#f1e3c8;text-shadow:0 2px 10px rgba(0,0,0,.9)}
/* ARC on the radio, a warning: a line along the bottom. */
.xp-sub{position:absolute;left:50%;bottom:92px;transform:translateX(-50%);max-width:min(90vw,760px);text-align:center;
  padding:9px 16px;border-radius:10px;background:rgba(6,8,14,.72);border:1px solid rgba(255,214,150,.25);
  font-size:1rem;letter-spacing:.02em;color:#f6ecd8;opacity:0;transition:opacity .4s ease}
.xp-sub.on{opacity:1}
.xp-sub.warn{border-color:rgba(255,90,70,.55);color:#ffd9cf}
/* Pause, and HOME in the black hole: top right. ◀ ▶ through the timeline: bottom centre. */
.xp-bar{position:absolute;top:14px;right:14px;display:flex;gap:8px;pointer-events:auto}
.xp-b{min-width:44px;font-family:var(--fd);letter-spacing:.08em;background:rgba(8,10,18,.78) !important}
.xp-home{border-color:rgba(255,214,150,.55) !important;color:#ffe9c4 !important}
.xp-nav{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);display:flex;align-items:center;gap:10px;pointer-events:auto}
.xp-nav[hidden],.xp-b[hidden],.xp-modal[hidden]{display:none}
.xp-nav-t{min-width:74px;text-align:center;font-family:var(--fd);font-size:.72rem;letter-spacing:.14em;color:#ffe2b0}
/* The modal: pause, a lost ship, the prize. */
.xp-modal{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:auto;
  background:radial-gradient(ellipse at 50% 50%,rgba(6,6,12,.55),rgba(0,0,0,.82))}
.xp-modal-in{width:min(92vw,470px);padding:26px 24px 22px;border-radius:var(--rl);text-align:center;
  background:linear-gradient(160deg,rgba(18,14,10,.97),rgba(6,5,8,.99));border:1px solid rgba(255,200,120,.38);
  box-shadow:0 0 70px rgba(255,170,80,.16),inset 0 0 0 1px rgba(255,255,255,.03);animation:xpIn .32s cubic-bezier(.2,.9,.3,1.2)}
@keyframes xpIn{from{transform:translateY(16px) scale(.97);opacity:0}to{transform:none;opacity:1}}
.xp-m-k{font-family:var(--fd);font-size:.6rem;letter-spacing:.3em;color:rgba(255,220,170,.8)}
.xp-m-t{font-family:var(--fd);font-weight:900;font-size:1.5rem;letter-spacing:.1em;color:#fff3dc;margin:8px 0 10px}
.xp-m-s{font-size:1rem;line-height:1.35;color:#e9dcc4;margin-bottom:16px}
.xp-m-btns{display:flex;flex-direction:column;gap:9px}
/* ✨ v142 · The pause card's controls line and hint (the regular pause card's .ps-ctl and .pause-hint), and the ring a
   controller's focus wears on the card's buttons (padModal): the UA's own appears for keys, not for a script's focus(). */
.xp-m-ctl{font-family:var(--fd);font-size:.56rem;line-height:1.75;letter-spacing:.08em;color:rgba(255,226,180,.7);margin:-4px 0 16px}
.xp-m-hint{margin-top:12px;font-size:.74rem;color:rgba(233,220,196,.5)}
.xp-modal.xp-padnav .btn:focus{outline:2px solid #ffd27a;outline-offset:3px}
/* A short screen (a phone on its side): the pause card has an AUDIO button more, so every card tightens and scrolls if it must
   (a pad's focus scrolls it into view), and the pause card's hint goes: the controls line is what a paused player is looking for. */
@media (max-height:560px){
  .xp-modal-in{max-height:calc(100% - 16px);overflow-y:auto;padding:14px 18px 12px}
  .xp-m-t{font-size:1.25rem;margin:4px 0 6px}
  .xp-m-s{font-size:.92rem;margin-bottom:10px}
  .xp-m-ctl{margin:-2px 0 10px}
  .xp-m-btns{gap:6px}
  .xp-m-btns .btn{padding:8px 18px}
  .xp-m-hint{display:none}
}
.xp-prize{display:flex;align-items:center;gap:16px;margin:6px 0 14px;padding:12px 14px;border-radius:12px;text-align:left;
  background:rgba(255,190,90,.07);border:1px solid rgba(255,196,107,.3)}
.xp-prize-t{display:flex;flex-direction:column;gap:4px}
.xp-prize-t b{font-family:var(--fd);font-size:.72rem;letter-spacing:.18em;color:#ffd27a}
.xp-prize-t span{font-size:.95rem;color:#f1e3c8}

/* 🏆 SATURN CHAMPION's swatch, on its shelf and on the prize: champion gold, a
   sheen crossing it, a ring round it — the planet the colour was won at. */
.champ-swatch{position:relative;flex:0 0 auto;width:56px;height:56px;border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#fff3c6 0%,#ffd36a 22%,#f4b23c 52%,#b8741a 100%);
  box-shadow:0 0 22px rgba(244,178,60,.7),inset 0 -6px 12px rgba(120,60,0,.45);overflow:visible}
.champ-swatch::before{content:'';position:absolute;inset:0;border-radius:50%;overflow:hidden;
  background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.75) 46%,transparent 62%);
  background-size:260% 100%;animation:champSheen 2.8s ease-in-out infinite}
.champ-swatch::after{content:'';position:absolute;left:-22%;right:-22%;top:41%;height:18%;border-radius:50%;
  border:2px solid rgba(255,226,160,.85);transform:rotate(-16deg);box-shadow:0 0 10px rgba(255,200,110,.6)}
.shop-swatch.champ-swatch{border:0;margin:0 auto 12px}
@keyframes champSheen{0%{background-position:130% 0}55%,100%{background-position:-60% 0}}
.shop-card.shop-limited{border-color:rgba(244,178,60,.55);box-shadow:0 0 22px rgba(244,178,60,.18)}
.shop-evtag.shop-ltd{color:#1a0e00;background:linear-gradient(90deg,#fff1b8,#f4b23c);box-shadow:0 0 12px rgba(244,178,60,.55)}
@media (prefers-reduced-motion:reduce){.champ-swatch::before{animation:none}.xp-card,.xp-sub{transition:none}}
html.reduced-motion .champ-swatch::before{animation:none}

/* ══════════════════════════════════════════════════════════════════════
   § v118 — 🏆 SATURN CHAMPION · the theme no colour can buy
   Scoped to html.theme-champion, which champTheme() (app.js, after
   applyEquippedCosmetics) sets while col-champion is worn — equipped and
   owned. --cyan is still the colour, #f4b23c; this is what no other colour
   gets: Saturn's ring turning behind every menu (#champ-fx, the canvas the
   same code draws), gold sweeping across the primary buttons, the logo and
   your name in moving gold, a champion's glow on the bars. The seasonal
   events own body::before and the logo's ::after, and none of this uses them.
   The reduced-motion rule (§ 👁️) stops every animation here; the canvas then
   draws one still frame.
   ══════════════════════════════════════════════════════════════════════ */
#champ-fx{position:fixed;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(110% 55% at 50% 112%,rgba(244,178,60,.13),transparent 60%),
    radial-gradient(70% 38% at 50% -6%,rgba(255,211,106,.07),transparent 60%)}
/* Never over the sign-in screen or the Flight Deck (champFrame() draws nothing there either).
   🎯 v132 · Over a round it stays, held still (ltdStage(), app.js) and dimmed — see § v132 below. */
body.hs-live #champ-fx,body:has(#auth-screen.active) #champ-fx{display:none}

/* The primary buttons: champion gold, and a sheen crossing them every few seconds. :where() keeps the
   face at .btn-primary's own weight, so a button that paints itself (⟳ REBOOT's gold) keeps its look.
   The sheen is ::after (3D mode's .btn::before is its specular) moved by a TRANSFORM, on a layer of its
   own, so the compositor slides it and nothing repaints: swept as a background-position, forty shop
   buttons repainting cost the 3D-mode market 8 fps. Its position and clip carry no weight at all, so a
   button a rule of its own places stays where it is. */
:where(html.theme-champion) .btn-primary{
  background-image:linear-gradient(135deg,#fff0bd 0%,#ffd36a 28%,#f4b23c 58%,#c47f1e 100%);
  color:#1a0e00;box-shadow:0 0 20px rgba(244,178,60,.3)}
:where(html.theme-champion) .btn-primary:hover{box-shadow:0 0 34px rgba(255,196,90,.55)}
:where(html.theme-champion .btn-primary){position:relative;overflow:hidden}
:where(html.theme-champion) .btn-primary::after{
  content:'';position:absolute;top:0;bottom:0;left:0;width:45%;pointer-events:none;border-radius:inherit;
  background:linear-gradient(105deg,transparent 10%,rgba(255,255,255,.62) 50%,transparent 90%);
  transform:translateX(-120%);animation:champSweep 5.5s ease-in-out infinite}
@keyframes champSweep{0%{transform:translateX(-120%)}28%,100%{transform:translateX(250%)}}
html.theme-champion body.mode-3d .btn-primary{--wall:#9a5c12;--wallb:#523005}

/* The logo, your name and a champion's name on a board, in moving gold: the gradient slides one whole
   tile a cycle, so it never jumps. No glow filter on them: a filter over text that repaints every frame
   is the expensive kind. .lb-champ-n is not scoped: every viewer sees a champion's row. */
html.theme-champion .hub-logo-sm,html.theme-champion .hub-uname,.lb-champ-n{
  background-image:linear-gradient(90deg,#c47f1e 0%,#f4b23c 16%,#fff3c6 30%,#ffd36a 42%,#f4b23c 58%,#ffe9a8 74%,#c47f1e 100%);
  background-size:200% 100%;background-repeat:repeat;-webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;animation:champText 6s linear infinite}
@keyframes champText{from{background-position:0 0}to{background-position:-200% 0}}
.lb-champ-n{font-weight:700}
.lb-champ-i{margin-right:5px;filter:drop-shadow(0 0 6px rgba(244,178,60,.65))}
.lb-row.lb-champ{box-shadow:inset 0 0 0 1px rgba(244,178,60,.26),0 0 16px rgba(244,178,60,.14)}

/* The bars: a champion's glow, over the seasonal one — and in 3D on top of the desk's own body. */
html.theme-champion .hub-bar{border-color:rgba(244,178,60,.4);box-shadow:0 0 34px -8px rgba(244,178,60,.42),inset 0 -1px 0 rgba(255,211,106,.38)}
html.theme-champion body.mode-3d .hub-bar{box-shadow:
    0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
    0 14px 22px -12px rgba(0,0,0,.85),0 0 34px -8px rgba(244,178,60,.42),
    inset 0 1px 0 rgba(255,255,255,.11),inset 0 -1px 0 rgba(255,211,106,.38)}
html.theme-champion .sec-label{text-shadow:0 0 12px rgba(244,178,60,.28)}
html.theme-champion body.hub-fly #hub-space{--hs-edge:rgba(255,206,120,.34)}
/* The prize itself, worn: a champion's glow on its shelf card. */
html.theme-champion .shop-card.shop-limited.equipped{box-shadow:0 0 34px rgba(255,200,100,.38)}
/* Over the Flight Deck and during a round the gold holds still: the deck has the ring round the ship, a
   round has its game — and gold moving over the deck's WebGL frame cost it 3 fps on the iGPU. */
body.hs-live :is(.hub-logo-sm,.hub-uname),body.hs-live .btn-primary::after,
body:has(#game-screen.active) :is(.hub-logo-sm,.hub-uname),body:has(#game-screen.active) .btn-primary::after{animation-play-state:paused}

/* ══════════════════════════════════════════════════════════════════════
   § v118 — 🕳️ EVENT HORIZON · the other theme no colour can buy
   Scoped to html.theme-horizon, which horizonTheme() (app.js, beside
   champTheme) sets while col-horizon is worn — equipped and owned; a
   colossus felled inside Gargantua gives it. --cyan is the colour, #ff8f45,
   the disc's ember; this is what the champion's theme is to its gold: the
   black hole behind every menu (#horizon-fx, the canvas the same code draws),
   the primary buttons in the disc's light — blue-white on one side, ember on
   the other — the logo and your name moving through it, the bars aglow. The
   reduced-motion rule (§ 👁️) stops every animation here; the canvas then
   draws one still frame.
   ══════════════════════════════════════════════════════════════════════ */
/* Its swatch, on its shelf and on the prize: the shadow; the disc across it, edge-on, blue-white on the
   side coming round and ember on the other; the far side's light bent over its top (the <i>); a glint
   running round the photon ring. */
.horizon-swatch{position:relative;flex:0 0 auto;width:56px;height:56px;border-radius:50%;
  background:radial-gradient(circle at 50% 50%,#000 0 33%,rgba(255,226,190,.95) 35.5%,rgba(255,150,80,.5) 41%,rgba(255,110,40,.12) 52%,rgba(0,0,0,0) 64%);
  box-shadow:0 0 22px rgba(255,143,69,.5),0 0 34px rgba(150,180,255,.22);overflow:visible}
.horizon-swatch::before{content:'';position:absolute;left:-24%;right:-24%;top:45%;height:10%;border-radius:50%;
  background:linear-gradient(90deg,rgba(220,232,255,0) 0%,#e4eeff 14%,#fff0d8 36%,#ffb070 62%,#ff5a1e 86%,rgba(255,90,30,0) 100%);
  box-shadow:0 0 10px rgba(255,160,90,.65);transform:rotate(-6deg)}
.horizon-swatch i{position:absolute;inset:13%;border-radius:50%;border:0 solid transparent;
  border-top:2px solid rgba(255,222,180,.9);border-bottom:1px solid rgba(255,180,120,.4);transform:rotate(-6deg)}
.horizon-swatch::after{content:'';position:absolute;inset:17%;border-radius:50%;
  background:conic-gradient(from 0deg,transparent 0 80%,rgba(255,244,226,.95) 88%,transparent 93%);
  -webkit-mask:radial-gradient(circle,transparent 60%,#000 62% 70%,transparent 72%);mask:radial-gradient(circle,transparent 60%,#000 62% 70%,transparent 72%);
  animation:horizonSpin 3.2s linear infinite}
@keyframes horizonSpin{to{transform:rotate(-360deg)}}
.shop-swatch.horizon-swatch{border:0;margin:0 auto 12px}
.shop-card.shop-limited.ltd-horizon{border-color:rgba(255,143,69,.55);box-shadow:0 0 22px rgba(255,143,69,.16),0 0 30px rgba(150,180,255,.1)}
.shop-evtag.shop-ltd.ltd-horizon{color:#160700;background:linear-gradient(90deg,#e4eeff,#fff0d8 40%,#ff8f45);box-shadow:0 0 12px rgba(255,143,69,.5)}
@media (prefers-reduced-motion:reduce){.horizon-swatch::after{animation:none}}
html.reduced-motion .horizon-swatch::after{animation:none}

#horizon-fx{position:fixed;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(90% 46% at 50% 44%,rgba(255,130,60,.09),transparent 62%),
    radial-gradient(40% 30% at 30% 44%,rgba(150,180,255,.05),transparent 60%)}
/* Never over the sign-in screen or the Flight Deck (horizonFrame() draws nothing there either); over a round
   held still and dimmed (🎯 v132 · § v132 below). */
body.hs-live #horizon-fx,body:has(#auth-screen.active) #horizon-fx{display:none}

/* The primary buttons in the disc's light, and a sheen crossing them — the champion's, in blue-white
   (see § v118 above for why it is a transform on ::after, and why :where()). */
:where(html.theme-horizon) .btn-primary{
  background-image:linear-gradient(135deg,#e4eeff 0%,#fff0d8 24%,#ffb070 54%,#d8521a 100%);
  color:#170800;box-shadow:0 0 20px rgba(255,143,69,.3)}
:where(html.theme-horizon) .btn-primary:hover{box-shadow:0 0 34px rgba(255,150,90,.5),0 0 18px rgba(170,200,255,.28)}
:where(html.theme-horizon .btn-primary){position:relative;overflow:hidden}
:where(html.theme-horizon) .btn-primary::after{
  content:'';position:absolute;top:0;bottom:0;left:0;width:45%;pointer-events:none;border-radius:inherit;
  background:linear-gradient(105deg,transparent 10%,rgba(236,244,255,.6) 50%,transparent 90%);
  transform:translateX(-120%);animation:champSweep 5.5s ease-in-out infinite}
html.theme-horizon body.mode-3d .btn-primary{--wall:#8a3a10;--wallb:#4a1904}

/* The logo, your name and a wearer's name on a board, moving through the disc's light (the champion's
   champText slide). .lb-horizon-n is not scoped: every viewer sees a wearer's row. */
html.theme-horizon .hub-logo-sm,html.theme-horizon .hub-uname,.lb-horizon-n{
  background-image:linear-gradient(90deg,#c0441a 0%,#ff8f45 16%,#fff0d8 30%,#cfe0ff 42%,#ffb070 58%,#fff0d8 74%,#c0441a 100%);
  background-size:200% 100%;background-repeat:repeat;-webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;animation:champText 6s linear infinite}
.lb-horizon-n{font-weight:700}
.lb-horizon-i{margin-right:5px;filter:drop-shadow(0 0 6px rgba(255,143,69,.65))}
.lb-row.lb-horizon{box-shadow:inset 0 0 0 1px rgba(255,143,69,.26),0 0 16px rgba(150,180,255,.12)}

/* The bars aglow — and in 3D on top of the desk's own body. */
html.theme-horizon .hub-bar{border-color:rgba(255,143,69,.4);box-shadow:0 0 34px -8px rgba(255,143,69,.4),inset 0 -1px 0 rgba(207,224,255,.32)}
html.theme-horizon body.mode-3d .hub-bar{box-shadow:
    0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
    0 14px 22px -12px rgba(0,0,0,.85),0 0 34px -8px rgba(255,143,69,.4),
    inset 0 1px 0 rgba(255,255,255,.11),inset 0 -1px 0 rgba(207,224,255,.32)}
html.theme-horizon .sec-label{text-shadow:0 0 12px rgba(255,143,69,.28)}
html.theme-horizon body.hub-fly #hub-space{--hs-edge:rgba(255,160,100,.34)}
/* The prize itself, worn. (Over the Flight Deck and during a round it holds still: the rule above.) */
html.theme-horizon .shop-card.shop-limited.equipped{box-shadow:0 0 34px rgba(255,150,90,.36)}

/* ══════════════════════════════════════════════════════════════════════
   § v125 — 👾 KERNEL PANIC · the third theme no colour can buy
   Scoped to html.theme-glitch, which glitchTheme() (app.js, beside
   horizonTheme) sets while col-glitch is worn — equipped and owned; THE
   GLITCH purged at the server core gives it. --cyan is the colour, #39ff14,
   the Glitch's green. What the others' canvases are to theirs, #glitch-fx is
   to this — scanlines, and tears crossing the screen now and then, in CSS;
   and (👾 v132) THE GLITCH and its daemons on a canvas inside it. The primary
   buttons, the logo and your name torn into magenta and cyan; a wearer's name
   on a board too. The reduced-motion rule (§ 👁️) stops every animation here;
   the canvas then draws one still frame.
   ══════════════════════════════════════════════════════════════════════ */
/* Its swatch, on its shelf and on the prize: THE GLITCH itself, a box-shadow a pixel, its magenta and cyan
   copies jumping apart now and then. */
.glitch-swatch{position:relative;flex:0 0 auto;width:56px;height:56px;border-radius:12px;background:radial-gradient(circle at 50% 45%,#0c2a12,#030a05 72%);
  box-shadow:0 0 22px rgba(57,255,20,.42),inset 0 0 0 1px rgba(57,255,20,.32);overflow:hidden}
.glitch-swatch i,.glitch-swatch::before,.glitch-swatch::after{content:'';position:absolute;left:50%;top:50%;width:4px;height:4px;margin:-16px 0 0 -22px;background:transparent}
.glitch-swatch i{box-shadow:8px 0px #39ff14,32px 0px #39ff14,12px 4px #39ff14,28px 4px #39ff14,8px 8px #39ff14,12px 8px #39ff14,16px 8px #39ff14,20px 8px #39ff14,24px 8px #39ff14,28px 8px #39ff14,32px 8px #39ff14,4px 12px #39ff14,8px 12px #39ff14,16px 12px #39ff14,20px 12px #39ff14,24px 12px #39ff14,32px 12px #39ff14,36px 12px #39ff14,0px 16px #39ff14,4px 16px #39ff14,8px 16px #39ff14,12px 16px #39ff14,16px 16px #39ff14,20px 16px #39ff14,24px 16px #39ff14,28px 16px #39ff14,32px 16px #39ff14,36px 16px #39ff14,40px 16px #39ff14,0px 20px #39ff14,8px 20px #39ff14,12px 20px #39ff14,16px 20px #39ff14,20px 20px #39ff14,24px 20px #39ff14,28px 20px #39ff14,32px 20px #39ff14,40px 20px #39ff14,0px 24px #39ff14,8px 24px #39ff14,32px 24px #39ff14,40px 24px #39ff14,12px 28px #39ff14,16px 28px #39ff14,24px 28px #39ff14,28px 28px #39ff14;filter:drop-shadow(0 0 3px rgba(57,255,20,.8))}
.glitch-swatch::before{box-shadow:8px 0px rgba(255,43,214,.6),32px 0px rgba(255,43,214,.6),12px 4px rgba(255,43,214,.6),28px 4px rgba(255,43,214,.6),8px 8px rgba(255,43,214,.6),12px 8px rgba(255,43,214,.6),16px 8px rgba(255,43,214,.6),20px 8px rgba(255,43,214,.6),24px 8px rgba(255,43,214,.6),28px 8px rgba(255,43,214,.6),32px 8px rgba(255,43,214,.6),4px 12px rgba(255,43,214,.6),8px 12px rgba(255,43,214,.6),16px 12px rgba(255,43,214,.6),20px 12px rgba(255,43,214,.6),24px 12px rgba(255,43,214,.6),32px 12px rgba(255,43,214,.6),36px 12px rgba(255,43,214,.6),0px 16px rgba(255,43,214,.6),4px 16px rgba(255,43,214,.6),8px 16px rgba(255,43,214,.6),12px 16px rgba(255,43,214,.6),16px 16px rgba(255,43,214,.6),20px 16px rgba(255,43,214,.6),24px 16px rgba(255,43,214,.6),28px 16px rgba(255,43,214,.6),32px 16px rgba(255,43,214,.6),36px 16px rgba(255,43,214,.6),40px 16px rgba(255,43,214,.6),0px 20px rgba(255,43,214,.6),8px 20px rgba(255,43,214,.6),12px 20px rgba(255,43,214,.6),16px 20px rgba(255,43,214,.6),20px 20px rgba(255,43,214,.6),24px 20px rgba(255,43,214,.6),28px 20px rgba(255,43,214,.6),32px 20px rgba(255,43,214,.6),40px 20px rgba(255,43,214,.6),0px 24px rgba(255,43,214,.6),8px 24px rgba(255,43,214,.6),32px 24px rgba(255,43,214,.6),40px 24px rgba(255,43,214,.6),12px 28px rgba(255,43,214,.6),16px 28px rgba(255,43,214,.6),24px 28px rgba(255,43,214,.6),28px 28px rgba(255,43,214,.6);transform:translateX(-1.5px);mix-blend-mode:screen;animation:glitchSplitL 2.6s steps(1,end) infinite}
.glitch-swatch::after{box-shadow:8px 0px rgba(0,229,255,.6),32px 0px rgba(0,229,255,.6),12px 4px rgba(0,229,255,.6),28px 4px rgba(0,229,255,.6),8px 8px rgba(0,229,255,.6),12px 8px rgba(0,229,255,.6),16px 8px rgba(0,229,255,.6),20px 8px rgba(0,229,255,.6),24px 8px rgba(0,229,255,.6),28px 8px rgba(0,229,255,.6),32px 8px rgba(0,229,255,.6),4px 12px rgba(0,229,255,.6),8px 12px rgba(0,229,255,.6),16px 12px rgba(0,229,255,.6),20px 12px rgba(0,229,255,.6),24px 12px rgba(0,229,255,.6),32px 12px rgba(0,229,255,.6),36px 12px rgba(0,229,255,.6),0px 16px rgba(0,229,255,.6),4px 16px rgba(0,229,255,.6),8px 16px rgba(0,229,255,.6),12px 16px rgba(0,229,255,.6),16px 16px rgba(0,229,255,.6),20px 16px rgba(0,229,255,.6),24px 16px rgba(0,229,255,.6),28px 16px rgba(0,229,255,.6),32px 16px rgba(0,229,255,.6),36px 16px rgba(0,229,255,.6),40px 16px rgba(0,229,255,.6),0px 20px rgba(0,229,255,.6),8px 20px rgba(0,229,255,.6),12px 20px rgba(0,229,255,.6),16px 20px rgba(0,229,255,.6),20px 20px rgba(0,229,255,.6),24px 20px rgba(0,229,255,.6),28px 20px rgba(0,229,255,.6),32px 20px rgba(0,229,255,.6),40px 20px rgba(0,229,255,.6),0px 24px rgba(0,229,255,.6),8px 24px rgba(0,229,255,.6),32px 24px rgba(0,229,255,.6),40px 24px rgba(0,229,255,.6),12px 28px rgba(0,229,255,.6),16px 28px rgba(0,229,255,.6),24px 28px rgba(0,229,255,.6),28px 28px rgba(0,229,255,.6);transform:translateX(1.5px);mix-blend-mode:screen;animation:glitchSplitR 2.6s steps(1,end) infinite}
@keyframes glitchSplitL{0%,84%{transform:translateX(-1.5px)}85%{transform:translate(-5px,1px)}88%{transform:translate(2px,-1px)}91%,100%{transform:translateX(-1.5px)}}
@keyframes glitchSplitR{0%,84%{transform:translateX(1.5px)}85%{transform:translate(5px,-1px)}88%{transform:translate(-3px,1px)}91%,100%{transform:translateX(1.5px)}}
.shop-swatch.glitch-swatch{border:0;margin:0 auto 12px}
.shop-card.shop-limited.ltd-glitch{border-color:rgba(57,255,20,.55);box-shadow:0 0 22px rgba(57,255,20,.16),0 0 30px rgba(255,43,214,.1)}
.shop-evtag.shop-ltd.ltd-glitch{color:#021a06;background:linear-gradient(90deg,#ff2bd6,#39ff14 40%,#00e5ff);box-shadow:0 0 12px rgba(57,255,20,.5)}

/* Behind every menu: scanlines, and three tears of light that jump down the screen now and then.
   👾 v132 · …and THE GLITCH itself in the middle of them, with its daemons: the canvas glitchFrame() (app.js)
   draws, as Saturn and Gargantua are drawn behind the other two themes' menus — under the tears, which
   cross it. */
#glitch-fx{position:fixed;inset:0;z-index:1;pointer-events:none;overflow:hidden;
  background:repeating-linear-gradient(0deg,rgba(57,255,20,.03) 0 1px,transparent 1px 4px)}
#glitch-fx canvas{position:absolute;left:0;top:0}
#glitch-fx i{position:absolute;left:0;right:0;top:-10%;height:3px;opacity:0;mix-blend-mode:screen;
  background:linear-gradient(90deg,transparent,rgba(57,255,20,.28) 18%,rgba(255,43,214,.32) 50%,rgba(0,229,255,.28) 82%,transparent);
  animation:glitchTear 7s steps(1,end) infinite}
#glitch-fx i:nth-child(2){height:8px;animation-duration:11s;animation-delay:-3.2s}
#glitch-fx i:nth-child(3){height:2px;animation-duration:5.3s;animation-delay:-1.4s}
@keyframes glitchTear{0%,88%{top:-10%;opacity:0}89%{top:22%;opacity:1}90%{top:61%;opacity:.9}91%{top:34%;opacity:.8}92%,100%{top:-10%;opacity:0}}
/* Never over the sign-in screen or the Flight Deck; over a round held still and dimmed (🎯 v132 · § v132 below). */
body.hs-live #glitch-fx,body:has(#auth-screen.active) #glitch-fx{display:none}

/* The primary buttons in its green, their words split. */
:where(html.theme-glitch) .btn-primary{
  background-image:linear-gradient(135deg,#c8ffd8 0%,#5dff3c 38%,#39ff14 62%,#1fc40a 100%);
  color:#021a06;text-shadow:-1px 0 rgba(255,43,214,.55),1px 0 rgba(0,229,255,.55);box-shadow:0 0 20px rgba(57,255,20,.3)}
:where(html.theme-glitch) .btn-primary:hover{box-shadow:0 0 34px rgba(57,255,20,.5),0 0 18px rgba(255,43,214,.26)}
html.theme-glitch body.mode-3d .btn-primary{--wall:#13650c;--wallb:#073805}

/* The logo, your name and a wearer's name on a board, split into magenta and cyan and torn now and then.
   .lb-glitch-n is not scoped: every viewer sees a wearer's row. */
html.theme-glitch .hub-logo-sm,html.theme-glitch .hub-uname,.lb-glitch-n{
  color:#39ff14;-webkit-text-fill-color:#39ff14;text-shadow:-1.5px 0 rgba(255,43,214,.75),1.5px 0 rgba(0,229,255,.75);animation:glitchText 4.2s steps(1,end) infinite}
@keyframes glitchText{0%,91%{text-shadow:-1.5px 0 rgba(255,43,214,.75),1.5px 0 rgba(0,229,255,.75)}
  92%{text-shadow:-4px 0 rgba(255,43,214,.95),4px 0 rgba(0,229,255,.95),0 0 10px rgba(57,255,20,.6)}
  94%{text-shadow:3px 1px rgba(255,43,214,.95),-3px -1px rgba(0,229,255,.95)}
  96%,100%{text-shadow:-1.5px 0 rgba(255,43,214,.75),1.5px 0 rgba(0,229,255,.75)}}
.lb-glitch-n{font-weight:700}
.lb-glitch-i{margin-right:5px;filter:drop-shadow(0 0 6px rgba(57,255,20,.65))}
.lb-row.lb-glitch{box-shadow:inset 0 0 0 1px rgba(57,255,20,.26),0 0 16px rgba(255,43,214,.1)}

/* The bars aglow — and in 3D on top of the desk's own body. */
html.theme-glitch .hub-bar{border-color:rgba(57,255,20,.4);box-shadow:0 0 34px -8px rgba(57,255,20,.4),inset 0 -1px 0 rgba(255,43,214,.3)}
html.theme-glitch body.mode-3d .hub-bar{box-shadow:
    0 1px 0 #10162a,0 2px 0 #10162a,0 3px 0 #070a14,0 4px 0 #070a14,
    0 14px 22px -12px rgba(0,0,0,.85),0 0 34px -8px rgba(57,255,20,.4),
    inset 0 1px 0 rgba(255,255,255,.11),inset 0 -1px 0 rgba(255,43,214,.3)}
html.theme-glitch .sec-label{text-shadow:-1px 0 rgba(255,43,214,.45),1px 0 rgba(0,229,255,.45)}
html.theme-glitch body.hub-fly #hub-space{--hs-edge:rgba(57,255,20,.34)}
html.theme-glitch .shop-card.shop-limited.equipped{box-shadow:0 0 34px rgba(57,255,20,.36)}

/* ══════════════════════════════════════════════════════════════════════
   § v132 — 🎯 THE SOLO MISSIONS WEAR IT
   A round used to put every one of the three themes away the moment it
   came up. Now, while SATURN CHAMPION, EVENT HORIZON or KERNEL PANIC is
   worn, a round keeps it: the backdrop stands round the board — held still
   (ltdStage() in app.js: one frame, drawn as the round comes up, because a
   round has its game and every frame of it is the game's) and dimmed, so
   the board stays the brightest thing on the screen; the mission's name in
   the theme's lettering; the board in the theme's light. In 3D the
   interceptor flies inside its ring, its disc or its corruption, as it does
   on the Flight Deck, and its engines burn its light (ltdFx3dRot and
   ltdEngine, app.js).
   ══════════════════════════════════════════════════════════════════════ */
body:has(#game-screen.active) :is(#champ-fx,#horizon-fx,#glitch-fx){opacity:.7}
/* KERNEL PANIC's tears would cross the board: over a round its scanlines and THE GLITCH stay, and they go. */
body:has(#game-screen.active) #glitch-fx i{display:none}

/* The mission's name: the theme's colour and light, held still. Not the logo's gradient face: in 3D the
   title's extruded text-shadow (body.mode-3d .g-title) would bury a background-clipped face, as it buried
   the logo's (🧊 3D CHROME: "the logo came out a flat dull teal"), so 3D restates that stack with the light
   on it. */
html.theme-champion #g-title{color:#ffd36a;text-shadow:0 0 14px rgba(244,178,60,.55)}
html.theme-horizon #g-title{color:#ffe2c4;text-shadow:-1px 0 rgba(170,200,255,.6),0 0 14px rgba(255,143,69,.55)}
html.theme-glitch #g-title{color:#39ff14;text-shadow:-1.5px 0 rgba(255,43,214,.75),1.5px 0 rgba(0,229,255,.75)}
html.theme-champion body.mode-3d #g-title{text-shadow:0 1px 0 rgba(0,0,0,.9),0 2px 0 rgba(0,0,0,.7),0 3px 0 rgba(0,0,0,.5),
  0 8px 14px rgba(0,0,0,.85),0 0 16px rgba(244,178,60,.5)}
html.theme-horizon body.mode-3d #g-title{text-shadow:-1px 0 rgba(170,200,255,.55),0 1px 0 rgba(0,0,0,.9),0 2px 0 rgba(0,0,0,.7),
  0 3px 0 rgba(0,0,0,.5),0 8px 14px rgba(0,0,0,.85),0 0 16px rgba(255,143,69,.5)}
html.theme-glitch body.mode-3d #g-title{text-shadow:-1.5px 0 rgba(255,43,214,.75),1.5px 0 rgba(0,229,255,.75),0 2px 0 rgba(0,0,0,.7),
  0 3px 0 rgba(0,0,0,.5),0 8px 14px rgba(0,0,0,.85)}

/* The board in the theme's light: its edge in the colour and a glow round it — Saturn's gold; the disc's
   light, blue-white on the left and ember on the right as its Doppler has it; THE GLITCH's green with a
   magenta and a cyan copy of the edge either side. In 3D on top of the bezel's own stack (🧊 3D CHROME,
   THE BOARD ITSELF). The 2D canvas under a 3D one (.behind-gl) keeps its clear edge. */
html.theme-champion{--ltd-edge:rgba(244,178,60,.55);--ltd-glow:0 0 30px -4px rgba(244,178,60,.34)}
html.theme-horizon{--ltd-edge:rgba(255,143,69,.55);--ltd-glow:-10px 0 30px -8px rgba(170,200,255,.3),10px 0 30px -8px rgba(255,120,50,.36)}
html.theme-glitch{--ltd-edge:rgba(57,255,20,.55);--ltd-glow:-2px 0 0 rgba(255,43,214,.42),2px 0 0 rgba(0,229,255,.42),0 0 30px -4px rgba(57,255,20,.3)}
:is(html.theme-champion,html.theme-horizon,html.theme-glitch) #board-frame > :is(#arcade-canvas:not(.behind-gl),#gl-canvas){
  border-color:var(--ltd-edge);box-shadow:var(--ltd-glow)}
:is(html.theme-champion,html.theme-horizon,html.theme-glitch) body.mode-3d #board-frame > :is(#arcade-canvas:not(.behind-gl),#gl-canvas){
  box-shadow:0 2px 0 #10162a,0 4px 0 #10162a,0 6px 0 #070a14,0 8px 0 #070a14,
    0 26px 40px -16px rgba(0,0,0,.95),inset 0 1px 0 rgba(255,255,255,.14),var(--ltd-glow)}

/* ══════════════════════════════════════════════════════════════════════
   § v133 — ⛶ FULL-SCREEN WORLDS
   An open world (a solo mission's, or a round an event plays in its
   open-world lane) fills the whole screen, as a HYPERDRIVE expedition does,
   while body.ow-full is on (owFullApply() in app.js: a world is up on the
   board and ⚙️ Settings → 🌐 OPEN WORLDS is on). The board frame stands
   behind everything as the viewport itself — fitCanvas() sizes the board to
   it, and the 3D surface, its fx layer and the world's HUD follow the board
   as they always have. The round's header, progress bar, chaos chip, power
   dock and versus strip stay where they are in the screen's flow, floating
   over the world on a shade across the top (the expedition's bar, in the
   round's own clothes), and take no pointer but their controls': the mouse
   steers over every pixel of the world. The OFFLINE strip stands down, as
   it does for an expedition. body.ow-world (a world is up, either way)
   shows the ⤡ / ⤢ switch in the header.
   ══════════════════════════════════════════════════════════════════════ */
#btn-owfull{display:none}
body.ow-world #btn-owfull{display:inline-flex}
/* A phone held upright has room for Quit and five controls in that row, not six: there the switch is on the
   pause card only (#pause-owfull, which every screen has). */
@media (max-width:419px){body.ow-world #btn-owfull{display:none}}
body.ow-full #game-screen{padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left))}
body.ow-full #game-screen #board-frame{position:fixed;inset:0;width:auto;max-width:none;margin:0;z-index:0}
/* No board's edge, bezel or glow: there is no board now, there is the screen. (Enough IDs to outweigh the
   limited editions' light on it, § v132.) */
html body.ow-full #game-screen #board-frame > :is(#arcade-canvas,#gl-canvas){border:0;border-radius:0;box-shadow:none}
body.ow-full #game-screen #gl-fx,body.ow-full #game-screen #board-frame::before,body.ow-full #game-screen #board-frame::after{border-radius:0}
/* The Overclock tint hangs off .g-area, which has nothing in its flow now: over the whole screen instead. */
body.ow-full #game-screen .g-area.overclocked-run::after{position:fixed;z-index:1}
/* The shade the header floats on: dark at the top edge, gone a third of the way down. */
body.ow-full #game-screen::before{content:'';position:fixed;left:0;right:0;top:0;height:min(200px,34vh);z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(2,4,10,.7),rgba(2,4,10,.34) 55%,rgba(2,4,10,0))}
body.photo-nohud.ow-full #game-screen::before{opacity:0;transition:opacity .2s}
body.ow-full #game-screen > :is(.g-hdr,.prog-bar,#chaos-banner,#pu-dock,#mp-hud){position:relative;z-index:2;pointer-events:none}
body.ow-full #game-screen > :is(.g-hdr,.prog-bar,#chaos-banner,#pu-dock,#mp-hud) :is(button,a,input,select){pointer-events:auto}
/* The header and the bars run the screen's width — there is no board for them to follow — and the 3D desk
   under the header goes, so it is the world that shows through. */
body.ow-full #game-screen :is(.g-hdr,.prog-bar,#mp-hud){max-width:none}
body.ow-full #game-screen .g-hdr{margin-bottom:8px;background:none;box-shadow:none;grid-template-columns:auto minmax(0,1fr) auto auto;row-gap:4px}
body.ow-full #game-screen .prog-bar{margin-bottom:8px}
/* As short as it can be, since a world's own readouts sit under it (makeHud's `top` in app.js): one row —
   Quit, the name, the readouts and the controls, as a phone on its side has it — with the keys under it. The
   keys are read once and go after a few seconds, as an expedition's title card does, but keep their line, so
   nothing under the header jumps. On a phone held upright, Quit and the controls, then the readouts: the name
   and the keys go (both are on the pause card). */
body.ow-full #game-screen .g-hdr > #btn-quit{grid-column:1;grid-row:1}
body.ow-full #game-screen .g-title{grid-column:2;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.ow-full #game-screen .g-stats{grid-column:3;grid-row:1}
body.ow-full #game-screen .g-hdr > .g-actions{grid-column:4;grid-row:1}
body.ow-full #game-screen .g-controls{grid-column:1/-1;grid-row:2;color:#c9d3e6;animation:owfFade 1.2s ease 7s forwards}
body.ow-full #game-screen :is(.g-title,.g-controls){text-shadow:0 1px 2px rgba(0,0,0,.95),0 2px 12px rgba(0,0,0,.85)}
@keyframes owfFade{to{opacity:0;visibility:hidden}}
@media (max-width:700px) and (orientation:portrait),(max-width:700px) and (min-height:501px){
  body.ow-full #game-screen .g-hdr{grid-template-columns:auto 1fr auto}
  body.ow-full #game-screen :is(.g-title,.g-controls){display:none}
  body.ow-full #game-screen .g-hdr > .g-actions{grid-column:3}
  body.ow-full #game-screen .g-stats{grid-column:1/-1;grid-row:2}
}
body.ow-full #offline-bar{visibility:hidden}

/* ═════════════════════════════════════════════════
   ✋ LEFT-HANDED (v121 · html.lefty, LEFTY in app.js)
   ═════════════════════════════════════════════════
   The touch layouts mirrored for a left hand. Positions only — no direction is
   mirrored (◀ still turns left). The canvas-drawn controls of the open worlds
   and the expeditions are mirrored in app.js (touchButtons), the stick zones
   too; what is a DOM element is mirrored here. */
/* The Flight Deck: BOOST and climb on the left, the map out of their way on the right. Past the rail
   (NAV · PILOT · RULES · GRID runs down the left edge, and on a landscape phone it reaches the bottom). */
html.lefty .hs-t-boost{right:auto;left:84px}
html.lefty .hs-t-up,html.lefty .hs-t-down{right:auto;left:174px}
html.lefty #hs-mapbox{left:auto;right:10px}
@media (max-width:760px){
  html.lefty .hs-t-boost{right:auto;left:14px}
  html.lefty .hs-t-up,html.lefty .hs-t-down{right:auto;left:100px}
  html.lefty #hs-mapbox{right:6px}
}
/* Math Blitz's pad: SUBMIT stands up the LEFT column. Auto-placement fills the digits into the three on
   its right, in reading order. */
html.lefty .mk-pad{grid-template-columns:minmax(0,1.15fr) repeat(3,minmax(0,1fr))}
html.lefty .mk-ok{grid-column:1}
/* A landscape phone: the round's pad stands to the LEFT of the board, and so do the consoles that sit
   beside it (Math Blitz's in 3D) and the 2D pad's column. */
@media (max-height:500px) and (orientation:landscape){
  html.lefty #game-screen.canvas-game #g-canvas-holder{flex-direction:row-reverse}
  html.lefty #game-screen.canvas-game:has(#g-math.math-3d.has-keys) .g-area{flex-direction:row-reverse}
  html.lefty .math-wrap.has-keys:not(.math-3d) #math-question,
  html.lefty .math-wrap.has-keys:not(.math-3d) #math-answer{grid-column:2}
  html.lefty .math-wrap.has-keys:not(.math-3d) .mk-pad{grid-column:1}
}

/* ═════════════════════════════════════════════════
   🪶 LITE GRAPHICS (v121 · ⚙️ Settings → ✨ GRAPHICS, PI3D.setGfx)
   ═════════════════════════════════════════════════
   Three choices in one row, the profile in force lit: gold for Normal and
   Ultra as before, green for Lite. The in-game ✨ wears Lite's green too. */
.set-row.gfx-seg{grid-template-columns:repeat(3,minmax(0,1fr))}
.gfx-seg .gfx-opt{min-width:0;padding-left:6px;padding-right:6px}
.gfx-seg .gfx-opt[data-gfx="lite"].on{border-color:#7dffb0;color:#7dffb0;box-shadow:0 0 14px rgba(125,255,176,.18)}
.g-actions .btn-gfx-game.lite{opacity:1;border-color:rgba(125,255,176,.55);box-shadow:0 0 14px rgba(125,255,176,.22)}
body.mode-3d .gfx-seg .gfx-opt[data-gfx="lite"].on,body.mode-3d .g-actions .btn-gfx-game.lite{--wall:#1d6b43;--wallb:#0c3320}

/* ═════════════════════════════════════════════════
   🔥 THRUSTERS (v122 · § 56 · the Black Market's ninth aisle, its tenth tab)
   ═════════════════════════════════════════════════
   THE TAB ROW with ten tabs: two full rows of five on a desktop. On a phone
   CONVERT — the bank, not an aisle — takes the first row and the other nine
   are three rows of three. The seasonal and the restricted tab each take a
   row of their own wherever they show, so neither is ever an orphan. */
.market-tabs .market-tab-event,.market-tabs .market-tab-shop{grid-column:1 / -1}
@media (max-width:700px){ .market-tabs .market-tab[data-tab="convert"]{grid-column:1 / -1} }

/* The card: the tail of the hull and two nozzles burning the style. --tc is
   the flame's colour (the stock burner burns the colour the player wears),
   --w its bore. */
.thr-prev{position:relative;width:84px;height:64px;margin:0 auto 10px;--tc:var(--cyan);--w:14px}
.thr-prev b{position:absolute;left:10px;right:10px;top:2px;height:14px;border-radius:7px 7px 4px 4px;
  background:linear-gradient(180deg,#5c6372,#22262f);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 2px 6px rgba(0,0,0,.55);z-index:1}
.thr-prev i{position:absolute;top:12px;width:var(--w);height:46px;left:calc(50% - 15px - var(--w) / 2);
  border-radius:45% 45% 50% 50% / 16% 16% 84% 84%;
  background:linear-gradient(180deg,#fff 0%,var(--tc) 34%,transparent 100%);
  box-shadow:0 0 14px var(--tc);transform-origin:50% 0;animation:thrBurn .11s ease-in-out infinite alternate}
.thr-prev i + i{left:calc(50% + 15px - var(--w) / 2);animation-delay:-.05s}
@keyframes thrBurn{from{transform:scaleY(.86) scaleX(.95)}to{transform:scaleY(1.05) scaleX(1.03)}}
.thr-ion{--tc:#a8e8ff;--w:7px}
.thr-ion i{height:58px}
.thr-inferno{--tc:#ff5a14}
.thr-inferno i{background:linear-gradient(180deg,#fff6d0 0%,#ffb02e 24%,#ff4a12 56%,transparent 100%);box-shadow:0 0 16px #ff6a1a}
.thr-plasma{--tc:#ff3cf0;--w:21px}
.thr-plasma i{height:40px;animation:thrBurn .11s ease-in-out infinite alternate,thrBreathe 1.3s ease-in-out infinite alternate}
@keyframes thrBreathe{from{opacity:.75;filter:brightness(.9)}to{opacity:1;filter:brightness(1.25)}}
.thr-solar{--tc:#ffc43a}
.thr-solar i::after{content:'';position:absolute;left:25%;right:25%;top:62%;height:30px;border-radius:50%;
  background:linear-gradient(180deg,rgba(255,231,160,.6),transparent)}
.thr-ghost{--tc:#eaf6ff}
.thr-ghost i{animation:thrBurn .11s ease-in-out infinite alternate,thrGhost .23s steps(2) infinite}
@keyframes thrGhost{from{opacity:.22}to{opacity:.6}}
.thr-prism{--tc:#ff3b3b}
.thr-prism i{animation:thrBurn .11s ease-in-out infinite alternate,thrPrism 3s linear infinite}
.thr-prism i + i{animation-delay:-.05s,-1.5s}
@keyframes thrPrism{to{filter:hue-rotate(360deg)}}

/* ═════════════════════════════════════════════════
   🛠️ THE HANGAR (v123 · § 57 · the Flight Deck's paint shop)
   ═════════════════════════════════════════════════
   A deck panel on the right, as the command deck is (the ship turns beside
   it, hangarPose); a sheet over the lower half on a phone, the ship above
   it. Colours are swatches, the running lights words; the choice in force
   wears a ring in its own colour. YOUR COLOUR is the one the player wears
   (--cyan), shown as a swirl so it never reads as one more fixed swatch. */
.hs-hangar{right:10px;width:min(392px,calc(100% - 20px))}
.hs-hg{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding:0 2px 4px}
.hs-hg .hs-lh{margin-top:6px}
.hs-hg-row{display:flex;flex-wrap:wrap;gap:8px}
.hs-hg-opt{--sw:#a9b1bf;width:30px;height:30px;padding:0;border-radius:50%;cursor:pointer;flex:none;
  background:var(--sw);border:2px solid rgba(255,255,255,.22);box-shadow:inset 0 -6px 10px rgba(0,0,0,.35)}
.hs-hg-opt.mine{--sw:var(--cyan);background:conic-gradient(var(--cyan),#ffffff,var(--cyan),#0a1222,var(--cyan))}
.hs-hg-opt.on{border-color:#ffffff;box-shadow:0 0 0 2px var(--sw),0 0 14px var(--sw)}
.hs-hg-opt:focus-visible{outline:2px solid #ffffff;outline-offset:3px}
.hs-hg-words .hs-hg-opt{width:auto;height:auto;border-radius:999px;padding:6px 12px;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.16);box-shadow:none;
  font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.1em;color:rgba(233,248,255,.8)}
.hs-hg-words .hs-hg-opt.on{background:#ffd700;border-color:#ffd700;color:#1a1200;box-shadow:0 0 14px rgba(255,215,0,.35)}
.hs-hg-foot{margin-top:10px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.hs-hg-note{font-size:.74rem;line-height:1.45;color:rgba(233,248,255,.68)}
@media (max-width:760px){
  .hs-hangar{max-height:56%}
  .hs-hg-opt{width:34px;height:34px}
}

/* ═════════════════════════════════════════════════
   🏆 THE TROPHY HALL (v124) · 📖 THE LOGBOOK (v124)
   ═════════════════════════════════════════════════
   The logbook is a deck panel on the right, as the Hangar's is: a page for
   each expedition, its numbers in two columns, and Gargantua's colossi one
   line each (dim until felled). The page asked for is lit. On a boss's win
   card, the fight's line: its time, NEW BEST or the best to beat, and
   FLAWLESS or the hits taken. */
.hs-logbook{right:10px;width:min(392px,calc(100% - 20px))}
.hs-lg{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:0 2px 4px}
.hs-lg-page{padding:8px 10px 10px;border-radius:12px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08)}
.hs-lg-page.on{border-color:rgba(255,211,106,.55);box-shadow:0 0 18px rgba(255,211,106,.12)}
.hs-lg-page .hs-lh{margin-top:0}
.hs-lg-grid{display:grid;grid-template-columns:1fr auto;gap:4px 12px;font-size:.78rem}
.hs-lg-k{color:rgba(233,248,255,.62);font-family:var(--fd);font-size:.56rem;letter-spacing:.12em;align-self:center}
.hs-lg-v{color:#fff;font-weight:700;text-align:right;font-variant-numeric:tabular-nums}
.hs-lg-cl{margin-top:8px;display:flex;flex-direction:column;gap:3px}
.hs-lg-row{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;font-size:.74rem;padding:3px 0;border-top:1px solid rgba(255,255,255,.06)}
.hs-lg-row.dim{opacity:.55}
.hs-lg-n{font-family:var(--fd);font-size:.56rem;letter-spacing:.1em}
.hs-lg-f{color:rgba(233,248,255,.6);font-size:.66rem;white-space:nowrap}
@media (max-width:760px){ .hs-logbook{max-height:62%} }
.xp-log{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin:10px 0 2px;padding:8px 12px;border-radius:10px;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);font-size:.8rem}
.xp-log b{font-family:var(--fd);letter-spacing:.1em;font-size:.72rem}
.xp-log span{color:rgba(233,248,255,.75);font-size:.72rem}
.xp-log .xp-log-best{color:#ffd36a;font-weight:700}

/* ══════════════════════════════════════════════════════════════════════
   § 58 · v126 — 🎛️ THE DRIVE LAB · a music drive of your own
   The sequencer in its overlay (app.js § 58): the play button, the name and
   the presets; the sound, chords, tempo and swing; sixteen steps of six lanes
   (eight at a time on a phone, .half) with the playhead (.now) running
   across them while it plays; the note picker; the actions.
   ══════════════════════════════════════════════════════════════════════ */
.shop-card.shop-lab{cursor:pointer}   /* 📱 v131 · the whole Drive Lab card opens the lab (shopCardEl) */
/* 📱 v131 · touch-action on the whole sheet, not only on its buttons (MOBILE / TOUCH): two quick taps that
   straddled the gap between two steps were a double-tap to an iPhone, which zoomed the page instead of
   lighting either step. Pinch-zoom and scrolling are untouched. */
.dl-modal{max-width:720px;border-color:rgba(255,43,214,.42);box-shadow:0 0 70px rgba(255,43,214,.12),inset 0 0 0 1px rgba(255,255,255,.03);touch-action:manipulation}
.dl-modal::before{background:linear-gradient(90deg,transparent,#ff2bd6,transparent);box-shadow:0 0 12px #ff2bd6}
.dl-modal .fb-head{margin-bottom:14px}
.dl-modal .fb-title{background:linear-gradient(90deg,#ff7be3,#9fe6ff);-webkit-background-clip:text;background-clip:text}
.dl-ico,.fb-ico{-webkit-text-fill-color:initial}    /* a title's emoji drawn as itself over the gradient, not as its silhouette in it */
.dl-in{margin:0 0 12px;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,43,214,.4);background:rgba(255,43,214,.07);display:grid;gap:6px;justify-items:start}
.dl-in-t{font-family:var(--fd);font-size:.66rem;font-weight:700;letter-spacing:.1em;color:#ffb8f1}
.dl-in-s{font-size:.8rem;color:var(--dim)}
.dl-top{display:flex;gap:8px;align-items:center;margin:0 0 10px;flex-wrap:wrap}
.dl-play{min-width:96px}
.dl-name{flex:1 1 140px;min-width:0;padding:9px 10px;border-radius:9px;border:1px solid var(--b1,rgba(255,255,255,.14));background:rgba(0,0,0,.3);color:var(--text);
  font-family:var(--fd);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}
.dl-pre,.dl-sel{padding:8px 9px;border-radius:9px;border:1px solid var(--b1,rgba(255,255,255,.14));background:rgba(0,0,0,.35);color:var(--text);font-family:var(--fd);font-size:.62rem;letter-spacing:.06em}
.dl-sel{flex:1 1 auto;min-width:0}
.dl-row{display:flex;align-items:center;gap:10px;margin:0 0 8px}
.dl-lbl{flex:0 0 64px;font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.14em;color:var(--dim)}
.dl-seg{display:flex;flex-wrap:wrap;gap:5px;flex:1 1 auto;min-width:0}
.dl-sb{font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.08em;padding:7px 8px;border-radius:8px;border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);color:var(--dim);cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease}
.dl-sb:hover{color:var(--text);border-color:rgba(255,255,255,.3)}
.dl-sb.on{color:#1a0016;background:linear-gradient(90deg,#ff7be3,#9fe6ff);border-color:rgba(255,255,255,.3)}
.dl-tempo{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0}
.dl-rng{flex:1 1 auto;min-width:0;accent-color:#ff2bd6}
.dl-bpm{font-family:var(--fd);font-size:.66rem;letter-spacing:.08em;color:#ffb8f1;min-width:62px;text-align:right}
.dl-pages{display:flex;gap:6px;margin:10px 0 6px}
.dl-pages .dl-sb{flex:1 1 0}
/* The grid: a label, then the steps — a gap before every beat. */
.dl-grid{display:grid;gap:5px;margin:10px 0 8px;padding:10px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.28)}
.dl-lane{display:grid;grid-template-columns:64px repeat(16,minmax(0,1fr));gap:4px;align-items:center}
.dl-grid.half .dl-lane{grid-template-columns:58px repeat(8,minmax(0,1fr))}
.dl-ln{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.1em;color:var(--dim)}
.dl-c{position:relative;height:30px;min-width:0;padding:0;border-radius:6px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);
  color:var(--text);font-family:var(--fd);font-size:.62rem;font-weight:700;cursor:pointer;transition:background .1s ease,box-shadow .1s ease}
.dl-c.beat{margin-left:3px;border-color:rgba(255,255,255,.2)}
.dl-grid.half .dl-c{height:38px}
.dl-c:hover{border-color:rgba(255,255,255,.35)}
.dl-k .dl-c.on{background:#ff2b6a;box-shadow:0 0 10px rgba(255,43,106,.55)}
.dl-s .dl-c.on{background:#ffb43a;box-shadow:0 0 10px rgba(255,180,58,.55)}
.dl-h .dl-c.on{background:#39ff88;box-shadow:0 0 10px rgba(57,255,136,.5)}
.dl-o .dl-c.on{background:#00e5ff;box-shadow:0 0 10px rgba(0,229,255,.5)}
.dl-b .dl-c,.dl-l .dl-c{color:var(--dim)}
.dl-b .dl-c.on{background:rgba(139,123,255,.85);color:#fff;box-shadow:0 0 10px rgba(139,123,255,.5)}
.dl-l .dl-c.on{background:rgba(255,43,214,.85);color:#fff;box-shadow:0 0 10px rgba(255,43,214,.5)}
.dl-c.sel{outline:2px solid #fff;outline-offset:1px}
/* The playhead. */
.dl-c.now{border-color:#fff;filter:brightness(1.45)}
.dl-c.now:not(.on){background:rgba(255,255,255,.16)}
.dl-pick{display:flex;align-items:center;gap:10px;margin:0 0 8px;padding:8px 10px;border-radius:10px;border:1px solid rgba(255,43,214,.3);background:rgba(255,43,214,.05)}
.dl-deg{min-width:34px}
.dl-hint{font-size:.76rem;line-height:1.45;color:var(--dim);margin:2px 0 12px}
.dl-acts{display:flex;flex-wrap:wrap;gap:8px}
.dl-acts .btn{flex:1 1 auto}
.dl-out{margin-top:10px;font-size:.78rem;color:var(--dim);display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.dl-out:empty{display:none}
/* The shelf's card: its two buttons side by side. */
.shop-btns{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.shop-btns .shop-btn{flex:1 1 auto}
/* ✨ v142 · § 99 · ▶ PREVIEW / ▶ AUDITION beside Buy / Equip: the same row as the Drive Lab's ✎ EDIT. While a drive sounds its
   button is lit (palette vars, so the colourblind palette repoints it). The row is positioned and stacked: in 3D CYBERPUNK the
   card is a preserve-3d plane, and in Chromium the pointer reached an un-stacked flat row inside it rather than the button in it
   (press and click both landed on the row, so a button there did nothing for a mouse); a stacked row gives them their hit area back. */
.shop-btns{position:relative;z-index:1}
.shop-try.on{border-color:var(--cyan);color:var(--cyan);box-shadow:0 0 14px color-mix(in srgb,var(--cyan) 30%,transparent)}
@media (max-width:560px){
  #dl-overlay{padding-left:8px;padding-right:8px}
  .fb-modal.dl-modal{padding:22px 12px 18px}
  .dl-grid{padding:7px;gap:6px}
  .dl-grid.half .dl-lane{grid-template-columns:44px repeat(8,minmax(0,1fr))}
  .dl-ln{font-size:.44rem;letter-spacing:.05em}
  .dl-lbl{flex-basis:54px}
  .dl-row{gap:8px}
  .dl-sb{padding:7px 6px;font-size:.52rem}
}

/* ══════════════════════════════════════════════════════════════════════
   § 59 · v127 — 💬 QUICK-CHAT EMOTES
   The bar (lobby, the round's fold-out, a duel's card, the terminal), a
   bubble on a seat, and the pops over the screen (#emo-float).
   ══════════════════════════════════════════════════════════════════════ */
.emo-bar{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:10px 0 2px}
.emo-bar[hidden]{display:none}
.emo-chip{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);color:var(--text);font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.08em;cursor:pointer;
  transition:background .12s ease,border-color .12s ease,transform .12s ease;touch-action:manipulation}
.emo-chip:hover{border-color:var(--cyan);background:rgba(0,245,255,.08)}
.emo-chip:active{transform:scale(.94)}
.emo-ic{font-size:.95rem;line-height:1}
.emo-mute{padding:7px 9px}
.emo-mute.on{border-color:rgba(255,90,90,.5);background:rgba(255,90,90,.08)}
/* The round's: under the versus strip, over the board. */
#mp-hud{position:relative}
.mp-emo-btn{flex:0 0 auto;width:34px;height:30px;border-radius:9px;border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.35);
  font-size:.95rem;line-height:1;cursor:pointer;touch-action:manipulation}
.mp-emo-btn.on,.mp-emo-btn:hover{border-color:var(--cyan)}
.emo-pop-bar{position:absolute;top:calc(100% + 6px);right:0;z-index:30;max-width:min(420px,96vw);margin:0;padding:8px;border-radius:12px;
  border:1px solid rgba(0,245,255,.35);background:rgba(4,6,16,.94);box-shadow:0 12px 30px rgba(0,0,0,.6);justify-content:flex-end}
/* A duel's card. */
.emo-res{margin:12px 0 2px}
/* A bubble on a seat. */
.mp-seat{position:relative}
.emo-bub{position:absolute;left:50%;top:-12px;transform:translateX(-50%);white-space:nowrap;padding:5px 10px;border-radius:12px;
  background:#f2f6ff;color:#0a0e1c;font-family:var(--fd);font-size:.56rem;font-weight:800;letter-spacing:.06em;
  box-shadow:0 6px 16px rgba(0,0,0,.45);animation:emoIn .25s cubic-bezier(.2,.9,.3,1.4);pointer-events:none;z-index:5}
.emo-bub::after{content:'';position:absolute;left:50%;bottom:-5px;margin-left:-5px;border:5px solid transparent;border-bottom:0;border-top-color:#f2f6ff}
@keyframes emoIn{from{transform:translateX(-50%) scale(.6);opacity:0}to{transform:translateX(-50%) scale(1);opacity:1}}
/* The pops over the screen: top centre, under the bar. */
#emo-float{position:fixed;left:50%;top:calc(64px + env(safe-area-inset-top,0px));transform:translateX(-50%);z-index:2500;display:grid;gap:6px;justify-items:center;pointer-events:none}
.emo-pop{display:flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;background:rgba(6,8,20,.92);border:1px solid rgba(255,255,255,.18);
  box-shadow:0 8px 24px rgba(0,0,0,.55);font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.08em;color:#fff;
  animation:emoPop .28s cubic-bezier(.2,.9,.3,1.35);transition:opacity .35s ease,transform .35s ease}
.emo-pop b{font-weight:900}
.emo-pop.mine{border-color:rgba(0,245,255,.4)}
.emo-pop.out{opacity:0;transform:translateY(-8px)}
@keyframes emoPop{from{opacity:0;transform:translateY(-10px) scale(.9)}to{opacity:1;transform:none}}
/* The terminal's. */
.chat-emo{justify-content:flex-start;margin:8px 0 0}
.chat-emo-btn{flex:0 0 auto;padding-left:10px;padding-right:10px}
.chat-emo-chip{display:inline-block;padding:2px 9px;border-radius:999px;background:rgba(0,245,255,.12);border:1px solid rgba(0,245,255,.3);
  font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.06em}
@media (max-width:560px){
  .emo-chip{padding:7px 8px}
  .emo-chip .emo-t{font-size:.5rem}
  .emo-pop-bar .emo-t{display:none}
}

/* ══════════════════════════════════════════════════════════════════════
   § 60 · v128 — 🎁 GIFTS
   The send sheet (a shelf's items as small cards) and the unwrap sheet (the
   present, then what was in it). The bounty sheet's pieces (.bn-*) carry the
   rest.
   ══════════════════════════════════════════════════════════════════════ */
.gift-modal{max-width:560px;border-color:rgba(255,95,190,.45);box-shadow:0 0 70px rgba(255,95,190,.13),inset 0 0 0 1px rgba(255,255,255,.03)}
#gift-body{display:flex;flex-direction:column;gap:9px}
.gift-modal .bn-lbl{color:#ff9bd8}
.gift-modal .bn-opt.on{border-color:#ff9bd8;background:rgba(255,95,190,.1)}
.gift-modal .bn-sum{border-color:rgba(255,95,190,.3);background:rgba(255,95,190,.05)}
.gift-modal .bn-sum b{color:#ff9bd8}
.gf-cats{grid-template-columns:repeat(4,minmax(0,1fr))}
.gf-cats .bn-opt{align-items:center;text-align:center;font-size:.48rem}
.gf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:7px;max-height:300px;overflow-y:auto;padding:2px}
.gf-item{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 6px 8px;border-radius:12px;border:1px solid var(--border);
  background:var(--s2);color:var(--text);cursor:pointer;min-width:0;transition:border-color .12s ease,background .12s ease}
.gf-item:hover:not([disabled]){border-color:rgba(255,155,216,.6)}
.gf-item.on{border-color:#ff9bd8;background:rgba(255,95,190,.12);box-shadow:0 0 16px rgba(255,95,190,.2)}
.gf-item[disabled]{opacity:.42;cursor:not-allowed}
.gf-item .shop-swatch,.gf-item .shop-sky,.gf-item .thr-prev{transform:scale(.62);margin:-12px auto -14px}
.gf-item .shop-emoji{font-size:1.7rem;margin:0}
.gf-n{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.06em;text-align:center;line-height:1.3;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.gf-p{font-family:var(--fd);font-size:.5rem;color:#ff9bd8}
/* Unwrapping. */
.gf-box{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 10px 10px}
.gf-wrap{font-size:4.2rem;line-height:1;filter:drop-shadow(0 0 18px rgba(255,95,190,.55));animation:gfBob 1.8s ease-in-out infinite}
@keyframes gfBob{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-6px) rotate(3deg)}}
.gf-box.open .gf-prev{animation:gfOpen .5s cubic-bezier(.2,.9,.3,1.4)}
@keyframes gfOpen{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
.gf-prev .shop-swatch,.gf-prev .shop-sky{margin:0 auto}
.gf-prev .shop-emoji{font-size:3.4rem}
.gf-what{display:flex;flex-direction:column;align-items:center;gap:3px}
.gf-what b{font-family:var(--fd);font-size:.8rem;letter-spacing:.06em}
.gf-what span{font-family:var(--fd);font-size:.5rem;letter-spacing:.12em;color:var(--dim)}
.gf-card{margin-top:2px}
@media (max-width:420px){ .gf-cats{grid-template-columns:repeat(3,minmax(0,1fr))} .gf-grid{grid-template-columns:repeat(auto-fill,minmax(92px,1fr))} }

/* ══════════════════════════════════════════════════════════════════════
   § 61 · v129 — 🎬 THE REPLAY THEATRE
   A grid record's run played back from its ghost: who is on the stage, the
   stage (a board sketch, or the two scores), the pace chart, the transport.
   Both canvases keep their drawing size and scale to the sheet's width.
   ══════════════════════════════════════════════════════════════════════ */
.rg-acts{display:flex;flex-direction:column;align-items:stretch;gap:4px;flex-shrink:0}
.rg-acts .btn,.rg-acts .bn-tag{margin:0;text-align:center;justify-content:center}
.rg-row .rt-watch{flex-shrink:0;padding:4px 8px;font-size:.55rem}
.rt-modal{max-width:600px;border-color:rgba(255,79,216,.45);box-shadow:0 0 70px rgba(255,79,216,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
#rt-body{display:flex;flex-direction:column;gap:9px}
.rt-who{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;font-family:var(--fd);font-size:.6rem;letter-spacing:.08em}
.rt-who b{font-weight:900;color:var(--text)}
.rt-who em{font-style:normal;color:var(--dim);margin-right:10px}
.rt-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0;box-shadow:0 0 10px currentColor}
.rt-note{font-size:.8rem;line-height:1.45;color:var(--dim);padding:7px 10px;border-radius:10px;border:1px dashed rgba(255,79,216,.35);background:rgba(255,79,216,.05)}
/* Each canvas keeps its own shape: sized by whichever of the width and the height runs out first. */
.rt-stage,.rt-chart{display:block;width:auto;height:auto;max-width:100%;margin:0 auto;border-radius:12px;border:1px solid var(--border);background:#060814}
.rt-stage{max-height:42vh}
.rt-chart{width:100%}
.rt-side{display:flex;flex-direction:column;gap:9px;min-width:0}
.rt-bar{display:flex;align-items:center;gap:10px}
.rt-play{width:52px;height:38px;padding:0;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.rt-play i{display:block;width:0;height:0;border-style:solid;border-width:8px 0 8px 13px;border-color:transparent transparent transparent currentColor;margin-left:3px}
.rt-play.on i{width:12px;height:16px;border-width:0 4px;border-color:currentColor;margin-left:0}
.rt-scrub{flex:1;min-width:0;accent-color:#ff4fd8;height:28px}
.rt-clock{font-family:var(--fd);font-size:.7rem;letter-spacing:.06em;min-width:54px;text-align:right;color:var(--text)}
.rt-speeds{display:flex;gap:6px}
.rt-sp{flex:1;padding:6px 0;border-radius:9px;border:1px solid var(--border);background:var(--s2);color:var(--dim);
  font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.06em;cursor:pointer}
.rt-sp.on{color:#ff9be8;border-color:#ff4fd8;background:rgba(255,79,216,.12)}
.rt-acts{display:flex;gap:8px;justify-content:flex-end}
.rt-foot{font-size:.72rem;line-height:1.45;color:var(--dimmer)}
@media (max-width:700px){ .rg-row .rt-watch{padding:4px 6px;font-size:.5rem} }
@media (max-width:520px){
  .rt-modal{padding:24px 14px 18px}
  .rt-modal .fb-head{padding:0 30px}
  .rt-stage{max-height:36vh}
  .rt-acts{flex-direction:column-reverse}
  .rt-acts .btn{width:100%}
}
/* Room to the side (a desktop, a tablet, a phone on its side): the stage on the left, the chart and the
   transport beside it, so the sheet is never taller than the screen. */
@media (min-width:900px) and (min-height:560px){
  .rt-modal{max-width:940px}
  #rt-body{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:10px 18px;align-items:start}
  #rt-body > .rt-who,#rt-body > .rt-note,#rt-body > .rt-foot{grid-column:1 / -1}
  .rt-stage{max-height:min(60vh,520px)}
  .rt-side{gap:14px}
}
@media (max-height:500px) and (orientation:landscape){
  .rt-modal{max-width:min(860px,96vw);padding:16px 18px 14px}
  .rt-modal .fb-head{margin-bottom:10px}
  .rt-modal .fb-sub{margin-top:5px}
  #rt-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:7px 14px;align-items:start}
  #rt-body > .rt-who,#rt-body > .rt-note{grid-column:1 / -1}
  .rt-stage{max-height:58vh}
  .rt-side{gap:7px}
  .rt-play{height:34px}
  .rt-sp{padding:5px 0}
  .rt-acts .btn{padding-top:8px;padding-bottom:8px}
  .rt-foot{display:none}
}

/* ═════════════════════════════════════════════════
   📱 v131 · ON A TOUCH SCREEN, A SOLID RESTS FLAT
   A card's resting perspective() and its glyphs' translateZ() are there for the
   pointer tilt — which is mouse-only (its own code stands down on a touch
   screen, see "Cards tilt TOWARD THE POINTER" in app.js) — and for the glyphs
   standing a few pixels off the plate. On a phone they bought nothing else: a
   compositing layer, with a bitmap behind it, for every card and every glyph on
   it, 336 of them on the 3D list hub held sideways, which is what an iPhone
   kills the tab for (SCREEN SYSTEM, at the top of this file). So where nothing
   can hover, every solid rests flat and its glyphs are printed on it; hover (a
   tap's, which iOS keeps) and press still lift and sink in 3D — one layer, for
   a moment. Last in the file: every rule it flattens comes before it.
   ═════════════════════════════════════════════════ */
@media (hover:none){
  body.mode-3d .game-card,body.mode-3d .shop-card,body.mode-3d .card,body.mode-3d .mp-mode,body.mode-3d .mode-card,
  body.mode-3d .convert-card,body.mode-3d .lb-row,body.mode-3d .pt-slot,body.mode-3d .ptp-card,body.mode-3d .cp-node,
  body.mode-3d .gc-icon,body.mode-3d .shop-emoji,body.mode-3d .res-emoji,body.mode-3d .auth-icon,body.mode-3d .mp-banner-icon,
  body.mode-3d .bb-ico,body.mode-3d .gc-name,body.mode-3d .gc-pts,body.mode-3d .gc-desc,body.mode-3d .shop-name,
  body.mode-3d .lb-rank,body.mode-3d .gc-howbtn,body.mode-3d .gc-medal,body.mode-3d .gc-fav,
  body.mode-3d .pt-slot-ico,body.mode-3d .pt-slot-n,body.mode-3d .pt-slot-txt,body.mode-3d .pt-slot-go,
  body.mode-3d .ptp-ico,body.mode-3d .ptp-name,body.mode-3d .ptp-desc,body.mode-3d .ptp-pills{transform:none}
  body.mode-3d .ptp-badge{transform:translateX(-50%)}
  /* The two that SIT raised — the picked render mode, the picked mission — as the scale perspective(820px)
     translateZ(10px) projects to, by v106's rule. */
  body.mode-3d .mode-card.on,body.mode-3d .ptp-card.on{transform:scale(1.012)}
}

/* ── § 62 · v135 · 🛟 COMFORT BAY ── the section's sliders take the master volume's look (#ap-vol). */
.cbay-grid{display:grid;gap:10px;margin:4px 0 12px}
.cbay-sl{display:grid;grid-template-columns:9em 1fr 3.2em;align-items:center;gap:10px;font-family:'Orbitron',monospace;font-size:10px;letter-spacing:.12em;color:var(--text-dim,#9aa4b4)}
.cbay-sl em{font-style:normal;text-align:right;color:var(--cyan);font-size:11px}
.cbay-sl input{appearance:none;-webkit-appearance:none;height:4px;border-radius:2px;background:linear-gradient(90deg,var(--cyan),var(--purple));outline:none;cursor:pointer;min-width:0}
.cbay-sl input::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:var(--cyan);border:2px solid #04040e;box-shadow:0 0 10px rgba(0,245,255,.6);cursor:pointer}
.cbay-sl input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--cyan);border:2px solid #04040e;box-shadow:0 0 10px rgba(0,245,255,.6);cursor:pointer}
.cbay-sl input:focus-visible{outline:2px solid var(--cyan);outline-offset:6px}
.cbay-sl.off{opacity:.45}
.cbay-sl.off input{cursor:not-allowed}
.cbay-h2{margin:14px 0 8px;font-family:'Orbitron',monospace;font-size:10px;letter-spacing:.16em;color:var(--cyan)}
.set-row.cbay-seg{grid-template-columns:repeat(4,minmax(0,1fr))}
.cbay-seg .btn{min-width:0;padding-left:4px;padding-right:4px;font-size:10px}
.cbay-seg .btn.on{border-color:var(--lime);color:var(--lime);box-shadow:0 0 14px rgba(57,255,20,.16)}
#set-cbay .btn-full + .btn-full{margin-top:8px}
#set-cbay #cbay-hc{margin-top:10px}
.cbay-modal{max-width:520px}
.cbay-note-p{margin:0 0 12px;font-size:14px;line-height:1.55;color:#dfe6ef}
.cbay-presets{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.cbay-presets .btn{flex:1 1 auto}
.cbay-note-btns{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:6px}
@media (max-width:480px){ .cbay-sl{grid-template-columns:6.4em 1fr 3em} .cbay-note-btns .btn{flex:1 1 100%} }

/* ── § 63 · v135 · 🔭 COLOUR LENS ── on the root, the filter makes no containing block: fixed things stay put. */
html.lens-on{filter:url(#lens-cvd)}

/* ── § 64 · v135 · 🔍 CLEAR SIGNAL ── the reading surfaces scale, box and type together; boards and canvases don't. */
html.cs-zoom .fb-modal,html.cs-zoom #results-screen .res-card,html.cs-zoom #hub-screen .hub-body,
html.cs-zoom #market-screen,html.cs-zoom #toast,html.cs-zoom .pause-card,
/* ✨ v142 · the in-round reading surfaces (header pills, hint line, controls sit inside .g-hdr), the dock, the duel bar and the hub bar */
html.cs-zoom .g-hdr,html.cs-zoom #pu-dock,html.cs-zoom #mp-hud,html.cs-zoom .hub-bar{zoom:var(--cs-z,1)}
html.cs-zoom .fb-modal{max-height:calc(92vh / var(--cs-z,1));max-width:calc(96vw / var(--cs-z,1))}
html.cs-hc .fb-modal,html.cs-hc .card,html.cs-hc .res-card,html.cs-hc .game-card,html.cs-hc .market-panel,html.cs-hc #toast{background:#05060c!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-color:#b8c2d0!important}
html.cs-hc .set-note,html.cs-hc .fb-sub,html.cs-hc .gc-desc,html.cs-hc .res-sub,html.cs-hc .market-sub,html.cs-hc .shop-desc,html.cs-hc .cbay-sl,html.cs-hc .brf-body,html.cs-hc .dos-k,html.cs-hc small{color:#eef3f8!important}
html.cs-hc .btn{border-width:2px}
html.cs-hc :focus-visible{outline:3px solid #fff!important;outline-offset:2px!important}
html.cs-hc .fb-overlay.show{background:rgba(0,0,0,.86)!important}
/* ── § 65 · v135 · 👆 TOUCH WHEN YOU TOUCH ── */
.set-row.inm-seg{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:10px}
.inm-seg .btn{min-width:0;padding-left:4px;padding-right:4px}
.inm-seg .btn.on,.sh-size .btn.on{border-color:var(--lime);color:var(--lime);box-shadow:0 0 14px rgba(57,255,20,.16)}
html.keys-mode #math-keys{display:none}

/* ── § 66 · v135 · 🦾 STEADY HANDS ── */
.sh-block{margin-top:12px}
.sh-h{margin:4px 0 8px;font-family:'Orbitron',monospace;font-size:10px;letter-spacing:.16em;color:var(--cyan)}
.sh-block .set-row + .set-row{margin-top:8px}
.set-row.sh-size{grid-template-columns:repeat(3,minmax(0,1fr))}
/* ── § 108 · v142 · ✈️ FLIGHT ── a block of the STEADY HANDS kind (its heading, its three-up rows), a small label over each row */
.fl-where{margin-left:6px;font-family:var(--fb);font-size:12px;letter-spacing:.03em;color:var(--dim)}
.fl-h2{margin:12px 0 8px;font-family:'Orbitron',monospace;font-size:10px;letter-spacing:.16em;color:var(--cyan)}
.fl-block .set-note{margin-top:10px}
html.cs-hc .fl-where{color:#eef3f8!important}
#arcade-controls .ctrl-btn.sh-latched{border-color:var(--lime);box-shadow:0 0 0 2px var(--lime) inset,0 0 16px rgba(57,255,20,.35);color:var(--lime)}
html.sh-big #arcade-controls .ctrl-btn{padding-top:calc(14px * var(--sh-pad,1));padding-bottom:calc(14px * var(--sh-pad,1));font-size:calc(1em * (0.6 + 0.4 * var(--sh-pad,1)))}
/* One thumb: the four pads close up into a 2×2 block at the right edge (the left one when left-handed). */
html.sh-one #arcade-controls{display:grid;grid-template-columns:repeat(2,minmax(64px,92px));justify-content:end;gap:8px}
html.sh-one.lefty #arcade-controls{justify-content:start}
html.sh-one #arcade-controls .ctrl-btn{flex:none;min-width:0}
html.sh-one #arcade-controls #ctrl-action{grid-column:1 / span 2;grid-row:2}
/* ═════════════════════════════════════════════════
   📡 ARC ON THE CARD · ↻ RUN IT BACK · 🩺 FRAME DOCTOR · WELCOME BACK (v135 · §§ 67–70)
   ═════════════════════════════════════════════════
   ARC's colour is the campaign's: lime, with a rule down the left like a
   chapter's story. His line sits under the medal panel at the medal panel's
   width; the frame doctor's offer is the same line with its buttons under it,
   so the card gains one strip, never two. */
.res-arc{
  display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;
  max-width:440px;margin:-8px auto 18px;padding:9px 12px 9px 13px;text-align:left;
  border-left:2px solid rgba(57,255,20,.62);border-radius:0 10px 10px 0;
  background:linear-gradient(90deg,rgba(57,255,20,.08),rgba(57,255,20,.02) 70%,transparent)
}
.res-arc[hidden]{display:none}
.res-arc .ra-who{flex:none;font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.2em;line-height:1.7;color:var(--lime)}
.res-arc .ra-say{flex:1 1 220px;min-width:0;position:relative;font-size:.86rem;line-height:1.45;color:rgba(255,255,255,.86)}
.res-arc .ra-off{color:transparent}
.res-arc .ra-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.res-arc .ra-acts{flex:1 1 100%;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;margin-top:4px}
.res-arc .ra-go{min-height:38px;padding:9px 14px;font-size:.58rem;white-space:nowrap}
.res-arc .ra-x{flex:none;width:38px;height:38px;padding:0;border-radius:8px;font-size:.8rem;line-height:1;
  background:transparent;color:var(--dimmer);border:1px solid var(--border)}
.res-arc .ra-x:hover,.res-arc .ra-x:focus-visible{color:var(--text);border-color:var(--border2)}
.res-arc.ra-doc{background:linear-gradient(90deg,rgba(57,255,20,.1),rgba(57,255,20,.03) 75%,transparent)}
@media (min-width:860px){
  #results-screen .res-head .res-arc{margin:12px auto 0}
}
@media (max-width:560px){
  .res-arc{margin-bottom:14px}
  .res-arc .ra-say{font-size:.82rem}
  .res-arc .ra-go{flex:1 1 auto}
}
body.mode-3d .res-arc .ra-x{--wall:#1b2237;--wallb:#0a0e1a}

/* ↻ The key that presses PLAY AGAIN, as a keycap on the button itself. An
   attribute, not a child: a chapter's and a speedrun's card rewrite the
   button's text (a speedrun every second), and an attribute survives that. */
#btn-again[data-rib-key]::after{
  content:attr(data-rib-key);display:inline-block;margin-left:10px;padding:2px 6px;min-width:1.4em;
  border:1px solid currentColor;border-radius:5px;font-size:.62rem;line-height:1.35;letter-spacing:.06em;
  opacity:.6;vertical-align:1px
}
/* READY is a word, not a digit: it has to fit a phone. */
#cd-num.rib-word{font-size:clamp(3rem,15vw,6rem);letter-spacing:.06em}

/* ↻ LAST RUN, at the right of the CLASSIC / OPEN WORLD switch on a wide hub,
   a row of its own on a phone. A float no taller than the switch, with a small
   bottom margin: a float that reaches even a pixel into the grid's tools below
   narrows their row of chips around it and wraps it. */
.rib-last{
  float:right;display:inline-flex;align-items:center;gap:8px;max-width:calc(100% - 300px);
  margin:3px 0 4px 12px;padding:8px 14px;
  font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.1em;color:var(--text);white-space:nowrap;
  background:var(--s1);border:1px solid rgba(57,255,20,.45);border-radius:999px;cursor:pointer;
  transition:border-color .18s,box-shadow .18s
}
.rib-last[hidden]{display:none}
.rib-last .rl-k{flex:none;color:var(--lime)}
.rib-last .rl-m{min-width:0;overflow:hidden;text-overflow:ellipsis}
.rib-last .rl-t{flex:none}
.rib-last:hover,.rib-last:focus-visible{border-color:var(--lime);box-shadow:0 0 14px rgba(57,255,20,.22);outline:none}
@media (max-width:640px){
  .rib-last{float:none;display:flex;justify-content:center;width:100%;max-width:none;margin:0 0 10px}
}
body.mode-3d .rib-last{box-shadow:0 1px 0 #10162a,0 2px 0 #070a14,0 8px 14px -8px rgba(0,0,0,.8),inset 0 1px 0 rgba(255,255,255,.08)}

/* ⚙️ Settings → 📡 ARC: three choices in a row, the one in force lit in ARC's lime. */
.set-row.arc-seg{grid-template-columns:repeat(3,minmax(0,1fr))}
.arc-seg .arc-opt{min-width:0;padding-left:6px;padding-right:6px}
.arc-seg .arc-opt.on{border-color:var(--lime);color:var(--lime);box-shadow:0 0 14px rgba(57,255,20,.18)}
body.mode-3d .arc-seg .arc-opt.on{--wall:#1c7a10;--wallb:#0c3d08}
.set-note.arc-note2{margin:12px 0 10px}

/* 📡 WELCOME BACK: ARC's lines with the campaign's rule, then the one suggestion. */
.arcb-modal{max-width:440px}
/* The title is long for a phone: it wraps, clear of the ✕, rather than running under it. */
.arcb-modal .fb-head{padding:0 30px}
.arcb-lines{display:flex;flex-direction:column;gap:9px;margin:0 0 16px;padding-left:12px;border-left:2px solid rgba(57,255,20,.5);text-align:left}
.arcb-line{margin:0;font-size:.93rem;line-height:1.5;color:rgba(255,255,255,.84)}
.arcb-line:first-child{color:#fff}
.arcb-next{display:flex;flex-direction:column;gap:9px;padding:12px;border:1px solid rgba(57,255,20,.32);border-radius:12px;background:rgba(57,255,20,.05);text-align:left}
.arcb-why{font-size:.8rem;line-height:1.4;color:var(--dim);overflow-wrap:anywhere}
.arcb-why b{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.18em;color:var(--lime)}
.arcb-go{width:100%;white-space:normal;line-height:1.35;overflow-wrap:anywhere}
.arcb-in{margin:0 0 16px;padding:0 0 16px;border-bottom:1px solid var(--border)}
.arcb-who{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 10px;margin-bottom:10px;
  font-family:var(--fd);font-size:.52rem;font-weight:700;letter-spacing:.18em;color:var(--lime)}
.arcb-who em{font-style:normal;font-family:var(--fb);font-size:.76rem;font-weight:600;letter-spacing:0;color:var(--dim)}
@media (max-width:520px){
  .arcb-line{font-size:.88rem}
}
/* ── § 71 · v135 · 🤖 DROIDS WITH A GRUDGE ── the duel card's line, in the droid's own colour. */
.res-droid{display:grid;gap:4px;margin:10px 0 0;padding:10px 12px;border-left:3px solid var(--dc,#39ff14);border-radius:6px;background:linear-gradient(90deg,color-mix(in srgb,var(--dc,#39ff14) 12%,transparent),transparent)}
.res-droid-k{font-family:'Orbitron',monospace;font-size:10px;letter-spacing:.16em;color:var(--dc,#39ff14)}
.res-droid-t{font-size:14px;color:#e8eef5}
.res-droid-h{font-family:'Orbitron',monospace;font-size:10px;letter-spacing:.1em;color:var(--text-dim,#9aa4b4)}
.res-droid-h b{color:#fff}
/* ── § 102 · v142 · 🆚 THE ARENA REMEMBERS PEOPLE ── the same strip for a person, with its three doors under the tally */
.res-h2h-btns{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:4px}
.res-h2h-btns .btn.on{color:var(--gold);border-color:var(--gold)}
.res-h2h-btns .btn:disabled{opacity:.6;cursor:default}
@media (pointer:coarse){.res-h2h-btns .btn{min-height:38px}}

/* ── § 72 · v135 · 🦝 LOWBIT, THE FENCE ── */
.fence{display:flex;align-items:center;gap:12px;margin:8px 0 4px;padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:rgba(10,8,20,.6)}
.fence-ava{width:40px;height:40px;flex:none;image-rendering:pixelated;filter:drop-shadow(0 0 6px rgba(0,245,255,.35))}
.fence.talk .fence-ava{animation:fenceNod .5s ease-out}
@keyframes fenceNod{0%{transform:translateY(0)}35%{transform:translateY(-3px) rotate(-4deg)}100%{transform:none}}
.fence-who{font-family:'Orbitron',monospace;font-size:10px;letter-spacing:.16em;color:#c9a27a;line-height:1.3;flex:none}
.fence-who em{display:block;font-style:normal;color:var(--text-dim,#9aa4b4);font-size:8px}
.fence-line{flex:1;min-width:0;font-size:14px;color:#e8eef5;font-style:italic}
.fence.off .fence-line{color:var(--text-dim,#9aa4b4);font-style:normal}
.fence-hush{flex:none;background:none;border:1px solid var(--border);border-radius:8px;color:#fff;padding:6px 8px;cursor:pointer}
/* ✨ v142 · § 99 · the shortfall line's CONVERT & BUY; on a phone it takes a row of its own under the line. */
.fence-buy{flex:none;white-space:nowrap}
.fence-buy[hidden]{display:none}
html.reduced-motion .fence.talk .fence-ava{animation:none}
@media (max-width:520px){ .fence-who{display:none} .fence-line{font-size:13px} .fence.offer{flex-wrap:wrap} .fence.offer .fence-buy{order:9;flex:1 1 100%} }

/* ── § 73 · v135 · 📂 THE FAR FILES ── the threat files' look, in the expeditions' violet. */
.cx-entry.cx-far{border-color:rgba(168,85,247,.45)}
.cx-entry.cx-far .cx-kicker{color:var(--purple,#a855f7)}
/* ══════════════════════════════════════════════════════════════════════
   § 74 · v135 — 🛡️ COMMS SHIELD · a name is a door; mute, report, the filter
   ══════════════════════════════════════════════════════════════════════ */
button.chat-who{
  font:inherit;font-weight:700;letter-spacing:inherit;color:var(--cyan);background:none;border:0;padding:0 1px;margin:0;
  cursor:pointer;border-radius:3px;text-decoration:underline;text-decoration-color:rgba(0,245,255,.28);text-underline-offset:2px
}
button.chat-who:hover{color:#fff;text-decoration-color:var(--cyan)}
button.chat-who:focus-visible{outline:2px solid var(--cyan);outline-offset:1px}
.chat-input.sh-nudge{animation:shNudge .32s ease;border-color:var(--red)!important}
@keyframes shNudge{0%,100%{transform:none}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
html.reduced-motion .chat-input.sh-nudge{animation:none}

/* The terminal's label: the shield's own small door at its right. */
.sec-label.sh-lbl{display:flex;align-items:center;justify-content:space-between;gap:10px}
.sh-chip{
  font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.12em;color:var(--dim);cursor:pointer;
  background:var(--s1);border:1px solid var(--border);border-radius:999px;padding:5px 10px;min-height:28px;white-space:nowrap
}
.sh-chip:hover{color:var(--text);border-color:var(--border2)}
.sh-chip:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}

/* On a player card. */
.sh-card{margin-top:10px}
.sh-btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.sh-btns .btn{min-height:44px;padding-left:10px;padding-right:10px}
.sh-btns .sh-mute.on{border-color:rgba(255,215,0,.45);color:var(--gold);background:rgba(255,215,0,.07)}

/* The sheet. */
.sh-modal{max-width:480px}
#shield-body .btn:disabled,#desk-body .btn:disabled,#reply-body .btn:disabled{opacity:.42;cursor:not-allowed;transform:none;box-shadow:none}
#shield-body{display:flex;flex-direction:column;gap:10px}
.sh-quote{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:var(--s1);
  font-size:.9rem;line-height:1.45;overflow-wrap:anywhere}
.sh-quote b{font-family:var(--fd);font-size:.56rem;letter-spacing:.12em;color:var(--cyan)}
.sh-quote span{color:var(--text)}
.sh-why .bn-opt{flex-direction:row;align-items:center;gap:8px}
.sh-why .bn-opt b{font-size:1rem;color:inherit}
.sh-why .bn-opt.on{border-color:var(--pink);background:rgba(255,0,144,.1)}
.sh-also{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px 12px;border-radius:10px;cursor:pointer;text-align:left;
  font:600 .9rem var(--fb);color:var(--text);background:var(--s1);border:1px solid var(--border)}
.sh-also:hover{border-color:var(--border2)}
.sh-also:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.sh-box{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:5px;
  border:1.5px solid var(--border2);font-size:.75rem;color:#02121a}
.sh-also.on .sh-box{background:var(--cyan);border-color:var(--cyan)}
.sh-list{display:flex;flex-direction:column;gap:6px}
.sh-mrow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:10px;border:1px solid var(--border);background:var(--s1)}
.sh-mrow span{display:flex;flex-direction:column;min-width:0}
.sh-mrow b{font-size:.95rem;overflow-wrap:anywhere}
.sh-mrow em{font-style:normal;font-size:.78rem;color:var(--dim)}
.sh-mrow .btn{flex:0 0 auto;min-height:40px}
.sh-how{display:flex;flex-direction:column;gap:6px;font-size:.84rem;line-height:1.45;color:var(--dim)}
.sh-how p{margin:0}
.sh-how b{color:var(--text)}

/* ══════════════════════════════════════════════════════════════════════
   § 75 · v135 — 📮 THE OWNER'S DESK · tickets, known issues, answers, ?desk
   ══════════════════════════════════════════════════════════════════════ */
/* In the Feedback Terminal: known issues on top… */
.fbk-known{margin-bottom:18px;border:1px solid rgba(255,215,0,.3);border-radius:10px;background:rgba(255,215,0,.04)}
.fbk-kh{display:flex;align-items:center;gap:8px;width:100%;min-height:42px;padding:9px 12px;cursor:pointer;background:none;border:0;color:var(--gold);
  font-family:var(--fd);font-size:.56rem;font-weight:700;letter-spacing:.14em;text-align:left}
.fbk-kh b{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:18px;padding:0 5px;border-radius:999px;
  background:rgba(255,215,0,.16);font-size:.55rem}
.fbk-kh span{margin-left:auto;color:var(--dim)}
.fbk-kh:focus-visible{outline:2px solid var(--gold);outline-offset:-2px;border-radius:10px}
.fbk-kb{padding:0 12px 10px}
.fbk-kl{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;max-height:190px;overflow-y:auto}
.fbk-kl li{display:flex;flex-direction:column;gap:2px;font-size:.88rem;line-height:1.35;color:var(--text)}
.fbk-ks{font-family:var(--fd);font-size:.48rem;letter-spacing:.12em;color:var(--dim)}
.fbk-ks.s-fix{color:var(--orange)}
.fbk-ks.s-done{color:var(--lime)}
.fbk-kn{margin-top:8px;font-size:.78rem;line-height:1.4;color:var(--dim)}
/* …and your tickets at the foot. */
.fbk-tix{margin-top:16px;display:flex;flex-direction:column;gap:6px}
.fbk-th{font-family:var(--fd);font-size:.52rem;font-weight:700;letter-spacing:.14em;color:var(--dimmer)}
.fbk-th span{font-family:var(--fb);letter-spacing:0;font-weight:600;color:var(--dimmer);margin-left:4px}
.fbk-t{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:9px;border:1px solid var(--border);background:var(--s1);
  font:600 .82rem var(--fb);color:var(--dim);text-align:left;min-height:40px}
.fbk-t b{font-family:var(--fd);font-size:.56rem;letter-spacing:.08em;color:var(--text)}
.fbk-t span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fbk-t em{font-style:normal;font-family:var(--fd);font-size:.46rem;letter-spacing:.1em;white-space:nowrap}
.fbk-t em.re{color:var(--lime)}
.fbk-t em.lost{color:var(--orange)}
button.fbk-t{cursor:pointer;border-color:rgba(57,255,20,.4)}
button.fbk-t:hover,button.fbk-t:focus-visible{border-color:var(--lime);outline:none;box-shadow:0 0 0 2px rgba(57,255,20,.25)}

/* An answer, in full. */
.rp-modal{max-width:480px}
#reply-body{display:flex;flex-direction:column;gap:12px}
.rp-re{font-family:var(--fd);font-size:.66rem;font-weight:700;letter-spacing:.08em;color:var(--lime);line-height:1.5;overflow-wrap:anywhere}
.rp-t{font-size:1.02rem;line-height:1.55;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
.rp-sig{font-size:.84rem;color:var(--dim);font-style:italic}
.rp-q{padding:9px 12px;border-left:2px solid var(--border2);font-size:.84rem;line-height:1.45;color:var(--dim);overflow-wrap:anywhere}
.rp-q span{display:block;font-family:var(--fd);font-size:.46rem;letter-spacing:.14em;color:var(--dimmer);margin-bottom:3px}

/* The desk. */
.dk-modal{max-width:980px}
.dk-bar{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.dk-kinds,.dk-status{display:flex;flex-wrap:wrap;gap:6px}
.dk-kinds{justify-content:center}
.dk-kind b{font-family:var(--fb);font-size:.78rem;margin-left:3px;opacity:.75}
.dk-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.dk-q{flex:1 1 220px;min-width:0;font-size:.9rem;padding:8px 12px}
.dk-list{display:flex;flex-direction:column;gap:10px}
.dk-item{padding:12px 14px;border-radius:var(--r);border:1px solid var(--border);background:var(--s1);display:flex;flex-direction:column;gap:7px;min-width:0}
.dk-item.k-chat,.dk-item.k-card{border-left:3px solid var(--pink)}
.dk-item.k-lab{border-left:3px solid var(--purple)}
.dk-item.k-fb{border-left:3px solid var(--cyan)}
.dk-item.s-handled,.dk-item.s-hidden{opacity:.72}
.dk-top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.dk-tix{font-family:var(--fd);font-size:.6rem;font-weight:900;letter-spacing:.08em;color:var(--text)}
.dk-kindl{font-family:var(--fd);font-size:.52rem;letter-spacing:.1em;color:var(--cyan)}
.dk-rate{color:var(--gold);font-size:.72rem;letter-spacing:.06em}
.dk-rate i{font-style:normal;color:var(--dimmer)}
.dk-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;font-family:var(--fd);font-size:.46rem;letter-spacing:.1em;
  background:var(--s2);border:1px solid var(--border);color:var(--dim);white-space:nowrap}
.dk-chip.ok,.dk-chip.t-fixed{color:var(--lime);border-color:rgba(57,255,20,.35)}
.dk-chip.bad,.dk-chip.t-no{color:#ff8a9a;border-color:rgba(255,36,66,.4)}
.dk-chip.t-bug{color:var(--orange);border-color:rgba(255,102,0,.4)}
.dk-chip.t-idea{color:var(--purple);border-color:rgba(168,85,247,.4)}
.dk-chip.st{color:var(--text)}
.dk-age{margin-left:auto;font-size:.8rem;color:var(--dimmer)}
.dk-from{font-size:.86rem;line-height:1.45;color:var(--dim);overflow-wrap:anywhere}
.dk-from b{color:var(--text)}
.dk-from code,.dk-reps code{font-size:.74rem;color:var(--dimmer)}
.dk-msg{font-size:.98rem;line-height:1.5;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
.dk-quote{padding:7px 10px;border-radius:8px;background:rgba(255,0,144,.06);border:1px solid rgba(255,0,144,.22)}
.dk-meta{font-size:.74rem;line-height:1.45;color:var(--dimmer);overflow-wrap:anywhere}
.dk-reps,.dk-replies{display:flex;flex-direction:column;gap:3px;font-size:.82rem;line-height:1.4;color:var(--dim);overflow-wrap:anywhere}
.dk-replies{padding:7px 10px;border-radius:8px;background:rgba(57,255,20,.05);border:1px solid rgba(57,255,20,.2)}
.dk-replies b{color:var(--lime)}
.dk-replies em{font-style:normal;color:var(--dimmer)}
.dk-acts{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.dk-acts .btn{min-height:36px}
.dk-tags{display:flex;flex-wrap:wrap;gap:4px;margin-right:4px}
.dk-tag{font-family:var(--fd);font-size:.46rem;letter-spacing:.08em;padding:6px 8px;min-height:32px;border-radius:999px;cursor:pointer;
  color:var(--dim);background:transparent;border:1px solid var(--border)}
.dk-tag:hover{color:var(--text);border-color:var(--border2)}
.dk-tag.on{color:#02121a;background:var(--gold);border-color:var(--gold)}
.dk-tag:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.dk-form{display:flex;flex-direction:column;gap:6px;padding-top:6px;border-top:1px dashed var(--border)}
.dk-ta{min-height:90px;resize:vertical;font-size:.95rem}
.dk-empty{text-align:center;padding:18px 0}
.dk-known{display:flex;flex-direction:column;gap:12px}
.dk-kadd{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:var(--r);border:1px dashed var(--border2)}
.dk-krow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.dk-kv{flex:0 1 160px;min-width:0;font-size:.9rem;padding:8px 12px}
.dk-kitem{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;border:1px solid var(--border);background:var(--s1);font-size:.92rem;line-height:1.4}
.dk-kitem span{flex:1;min-width:0;overflow-wrap:anywhere}
.dk-kcycle{cursor:pointer;min-height:30px}
.dk-kcycle.s-fix{color:var(--orange)}
.dk-kcycle.s-done{color:var(--lime)}
.dk-setup p,.dk-steps{margin:0 0 10px}
.dk-steps{padding-left:22px;line-height:1.6;color:rgba(255,255,255,.82)}
.dk-uid{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px}
.dk-uid code{padding:7px 10px;border-radius:8px;background:#02020a;border:1px solid var(--border);font:600 .82rem/1.3 ui-monospace,Consolas,monospace;color:#cfe4ff;overflow-wrap:anywhere;user-select:all}
.dk-setup p.dk-warn{padding:9px 12px;border-radius:9px;border:1px solid rgba(255,102,0,.45);background:rgba(255,102,0,.08);color:#ffd2b0;line-height:1.5}
@media (max-width:560px){
  .dk-modal{padding:24px 14px 18px}
  .dk-age{margin-left:0}
  .dk-acts .btn{flex:1 1 auto}
  .dk-kinds{justify-content:flex-start}
}

/* ══════════════════════════════════════════════════════════════════════
   § 76 · v135 — 📡 THE GRID WIRE · real events, ARC, and THE GLITCH
   ══════════════════════════════════════════════════════════════════════ */
.chat-line.wire .chat-body{color:var(--gold);text-transform:uppercase;letter-spacing:.06em}
.chat-line.wire.mine .chat-body{color:#ffe98a}
.chat-line.wire button.chat-who{color:#fff;text-transform:uppercase;text-decoration-color:rgba(255,215,0,.35)}
.chat-line.wire b{color:#fff;font-weight:700}
.wire-ic{font-style:normal;margin-right:2px}
.wire-act{
  display:inline-flex;align-items:center;gap:3px;margin-left:6px;padding:2px 8px;min-height:22px;vertical-align:middle;cursor:pointer;
  font:700 .48rem var(--fd);letter-spacing:.1em;text-transform:uppercase;color:var(--cyan);background:rgba(0,245,255,.08);
  border:1px solid rgba(0,245,255,.3);border-radius:999px;white-space:nowrap
}
.wire-act:hover{background:rgba(0,245,255,.16);border-color:var(--cyan)}
.wire-act:focus-visible{outline:2px solid var(--cyan);outline-offset:1px}
.chat-line.arc .chat-body{color:rgba(57,255,20,.88)}
.arc-tag{display:inline-block;margin-right:4px;padding:0 5px;border-radius:4px;font-size:.46rem;letter-spacing:.14em;vertical-align:1px;
  color:#04140a;background:var(--lime);font-weight:900}
.chat-line.arc b:not(.arc-tag){color:#fff}
.chat-line.arc button.chat-who{color:#fff;text-decoration-color:rgba(57,255,20,.4)}
.chat-line.glt .chat-body{color:#39ff14}
.glt-tag{position:relative;display:inline-block;margin-right:4px;font-size:.5rem;letter-spacing:.14em;font-weight:900;color:#39ff14;
  text-shadow:-1px 0 rgba(255,0,144,.85),1px 0 rgba(0,245,255,.85);animation:gltTag 2.6s steps(1) infinite}
.glt-t{font-style:italic;text-shadow:-1px 0 rgba(255,0,144,.45),1px 0 rgba(0,245,255,.45)}
@keyframes gltTag{0%,88%,100%{transform:none;opacity:1}90%{transform:translateX(-2px) skewX(-8deg);opacity:.75}94%{transform:translateX(2px);opacity:.9}}
html.reduced-motion .glt-tag{animation:none}
html.cb-safe .glt-tag,html.cb-safe .glt-t{text-shadow:none}
/* ── 🎖️ COMMENDATIONS (§ 77) ── the matrix's second wall: eleven ladders, three tiers each. The tiers wear
   the medals' metals (I bronze · II silver · III gold) and say their numeral too, so the state is carried
   by the pips' letters and the name as well as by colour — the colourblind palette and a greyscale print
   read it the same. */
.cmn-wall{margin-top:28px;padding-top:20px;border-top:1px solid rgba(255,215,0,.22)}
.cmn-head{display:flex;align-items:baseline;justify-content:space-between;gap:6px 14px;flex-wrap:wrap;margin-bottom:12px}
.cmn-title{font-family:var(--fd);font-size:.74rem;font-weight:900;letter-spacing:.14em;color:var(--gold);text-shadow:0 0 14px rgba(255,215,0,.35)}
.cmn-sub{font-family:var(--fd);font-size:.48rem;letter-spacing:.2em;text-transform:uppercase;color:var(--dimmer)}
.cmn-progress{margin-bottom:12px}
.cmn-progress-fill{background:linear-gradient(90deg,var(--bronze),var(--silver),var(--gold));box-shadow:0 0 12px rgba(255,215,0,.45)}
.cmn-intro{font-size:.78rem;line-height:1.5;color:var(--dim);margin-bottom:16px}
.cmn-intro b{font-family:var(--fd);font-size:.5rem;font-weight:900;padding:2px 5px;border-radius:5px;letter-spacing:.04em}
.cmn-intro b.p1,.cmn-pips i.on.p1{color:#1d1006;background:var(--bronze);border-color:var(--bronze);box-shadow:0 0 8px rgba(205,127,50,.45)}
.cmn-intro b.p2,.cmn-pips i.on.p2{color:#10141a;background:var(--silver);border-color:var(--silver);box-shadow:0 0 8px rgba(201,212,224,.4)}
.cmn-intro b.p3,.cmn-pips i.on.p3{color:#1a1400;background:var(--gold);border-color:var(--gold);box-shadow:0 0 9px rgba(255,215,0,.5)}
.cmn-top{display:flex;align-items:center;gap:8px;min-height:1.6rem}
.cmn-top .ach-ico{margin-right:auto}
.cmn-pips{display:flex;gap:3px;flex:0 0 auto}
.cmn-pips i{
  font-style:normal;font-family:var(--fd);font-size:.42rem;font-weight:900;letter-spacing:.02em;
  min-width:21px;text-align:center;padding:3px 3px 2px;border-radius:6px;
  border:1px solid rgba(255,255,255,.14);color:rgba(255,255,255,.3);background:rgba(255,255,255,.03)
}
.cmn-tag{font-family:var(--fd);font-size:.4rem;font-weight:900;letter-spacing:.14em;padding:3px 6px;border-radius:6px;
  color:#04040e;background:var(--cyan);box-shadow:0 0 10px rgba(0,245,255,.55);animation:cmnTag 2.2s ease-in-out infinite}
@keyframes cmnTag{0%,100%{opacity:1}50%{opacity:.55}}
/* A ladder with a tier held: the border and the name in the metal of the highest one. */
.cmn-cell.t1{border-color:rgba(205,127,50,.6);background:rgba(205,127,50,.07);box-shadow:0 0 18px rgba(205,127,50,.1)}
.cmn-cell.t1 .ach-name{color:#e9a46b}
.cmn-cell.t2{border-color:rgba(201,212,224,.6);background:rgba(201,212,224,.06);box-shadow:0 0 18px rgba(201,212,224,.1)}
.cmn-cell.t2 .ach-name{color:var(--silver)}
.cmn-cell.t3{border-color:rgba(255,215,0,.65);background:rgba(255,215,0,.08);box-shadow:0 0 22px rgba(255,215,0,.16)}
.cmn-cell.t3 .ach-name{color:var(--gold)}
.cmn-cell.cmn-has .ach-state{color:var(--text)}
.cmn-cell.cmn-new{box-shadow:0 0 0 1px rgba(0,245,255,.5),0 0 24px rgba(0,245,255,.18)}
/* The bar: every locked cell's, the 37's included. Gold once it is full and only a round away from filing. */
.cmn-bar{height:5px;border-radius:5px;margin-top:2px;background:var(--s2);overflow:hidden;box-shadow:inset 0 0 0 1px var(--border)}
.cmn-bar>span{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,var(--cyan),var(--lime));transition:width .6s cubic-bezier(.2,.9,.3,1)}
.ach-cell.locked .cmn-bar>span{background:linear-gradient(90deg,rgba(0,245,255,.6),rgba(57,255,20,.6))}
.ach-cell.cmn-ready .cmn-bar>span{background:var(--gold);box-shadow:0 0 10px rgba(255,215,0,.6)}
.ach-cell.cmn-ready .ach-state{color:var(--gold)}
.ach-cell .ach-state.cmn-n{white-space:nowrap}
.cmn-foot .ach-cr{white-space:nowrap}
.ach-cell.locked .ach-state.cmn-n{color:rgba(255,255,255,.62)}
/* The hub shelf: the ladders under the 37's icons, the tier in the corner. */
.cmn-count{margin-top:14px;display:flex;gap:6px;align-items:baseline}
.cmn-fresh{font-style:normal;color:var(--cyan)}
.cmn-badge{position:relative}
.cmn-rn{position:absolute;right:-4px;bottom:-5px;font-family:var(--fd);font-size:.4rem;font-weight:900;letter-spacing:0;line-height:1;padding:2px 3px;border-radius:4px;background:#0b0b18;border:1px solid currentColor}
.badge.cmn-badge.t1{border-color:rgba(205,127,50,.6);background:rgba(205,127,50,.1);box-shadow:0 0 12px rgba(205,127,50,.14)}
.badge.cmn-badge.t1 .cmn-rn{color:#e9a46b}
.badge.cmn-badge.t2{border-color:rgba(201,212,224,.6);background:rgba(201,212,224,.08);box-shadow:0 0 12px rgba(201,212,224,.12)}
.badge.cmn-badge.t2 .cmn-rn{color:var(--silver)}
.badge.cmn-badge.t3 .cmn-rn{color:var(--gold)}
/* The player card's chips. */
.pc-badge.cmn-pcb.t1{border-color:rgba(205,127,50,.55);color:#e9a46b}
.pc-badge.cmn-pcb.t2{border-color:rgba(201,212,224,.55);color:var(--silver)}
.pc-badge.cmn-pcb.t3{border-color:rgba(255,215,0,.6);color:var(--gold);background:rgba(255,215,0,.08)}
@media(max-width:760px){
  .cmn-wall{margin-top:22px;padding-top:16px}
  .cmn-intro{font-size:.74rem;margin-bottom:12px}
  .cmn-pips i{min-width:18px;padding:3px 2px 2px}
}

/* ── 🧊 CRYO CELLS (§ 78) ── frost pips on the streak chip: one a banked cell, the bank's size in outline.
   Ringed in frost while a cell stands ready to cover a day already missed. */
.cryo-pips{display:inline-flex;gap:4px;margin-left:8px;vertical-align:1px}
.cryo-pips i{display:block;width:6px;height:6px;transform:rotate(45deg);border:1px solid rgba(159,243,255,.55);border-radius:1px;background:transparent}
.cryo-pips i.on{background:#9ff3ff;border-color:#e2fdff;box-shadow:0 0 6px rgba(159,243,255,.9)}
.hub-streak.cryo-arm{border-color:rgba(159,243,255,.75);box-shadow:0 0 0 1px rgba(159,243,255,.25),0 0 12px rgba(159,243,255,.3)}
/* ══════════════════════════════════════════════════════════════
   § 79 · v135 — 🏵️ MISSION MASTERY
   A ring of ten pips round each card's icon: four medals, three heat clears,
   three service marks, in that order clockwise from the top. An unlit pip
   keeps a faint tint of its track, so the ring's shape reads before anything
   is earned; at ten every pip turns gold.
   ══════════════════════════════════════════════════════════════ */
/* The ring sits INSIDE .gc-icon (sized in em, so it follows the icon on a
   phone, and rides the icon's own translateZ in the 3D chrome) and adds no
   text to it. */
.game-card > .gc-icon{position:relative}
.gc-icon > .mst-ring{
  position:absolute;left:50%;top:50%;width:1.5em;height:1.5em;margin:-.75em 0 0 -.75em;
  pointer-events:none;overflow:visible
}
.game-card.locked .gc-icon > .mst-ring{display:none}
/* In the grid's 🌐 mode the OPEN WORLD ribbon hangs at the card's top edge,
   over the ring's two top pips — the icon steps down to clear it, on every
   card so the row stays level. */
.games-grid.ow-mode .game-card > .gc-icon{margin-top:12px}
@media (max-width:700px){ .games-grid.ow-mode .game-card > .gc-icon{margin-top:17px} }
.mst-p{fill:none;stroke-width:6.5;stroke-linecap:round;stroke:rgba(255,255,255,.1)}
.mst-p.h0,.mst-p.h1,.mst-p.h2{stroke:rgba(255,122,45,.16)}
.mst-p.s0,.mst-p.s1,.mst-p.s2{stroke:rgba(185,140,255,.18)}
.mst-p.on.m0{stroke:#d08a45}
.mst-p.on.m1{stroke:#c9d2e3}
.mst-p.on.m2{stroke:#ffd700}
.mst-p.on.m3{stroke:#7df9ff}
.mst-p.on.h0{stroke:#ffc400}
.mst-p.on.h1{stroke:#ff7a2d}
.mst-p.on.h2{stroke:#ff1f5a}
.mst-p.on.s0,.mst-p.on.s1,.mst-p.on.s2{stroke:#b98cff}
.mst-ring.full .mst-p{stroke:#ffd36a}
.mst-ring.full{filter:drop-shadow(0 0 3px rgba(255,211,106,.75))}
/* A pip lit since the ring was last drawn swells and glows once. */
.mst-p.fresh{animation:mstFresh 1.4s ease-out .35s both}
@keyframes mstFresh{
  0%{stroke-width:6.5;opacity:.25}
  35%{stroke-width:12;opacity:1;filter:drop-shadow(0 0 6px #fff)}
  100%{stroke-width:6.5;opacity:1}
}
/* What a screen reader says for the ring, in the card's strip. */
.mst-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* ── The briefing's and the dossier's panel ── */
.mst-panel{display:flex;align-items:center;gap:16px;padding:12px 14px;border-radius:12px;
  background:var(--s2);border:1px solid var(--border)}
.mst-big{position:relative;flex:none;width:84px;height:84px}
.mst-big .mst-ring{display:block;width:100%;height:100%;overflow:visible}
.mst-big .mst-p{stroke-width:7}
.mst-num{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-family:var(--fd);font-size:1.15rem;font-weight:900;color:#fff}
.mst-num em{font-style:normal;font-size:.5rem;color:var(--dim);margin:6px 0 0 1px}
.mst-tracks{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.mst-trk{display:grid;grid-template-columns:7.4em auto minmax(0,1fr);gap:10px;align-items:center}
.mst-tk{font-family:var(--fd);font-size:.48rem;font-weight:700;letter-spacing:.14em;color:var(--dimmer);white-space:nowrap}
.mst-tk i{font-style:normal;font-size:1.7em;letter-spacing:0;margin-right:5px;vertical-align:-.12em}
.mst-dots{display:inline-flex;gap:4px}
.mst-dot{min-width:24px;height:24px;padding:0 5px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;
  font-family:var(--fd);font-size:.48rem;font-weight:900;line-height:1;
  border:1px solid var(--border);color:var(--dimmer);background:rgba(255,255,255,.03)}
.mst-dot.m{width:24px;padding:0;font-size:.95rem;filter:grayscale(1);opacity:.32}
.mst-dot.m.on{filter:none;opacity:1;border-color:rgba(255,255,255,.26);background:rgba(255,255,255,.07)}
.mst-dot.m0.on{border-color:#d08a45;background:rgba(208,138,69,.18)}
.mst-dot.m1.on{border-color:#c9d2e3;background:rgba(201,210,227,.16)}
.mst-dot.m2.on{border-color:#ffd700;background:rgba(255,215,0,.16)}
.mst-dot.m3.on{border-color:#7df9ff;background:rgba(125,249,255,.16)}
.mst-dot.h.on{color:#fff}
.mst-dot.h0.on{border-color:#ffc400;background:rgba(255,196,0,.16)}
.mst-dot.h1.on{border-color:#ff7a2d;background:rgba(255,122,45,.18)}
.mst-dot.h2.on{border-color:#ff1f5a;background:rgba(255,31,90,.2)}
.mst-dot.s.on{color:#fff;border-color:#b98cff;background:rgba(185,140,255,.18)}
.mst-tn{font-size:.76rem;line-height:1.3;color:var(--dim);min-width:0}
.mst-next{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.12em;line-height:1.6;color:var(--gold)}
.mst-next em{font-family:var(--fb);font-style:normal;font-weight:600;font-size:.78rem;letter-spacing:0;color:var(--dim);margin-left:6px}
.mst-next.done{color:#ffd36a}
.mst-goal{font-size:.8rem;line-height:1.5;color:var(--dim)}
.mst-goal b{color:var(--gold);font-weight:700}
/* ✨ v142 · The four medal lines as text, under the briefing's mastery panel (mstLinesHTML, § 98). */
.mst-lines{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;font-family:var(--fd);font-size:.56rem;letter-spacing:.1em;color:#fff}
.mst-lines b{font-size:.5rem;font-weight:900;letter-spacing:.14em;color:var(--dimmer)}
.mst-lines em{font-family:var(--fb);font-style:normal;font-weight:600;font-size:.76rem;letter-spacing:0;color:var(--dim)}
html.cs-hc .mst-lines b{color:#eef3f8}
.mst-wear{
  width:100%;min-height:40px;padding:8px 12px;border-radius:10px;cursor:pointer;
  font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.12em;
  background:rgba(255,215,0,.06);border:1px solid rgba(255,215,0,.35);color:var(--gold);
  transition:background .15s,border-color .15s,box-shadow .15s
}
.mst-wear:hover,.mst-wear:focus-visible{background:rgba(255,215,0,.13);border-color:var(--gold)}
.mst-wear.on{background:rgba(255,215,0,.16);border-color:var(--gold);box-shadow:0 0 16px -4px rgba(255,215,0,.6)}
/* In the mission dossier the panel stands on its own, so it spaces itself. */
.mst-dos{display:flex;flex-direction:column;gap:10px}

/* The Flight Deck's dock card. */
.hs-fact.mst-fact.spec{color:#ffe7a8;border-color:rgba(255,211,106,.4)}
.hs-fact.mst-fact.full{color:#ffd36a;border-color:rgba(255,211,106,.75);background:rgba(255,211,106,.1)}

@media (max-width:520px){
  .mst-panel{gap:12px;padding:10px 11px}
  .mst-big{width:64px;height:64px}
  .mst-num{font-size:.95rem}
  .mst-trk{grid-template-columns:auto 1fr;row-gap:3px}
  .mst-tn{grid-column:1 / -1;font-size:.72rem}
}

/* ══════════════════════════════════════════════════════════════
   § 80 · v135 — 🌐 OPEN WORLD MEDALS
   The open world's colours are the 🌐 ribbon's (pink to orange): a medal
   earned out there wears them as its rim, wherever it is shown.
   ══════════════════════════════════════════════════════════════ */
.owm-chip{
  flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;
  width:1.34rem;height:1.34rem;margin-left:-2px;border-radius:50%;font-size:.7rem;line-height:1;
  border:1.5px solid transparent;
  background:linear-gradient(#0d0c19,#0d0c19) padding-box,linear-gradient(135deg,#ff2d9a,#ff8a3a) border-box;
  box-shadow:0 0 8px rgba(255,60,150,.35)
}
.owm-chip.m-none{display:none}
.games-grid.ow-mode .owm-chip.m-none{display:inline-flex;font-size:.58rem;opacity:.5;filter:grayscale(1);box-shadow:none}
.game-card.locked .owm-chip{display:none}

/* The results card: the classic medal panel, edged in the world's pink. */
#res-medal.owm-res{box-shadow:inset 3px 0 0 #ff5aa8}
#res-medal.owm-res.is-new{box-shadow:inset 3px 0 0 #ff5aa8,0 0 30px -6px var(--mcol)}

/* The briefing's and the mission dossier's line about the world. */
.owm-line{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;padding:8px 12px;border-radius:10px;
  border:1px solid rgba(255,90,168,.38);background:rgba(255,45,154,.06)}
.owm-k{font-family:var(--fd);font-size:.48rem;font-weight:900;letter-spacing:.14em;color:#ff8ac8}
.owm-v{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.1em;color:#fff}
.owm-n{margin-left:auto;font-size:.76rem;color:var(--dim)}
.brf-sec.mst-brf .owm-line{margin-top:2px}

.hs-fact.owm-fact{border-color:rgba(255,90,168,.5)}
/* ══════════════════════════════════════════════════════════════
   § 81 · v135 — ★ RE-WON · stars beside an edition, the cup and the crown counted
   ══════════════════════════════════════════════════════════════ */
/* On a board row: between the worn edition's icon and the name (a long name takes the ellipsis, the stars
   stay whole), in the edition's own light. Small and still — the name beside it already moves. */
.rwon-stars{
  display:inline-block;margin-right:5px;white-space:nowrap;vertical-align:1px;
  font-family:var(--fd);font-size:.66em;font-weight:900;letter-spacing:0;line-height:1.4;
  color:#ffd76a;text-shadow:0 0 8px rgba(255,215,106,.45)
}
.rwon-stars.rwon-horizon{color:#ffd2a6;text-shadow:0 0 8px rgba(198,216,255,.5)}
.rwon-stars.rwon-glitch{color:#7dff5a;text-shadow:-1px 0 rgba(255,43,214,.55),1px 0 rgba(0,229,255,.55)}

/* The player card's PRIZES. */
.rwon-prizes{display:flex;flex-wrap:wrap;gap:6px}
.rwon-prize{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:14px;
  font-family:var(--fd);font-size:.52rem;font-weight:700;letter-spacing:.1em;color:var(--text);
  background:var(--s2);border:1px solid rgba(255,215,106,.35)}
.rwon-prize i{font-style:normal;font-size:.95rem;letter-spacing:0}
.rwon-prize b{color:#ffd76a;font-weight:900;letter-spacing:.04em}
.rwon-prize em{font-style:normal;color:#cfefff;letter-spacing:.04em}
.rwon-prize.rwon-horizon{border-color:rgba(198,216,255,.42)}
.rwon-prize.rwon-horizon b{color:#ffd2a6}
.rwon-prize.rwon-glitch{border-color:rgba(57,255,20,.4)}
.rwon-prize.rwon-glitch b{color:#7dff5a}
.rwon-prize.rwon-crown b{color:#ff9ac0}

/* The Black Market's card of an earned prize the player holds. */
.rwon-shop{margin:4px auto 2px;font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.12em;color:#ffd76a;text-align:center}

/* An expedition's win card: the count the win raised, under the fight's own logbook line (§ 55 .xp-log). */
.xp-log.rwon-log{margin-top:6px;border-color:rgba(255,211,106,.38);background:linear-gradient(160deg,rgba(255,211,106,.1),rgba(255,255,255,.03))}
.xp-log.rwon-log b{color:#ffd76a}

/* ══════════════════════════════════════════════════════════════
   § 82 · v135 — 🏛️ OPEN HOUSE · the visit's pill on the deck, the TROPHY CABINET
   ══════════════════════════════════════════════════════════════ */
/* The pill: under the status line, centred, in the hall's gold — whose hall, which way, how far, and the
   two doors (the cabinet, the end of the visit). Hidden while a deck panel is open over it. */
.oh-pill{
  position:absolute;left:50%;top:calc(var(--hs-top-h,70px) + 40px);z-index:6;translate:-50% 0;
  display:flex;align-items:center;gap:8px;max-width:calc(100% - 24px);padding:5px 6px 5px 12px;border-radius:999px;
  background:linear-gradient(160deg,rgba(32,24,6,.9),rgba(10,8,4,.84));border:1px solid rgba(255,211,106,.55);
  box-shadow:0 6px 22px rgba(0,0,0,.5),0 0 18px rgba(255,211,106,.18);
  font-family:var(--fd);font-size:.6rem;font-weight:900;letter-spacing:.14em;color:#ffe6a8;white-space:nowrap
}
.oh-pill-ic{font-size:.95rem;letter-spacing:0}
.oh-pill-t{overflow:hidden;text-overflow:ellipsis;min-width:0}
.oh-pill-dir{display:inline-flex;align-items:center;gap:5px;color:#fff3c6}
.oh-pill-dir[hidden]{display:none}
.oh-pill-dir i{display:inline-block;font-style:normal;color:#ffd36a;transition:transform .2s linear}
.oh-pill-dir b{font-size:.56rem;opacity:.85}
.oh-pill-b{flex:none;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:.8rem;line-height:1;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,211,106,.4);color:#ffe6a8}
.oh-pill-b:hover,.oh-pill-b:focus-visible{background:rgba(255,211,106,.18);outline:none;box-shadow:0 0 0 2px rgba(255,211,106,.5)}
body.hs-panel-open .oh-pill{display:none}
@media (max-width:760px){
  .oh-pill{top:calc(var(--hs-top-h,92px) + 116px);font-size:.52rem;letter-spacing:.1em;gap:6px}
  .oh-pill-b{width:30px;height:30px}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:500px){ .oh-pill{top:calc(var(--hs-top-h,70px) + 88px)} }
html.reduced-motion .oh-pill-dir i{transition:none}

/* The cabinet: the player card's shell in the hall's gold. */
.oh-tint .fb-modal{max-width:640px;border-color:rgba(255,211,106,.45);box-shadow:0 0 70px rgba(255,211,106,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.oh-tint .fb-modal::before{background:linear-gradient(90deg,transparent,#ffd36a,transparent);box-shadow:0 0 12px #ffd36a}
.oh-body{display:flex;flex-direction:column;gap:12px;text-align:left}
.oh-head{display:flex;align-items:center;gap:14px;padding-right:34px}
.oh-shipsvg{flex:none;width:86px;height:86px;filter:drop-shadow(0 6px 14px rgba(0,0,0,.6))}
.oh-id{min-width:0}
.oh-kick{font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.2em;color:#ffd36a}
.oh-name{margin-top:4px;font-family:var(--fd);font-size:1.05rem;font-weight:900;letter-spacing:.1em;color:#fff;word-break:break-word;
  text-shadow:0 0 16px rgba(255,211,106,.35)}
.oh-sub{margin-top:5px;font-family:var(--fd);font-size:.5rem;letter-spacing:.12em;line-height:1.5;color:var(--dim)}
.oh-hint{margin:0;font-size:.84rem;line-height:1.35;color:var(--dim)}
.oh-hint b{color:#ffd36a;font-family:var(--fd);font-size:.6rem;letter-spacing:.12em}

/* 🔦 The spotlight: first in the cabinet, as it is first inside the hall's door. */
.oh-spotl{display:flex;align-items:center;gap:14px;padding:12px 14px;border-radius:12px;
  background:radial-gradient(120% 140% at 0% 0%,rgba(255,226,150,.18),rgba(255,211,106,.04) 60%,transparent),var(--s2);
  border:1px solid rgba(255,211,106,.5);box-shadow:inset 0 0 24px rgba(255,211,106,.08)}
.oh-spotl-ic{font-size:2.2rem;line-height:1;filter:drop-shadow(0 0 12px rgba(255,211,106,.55))}
.oh-spotl-k{font-family:var(--fd);font-size:.48rem;font-weight:900;letter-spacing:.18em;color:#ffd36a}
.oh-spotl-n{margin-top:4px;font-family:var(--fd);font-size:.8rem;font-weight:900;letter-spacing:.08em;color:#fff}
.oh-spotl-n i{font-style:normal;color:#ffd76a;margin-left:6px}

/* The tiles — the dais and the colossi. A prize held is gold-edged; one not held is dark glass and a padlock. */
.oh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.oh-tile{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-height:92px;padding:10px 10px 9px;border-radius:10px;
  text-align:left;font:inherit;color:var(--text);background:rgba(255,255,255,.035);border:1px solid var(--border);opacity:.62}
.oh-tile.won{opacity:1;background:linear-gradient(160deg,rgba(255,211,106,.1),rgba(255,255,255,.03));border-color:rgba(255,211,106,.45)}
button.oh-tile{cursor:pointer;transition:box-shadow .14s ease,border-color .14s ease}
button.oh-tile:hover,button.oh-tile:focus-visible{border-color:#ffd36a;box-shadow:0 0 16px rgba(255,211,106,.25);outline:none}
.oh-tile.spot{border-color:#ffd36a;box-shadow:0 0 0 1px rgba(255,211,106,.6),0 0 20px rgba(255,211,106,.28)}
.oh-ic{font-size:1.35rem;line-height:1}
.oh-tile b{font-family:var(--fd);font-size:.58rem;font-weight:900;letter-spacing:.1em;color:#fff}
.oh-tile .oh-mark{font-style:normal;font-family:var(--fd);font-size:.6rem;font-weight:900;letter-spacing:.06em;color:#ffd76a}
.oh-tile em{font-style:normal;font-size:.74rem;line-height:1.3;color:var(--dim)}
.oh-spot-tag{position:absolute;top:7px;right:8px;padding:2px 6px;border-radius:999px;
  font-family:var(--fd);font-size:.42rem;font-weight:900;letter-spacing:.12em;color:#1a1205;background:#ffd36a}
.oh-tile.ed-horizon.won .oh-mark{color:#ffd2a6}
.oh-tile.ed-glitch.won .oh-mark{color:#7dff5a}
.oh-jewels{display:flex;gap:4px;margin-top:3px}
.oh-jewels i{width:8px;height:8px;border-radius:50%;background:#1b1e25;border:1px solid rgba(255,255,255,.14)}
.oh-jewels i.b{background:#3fd0ff;box-shadow:0 0 6px #3fd0ff;border-color:transparent}
.oh-jewels i.r{background:#ff2b6a;box-shadow:0 0 6px #ff2b6a;border-color:transparent}
/* A colossus in its own paint, its glow along the edge once it has fallen. */
.oh-cl .oh-tile.cl{background:linear-gradient(160deg,color-mix(in srgb,var(--paint) 60%,transparent),rgba(4,6,14,.6))}
.oh-cl .oh-tile.cl.won{border-color:color-mix(in srgb,var(--glow) 70%,transparent);box-shadow:inset 0 0 18px color-mix(in srgb,var(--glow) 18%,transparent)}
.oh-cl .oh-tile.cl.won b{color:color-mix(in srgb,var(--glow) 45%,#fff)}
.oh-cl .oh-tile.cl.spot{box-shadow:0 0 0 1px #ffd36a,0 0 20px rgba(255,211,106,.3),inset 0 0 18px color-mix(in srgb,var(--glow) 18%,transparent)}

/* The medals: a glass column each, filled to the share of the missions that hold it. */
.oh-medals{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.oh-med{display:flex;flex-direction:column;align-items:center;gap:5px}
.oh-col{position:relative;width:26px;height:64px;border-radius:13px;background:rgba(168,220,255,.07);border:1px solid rgba(168,220,255,.22);overflow:hidden}
.oh-col i{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(180deg,color-mix(in srgb,var(--mc) 70%,#fff),var(--mc));box-shadow:0 0 12px var(--mc)}
.oh-med b{font-family:var(--fd);font-size:.62rem;color:#fff}

/* The achievements: a plaque each — gold, and its icon, once it is held. */
.oh-ach{display:grid;grid-template-columns:repeat(auto-fill,minmax(26px,1fr));gap:5px}
.oh-ach span{display:flex;align-items:center;justify-content:center;height:26px;border-radius:5px;font-size:.8rem;
  background:#2a251b;border:1px solid rgba(255,211,106,.12)}
.oh-ach span.on{background:linear-gradient(160deg,rgba(255,211,106,.32),rgba(255,180,0,.12));border-color:rgba(255,211,106,.55)}

/* 🫡 The visitors' book, and the stamps a visitor can leave. */
.oh-book{display:flex;flex-direction:column;gap:6px}
.oh-bk{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:7px 10px;border-radius:9px;background:var(--s2);border:1px solid var(--border)}
.oh-bk span{font-size:1.1rem}
.oh-bk b{font-family:var(--fd);font-size:.58rem;letter-spacing:.08em;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.oh-bk em{font-style:normal;font-family:var(--fd);font-size:.5rem;letter-spacing:.1em;color:#ffd36a;white-space:nowrap}
.oh-stamps{display:flex;flex-wrap:wrap;gap:6px}
.oh-stamp{cursor:pointer;padding:8px 12px;border-radius:999px;font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.1em;
  color:#ffe6a8;background:rgba(255,211,106,.06);border:1px solid rgba(255,211,106,.35)}
.oh-stamp:hover,.oh-stamp:focus-visible{background:rgba(255,211,106,.16);outline:none;box-shadow:0 0 0 2px rgba(255,211,106,.45)}
.oh-stamp.on{color:#1a1205;background:#ffd36a;border-color:#ffd36a;box-shadow:0 0 14px rgba(255,211,106,.4)}
.oh-stamp:disabled{opacity:.45;cursor:not-allowed}
.oh-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:4px}

/* The dossier's door to it. */
.oh-dos{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 12px;border-radius:10px;
  background:var(--s2);border:1px solid rgba(255,211,106,.3);font-size:.86rem;color:var(--dim)}

@media (max-width:520px){
  .oh-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oh-shipsvg{width:64px;height:64px}
  .oh-name{font-size:.9rem}
  .oh-tile{min-height:84px;padding:9px 8px 8px}
}
html.reduced-motion button.oh-tile{transition:none}
/* ── § 83 · v135 · 📸 STUDIO ── the bar is not an overlay (an overlay holds the deck's frame, and the orbit with it). */
.stu-bar{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:center;
  padding:10px 14px;border:1px solid var(--cyan);border-radius:14px;background:rgba(4,6,16,.82);box-shadow:0 0 24px rgba(0,245,255,.18);max-width:calc(100vw - 32px)}
.stu-k{font-family:'Orbitron',monospace;font-size:11px;letter-spacing:.16em;color:var(--cyan)}
.stu-hint{font-size:11px;color:var(--text-dim,#9aa4b4)}
body.stu-on #hs-labels,body.stu-on #hs-spot{display:none!important}
body.stu-clean #hs-top,body.stu-clean #hs-where,body.stu-clean #hs-rail,body.stu-clean #hs-mapbox,body.stu-clean #hs-dock,body.stu-clean .hs-fx,
body.stu-clean #hs-t-boost,body.stu-clean #hs-t-up,body.stu-clean #hs-t-down,body.stu-clean .hub-bar{opacity:0!important;pointer-events:none!important}
.stu-modal{max-width:880px}
.stu-img{display:block;width:100%;height:auto;border-radius:10px;margin:6px 0 12px}
.stu-btns{display:flex;gap:10px;justify-content:flex-end}
@media (max-width:560px){ .stu-hint{display:none} }
/* ═════════════════════════════════════════════════
   🛸 SCOUT AHEAD (v135 · § 84) — the companion, sent ahead
   ═════════════════════════════════════════════════ */
/* The 🛸 button stands over BOOST, centred on it and clear of it and of climb (▲▼, to its left) — mirrored
   for a left hand, and standing on the card like the others when one is up. */
.hs-t-scout{right:31px;bottom:calc(130px + var(--hs-bottom,0px));width:52px;height:52px;padding:0;font-size:1.3rem;line-height:1;
  font-family:inherit;letter-spacing:0}
body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-scout{bottom:calc(var(--hs-dock-h,150px) + 124px + var(--hs-bottom,0px))}
html.lefty .hs-t-scout{right:auto;left:97px}
@media (max-width:760px){
  .hs-t-scout{right:26px;bottom:calc(110px + var(--hs-bottom,0px));width:50px;height:50px}
  body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-scout{bottom:calc(var(--hs-dock-h,150px) + 106px + var(--hs-bottom,0px))}
  html.lefty .hs-t-scout{right:auto;left:26px}
}
/* A phone on its side has no height for a fourth button over a card: with one up, the ship is somewhere already. */
@media (max-height:500px){
  body.hub-fly #hub-space:has(#hs-dock:not([hidden])) .hs-t-scout{display:none}
}
/* The reason over the scouted beacon, just above its own label: a pill in the companion's colour with a
   point down to it. Moved every frame with transform only, like the labels. */
.hs-sct{
  position:absolute;left:0;top:0;z-index:3;pointer-events:auto;cursor:pointer;
  display:flex;align-items:center;gap:6px;white-space:nowrap;margin:0;padding:4px 11px 4px 7px;border-radius:999px;
  font-family:var(--fd);font-size:.58rem;font-weight:900;letter-spacing:.16em;color:#fff;
  background:color-mix(in srgb,var(--acc,#00f5ff) 24%,rgba(4,10,22,.86));
  border:1px solid color-mix(in srgb,var(--acc,#00f5ff) 80%,transparent);
  box-shadow:0 0 16px color-mix(in srgb,var(--acc,#00f5ff) 50%,transparent),inset 0 0 10px color-mix(in srgb,var(--acc,#00f5ff) 22%,transparent);
  translate:-50% -100%;will-change:transform;animation:hsSctIn .35s ease
}
.hs-sct[hidden]{display:none}
.hs-sct::after{
  content:'';position:absolute;left:50%;bottom:-5px;width:8px;height:8px;margin-left:-4px;rotate:45deg;
  background:color-mix(in srgb,var(--acc,#00f5ff) 24%,rgba(4,10,22,.95));
  border-right:1px solid color-mix(in srgb,var(--acc,#00f5ff) 80%,transparent);border-bottom:1px solid color-mix(in srgb,var(--acc,#00f5ff) 80%,transparent)
}
.hs-sct-i{font-size:.95rem;line-height:1}
.hs-sct-w{text-shadow:0 0 8px color-mix(in srgb,var(--acc,#00f5ff) 85%,transparent)}
@keyframes hsSctIn{0%{opacity:0;translate:-50% -60%}100%{opacity:1;translate:-50% -100%}}
/* The navigator's first group: the reason where a row keeps its medal, the 🛸 that sends the companion. */
.hs-row-sct .hs-row-m{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.12em;color:#bff6ff;opacity:.9}
.hs-row-sct.on .hs-row-go{background:rgba(0,245,255,.08);box-shadow:inset 0 0 0 1px rgba(0,245,255,.35)}
.hs-row-sct.on .hs-row-m::before{content:'🛸 '}
.hs-row-sct-b{font-size:.95rem}
/* The list hub: the card the companion perches on, its reason worn over the icon, and the scout light. */
.game-card.sct-perch,.mp-banner.sct-perch{
  border-color:var(--sct,#00f5ff);
  box-shadow:0 0 0 1px var(--sct,#00f5ff),0 0 28px color-mix(in srgb,var(--sct,#00f5ff) 42%,transparent)
}
.sct-tag{
  position:absolute;left:50%;top:6px;translate:-50% 0;z-index:3;pointer-events:none;white-space:nowrap;
  font-family:var(--fd);font-size:.48rem;font-weight:900;letter-spacing:.13em;line-height:1.5;color:#fff;
  padding:2px 9px;border-radius:999px;
  background:color-mix(in srgb,var(--sct,#00f5ff) 30%,rgba(4,10,22,.92));border:1px solid var(--sct,#00f5ff);
  box-shadow:0 0 12px color-mix(in srgb,var(--sct,#00f5ff) 50%,transparent);animation:sctTag .4s ease
}
.mp-banner > .sct-tag{top:auto;bottom:6px;left:auto;right:12px;translate:none}
@keyframes sctTag{0%{opacity:0;transform:translateY(-4px)}100%{opacity:1;transform:none}}
#sct-mote{
  position:fixed;left:0;top:0;z-index:1900;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,#fff 0 26%,var(--sct,#00f5ff) 50%,transparent 72%);
  box-shadow:0 0 14px 4px color-mix(in srgb,var(--sct,#00f5ff) 65%,transparent);will-change:transform;
  animation:sctMote 1.2s ease-in-out infinite
}
#sct-mote[hidden]{display:none}
@keyframes sctMote{50%{scale:1.3}}
.mp-filter.gt-scout{color:#bff6ff;border-color:rgba(0,245,255,.42)}
.mp-filter.gt-scout:hover{border-color:var(--cyan);box-shadow:0 0 14px rgba(0,245,255,.2)}
/* Reduced motion: it is simply there — no pop, no pulse. */
html.reduced-motion .hs-sct,html.reduced-motion .sct-tag,html.reduced-motion #sct-mote,#sct-mote.still{animation:none}
@media (prefers-reduced-motion:reduce){ .hs-sct,.sct-tag,#sct-mote{animation:none} }
/* ── § 86 · v135 — 🖌️ SKYWRITER ── THE CANVAS's card: the ink button carries its swatch, the keys chip is quiet,
   wet paint is marked. The preview sheet: a sculpture turning on a dark stage, dragged round by a finger. */
.skw-inkb{display:inline-flex;align-items:center;gap:7px}
.skw-inkb::before{content:'';width:11px;height:11px;border-radius:50%;flex:none;background:var(--ink,#00f5ff);
  box-shadow:0 0 8px var(--ink,#00f5ff),0 0 0 1px rgba(255,255,255,.35)}
.hs-fact.skw-keys{opacity:.7;background:transparent}
.hs-fact.skw-wet{color:#9fe6ff;border-color:rgba(120,210,255,.4)}
.skw-modal{max-width:540px;border-color:rgba(255,140,60,.45);box-shadow:0 0 70px rgba(255,122,26,.13),inset 0 0 0 1px rgba(255,255,255,.03)}
.skw-modal::before{background:linear-gradient(90deg,transparent,#ff8a3c,transparent);box-shadow:0 0 12px #ff8a3c}
.skw-modal .fb-head{margin-bottom:14px}
.skw-modal .fb-title{background:linear-gradient(90deg,#ffb36b,#ff7be3);-webkit-background-clip:text;background-clip:text}
.skw-view{display:block;width:100%;height:min(46vh,300px);border-radius:14px;border:1px solid rgba(255,160,90,.22);
  background:#03040b;cursor:grab;touch-action:none}
.skw-view:active{cursor:grabbing}
.skw-line{font-size:.92rem;line-height:1.5;color:var(--text);margin:14px 2px 0;text-align:center}
.skw-btns .btn{min-width:0}

/* ── § 87 · v135 — 🛬 THE FLEET DOCK ── FLEET VIEW: the crew's and rivals' ships, each in its owner's paint, its
   bay's colour (the crew's, or a rival's gold) down its edge. Two across on a phone, three on a desktop. */
.fdk-modal{max-width:760px;border-color:rgba(185,140,255,.45);box-shadow:0 0 70px rgba(168,85,247,.14),inset 0 0 0 1px rgba(255,255,255,.03)}
.fdk-modal::before{background:linear-gradient(90deg,transparent,#b98cff,transparent);box-shadow:0 0 12px #b98cff}
.fdk-modal .fb-head{margin-bottom:16px}
.fdk-modal .fb-title{background:linear-gradient(90deg,#c9a6ff,#7ff7ff);-webkit-background-clip:text;background-clip:text}
.fdk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.fdk-tile{display:flex;flex-direction:column;gap:6px;padding:10px 12px 12px;border-radius:14px;min-width:0;
  background:linear-gradient(160deg,rgba(20,24,44,.9),rgba(8,10,22,.95));border:1px solid rgba(255,255,255,.1);
  border-left:3px solid var(--mk,#ffd23a);box-shadow:inset 0 0 22px color-mix(in srgb,var(--mk,#ffd23a) 9%,transparent)}
.fdk-ship{display:block;width:100%;height:auto;max-height:92px;filter:drop-shadow(0 4px 10px rgba(0,0,0,.6))}
.fdk-burn{animation:fdkBurn 1.1s ease-in-out infinite alternate;filter:blur(2px)}
@keyframes fdkBurn{from{opacity:.35}to{opacity:.75}}
.fdk-who{display:flex;align-items:baseline;gap:8px;min-width:0}
.fdk-who b{flex:1;min-width:0;font-family:var(--fd);font-size:.68rem;letter-spacing:.06em;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fdk-who em{flex:none;font-style:normal;font-family:var(--fd);font-size:.5rem;letter-spacing:.12em;color:var(--mk,#ffd23a)}
.fdk-sub{font-family:var(--fd);font-size:.5rem;letter-spacing:.12em;color:var(--dim)}
.fdk-facts{display:flex;flex-wrap:wrap;gap:4px}
.fdk-facts span{font-family:var(--fd);font-size:.46rem;font-weight:700;letter-spacing:.08em;padding:3px 7px;border-radius:999px;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);color:rgba(233,248,255,.88)}
.fdk-acts{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:2px}
.fdk-acts .btn{padding:7px 0;min-width:0;font-size:.9rem}
.fdk-empty{padding:26px 10px;text-align:center;color:var(--dim);font-size:.92rem;line-height:1.55}
.fdk-foot{margin-top:14px;text-align:center;font-size:.82rem;line-height:1.45;color:var(--dim)}
.fdk-navnote{padding:8px 10px;border-radius:10px;font-size:.82rem;line-height:1.4;color:rgba(233,248,255,.7);
  background:rgba(255,255,255,.03);border:1px dashed rgba(185,140,255,.35)}
.lb-panel .fdk-lb-door{display:block;margin:-4px auto 12px}
@media (max-width:560px){
  .fdk-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .fdk-tile{padding:8px 9px 10px}
  .fdk-facts span:nth-child(n+4){display:none}
  .skw-view{height:min(40vh,260px)}
}
/* ── § 88 · v135 · 🎒 FULL KIT ── the pins on a saved loadout's card. */
.kit-pins{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0}
.kit-pin-k{font-family:'Orbitron',monospace;font-size:9px;letter-spacing:.14em;color:var(--cyan)}
.kit-pin{background:rgba(0,245,255,.08);border:1px solid rgba(0,245,255,.35);border-radius:999px;color:#e8eef5;font-size:11px;padding:3px 9px;cursor:pointer}
.kit-pin-none{font-size:11px;color:var(--text-dim,#9aa4b4)}
.kit-pin-add{background:var(--s2);border:1px solid var(--border);border-radius:8px;color:#e8eef5;font-size:11px;padding:4px 6px;max-width:100%}

/* ── § 89 · v135 · 📒 THE LEDGER & WISHLIST ── */
.shop-card{position:relative}
.wish-star{position:absolute;top:8px;right:8px;width:30px;height:30px;border-radius:50%;border:1px solid var(--border);background:rgba(6,6,16,.7);color:#ffd36a;font-size:15px;line-height:1;cursor:pointer;z-index:2}
.wish-star.on{border-color:#ffd36a;box-shadow:0 0 12px rgba(255,211,106,.35)}
.ledger-modal{max-width:620px}
.lg-h{display:flex;justify-content:space-between;align-items:baseline;margin:14px 0 8px;font-family:'Orbitron',monospace;font-size:11px;letter-spacing:.16em;color:var(--cyan)}
.lg-h em{font-style:normal;font-size:9px;color:var(--text-dim,#9aa4b4)}
.lg-wish{padding:10px 12px;border:1px solid var(--border);border-radius:10px;margin-bottom:8px;background:rgba(255,211,106,.04)}
.lg-wish-top{display:flex;justify-content:space-between;gap:10px;font-size:13px;color:#e8eef5}
.lg-wish-top span:last-child{font-family:'Orbitron',monospace;font-size:10px;letter-spacing:.08em;color:#ffd36a}
.lg-bar{height:6px;border-radius:3px;background:rgba(255,255,255,.08);margin:8px 0 6px;overflow:hidden}
.lg-bar i{display:block;height:100%;background:linear-gradient(90deg,#ffd36a,#ff9a3c)}
.lg-when{font-size:12px;color:var(--text-dim,#9aa4b4)}
.lg-sale{color:var(--lime)}
.lg-wish-btns{display:flex;gap:8px;margin-top:8px}
.lg-rows{display:grid;gap:2px;max-height:44vh;overflow:auto}
.lg-row{display:grid;grid-template-columns:7.5em 1fr 5em 6.5em;gap:8px;align-items:center;padding:6px 4px;border-bottom:1px solid rgba(255,255,255,.05);font-size:12px}
.lg-t{color:var(--text-dim,#9aa4b4);font-size:10px}
.lg-why{color:#e8eef5;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lg-d{text-align:right;font-family:'Orbitron',monospace}
.lg-d.up{color:var(--lime)} .lg-d.down{color:#ff6b81}
.lg-bal{text-align:right;color:var(--text-dim,#9aa4b4);font-size:11px}
#btn-ledger{margin-left:8px}
/* ✨ v142 · § 99 · three buttons on a wish row (BUY first): they wrap on a narrow sheet rather than overflow it. */
.lg-wish-btns{flex-wrap:wrap}
.lg-wish-btns .btn{flex:1 1 auto}
@media (max-width:520px){ .lg-row{grid-template-columns:1fr 4.5em;} .lg-t,.lg-bal{display:none} }
/* ══════════════════════════════════════════════════════════════
   🛰️ NEW BUILD ON THE GRID (v135, § 90 in app.js)
   The hub bar's chip — a newer build is waiting: tap to reload into it —
   and ARC's line that says so once, on a quiet hub. The line is worn like
   #toast but takes clicks (a toast never does), sits under every sheet
   (z 2000) and over the hub and the deck (z 10). Palette vars only, so the
   colourblind-safe palette repoints both; still when motion is reduced.
   ══════════════════════════════════════════════════════════════ */
.upd-chip[hidden]{display:none}
.upd-chip{color:var(--cyan);border-color:color-mix(in srgb,var(--cyan) 55%,transparent);
  box-shadow:0 0 12px color-mix(in srgb,var(--cyan) 26%,transparent);animation:updGlow 2.6s ease-in-out infinite}
.upd-chip:hover,.upd-chip:focus-visible{background:color-mix(in srgb,var(--cyan) 14%,transparent);border-color:var(--cyan);color:var(--cyan)}
.upd-chip.busy{opacity:.6;animation:none;cursor:progress}
@keyframes updGlow{0%,100%{box-shadow:0 0 6px color-mix(in srgb,var(--cyan) 16%,transparent)}
  50%{box-shadow:0 0 18px color-mix(in srgb,var(--cyan) 46%,transparent)}}
body.mode-3d .upd-chip{color:var(--cyan)}

#upd-note{position:fixed;left:50%;bottom:86px;z-index:1500;display:flex;align-items:center;gap:12px;
  width:max-content;max-width:min(700px,calc(100vw - 32px));box-sizing:border-box;padding:10px 10px 10px 16px;border-radius:30px;
  background:rgba(4,4,14,.93);border:1px solid var(--cyan);color:var(--text);
  box-shadow:0 10px 30px color-mix(in srgb,var(--cyan) 22%,transparent);
  opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,14px);
  transition:transform .3s ease,opacity .3s ease,visibility 0s linear .3s}
#upd-note.show{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0);
  transition:transform .3s ease,opacity .3s ease,visibility 0s}
.upd-ic{flex:0 0 auto;font-size:1.35rem;line-height:1}
.upd-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.upd-who{font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.24em;color:var(--dim)}
.upd-line{font-family:var(--fd);font-size:.74rem;font-weight:900;letter-spacing:.08em;color:var(--cyan);line-height:1.35}
.upd-sub{font-style:normal;font-size:.84rem;color:var(--dim);line-height:1.25}
.upd-acts{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.upd-x{width:32px;height:32px;border-radius:50%;border:1px solid var(--border);background:var(--s2);color:var(--dim);
  font-size:.75rem;line-height:1;cursor:pointer;transition:color .15s,border-color .15s}
.upd-x:hover,.upd-x:focus-visible{color:var(--text);border-color:var(--border2);outline:none}
body.mode-3d #upd-note{box-shadow:0 2px 0 rgba(255,255,255,.06),0 3px 0 #0a0e1a,0 5px 0 #05070f,
  0 22px 34px -14px rgba(0,0,0,.9),0 0 26px color-mix(in srgb,var(--cyan) 18%,transparent),inset 0 1px 0 rgba(255,255,255,.16)}
#set-build-state.upd-ready{color:var(--cyan)}
/* A phone: at the top, where toasts go there too (they sit over the round's controls at the bottom), and in
   two rows — the line over its buttons. */
@media (max-width:700px){
  #upd-note{bottom:auto;top:max(12px,env(safe-area-inset-top));flex-wrap:wrap;justify-content:center;text-align:center;
    border-radius:18px;padding:12px 14px;gap:8px 12px;transform:translate(-50%,-14px)}
  #upd-note.show{transform:translate(-50%,0)}
  .upd-ic{display:none}
  .upd-txt{align-items:center;flex:1 1 100%}
  .upd-line{font-size:.68rem}
  .upd-acts .upd-go{min-height:40px;padding-left:18px;padding-right:18px}
  .upd-x{width:40px;height:40px}
}
/* Reduced motion: no glow pulse, and the line fades where it stands instead of sliding in. */
@media (prefers-reduced-motion:reduce){
  .upd-chip{animation:none}
  #upd-note,#upd-note.show{transform:translate(-50%,0)}
  #upd-note{transition:opacity .2s ease,visibility 0s linear .2s}
  #upd-note.show{transition:opacity .2s ease,visibility 0s}
}
html.reduced-motion .upd-chip{animation:none}
html.reduced-motion #upd-note,html.reduced-motion #upd-note.show{transform:translate(-50%,0)}
html.reduced-motion #upd-note{transition:opacity .2s ease,visibility 0s linear .2s}
html.reduced-motion #upd-note.show{transition:opacity .2s ease,visibility 0s}

/* ── § 103 · v142 · ⚔️ AN INVITE'S NOTE ── #upd-note's twin, with JOIN in place of RELOAD: a toast that takes a click, over the hub and the
   lobby, under every sheet. Its inside is the .upd-* parts above; only the shell is written again. A phone: at the top, in two rows. */
#inv-pop{position:fixed;left:50%;bottom:86px;z-index:1500;display:flex;align-items:center;gap:12px;
  width:max-content;max-width:min(700px,calc(100vw - 32px));box-sizing:border-box;padding:10px 10px 10px 16px;border-radius:30px;
  background:rgba(4,4,14,.93);border:1px solid var(--gold);color:var(--text);
  box-shadow:0 10px 30px color-mix(in srgb,var(--gold) 22%,transparent);
  opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,14px);
  transition:transform .3s ease,opacity .3s ease,visibility 0s linear .3s}
#inv-pop.show{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0);
  transition:transform .3s ease,opacity .3s ease,visibility 0s}
#inv-pop .upd-line{color:var(--gold)}
body.mode-3d #inv-pop{box-shadow:0 2px 0 rgba(255,255,255,.06),0 3px 0 #0a0e1a,0 5px 0 #05070f,
  0 22px 34px -14px rgba(0,0,0,.9),0 0 26px color-mix(in srgb,var(--gold) 18%,transparent),inset 0 1px 0 rgba(255,255,255,.16)}
@media (max-width:700px){
  #inv-pop{bottom:auto;top:max(12px,env(safe-area-inset-top));flex-wrap:wrap;justify-content:center;text-align:center;
    border-radius:18px;padding:12px 14px;gap:8px 12px;transform:translate(-50%,-14px)}
  #inv-pop.show{transform:translate(-50%,0)}
  #inv-pop .upd-ic{display:none}
  #inv-pop .upd-txt{align-items:center;flex:1 1 100%}
}
@media (prefers-reduced-motion:reduce){
  #inv-pop,#inv-pop.show{transform:translate(-50%,0)}
  #inv-pop{transition:opacity .2s ease,visibility 0s linear .2s}
  #inv-pop.show{transition:opacity .2s ease,visibility 0s}
}
html.reduced-motion #inv-pop,html.reduced-motion #inv-pop.show{transform:translate(-50%,0)}
html.reduced-motion #inv-pop{transition:opacity .2s ease,visibility 0s linear .2s}
html.reduced-motion #inv-pop.show{transition:opacity .2s ease,visibility 0s}

/* ── § 75 · v135 · 📮 the owner's door on the hub bar (only the account shop/cfg/owner names sees it) ── */
.hub-right .btn-desk{font-size:15px;line-height:1}
#set-rib-key-gap,#btn-rib-key{margin-top:8px}

/* <<CRC:BEGIN>> */
/* ══════════════════════════════════════════════════════════════
   🏁 CIRCUITS (v163, § 109 in app.js) · 👑 THE REIGN (§ 110) · 🏁 BLUESHIFT
   The circuits play full-screen on the Flight Deck's own surface, as an
   expedition does: while one has the frame (body.crc-on) the deck's HUD
   stands down and #crc-layer sits over the canvas, taking no pointer but
   its own buttons' (the driving is read off the deck's input layer). The
   title card, the line, the bar and the modal are the expeditions' (.xp-…).
   ⚠️ No backdrop-filter: this is over a full-screen WebGL view.
   ══════════════════════════════════════════════════════════════ */
body.crc-on #hub-space > :not(#hs-stage):not(#hs-input):not(#hs-flash):not(#crc-layer){
  opacity:0;visibility:hidden;transition:opacity .3s ease,visibility 0s .3s}
body.crc-on #offline-bar{visibility:hidden}
body.crc-on #hs-input{cursor:default}
#crc-layer{position:absolute;inset:0;z-index:20;pointer-events:none;font-family:var(--fb);color:#eef4ff;overflow:hidden;overflow:clip}
#crc-hud,#crc-pops{position:absolute;inset:0}
#crc-pops{overflow:hidden;overflow:clip}
#crc-black{position:absolute;inset:0;background:#000;opacity:1;pointer-events:none}
#crc-bar[hidden]{display:none}
#crc-layer .xp-card-k{color:rgba(214,238,255,.96);text-shadow:0 1px 3px rgba(0,0,0,.95),0 0 12px rgba(0,0,0,.8)}
#crc-layer .xp-card-t{color:#f4fbff;text-shadow:0 0 28px rgba(120,200,255,.55),0 4px 18px rgba(0,0,0,.85)}
#crc-layer .xp-card-s{color:#e2efff;text-shadow:0 1px 3px rgba(0,0,0,.95),0 0 12px rgba(0,0,0,.8)}
#crc-layer .xp-card{transition:opacity .35s ease,transform .35s ease}
#crc-layer .xp-modal-in{border-color:rgba(130,200,255,.4);background:linear-gradient(160deg,rgba(10,14,24,.97),rgba(5,6,10,.99));
  box-shadow:0 0 70px rgba(90,170,255,.18),inset 0 0 0 1px rgba(255,255,255,.03)}
#crc-layer .xp-m-k{color:rgba(170,215,255,.85)}
#crc-layer .xp-m-t{color:#f1f8ff}
#crc-layer .xp-m-s{color:#d2e2f6}
#crc-layer .xp-m-ctl{color:rgba(190,225,255,.72)}
#crc-layer .xp-modal.xp-padnav .btn:focus,#crc-lobby.xp-padnav .btn:focus,#crc-lobby.xp-padnav .crc-row:focus,#crc-lobby.xp-padnav .crc-cls:focus,#crc-lobby.xp-padnav .crc-howb:focus{outline:2px solid #7fd0ff;outline-offset:3px}
.xp-modal-in.crc-wide{width:min(94vw,560px)}
/* 🎮 HOW TO DRIVE: each control by name, what is pressed for it beside the name, and a line on what it does */
.crc-howb{margin-left:14px;vertical-align:middle;cursor:pointer;padding:5px 12px;border-radius:999px;border:1px solid rgba(127,208,255,.5);
  background:rgba(20,40,70,.62);color:#dff4ff;font-family:var(--fd);font-weight:400;font-size:.58rem;letter-spacing:.1em;text-shadow:none;white-space:nowrap}
.crc-howb:hover{border-color:#7fd0ff;background:rgba(40,90,150,.5)}
.crc-how{max-height:min(60vh,480px);overflow-y:auto;margin:2px 0 14px;text-align:left;scrollbar-width:thin}
.crc-how-r{display:grid;grid-template-columns:minmax(96px,auto) minmax(0,1fr);column-gap:10px;align-items:baseline;padding:6px 2px;border-top:1px solid rgba(140,170,220,.14)}
.crc-how-r:first-child{border-top:0}
.crc-how-r b{font-family:var(--fd);font-size:.64rem;letter-spacing:.1em;color:#8fe3ff}
.crc-how-r span{font-family:var(--fd);font-size:.6rem;letter-spacing:.06em;color:#fff}
.crc-how-r small{grid-column:1 / -1;font-size:.84rem;line-height:1.3;color:#b9c9e0;margin-top:1px}
/* (a dozen rows: two columns of them where there is the width, so the whole card is on the screen without a scroll) */
@media (min-width:900px){
  .xp-modal-in.crc-wide:has(.crc-how){width:min(94vw,900px)}
  .crc-how{display:grid;grid-template-columns:1fr 1fr;column-gap:22px;align-content:start;max-height:min(74vh,560px)}
  .crc-how-r:nth-child(2){border-top:0}
}

/* ── THE PADDOCK: the list down the left, the circuit picked beside it, the class and the way in along the foot ── */
.crc-lobby{position:absolute;left:0;top:0;bottom:0;width:min(100%,860px);display:flex;flex-direction:column;gap:10px;
  padding:16px 16px 14px;pointer-events:auto;background:linear-gradient(90deg,rgba(4,6,12,.94) 0%,rgba(4,6,12,.86) 68%,rgba(4,6,12,0) 100%)}
.crc-lobby[hidden]{display:none}
.crc-lob-t{font-family:var(--fd);font-weight:900;font-size:clamp(1.3rem,3.4vw,2rem);letter-spacing:.2em;color:#f4fbff;
  text-shadow:0 0 22px rgba(120,200,255,.5)}
.crc-lob-s{font-size:.92rem;color:#b9cbe4;margin-top:2px}
.crc-lob-g{display:inline-block;margin-left:8px;padding:1px 9px;border-radius:999px;border:1px solid rgba(255,210,58,.4);color:#ffe9a8;
  font-family:var(--fd);font-size:.62rem;letter-spacing:.1em;white-space:nowrap}
.crc-lob-body{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(210px,300px) minmax(0,1fr);gap:12px;width:min(100%,760px,64vw)}
.crc-lob-list{min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:5px;padding-right:4px;scrollbar-width:thin}
.crc-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto auto;align-items:center;gap:8px;text-align:left;cursor:pointer;
  padding:7px 10px;border-radius:10px;border:1px solid rgba(140,170,220,.18);background:rgba(12,16,28,.78);color:#e6eefc;font-family:var(--fb)}
.crc-row:hover{border-color:color-mix(in srgb,var(--acc,#7df9ff) 60%,transparent)}
.crc-row.on{border-color:var(--acc,#7df9ff);background:color-mix(in srgb,var(--acc,#7df9ff) 14%,rgba(12,16,28,.9));
  box-shadow:0 0 18px -4px var(--acc,#7df9ff)}
.crc-row-i{font-size:1.2rem;text-align:center}
.crc-row-n{font-family:var(--fd);font-size:.7rem;letter-spacing:.08em;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crc-row-n small{display:block;font-family:var(--fb);font-size:.72rem;letter-spacing:.02em;color:#93a6c4;overflow:hidden;text-overflow:ellipsis}
.crc-row-m{font-size:1rem;min-width:1.1em;text-align:center}
.crc-row-t{font-family:var(--fd);font-size:.68rem;color:#cfe2ff;min-width:4.6em;text-align:right}
.crc-lob-info{min-height:0;overflow-y:auto;padding:12px 14px;border-radius:12px;border:1px solid color-mix(in srgb,var(--acc,#7df9ff) 45%,transparent);
  background:rgba(8,11,20,.84);scrollbar-width:thin}
.crc-in-k{font-family:var(--fd);font-size:.6rem;letter-spacing:.28em;color:color-mix(in srgb,var(--acc,#7df9ff) 75%,#fff)}
.crc-in-t{font-family:var(--fd);font-weight:900;font-size:clamp(1.05rem,2.6vw,1.5rem);letter-spacing:.12em;color:#f6fbff;margin:3px 0 4px}
.crc-in-s{font-size:.92rem;line-height:1.35;color:#c5d4ea}
.crc-in-map{display:block;width:100%;height:auto;max-height:190px;margin:8px 0 6px;border-radius:10px;background:radial-gradient(ellipse at 50% 50%,rgba(30,40,66,.5),rgba(6,8,14,.2))}
.crc-in-facts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.crc-in-facts .hs-fact{font-size:.6rem}
.crc-in-note{font-size:.82rem;color:#9fc6ff;margin-bottom:6px}
.crc-ln{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) auto;gap:8px;align-items:baseline;padding:4px 0;border-top:1px solid rgba(140,170,220,.14);font-size:.84rem;color:#b9c9e0}
.crc-ln span:first-child{font-family:var(--fd);font-size:.62rem;letter-spacing:.08em;color:#dfeaff}
.crc-ln b{font-family:var(--fd);font-size:.74rem;color:#fff}
.crc-ln.won span:first-child,.crc-ln.won b{color:#ffe08a}
.crc-ln.you b{color:#8fe3ff}
.crc-ln.rec b{color:#ffd23a}
/* v167 · the stars under a circuit's name, today's circuit, a circuit's three challenges */
.crc-st{font-style:normal;color:#ffd23a;letter-spacing:.06em;margin-right:5px}
.crc-day{font-style:normal}
.crc-dayb{cursor:pointer;background:rgba(40,60,20,.55);border-color:rgba(160,255,120,.5);color:#d6ffb8}
.crc-dayb:hover{border-color:#a0ff78}
.crc-ch{margin-top:8px;border-top:1px solid rgba(140,170,220,.14);padding-top:6px}
.crc-ch-r{display:flex;gap:8px;align-items:baseline;font-family:var(--fd);font-size:.6rem;letter-spacing:.07em;color:#b9c9e0;padding:2px 0}
.crc-ch-r span{color:#7f8aa3;font-size:.8rem}
.crc-ch-r.won{color:#ffe9a8}
.crc-ch-r.won span{color:#ffd23a}
.crc-rs-star{font-family:var(--fd);font-size:.66rem;letter-spacing:.07em;color:#ffe08a;margin-bottom:4px}
.crc-lob-foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px;width:min(100%,760px,64vw)}
.crc-cls-row{display:flex;flex-wrap:wrap;gap:5px;flex:1 1 300px}
.crc-cls{cursor:pointer;padding:6px 9px;border-radius:8px;border:1px solid rgba(140,170,220,.25);background:rgba(12,16,28,.8);color:#b9c9e0;
  font-family:var(--fd);font-size:.56rem;letter-spacing:.08em}
.crc-cls.on{border-color:#7fd0ff;color:#fff;background:rgba(40,90,150,.45);box-shadow:0 0 14px -4px #7fd0ff}
/* v169 · the cups under the circuits; a cup's standings on a card; the school's button until the school is done */
.crc-sub{margin:8px 2px 2px;font-family:var(--fd);font-size:.54rem;letter-spacing:.14em;color:#ffe08a;flex:0 0 auto}
.crc-cup-tb{margin:6px 0 10px;text-align:left}
.crc-cup-r{display:grid;grid-template-columns:22px minmax(0,1fr) 44px 44px;gap:6px;align-items:baseline;padding:3px 6px;border-top:1px solid rgba(140,170,220,.14);font-family:var(--fd);font-size:.66rem;color:#dfeaff}
.crc-cup-r span{color:#93a6c4}
.crc-cup-r b{font-weight:700;letter-spacing:.06em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crc-cup-r i{font-style:normal;color:#8fffc0;text-align:right}
.crc-cup-r em{font-style:normal;color:#fff;text-align:right}
.crc-cup-r.me{background:rgba(120,170,255,.14);border-radius:6px}
.crc-new{border-color:#ffd23a;color:#ffe9a8;animation:crcNew 1.6s ease-in-out infinite}
@keyframes crcNew{50%{box-shadow:0 0 14px -2px #ffd23a}}
@media (prefers-reduced-motion:reduce){.crc-new{animation:none}}
/* v168 · the set-up and the mode: the same buttons, set a little apart from the classes */
.crc-opt{border-style:dashed;color:#dfeaff}
.crc-opt.on{border-color:#ff7a7a;background:rgba(120,30,40,.45);box-shadow:0 0 14px -4px #ff7a7a}
.crc-cls[disabled]{opacity:.4;cursor:default}
.crc-lob-acts{display:flex;gap:8px;flex-wrap:wrap}
.crc-lob-acts .btn{min-width:150px}
@media (max-width:760px){
  .crc-lobby{width:100%;padding:10px 10px 10px;background:linear-gradient(180deg,rgba(4,6,12,.5) 0%,rgba(4,6,12,.9) 26%,rgba(4,6,12,.95) 100%)}
  .crc-lob-body{width:100%;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(0,1.15fr)}
  .crc-lob-foot{width:100%}
  .crc-in-map{max-height:110px}
  .crc-lob-acts{flex:1 1 100%}
  .crc-lob-acts .btn{flex:1 1 0;min-width:0}
}
/* a phone held upright: a gap under the heading, clear to the car on its turntable (lobbyCam reads where it is) */
@media (max-width:760px) and (min-height:640px){
  .crc-lobby{background:linear-gradient(180deg,rgba(4,6,12,.74) 0%,rgba(4,6,12,.1) 10%,rgba(4,6,12,.1) calc(19vh + 46px),rgba(4,6,12,.93) calc(19vh + 86px),rgba(4,6,12,.96) 100%)}
  .crc-lob-head{margin-bottom:19vh}
}
@media (max-height:520px){
  /* a phone on its side: a card's buttons two abreast under the first, so the whole card is on the screen */
  #crc-layer .xp-m-btns{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  #crc-layer .xp-m-btns .btn:first-child{grid-column:1 / -1}
  #crc-layer .xp-m-btns .btn{min-width:0;padding:6px 10px}
  .xp-modal-in.crc-wide{width:min(94vw,640px)}
  #crc-layer .crc-rs-time{font-size:1.5rem;margin-top:0;line-height:1.1}
  #crc-layer .crc-rs-place{margin:0 0 2px}
  #crc-layer .crc-rs-facts{margin:4px 0 5px}
  #crc-layer .crc-rs-facts span{padding:3px 4px}
  #crc-layer .crc-rs-pay{margin-bottom:4px}
  #crc-layer .crc-rs-blue{margin:2px 0 6px;padding:6px 10px;font-size:.84rem}
  #crc-layer .crc-rs-note,#crc-layer .crc-rs-new{margin-bottom:2px}
  .crc-lobby{padding:8px 10px;gap:6px}
  .crc-lob-s,.crc-in-map,.crc-in-s{display:none}
  .crc-lob-body{grid-template-columns:minmax(170px,240px) minmax(0,1fr);grid-template-rows:none}
  .crc-row{padding:4px 8px}
}

/* ── v218 · THE GARAGE: the paddock's second page — the classes, the cars of one, the car in hand, its paint. The
   panel is narrower than the circuits' list and panel, so the car on its turntable has the rest (lobbyCam). ── */
.crc-lobby.crc-garmode .crc-lob-body{display:block;width:min(100%,440px,46vw)}
.crc-lobby.crc-garmode .crc-lob-foot{width:min(100%,440px,46vw)}
.crc-gar{height:100%;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding-right:4px;scrollbar-width:thin}
.crc-gar-tabs{display:flex;gap:5px;flex:0 0 auto}
.crc-gar-tab{flex:1 1 0;cursor:pointer;padding:6px 0;border-radius:8px;border:1px solid color-mix(in srgb,var(--c) 40%,transparent);
  background:rgba(12,16,28,.8);color:var(--c);font-family:var(--fd);font-weight:900;font-size:.8rem}
.crc-gar-tab.on{background:color-mix(in srgb,var(--c) 22%,rgba(12,16,28,.9));border-color:var(--c);color:#fff;box-shadow:0 0 14px -4px var(--c)}
.crc-gar-cars{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:0 0 auto}
.crc-gar-car{cursor:pointer;text-align:left;padding:7px 9px;border-radius:10px;border:1px solid rgba(140,170,220,.18);background:rgba(12,16,28,.78);color:#e6eefc;min-width:0}
.crc-gar-car:hover{border-color:color-mix(in srgb,var(--acc) 60%,transparent)}
.crc-gar-car b{display:block;font-family:var(--fd);font-size:.64rem;letter-spacing:.08em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crc-gar-car small{display:block;font-size:.66rem;color:#93a6c4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crc-gar-car.on{border-color:var(--acc);background:color-mix(in srgb,var(--acc) 16%,rgba(12,16,28,.9));box-shadow:0 0 16px -4px var(--acc)}
.crc-gar-card{padding:12px 14px;border-radius:12px;border:1px solid color-mix(in srgb,var(--acc) 45%,transparent);background:rgba(8,11,20,.84);flex:0 0 auto}
.crc-gar-card .crc-in-k{color:color-mix(in srgb,var(--acc) 75%,#fff)}
.crc-gar-sub{font-family:var(--fd);font-size:.54rem;letter-spacing:.1em;color:#93a6c4;margin-bottom:8px}
.crc-gar-row{display:grid;grid-template-columns:7.4em minmax(0,1fr) auto;gap:8px;align-items:center;padding:3px 0;font-family:var(--fd);font-size:.54rem;letter-spacing:.08em;color:#dfeaff}
.crc-gar-row i{height:6px;border-radius:3px;background:rgba(140,170,220,.16);overflow:hidden}
.crc-gar-row i b{display:block;height:100%;border-radius:3px;background:var(--acc);box-shadow:0 0 8px var(--acc)}
.crc-gar-row em{font-style:normal;color:#fff;font-size:.58rem;text-align:right;white-space:nowrap}
.crc-gar-line{margin-top:8px;font-family:var(--fd);font-size:.56rem;letter-spacing:.1em;color:color-mix(in srgb,var(--acc) 70%,#fff)}
.crc-gar-cls{margin-top:3px;font-size:.78rem;color:#93a6c4}
.crc-gar-paints{display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex:0 0 auto}
.crc-gar-paint{width:26px;height:26px;border-radius:50%;cursor:pointer;padding:0;border:2px solid rgba(255,255,255,.25);background:var(--p)}
.crc-gar-paint.on{border-color:#fff;box-shadow:0 0 0 2px var(--acc),0 0 14px -2px var(--acc)}
.crc-gar-paints span{font-family:var(--fd);font-size:.54rem;letter-spacing:.1em;color:#dfeaff;margin-left:4px}
.crc-gar-hint{font-family:var(--fd);font-size:.5rem;letter-spacing:.12em;color:#7f8aa3}
.crc-carb{border-color:rgba(127,208,255,.6);color:#cfeeff}
#crc-lobby.xp-padnav .crc-gar-tab:focus,#crc-lobby.xp-padnav .crc-gar-car:focus,#crc-lobby.xp-padnav .crc-gar-paint:focus{outline:2px solid #7fd0ff;outline-offset:3px}
@media (max-width:760px){
  .crc-lobby.crc-garmode .crc-lob-body,.crc-lobby.crc-garmode .crc-lob-foot{width:100%}
  .crc-gar-hint{display:none}
}
@media (max-height:520px){
  .crc-lobby.crc-garmode .crc-lob-body,.crc-lobby.crc-garmode .crc-lob-foot{width:min(100%,400px,52vw)}
  .crc-gar-card{padding:8px 10px}
  .crc-gar-card .crc-in-t{font-size:1rem;margin:1px 0 2px}
  .crc-gar-sub{margin-bottom:4px}
  .crc-gar-row{padding:1px 0}
  .crc-gar-cls,.crc-gar-hint{display:none}
  .crc-gar-car{padding:4px 8px}
}

/* ── THE RESULTS ── */
.crc-rs-time{font-family:var(--fd);font-weight:900;font-size:clamp(2rem,7vw,3rem);letter-spacing:.06em;color:#fff;text-shadow:0 0 26px rgba(120,200,255,.5);margin-top:6px}
.crc-rs-place{font-family:var(--fd);font-size:.86rem;letter-spacing:.14em;color:#ffe08a;margin:2px 0 8px}
.crc-rs-new{font-family:var(--fd);font-size:.72rem;letter-spacing:.1em;color:#8fffc0;margin-bottom:6px}
.crc-rs-note{font-size:.9rem;color:#c5d4ea;margin-bottom:5px}
.crc-rs-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(84px,1fr));gap:6px;margin:10px 0 12px}
.crc-rs-facts span{padding:6px 4px;border-radius:8px;background:rgba(120,170,255,.08);border:1px solid rgba(140,170,220,.18);font-family:var(--fd);font-size:.72rem;color:#fff}
.crc-rs-facts small{display:block;font-size:.5rem;letter-spacing:.1em;color:#93a6c4;margin-bottom:2px}
.crc-rs-pay{font-family:var(--fd);font-size:.68rem;letter-spacing:.06em;color:#ffe08a;margin-bottom:8px}
.crc-rs-blue{margin:4px 0 12px;padding:10px 12px;border-radius:10px;font-size:.92rem;color:#fff;
  background:linear-gradient(90deg,rgba(255,42,60,.28),rgba(176,77,255,.28),rgba(57,200,255,.3));border:1px solid rgba(190,170,255,.5)}

/* ── 🏁 CIRCUITS on the leaderboard, and 👑 the reign's chip and line ── */
.lb-row.crc-lb{align-items:center}
.lb-row.crc-lb .lb-name b{display:block;font-family:var(--fd);font-size:.66rem;letter-spacing:.08em;color:color-mix(in srgb,var(--acc,#7df9ff) 70%,#fff)}
.lb-row.crc-lb .lb-name small,.lb-row.crc-lb .lb-score small{display:block;font-size:.72rem;font-weight:400;letter-spacing:0;color:#9db0cc;font-family:var(--fb)}
.lb-row.crc-lb .lb-score{text-align:right}
.crc-lb-note{font-size:.76rem}
.rg-chip{display:inline-block;margin-left:6px;padding:0 7px;border-radius:999px;font-style:normal;font-family:var(--fd);font-size:.56rem;letter-spacing:.06em;
  color:#2a1c00;background:linear-gradient(180deg,#ffe58a,#ffc13a);box-shadow:0 0 10px rgba(255,200,60,.45);white-space:nowrap;vertical-align:middle}
.rg-note{margin:2px 0 8px;padding:6px 10px;border-radius:8px;font-size:.78rem;line-height:1.35;color:#e9dcae;
  background:rgba(255,200,60,.07);border:1px solid rgba(255,200,60,.22)}
.rg-note b{color:#fff3c4;font-weight:600}

/* ── 🏁 BLUESHIFT, worn (html.theme-blueshift): the fourth theme no colour can buy. Its light runs red through
      violet to blue, as its colour does with speed: across the primary buttons, the logo and the player's name,
      and behind every menu as light streaming past (#blue-fx). Not over the sign-in screen or the Flight Deck. ── */
html.theme-blueshift{--blue-run:linear-gradient(90deg,#ff2a3c,#ff3fb4,#b04dff,#4d7cff,#39c8ff,#4d7cff,#b04dff,#ff3fb4,#ff2a3c);
  --ltd-edge:rgba(120,140,255,.55);--ltd-glow:0 0 30px -4px rgba(120,140,255,.45)}
:where(html.theme-blueshift) .btn-primary{background-image:var(--blue-run);background-size:300% 100%;animation:blueRun 7s linear infinite;
  color:#fff;border-color:rgba(200,190,255,.7);text-shadow:0 1px 2px rgba(0,0,0,.55)}
:where(html.theme-blueshift) .btn-primary:hover{box-shadow:0 0 30px rgba(120,140,255,.5)}
html.theme-blueshift .hub-logo-sm,html.theme-blueshift .hub-uname,.lb-blue-n{background-image:var(--blue-run, linear-gradient(90deg,#ff2a3c,#ff3fb4,#b04dff,#4d7cff,#39c8ff,#4d7cff,#b04dff,#ff3fb4,#ff2a3c));
  background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:blueRun 7s linear infinite}
.lb-blue-n{font-weight:700}
.lb-blue-i{margin-right:5px;filter:drop-shadow(0 0 6px rgba(120,140,255,.7))}
.lb-row.lb-blue{box-shadow:inset 0 0 0 1px rgba(120,140,255,.3),0 0 16px rgba(176,77,255,.12)}
html.theme-blueshift .hub-bar{border-color:rgba(120,140,255,.42);box-shadow:0 0 34px -8px rgba(120,140,255,.45)}
html.theme-blueshift #g-title{color:#8fa4ff;text-shadow:-1px 0 rgba(255,63,180,.6),1px 0 rgba(57,200,255,.6)}
html.theme-blueshift body.hub-fly #hub-space{--hs-edge:rgba(120,140,255,.36)}
html.theme-blueshift .shop-card.shop-limited.equipped{box-shadow:0 0 34px rgba(120,140,255,.4)}
@keyframes blueRun{from{background-position:0% 50%}to{background-position:300% 50%}}
#blue-fx{position:fixed;inset:0;z-index:1;pointer-events:none;overflow:hidden;
  background:radial-gradient(ellipse at 50% 50%,rgba(40,30,90,.0) 30%,rgba(60,40,140,.16) 100%)}
#blue-fx i{position:absolute;left:-30%;width:26%;height:2px;border-radius:2px;opacity:0;
  background:linear-gradient(90deg,transparent,#ff3fb4 20%,#b04dff 55%,#39c8ff 90%,transparent);animation:blueStreak 2.6s linear infinite}
#blue-fx i:nth-child(1){top:12%;animation-delay:-.2s}
#blue-fx i:nth-child(2){top:27%;animation-duration:3.4s;animation-delay:-1.6s;width:36%}
#blue-fx i:nth-child(3){top:44%;animation-duration:2.1s;animation-delay:-.9s;height:1px}
#blue-fx i:nth-child(4){top:61%;animation-duration:3.1s;animation-delay:-2.2s;width:30%}
#blue-fx i:nth-child(5){top:76%;animation-duration:2.4s;animation-delay:-1.1s;height:3px;width:20%}
#blue-fx i:nth-child(6){top:90%;animation-duration:3.8s;animation-delay:-3s}
@keyframes blueStreak{0%{transform:translateX(0);opacity:0}12%{opacity:.75}88%{opacity:.75}100%{transform:translateX(560%);opacity:0}}
body.hs-live #blue-fx,body:has(#auth-screen.active) #blue-fx{display:none}
body:has(#game-screen.active) #blue-fx{opacity:.6}
body:has(#game-screen.active) #blue-fx i{display:none}
.blue-swatch{position:relative;flex:0 0 auto;width:56px;height:56px;border-radius:12px;overflow:hidden;
  background:linear-gradient(90deg,#ff2a3c,#ff3fb4,#b04dff,#4d7cff,#39c8ff);box-shadow:0 0 20px rgba(120,140,255,.6)}
.blue-swatch i{position:absolute;inset:0;background:repeating-linear-gradient(100deg,rgba(255,255,255,0) 0 9px,rgba(255,255,255,.5) 9px 10px);
  animation:blueSw 1.4s linear infinite}
@keyframes blueSw{from{transform:translateX(-20px)}to{transform:translateX(0)}}
.shop-swatch.blue-swatch{border:0;margin:0 auto 12px}
@media (prefers-reduced-motion:reduce){
  :where(html.theme-blueshift) .btn-primary,html.theme-blueshift .hub-logo-sm,html.theme-blueshift .hub-uname,.lb-blue-n,.blue-swatch i{animation:none}
  #blue-fx i{display:none}
}
/* <<CRC:END>> */
/* ══════════════════════════════════════════════════════════════════════
   § 111 · v167 — 🔌 THE ARENA'S SOCKETS · the call-out over the board, and the strips under a duel's card
   ══════════════════════════════════════════════════════════════════════ */
#mpx-call{position:fixed;transform:translateX(-50%);z-index:2400;display:grid;gap:6px;justify-items:center;pointer-events:none;width:max-content}
.mpx-call-line{display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 16px;border-radius:12px;background:rgba(5,7,18,.9);
  border:1px solid rgba(0,245,255,.45);color:var(--cyan);font-family:var(--fd);font-size:.68rem;font-weight:900;letter-spacing:.12em;
  text-transform:uppercase;text-align:center;box-shadow:0 8px 24px rgba(0,0,0,.55),0 0 18px rgba(0,245,255,.18);
  animation:mpxIn .22s ease-out both;transition:opacity .3s ease,transform .3s ease}
.mpx-call-line.big{font-size:.9rem;padding:9px 20px}
.mpx-call-line.out{opacity:0;transform:translateY(-6px)}
.mpx-call-line.t-bad{color:var(--pink);border-color:rgba(255,0,144,.5);box-shadow:0 8px 24px rgba(0,0,0,.55),0 0 18px rgba(255,0,144,.2)}
.mpx-call-line.t-warn{color:var(--orange,#ff9f1c);border-color:rgba(255,159,28,.55);box-shadow:0 8px 24px rgba(0,0,0,.55),0 0 18px rgba(255,159,28,.2)}
.mpx-call-line.t-gold{color:var(--gold);border-color:rgba(255,215,0,.55);box-shadow:0 8px 24px rgba(0,0,0,.55),0 0 18px rgba(255,215,0,.22)}
.mpx-call-sub{font-family:var(--fb);font-size:.62rem;font-weight:700;letter-spacing:.04em;text-transform:none;color:var(--text);opacity:.85}
@keyframes mpxIn{from{opacity:0;transform:translateY(8px) scale(.96)}to{opacity:1;transform:none}}
html.reduced-motion .mpx-call-line{animation:none}
/* A strip under a duel's card (the round's story, the match, the rank): the droid strip's frame, so the card reads as one. */
.mpx-strip{margin:10px 0 2px;padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.03);
  font-family:var(--fb);font-size:.78rem;color:var(--text);text-align:left}
.mpx-strip .mpx-k{display:block;font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.16em;text-transform:uppercase;color:var(--cyan);margin-bottom:6px}
@media (max-width:560px){ .mpx-call-line{font-size:.6rem;padding:6px 12px} .mpx-call-line.big{font-size:.74rem} }
/* The slots the features paint into (index.html, v167): nothing shows while a slot is empty. */
.mpx-room-opts{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:10px 0 2px}
.mpx-room-opts:empty,.mpx-room-note:empty{display:none}
.mpx-room-note{margin:8px auto 0;max-width:560px;font-family:var(--fb);font-size:.8rem;line-height:1.45;color:var(--dim);text-align:center}
.mpx-rank-chip[hidden]{display:none}
/* The room's buttons stay on the glass: v167 added rows above them (the options, the notes, a rank badge under each seat, the standby
   offer), and START went from the foot of a 1280×800 window to 155 px under it. The row sits at the foot of the arena's scroller. */
#mp-stage-room .mp-room-btns{position:sticky;bottom:0;z-index:3;padding:22px 0 8px;margin-top:2px;
  background:linear-gradient(180deg,transparent 0,color-mix(in srgb,var(--bg) 95%,#fff) 20px)}
/* HIGH CONTRAST (Settings → COMFORT) lifts the secondary text of every v167 surface, as it does the arcade's own. */
html.cs-hc .mpx-room-note,html.cs-hc .mpx-call-sub,html.cs-hc .mpx-sab-note,html.cs-hc .mpx-story-facts,html.cs-hc .m14-line,
html.cs-hc .ark-next,html.cs-hc .ark-rules,html.cs-hc .ark-rules li,html.cs-hc .ark-tile em,html.cs-hc .ark-bnote,
html.cs-hc .ko-rm,html.cs-hc .ko-ronote,html.cs-hc .ko-next,html.cs-hc .stby-body p,html.cs-hc .stby-sub,
html.cs-hc .couch-note,html.cs-hc .couch-how-n,html.cs-hc .couch-duel-txt em,html.cs-hc .couch-pr-txt,
html.cs-hc .crc-on-hint,html.cs-hc .crc-on-note,html.cs-hc .crc-rs-facts,html.cs-hc .crc-rs-note{color:#eef3f8!important}
/* The knockout card holds two buttons (the arena's other cards hold one): they are spaced as a pair. */
#mpx-ko-card .btn + .btn{margin-top:8px}
/* ══════════════════════════════════════════════════════════════════════
   § 112 · v167 — ⚡ HACKS · the room's switch, the charge bar, the warning and the five things a hack does to a board
   ══════════════════════════════════════════════════════════════════════ */

/* ── The room's chip (#mpx-room-opts) and its notes. The chip is the arena's own .mp-filter pill, lit in gold; a guest sees it
   as a readout (disabled), the host as a switch. The note sits right under the row: the first-view explainer, or why a round
   will run without hacks. ── */
.mpx-sab-chip{color:var(--dim);border-color:var(--border);touch-action:manipulation}
.mpx-sab-chip.on{color:var(--gold);border-color:var(--gold);background:rgba(255,215,0,.1);box-shadow:0 0 16px rgba(255,215,0,.2)}
.mpx-sab-chip:disabled{cursor:default;opacity:.92}
.mpx-sab-chip:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.mpx-sab-note{display:block;margin:6px auto 0;max-width:560px;padding:0 12px;font-family:var(--fb);font-size:.78rem;line-height:1.4;color:var(--dim);text-align:center}
.mpx-sab-note:empty{display:none}
.mpx-sab-note.warn{color:var(--orange)}
.mpx-sab-note b{color:var(--gold);font-weight:700}
/* HIGH CONTRAST (Settings → COMFORT): the dim words of this section are lifted the way the arcade's own secondary text is */
html.cs-hc .mpx-sab-note:not(.warn),html.cs-hc .mpx-sab-chip:not(.on){color:#eef3f8}
@media (pointer:coarse){.mpx-sab-chip{min-height:40px}}

/* ── The charge bar, along the bottom edge of MY half of the versus strip. Absolute: nothing in the strip moves. The "⚡ n" chip
   is the hacks that landed this round. A full bar glows (and breathes, below 1 Hz, unless motion is reduced). ── */
#mp-hud .mpx-sab-hud,.mpx-sab-hud.sab-float{position:absolute;left:0;bottom:0;width:calc(50% - 6px);height:4px;pointer-events:none}
.mpx-sab-hud .sab-track{position:absolute;inset:0;border-radius:3px;background:rgba(255,255,255,.12);overflow:hidden}
.mpx-sab-hud .sab-fill{display:block;height:100%;width:0;border-radius:3px;background:linear-gradient(90deg,var(--gold),var(--orange));transition:width .18s linear}
.mpx-sab-hud .sab-n{position:absolute;left:0;top:calc(100% + 1px);font-family:var(--fd);font-size:.5rem;font-weight:800;letter-spacing:.08em;line-height:1;color:var(--gold);white-space:nowrap;text-shadow:0 1px 2px rgba(0,0,0,.7)}
.mpx-sab-hud.full .sab-fill{box-shadow:0 0 10px var(--gold);animation:sabBreathe 1.5s ease-in-out infinite alternate}
.mpx-sab-hud.full .sab-n::after{content:" · FULL";color:var(--orange)}
@keyframes sabBreathe{from{opacity:.72}to{opacity:1}}
html.reduced-motion .mpx-sab-hud.full .sab-fill{animation:none;opacity:1}
/* with no versus strip to hang from (a knockout's standings stand in for it) the bar floats at the board's top-left */
.mpx-sab-hud.sab-float{position:fixed;z-index:490;bottom:auto;width:min(168px,38vw)}
.mpx-sab-hud.sab-float .sab-n{top:6px}

/* ── What a hack does to a board: a DOM layer over the board's rectangle (never a filter on the GL canvas), the pointer passes
   straight through it, and it sits above the round but below the countdown and every sheet. ── */
.sab-fx{position:fixed;z-index:500;pointer-events:none;overflow:hidden;border-radius:8px}
.sab-static{position:absolute;inset:0;overflow:hidden}
.sab-static::before{content:"";position:absolute;left:0;right:0;top:-40px;bottom:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' shape-rendering='crispEdges'%3E%3Crect width='80' height='22' fill='%23070918' fill-opacity='.84'/%3E%3Cg fill='%23d6ddff' fill-opacity='.42'%3E%3Crect x='55' y='5' width='2' height='1'/%3E%3Crect x='53' y='19' width='1' height='1'/%3E%3Crect x='37' y='16' width='2' height='1'/%3E%3Crect x='31' y='17' width='1' height='1'/%3E%3Crect x='16' y='8' width='3' height='1'/%3E%3Crect x='1' y='11' width='1' height='1'/%3E%3Crect x='52' y='3' width='3' height='1'/%3E%3Crect x='28' y='8' width='3' height='1'/%3E%3Crect x='12' y='18' width='3' height='1'/%3E%3Crect x='10' y='4' width='1' height='1'/%3E%3Crect x='7' y='13' width='1' height='1'/%3E%3Crect x='46' y='5' width='2' height='1'/%3E%3Crect x='73' y='12' width='1' height='1'/%3E%3Crect x='75' y='14' width='1' height='1'/%3E%3Crect x='40' y='9' width='1' height='1'/%3E%3Crect x='14' y='4' width='2' height='1'/%3E%3Crect x='7' y='9' width='1' height='1'/%3E%3Crect x='21' y='11' width='2' height='1'/%3E%3Crect x='44' y='12' width='3' height='1'/%3E%3Crect x='56' y='17' width='1' height='1'/%3E%3Crect x='26' y='18' width='1' height='1'/%3E%3Crect x='47' y='2' width='1' height='1'/%3E%3Crect x='54' y='5' width='3' height='1'/%3E%3Crect x='71' y='7' width='2' height='1'/%3E%3Crect x='38' y='14' width='2' height='1'/%3E%3Crect x='2' y='0' width='3' height='1'/%3E%3Crect x='46' y='6' width='3' height='1'/%3E%3Crect x='10' y='1' width='2' height='1'/%3E%3Crect x='27' y='18' width='2' height='1'/%3E%3Crect x='46' y='7' width='3' height='1'/%3E%3Crect x='74' y='2' width='3' height='1'/%3E%3Crect x='69' y='4' width='2' height='1'/%3E%3Crect x='72' y='14' width='1' height='1'/%3E%3Crect x='26' y='19' width='3' height='1'/%3E%3C/g%3E%3Cg fill='%236f7dff' fill-opacity='.30'%3E%3Crect x='30' y='5' width='1' height='2'/%3E%3Crect x='30' y='18' width='1' height='2'/%3E%3Crect x='51' y='13' width='3' height='2'/%3E%3Crect x='42' y='5' width='1' height='2'/%3E%3Crect x='75' y='9' width='1' height='2'/%3E%3Crect x='35' y='2' width='3' height='2'/%3E%3Crect x='30' y='9' width='1' height='2'/%3E%3Crect x='17' y='18' width='3' height='2'/%3E%3Crect x='41' y='12' width='2' height='2'/%3E%3Crect x='58' y='2' width='1' height='2'/%3E%3Crect x='26' y='19' width='3' height='2'/%3E%3Crect x='17' y='14' width='2' height='2'/%3E%3C/g%3E%3Cg fill='%23000' fill-opacity='.55'%3E%3Crect x='71' y='6' width='3' height='1'/%3E%3Crect x='2' y='8' width='1' height='1'/%3E%3Crect x='28' y='14' width='3' height='1'/%3E%3Crect x='37' y='11' width='3' height='1'/%3E%3Crect x='48' y='9' width='1' height='1'/%3E%3Crect x='47' y='1' width='3' height='1'/%3E%3Crect x='77' y='3' width='1' height='1'/%3E%3Crect x='12' y='11' width='1' height='1'/%3E%3C/g%3E%3Crect y='21' width='80' height='1' fill='%23aab6ff' fill-opacity='.20'/%3E%3C/svg%3E") 0 0/80px 40px repeat;animation:sabScan 1.25s linear infinite}
@keyframes sabScan{from{transform:translateY(0)}to{transform:translateY(40px)}}
html.reduced-motion .sab-static::before{animation:none;transform:none}
.sab-tunnel{position:absolute;inset:0;background:radial-gradient(circle at 50% 50%,transparent 0,transparent var(--r,150px),rgba(3,4,12,.9) calc(var(--r,150px) + var(--soft,24px)),rgba(3,4,12,.97) 100%)}
/* the badge says what is on the board and for how long: the call-out said it once, this stays */
.sab-badge{position:absolute;left:6px;top:6px;display:flex;align-items:center;gap:6px;max-width:calc(100% - 12px);padding:4px 10px 4px 8px;border-radius:999px;background:rgba(5,7,18,.92);border:1px solid var(--pink);
  color:var(--pink);font-family:var(--fd);font-size:.52rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;white-space:nowrap;box-shadow:0 4px 14px rgba(0,0,0,.5)}
.sab-badge .sab-badge-ic{font-size:.8rem;line-height:1}
.sab-badge .sab-badge-s{color:var(--text);font-variant-numeric:tabular-nums;opacity:.85}
html.cs-hc .sab-badge .sab-badge-s{opacity:1}
@media (max-width:560px){.sab-badge{font-size:.46rem;padding:3px 8px 3px 6px}}

/* ── The warning's firewall bar, inside the call-out line: the cyan fill is how much of the 0.35 charge you have made, the thin
   line under it is the two seconds running out. The seconds are written too — a bar that only moves is no use with motion off. ── */
.sab-wall{position:relative;width:min(230px,60vw);height:15px;margin-top:5px;border-radius:8px;background:rgba(255,255,255,.12);overflow:hidden;display:flex;align-items:center;justify-content:center}
.sab-wall-fill{position:absolute;left:0;top:0;bottom:0;width:0;background:var(--cyan);opacity:.55;transition:width .1s linear}
.sab-wall-clock{position:absolute;left:0;bottom:0;height:2px;width:100%;background:var(--orange);transition:width .1s linear}
.sab-wall-t{position:relative;font-family:var(--fd);font-size:.46rem;font-weight:800;letter-spacing:.1em;color:var(--text);text-shadow:0 1px 2px rgba(0,0,0,.8)}

/* A board turned 9° swings a corner down over the pad beneath it: the pad stays on top, so the thumbs still find ◀ and ▶. */
html.sab-tilt #arcade-controls{position:relative;z-index:3}
/* ══════════════════════════════════════════════════════════════════════
   § 113 · v167 — 📈 THE ROUND'S STORY
   The target chip and the last-seconds glow on the versus strip (neither takes a pixel of layout: the chip is absolute under
   the strip, the glow is an outline and a shadow), and the strip under a duel's results card. Palette tokens only, so the
   colour lens repoints every one of them; each state is also written in words.
   ══════════════════════════════════════════════════════════════════════ */
/* --mpx-lo is set by the section: 3px under the strip, or under whatever else hangs there (the match's "G2 · 1–0"). */
.mpx-target{position:absolute;left:50%;top:calc(100% + var(--mpx-lo,3px));transform:translateX(-50%);z-index:9;pointer-events:none;white-space:nowrap;
  padding:3px 11px;border-radius:999px;font-family:var(--fd);font-size:.54rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase;
  color:var(--gold);background:rgba(5,7,18,.94);border:1px solid color-mix(in srgb,var(--gold) 65%,transparent);box-shadow:0 4px 14px rgba(0,0,0,.5)}
.mpx-target.ahead{color:var(--lime);border-color:color-mix(in srgb,var(--lime) 65%,transparent)}
/* The last seconds: a calm glow round the strip. It is still — nothing here flashes, and nothing moves under reduced motion. */
#mp-hud.mpx-final{outline:1px solid color-mix(in srgb,var(--orange) 60%,transparent);outline-offset:4px;border-radius:10px;
  box-shadow:0 0 14px color-mix(in srgb,var(--orange) 28%,transparent)}
#mp-hud.mpx-final .mp-hud-bar{box-shadow:0 0 8px color-mix(in srgb,var(--orange) 55%,transparent)}
.mpx-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* The card's strip: the chart, what it says, and the badges. */
.mpx-story .mpx-story-chart{max-width:440px;margin:2px auto 4px}
.mpx-story svg{display:block;width:100%;height:auto;overflow:visible}
.mpx-story .mpx-ln{fill:none;stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round}
.mpx-story .mpx-ln.foe{stroke-width:1.8;stroke-dasharray:5 3}
.mpx-story .mpx-grid{stroke:rgba(255,255,255,.08);stroke-width:1}
.mpx-story .mpx-base,.mpx-story .mpx-ax line{stroke:rgba(255,255,255,.28);stroke-width:1}
.mpx-story .mpx-ax text,.mpx-story .mpx-top{fill:rgba(255,255,255,.7);font-family:'Orbitron',monospace;font-size:9px;letter-spacing:.03em}
.mpx-story .mpx-dia{fill:var(--gold);stroke:#05070f;stroke-width:1}
.mpx-leg{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 16px;margin:2px 0 6px;font-family:var(--fd);font-size:.54rem;letter-spacing:.1em;
  text-transform:uppercase;color:rgba(255,255,255,.72)}
.mpx-leg span{display:inline-flex;align-items:center;gap:6px;min-width:0}
.mpx-leg i{display:inline-block;flex:none;width:20px;height:0;border-top:2px solid currentColor}
.mpx-leg i.dash{border-top-style:dashed}
.mpx-story-facts{display:flex;flex-wrap:wrap;gap:2px 16px;justify-content:center;font-size:.78rem;color:var(--dim);text-align:center}
.mpx-story-facts b{color:var(--text);font-weight:700}
.mpx-story-pills{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:8px}
.mpx-pill{--pc:var(--cyan);display:inline-flex;align-items:center;gap:4px;padding:4px 11px;border-radius:999px;font-family:var(--fd);font-size:.56rem;font-weight:900;
  letter-spacing:.1em;text-transform:uppercase;color:var(--pc);border:1px solid var(--pc);background:color-mix(in srgb,var(--pc) 10%,transparent)}
.mpx-pill.comeback{--pc:var(--orange)}
.mpx-pill.wire{--pc:var(--lime)}
.mpx-pill.streak{--pc:var(--gold)}
/* A wide card is a grid (headline beside the breakdown, the buttons across the bottom). A strip that no area names would be
   dealt a row of its own UNDER the buttons, a screen down on a laptop — so where the browser can say "a card that has the
   story" (:has), the story takes the space under the breakdown, beside the headline, and every other strip takes the whole row. */
@media (min-width:860px){
  #results-screen .res-card > .mpx-story{grid-column:1 / -1}
  @supports selector(:has(*)){
    #results-screen .res-card:has(> #mpx-story){grid-template-areas:"head bd" "head story" "btns btns" "replay replay"}
    #results-screen .res-card > #mpx-story{grid-area:story;align-self:start;margin-top:12px}
  }
}
@media (max-width:560px){
  .mpx-target{font-size:.5rem;padding:2px 9px}
  .mpx-story-facts{font-size:.74rem}
}
/* HIGH CONTRAST (Settings → COMFORT) lifts the chart's small print as it lifts the arcade's secondary text (§ 111 already covers the facts line and
   the call-out's sub-line): the legend, the seconds axis and the chart's top label, and the lines they stand on. */
html.cs-hc .mpx-leg{color:#eef3f8}
html.cs-hc .mpx-story .mpx-ax text,html.cs-hc .mpx-story .mpx-top{fill:#eef3f8}
html.cs-hc .mpx-story .mpx-base,html.cs-hc .mpx-story .mpx-ax line{stroke:#b8c2d0}
html.cs-hc .mpx-story .mpx-grid{stroke:rgba(255,255,255,.32)}
/* ══════════════════════════════════════════════════════════════════════
   § 114 · v167 — 🔁 REMATCH & MATCHES · the match chip, the room's note, the card's strip, the versus strip's game chip
   Palette variables only (the colour lens repoints them); nothing here moves, so reduced motion has nothing to take away.
   ══════════════════════════════════════════════════════════════════════ */

/* the host's chip in the room's options row (a readout for everyone else) */
.m14-chip{font-size:.52rem;padding:7px 14px;white-space:nowrap}
.m14-chip:disabled{opacity:.55;cursor:default}
.m14-chip.ro{cursor:default}
.m14-chip.ro:hover{color:var(--dim);border-color:var(--border)}
.m14-chip.on.ro:hover{color:var(--cyan);border-color:var(--cyan)}

/* the room's note: the match, the pick, the rematch */
.m14-note{display:grid;gap:8px;justify-items:center}
.m14-line{display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:center;align-items:center;font-family:var(--fb);font-size:.82rem;line-height:1.4;color:var(--text)}
.m14-line .m14-t{font-weight:700;letter-spacing:.03em;text-transform:uppercase;overflow-wrap:anywhere}
.m14-line.match{color:var(--cyan)}
.m14-line.warn{color:var(--orange)}
.m14-line.pick{color:var(--gold)}
.m14-line.wait{color:var(--dim)}
.m14-line.again{color:var(--lime)}
.m14-count{font-family:var(--fd);font-size:.7rem;font-weight:700;color:var(--gold);font-variant-numeric:tabular-nums;min-width:2.4ch;text-align:left}
.m14-ask{white-space:nowrap}

/* the six duels a loser may pick, and "the same" */
.m14-pickgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px;width:100%;max-width:560px;margin:0 auto}
.m14-pickbtn{white-space:normal;line-height:1.25;min-height:40px;font-size:.6rem;padding:8px 8px;text-align:center}
.m14-pickbtn.same{grid-column:1 / -1;border-color:color-mix(in srgb,var(--gold) 55%,transparent)}
.m14-pickbtn:disabled{opacity:.5;cursor:default}

/* the strip under a duel's card (it wears .mpx-strip's frame too) */
.m14-strip{display:grid;gap:8px}
/* the pick is mine to make, on a clock: the frame says so (a colour AND the gold status line, so the colour lens loses nothing) */
.mpx-strip.m14-pickme{border-color:color-mix(in srgb,var(--gold) 60%,transparent)}
/* A wide card is a grid (the headline beside the breakdown, the buttons across the bottom). A strip no area names is dealt half a row
   UNDER the buttons — a screen down on a laptop, and this one carries the loser's pick on a 20-second clock. So where the browser can
   say "a card that has the match" (:has), the match takes a whole row between the headline and the buttons (with § 113's story beside
   the headline when the card has that too: the longer selector outranks § 113's own, whichever stylesheet comes last). */
@media (min-width:860px){
  #results-screen .res-card > .m14-strip{grid-column:1 / -1}
  @supports selector(:has(*)){
    #results-screen .res-card:has(> #mpx-match){grid-template-areas:"head bd" "m14 m14" "btns btns" "replay replay"}
    #results-screen .res-card:has(> #mpx-match):has(> #mpx-story){grid-template-areas:"head bd" "head story" "m14 m14" "btns btns" "replay replay"}
    #results-screen .res-card > #mpx-match{grid-area:m14;margin-top:12px}
  }
}
.m14-score{display:flex;align-items:baseline;justify-content:center;gap:12px;flex-wrap:wrap;font-family:var(--fd);text-transform:uppercase}
.m14-side{font-size:.6rem;letter-spacing:.12em;color:var(--dim);max-width:16ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.m14-side.me{color:var(--cyan)}
.m14-side.foe{color:var(--pink)}
.m14-num{font-size:1.6rem;font-weight:900;line-height:1;color:var(--text);font-variant-numeric:tabular-nums}
.m14-status{font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.1em;line-height:1.5;text-transform:uppercase;text-align:center;color:var(--text);overflow-wrap:anywhere}
.m14-status.win{color:var(--lime)}
.m14-status.loss{color:var(--pink)}
.m14-status.draw{color:var(--gold)}
.m14-games{list-style:none;display:grid;gap:3px;margin:0 auto;padding:0;font-size:.74rem;width:100%;max-width:560px}
.m14-games li{display:grid;grid-template-columns:2.4em minmax(0,1fr) auto;gap:8px;align-items:baseline;padding:3px 8px;border-radius:8px;background:rgba(255,255,255,.03)}
.m14-gn{font-family:var(--fd);font-size:.52rem;letter-spacing:.1em;color:var(--dim)}
.m14-gm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.m14-gw{font-family:var(--fd);font-size:.52rem;font-weight:700;letter-spacing:.1em;max-width:14ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.m14-games li.win .m14-gw{color:var(--lime)}
.m14-games li.loss .m14-gw{color:var(--pink)}
.m14-games li.draw .m14-gw{color:var(--gold)}
.m14-bonus{text-align:center;font-family:var(--fd);font-size:.62rem;font-weight:700;letter-spacing:.1em;color:var(--gold)}
.m14-bonus.none{color:var(--dim);font-family:var(--fb);font-weight:600;letter-spacing:0;text-transform:none;font-size:.72rem}
.m14-foot{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:center}
.m14-hint{font-size:.7rem;color:var(--dim)}

/* a rival asked and I have not: a pill on the card's rematch button */
.m14-pill{display:inline-block;margin-left:8px;padding:2px 8px;border-radius:12px;border:1px solid currentColor;font-family:var(--fd);font-size:.5rem;font-weight:700;
  letter-spacing:.1em;line-height:1.4;vertical-align:middle;max-width:13ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* "G2 · 1–0" on the versus strip: absolute, so it costs the round no height */
#mp-hud .m14-g{position:absolute;left:50%;top:calc(100% - 3px);transform:translateX(-50%);z-index:3;padding:1px 9px;border-radius:10px;
  border:1px solid rgba(0,245,255,.35);background:rgba(5,7,18,.86);font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.12em;
  color:var(--cyan);font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none}

/* a seat that has asked for the rematch */
.m14-seat-again{margin-top:6px;font-family:var(--fd);font-size:.46rem;font-weight:700;letter-spacing:.14em;color:var(--lime)}

/* HIGH CONTRAST (Settings → COMFORT) lifts the dim text of the arcade's own surfaces; § 111's list covers the room's note lines, these are the
   strip's: the game numbers, the hint under the buttons and the "no bonus here" line. */
html.cs-hc .m14-gn,html.cs-hc .m14-hint,html.cs-hc .m14-bonus.none{color:#eef3f8!important}

@media (max-width:560px){
  .m14-pickgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .m14-line{font-size:.78rem}
  .m14-num{font-size:1.4rem}
}
@media (pointer:coarse){
  .m14-pickbtn,.m14-back,.m14-ask{min-height:44px}
  .m14-chip{min-height:40px}
}
/* ══════════════════════════════════════════════════════════════════════
   § 115 · v167 — 🏅 ARENA RANK · the chip, the badge on a seat, the strip under a card, the rank card and the board
   ══════════════════════════════════════════════════════════════════════ */
/* One variable carries a division's colour, set by its class, so the chip, the seat, the strip, the card and the board agree.
   They are the arcade's own variables, which the colourblind-safe palette re-points and the colour lens corrects — and the
   division's NAME and ICON always travel with its colour, so nothing here is told by hue alone. */
.ark-d-bronze{--dc:var(--bronze)}
.ark-d-silver{--dc:var(--silver)}
.ark-d-gold{--dc:var(--gold)}
.ark-d-platinum{--dc:var(--cyan)}
.ark-d-diamond{--dc:var(--blue)}
.ark-d-master{--dc:var(--purple)}
.ark-d-legend{--dc:var(--pink)}

/* the chip in the arena's top bar (a button; index.html makes it, core hides it until there is a rank to show) */
.mpx-rank-chip{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:30px;padding:5px 14px;border-radius:20px;
  border:1px solid var(--dc,var(--cyan));background:color-mix(in srgb,var(--dc,var(--cyan)) 10%,var(--s2));color:var(--dc,var(--cyan));
  font-family:var(--fd);font-size:.55rem;font-weight:700;letter-spacing:.14em;white-space:nowrap;cursor:pointer;
  transition:background .15s ease,box-shadow .15s ease}
.mpx-rank-chip:hover{background:color-mix(in srgb,var(--dc,var(--cyan)) 20%,var(--s2));box-shadow:0 0 14px color-mix(in srgb,var(--dc,var(--cyan)) 35%,transparent)}
.mpx-rank-chip:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.mpx-rank-chip.ark-place{border-style:dashed}
@media (pointer:coarse){.mpx-rank-chip{min-height:38px;padding:8px 18px}}
@media (max-width:700px){.mpx-rank-chip{align-self:center}}

/* a seat in the room: the division and the rating under the seat's tag */
.ark-seat{display:inline-block;margin-top:7px;padding:2px 9px;border-radius:99px;border:1px solid color-mix(in srgb,var(--dc,var(--dim)) 55%,transparent);
  font-family:var(--fd);font-size:.44rem;font-weight:700;letter-spacing:.1em;line-height:1.5;color:var(--dc,var(--dim));overflow-wrap:anywhere}
.ark-seat.ark-place{border-style:dashed}
.ark-seat.ark-bot{opacity:.85}

/* the results card: a row's change, and the strip when a division changed */
.ark-up{color:var(--lime)}
.ark-down{color:var(--red)}
.ark-flat{color:var(--dim)}
.ark-strip{display:grid;gap:3px;border-left:3px solid var(--dc,var(--cyan));background:linear-gradient(90deg,color-mix(in srgb,var(--dc,var(--cyan)) 14%,transparent),transparent)}
.ark-strip-t{font-family:var(--fd);font-size:.8rem;font-weight:900;letter-spacing:.08em;color:var(--dc,var(--cyan))}
.ark-strip-s{font-family:var(--fd);font-size:.52rem;letter-spacing:.1em;color:var(--dim)}
/* a wide card is a grid of named areas: a strip no area names would sit in one column of a row of its own — it takes the whole row */
@media (min-width:860px){ #results-screen .res-card > .ark-strip{grid-column:1 / -1} }

/* the rank card */
.ark-tint .fb-modal{max-width:480px;border-color:rgba(255,215,0,.42);box-shadow:0 0 70px rgba(255,215,0,.12),inset 0 0 0 1px rgba(255,255,255,.03)}
.ark-tint .fb-modal::before{background:linear-gradient(90deg,transparent,var(--gold),transparent);box-shadow:0 0 12px var(--gold)}
.ark-tint .fb-title{background:linear-gradient(90deg,var(--gold),var(--orange));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.ark-tint .fb-head{margin-bottom:18px}
.ark-hero{display:flex;align-items:center;justify-content:center;gap:14px;margin:0 0 12px}
.ark-hero-ic{font-size:2.6rem;line-height:1}
.ark-hero-t{display:grid;gap:3px;text-align:left}
.ark-hero-t b{font-family:var(--fd);font-size:1.25rem;font-weight:900;letter-spacing:.1em;color:var(--dc,var(--text))}
.ark-hero-t span{font-family:var(--fd);font-size:.9rem;letter-spacing:.08em;color:var(--text)}
.ark-bar{height:8px;margin:0 0 8px;border-radius:99px;overflow:hidden;background:var(--s2);border:1px solid var(--border)}
.ark-bar i{display:block;height:100%;border-radius:99px;background:var(--dc,var(--cyan));box-shadow:0 0 10px var(--dc,var(--cyan));transition:width .4s ease}
.ark-pips{margin-bottom:8px;text-align:center;font-family:var(--fd);font-size:.9rem;letter-spacing:.3em;color:var(--dc,var(--cyan))}
.ark-next{margin-bottom:14px;text-align:center;font-family:var(--fd);font-size:.52rem;letter-spacing:.14em;line-height:1.6;color:var(--dim)}
.ark-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
.ark-tile{display:grid;gap:4px;padding:10px 6px;border-radius:10px;border:1px solid var(--border);background:var(--s1);text-align:center}
.ark-tile b{font-family:var(--fd);font-size:.8rem;letter-spacing:.04em;color:var(--text)}
.ark-tile em{font-style:normal;font-family:var(--fd);font-size:.46rem;letter-spacing:.1em;line-height:1.4;color:var(--dim)}
.ark-reward{padding:9px 12px;border-radius:10px;border:1px dashed rgba(255,215,0,.4);background:rgba(255,215,0,.05);
  font-family:var(--fd);font-size:.5rem;letter-spacing:.08em;line-height:1.7;color:var(--dim);text-align:center}
.ark-reward b{color:var(--gold)}
.ark-sec{margin:16px 0 8px;font-family:var(--fd);font-size:.52rem;font-weight:700;letter-spacing:.2em;color:var(--cyan)}
.ark-ladder{display:grid;gap:5px}
.ark-lad{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:9px;border:1px solid var(--border);background:var(--s1);
  font-family:var(--fd);font-size:.56rem;letter-spacing:.08em}
.ark-lad-ic{width:1.5rem;text-align:center;font-size:1rem}
.ark-lad b{flex:1;color:var(--dc,var(--text))}
.ark-lad-r{color:var(--dim)}
.ark-lad-cr{min-width:3.6rem;text-align:right;color:var(--gold)}
.ark-lad em{font-style:normal;color:var(--dc,var(--text))}
.ark-lad.on{border-color:var(--dc,var(--cyan));background:color-mix(in srgb,var(--dc,var(--cyan)) 13%,transparent);box-shadow:0 0 14px color-mix(in srgb,var(--dc,var(--cyan)) 22%,transparent)}
.ark-rules{list-style:none;display:grid;gap:9px;font-size:.8rem;line-height:1.45;color:var(--dim)}
.ark-rules b{color:var(--text);font-weight:700}
@media (max-width:420px){
  .ark-tint .fb-modal{padding:22px 14px 20px}
  .ark-lad{gap:7px;padding:7px 8px;font-size:.5rem}
  .ark-lad-cr{min-width:3rem}
  .ark-hero-t b{font-size:1.05rem}
}
html.reduced-motion .ark-bar i,html.reduced-motion .mpx-rank-chip{transition:none}

/* the board's 🏅 ARENA tab: the arcade's own rows (.lb-row), a rank column that is a number, and the division in the score slot */
.ark-bnote{margin:-6px 0 12px;text-align:center;font-family:var(--fd);font-size:.44rem;letter-spacing:.1em;line-height:1.6;color:var(--dim)}
.ark-lb .lb-score{display:flex;align-items:center;gap:7px;white-space:nowrap;color:var(--text)}
.ark-lb.r1 .lb-score,.ark-lb.r2 .lb-score,.ark-lb.r3 .lb-score{color:var(--text)}            /* the podium tints the row, not the figures: each carries its own colour */
.ark-lbs b{font-size:.8rem;letter-spacing:.03em;color:var(--text)}
.ark-lbs small{font-size:.5rem;letter-spacing:.06em;color:var(--dim)}
.ark-badge{color:var(--dc,var(--dim));font-size:.55rem;letter-spacing:.08em}
.ark-badge.ark-place{font-style:italic}
.ark-gap{margin:0 0 7px;text-align:center;letter-spacing:.5em;color:var(--dimmer)}
@media (max-width:420px){ .ark-lbs small{display:none} .ark-lbs{gap:5px} }
/* The board's tabs are one row of a column 300px wide, and six of them already ran out of it (the last was cut off at the window's
   edge); with 🏅 ARENA seven would put it out of reach. They wrap, as they already do on a narrow phone (the rule above 420px is the
   phone's own, and is left alone). */
@media (min-width:421px){ #lb-tabs{flex-wrap:wrap} .lb-tab{flex:1 1 auto} }

/* a player's card: their division and their month, one line under the tiles */
.ark-pc{display:grid;gap:3px;margin:0 0 4px;padding:9px 12px;border-radius:10px;border:1px solid color-mix(in srgb,var(--dc,var(--cyan)) 55%,transparent);
  background:color-mix(in srgb,var(--dc,var(--cyan)) 9%,transparent);text-align:left}
.ark-pc b{font-family:var(--fd);font-size:.8rem;letter-spacing:.08em;color:var(--dc,var(--text))}
.ark-pc em{font-style:normal;font-family:var(--fd);font-size:.48rem;letter-spacing:.1em;color:var(--dim)}
.ark-pc.ark-place{border-style:dashed}

/* ── COMFORT → HIGH CONTRAST (the review's finding: none of the v167 surfaces lifted their dim text) ──
   The arcade lifts the 55 % white of its secondary text class by class under html.cs-hc; these are this section's: what a season pays, the
   droid rule, the ladder's ranges, the strip's second line, the board's note, a player card's second line. (§ 111's stylesheet may lift some of
   the same: it is the same colour, so the two agree.) A division's colour is never dim, so the seat, the chip and the badges stay as they are. */
html.cs-hc .ark-next,html.cs-hc .ark-tile em,html.cs-hc .ark-reward,html.cs-hc .ark-rules,html.cs-hc .ark-rules li,html.cs-hc .ark-lad-r,
html.cs-hc .ark-strip-s,html.cs-hc .ark-bnote,html.cs-hc .ark-pc em,html.cs-hc .ark-flat{color:#eef3f8!important}
/* ══════════════════════════════════════════════════════════════════════
   § 116 · v167 — 👑 KNOCKOUT · the lobby, the sheet between rounds, the standings over the board
   Colours are the arcade's variables only (the colour-lens palettes recolour them, tints included, through color-mix): a state is
   never told by hue alone — every one carries a glyph and a word as well (✔ SAFE · ⚠ DANGER · ◐ ON THE LINE · ✖ DEREZZED · ✂ CUT LINE).
   ══════════════════════════════════════════════════════════════════════ */
/* the arena's stability dial gives way to the knockout's own row while its stage is up */
.ko-hide{display:none !important}
.ko-room{max-width:760px}
.ko-view[hidden]{display:none}
.ko-head-btns{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.ko-opts{display:flex;flex-direction:column;gap:8px;margin:0 0 16px}
.ko-orow{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ko-lbl{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.16em;color:var(--dim);min-width:96px}
.ko-seg[disabled]{opacity:.6;cursor:default}
.ko-seg.on[disabled]{opacity:1}
.ko-ronote{font-size:.68rem;color:var(--dim)}
.ko-seats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}
.ko-seats .mp-seat{padding:12px 8px;min-height:112px}
.ko-seats .mp-seat-avatar{font-size:1.6rem;margin-bottom:6px}
.ko-seats .mp-seat-name{font-size:.54rem}
.ko-seats .mp-seat-tag{line-height:1.5}
.ko-auto{text-align:center;font-family:var(--fd);font-size:.66rem;font-weight:900;letter-spacing:.14em;color:var(--gold);margin:-6px 0 14px}
.ko-auto[hidden]{display:none}
.ko-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* a record that does not add up, or a result that was not booked: said in words (a state is never hue alone — the ⚠ and the sentence carry it) */
.ko-warn{margin:0 0 14px;padding:9px 12px;border:1px solid var(--orange);border-radius:10px;background:color-mix(in srgb,var(--orange) 9%,transparent);color:var(--orange);font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.1em;line-height:1.55;text-align:center}
.ko-warn[hidden]{display:none}

/* the round view: a headline, the mission, a verdict for me, then the table */
.ko-rh{font-family:var(--fd);font-size:.82rem;font-weight:900;letter-spacing:.16em;color:var(--gold);text-align:center;margin:2px 0 6px}
.ko-rm{font-family:var(--fd);font-size:.6rem;font-weight:700;letter-spacing:.14em;color:var(--dim);text-align:center;margin-bottom:12px}
.ko-you{margin:0 auto 12px;padding:7px 16px;border-radius:20px;width:max-content;max-width:100%;font-family:var(--fd);font-size:.6rem;font-weight:900;letter-spacing:.14em;border:1px solid;text-align:center}
.ko-you.in{color:var(--lime);border-color:var(--lime);background:color-mix(in srgb,var(--lime) 8%,transparent)}
.ko-you.out{color:var(--pink);border-color:var(--pink);background:color-mix(in srgb,var(--pink) 8%,transparent)}
.ko-table,.ko-pop,.ko-mini{list-style:none;margin:0;padding:0}
.ko-table{display:flex;flex-direction:column;gap:4px;margin-bottom:14px}
li.ko-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:7px 10px;border:1px solid var(--border);border-radius:8px;background:var(--s2);font-size:.78rem}
li.ko-row.me{border-color:var(--cyan);background:color-mix(in srgb,var(--cyan) 9%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--cyan) 25%,transparent)}
li.ko-row.bot .ko-nm{font-style:normal}
li.ko-row.gone{opacity:.55}
li.ko-row.gone .ko-nm{text-decoration:line-through}
li.ko-row.below{border-color:color-mix(in srgb,var(--orange) 45%,transparent)}
li.ko-row.cut{opacity:.78;border-color:color-mix(in srgb,var(--pink) 40%,transparent)}
li.ko-row.through{border-color:color-mix(in srgb,var(--lime) 35%,transparent)}
li.ko-row.me.cut,li.ko-row.me.below{border-color:var(--pink)}
li.ko-row.crown{border-color:var(--gold);background:color-mix(in srgb,var(--gold) 8%,transparent)}
.ko-n{font-family:var(--fd);font-weight:900;font-size:.7rem;color:var(--dim);text-align:center}
.ko-nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;min-width:0}
.ko-sc{font-family:var(--fd);font-weight:900;font-size:.72rem;font-variant-numeric:tabular-nums;color:var(--text);text-align:right}
.ko-tg{font-family:var(--fd);font-size:.5rem;font-weight:900;letter-spacing:.1em;white-space:nowrap}
.ko-ok{color:var(--lime)}
.ko-x{color:var(--pink)}
li.ko-cutline{display:flex;align-items:center;gap:8px;padding:2px 0;border:0;background:none}
li.ko-cutline::before,li.ko-cutline::after{content:"";flex:1;height:2px;border-radius:2px;background:var(--red)}
li.ko-cutline span{font-family:var(--fd);font-size:.46rem;font-weight:900;letter-spacing:.16em;color:var(--red);white-space:nowrap}
/* the next mission and its clock */
.ko-next{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;padding:10px 12px;margin-bottom:14px;border:1px dashed var(--border2);border-radius:10px}
.ko-nk{font-family:var(--fd);font-size:.5rem;font-weight:700;letter-spacing:.16em;color:var(--dim)}
.ko-nr{font-family:var(--fd);font-size:.8rem;font-weight:900;letter-spacing:.06em;color:var(--cyan);min-width:12ch;text-align:center}
.ko-nr.lock{color:var(--gold);animation:koLock .5s ease-out}
.ko-nc{font-family:var(--fd);font-size:.62rem;font-weight:900;letter-spacing:.14em;color:var(--lime)}
@keyframes koLock{from{transform:scale(1.18);opacity:.4}to{transform:none;opacity:1}}
html.reduced-motion .ko-nr.lock{animation:none}

/* the standings stand in for the versus strip: that strip is hidden (display none — the hacks, § 112, then float their charge bar at the
   board's corner) and a gap of its exact box (#ko-hud-gap) keeps its room, so the board does not move; the standings strip sits in that
   room, and the table is a panel beside the board on a wide screen or opens from the strip on a small one */
#mp-hud.ko-under > *{visibility:hidden}
/* (below every menu, the pause sheet and the confirm sheet — 2000 and up — and above the board and the 3-2-1 — 999) */
.ko-hud{position:fixed;z-index:1990;pointer-events:none;font-family:var(--fd)}
.ko-strip{pointer-events:auto;display:flex;align-items:center;gap:10px;width:100%;height:var(--ko-h,34px);padding:0 12px;border-radius:10px;
  background:rgba(5,7,18,.94);border:1px solid color-mix(in srgb,var(--cyan) 40%,transparent);color:var(--text);cursor:pointer;text-align:left;overflow:hidden;font-family:var(--fd)}
.ko-hud.danger .ko-strip{border-color:var(--orange)}
.ko-s-pos{font-size:.84rem;font-weight:900;color:var(--cyan);white-space:nowrap}
.ko-s-pos small{font-size:.54rem;font-weight:700;color:var(--dim)}
.ko-s-me{font-size:.86rem;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap}
.ko-s-near{flex:1;min-width:0;font-size:.6rem;font-weight:700;letter-spacing:.06em;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ko-s-st{font-size:.54rem;font-weight:900;letter-spacing:.12em;padding:2px 8px;border-radius:12px;border:1px solid;white-space:nowrap}
.ko-s-st.safe{color:var(--lime);border-color:color-mix(in srgb,var(--lime) 50%,transparent)}
.ko-s-st.danger{color:var(--orange);border-color:color-mix(in srgb,var(--orange) 65%,transparent)}
.ko-s-st.line{color:var(--gold);border-color:color-mix(in srgb,var(--gold) 55%,transparent)}
.ko-pop{display:none;position:absolute;left:0;right:0;top:calc(var(--ko-h,34px) + 6px);max-height:min(62vh,420px);overflow:auto;padding:6px;border-radius:10px;
  background:rgba(5,7,18,.96);border:1px solid var(--border2);pointer-events:auto}
.ko-hud.open .ko-pop{display:flex;flex-direction:column;gap:3px}
.ko-pop li.ko-row{grid-template-columns:24px minmax(0,1fr) auto;padding:4px 8px;font-size:.68rem;background:transparent}
.ko-pop li.ko-row.me{background:color-mix(in srgb,var(--cyan) 12%,transparent)}
@media (min-width:1100px){
  .ko-pop,.ko-hud.open .ko-pop{display:flex;flex-direction:column;gap:3px;position:fixed;left:auto;right:18px;top:110px;width:240px;max-height:none;pointer-events:none}
}
/* a strip under the results card: the whole show */
.ko-mini{display:grid;gap:3px}
.ko-mini li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:8px;align-items:center;font-size:.74rem;padding:2px 4px;border-radius:6px}
.ko-mini li.me{background:color-mix(in srgb,var(--cyan) 10%,transparent)}
.ko-mini b{font-family:var(--fd);font-size:.62rem;color:var(--dim);text-align:center}
.ko-mini span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.ko-mini em{font-style:normal;font-family:var(--fd);font-size:.6rem;font-weight:900;color:var(--gold)}
@media (max-width:640px){
  .ko-seats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ko-lbl{min-width:100%}
  .ko-strip{gap:7px;padding:0 9px}
  li.ko-row{grid-template-columns:26px minmax(0,1fr) auto auto;padding:6px 8px}
}
/* ══════════════════════════════════════════════════════════════════════
   § 117 · v167 — 📡 STANDBY · the offer in the room, the chip, the card, the banner, the button on a results card
   ══════════════════════════════════════════════════════════════════════ */

/* THE OFFER — an element of its own under the room's note. Kept small: the room's card is already tall, and START is under it. */
.stby-offer{display:grid;gap:3px;justify-items:center;margin:8px auto 0;max-width:560px;text-align:center}
.stby-offer[hidden]{display:none}
.stby-offer .btn{white-space:normal;line-height:1.3}
.stby-sub{font-family:var(--fb);font-size:.7rem;line-height:1.35;color:var(--dim);max-width:84ch}

/* THE CHIP — fixed, small, on every screen but a round */
#stby-chip{position:fixed;left:max(10px,env(safe-area-inset-left));bottom:max(10px,env(safe-area-inset-bottom));z-index:1400;display:flex;align-items:stretch;
  max-width:calc(100vw - 20px);border-radius:999px;overflow:hidden;border:1px solid color-mix(in srgb,var(--cyan) 55%,transparent);
  background:rgba(5,7,18,.94);box-shadow:0 6px 22px rgba(0,0,0,.5),0 0 16px color-mix(in srgb,var(--cyan) 14%,transparent);font-family:var(--fd)}
#stby-chip[hidden]{display:none}
#stby-chip button{appearance:none;background:none;border:0;margin:0;font:inherit;cursor:pointer;color:inherit}
.stby-chip-main{display:flex;align-items:center;gap:6px;min-width:0;min-height:38px;padding:6px 6px 6px 14px;color:var(--cyan);font-size:.58rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.stby-chip-main:hover{background:color-mix(in srgb,var(--cyan) 10%,transparent)}
.stby-chip-ic{flex:0 0 auto;font-size:.8rem;line-height:1}
.stby-chip-t{flex:0 0 auto;white-space:nowrap}
.stby-chip-d{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-weight:700;letter-spacing:.06em}
.stby-chip-c{flex:0 0 auto;white-space:nowrap;color:var(--text);font-weight:900;letter-spacing:.1em}
.stby-chip-x{flex:0 0 auto;width:40px;min-height:38px;border-left:1px solid color-mix(in srgb,var(--cyan) 30%,transparent) !important;color:var(--dim);font-size:.82rem}
.stby-chip-x:hover{color:var(--pink);background:color-mix(in srgb,var(--pink) 10%,transparent)}
.stby-chip-main:focus-visible,.stby-chip-x:focus-visible{outline:2px solid var(--cyan);outline-offset:-3px}
/* On the 3D Flight Deck the bottom-left is the minimap and the controls line (and a phone's thumb): the chip hangs under the deck's
   "where you are" line instead, in the middle at the top (its `top` is set by the script, from that line's own place). */
#stby-chip.stby-deck{left:50%;bottom:auto;top:100px;transform:translateX(-50%)}
/* 📸 The studio's clean frame (§ 83) puts the deck's whole HUD away for a picture: the chip goes with it. */
body.stu-clean #stby-chip{opacity:0;pointer-events:none}

/* THE CARD — the arcade's own sheet (.fb-overlay / .fb-modal), above its other sheets: a person is sitting in a seat */
.fb-overlay.stby-tint{z-index:2310}
.stby-modal{max-width:430px;border-color:color-mix(in srgb,var(--gold) 55%,transparent);box-shadow:0 0 70px color-mix(in srgb,var(--gold) 16%,transparent),inset 0 0 0 1px rgba(255,255,255,.03)}
.stby-modal::before{background:linear-gradient(90deg,transparent,var(--gold),transparent);box-shadow:0 0 12px var(--gold)}
.stby-tint .fb-head{margin-bottom:14px}
.stby-tint .fb-title{background:linear-gradient(90deg,var(--gold),var(--cyan));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;overflow-wrap:anywhere;line-height:1.35}
.stby-body{display:grid;gap:10px;text-align:center}
.stby-body p{margin:0;font-size:.9rem;line-height:1.55;color:var(--dim)}
.stby-body p b{color:var(--text)}
.stby-duel{font-family:var(--fd);font-size:.68rem;font-weight:900;letter-spacing:.12em;color:var(--cyan);text-transform:uppercase;overflow-wrap:anywhere}
.stby-clock{height:6px;margin-top:16px;border-radius:99px;background:rgba(255,255,255,.1);overflow:hidden}
.stby-clock i{display:block;height:100%;width:100%;border-radius:99px;background:var(--gold)}
.stby-left{margin-top:7px;font-family:var(--fd);font-size:.56rem;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);text-align:center}
.stby-btns{margin-top:14px}
.stby-btns .btn:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
/* .btn says `transition: all`, and `visibility` is one of the things it covers: a button inside a sheet that has just been shown is
   still "hidden" to the focus for the first ~200 ms of every showing but the first, and the focus cannot be put on it (the keyboard's
   Enter and the pad's A act on the FOCUSED button). Every property but that one. */
.stby-tint .btn{transition:transform .2s ease,box-shadow .2s ease,background .2s ease,border-color .2s ease,color .2s ease,opacity .2s ease}

/* THE BANNER — a round is on: slim, under the header and its time bar, never over the controls. It takes no room of its own. */
#stby-banner{position:fixed;left:50%;transform:translateX(-50%);top:56px;z-index:2450;display:flex;align-items:center;gap:8px;
  width:max-content;max-width:min(640px,calc(100vw - 16px));padding:3px 4px 3px 12px;border-radius:12px;background:rgba(5,7,18,.95);
  border:1px solid color-mix(in srgb,var(--gold) 60%,transparent);box-shadow:0 6px 20px rgba(0,0,0,.55),0 0 14px color-mix(in srgb,var(--gold) 16%,transparent);
  font-family:var(--fd);color:var(--gold)}
#stby-banner[hidden]{display:none}
.stby-b-t{min-width:0;font-size:.56rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;line-height:1.35;overflow-wrap:anywhere}
.stby-b-s{flex:0 0 auto;font-size:.56rem;font-weight:900;letter-spacing:.08em;color:var(--dim)}
#stby-banner .btn{flex:0 0 auto;min-height:28px;padding:3px 10px;font-size:.56rem}
.stby-b-x{flex:0 0 auto;appearance:none;width:28px;height:28px;border-radius:50%;border:1px solid var(--border);background:var(--s2);color:var(--dim);font-size:.7rem;cursor:pointer}
.stby-b-x:hover,.stby-b-x:focus-visible{color:var(--text);border-color:var(--border2);outline:none}

/* THE BUTTON ON A MISSION'S RESULTS CARD — the first thing on the card's buttons */
.stby-res{display:grid;gap:8px;margin:0 0 12px;padding:10px 12px;border-radius:12px;text-align:center;
  border:1px solid color-mix(in srgb,var(--gold) 55%,transparent);background:color-mix(in srgb,var(--gold) 8%,transparent)}
.stby-res-t{font-family:var(--fd);font-size:.62rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);overflow-wrap:anywhere}
.stby-res .btn{width:100%;white-space:normal}

@media (max-width:560px){
  .stby-b-long{display:none}
  #stby-chip{bottom:max(8px,env(safe-area-inset-bottom));left:max(8px,env(safe-area-inset-left))}
  .stby-chip-main{padding-left:12px;font-size:.54rem}
  #stby-banner{gap:6px;padding:4px 4px 4px 10px}
  .stby-b-t{font-size:.5rem}
  #stby-banner .btn{padding:4px 8px;font-size:.5rem}
  .stby-modal{padding:24px 18px 20px}
}
/* COMFORT → HIGH CONTRAST lifts the arcade's dim text to near-white (style.css does it class by class): so does it here. */
html.cs-hc .stby-body p,html.cs-hc .stby-sub,html.cs-hc .stby-left,html.cs-hc .stby-b-s,html.cs-hc .stby-chip-x{color:#eef3f8}
/* Nothing here moves to say what it says; a bar that shrinks is a width the script sets once a second. */
html.reduced-motion #stby-chip,html.reduced-motion #stby-banner,html.reduced-motion .stby-modal{transition:none;animation:none}
/* ══════════════════════════════════════════════════════════════════════
   § 118 · v167 — 🛋️ COUCH DUEL · the set-up sheet, the result sheet, the two Frenzy pads, and what a couch hides
   ══════════════════════════════════════════════════════════════════════
   Colour is never the only word: a player is a name, a side (P1 left, P2 right) AND a colour. The colours come from the
   players' own cards (hex, validated in the script) or the palette variables, so the COLOUR LENS palettes re-point them. */

/* What a couch round does not have: emotes (there is nobody on the grid to hear them), and the full-board "your core is down" veil — the other
   player is still playing under it. The slim call-out over the board says who fell instead. */
body.couch-on #mp-emo-btn,body.couch-on #mp-emo-pop{display:none!important}
body.couch-on #mp-overlay{display:none!important}

/* ── The sheet: the party sheet's frame, in a couch's colours ── */
.couch-tint .fb-modal{max-width:600px;border-color:rgba(0,245,255,.42);box-shadow:0 0 70px rgba(0,245,255,.13),inset 0 0 0 1px rgba(255,255,255,.03)}
.couch-tint .fb-modal::before{background:linear-gradient(90deg,transparent,var(--cyan),var(--pink),transparent);box-shadow:0 0 12px var(--cyan)}
.couch-tint .fb-title{background:linear-gradient(90deg,var(--cyan),var(--pink));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.couch-modal .fb-title:focus,.couch-modal .fb-title:focus-visible{outline:none}   /* the modal manager puts focus on the heading; it is a label, not a control */
.couch-body{display:flex;flex-direction:column;gap:12px;margin-top:6px}
.couch-sec{font-family:var(--fd);font-size:.58rem;font-weight:700;letter-spacing:.16em;color:var(--dimmer);margin-top:4px}

/* the duels */
.couch-duels{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.couch-duel{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:12px 8px;border-radius:12px;cursor:pointer;
  background:var(--s2);border:1px solid var(--border);color:var(--text);font-family:var(--fb);transition:border-color .15s,box-shadow .15s,background .15s}
.couch-duel:hover{border-color:var(--border2)}
.couch-duel.on{border-color:var(--cyan);background:rgba(0,245,255,.08);box-shadow:0 0 16px -6px var(--cyan)}
.couch-duel:focus-visible,.couch-bo:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.couch-duel-ico{font-size:1.9rem;line-height:1}
.couch-duel-txt{display:flex;flex-direction:column;gap:3px;min-width:0}
.couch-duel-txt b{font-family:var(--fd);font-size:.6rem;letter-spacing:.1em;font-weight:900}
.couch-duel-txt em{font-style:normal;font-size:.7rem;line-height:1.3;color:var(--dim)}
.couch-duel.on .couch-duel-txt b::after{content:' ✓';color:var(--cyan)}

/* the players */
.couch-players{display:flex;flex-direction:column;gap:8px}
.couch-player{display:flex;align-items:center;gap:9px}
.couch-dot{width:12px;height:12px;border-radius:50%;background:var(--pc);box-shadow:0 0 10px var(--pc);flex-shrink:0}
.couch-pn{font-family:var(--fd);font-size:.52rem;font-weight:900;letter-spacing:.12em;color:var(--dim);min-width:6.6em;flex-shrink:0}
.couch-name{flex:1;min-width:0;min-height:44px;padding:9px 12px!important}

/* the match length */
.couch-bos{display:flex;gap:8px;flex-wrap:wrap}
.couch-bo{flex:1 1 7em;min-height:44px;padding:10px 12px;border-radius:10px;cursor:pointer;background:var(--s2);border:1px solid var(--border);color:var(--text);
  font-family:var(--fd);font-size:.58rem;font-weight:900;letter-spacing:.1em;transition:border-color .15s,background .15s}
.couch-bo:hover{border-color:var(--border2)}
.couch-bo.on{border-color:var(--gold);background:rgba(255,215,0,.09);color:var(--gold)}

/* how to play: the two control sets side by side */
.couch-how{background:var(--s2);border:1px solid var(--border);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.couch-how-h{font-family:var(--fd);font-size:.56rem;font-weight:900;letter-spacing:.14em;color:var(--cyan)}
.couch-how-g{font-size:.82rem;line-height:1.45;color:var(--text)}
.couch-how-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.couch-how-c{border-left:3px solid var(--pc);padding-left:10px;min-width:0}
.couch-how-c b{display:block;font-family:var(--fd);font-size:.52rem;letter-spacing:.12em;color:var(--pc);margin-bottom:4px}
.couch-how-c ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:3px;font-size:.78rem;line-height:1.35;color:var(--text)}
.couch-how-c li span{display:inline-block;width:1.7em}
.couch-how-n{font-size:.7rem;line-height:1.5;color:var(--dim)}
.couch-note{font-size:.76rem;line-height:1.5;color:var(--dim);text-align:center}
/* On a short screen — the owner's laptop is 853 × 533 CSS pixels, a phone's sheet is taller than the glass — the set-up sheet scrolls, and the one button that matters must not be the last thing in it: START stays at the foot of the sheet. */
#couch-body #couch-start{position:sticky;bottom:0;z-index:4;box-shadow:0 0 0 9px #070a17,0 -6px 16px 9px #070a17}

/* the verdict, and a match's board */
.couch-verdict{text-align:center;padding:14px 8px 8px;border-radius:14px;border:1px solid var(--pc);background:rgba(255,255,255,.03);box-shadow:0 0 22px -10px var(--pc)}
.couch-v-h{font-family:var(--fd);font-size:1.05rem;font-weight:900;letter-spacing:.08em;line-height:1.3;color:var(--pc);overflow-wrap:anywhere}
.couch-v-s{margin-top:6px;font-family:var(--fd);font-size:.8rem;font-weight:700;letter-spacing:.08em;color:var(--text)}
.couch-verdict.draw .couch-v-h{color:var(--gold)}
.couch-board{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px}
.couch-b-vs{font-family:var(--fd);font-size:.5rem;letter-spacing:.14em;color:var(--dimmer);text-align:center}
.couch-b-p{display:flex;align-items:center;gap:8px;min-width:0;border-bottom:3px solid var(--pc);padding:4px 2px}
.couch-b-p.r{justify-content:flex-end;text-align:right}
.couch-b-n{font-family:var(--fd);font-size:.62rem;font-weight:900;letter-spacing:.08em;color:var(--text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.couch-b-p b{font-family:var(--fd);font-size:1.5rem;font-weight:900;color:var(--pc);line-height:1}
.couch-pips{font-size:.8rem;letter-spacing:.1em;color:var(--pc);white-space:nowrap}
.couch-games{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.couch-games li{display:grid;grid-template-columns:2.6em 1fr auto;gap:8px;align-items:baseline;padding:6px 10px;border-radius:8px;background:var(--s2);border:1px solid var(--border);font-size:.8rem}
.couch-g-n{font-family:var(--fd);font-size:.55rem;font-weight:900;letter-spacing:.1em;color:var(--dim)}
.couch-g-w{font-weight:700;color:var(--text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.couch-g-s{font-family:var(--fd);font-size:.62rem;letter-spacing:.06em;color:var(--dim);white-space:nowrap}
.couch-btns{display:flex;flex-wrap:wrap;gap:8px}
.couch-btns .btn{min-height:44px}
.couch-btns .btn-primary{flex:1 1 100%}
.couch-btns .btn-secondary{flex:1 1 8em}
.couch-btns .btn[disabled]{opacity:.55;cursor:wait}

/* ── The party sheet's row ── */
.couch-party-row{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:12px 14px;border-radius:12px;cursor:pointer;
  background:rgba(0,245,255,.06);border:1px solid rgba(0,245,255,.4);color:var(--text);font-family:var(--fb);transition:border-color .15s,box-shadow .15s}
.couch-party-row:hover{border-color:var(--cyan);box-shadow:0 0 16px -6px var(--cyan)}
.couch-party-row:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.couch-pr-ico{font-size:1.7rem;line-height:1;flex-shrink:0}
.couch-pr-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.couch-pr-txt b{font-family:var(--fd);font-size:.64rem;letter-spacing:.12em;font-weight:900;color:var(--cyan)}
.couch-pr-txt em{font-style:normal;font-size:.76rem;line-height:1.35;color:var(--dim)}
.couch-pr-go{font-family:var(--fd);font-size:.52rem;font-weight:900;letter-spacing:.12em;color:var(--cyan);white-space:nowrap}

/* ── FRENZY on a couch: two pads, two counts, side by side ── */
.couch-frenzy{display:flex;align-items:flex-end;justify-content:center;gap:clamp(10px,4vw,48px);width:100%;max-width:560px;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.couch-fz{flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
.couch-fz-name{font-family:var(--fd);font-size:.6rem;font-weight:900;letter-spacing:.14em;color:var(--pc);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.couch-fz-n{font-family:var(--fd);font-size:clamp(2.4rem,11vw,4.6rem);font-weight:900;line-height:1;color:var(--pc);font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;min-width:2.4ch;text-align:center;text-shadow:0 0 18px color-mix(in srgb,var(--pc) 55%,transparent)}
.couch-fz-key{font-family:var(--fd);font-size:.62rem;font-weight:900;letter-spacing:.12em;color:var(--dim);padding:3px 9px;border:1px solid var(--border2);border-radius:6px}
.couch-fz-pad{--cb-hi:color-mix(in srgb,var(--pc) 35%,#fff);--cb-mid:var(--pc);--cb-lo:color-mix(in srgb,var(--pc) 28%,#000);--cb-glow:color-mix(in srgb,var(--pc) 55%,transparent);
  width:min(150px,36vw,calc(var(--g-avail-h,320px) - 150px));aspect-ratio:1;height:auto;min-width:84px;border-radius:50%;border:9px solid transparent;font-size:2.6rem;cursor:pointer;touch-action:none;
  background:
    radial-gradient(circle at 34% 27%,rgba(255,255,255,.95) 0 3%,rgba(255,255,255,.6) 8%,rgba(255,255,255,0) 24%) padding-box,
    radial-gradient(ellipse 70% 38% at 50% 100%,rgba(255,255,255,.3),rgba(255,255,255,0) 70%) padding-box,
    radial-gradient(circle at 46% 40%,var(--cb-hi) 0%,var(--cb-mid) 34%,var(--cb-lo) 88%,#07142c 100%) padding-box,
    conic-gradient(from 215deg,#4b5563,#e6ebf2 11%,#6c7787 24%,#cfd6e0 38%,#4b5563 52%,#e6ebf2 66%,#6c7787 80%,#aeb8c6 92%,#4b5563) border-box;
  box-shadow:0 0 0 2px #0b0f18,0 0 0 4px rgba(255,255,255,.08),0 14px 22px -6px rgba(0,0,0,.75),0 0 40px var(--cb-glow),inset 0 -10px 18px rgba(0,10,30,.5),inset 0 6px 10px rgba(255,255,255,.28);
  text-shadow:0 3px 4px rgba(0,0,0,.35);transition:transform .05s ease-out,box-shadow .05s ease-out}
.couch-fz-pad:active{transform:translateY(3px) scale(.97);box-shadow:0 0 0 2px #0b0f18,0 0 0 4px rgba(255,255,255,.06),0 5px 9px -4px rgba(0,0,0,.8),0 0 28px var(--cb-glow),inset 0 -6px 14px rgba(0,10,30,.55),inset 0 10px 18px rgba(0,0,0,.25)}
.couch-fz-pad:focus-visible{outline:3px solid var(--gold);outline-offset:4px}
.couch-fz.p1 .couch-fz-n,.couch-fz.p1 .couch-fz-name{text-align:center}

@media (max-width:560px){
  .couch-duels{grid-template-columns:1fr}
  .couch-duel{flex-direction:row;text-align:left;padding:10px 12px}
  .couch-duel-ico{font-size:1.6rem}
  .couch-how-cols{grid-template-columns:1fr}
  .couch-pn{min-width:5.6em}
  .couch-v-h{font-size:.92rem}
  .couch-b-n{font-size:.54rem}
  /* a match's board on a narrow screen: each name on a line of its own (a long one, or a large TEXT SIZE, would otherwise be cut to a letter) */
  .couch-b-p{flex-wrap:wrap;gap:2px 8px}
  .couch-b-n{flex:1 1 100%}
  .couch-b-p.r .couch-b-n{order:-1;text-align:right}
  .couch-pr-txt em{font-size:.72rem}
}
@media (max-height:500px) and (orientation:landscape){
  .couch-fz-key{display:none}
  .couch-fz-n{font-size:2rem}
  .couch-fz-pad{width:min(96px,28vh);border-width:6px;font-size:1.8rem}
  .couch-frenzy{align-items:center}
}
html.reduced-motion .couch-duel,html.reduced-motion .couch-bo,html.reduced-motion .couch-party-row,html.reduced-motion .couch-fz-pad{transition:none}
/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════
   § 119 · v167 — 🌐 CIRCUITS ONLINE · the paddock's door, the room, the results, the menu that does not pause
   In CIRCUITS' own look (the .xp-modal card, the paddock's chips and rows); nothing here moves on its own, so
   reduced motion has nothing to take away. A phone: one column, the seats a row each, the buttons full width.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* the paddock's button (a third beside GO and the way out), and the same button saying why it cannot be pressed */
.crc-lob-acts .crc-on-btn{border-color:rgba(127,208,255,.55);color:#dff4ff}
.crc-lob-acts .crc-on-btn:hover{border-color:#7fd0ff}
.crc-lob-acts .crc-on-btn.crc-on-off{opacity:.62;border-style:dashed}
/* a phone held upright has no room for three buttons across (the online door's label ran 20 px over its button, the way out's 11): the two stock buttons keep
   their halves of the row and the online door has the row under them */
@media (max-width:520px){
  .crc-lob-acts .crc-on-btn{order:3;flex:1 1 100%}
}

/* the cards: the front door, the room, the results — one card wide enough for eight seats, scrolling if the screen is short */
.xp-modal-in.crc-on-card{width:min(94vw,560px);max-height:calc(100% - 16px);overflow-y:auto;scrollbar-width:thin}
.crc-on{text-align:center}
.crc-on-msg{min-height:1.3em;margin:8px 0 2px;font-family:var(--fd);font-size:.62rem;letter-spacing:.1em;color:#ffe08a}
.crc-on-tally{margin-top:6px;font-family:var(--fd);font-size:.58rem;letter-spacing:.12em;color:#8fe3ff}
.crc-on-hint{margin-top:8px}
.crc-on-join{display:flex;gap:8px;align-items:stretch}
.crc-on-join input{flex:1 1 0;min-width:0;text-align:center;text-transform:uppercase;letter-spacing:.34em;font-family:var(--fd);font-weight:700;font-size:1rem;color:#fff;
  background:rgba(12,16,28,.9);border:1px solid rgba(140,170,220,.38);border-radius:8px;padding:8px 6px}
.crc-on-join input:focus{outline:2px solid #7fd0ff;outline-offset:2px}
.crc-on-join .btn{flex:1 1 0;min-width:0}
.crc-on-join input:disabled,.crc-on [data-k]:disabled{opacity:.5}

/* the room: its code, its circuit, its options, its seats */
.crc-on-code b{letter-spacing:.34em;color:#ffe08a;margin-left:.2em}
.crc-on-share{margin:-4px 0 8px}
.crc-on-course{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 10px;margin:4px 0 8px;padding:8px 10px;border-radius:10px;
  border:1px solid color-mix(in srgb,var(--acc,#7df9ff) 45%,transparent);background:rgba(8,11,20,.84);text-align:left}
.crc-on-course .ic{font-size:1.3rem}
.crc-on-course b{font-family:var(--fd);font-size:.8rem;letter-spacing:.1em;color:#f6fbff}
.crc-on-course small{flex:1 1 100%;font-family:var(--fd);font-size:.52rem;letter-spacing:.1em;color:#93a6c4;text-align:center}
.crc-on-st{cursor:pointer;min-width:34px;padding:5px 9px;border-radius:8px;border:1px solid rgba(140,170,220,.3);background:rgba(12,16,28,.85);color:#dfeaff;font-size:.8rem;line-height:1}
.crc-on-st:hover:not(:disabled){border-color:#7fd0ff}
.crc-on-st:disabled{opacity:.3;cursor:default}
.crc-on-opts{display:flex;flex-direction:column;gap:5px;margin:4px 0 6px}
.crc-on-opt{display:flex;align-items:center;gap:8px;text-align:left;padding:4px 0;border-top:1px solid rgba(140,170,220,.14)}
.crc-on-opt span{flex:0 0 6.6em;font-family:var(--fd);font-size:.54rem;letter-spacing:.12em;color:#93a6c4}
.crc-on-opt b{flex:1 1 auto;min-width:0;font-family:var(--fd);font-size:.64rem;letter-spacing:.08em;color:#fff}
.crc-on-note{margin:4px 0 10px;font-size:.8rem;line-height:1.35;color:#9fc6ff;text-align:left}
.crc-on-seats{display:flex;flex-direction:column;gap:4px;margin:6px 0}
.crc-on-seat{display:grid;grid-template-columns:14px minmax(0,1fr) auto auto auto;gap:8px;align-items:center;padding:6px 10px;border-radius:9px;
  border:1px solid rgba(140,170,220,.18);background:rgba(12,16,28,.78);text-align:left}
.crc-on-seat i{width:12px;height:12px;border-radius:50%;background:rgba(140,170,220,.22);box-shadow:0 0 8px -1px currentColor}
.crc-on-seat .n{font-family:var(--fd);font-size:.7rem;letter-spacing:.08em;color:#f1f8ff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crc-on-seat small{font-family:var(--fd);font-size:.5rem;letter-spacing:.1em;color:#93a6c4;white-space:nowrap}
.crc-on-seat em{font-style:normal;font-family:var(--fd);font-size:.52rem;letter-spacing:.08em;color:#ffb0a8;white-space:nowrap}
.crc-on-seat em.ok{color:#8fffc0}
.crc-on-seat.empty{opacity:.55;border-style:dashed}
.crc-on-seat.empty .n{color:#93a6c4}
.crc-on-seat.me{border-color:#7fd0ff;background:rgba(40,90,150,.3)}
.crc-on-x{cursor:pointer;width:26px;height:26px;padding:0;border-radius:50%;border:1px solid rgba(255,122,122,.5);background:rgba(120,30,40,.4);color:#ffd0d0;font-size:.7rem;line-height:1}
.crc-on-x:hover{border-color:#ff7a7a}
.crc-on-dr{margin:6px 0 2px;font-family:var(--fd);font-size:.54rem;letter-spacing:.1em;color:#93a6c4}
.crc-on-auto{min-height:1.3em;margin:8px 0 10px;font-family:var(--fd);font-size:.62rem;letter-spacing:.12em;color:#ffe08a}
.crc-on-why{font-family:var(--fd);font-size:.54rem;letter-spacing:.1em;color:#93a6c4;margin:-2px 0 2px}

/* the results: the room's order, a row a car */
.crc-on-rt{margin:6px 0 8px;text-align:left}
.crc-on-rr{display:grid;grid-template-columns:22px 12px minmax(0,1fr) auto 78px 54px;gap:6px;align-items:center;padding:5px 8px;border-top:1px solid rgba(140,170,220,.14);
  font-family:var(--fd);font-size:.62rem;color:#dfeaff}
.crc-on-rr .p{color:#93a6c4;text-align:right}
.crc-on-rr i{width:10px;height:10px;border-radius:50%}
.crc-on-rr b{font-weight:700;letter-spacing:.06em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crc-on-rr small{font-size:.46rem;letter-spacing:.1em;color:#93a6c4;white-space:nowrap}
.crc-on-rr em{font-style:normal;color:#fff;text-align:right}
.crc-on-rr u{text-decoration:none;color:#8fe3ff;text-align:right;font-size:.54rem}
.crc-on-rr.me{background:rgba(120,170,255,.16);border-radius:7px}
.crc-on-rr.me b{color:#ffd23a}
.crc-on-rr.dn em{color:#ffb0a8}

/* the menu in a race between people: a card at the road's side, the race running behind it (no darkening, no pause) */
#crc-modal.crc-on-free{background:none;pointer-events:none;justify-content:flex-end;padding-right:14px}
#crc-modal.crc-on-free .xp-modal-in{pointer-events:auto;width:min(86vw,300px);padding:16px 16px 14px}
#crc-modal.crc-on-free .xp-m-t{font-size:1.1rem;margin:4px 0 6px}
#crc-modal.crc-on-free .xp-m-s{font-size:.86rem;margin-bottom:10px}

@media (max-width:520px){
  .xp-modal-in.crc-on-card{padding:16px 12px 12px}
  .crc-on-opt span{flex-basis:5.2em}
  .crc-on-rr{grid-template-columns:18px 10px minmax(0,1fr) 70px 46px}
  .crc-on-rr small{display:none}
  .crc-on-seat{gap:6px;padding:5px 8px}
  .crc-on-seat small{display:none}
}

/* The lobby's way in and out stay on the glass at every height: the card scrolls, its buttons do not — START (or READY) and LEAVE side by side along the foot, the line that says
   what the start waits for above them. (At 960×540 and every height from there to ~730 px the START was below the fold of a card with no compact layout: the owner's laptop in a
   window is 853×450.) Higher than the base's own `#crc-layer .xp-m-btns` rule for a short screen, which would stack them again. */
#crc-layer .crc-on-lobby .xp-m-btns{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:8px;position:sticky;bottom:0;z-index:2;margin:0 -2px;padding:14px 2px 2px;
  background:linear-gradient(180deg,rgba(6,8,14,0),rgba(6,8,14,.97) 30%)}
#crc-layer .crc-on-lobby .xp-m-btns .btn{min-width:0}
#crc-layer .crc-on-lobby .xp-m-btns .btn:first-child{grid-column:auto}
#crc-layer .crc-on-lobby .xp-m-btns .crc-on-why{grid-column:1 / -1;order:-1;margin:0}
/* ONE MAKE OFF is a warning (the cars differ by up to a fifth in top speed): it is on the screen at every height, a line or two. */
.crc-on-note.off{color:#ffd9a0;border-left:3px solid #ffb347;padding-left:8px}

/* a short screen (anything from a laptop in a window to a phone on its side): the card tightens, the footnotes go */
@media (max-height:740px){
  .crc-on-hint{display:none}
  .crc-on-share{margin:-6px 0 4px}
  .crc-on-course{margin:2px 0 4px;padding:6px 10px}
  .crc-on-opt{padding:2px 0}
  .crc-on-note{margin:2px 0 6px;font-size:.74rem;line-height:1.3}
  .crc-on-seats{gap:3px;margin:4px 0}
  .crc-on-seat{padding:4px 10px}
  .crc-on-auto{margin:4px 0 6px}
}
@media (max-height:520px){
  /* a phone on its side: ONE MAKE's nicety, the droids' line and the seats' empties go (the warning does not), so the card is mostly the drivers */
  .crc-on-note:not(.off),.crc-on-hint,.crc-on-dr{display:none}
  .crc-on-note.off{font-size:.66rem;margin:0 0 4px}
  .crc-on-seat.empty{display:none}
  .crc-on-seats{gap:3px}
  .crc-on-seat{padding:3px 8px}
  .crc-on-opt span{flex-basis:5em}
}

/* HIGH CONTRAST (Settings → COMFORT): the dim text of these cards is lifted with the rest of the arcade's */
html.cs-hc .crc-on-msg,html.cs-hc .crc-on-tally,html.cs-hc .crc-on-course small,html.cs-hc .crc-on-opt span,html.cs-hc .crc-on-note,html.cs-hc .crc-on-seat small,
html.cs-hc .crc-on-seat.empty .n,html.cs-hc .crc-on-dr,html.cs-hc .crc-on-why,html.cs-hc .crc-on-rr .p,html.cs-hc .crc-on-rr small{color:#eef3f8}
html.cs-hc .crc-on-seat.empty{opacity:.8}
