/* Gran Pearlismo — menus. Direction: FESTIVAL PRO (open-world racing festival, broadcast-grade).

   Rules (see research/UI-AI-TELLS.md for what we are avoiding):
   - The 3D world is the background, full-bleed. UI never hides it behind panels; legibility comes from a single
     soft shade at the bottom/left of the frame.
   - Everything you can choose is a TILE: a square-cornered rectangle with an image or a flat fill, its name set
     bottom-right on photographs (in a white frame), centred under an icon on plates. Focus = pink outside white + lift.
   - One signature colour, Pearl Pink, means "selected / go / you". White carries all text. Cyan only means
     "live/online", gold money, time, level and section labels, green/red only gain/loss.
   - Type: one superfamily, Sofia Sans (since 19 Nov 2026; Archivo stays for the logo and the brand signs only).
     Titles, labels and buttons in Sofia Sans Condensed at zero tracking; big figures, HUD numbers and mosaic titles in
     Sofia Sans Extra Condensed (FH5's tall condensed figures, medium weight, light italic speed digits); reading text
     in Sofia Sans at normal width, sentence case. Heavy 800 only for the largest titles.
   - Frame (19 Nov 2026, research/UI-REFERENCE.md): status bar, then a row of section tab plates, content, prompts
     bottom-left; the same on every screen. Section heads are gold label plates; focus is pink outside white.
   - Motion: short, fast and precise (expo-out, 250–450 ms). Tiles fly in from the right in a column stagger,
     the race wipe is a pink diagonal with the logo. */

:root {
  --pink: #ff1f6d; --pink-2: #ff4f8f; --pink-d: #c4004c;
  --white: #ffffff; --w2: rgba(255, 255, 255, .78); --w3: rgba(255, 255, 255, .5); --w4: rgba(255, 255, 255, .22); --w5: rgba(255, 255, 255, .1);
  --ink: #0b0c10; --tile: rgba(14, 15, 21, .84); --tile-2: rgba(28, 30, 40, .9); --tile-3: #23252f;
  --cyan: #1ad1ff; --gold: #ffc61a; --gain: #2ee07e; --loss: #ff3b3b;
  --r-common: #a3a8b5; --r-rare: #3d9bff; --r-epic: #b25cff; --r-legendary: #ffb21a;
  --disp: 'Sofia Sans Condensed', 'Arial Narrow', sans-serif;
  --body: 'Sofia Sans', system-ui, sans-serif;
  --tight: 'Sofia Sans Extra Condensed', 'Sofia Sans Condensed', 'Arial Narrow', sans-serif;
  --logo: 'Archivo', 'Arial Black', sans-serif;
  --x: cubic-bezier(.16, 1, .3, 1); --x-in: cubic-bezier(.7, 0, .84, 0); --snap: cubic-bezier(.5, 0, .1, 1);
  --gutter: clamp(16px, calc(3vw / var(--z)), 56px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); }
body { color: var(--white); font: 500 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
::selection { background: var(--pink); color: var(--white); }
#ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#ui > * { pointer-events: auto; }
/* every scrolling panel gets the thin bar, never the browser's grey one with arrows */
/* scrollbars are the ::-webkit-scrollbar bars at the end of the file (a standard thin bar keeps its arrow buttons on Windows) */
body.in-race #ui .shell { display: none; }

/* ---------- type ---------- */
.h1, .h2, .h3, .hero-name, .tn, .ttl, .place-big, .lvl-num, .itm-name, .code, .countdown, .verdict, .mi-t, .stp .t2 { font-family: var(--disp); font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: 0; }
.h1 { margin: 0; font-size: clamp(46px, calc(5vw / var(--z)), 86px); line-height: .9; }
.h2 { margin: 0; font-size: clamp(30px, calc(3vw / var(--z)), 48px); line-height: .95; }
.h3 { margin: 0; font-size: 20px; line-height: 1.05; font-weight: 700; }
/* a section title: a quiet label (no slash in front: the pink is kept for what is selected) */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 700 condensed 15px/1 var(--disp); text-transform: uppercase; letter-spacing: .02em; color: var(--white); }
.eyebrow::before { content: none; }
.eyebrow { color: var(--w2); }
.eyebrow.plain::before { display: none; }
.label { font: 600 13px/1.2 var(--body); color: var(--w3); }
.muted { color: var(--w3); }
.num { font-family: var(--disp); font-weight: 700; font-variant-numeric: tabular-nums; }
.mono { font: 600 14px/1 var(--body); font-variant-numeric: tabular-nums; }
.fine { margin: 0; font: 500 14px/1.5 var(--body); color: var(--w2); }
.fine b { color: var(--white); }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px; font: 700 condensed 13.5px/1 var(--disp); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; color: var(--white); background: var(--tile-2); border-radius: 3px; transition: background .15s, color .15s, transform .2s var(--x), box-shadow .15s; }
.btn:hover { background: #343747; box-shadow: inset 0 0 0 2px var(--white); }
.btn:active { transform: scale(.97); }
.btn.primary, .btn.go2 { background: var(--pink); }
.btn.primary:hover, .btn.go2:hover { background: var(--pink-2); box-shadow: inset 0 0 0 2px var(--white); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--w4); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--white); }
.btn.danger { background: var(--loss); }
.btn.small { height: 36px; padding: 0 14px; font-size: 11.5px; }
.btn.big { height: 60px; padding: 0 32px; font-size: 16px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.btn .ic { width: 20px; height: 20px; }
.btn kbd, kbd.key, .tabsnav button.key { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; font: 700 12px/1 var(--body); font-style: normal; color: var(--ink); background: var(--white); border-radius: 12px; }
.ic { width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: middle; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--white); border-radius: 3px; transition: background .15s; }
.iconbtn:hover { background: var(--w5); }

/* ---------- shell ---------- */
.shell { position: absolute; inset: 0; }
/* one soft shade over the 3D world, heavier where the content sits */
.scrim { position: absolute; inset: 0; pointer-events: none; transition: background .6s; background: linear-gradient(90deg, rgba(8, 9, 12, .78) 0%, rgba(8, 9, 12, .35) 45%, rgba(8, 9, 12, 0) 70%), linear-gradient(0deg, rgba(8, 9, 12, .75) 0%, rgba(8, 9, 12, 0) 30%), linear-gradient(180deg, rgba(8, 9, 12, .65) 0%, rgba(8, 9, 12, 0) 18%); }
.shell[data-side="right"] .scrim { background: linear-gradient(270deg, rgba(8, 9, 12, .8) 0%, rgba(8, 9, 12, .35) 45%, rgba(8, 9, 12, 0) 70%), linear-gradient(0deg, rgba(8, 9, 12, .75) 0%, rgba(8, 9, 12, 0) 30%), linear-gradient(180deg, rgba(8, 9, 12, .65) 0%, rgba(8, 9, 12, 0) 18%); }
.shell[data-side="full"] .scrim { background: linear-gradient(180deg, rgba(8, 9, 12, .72), rgba(8, 9, 12, .86)); }
.shell[data-side="title"] .scrim { background: linear-gradient(0deg, rgba(8, 9, 12, .85) 0%, rgba(8, 9, 12, .1) 50%, rgba(8, 9, 12, 0) 70%), linear-gradient(90deg, rgba(8, 9, 12, .5), rgba(8, 9, 12, 0) 50%); }
.bigtype { display: none; }

.topbar { position: absolute; left: 0; right: 0; top: 0; height: 76px; display: flex; align-items: center; gap: 16px; padding: 0 var(--gutter); padding-top: env(safe-area-inset-top, 0px); z-index: 3; transition: opacity .5s, transform .5s var(--x); }
.wordmark { display: flex; align-items: center; gap: 10px; font: 800 expanded 15px/1 var(--logo); text-transform: uppercase; letter-spacing: -.01em; }
.wordmark .mark { width: 34px; height: 34px; }
.wordmark b { font-weight: 800; color: var(--pink); }
.wordmark span > span { margin-right: .25em; }
/* the festival tab bar: LB/RB keys either side, a pink bar under the current tab slides between them */
.tabsnav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; }
.tabsnav .key { opacity: .9; margin: 0 8px; }
/* the Q / E keys are buttons too: a click steps to the previous / next section */
.tabsnav button.key { cursor: pointer; transition: opacity .15s, transform .15s; }
.tabsnav button.key:hover { opacity: 1; transform: translateY(-1px); }
.tabsnav button.key:active { transform: translateY(1px); }
.tabsnav .tn-i { position: relative; z-index: 1; height: 40px; padding: 0 16px; font: 700 condensed 12.5px/40px var(--disp); letter-spacing: .04em; text-transform: uppercase; color: var(--w2); transition: color .2s; }
.tabsnav .tn-i:hover { color: var(--white); }
.tabsnav .tn-i[aria-current="true"] { color: var(--white); }
.tabsnav .mk { position: absolute; z-index: 0; top: 50%; height: 3px; margin-top: 18px; background: var(--pink); transition: left .4s var(--x), width .4s var(--x), opacity .2s; }
.crumbs { display: none; }
.topbar .spacer { flex: 1; }
.wallet { display: flex; align-items: center; gap: 8px; height: 40px; font: 700 condensed 20px/1 var(--disp); font-variant-numeric: tabular-nums; }
.wallet .ic { width: 22px; height: 22px; }
.wallet.bump { animation: bump .5s var(--x); }
@keyframes bump { 30% { transform: translateY(-4px); color: var(--gold); } }
.gift { position: relative; }
.gift.hot::after { content: ''; position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--ink); }
.me-chip { display: flex; align-items: center; gap: 10px; text-align: left; }
.me-chip .who { display: grid; gap: 4px; }
.me-chip .nm { font: 700 condensed 15px/1 var(--disp); text-transform: uppercase; }
.me-chip .lv { display: flex; align-items: center; gap: 8px; font: 700 12px/1 var(--body); color: var(--w3); }
.me-chip .lv .bar { width: 64px; height: 4px; }
.portrait { width: 42px; height: 42px; flex: none; position: relative; background: var(--tile-3) center 20% / cover no-repeat; border-radius: 2px; }
.portrait.lg { width: 72px; height: 72px; }
.portrait.xl { width: 132px; height: 132px; }

.screen { position: absolute; inset: 76px 0 58px; padding: 22px var(--gutter) 0; display: flex; flex-direction: column; min-height: 0; }
.screen.right { align-items: flex-end; }
.foot { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; display: flex; align-items: center; gap: 22px; padding: 0 var(--gutter); padding-bottom: env(safe-area-inset-bottom, 0px); font: 600 14px/1 var(--body); color: var(--w2); z-index: 3; transition: opacity .5s; }
.foot .hints { display: inline-flex; align-items: center; gap: 8px; }
.foot kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; font: 700 12px/1 var(--body); color: var(--ink); background: var(--white); border-radius: 13px; }
.foot .spacer { flex: 1; }
.foot .status { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--w3); display: inline-block; flex: none; }
.dot.on { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.dot.warn { background: var(--gold); }
.dot.off { background: var(--loss); }
.shell[data-screen="title"] .topbar { opacity: 0; transform: translateY(-30px); pointer-events: none; }
.shell[data-screen="title"] .foot .hints { opacity: 0; }

/* ---------- motion ---------- */
.stagger > *, .slide-in > *, .slide-in-r > * { animation: tileIn .55s var(--x) both; animation-delay: calc(var(--i, 0) * 40ms + 60ms); }
@keyframes tileIn { from { opacity: 0; transform: translateX(70px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes wipeIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.screen.leaving { animation: leave .22s var(--x-in) forwards; pointer-events: none; }
@keyframes leave { to { opacity: 0; transform: translateX(-60px); } }
/* race wipe: a pink diagonal sweeps across with the logo, then opens on the race */
.wipe { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.wipe i { position: absolute; top: -20%; bottom: -20%; left: 0; width: 160%; transform: translateX(-130%) skewX(-20deg); }
.wipe i:nth-child(1) { background: var(--pink); } .wipe i:nth-child(2) { background: var(--ink); } .wipe i:nth-child(3), .wipe i:nth-child(4) { display: none; }
.wipe.go i { animation: band .95s var(--snap) forwards; }
.wipe.go i:nth-child(2) { animation-delay: .07s; }
@keyframes band { 0% { transform: translateX(-130%) skewX(-20deg); } 45%, 55% { transform: translateX(-20%) skewX(-20deg); } 100% { transform: translateX(110%) skewX(-20deg); } }
.wipe b { position: absolute; left: 50%; top: 50%; width: 160px; height: 160px; margin: -80px 0 0 -80px; opacity: 0; }
.wipe b svg { width: 100%; height: 100%; }
.wipe.go b { animation: stamp .95s forwards; }
@keyframes stamp { 0%, 35% { opacity: 0; transform: translateX(-80px); } 48%, 58% { opacity: 1; transform: none; } 70%, 100% { opacity: 0; transform: translateX(80px); } }
.swipe { display: none; }

/* ---------- tiles: the one component ---------- */
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 16px 18px; text-align: left; color: var(--white); background: var(--tile) center / cover no-repeat; border-radius: 3px; transition: transform .3s var(--x), box-shadow .2s; }
.tile::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--pink); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--x); }
.tile:hover, .tile:focus-visible, .tile.on { outline: none; transform: scale(1.025); box-shadow: 0 0 0 3px var(--white), 0 18px 40px rgba(0, 0, 0, .45); z-index: 1; }
.tile:hover::after, .tile:focus-visible::after, .tile.on::after { transform: scaleX(1); }
.tile .tl { position: relative; z-index: 1; font: 800 condensed 19px/1 var(--disp); text-transform: uppercase; letter-spacing: 0; }
.tile .ts { position: relative; z-index: 1; margin-top: 6px; font: 600 13px/1.3 var(--body); color: var(--w2); }
.tile .tk { position: absolute; left: 18px; top: 16px; z-index: 1; font: 700 condensed 13px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.tile .tk.live { display: inline-flex; align-items: center; gap: 7px; color: var(--white); background: rgba(8, 9, 12, .72); padding: 6px 9px 6px 8px; border-radius: 2px; }
.tile .tk.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.tile .art { position: absolute; inset: 0; z-index: 0; }
.tile .shade { position: absolute; inset: 0; z-index: 0; background: linear-gradient(0deg, rgba(8, 9, 12, .85) 0%, rgba(8, 9, 12, 0) 60%); }
.tile .big-ic { position: absolute; right: 14px; top: 12px; width: 64px; height: 64px; opacity: .22; z-index: 0; }

/* ---------- title (attract) ---------- */
.title-screen { justify-content: flex-end; padding-bottom: calc(7vh / var(--z)); }
.tc { position: relative; display: grid; justify-items: start; gap: 0; }
.tc-logo { margin: 0; display: grid; line-height: .82; font-family: var(--logo); font-stretch: 125%; text-transform: uppercase; }
.tc-logo .g { font-weight: 800; font-size: clamp(24px, calc(2.7vw / var(--z)), 50px); letter-spacing: .3em; color: var(--white); margin: 0 0 .22em .06em; animation: wipeIn .7s .2s var(--x) both; }
.tc-logo .p { display: flex; font-weight: 800; font-size: clamp(56px, calc(7.6vw / var(--z)), 140px); letter-spacing: -.045em; }
.tc-logo .p span { display: inline-block; animation: letterIn .7s var(--x) both; animation-delay: calc(var(--i) * 40ms + 300ms); }
.tc-logo .p span:first-child { color: var(--pink); }
@keyframes letterIn { from { opacity: 0; transform: translateX(80px); } to { opacity: 1; transform: none; } }
.tc-tag { margin-top: calc(2.6vh / var(--z)); animation: wipeIn .6s 1s var(--x) both; }
.tc-press { margin-top: calc(4vh / var(--z)); animation: rise .6s 1.3s var(--x) both; }
.tc-press .btn { animation: none; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(255, 31, 109, .35); } }
.tc-meta { position: absolute; right: var(--gutter); bottom: calc(7vh / var(--z)); display: grid; justify-items: end; gap: 8px; font: 600 14px/1 var(--body); color: var(--w2); animation: fadeIn .8s 1.6s both; }
.tc-meta span { display: flex; align-items: center; gap: 8px; }
.tc-meta b { color: var(--white); font-weight: 700; }
.title-screen.out .tc { animation: tcOut .45s var(--x-in) forwards; }
.title-screen.out .tc-meta { animation: fadeIn .3s reverse forwards; }
@keyframes tcOut { to { opacity: 0; transform: translateX(-120px); } }

/* ---------- home: the festival mosaic ---------- */
.home { justify-content: flex-start; }
.home-head { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.home-head .portrait { width: 46px; height: 46px; }
.home-head .hi { font: 800 condensed 26px/1 var(--disp); text-transform: uppercase; }
.home-head .hi small { display: block; margin-bottom: 4px; font: 700 13px/1 var(--body); color: var(--w3); font-style: normal; text-transform: none; }
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(900px, calc(58vw / var(--z))); flex: 1; max-height: 560px; min-height: 0; }
.mosaic .tile { min-height: 0; }
.mosaic .t-race { grid-column: span 2; grid-row: span 2; background: #111; }
.mosaic .t-race .tl { font-size: clamp(42px, calc(4.2vw / var(--z)), 72px); line-height: .85; letter-spacing: 0; }
.mosaic .t-race .ts { font-size: 15px; color: rgba(255, 255, 255, .9); }
.mosaic .t-race .art { opacity: .2; background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 48px 48px; -webkit-mask: linear-gradient(200deg, #000, transparent 55%); mask: linear-gradient(200deg, #000, transparent 55%); }
.mosaic .t-drivers { grid-row: span 2; background-position: center 30%; background-size: cover; }
.mosaic .t-drivers .tl { font-size: 22px; }
.mosaic .stat-v { position: relative; z-index: 1; font: 800 condensed 28px/1 var(--disp); letter-spacing: 0; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.mosaic .stat-v small { font-size: 16px; color: var(--w3); margin-left: 4px; }
.mosaic .tile .bar { position: relative; z-index: 1; margin-top: 10px; }
.mi .badge, .tile .badge { position: absolute; right: 14px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); z-index: 2; }
.strip-data { display: none; }

/* ---------- bars ---------- */
.bar { position: relative; display: block; height: 6px; background: var(--w4); overflow: hidden; }
.bar > i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v, 0)); background: var(--c, var(--white)); transition: transform .9s var(--x); }
.bar > i.gain { background: var(--gain); }
.bar > i.loss { background: var(--loss); }
.bar.lg { height: 8px; } .bar.xl { height: 12px; }
.stat { display: grid; grid-template-columns: 96px 1fr 30px; align-items: center; gap: 14px; }
.stat .label { font: 700 condensed 14px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.stat .num { font: 800 condensed 20px/1 var(--disp); text-align: right; }
.stat .bar { height: 8px; }
.stat .bar > i:not(.gain):not(.loss) { background: var(--white); }

/* ---------- panels, tabs, lists ---------- */
.panel { background: var(--tile); border-radius: 3px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; position: relative; margin-bottom: 10px; }
.tab { position: relative; height: 40px; padding: 0 18px; font: 700 condensed 15px/1 var(--disp); text-transform: uppercase; color: var(--w2); background: var(--tile); border-radius: 2px; transition: background .2s, color .2s; }
.tab:hover { color: var(--white); background: var(--tile-2); }
.tab[aria-selected="true"] { color: var(--white); background: var(--pink); }
.tab .ct { font: 600 12px/1 var(--body); font-style: normal; opacity: .75; margin-left: 6px; }
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.seg button { position: relative; min-width: 46px; height: 44px; padding: 0 14px; font: 700 condensed 16px/1 var(--disp); text-transform: uppercase; color: var(--w2); background: var(--tile-2); border-radius: 2px; transition: background .15s, color .15s, box-shadow .15s; }
.seg button small { display: block; font: 600 11px/1 var(--body); font-style: normal; text-transform: none; opacity: .75; margin-top: 3px; }
.seg button:hover { color: var(--white); box-shadow: inset 0 0 0 2px var(--w3); }
/* a chosen option is white, as everywhere else (Casual / Ranked, lobby pages): pink is kept for the one action */
.seg button[aria-pressed="true"] { color: var(--ink); background: var(--white); box-shadow: none; }
.scroll { overflow-y: auto; overflow-x: hidden; min-height: 0; }
.rows { display: grid; gap: 4px; align-content: start; }
.rowi { display: grid; align-items: center; gap: 14px; min-height: 56px; padding: 8px 14px; background: var(--tile); border-radius: 2px; transition: background .15s, box-shadow .15s; }
.rowi:hover { box-shadow: inset 0 0 0 2px var(--w3); }
.rowi.me { background: var(--pink); }
.empty { padding: 24px 16px; background: var(--tile); color: var(--w2); font: 500 15px/1.5 var(--body); border-radius: 2px; }

/* ---------- play: mode tiles (the one in focus opens up) ---------- */
.play-head { margin-bottom: 16px; }
.strips { display: flex; gap: 10px; flex: 1; min-height: 0; max-height: 600px; padding-bottom: 14px; }
.stp { position: relative; flex: 1 1 0; min-width: 0; display: flex; overflow: hidden; color: var(--white); background: var(--tile); border-radius: 3px; text-align: left; transition: flex-grow .5s var(--x), box-shadow .2s, transform .3s var(--x); animation: tileIn .55s var(--x) both; animation-delay: calc(var(--i, 0) * 50ms + 60ms); }
.stp::before { content: ''; position: absolute; inset: 0; background: var(--mc, var(--tile-3)); opacity: .0; transition: opacity .3s; }
.stp::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--pink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--x); }
.stp[data-mode="quick"] { --mc: linear-gradient(160deg, #ff1f6d, #8a0034); }
.stp[data-mode="ranked"] { --mc: linear-gradient(160deg, #7b4dff, #2a0f80); }
.stp[data-mode="private"] { --mc: linear-gradient(160deg, #1aa6ff, #003c80); }
.stp[data-mode="solo"] { --mc: linear-gradient(160deg, #ff8a1a, #8a3000); }
.stp[data-mode="gp"] { --mc: linear-gradient(160deg, #ffc61a, #8a5a00); }
.stp[data-mode="tt"] { --mc: linear-gradient(160deg, #1fd48a, #00603a); }
.stp .spine { position: relative; z-index: 1; flex: none; width: 82px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 20px 0 22px; }
.stp .spine .n { font: 700 condensed 14px/1 var(--disp); color: var(--w3); }
.stp .spine .t { writing-mode: vertical-rl; transform: rotate(180deg); font: 800 condensed 22px/1 var(--disp); letter-spacing: 0; text-transform: uppercase; white-space: nowrap; transition: opacity .2s; }
.stp .spine .ic, .stp .spine .gem { width: 30px; height: 30px; color: var(--white); }
.stp .body { position: relative; z-index: 1; flex: 1; min-width: 340px; display: grid; align-content: end; justify-items: start; gap: 12px; padding: 24px 32px 32px 4px; opacity: 0; transform: translateX(30px); transition: opacity .2s, transform .45s var(--x); }
.stp .body .stag { font: 700 condensed 14px/1 var(--disp); text-transform: uppercase; padding: 6px 10px; background: rgba(0, 0, 0, .35); transform: none; }
.stp .body .t2 { font-size: clamp(34px, calc(3.4vw / var(--z)), 58px); line-height: .9; }
.stp .body .d { max-width: 380px; font: 500 16px/1.45 var(--body); color: rgba(255, 255, 255, .9); }
.stp .body .meta { display: flex; gap: 18px; flex-wrap: wrap; font: 600 14px/1 var(--body); color: rgba(255, 255, 255, .85); }
.stp .body .meta span { display: inline-flex; align-items: center; gap: 7px; }
.stp .body .go { margin-top: 8px; background: var(--white); color: var(--ink); }
.stp .big-n { position: absolute; right: -.05em; top: -.18em; z-index: 0; font: 800 condensed 240px/.8 var(--disp); letter-spacing: 0; color: rgba(255, 255, 255, .08); opacity: 0; transition: opacity .3s; }
.stp:hover { box-shadow: inset 0 0 0 3px var(--w3); }
.stp.on { flex-grow: 3.6; box-shadow: 0 0 0 3px var(--white), 0 20px 50px rgba(0, 0, 0, .5); }
.stp.on::before { opacity: 1; }
.stp.on::after { transform: scaleX(1); }
.stp.on .body { opacity: 1; transform: none; transition-delay: .1s, .05s; }
.stp.on .spine .t { opacity: 0; }
.stp.on .spine .n { color: var(--white); }
.stp.on .big-n { opacity: 1; }
.stp:focus-visible { outline: none; }
.stp.locked { opacity: .55; }
.join { display: flex; align-items: center; gap: 6px; margin-top: 8px; width: min(440px, 100%); }
.join .input { flex: 1; }

/* ---------- track setup ---------- */
.setup { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) 330px; gap: 28px; width: 100%; min-height: 0; flex: 1; }
.tlist .head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 12px 0; }
.tlist .head .label { font: 700 condensed 16px/1 var(--disp); color: var(--w3); }
.tlist > div:last-child { display: grid; gap: 4px; padding: 3px 6px 16px 3px; }
.trow { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; align-items: center; width: 100%; padding: 11px 14px 11px 12px; background: var(--tile); border-radius: 2px; text-align: left; transition: background .15s, box-shadow .15s, transform .25s var(--x); }
.trow .n { grid-row: 1 / span 2; font: 800 condensed 18px/1 var(--disp); color: var(--w3); }
.trow .nm { font: 700 condensed 17px/1.05 var(--disp); text-transform: uppercase; }
.trow .pl { grid-column: 2; font: 500 13px/1.2 var(--body); color: var(--w3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .pips { grid-row: 1 / span 2; grid-column: 3; display: flex; gap: 3px; }
.trow .pips i { width: 5px; height: 14px; background: var(--w4); transform: none; }
.trow .pips i.on { background: var(--white); }
.trow:hover { box-shadow: inset 0 0 0 2px var(--w3); }
.trow[aria-pressed="true"] { background: rgba(38, 40, 50, .94); transform: translateX(6px); }
.trow[aria-pressed="true"] .n, .trow[aria-pressed="true"] .pl { color: rgba(255, 255, 255, .85); }
.tdetail { position: relative; display: flex; flex-direction: column; min-height: 0; }
.tdetail .where { align-self: flex-start; font: 700 condensed 14px/1 var(--disp); text-transform: uppercase; color: var(--w2); padding: 0; animation: wipeIn .4s var(--x) both; }
.tdetail .tn { margin: 14px 0 0; font-size: clamp(34px, calc(3.4vw / var(--z)), 60px); line-height: .9; animation: letterIn .5s var(--x) both; }
.tdetail .bl { max-width: 560px; margin: 14px 0 0; font: 500 15px/1.5 var(--body); color: var(--w2); animation: fadeIn .5s .15s both; }
.specs { display: flex; gap: 0; margin: 18px 0 8px; }
.specs > div { display: grid; gap: 6px; padding: 0 22px 0 0; margin-right: 22px; border-right: 2px solid var(--w4); animation: fadeIn .5s .2s both; }
.specs > div:last-child { border-right: 0; }
.specs .label { font: 600 12px/1 var(--body); }
.specs b { font: 800 condensed 22px/1 var(--disp); text-transform: uppercase; }
.tdetail canvas { flex: 1; min-height: 200px; width: 100%; display: block; animation: fadeIn .6s .1s both; }
.cuplist { display: grid; gap: 4px; margin: 16px 0; max-height: calc(46vh / var(--z)); align-content: start; }
.cuplist div { display: flex; gap: 12px; align-items: center; padding: 6px 14px 6px 12px; background: var(--tile); font: 700 condensed 16px/1.1 var(--disp); text-transform: uppercase; }
.cuplist .cl-th { flex: none; width: 64px; height: 36px; border-radius: 2px; background: center/cover no-repeat var(--w5); }
.cuplist em { display: grid; gap: 3px; font-style: normal; }
.cuplist em small { font: 500 12px/1 var(--body); text-transform: none; color: var(--w3); }
.field .seg[data-seg="laps"] { grid-template-columns: repeat(5, 1fr); }
.field .seg[data-seg="items"] button { font-size: 14px; padding: 0 4px; }
.cuplist div span { font: 800 condensed 16px/1 var(--disp); color: var(--pink-2); }
.side { display: flex; flex-direction: column; gap: 20px; padding: 22px; min-height: 0; overflow-y: auto; overflow-x: hidden; background: var(--tile); border-radius: 3px; margin-bottom: 16px; }
/* the start button stays in view when the rules scroll (it was cut off under them at 720 px) */
.side .go { margin-top: auto; position: sticky; bottom: 0; flex: none; box-shadow: 0 -18px 18px rgba(14, 15, 21, .92); }
.side .btn.big { width: 100%; }
.field { display: grid; gap: 10px; }
.field > .label { font: 700 condensed 15px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.field .seg { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 4px; }
.field .seg button { padding: 0 6px; }
.field .seg[data-seg="diff"] { grid-template-columns: 1fr 1fr; }
.field .seg[data-seg="diff"] button { height: 52px; }

/* ---------- lobby: the starting grid ---------- */
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; width: 100%; min-height: 0; flex: 1; }
.lobby-main { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.lobby-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.lobby-head .ttl { font-size: clamp(32px, calc(3.2vw / var(--z)), 56px); line-height: .9; }
.lobby-head > .label { font: 600 14px/1.2 var(--body); color: var(--w2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; row-gap: 10px; padding: 3px 3px 50px; align-content: start; }
.gs { position: relative; display: grid; grid-template-columns: 54px 52px 1fr auto; align-items: center; gap: 12px; height: 76px; padding: 0 16px 0 0; background: var(--tile); border-radius: 2px; animation: tileIn .5s var(--x) both; animation-delay: calc(var(--i, 0) * 60ms + 100ms); }
.gs:nth-child(even) { margin-top: 40px; margin-bottom: -40px; }
.gs .p { align-self: stretch; display: grid; place-items: center; font: 800 condensed 20px/1 var(--disp); background: rgba(255, 255, 255, .06); }
.gs .portrait { width: 52px; height: 52px; }
.gs .nm { font: 700 condensed 18px/1.05 var(--disp); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs .sub { margin-top: 4px; font: 500 13px/1.2 var(--body); color: var(--w3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs .host { font: 700 condensed 12px/1 var(--disp); text-transform: uppercase; padding: 5px 8px; color: var(--ink); background: var(--white); transform: none; }
.gs .gem { width: 28px; height: 28px; }
.gs.me { background: var(--pink); }
.gs.me .p { background: rgba(0, 0, 0, .18); }
.gs.me .sub { color: rgba(255, 255, 255, .85); }
.gs.open { background: transparent; box-shadow: inset 0 0 0 2px var(--w5); }
.gs.open .portrait { background: transparent; box-shadow: inset 0 0 0 2px var(--w5); }
.gs.open .nm, .gs.open .p { color: var(--w3); background: transparent; }
.gs.cpu { background: rgba(14, 15, 21, .55); }
.lobby-side { display: flex; flex-direction: column; gap: 18px; padding: 22px; min-height: 0; overflow-y: auto; overflow-x: hidden; background: var(--tile); border-radius: 3px; margin-bottom: 16px; }
.lobby-side canvas { width: 100%; height: 160px; display: block; }
.code { font-size: 58px; letter-spacing: .06em; user-select: text; }
.countdown { font-size: 130px; line-height: .85; color: var(--white); font-variant-numeric: tabular-nums; }
.searching { display: flex; align-items: center; gap: 18px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--w4); border-top-color: var(--pink); border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.racer .nm { font: 700 condensed 17px/1 var(--disp); text-transform: uppercase; }

/* ---------- drivers ---------- */
.collect { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 0; flex: 1; min-height: 0; width: 100%; }
.collect.flip { grid-template-columns: minmax(0, 1fr) 460px; justify-content: end; }
.prof, .settings-wrap { justify-content: end; }
.collect .info { display: grid; align-content: start; gap: 16px; padding-right: 20px; }
.drv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drv-info { width: min(460px, 100%); display: grid; gap: 14px; align-content: start; justify-items: start; }
.drv-info > div:not(.meta) { width: 100%; }
.drv-info .meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.drv-info .meta .label { font: 700 condensed 14px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.hero-name { margin: 0; font-size: clamp(44px, calc(4.8vw / var(--z)), 82px); line-height: .86; letter-spacing: 0; }
.hero-name.swap { animation: letterIn .45s var(--x); }
.tagline { margin: 0; max-width: 420px; font: 500 16px/1.45 var(--body); color: var(--w2); }
.rar { display: inline-flex; align-items: center; gap: 6px; font: 700 condensed 14px/1 var(--disp); text-transform: uppercase; color: var(--ink); background: var(--rc); padding: 5px 9px; transform: none; }
.req { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--tile); border-left: 4px solid var(--rc, var(--w3)); font: 600 14px/1.4 var(--body); }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* the roster: tiles along the bottom, the one in focus framed white */
.film { position: relative; display: flex; gap: 8px; margin-top: auto; padding: 18px 6px 12px 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.film::-webkit-scrollbar { display: none; }
.dcard { position: relative; flex: none; width: 116px; height: 148px; overflow: hidden; background: var(--tile-3) center 18% / cover no-repeat; border-radius: 2px; text-align: left; transition: transform .3s var(--x), box-shadow .2s, filter .2s; }
.dcard::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 9, 12, .9) 0%, rgba(8, 9, 12, 0) 55%); }
.dcard::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--rc, var(--r-common)); }
.dcard .nm { position: absolute; left: 10px; right: 6px; bottom: 12px; font: 700 condensed 14px/1 var(--disp); text-transform: uppercase; }
.dcard .cls { position: absolute; left: 10px; top: 9px; font: 600 condensed 11px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.dcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--w3); }
.dcard[aria-pressed="true"] { transform: translateY(-10px) scale(1.06); box-shadow: 0 0 0 3px var(--white), 0 16px 34px rgba(0, 0, 0, .5); z-index: 1; }
.dcard[aria-pressed="true"]::after { background: var(--pink); }
.dcard.locked { filter: grayscale(1) brightness(.45); }
.dcard.locked:hover { filter: grayscale(.5) brightness(.7); }
.dcard.locked .lock { position: absolute; right: 8px; top: 8px; z-index: 1; color: var(--white); }
.dcard.locked .lock .ic { width: 16px; height: 16px; }
.dcard.equipped .nm::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--pink); vertical-align: .1em; }
.roster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 700 condensed 13px/1 var(--disp); text-transform: uppercase; padding: 5px 9px; color: var(--white); background: var(--tile-2); transform: none; }
.chip .ic { width: 14px; height: 14px; }
.chip.up { background: var(--gain); color: var(--ink); }
.chip.down { background: var(--loss); }
.chip.live { background: var(--pink); }
.drag-hint { position: absolute; left: 64%; bottom: 76px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; font: 600 14px/1 var(--body); color: var(--w2); pointer-events: none; animation: fadeIn 1s 1s both; }
.drag-hint::before { content: 'Drag'; display: inline-grid; place-items: center; height: 26px; padding: 0 9px; border-radius: 13px; background: var(--white); color: var(--ink); font: 700 12px/1 var(--body); }
.drv + .drag-hint { bottom: 240px; }

/* ---------- garage ---------- */
.gar { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 12px; width: min(640px, 100%); flex: 1; min-height: 0; }
.gar-main { display: flex; flex-direction: column; min-height: 0; }
.rail { display: flex; flex-direction: column; gap: 4px; }
.rail button { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 0 10px; color: var(--w2); background: var(--tile); border-radius: 2px; font: 700 condensed 12px/1 var(--disp); text-transform: uppercase; transition: background .15s, color .15s; }
.rail button .glyph, .rail button .ic { width: 24px; height: 24px; color: inherit; }
.rail button:hover { color: var(--white); box-shadow: inset 0 0 0 2px var(--w3); }
.rail button[aria-selected="true"] { color: var(--white); background: var(--pink); }
.rail button em { font: 600 10px/1 var(--body); font-style: normal; opacity: .75; }
.gar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 6px; }
.gar-head .h3 { font-size: 22px; }
.gar-head .label { font: 600 13px/1 var(--body); }
.gar-sel { display: grid; gap: 12px; justify-items: start; padding: 10px 0 18px; }
.gar-sel > div:not(.actions-row) { width: 100%; }
.gar-sel .h2 { font-size: clamp(32px, calc(3.2vw / var(--z)), 52px); line-height: .9; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; align-content: start; grid-auto-rows: min-content; padding: 3px 6px 20px 3px; }
.icard { position: relative; display: grid; gap: 8px; align-content: end; justify-items: start; min-height: 116px; padding: 12px; text-align: left; color: var(--white); background: var(--tile); border-radius: 2px; transition: transform .25s var(--x), box-shadow .15s; overflow: hidden; }
.icard::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--rc, var(--r-common)); }
.icard:hover { box-shadow: inset 0 0 0 2px var(--w3); }
.icard[aria-pressed="true"] { transform: scale(1.04); box-shadow: 0 0 0 3px var(--white), 0 12px 26px rgba(0, 0, 0, .45); z-index: 1; }
.icard .sw { width: 36px; height: 36px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.icard .nm { font: 700 condensed 15px/1.05 var(--disp); text-transform: uppercase; }
.icard .st { display: flex; align-items: center; gap: 5px; font: 600 12px/1 var(--body); color: var(--w3); }
.icard .st .ic { width: 13px; height: 13px; }
.icard.locked .nm, .icard.locked .sw, .icard.locked .glyph { opacity: .45; }
.icard .eq { position: absolute; top: 9px; right: 9px; font: 700 condensed 11px/1 var(--disp); text-transform: uppercase; background: var(--pink); padding: 4px 7px; transform: none; }
.icard .glyph { width: 34px; height: 34px; color: var(--w2); }
.icard.legendary { background: linear-gradient(135deg, rgba(255, 178, 26, .22), var(--tile) 60%); }
.cats { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- profile ---------- */
.prof { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; width: 100%; flex: 1; min-height: 0; }
.banner { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 22px; padding: 22px; min-height: 178px; overflow: hidden; border-radius: 3px; background: linear-gradient(135deg, var(--pink), var(--pink-d)); }
.banner[data-b="asphalt"] { background: linear-gradient(135deg, #2c2f3a, #14161d); }
.banner[data-b="checker"] { background: repeating-conic-gradient(#2c2f3a 0 25%, #14161d 0 50%) 0 0 / 30px 30px; }
.banner[data-b="sunset"] { background: linear-gradient(120deg, #6a2bd9, #ff1f6d 55%, #ff8a1a); }
.banner[data-b="toxic"] { background: linear-gradient(120deg, #0f3a12, #3fbf2a 60%, #c8ff3a); }
.banner[data-b="gold"] { background: linear-gradient(120deg, #7a4a00, #ffc61a 50%, #fff0a0 65%, #a87000); }
.banner[data-b="s1"] { background: linear-gradient(115deg, #14161d 0 46%, var(--pink) 46% 52%, #14161d 52% 70%, var(--white) 70% 71%, #14161d 71%); }
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 9, 12, .75), transparent 70%); }
.banner > * { position: relative; z-index: 1; }
.banner .ttl { font-size: 15px; color: var(--white); justify-self: start; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.stats-grid div { display: grid; gap: 6px; padding: 14px 16px; background: var(--tile); border-radius: 2px; }
.stats-grid b { font: 800 condensed 30px/1 var(--disp); font-variant-numeric: tabular-nums; }
.tier { display: flex; align-items: center; gap: 14px; }
.tier .gem { width: 44px; height: 44px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px; }
.ach { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px; background: var(--tile); border-radius: 2px; }
.ach .badge-ic { width: 44px; height: 44px; }
.ach.done { box-shadow: inset 4px 0 0 var(--pink); }
.ach:not(.done) .badge-ic { filter: grayscale(1); opacity: .4; }
.ach .nm { font: 700 condensed 16px/1.05 var(--disp); text-transform: uppercase; }
.ach .ds { font: 500 13px/1.4 var(--body); color: var(--w3); margin: 4px 0 8px; }
.hist { grid-template-columns: 62px 1fr auto auto; }
.hist .pl { font: 800 condensed 22px/1 var(--disp); text-transform: uppercase; }
.hist .pl.win { color: var(--pink-2); }

/* ---------- social ---------- */
.social { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; width: 100%; flex: 1; min-height: 0; }
.friend { grid-template-columns: 42px 1fr auto; }
/* leaderboard rows (named lbr: .lb is the lobby layout) */
.lbr { grid-template-columns: 54px 42px minmax(0, 1fr) auto; }
.lbr .pl { font: 800 condensed 24px/1 var(--disp); text-align: center; color: var(--w2); }
.lbr .pl.p1 { color: var(--gold); } .lbr .pl.p2 { color: #dfe6f0; } .lbr .pl.p3 { color: #ff9a4a; }
.lbr .val { font: 700 condensed 20px/1 var(--disp); font-variant-numeric: tabular-nums; }
.inline-form { display: flex; gap: 6px; }
.input { height: 48px; padding: 0 16px; background: rgba(255, 255, 255, .08); border: 0; border-radius: 2px; box-shadow: inset 0 0 0 2px var(--w4); color: var(--white); font: 600 16px var(--body); outline: none; min-width: 0; flex: 1; transition: box-shadow .2s, background .2s; user-select: text; }
.input::placeholder { color: var(--w3); }
.input:focus { box-shadow: inset 0 0 0 2px var(--white); background: rgba(255, 255, 255, .12); }

/* ---------- season ---------- */
.season-hero { display: grid; gap: 14px; justify-items: start; }
.track-wrap { position: relative; overflow-x: auto; overflow-y: hidden; padding: 22px 4px 18px; }
.tiers { display: flex; gap: 4px; width: max-content; padding-right: 30px; }
.tierc { position: relative; width: 116px; height: 148px; padding: 12px; display: grid; align-content: space-between; background: var(--tile); border-radius: 2px; }
.tierc .tn { font: 800 condensed 28px/1 var(--disp); color: var(--w3); }
.tierc .rw { font: 700 condensed 14px/1.15 var(--disp); text-transform: uppercase; }
.tierc .rw .ic, .tierc .rw .glyph { width: 20px; height: 20px; }
.tierc.reached { background: var(--tile-2); }
.tierc.reached .tn { color: var(--white); }
.tierc.claimed::after { content: ''; position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; background: var(--gain); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }
.tierc.item { box-shadow: inset 0 -4px 0 var(--rc, var(--r-epic)); }
.tierc.now { box-shadow: 0 0 0 3px var(--white); background: var(--pink); }
.tierc.now .tn { color: var(--white); }

/* ---------- challenges ---------- */
.chal { grid-template-columns: minmax(0, 1fr) 200px 330px; padding: 16px 18px; }
.chal > .actions-row { justify-content: flex-end; flex-wrap: wrap; }
.chal .nm { font: 700 condensed 18px/1.05 var(--disp); text-transform: uppercase; }
.chal .ds { font: 500 14px/1.4 var(--body); color: var(--w3); margin-top: 4px; }
.chal .pv { display: grid; gap: 8px; }
.chal.done { box-shadow: inset 4px 0 0 var(--gain); }
.chal.claimed { opacity: .5; }
.rewardln { display: inline-flex; align-items: center; gap: 6px; font: 700 condensed 16px/1 var(--disp); font-variant-numeric: tabular-nums; }
.rewardln .ic, .rewardln .glyph { width: 18px; height: 18px; }

/* ---------- modals ---------- */
.modal-back { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8, 9, 12, .75); animation: fadeIn .2s; padding: 16px; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(calc(100vh / var(--z)) - 32px); overflow: auto; background: #15171f; border-radius: 3px; padding: 32px; display: grid; gap: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: modalIn .45s var(--x); }
.modal::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--pink); }
.modal.wide { width: min(900px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { position: relative; display: grid; gap: 10px; justify-items: start; padding: 14px 12px 12px; background: var(--tile-2); border-radius: 2px; min-height: 136px; align-content: space-between; }
.day .dn { font: 700 condensed 14px/1 var(--disp); text-transform: uppercase; color: var(--w3); }
.day .dv { font: 800 condensed 24px/1 var(--disp); }
.day .ic, .day .glyph { width: 28px; height: 28px; }
.day .label { font: 600 11px/1.2 var(--body); }
.day.past { opacity: .4; }
.day.today { background: var(--pink); box-shadow: 0 0 0 3px var(--white); transform: translateY(-6px); }
.day.today .dn { color: var(--white); }
.day.big { background: linear-gradient(160deg, #7b4dff, #2a0f80); }
.day .chip { position: absolute; top: 10px; right: 10px; padding: 3px 5px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: var(--gutter); top: 90px; z-index: 40; display: grid; gap: 6px; width: min(390px, calc(calc(100vw / var(--z)) - 32px)); pointer-events: none; }
.toast { pointer-events: auto; position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px 14px 18px; background: #15171f; border-radius: 2px; box-shadow: inset 5px 0 0 var(--pink), 0 16px 40px rgba(0, 0, 0, .5); animation: toastIn .45s var(--x); font: 500 14px/1.4 var(--body); color: var(--w2); }
.toast.err { box-shadow: inset 5px 0 0 var(--loss), 0 16px 40px rgba(0, 0, 0, .5); }
.toast.out { animation: toastOut .3s var(--x-in) forwards; }
.toast b { font: 700 condensed 17px/1.05 var(--disp); text-transform: uppercase; display: block; margin-bottom: 3px; color: var(--white); }
@keyframes toastIn { from { opacity: 0; transform: translateX(80px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(80px); } }

/* ---------- boot and sign-in ---------- */
.boot { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--ink); transition: opacity .7s, visibility .7s; }
.boot.done { opacity: 0; visibility: hidden; }
/* the studio ident opens the game (js/ui/ident.js): over the loading screen, which waits, still, until it is gone */
#ident { position: fixed; inset: 0; z-index: 90; background: #0e0d11; transition: opacity .5s; cursor: none; }
#ident.gate { cursor: pointer; }
#ident.out { opacity: 0; pointer-events: none; }
#ident video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0e0d11; }
#ident p { position: absolute; margin: 0; font: 700 condensed 12px/1 var(--disp); letter-spacing: .22em; text-transform: uppercase; color: #f2eadb; opacity: 0; transition: opacity .4s; pointer-events: none; }
#ident .ident-gate { left: 0; right: 0; top: 50%; text-align: center; font-size: 14px; }
#ident.gate .ident-gate { opacity: .8; }
#ident .ident-skip { right: 28px; bottom: 24px; }
#ident.on .ident-skip { opacity: .38; transition-delay: 1.4s; }
body:has(#ident) .boot, body:has(#ident) .boot * { animation-play-state: paused !important; }
.boot-art { position: absolute; inset: 0; overflow: hidden; }
.boot-art i { position: absolute; inset: -4%; background: center/cover no-repeat; opacity: 0; animation: bootArt 24s linear infinite; animation-delay: calc(var(--i) * 6s - 1s); }
.boot-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 75% at 50% 52%, rgba(10, 11, 14, .86), rgba(10, 11, 14, .55) 70%, rgba(10, 11, 14, .35)), linear-gradient(180deg, rgba(10, 11, 14, .5), transparent 30%, transparent 70%, rgba(10, 11, 14, .7)); }
@keyframes bootArt { 0% { opacity: 0; transform: scale(1.0); } 5% { opacity: 1; } 25% { opacity: 1; } 31% { opacity: 0; transform: scale(1.07); } 100% { opacity: 0; transform: scale(1.07); } }
.boot .inner { position: relative; width: min(600px, calc(92vw / var(--z))); box-sizing: border-box; padding: 30px 34px 32px; background: rgba(10, 11, 14, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: 4px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.boot .auth .input { background: rgba(255, 255, 255, .06); }
.auth-note { text-align: center; text-wrap: balance; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; }
.legal-links a { color: var(--w3); text-decoration: underline; text-underline-offset: 2px; }
.legal-links a:hover { color: var(--white); }
.auth-legal { justify-content: center; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .boot-art i { animation: none; } .boot-art i:first-child { opacity: 1; } }
.boot .inner { display: grid; justify-items: start; gap: 26px; width: min(600px, calc(92vw / var(--z))); }
.logo { display: grid; gap: 0; font-family: var(--logo); font-stretch: 125%; text-transform: uppercase; }
.logo .l0 { font-weight: 800; font-size: clamp(18px, calc(2.2vw / var(--z)), 26px); letter-spacing: .3em; margin-bottom: .2em; animation: wipeIn .6s .1s var(--x) both; }
.logo .l1 { display: flex; font-weight: 800; font-size: clamp(40px, calc(6.4vw / var(--z)), 72px); line-height: .85; letter-spacing: -.045em; }
.logo .l1 span { display: inline-block; animation: letterIn .6s var(--x) both; animation-delay: calc(var(--i) * 35ms + 200ms); }
.logo .l1 span:first-child { color: var(--pink); }
.logo .l2 { display: none; }
.loadbar { width: 100%; height: 5px; position: relative; overflow: hidden; background: var(--w5); }
.loadbar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v, 0)); background: var(--pink); transition: transform .45s var(--x); }
.boot .msg { font: 600 14px/1 var(--body); color: var(--w3); min-height: 14px; }
.auth { display: grid; gap: 10px; width: 100%; animation: rise .6s var(--x) both; }
.auth .btn.big { width: 100%; }
.auth .or { display: flex; align-items: center; gap: 14px; color: var(--w3); font: 700 condensed 13px/1 var(--disp); text-transform: uppercase; margin-top: 6px; }
.auth .or::before, .auth .or::after { content: ''; flex: 1; height: 2px; background: var(--w5); }
.auth .err { color: var(--loss); font: 600 14px/1.4 var(--body); }
.auth .err:empty { display: none; }

/* ---------- results ---------- */
.results { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 30px; width: 100%; flex: 1; min-height: 0; }
.res-left { display: flex; flex-direction: column; min-height: 0; }
.res-hero { position: relative; display: grid; justify-items: start; gap: 6px; padding-bottom: 14px; }
/* cup ceremony (the last race of a Grand Prix): the top three on stepped plinths, trophies over them */
.cup-cer { margin: 4px 0 18px; padding: 14px 16px 0; border-radius: 6px; background: linear-gradient(180deg, rgba(255, 198, 26, .1), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 198, 26, .22); }
.cup-cer .cc-title { font: italic 800 condensed clamp(20px, calc(2vw / var(--z)), 30px)/1 var(--disp); text-transform: uppercase; letter-spacing: 0; margin: 4px 0 6px; }
.cc-pod { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; }
.cc-step { position: relative; display: grid; justify-items: center; gap: 4px; padding-top: 8px; animation: ccUp .7s var(--x) both; }
.cc-step.p1 { animation-delay: .55s; } .cc-step.p2 { animation-delay: .3s; } .cc-step.p3 { animation-delay: .1s; }
.cc-cup { width: auto; height: 76px; max-width: none; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .45)); }
.cc-step.p1 .cc-cup { height: 96px; }
.cc-av { width: 40px; height: 40px; border-radius: 50%; background: #222 center/cover; border: 2px solid rgba(255, 255, 255, .7); margin-top: -6px; }
.cc-step.me .cc-av { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 47, 125, .35); }
.cc-step b { font: 800 14px/1.1 var(--disp); text-align: center; } .cc-step em { font: 700 12px/1 var(--disp); font-style: normal; color: var(--w2); }
.cc-step i { display: grid; place-items: center; width: 100%; font: italic 900 condensed 26px/1 var(--disp); font-style: italic; color: #101218; border-radius: 4px 4px 0 0; margin-top: 6px; }
.cc-step.p1 i { height: 52px; background: linear-gradient(180deg, #ffe58a, #f2b705); } .cc-step.p2 i { height: 38px; background: linear-gradient(180deg, #f4f6f9, #b9c1cc); } .cc-step.p3 i { height: 28px; background: linear-gradient(180deg, #f1c39c, #c47a44); }
@keyframes ccUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.place-big { display: flex; align-items: flex-start; font-size: clamp(120px, calc(14vw / var(--z)), 230px); line-height: .78; font-weight: 800; font-style: italic; letter-spacing: 0; animation: placeIn .8s .1s var(--x) both; }
.place-big .pp { font-size: .32em; margin: .1em 0 0 .08em; color: var(--pink); letter-spacing: 0; }
.place-big.win .pp { color: var(--gold); }
@keyframes placeIn { 0% { opacity: 0; transform: translateX(-120px); } 100% { opacity: 1; transform: none; } }
.res-hero .verdict { font-size: clamp(28px, calc(2.8vw / var(--z)), 46px); line-height: 1; display: flex; align-items: center; gap: 14px; animation: wipeIn .5s .55s var(--x) both; }
.res-hero .verdict small { font: 600 15px/1 var(--body); font-style: normal; text-transform: none; letter-spacing: 0; color: var(--w2); }
.rw-line.sm { padding: 6px 0; font-size: 14px; word-spacing: .25em; } .rw-line.sm .v { font-size: 18px; }
.rw-line.best .v { color: var(--green); } .rw-line.tot { border-top: 1px solid var(--w5); margin-top: 4px; padding-top: 8px; font-weight: 700; }
.place-big.win ~ .verdict { color: var(--white); }
.kerb { display: none; }
.res-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.res-actions .btn { width: 100%; }
.res-actions .btn.big { grid-column: 1 / -1; }
.res-actions .btn.big + .btn:last-child { grid-column: 1 / -1; }
.res-row { grid-template-columns: 44px 30px 1fr auto; min-height: 44px; padding: 4px 14px 4px 0; }
.res-row[data-uid] { position: relative; }
.res-row .emo { position: absolute; right: 90px; top: -12px; z-index: 2; padding: 6px 12px; background: var(--white); color: var(--ink); font: 800 italic 14px/1 var(--disp); border-radius: 14px 14px 14px 3px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); pointer-events: none; animation: emoPop 2.7s var(--x) both; }
.res-emo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.res-emo .eyebrow { margin-right: 4px; }
.res-emo kbd { font: 700 10px/1 var(--body); padding: 2px 4px; background: rgba(0, 0, 0, .35); border-radius: 2px; }
.res-row .pl { font: 800 condensed 20px/1 var(--disp); text-align: center; }
.res-row .nm { font: 700 condensed 16px/1 var(--disp); text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.res-row .tm { font: 600 15px/1 var(--body); font-variant-numeric: tabular-nums; color: var(--w2); }
.res-row.me .tm { color: var(--white); }
.res-row .tm-run { font-weight: 600; color: var(--w3); }
.res-row.me .tm-run { color: rgba(255, 255, 255, .8); }
.res-row .cpu { font: 700 10px/1 var(--body); padding: 3px 5px; background: var(--w5); color: var(--w3); }
.res-row .av, .av { width: 28px; height: 28px; display: block; border-radius: 2px; background-size: cover; background-position: center 20%; border: 0 !important; box-shadow: inset 0 -3px 0 var(--pc, transparent); }
.res-side { display: flex; flex-direction: column; gap: 18px; min-height: 0; padding: 24px; margin-bottom: 16px; background: var(--tile); border-radius: 3px; animation: tileIn .6s .3s var(--x) both; }
.rewards { display: grid; gap: 14px; align-content: start; }
.rw-line { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 2px solid var(--w5); font: 700 condensed 16px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.rw-line .v { display: flex; align-items: center; gap: 10px; font: 800 condensed 34px/1 var(--disp); color: var(--white); font-variant-numeric: tabular-nums; }
.rw-line .v .ic { width: 26px; height: 26px; }
.rw-line.promo > span:first-child { display: inline-flex; align-items: center; gap: 9px; color: var(--yellow, #ffc21a); white-space: nowrap; }
.rw-line.promo .gem { width: 24px; height: 24px; } .rw-line.promo .v { font-size: 19px; gap: 5px; } .rw-line.promo .v .ic { width: 17px; height: 17px; }
.rw-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; border-bottom: 2px solid var(--w5); }
.rw-pair .rw-line { flex-direction: column; align-items: flex-start; gap: 8px; border-bottom: 0; padding: 10px 0; }
.rw-line.rk .rk-t { display: inline-flex; align-items: center; gap: 9px; } .rw-line.rk .rk-t .gem { width: 26px; height: 26px; }
.rw-line.cs { border-bottom: 0; padding-bottom: 4px; } .rw-line.cs .v .ic { width: 18px; height: 18px; }
.bar.cs-bar { display: block; height: 4px; margin: 0 0 8px; }
.q-pay { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 600px; }
.q-pay > div { display: grid; gap: 6px; padding: 12px 14px; background: rgba(8, 9, 12, .72); border-left: 3px solid var(--pink, #ff1f6d); }
.q-pay .label { display: inline-flex; align-items: center; gap: 6px; } .q-pay .gem { width: 16px; height: 16px; }
.q-pay b { display: inline-flex; align-items: center; gap: 6px; font: italic 800 condensed 26px/1 var(--disp); color: var(--white); } .q-pay b .ic { width: 20px; height: 20px; }
.q-pay .fine { font-size: 12px; margin: 0; }
.reveal .promo-gem .gem { width: clamp(84px, calc(11vw / var(--z)), 130px); height: clamp(84px, calc(11vw / var(--z)), 130px); animation: placeIn .7s .1s var(--x) both; }
.reveal .lvl-num.promo { font-size: clamp(84px, calc(12vw / var(--z)), 170px); line-height: .9; }
.lvl-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.lvl-row .label { font: 700 condensed 15px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.lvl-badge { width: 56px; height: 56px; display: grid; place-items: center; font: 800 condensed 28px/1 var(--disp); background: var(--pink); transform: none; }
.rank-delta { font: 800 condensed 32px/1 var(--disp); }
.rank-delta.up { color: var(--gain); } .rank-delta.down { color: var(--loss); }
.pending { display: flex; gap: 14px; align-items: center; font: 700 condensed 16px/1 var(--disp); text-transform: uppercase; color: var(--w2); }

/* ---------- reveal: level-up and unlocks ---------- */
.reveal { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: rgba(8, 9, 12, .94); animation: fadeIn .3s; overflow: hidden; }
.reveal .rays { position: absolute; left: -10%; right: -10%; top: 50%; height: calc(46vh / var(--z)); margin-top: calc(-23vh / var(--z)); background: var(--rc-solid, var(--pink)); transform: skewY(-6deg); animation: slab .7s var(--x) both; opacity: .9; }
@keyframes slab { from { transform: skewY(-6deg) scaleX(0); } to { transform: skewY(-6deg) scaleX(1); } }
.reveal .content { position: relative; z-index: 1; display: grid; justify-items: center; gap: 20px; text-align: center; padding: 20px; }
.reveal .kicker { font: 700 condensed 20px/1 var(--disp); text-transform: uppercase; color: var(--white); background: var(--ink); padding: 8px 14px; transform: none; animation: wipeIn .5s .25s var(--x) both; }
.reveal .lvl-num { font-size: clamp(160px, calc(24vw / var(--z)), 300px); line-height: .78; font-weight: 800; font-style: italic; letter-spacing: 0; animation: placeIn .8s .2s var(--x) both; text-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.reveal .itm { display: grid; justify-items: center; gap: 10px; animation: rise .6s .6s var(--x) both; }
.reveal .itm-name { font-size: clamp(34px, calc(4.4vw / var(--z)), 64px); line-height: .9; }
.reveal .card3d { width: 220px; height: 290px; background: var(--tile-3) center 18% / cover no-repeat; position: relative; display: grid; place-items: center; border-radius: 3px; box-shadow: 0 0 0 4px var(--white), 0 30px 70px rgba(0, 0, 0, .55); animation: cardIn .9s .2s var(--x) both; }
.reveal .card3d .glyph { width: 100px; height: 100px; color: var(--white); }
.reveal .card3d .sw { width: 120px; height: 120px; }
@keyframes cardIn { 0% { opacity: 0; transform: perspective(900px) rotateY(-80deg) translateX(-80px); } 100% { opacity: 1; transform: none; } }
.reveal .grants { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; animation: rise .5s .8s var(--x) both; }
.reveal .tap { font: 600 14px/1 var(--body); color: var(--w2); animation: fadeIn .6s 1.3s both; margin-top: 10px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 46; }

/* ---------- small screens ---------- */
@media (max-width: 1200px) { .tabsnav .tn-i { padding: 0 11px; font-size: 14px; } }
@media (max-width: 1100px) {
  .setup { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); overflow-y: auto; }
  .setup .side { grid-column: 1 / -1; overflow: visible; }
  .mosaic { width: 100%; }
}
@media (max-width: 1000px) {
  .tabsnav { display: none; }
  .collect, .collect.flip, .lobby, .social, .prof, .results { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .lobby-side, .res-side { overflow: visible; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .strips { flex-direction: column; max-height: none; overflow-y: auto; }
  .stp { flex: none; flex-direction: column; }
  .stp .spine { width: 100%; flex-direction: row; padding: 12px 16px; gap: 14px; justify-content: flex-start; }
  .stp .spine .t { writing-mode: horizontal-tb; transform: none; font-size: 24px; flex: 1; }
  .stp.on .spine .t { opacity: 1; }
  .stp .body { display: none; padding: 0 18px 20px; min-width: 0; transform: none; }
  .stp.on .body { display: grid; }
  .stp .body .t2, .stp .big-n { display: none; }
}
@media (max-width: 720px) {
  .setup { grid-template-columns: minmax(0, 1fr); }
  .tdetail canvas { min-height: 150px; flex: none; height: 160px; }
  .gs { grid-template-columns: 34px 40px 1fr; height: 62px; }
  .gs .portrait { width: 40px; height: 40px; }
  .gs > :last-child { display: none; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 110px; max-height: none; overflow-y: auto; }
}
@media (max-width: 640px) {
  .topbar { height: 60px; }
  .me-chip .who, .wordmark span { display: none; }
  .screen { inset: 60px 0 50px; padding: 12px 16px 0; }
  .foot { height: 50px; padding: 0 16px; }
  .foot .hints { display: none; }
  .days { grid-template-columns: repeat(4, 1fr); }
  .chal { grid-template-columns: 1fr; }
  .tc-meta { display: none; }
  .modal { padding: 26px 18px 22px; }
  .dcard { width: 92px; height: 120px; }
  .drag-hint { display: none; }
  .gar { grid-template-columns: minmax(0, 1fr); }
  .rail { flex-direction: row; overflow-x: auto; order: -1; }
  .rail button { padding: 8px 12px; flex: none; }
  .grid2 { grid-template-columns: 1fr; }
  .gs:nth-child(even) { margin: 0; }
  .place-big { font-size: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ===================== identity and key art ===================== */
/* the pearl: the O of the logo is a lit pearl, the brand's one ornament */
.pearl-o { display: inline-block; width: .74em; height: .74em; margin: 0 .02em 0 .04em; border-radius: 50%; vertical-align: -.04em; background: radial-gradient(circle at 34% 30%, #fff 0 9%, #fdf6ff 16%, #f1e3ee 38%, #d8c6dc 62%, #b7a6c4 82%, #8f7fa6 100%); box-shadow: inset -.06em -.08em .14em rgba(80, 40, 90, .35), inset .04em .05em .08em rgba(255, 255, 255, .9), 0 .03em .12em rgba(255, 31, 109, .35); }
/* the logo's O: the letter itself, in pearl (white to lilac, lit from the top left) */
.po, .wordmark b .po { background: radial-gradient(circle at 36% 30%, #ffffff 0 16%, #f7eff7 34%, #e4d4e6 58%, #c2b1cd 80%, #9d8cb1 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tc-logo .p .po, .logo .l1 .po { filter: drop-shadow(0 .02em .05em rgba(8, 9, 12, .4)); }
@keyframes pearlShine { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15) drop-shadow(0 0 .12em rgba(255, 79, 143, .8)); } }

/* full-screen circuit art behind track select and the lobby: crossfade with a slow push-in */
.backdrop { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.backdrop i { position: absolute; inset: -3%; background: center / cover no-repeat; opacity: 0; transform: scale(1.06); transition: opacity .7s var(--x), transform 9s linear; }
.backdrop i.on { opacity: 1; transform: scale(1); }
.shell[data-side="art"] .scrim { background: linear-gradient(90deg, rgba(8, 9, 12, .86) 0%, rgba(8, 9, 12, .4) 30%, rgba(8, 9, 12, 0) 55%, rgba(8, 9, 12, .55) 100%), linear-gradient(0deg, rgba(8, 9, 12, .7) 0%, rgba(8, 9, 12, 0) 34%), linear-gradient(180deg, rgba(8, 9, 12, .6) 0%, rgba(8, 9, 12, 0) 18%); }

/* tab change: a pink slash and a white hairline cut across the screen */
.tabwipe { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.tabwipe i { position: absolute; top: -10%; bottom: -10%; left: 0; transform: translateX(calc(-30vw / var(--z))) skewX(-20deg); }
.tabwipe i:nth-child(1) { width: calc(22vw / var(--z)); background: var(--pink); opacity: .9; animation: slash .55s var(--snap) forwards; }
.tabwipe i:nth-child(2) { width: 6px; background: var(--white); animation: slash .55s .06s var(--snap) forwards; }
@keyframes slash { to { transform: translateX(calc(130vw / var(--z))) skewX(-20deg); } }

/* tiles lift a little in focus (they leaned toward the pointer under a sheen: a template effect) */
.tile:hover, .tile:focus-visible, .tile.on { transform: scale(1.02); }
.tile { transition: transform .25s var(--x), box-shadow .2s; }
.dcard:hover { transform: translateY(-4px); }
.tile::before { content: none; }
.tile:hover::before { background-position: 0 0; }

/* home: the featured circuit slideshow inside the race tile */
.mosaic .t-race { background: #111; }
.mosaic .t-race .show { position: absolute; inset: 0; z-index: 0; }
.mosaic .t-race .show i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.1); transition: opacity 1s var(--x), transform 6s linear; }
.mosaic .t-race .show i.on { opacity: 1; transform: scale(1); }
.mosaic .t-race .shade { background: linear-gradient(0deg, rgba(8, 9, 12, .9) 0%, rgba(8, 9, 12, .5) 32%, rgba(8, 9, 12, 0) 62%), linear-gradient(180deg, rgba(8, 9, 12, .6), rgba(8, 9, 12, 0) 32%); }
.mosaic .t-race .feat { position: absolute; right: 18px; top: 14px; z-index: 1; display: grid; justify-items: end; gap: 4px; text-align: right; }
.mosaic .t-race .feat .label { color: var(--w2); }
.mosaic .t-race .feat b { font: 800 condensed 15px/1 var(--disp); text-transform: uppercase; letter-spacing: 0; }
.mosaic .t-race .feat.swap b { animation: wipeIn .5s var(--x); }

/* play: each mode tile carries a circuit photograph under its colour */
.stp { background: #0e0f15 var(--img) center / cover no-repeat; }
.stp::before { opacity: 1; background: rgba(10, 11, 16, .8); transition: background .4s, opacity .4s; }
.stp:hover::before { background: rgba(10, 11, 16, .62); }
.stp.on::before { background: var(--mc); opacity: .8; }
.stp.on { transform: none; }

/* setup: thumbnails in the circuit list, and the detail column floats on the key art */
.trow { grid-template-columns: 72px 1fr auto; padding: 8px 14px 8px 8px; background: rgba(14, 15, 21, .78); }
.trow .th { grid-row: 1 / span 2; width: 72px; height: 42px; background: #222 center / cover no-repeat; border-radius: 1px; }
.trow .nm, .trow .pl { grid-column: 2; }
.tdetail canvas { flex: 0 1 auto; height: min(calc(34vh / var(--z)), 300px); min-height: 140px; margin-top: auto; margin-bottom: 18px; opacity: .95; }
.tdetail .tn { text-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
.lobby-side, .side { background: rgba(14, 15, 21, .82); }

/* every home tile but settings is a picture; the shade keeps its name readable and lifts on hover */
.tile.art { background-size: cover; background-position: center; }
.tile.art .shade { background: linear-gradient(0deg, rgba(8, 9, 12, .92) 0%, rgba(8, 9, 12, .45) 55%, rgba(8, 9, 12, .15) 100%); transition: opacity .3s; }
.tile.art:hover .shade { opacity: .75; }
.tile .stat-v, .tile .tk, .tile .bar { z-index: 1; }
/* let the circuit photograph through: dark on closed tiles, the mode colour rising from the bottom on the open one */
.stp::before { background: linear-gradient(0deg, rgba(10, 11, 16, .9) 0%, rgba(10, 11, 16, .55) 100%); }
.stp:hover::before { background: linear-gradient(0deg, rgba(10, 11, 16, .85) 0%, rgba(10, 11, 16, .3) 100%); }
.stp.on::before { background: var(--mc); opacity: .92; -webkit-mask: linear-gradient(0deg, #000 30%, rgba(0, 0, 0, .25) 75%, rgba(0, 0, 0, .1)); mask: linear-gradient(0deg, #000 30%, rgba(0, 0, 0, .25) 75%, rgba(0, 0, 0, .1)); }

/* ===================== events: four big cards ===================== */
.events { display: flex; gap: 12px; flex: 1; min-height: 0; max-height: 640px; padding-bottom: 14px; }
.ev { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; color: var(--white); background: #0e0f15; border-radius: 3px; cursor: pointer; outline: none; transition: flex-grow .55s var(--x), box-shadow .2s, transform .3s var(--x); animation: tileIn .6s var(--x) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
.ev:is([data-mode="casual"],[data-mode="ranked"],[data-mode="local-quick"]) { --mc: linear-gradient(0deg, #c4004c, #ff1f6d); }
.ev[data-mode="gp"] { --mc: linear-gradient(0deg, #8a5a00, #ffb21a); }
.ev[data-mode="tt"] { --mc: linear-gradient(0deg, #00603a, #1fd48a); }
.ev[data-mode="private"] { --mc: linear-gradient(0deg, #003c80, #1aa6ff); }
.ev-img { position: absolute; inset: 0; background: var(--img) center / cover no-repeat; transform: scale(1.05); transition: transform 7s linear, filter .4s; filter: saturate(.55) brightness(.75); }
.ev.on .ev-img { transform: scale(1.16); filter: none; }
.ev::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(0deg, rgba(8, 9, 12, .96) 0%, rgba(8, 9, 12, .5) 55%, rgba(8, 9, 12, .25) 100%); transition: opacity .4s; }
.ev::after { content: ''; position: absolute; inset: 0; z-index: 0; background: var(--mc); opacity: 0; -webkit-mask: linear-gradient(0deg, #000 18%, rgba(0, 0, 0, .55) 45%, transparent 75%); mask: linear-gradient(0deg, #000 18%, rgba(0, 0, 0, .55) 45%, transparent 75%); transition: opacity .45s; }
.ev.on { flex-grow: 2.1; box-shadow: 0 0 0 3px var(--white), 0 24px 60px rgba(0, 0, 0, .55); }
.ev.on::after { opacity: 0; }
.ev.on .ev-band { box-shadow: inset 0 3px 0 var(--ec, var(--pink)); }
.ev:hover:not(.on) .ev-img { filter: saturate(.8) brightness(.9); }
.ev > span { position: relative; z-index: 1; }
.ev-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px 0; }
.ev-top .stag { font: 700 condensed 11px/1 var(--disp); text-transform: uppercase; letter-spacing: .04em; padding: 6px 9px; background: rgba(8, 9, 12, .7); border-radius: 2px; }
.ev.on .ev-top .stag { background: var(--pink); }
.ev-n { display: none; }
.ev.on .ev-n { color: var(--white); }
.ev-main { margin-top: auto; display: grid; justify-items: start; gap: 10px; padding: 0 24px 18px; }
.ev-main .t2 { font: 800 condensed clamp(26px, calc(2.6vw / var(--z)), 46px)/.9 var(--disp); letter-spacing: 0; text-transform: uppercase; text-shadow: 0 4px 24px rgba(0, 0, 0, .45); transition: font-size .4s var(--x); }
.ev.on .ev-main .t2 { font-size: clamp(36px, calc(3.6vw / var(--z)), 64px); }
.ev-main .d { max-width: 420px; font: 500 14.5px/1.45 var(--body); color: rgba(255, 255, 255, .86); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev:not(.on) .ev-main .d { -webkit-line-clamp: 2; color: var(--w3); }
/* readable on pale card art (the Red Square aerial behind Ranked) */
.ev.on .ev-main .d { color: #fff; text-shadow: 0 0 2px rgba(0, 0, 0, .95), 0 1px 3px rgba(0, 0, 0, .9), 0 0 18px rgba(0, 0, 0, .8); }
.ev-acts { display: flex; gap: 6px; flex-wrap: wrap; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s var(--x), opacity .25s; }
.ev.on .ev-acts { max-height: 70px; opacity: 1; transition-delay: .12s; }
.ev-acts .btn { height: 46px; }
.ev-acts .btn.primary { background: var(--white); color: var(--ink); }
.ev-acts .btn.primary kbd { background: var(--ink); color: var(--white); }
.ev-acts .btn.ghost { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.race-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--tile); }
.race-tabs .btn { min-width: 92px; }
.race-tabs .btn[aria-pressed="true"] { color: var(--ink); background: var(--white); }
.race-room-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.race-room-tools .join { margin: 0; flex: 1 1 190px; }
.race-room-tools .input { min-width: 0; }
.ev:not(.on) .ev-acts button { visibility: hidden; }
.ev-band { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; padding: 13px 24px; background: rgba(8, 9, 12, .82); font: 600 13px/1 var(--body); color: var(--w2); border-top: 1px solid rgba(255, 255, 255, .08); }
.ev-band > span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.ev-band .ic { width: 15px; height: 15px; }
.ev-band .gem { width: 18px; height: 18px; }
.ev-meter i { position: relative; display: inline-block; width: 42px; height: 5px; margin-left: 4px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.ev-meter i::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--f, 0)); background: var(--yellow, #ffc21a); }
.ev-meter.full { color: var(--w3, rgba(255, 255, 255, .55)); }
.ev-meter.full i::after { background: rgba(255, 255, 255, .4); }
.ev:not(.on) .ev-band > span:nth-child(n+2) { display: none; }
.ev.locked .ev-acts .btn.primary { opacity: .45; }
@media (max-width: 1000px) {
  .events { flex-direction: column; max-height: none; overflow-y: auto; }
  .ev { flex: none; min-height: 150px; }
  .ev.on { min-height: 340px; }
}
.ev > .ev-img { position: absolute; z-index: 0; }

/* ===================== pro finish ===================== */
/* depth of field: on list and setup screens the 3D world goes soft so the interface sits in front of it */
#app { transition: filter .6s var(--x); }
body.bg-blur:not(.in-race) #app { filter: blur(7px) saturate(1.1) brightness(.82); }

/* tiles are flat plates; focus is the white frame and a lift, nothing glows */
.tile.art, .ev, .t-race, .t-drivers { background-image: none; }
.tile:hover, .tile:focus-visible, .tile.on { box-shadow: 0 0 0 3px var(--white), 0 18px 40px rgba(0, 0, 0, .45); }
.ev.on { box-shadow: 0 0 0 3px var(--white), 0 24px 60px rgba(0, 0, 0, .55); }
.trow[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--white), inset 4px 0 0 var(--pink); }
.ev > .sweep { display: none; }
.mosaic .t-race::before { content: none; }
/* duotone icons sit a little larger */
.tile .big-ic { opacity: .9; width: 30px; height: 30px; right: 16px; top: 16px; }
.goal { position: relative; z-index: 1; margin-bottom: 8px; font: 700 condensed 13px/1 var(--disp); text-transform: uppercase; letter-spacing: .1em; color: var(--white); padding: 6px 9px; background: rgba(8, 9, 12, .72); border-radius: 2px; justify-self: start; align-self: flex-start; }

/* (no drifting motes of light: decoration, not information) */
.dust { display: none; }
.dust i { position: absolute; left: var(--x); bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 8px rgba(255, 255, 255, .6); opacity: 0; animation: mote var(--d) var(--dl) linear infinite; }
.dust i:nth-child(3n) { background: rgba(255, 79, 143, .7); box-shadow: 0 0 10px rgba(255, 31, 109, .8); }
@keyframes mote { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .8; } 80% { opacity: .5; } 100% { transform: translate(40px, calc(-105vh / var(--z))); opacity: 0; } }
.shell[data-screen="title"] .dust i { animation-duration: calc(var(--d) * .8); }

/* ===================== typography: contrast, not sameness =====================
   (Superseded 19 Nov 2026 by Sofia Sans, see the header; the rules below keep their sizes.) */
.stag, .tk, .ev-top .stag, .tdetail .where, #intro-haz, .chip, .ev-band, .label, .eyebrow, .foot, .lvl-row .label, .rw-line, .specs .label, .drv-info .meta .label, .tile .tk { font-stretch: 75%; }
.eyebrow { font: 600 condensed 14px/1 var(--disp); letter-spacing: .14em; }
.tile .tk, .ev-top .stag, .tdetail .where { font: 600 condensed 12px/1 var(--disp); letter-spacing: .12em; text-transform: uppercase; }
.label { font: 600 condensed 12.5px/1.2 var(--disp); letter-spacing: .08em; text-transform: uppercase; color: var(--w3); }
.ev-band { font: 600 condensed 13px/1 var(--disp); letter-spacing: .08em; text-transform: uppercase; }
.tabsnav .tn-i { font: 700 condensed 15px/40px var(--disp); letter-spacing: .1em; }
.foot { font: 600 condensed 13px/1 var(--disp); letter-spacing: .08em; text-transform: uppercase; }
.btn { font: 700 condensed 12.5px/1 var(--disp); letter-spacing: .07em; }
.btn.big { font-size: 15px; }
.ev-main .d, .tdetail .bl, .tagline, .fine, .tile .ts, .stp .body .d { font-weight: 400; letter-spacing: .005em; }
.ev-main .t2 { letter-spacing: 0; }
.ev.on .ev-main .t2 { font-size: clamp(40px, calc(4.2vw / var(--z)), 74px); }
.mosaic .t-race .tl { font-size: clamp(52px, calc(5.4vw / var(--z)), 92px); letter-spacing: 0; }
.hero-name { font-size: clamp(52px, calc(5.8vw / var(--z)), 98px); letter-spacing: 0; }
.tdetail .tn { font-size: clamp(40px, calc(4.2vw / var(--z)), 74px); letter-spacing: 0; }
.stat-v small, .mosaic .stat-v small { font: 500 condensed 15px/1 var(--disp); letter-spacing: .04em; color: var(--w3); margin-left: 6px; }
.tile .tl { font-stretch: 100%; font-size: 19px; letter-spacing: 0; }
.home-head .hi { font-size: 24px; letter-spacing: 0; }
.home-head .hi small { font: 600 condensed 13px/1 var(--disp); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.dcard .nm { font: 700 condensed 15px/1 var(--disp); letter-spacing: .04em; }
.dcard .cls { font: 600 condensed 11px/1 var(--disp); letter-spacing: .1em; }
.stat .label { font: 600 condensed 13px/1 var(--disp); letter-spacing: .1em; }
.icard .nm { font: 700 condensed 15px/1.05 var(--disp); letter-spacing: .03em; }
.rail button { font: 700 condensed 12px/1 var(--disp); letter-spacing: .08em; }
.trow .nm { letter-spacing: 0; }
/* garage: the item column sits on its own panel so the kart behind never shows through the text */
.gar-main { background: rgba(10, 11, 16, .86); padding: 16px 16px 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.shell[data-side="right"] .scrim { background: linear-gradient(270deg, rgba(8, 9, 12, .7) 0%, rgba(8, 9, 12, .2) 50%, rgba(8, 9, 12, 0) 70%), linear-gradient(0deg, rgba(8, 9, 12, .7) 0%, rgba(8, 9, 12, 0) 30%), linear-gradient(180deg, rgba(8, 9, 12, .6) 0%, rgba(8, 9, 12, 0) 18%); }

/* ===================== colour in type =====================
   Not flat white, not paint, not outlines: type is lit. Display names carry a pearl gradient — white where the
   light hits the top, warming to a pale pearl-pink at the foot — and the last word of a two-word name takes the
   brand's pink in the same lit way. Legibility over pictures comes from a soft cast shadow, never a stroke.
   Secondary text is a lilac-tinted grey from the same family, so nothing reads as default grey-on-black.
   Since 19 Nov 2026 type is flat instead: white for names, gold for the win, neutral greys for secondary text (the
   gradient fills, pink last words and lilac greys read as generated). */
:root { --w2: #d3d5db; --w3: #8d919a; }
.ev-main .t2, .tdetail .tn, .hero-name, .mosaic .tl, .place-big, .reveal .lvl-num, .tc-logo .p, .logo .l1, #intro-name, .lobby-head .ttl, .reveal .itm-name, .h1, .h2, .mosaic .stat-v, #pause .card-title {
  color: var(--white); text-shadow: 0 2px 14px rgba(8, 9, 12, .35); }
.ev-main .t2 em, .tdetail .tn em, .hero-name em, #intro-name em, .h2 em, .lobby-head .ttl em, .reveal .itm-name em { font-style: normal; color: inherit; }
.place-big.win, .reveal .lvl-num { color: var(--gold); }
.place-big .pp { color: inherit; }
.mosaic .stat-v small { -webkit-text-fill-color: var(--w3); }
.tc-logo .p span:first-child, .logo .l1 span:first-child { color: var(--pink); }
.wordmark b { color: var(--pink); }
/* each event has its own signal colour for its kicker and its info strip */
.ev:is([data-mode="casual"],[data-mode="ranked"],[data-mode="local-quick"],[data-mode="teams"]) { --ec: #ff1f6d; } .ev[data-mode="gp"] { --ec: #ffc61a; } .ev[data-mode="tt"] { --ec: #2ee07e; } .ev[data-mode="custom"] { --ec: #1ad1ff; --mc: linear-gradient(0deg, #003c80, #1aa6ff); }
.ev .ev-top .stag { box-shadow: inset 3px 0 0 var(--ec); }
.ev.on .ev-top .stag { background: var(--ec); color: #0b0c10; box-shadow: none; }
.ev:is([data-mode="casual"],[data-mode="ranked"],[data-mode="local-quick"]).on .ev-top .stag { color: #fff; }
.ev-band .ic, .ev-band .dot { color: var(--ec); }
/* small text: lilac tints instead of washed white */
.tile .ts, .ev-main .d, .tdetail .bl, .tagline, .fine { color: var(--w2); }
.tile .tk, .label, .foot, .ev-band { color: var(--w3); }
.tile .tk.live { color: #fff; }
.tdetail .where { box-shadow: none; }
/* setup: fixed rules shown as a spec list, not as greyed-out controls */
.fixed { display: grid; gap: 0; }
.fixed .label { margin-bottom: 8px; }
.fixed b { display: flex; align-items: center; gap: 10px; padding: 12px 0; font: 700 condensed 15px/1 var(--disp); text-transform: uppercase; letter-spacing: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.fixed b::before { content: none; }
.seg button[aria-pressed="true"] { background: var(--white); box-shadow: none; }
.btn.primary { background: var(--pink); box-shadow: none; }
.btn.primary:hover { background: var(--pink-2); }

/* =====================================================================
   Loadout (driver, then kart) and the online lobby
   The 3D studio fills the frame; the roster or the part columns sit on the left, the name and the stats lower
   right, Back bottom-left and OK bottom-right (Mario Kart 8 Deluxe's order and button places, our own look).
   ===================================================================== */
.shell[data-side="loadout"] .scrim { background: linear-gradient(90deg, rgba(8, 9, 12, .84) 0%, rgba(8, 9, 12, .55) 26%, rgba(8, 9, 12, 0) 44%), linear-gradient(270deg, rgba(8, 9, 12, .78) 0%, rgba(8, 9, 12, .45) 20%, rgba(8, 9, 12, 0) 34%), linear-gradient(0deg, rgba(8, 9, 12, .55) 0%, rgba(8, 9, 12, 0) 24%), linear-gradient(180deg, rgba(8, 9, 12, .5) 0%, rgba(8, 9, 12, 0) 14%); }
.screen.lo-screen, .screen.lobby-screen { padding-top: 12px; }
.lo { --lw: min(560px, calc(calc(100vh / var(--z)) - 318px), calc(40vw / var(--z))); position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--lw) minmax(0, 1fr) minmax(330px, 420px); grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 26px; }
/* the part columns need width more than height, the roster both */
.lo.kart { --lw: min(560px, calc(42vw / var(--z))); }
.lo-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; padding-bottom: 14px; transition: opacity .3s, transform .4s var(--x); }
.lo-steps { display: flex; align-items: center; gap: 12px; }
.lo-steps button { display: inline-flex; align-items: baseline; gap: 9px; font: 800 condensed 21px/1 var(--disp); text-transform: uppercase; letter-spacing: 0; color: var(--w3); transition: color .2s; }
.lo-steps button b { font-size: 13px; font-variant-numeric: tabular-nums; }
.lo-steps button:hover { color: var(--w2); }
.lo-steps button[aria-current="true"] { color: var(--white); }
.lo-steps button[aria-current="true"] b { color: var(--pink); }
.lo-steps i { width: 24px; height: 3px; background: var(--w4); transform: none; }
.lo-ctx { display: flex; align-items: center; gap: 9px; font: 600 14px/1 var(--body); color: var(--w2); }
.lo-ctx b { color: var(--white); font-weight: 700; font-variant-numeric: tabular-nums; }
.lo-left { grid-row: 2; grid-column: 1; position: relative; z-index: 2; min-height: 0; display: flex; flex-direction: column; gap: 10px; transition: opacity .3s, transform .4s var(--x); }
.lo-left.in > * { animation: tileIn .42s var(--x) both; }
.lo-left.in > :nth-child(2) { animation-delay: 40ms; } .lo-left.in > :nth-child(3) { animation-delay: 80ms; }
.lo-stage { grid-row: 2; grid-column: 2 / 4; z-index: 1; cursor: grab; touch-action: none; }
.lo-stage:active { cursor: grabbing; }
.lo-info { grid-row: 2; grid-column: 3; z-index: 2; align-self: end; display: grid; gap: 16px; pointer-events: none; transition: opacity .3s, transform .4s var(--x); }
.lo-info > * { pointer-events: auto; }
.lo-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 14px 0 4px; z-index: 2; }
.lo-bar [data-ok] { margin-left: auto; min-width: 250px; }
.lo-bar [data-ok] small { margin-left: 4px; font-size: 12px; opacity: .72; }
.lo-bar [data-ok].saved { background: var(--white); color: var(--ink); }
.lo-why { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 var(--body); color: var(--w2); }
.lo-why .ic { width: 16px; height: 16px; }
/* inspect: the panels step aside and the kart has the frame */
.lo.inspect .lo-left, .lo.inspect .lo-info { opacity: 0; transform: translateX(-40px); pointer-events: none; }
.lo.inspect .lo-info { transform: translateX(40px); }
.lo.inspect .lo-stage { grid-column: 1 / -1; }

/* ---------- the roster: 4 × 4 faces ---------- */
.ros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-content: start; }
.rt { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--tile-3); border-radius: 2px; transition: transform .28s var(--x), box-shadow .2s; animation: tileIn .5s var(--x) both; animation-delay: calc(var(--i) * 16ms + 30ms); }
/* a fifth row (17-20 drivers) would run under the Back button: the tiles get a 5:4 face so five rows fill the height of four
   (phones have 8 columns and room to spare) */
@media (min-width: 901px) { .ros:has(> .rt:nth-child(17)) .rt { aspect-ratio: 5 / 4; } }
.rt .ph { position: absolute; inset: 0; background: center 16% / cover no-repeat; transition: transform .45s var(--x), filter .25s; }
.rt::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(8, 9, 12, .92) 0%, rgba(8, 9, 12, .25) 42%, rgba(8, 9, 12, 0) 60%); }
.rt::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 4px; background: var(--rc, var(--r-common)); transition: height .2s, background .2s; }
.rt .nm { position: absolute; left: 9px; right: 6px; bottom: 11px; z-index: 2; font: 800 13px/1.05 var(--disp); text-transform: uppercase; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
.rt:hover .ph { transform: scale(1.06); }
.rt.on { z-index: 3; transform: translateY(-4px); box-shadow: 0 0 0 3px var(--white), 0 16px 32px rgba(0, 0, 0, .5); }
.rt.on::after { height: 5px; background: var(--pink); }
.rt.on .ph { transform: scale(1.08); }
.rt.locked .ph { filter: grayscale(1) brightness(.42); }
.rt.locked.on .ph { filter: grayscale(.6) brightness(.62); }
.rt .lk { position: absolute; right: 7px; top: 7px; z-index: 2; } .rt .lk .ic { width: 16px; height: 16px; }
.rt .new, .pt .new { display: none; position: absolute; left: 7px; top: 7px; z-index: 3; padding: 3px 6px; font: 800 condensed 10.5px/1 var(--disp); text-transform: uppercase; color: var(--white); background: var(--pink); transform: none; }
.rt.is-new .new, .pt.is-new .new { display: block; }
.rt .eqd { display: none; position: absolute; right: 8px; top: 8px; z-index: 2; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--ink); }
.rt.eq:not(.locked) .eqd { display: block; }

/* ---------- the part columns: carousels ---------- */
.lo-pages { display: flex; align-items: center; gap: 4px; }
.lo-pages button { height: 32px; padding: 0 16px; font: 700 condensed 12.5px/32px var(--disp); text-transform: uppercase; color: var(--w2); background: var(--tile); transform: none; transition: background .2s, color .2s; }
.lo-pages button:hover { color: var(--white); }
.lo-pages button[aria-pressed="true"] { color: var(--ink); background: var(--white); }
.lo-pages kbd { margin-left: 10px; }
.pcols { flex: 1; min-height: 300px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pcols.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pcol { container-type: inline-size; position: relative; display: flex; flex-direction: column; min-height: 0; background: rgba(14, 15, 21, .5); border-radius: 2px; transition: background .25s; cursor: pointer; }
.pcol.on { background: rgba(14, 15, 21, .86); }
.pc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 12px 12px 0; font: 800 condensed 14px/1 var(--disp); text-transform: uppercase; color: var(--w3); transition: color .2s; }
.pcol.on .pc-h { color: var(--white); }
.pc-h em { font: 600 12px/1 var(--body); font-style: normal; color: var(--w3); font-variant-numeric: tabular-nums; }
.n5 .pc-h { font-size: 11.5px; padding: 10px 8px 0; } .n5 .pc-h em { display: none; }
@container (max-width: 150px) { .pc-h { font-size: 12px; padding: 10px 8px 0; } .pc-h em { display: none; } }
.pc-win { position: relative; flex: 1; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
/* the chosen part's slot: two chevrons on the column that has the cursor */
.pc-frame { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.pcol.on .pc-frame { opacity: 1; }
.pc-frame::before, .pc-frame::after { content: ''; position: absolute; left: -7px; border: 7px solid transparent; }
.pc-frame::before { top: -86px; border-bottom: 8px solid var(--pink); border-top: 0; }
.pc-frame::after { top: 78px; border-top: 8px solid var(--pink); border-bottom: 0; }
.n5 .pc-frame::before { top: -56px; } .n5 .pc-frame::after { top: 48px; }
.pt { position: absolute; left: 50%; top: 50%; width: min(168px, 92%); aspect-ratio: 4 / 3; height: auto; border-radius: 2px; transform-origin: 50% 50%; background: radial-gradient(ellipse 62% 52% at 50% 60%, rgba(255, 255, 255, .17), rgba(255, 255, 255, .04) 70%, transparent 100%), #1b1d25; transition: transform .34s var(--x), opacity .3s, box-shadow .2s, background .2s; will-change: transform; }
.n5 .pt { width: 92%; }
.pt.far { pointer-events: none; }
.pt::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc, var(--r-common)); opacity: .9; }
.pt .picon { position: absolute; inset: 0; }
.pt .sw { position: absolute; inset: 22% 26%; border-radius: 50%; box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .35), inset 0 6px 10px rgba(255, 255, 255, .25); }
.pt .sw.trail { inset: 38% 14%; border-radius: 10px; }
/* Flair page swatches: a finish on your paint colour (UI swatch, not a kart material), a puff of smoke */
.pt .sw.fin { inset: 16% 30% 34%; background: var(--pc); }
.sw.fin-gloss { background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .85) 0 8%, transparent 22%), var(--pc) !important; }
.sw.fin-satin { background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35) 0 10%, transparent 40%), var(--pc) !important; }
.sw.fin-matte { box-shadow: none !important; filter: saturate(.8) brightness(.92); }
.sw.fin-metallic { background: linear-gradient(160deg, rgba(255, 255, 255, .7), transparent 38%, rgba(0, 0, 0, .45) 70%, rgba(255, 255, 255, .3)), var(--pc) !important; }
.sw.fin-pearlescent { background: linear-gradient(135deg, rgba(255, 180, 230, .55), transparent 40%, rgba(140, 220, 255, .55) 80%), var(--pc) !important; }
.sw.fin-candy { background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .9) 0 7%, transparent 20%), radial-gradient(circle at 50% 60%, var(--pc), #000 140%) !important; }
.sw.fin-flake { background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .8) 0 6%, transparent 18%), linear-gradient(160deg, rgba(255, 255, 255, .45), transparent 45%, rgba(0, 0, 0, .4)), var(--pc) !important; }
/* victory tiles: a badge in the celebration's colours (UI icon) */
.pt .vic { position: absolute; inset: 16% 24% 34%; display: grid; place-items: center; border-radius: 50%; }
.pt .vic .glyph { width: 46%; height: 46%; color: var(--white); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.vic.v-confetti { background: radial-gradient(circle at 22% 30%, #ff4b5c 0 6%, transparent 7%), radial-gradient(circle at 70% 22%, #ffd23f 0 6%, transparent 7%), radial-gradient(circle at 80% 62%, #5ad45a 0 6%, transparent 7%), radial-gradient(circle at 30% 75%, #2fb4ff 0 6%, transparent 7%), radial-gradient(circle at 55% 84%, #ff6fb5 0 5%, transparent 6%), radial-gradient(circle at 48% 12%, #c46bff 0 5%, transparent 6%), #2a1840; }
.vic.v-donut { background: radial-gradient(circle, #24262e 0 30%, #d9d9d6 31% 60%, #8a8a88 61%); }
.vic.v-burnout { background: radial-gradient(circle at 50% 70%, #ff7a2f 0 18%, #d6d6d2 19% 55%, #6c6c6a 56%); }
.vic.v-fireworks { background: radial-gradient(circle at 30% 30%, #ffd23f 0 8%, transparent 9%), radial-gradient(circle at 70% 40%, #ff4b5c 0 7%, transparent 8%), radial-gradient(circle at 45% 70%, #2fb4ff 0 7%, transparent 8%), #10142a; }
.vic.v-goldrain { background: linear-gradient(180deg, #fff1b3, #ffd23f 45%, #b8860b); }
.pt.locked .vic { filter: grayscale(.85) brightness(.5); }
.pt .sw.smk { inset: 18% 22% 32%; border-radius: 50%; box-shadow: none; background: radial-gradient(circle at 30% 60%, var(--s1) 0 26%, transparent 27%), radial-gradient(circle at 62% 42%, var(--s2) 0 30%, transparent 31%), radial-gradient(circle at 70% 72%, var(--s3) 0 22%, transparent 23%); filter: blur(1px); }
.pt .gl { position: absolute; inset: 0 0 22% 0; display: grid; place-items: center; } .pt .gl .ic { width: 34%; height: 34%; color: var(--w2); }
.pt .dc { position: absolute; left: 8%; right: 8%; top: 18%; height: 38%; background: center / 100% 100% no-repeat; }
.pt .tn { position: absolute; left: 6px; right: 6px; bottom: 9px; font: 700 11px/1.05 var(--disp); text-transform: uppercase; text-align: center; color: var(--w2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt.on .tn { color: var(--white); }
.pt .lk { position: absolute; right: 6px; top: 6px; } .pt .lk .ic { width: 15px; height: 15px; }
.pt.locked .picon, .pt.locked .sw, .pt.locked .gl { filter: grayscale(.85) brightness(.5); }
.pt.on { background: radial-gradient(ellipse 62% 52% at 50% 60%, rgba(255, 255, 255, .26), rgba(255, 255, 255, .06) 70%, transparent 100%), #252833; }
.pcol.on .pt.on { box-shadow: 0 0 0 3px var(--white), 0 14px 28px rgba(0, 0, 0, .5); }
.pcol.on .pt.on::after { height: 5px; background: var(--pink); opacity: 1; }
.pt:not(.on):hover { opacity: 1 !important; }
/* the chosen part under the columns */
.lo-sel { min-height: 76px; display: grid; gap: 8px; align-content: start; }
.ls-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ls-name .k { font: 600 13px/1 var(--body); color: var(--w3); }
.ls-name b { font: 800 condensed 22px/1 var(--disp); text-transform: uppercase; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lo .req { padding: 10px 12px; gap: 10px; font-size: 13.5px; }
.lo .req .btn { margin-left: auto; }
.lo .req .btn .ic { width: 16px; height: 16px; }

/* ---------- name and stats, lower right ---------- */
.lo-hero { display: grid; gap: 10px; justify-items: start; }
/* on the kart step the build line and the stats share one card */
.lo.kart .lo-info { gap: 0; background: rgba(12, 13, 18, .84); border-radius: 3px; }
.lo.kart .lo-hero { padding: 16px 18px 4px; gap: 8px; }
.lo.kart .ls { background: none; }
.lo-hero.swap > * { animation: tileIn .42s var(--x) both; }
.lo-hero.swap > :nth-child(2) { animation-delay: 35ms; } .lo-hero.swap > :nth-child(3) { animation-delay: 70ms; } .lo-hero.swap > :nth-child(4) { animation-delay: 105ms; }
.lo-hero .meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lo-hero .cls { font: 700 condensed 13.5px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.lo-info, .lo-hero { min-width: 0; }
.lo-hero .hero-name { max-width: 100%; font-size: clamp(36px, calc(3.7vw / var(--z)), 66px); }
.lo-hero .hero-name.long { font-size: clamp(30px, calc(2.9vw / var(--z)), 52px); }
.lo-hero .hero-name.xlong { font-size: clamp(26px, calc(2.4vw / var(--z)), 42px); }
.lo-hero .tagline { font-size: 15px; }
.lo-hero .build { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font: 800 condensed clamp(17px, calc(1.5vw / var(--z)), 23px)/1.05 var(--disp); text-transform: uppercase; letter-spacing: 0; color: var(--w3); }
.lo-hero .build span { transition: color .2s; } .lo-hero .build span.on { color: var(--white); }
.lo-hero .build i { font-style: normal; color: var(--pink); }
.ls { display: grid; gap: 9px; padding: 15px 18px 14px; background: rgba(12, 13, 18, .82); border-radius: 3px; }
.ls-h { display: flex; align-items: center; gap: 12px; min-height: 22px; }
.ls-t { font: 800 condensed 13px/1 var(--disp); text-transform: uppercase; }
.ls-leg { display: none; align-items: center; gap: 6px; font: 600 12px/1 var(--body); color: var(--w2); }
.ls-leg i { width: 10px; height: 10px; margin-left: 6px; }
.lo.det .ls-leg { display: flex; }
.ls-d { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font: 700 12.5px/1 var(--body); color: var(--w2); }
.ls-d:hover { color: var(--white); }
.ls-d kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; font: 700 11px/1 var(--body); color: var(--ink); background: var(--white); border-radius: 11px; }
.ls-r { display: grid; grid-template-columns: 118px minmax(0, 1fr) 74px; align-items: center; gap: 12px; }
.ls-l { font: 700 condensed 11.5px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.ls-b { position: relative; height: 10px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.ls-b .f { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--white); transition: width .5s var(--x), left .5s var(--x), background .3s; }
.s0 { background: #ffffff; } .s1 { background: #a9adb9; } .s2 { background: #5f6371; }
.ls-b .f.s0 { background: var(--white); }
.lo.det .ls-b .f.s1 { background: #a9adb9; } .lo.det .ls-b .f.s2 { background: #5f6371; }
.lo:not(.det) .ls-b .f.s1, .lo:not(.det) .ls-b .f.s2 { background: var(--white); }
.ls-b .g { position: absolute; top: 0; bottom: 0; left: 0; width: 0; transition: width .5s var(--x), left .5s var(--x); }
.ls-b .g.up { background: var(--gain); }
.ls-b .g.dn { background: repeating-linear-gradient(-45deg, var(--loss) 0 3px, rgba(255, 59, 59, .4) 3px 6px); }
.ls-b .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--n, 9) - 2px), rgba(12, 13, 18, .92) calc(100% / var(--n, 9) - 2px) calc(100% / var(--n, 9))); }
.ls-n { display: flex; justify-content: flex-end; align-items: baseline; gap: 6px; white-space: nowrap; }
.ls-n b { font: 800 condensed 17px/1 var(--disp); font-variant-numeric: tabular-nums; }
.lo.det .ls-n b { font: 700 13.5px/1 var(--body); font-variant-numeric: tabular-nums; }
.ls-n em { font: 700 12px/1 var(--body); font-style: normal; font-variant-numeric: tabular-nums; }
.ls-n em.up { color: var(--gain); } .ls-n em.dn { color: var(--loss); }
.tabsnav .tn-i.has-new::after { content: ''; position: absolute; top: 6px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--ink); }
.tabsnav .tn-i.has-new[aria-current="true"]::after { background: var(--white); }

/* ---------- the lobby: who is racing, and the course ---------- */
.lb { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: 32px; }
.lb-grid { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.lb-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; animation: tileIn .45s var(--x) both; }
.lb-head .ttl { font-size: clamp(30px, calc(3vw / var(--z)), 50px); line-height: .9; }
.lb-head span { font: 600 14px/1.2 var(--body); color: var(--w2); }
[data-team="red"] { --team-color: #ff777f; }
[data-team="blue"] { --team-color: #8dbeff; }
.team-name { color: var(--team-color); font-weight: 700; margin-inline-start: 5px; }
.tag[data-team], #hud-cup[data-team="red"], #hud-cup[data-team="blue"] { color: var(--team-color); }
.lb-teams { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-teams .btn { color: var(--team-color); }
.lb-teams .btn[aria-pressed="true"] { background: var(--team-color); color: var(--ink); }
.res-team-score { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; margin: 0 0 10px; }
.res-team-score span { color: var(--team-color); font-weight: 700; }
.lb-chat { background: var(--tile); border: 1px solid rgba(255,255,255,.12); padding: 8px 10px; }
.lb-chat summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.lb-chat[open] summary { margin-bottom: 4px; }
.res-left > .lb-chat { flex: none; width: 100%; max-width: 640px; margin-bottom: 10px; }
.home > .home-chat { flex: none; width: min(540px, 100%); margin-top: 10px; }
.lb-chat [data-chat-empty] { margin: 0 0 3px; color: var(--w2); font-size: 13px; }
.lb-chat-log { max-height: clamp(70px, 13vh, 118px); overflow-y: auto; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.lb-chat-log b { color: var(--yellow); }
.lb-chat-form { display: flex; gap: 6px; margin-top: 6px; }
.lb-chat-form .input { flex: 1; min-width: 0; }
.lb-rows { display: grid; gap: 4px; align-content: start; min-height: 0; overflow-y: auto; padding: 3px; scrollbar-width: none; }
.lr { position: relative; display: grid; grid-template-columns: 40px 46px minmax(0, 1fr) auto auto 44px; align-items: center; gap: 12px; height: 52px; padding-right: 10px; background: var(--tile); border-radius: 2px; animation: tileIn .45s var(--x) both; animation-delay: calc(var(--i) * 34ms); transition: box-shadow .15s, background .25s; }
.lr .p { align-self: stretch; display: grid; place-items: center; font: 800 condensed 18px/1 var(--disp); background: rgba(255, 255, 255, .06); }
.lr .portrait { width: 46px; height: 46px; }
.lr .who { min-width: 0; }
.lr .who b { display: block; font: 700 condensed 16px/1.05 var(--disp); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr .who small { display: block; margin-top: 4px; font: 500 13px/1.2 var(--body); color: var(--w3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr .kit { display: flex; gap: 3px; }
.lr .kit .picon { display: block; width: 42px; height: 32px; flex: none; border-radius: 2px; background-color: rgba(255, 255, 255, .06); }
.lr .st { display: inline-flex; align-items: center; gap: 6px; font: 700 condensed 11.5px/1 var(--disp); text-transform: uppercase; color: var(--w3); white-space: nowrap; }
.lr .st .ic { width: 16px; height: 16px; }
.lr .st .spinner { width: 13px; height: 13px; border-width: 2px; }
.lr .st i { margin-left: 4px; padding: 3px 6px; font-style: normal; color: var(--ink); background: var(--white); transform: none; }
.lr.st-ready .st { color: var(--gain); }
.lr.st-edit .st { color: var(--gold); }
.lr.st-away .st { color: var(--loss); }
.lr .vt { width: 44px; height: 33px; display: grid; place-items: center; border-radius: 2px; background: center / cover no-repeat var(--tile-3); }
.lr .vt.none { background: none; box-shadow: inset 0 0 0 2px var(--w5); }
.lr .vt .ic { width: 22px; height: 22px; }
.lr.me { background: rgba(255, 31, 109, .92); }
.lr.me .p { background: rgba(0, 0, 0, .18); }
.lr.me .who small, .lr.me .st { color: rgba(255, 255, 255, .92); }
.lr.open { background: none; box-shadow: inset 0 0 0 2px var(--w5); }
/* an empty place has no kit, status or vote: its text gets the whole row */
.lr.open .who { grid-column: 3 / -1; }
.lr.open .kit, .lr.open .st, .lr.open .vt { display: none; }
.lr.open .portrait { background: none; box-shadow: inset 0 0 0 2px var(--w5); display: grid; place-items: center; color: var(--w3); font: 700 22px/1 var(--body); }
.lr.open .portrait svg { width: 26px; height: 26px; }
.lr.open.cpu .portrait { background: rgba(255, 255, 255, .05); }
.lr .vt.none { visibility: hidden; }
.toasts.low { top: auto; bottom: 130px; left: var(--gutter); right: auto; }
.lr.open .p, .lr.open .who b { color: var(--w3); background: none; }
.lr.cpu { background: rgba(14, 15, 21, .5); box-shadow: none; }
.lr.hot { box-shadow: 0 0 0 3px var(--white); }
.lr.won { animation: won .5s var(--x) 2; }
@keyframes won { 50% { transform: translateX(8px); } }
.lb-course { grid-row: 1; grid-column: 2; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; scrollbar-width: none; animation: tileIn .5s var(--x) .08s both; }
.lb-sub { display: flex; align-items: baseline; gap: 12px; }
.lb-sub b { font: 800 condensed 18px/1 var(--disp); text-transform: uppercase; }
.lb-sub span { font: 500 14px/1.3 var(--body); color: var(--w2); }
.vote { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vc { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; background: var(--tile-3); text-align: left; transition: transform .28s var(--x), box-shadow .2s, filter .3s; }
.vc .art { position: absolute; inset: 0; background: center / cover no-repeat; transition: transform .7s var(--x); }
.vc .art.rnd { display: grid; place-items: center; background: #1c1e26; color: var(--w2); }
.vc .art.rnd .ic { width: 30%; height: 30%; }
.vc .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 9, 12, .92) 0%, rgba(8, 9, 12, .25) 52%, rgba(8, 9, 12, 0) 72%); }
.vc .place { position: absolute; left: 14px; right: 14px; bottom: 42px; z-index: 1; font: 600 12.5px/1.1 var(--body); color: var(--w2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc .name { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; font: 800 condensed clamp(15px, calc(1.35vw / var(--z)), 21px)/1 var(--disp); text-transform: uppercase; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc .voters { position: absolute; right: 10px; top: 10px; z-index: 1; display: flex; }
.vc .voters .portrait { width: 30px; height: 30px; margin-left: -8px; box-shadow: 0 0 0 2px var(--ink); }
.vc::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--pink); transition: height .2s; }
.vc:not([disabled]):hover .art { transform: scale(1.05); }
.vc[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--white); transform: translateY(-3px); }
.vc[aria-pressed="true"]::after { height: 5px; }
.vote.picked .vc { filter: brightness(.5) saturate(.6); }
.vote.picked .vc.hot { filter: none; box-shadow: 0 0 0 3px var(--pink); }
.vote.picked .vc.won { filter: none; transform: scale(1.03); box-shadow: 0 0 0 3px var(--white), 0 18px 40px rgba(0, 0, 0, .5); z-index: 1; }
.vc.big { aspect-ratio: 16 / 9; }
.vc.big .name { bottom: 40px; font-size: clamp(24px, calc(2.3vw / var(--z)), 38px); }
.vc.big .place { bottom: 82px; }
.vc .rules { position: absolute; left: 14px; bottom: 14px; z-index: 1; font: 600 13px/1 var(--body); color: var(--w2); }
.vc.dim { filter: brightness(.55); }
.lb-wait { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; padding: 16px; background: var(--tile); border-radius: 2px; }
.lb-wait b { font: 800 condensed 16px/1 var(--disp); text-transform: uppercase; }
.lb-wait span:last-child { grid-column: 2; font: 500 14px/1.3 var(--body); color: var(--w2); }
.lb-code { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--tile); border-radius: 2px; }
.lb-code span { font: 600 13px/1 var(--body); color: var(--w2); }
.lb-code b { margin-right: auto; font: 800 condensed 30px/1 var(--disp); letter-spacing: .04em; }
.lb-inv { display: grid; gap: 6px; }
.lb-inv .rowi { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 6px 10px 6px 6px; background: var(--tile); }
.lb-inv b { font: 700 condensed 14px/1 var(--disp); text-transform: uppercase; }
.lb-bar { grid-row: 2; grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 14px 0 4px; }
/* emotes: a row of chips over the lobby bar, and a speech bubble on the sender's row */
.emo-pick { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 30; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: min(560px, calc(92vw / var(--z))); padding: 10px; background: var(--tile-2); border-radius: 2px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); animation: tileIn .3s var(--x) both; }
.emo-chip { padding: 9px 14px; border: 0; border-radius: 2px; background: var(--w5); color: var(--white); font: 800 italic 14px/1 var(--disp); cursor: pointer; transition: background .15s; }
.emo-chip:hover, .emo-chip:focus-visible { background: var(--pink); outline: none; }
.lr .emo { position: absolute; right: 64px; top: -12px; z-index: 2; padding: 6px 12px; background: var(--white); color: var(--ink); font: 800 italic 14px/1 var(--disp); border-radius: 14px 14px 14px 3px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); pointer-events: none; animation: emoPop 2.7s var(--x) both; }
@keyframes emoPop { 0% { opacity: 0; transform: translateY(8px) scale(.7); } 10% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.lb-timer { margin-left: auto; display: flex; align-items: baseline; gap: 10px; font: 600 14px/1 var(--body); color: var(--w2); }
.lb-timer b { min-width: 1.1em; font: 800 italic condensed 42px/1 var(--disp); color: var(--white); font-variant-numeric: tabular-nums; text-align: right; }
.lb-bar .btn.big { min-width: 230px; }

@media (max-width: 1180px) {
  .lo { --lw: min(470px, calc(calc(100vh / var(--z)) - 318px), calc(44vw / var(--z))); grid-template-columns: var(--lw) minmax(0, 1fr) minmax(300px, 360px); column-gap: 18px; }
  .lr { grid-template-columns: 34px 46px minmax(0, 1fr) 128px 110px 40px; gap: 9px; }
  .lr .kit .picon { width: 40px; height: 30px; }
}
@media (max-width: 900px) {
  .lo { --lw: 100%; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(160px, 1fr) auto auto; }
  .lo-left { grid-row: 2; grid-column: 1; }
  .lo-stage { grid-row: 3; grid-column: 1; }
  .lo-info { grid-row: 4; grid-column: 1; }
  .lo-bar { grid-row: 5; }
  .ros { grid-template-columns: repeat(8, 1fr); gap: 4px; }
  .rt .nm { display: none; }
  .pcols { min-height: 210px; height: 210px; flex: none; }
  .lo-hero .hero-name, .lo-hero .hero-name.long, .lo-hero .hero-name.xlong { font-size: 32px; }
  .lo-hero .tagline { display: none; }
  .lo.kart .pcols { height: 172px; min-height: 172px; }
  .lo-sel { min-height: 0; }
  .lo-bar { gap: 10px; }
  .lo-bar .btn.big { height: 52px; padding: 0 16px; font-size: 14px; }
  .lo-bar [data-ok] { min-width: 0; flex: 1; }
  .lo-why { display: none; }
  .lb { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; overflow-y: auto; }
  .lb-grid, .lb-course { grid-column: 1; grid-row: auto; }
  .lb-bar { grid-row: auto; flex-wrap: wrap; }
  .lb-grid { min-height: auto; }
  .lb-rows { overflow: visible; }
  .lb-course { overflow: visible; min-height: auto; }
  .lr { grid-template-columns: 26px 40px minmax(0, 1fr) 44px 22px 34px; gap: 8px; height: 48px; }
  .lr .portrait { width: 40px; height: 40px; }
  .lr .kit .picon { width: 44px; height: 33px; }
  .lr .kit .picon:not(:first-child) { display: none; }
  .lr .st { font-size: 0; gap: 0; } .lr .st i { display: none; }
  .lr.open:not(:nth-child(-n+4)) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pt, .rt, .ls-b .f, .ls-b .g, .vc { transition: none; }
  .lr, .rt, .lo-left.in > *, .lo-hero.swap > * { animation: none; }
}

/* ---------- Store, Pearls, premium pass, Progress, rewarded ads (docs/PROGRESSION.md) ---------- */
/* the wallet: coins over Pearls, stacked so the top bar keeps its width; the Pearl row opens the Store */
.wallet { flex-direction: column; align-items: flex-end; justify-content: center; gap: 3px; height: 46px; font-size: 16px; }
.wallet > span { display: flex; align-items: center; gap: 6px; }
.wallet .ic { width: 17px; height: 17px; }
.wallet .pw { display: flex; align-items: center; gap: 6px; height: 21px; padding: 0 0 0 6px; border: 0; background: none; color: var(--white); font: inherit; cursor: pointer; }
.wallet .pw:hover b, .wallet .pw:focus-visible b { color: var(--pink-2); }
.wallet .pw:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.wallet .pplus { display: grid; place-items: center; width: 16px; height: 16px; background: var(--pink); }
.wallet .pplus .ic { width: 12px; height: 12px; color: var(--white); }
/* the Store: a labelled button in the top bar, beside the gift and the wallet */
.storebtn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px 0 11px; background: var(--pink); color: var(--white); border-radius: 2px; font: 700 condensed 15px/1 var(--disp); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 18px -8px rgba(255, 31, 109, .8); transition: background .15s, transform .15s var(--x); }
.storebtn .ic { width: 19px; height: 19px; }
.storebtn:hover, .storebtn:focus-visible { background: var(--pink-2); transform: translateY(-1px); }
.storebtn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.storebtn[aria-current="true"] { background: var(--white); color: var(--ink); box-shadow: none; }
.chip.pearl { background: #f6eef4; color: var(--ink); }
.store { display: grid; gap: 6px; align-content: start; }
.store-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.store-head .h1 { font-size: clamp(36px, calc(3.6vw / var(--z)), 60px); }
.st-wallet { display: flex; gap: 10px; }
.st-wallet span { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; background: var(--tile); font: 800 condensed 20px/1 var(--disp); }
.st-wallet span.pw { box-shadow: inset 0 -3px 0 #f6eef4; }
.st-wallet .ic { width: 22px; height: 22px; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.st-main, .st-side { display: grid; gap: 10px; align-content: start; }
.st-h { margin: 14px 0 2px; }
.st-h .label { text-transform: none; letter-spacing: 0; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px; }
.store .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shop-tile .btn:disabled { opacity: .7; background: transparent; color: var(--w2); box-shadow: inset 0 0 0 1px var(--w4); }
.shop-tile .btn s { margin-left: 4px; font-size: .9em; opacity: .6; }
.shop-tile { position: relative; display: grid; grid-template-rows: 112px auto auto; gap: 8px; padding: 12px; background: var(--tile); border-radius: 2px; box-shadow: inset 0 -3px 0 var(--rc); animation: tileIn .4s var(--x) both; }
.shop-tile.own { opacity: .62; }
.shop-tile .btn { width: 100%; }
.shop-tile .chip { justify-self: start; }
.shop-tile .sale { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 4px 8px; background: var(--gold); color: var(--ink); font: 800 condensed 12px/1 var(--disp); transform: none; }
.st-face { position: relative; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%); overflow: hidden; }
.st-meta { display: grid; gap: 3px; min-width: 0; }
.st-meta small { font: 600 condensed 11.5px/1 var(--disp); letter-spacing: .08em; text-transform: uppercase; color: var(--rc); }
.st-meta b { font: 800 condensed 15px/1.1 var(--disp); text-transform: uppercase; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.picon.sf { width: 100%; height: 100%; background-repeat: no-repeat; }
.sf-por { width: 96px; height: 96px; background: center 20% / cover no-repeat; border-radius: 2px; }
.sf-sw { width: 72px; height: 72px; border-radius: 50%; box-shadow: inset 0 -8px 14px rgba(0, 0, 0, .35), inset 0 8px 12px rgba(255, 255, 255, .25); }
.sf-sw.trail { width: 120px; height: 26px; border-radius: 13px; }
.sf-sw.fin { background: var(--pc); }
.sf-sw.smk { box-shadow: none; background: radial-gradient(circle at 30% 60%, var(--s1) 0 26%, transparent 27%), radial-gradient(circle at 62% 42%, var(--s2) 0 30%, transparent 31%), radial-gradient(circle at 70% 72%, var(--s3) 0 22%, transparent 23%); filter: blur(1px); }
.sf-gl .glyph, .sf-gl .ic { width: 52px; height: 52px; color: var(--rc, var(--white)); }
.bundles { display: grid; gap: 6px; }
.bundle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 14px; background: var(--tile); border-radius: 2px; }
.bd-faces { display: grid; grid-template-columns: repeat(2, 58px); gap: 4px; }
.bd-f { display: grid; place-items: center; width: 58px; height: 58px; background: var(--tile-2); box-shadow: inset 0 -2px 0 var(--rc); overflow: hidden; }
.bd-f .sf-sw { width: 34px; height: 34px; } .bd-f .sf-sw.trail { width: 48px; height: 12px; } .bd-f .sf-por { width: 58px; height: 58px; } .bd-f .sf-gl .glyph { width: 28px; height: 28px; }
.bd-txt b { font: 800 condensed 18px/1 var(--disp); text-transform: uppercase; }
.bd-txt p { margin: 6px 0; font: 500 14px/1.4 var(--body); color: var(--w2); }
.bd-txt small { font: 600 13px/1.3 var(--body); color: var(--w3); }
.bd-buy { display: grid; justify-items: end; gap: 6px; }
.bd-buy .need { font: 600 12px/1 var(--body); color: var(--w3); }
.bd-buy .btn:disabled { opacity: .7; background: transparent; color: var(--w2); box-shadow: inset 0 0 0 1px var(--w4); }
/* the rewards card scrolls when the ad offer and buttons below take room: its last line fades instead of being cut */
.res-side .rewards.scroll { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); padding-bottom: 22px; }
.gift-card { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; padding: 14px; background: linear-gradient(120deg, rgba(255, 31, 109, .28), var(--tile) 60%); border-radius: 2px; }
.gift-card .gc-ic .ic { width: 34px; height: 34px; }
.gift-card b { font: 800 condensed 17px/1 var(--disp); text-transform: uppercase; }
.gift-card p { margin: 4px 0 0; font: 500 13.5px/1.4 var(--body); color: var(--w2); }
.gift-card .adbtn { grid-column: 1 / -1; }
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pack { display: grid; justify-items: center; gap: 4px; padding: 14px 10px 0; border: 0; background: var(--tile); color: var(--white); border-radius: 2px; cursor: pointer; overflow: hidden; transition: transform .2s var(--x), box-shadow .15s; }
.pack:not(:disabled):hover, .pack:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 2px #f6eef4; outline: none; }
.pack:disabled { cursor: default; opacity: .55; }
.pk-art { display: flex; height: 40px; align-items: end; }
.pk-art .ic { width: 30px; height: 30px; margin: 0 -5px; }
.pk-art .ic:nth-child(2) { width: 36px; height: 36px; }
.pack b { font: 800 condensed 22px/1 var(--disp); }
.pack small { font: 600 12px/1 var(--body); color: var(--w3); }
.pk-price { align-self: stretch; margin-top: 8px; padding: 10px 0; background: linear-gradient(180deg, #ff4f8f, #ff1f6d 55%, #e0005c); color: var(--white); font: 800 condensed 14px/1 var(--disp); }
.pack:disabled .pk-price { background: var(--tile-2); color: var(--w2); }
.club { display: grid; gap: 10px; padding: 16px; background: linear-gradient(150deg, rgba(246, 238, 244, .16), var(--tile) 55%); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(246, 238, 244, .25); }
.club.on { box-shadow: inset 0 0 0 2px #f6eef4; }
.cl-head { display: flex; gap: 12px; align-items: center; }
.cl-head .ic { width: 34px; height: 34px; }
.cl-head b { display: block; font: 800 condensed 20px/1 var(--disp); text-transform: uppercase; }
.cl-head small { font: 600 13px/1.3 var(--body); color: var(--w3); }
.club ul { margin: 0; padding-left: 18px; font: 500 14px/1.6 var(--body); color: var(--w2); }
/* rewarded-ad buttons say what they pay before you choose */
.adbtn { gap: 8px; height: auto; min-height: 36px; padding: 6px 12px; background: rgba(255, 255, 255, .1); flex-wrap: wrap; }
.adbtn .ar { display: inline-flex; gap: 4px; }
.adbtn .ar .chip { padding: 3px 6px; font-size: 11px; }
.adbtn em { flex-basis: 100%; font: 600 11px/1.2 var(--body); font-style: normal; text-transform: none; letter-spacing: 0; color: var(--w3); }
.adbtn:not(:disabled):hover { background: var(--pink); }
.adplayer { display: grid; gap: 14px; min-width: 0; }
.ad-reward { display: flex; gap: 6px; }
.ad-slot { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 360px; background: #000; color: var(--w2); font: 600 14px/1.4 var(--body); text-align: center; padding: 20px; }
.ad-slot.err { color: #ffb4b4; background: var(--tile-2); min-height: 160px; }
.ad-slot.ok { color: var(--gain); font-weight: 800; }
.rw-ad { display: flex; }
.rw-ad .adbtn { flex: 1; justify-content: flex-start; }
.rw-notes { display: flex; flex-wrap: wrap; gap: 6px; }
/* the season pass: free row over premium row, scrolling together */
.track-wrap.pass { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; overflow: visible; padding: 22px 0 18px; }
.track-wrap.pass > div:last-child { overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; }
.track-wrap.pass .tiers + .tiers { margin-top: 4px; }
.pass-lbl { display: grid; grid-template-rows: 124px 96px; gap: 4px; }
.track-wrap.pass .tierc:not(.prem) { height: 124px; }
.track-wrap.pass .tierc .rw { overflow-wrap: break-word; font-size: 11px; }
.track-wrap.pass > div:last-child { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 140px), rgba(0, 0, 0, .15)); mask-image: linear-gradient(90deg, #000 calc(100% - 140px), rgba(0, 0, 0, .15)); }
.pass-lbl span { display: grid; place-items: center; writing-mode: vertical-rl; transform: rotate(180deg); padding: 0 8px; background: var(--tile-2); font: 800 condensed 12px/1 var(--disp); text-transform: uppercase; letter-spacing: .1em; }
.pass-lbl span:last-child { background: #f6eef4; color: var(--ink); }
.tierc.prem { height: 96px; align-content: end; background: linear-gradient(180deg, rgba(246, 238, 244, .1), var(--tile)); }
.tierc.prem.reached { background: linear-gradient(180deg, rgba(246, 238, 244, .22), var(--tile-2)); }
.tierc.prem.locked { opacity: .55; }
.tierc .pl { position: absolute; top: 10px; right: 10px; }
.tierc .pl .ic { width: 16px; height: 16px; }
/* Progress tab */
.prog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.prog-col { display: grid; gap: 10px; }
.prog-card { display: grid; gap: 12px; padding: 16px; background: var(--tile); border-radius: 2px; }
.prog > .prog-card:last-child { grid-column: 1 / -1; }
.road { display: grid; gap: 4px; }
.road-st { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; min-height: 44px; padding: 6px 10px 6px 0; background: var(--tile-2); }
.road-st.big { box-shadow: inset 3px 0 0 #f6eef4; }
.road-st .rl { font: 800 condensed 20px/1 var(--disp); text-align: center; color: var(--w2); }
.road-st .rr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; background: var(--tile-3); box-shadow: inset 3px 0 0 var(--rc); font: 700 condensed 12.5px/1 var(--disp); text-transform: uppercase; color: var(--white); }
.rchip .glyph { width: 15px; height: 15px; color: var(--rc); }
.rchip em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; color: var(--w2); }
.rchip em .ic { width: 13px; height: 13px; }
.rsep { font: 600 12px/1 var(--body); color: var(--w3); margin-left: 4px; }
.masts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.mast { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 12px 8px 8px; background: var(--tile-2); }
.ms-f { display: grid; place-items: center; width: 56px; height: 48px; overflow: hidden; }
.ms-f .sf-por { width: 48px; height: 48px; }
.ms-t { display: grid; gap: 5px; min-width: 0; }
.ms-t b { font: 800 condensed 14px/1 var(--disp); text-transform: uppercase; }
.ms-t small { font: 600 12px/1 var(--body); color: var(--w3); }
.ms-l { font: 800 condensed 26px/1 var(--disp); color: var(--pink-2); }
.ms-n { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.ms-n .chip { font-size: 11px; padding: 3px 6px; }
.miles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.mile { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; background: var(--tile-2); }
.mile b { flex-basis: 100%; font: 800 condensed 14px/1 var(--disp); text-transform: uppercase; }
.mile.done { box-shadow: inset 3px 0 0 var(--gain); }
.mile .btn { margin-left: auto; }
/* events in the Challenges tab (cev-band: as .ev-band it gave the Race screen's card strips a 150 px height) */
.cev-band { display: flex; justify-content: space-between; align-items: end; gap: 16px; min-height: 150px; margin: 10px 0 6px; padding: 18px; background-size: cover; background-position: center 40%; border-radius: 2px; box-shadow: inset 4px 0 0 var(--ea); }
.cev-band .h2 { margin: 6px 0 4px; }
.cev-band > div:first-child, .ev-done small { text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.ev-done { padding: 10px 12px; background: rgba(11, 12, 16, .78); }
.ev-done { display: grid; justify-items: end; gap: 6px; }
.ev-done small { font: 600 12px/1 var(--body); color: var(--w3); }
/* profile frames: drawn borders around the portrait (UI, not materials) */
.pframe { position: relative; display: inline-grid; padding: 5px; border-radius: 3px; }
.pframe.f-none { padding: 0; }
.pframe.f-bronze { background: linear-gradient(135deg, #e0a070, #8a5230 50%, #c7834d); }
.pframe.f-silver { background: linear-gradient(135deg, #f4f6f8, #8d96a2 50%, #dfe3e9); }
.pframe.f-gold { background: linear-gradient(135deg, #ffe58a, #c99312 50%, #ffd34d); }
.pframe.f-platinum { background: linear-gradient(135deg, #e9fbff, #7fb9c9 50%, #d8f3fa); }
.pframe.f-diamond { background: linear-gradient(135deg, #b9f3ff, #4aa8ff 35%, #e9d1ff 65%, #7ce6ff); box-shadow: 0 0 22px rgba(120, 220, 255, .45); }
.pframe.f-master { background: linear-gradient(135deg, #ff6aa0, #8a2be2 50%, #ff1f6d); box-shadow: 0 0 22px rgba(255, 31, 109, .5); }
.pframe.f-legend { background: conic-gradient(from 0deg, #ffd23f, #ff1f6d, #8a5cff, #1ad1ff, #ffd23f); box-shadow: 0 0 28px rgba(255, 210, 63, .5); }
.pframe.f-neon { background: #0b0c10; box-shadow: inset 0 0 0 3px #ff2d6f, 0 0 18px #ff2d6f, inset 0 0 0 6px #00e5ff; }
.pframe.f-club { background: linear-gradient(135deg, #ffffff, #f6eef4 40%, #e7b9cf); }
.pframe.f-s1 { background: linear-gradient(135deg, #ff2d6f, #00e5ff); }
.pframe.f-s2 { background: linear-gradient(135deg, #ffd23f, #b8860b 50%, #fff1b3); }
.pframe.f-starter { background: linear-gradient(135deg, #7cc242, #1fa88a); }
.pframe.f-holo { background: linear-gradient(135deg, #ff9ecf, #9fe8ff 33%, #d8ff9f 66%, #c5a3ff); }
.pframe.f-tokyo { background: linear-gradient(135deg, #ff1f6d, #2b0d3a 50%, #ff7a2f); }
.pframe.f-winter { background: linear-gradient(135deg, #ffffff, #a9d8ff 50%, #e8f4ff); }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 8px; }
.trophy { display: grid; gap: 8px; justify-items: start; padding: 12px; background: var(--tile); box-shadow: inset 0 -3px 0 var(--rc); }
.trophy .ic { width: 30px; height: 30px; }
.trophy b { font: 700 condensed 13px/1.15 var(--disp); text-transform: uppercase; }
.emo-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.emo-chip.locked { opacity: .45; }
.emo-chip { display: inline-flex; align-items: center; gap: 6px; }
.emo-chip .ic { width: 13px; height: 13px; }
@media (max-width: 900px) { .st-row, .prog { grid-template-columns: 1fr; } .miles { grid-template-columns: 1fr; } .store-head { flex-wrap: wrap; } }
/* narrower screens: the section tabs follow the wordmark instead of sitting centred, so they clear the Store button,
   the gift and the wallet (the footer shows the Q / E keys) */
@media (max-width: 1680px) {
  .tabsnav { position: relative; left: auto; top: auto; transform: none; margin-left: 6px; }
  .tabsnav button.key { display: none; }
}
@media (max-width: 1360px) { .tabsnav .tn-i { padding: 0 12px; } }
@media (max-width: 1279px) { .me-chip .who { display: none; } }
@media (max-width: 1100px) { .wordmark > span { display: none; } }
/* over a finished race the section tabs, Store and gift stay hidden: they would leave the race running behind */
body.racing .shell .tabsnav, body.racing .shell .storebtn, body.racing .shell .gift { visibility: hidden; pointer-events: none; }
/* ---------- settings ---------- */
.set-panel { width: min(980px, 100%); max-height: 100%; padding: 26px 28px; display: grid; gap: 22px; overflow: auto; align-content: start; }
.set-title { margin: 0; font-size: clamp(30px, calc(3vw / var(--z)), 44px); }
.set-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.set-sec { display: grid; gap: 16px; align-content: start; }
.set-sec > .eyebrow { border-bottom: 2px solid var(--w5); padding-bottom: 8px; }
.sld { display: grid; grid-template-columns: 1fr 64px; align-items: center; gap: 6px 14px; }
.sld .label { grid-column: 1 / -1; font: 700 condensed 15px/1 var(--disp); text-transform: uppercase; color: var(--w2); }
.sld b { font: 800 condensed 18px/1 var(--disp); text-align: right; font-variant-numeric: tabular-nums; }
.sld input { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
.sld input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--w5); }
.sld input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px rgba(255, 31, 109, .25); }
.sld input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--w5); }
.sld input::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--pink); }
.sld input:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.sld + .seg { margin-top: 8px; }
.kb-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.kb-row { grid-template-columns: 1fr auto auto; gap: 8px; min-height: 40px; }
.kb { min-width: 64px; height: 32px; padding: 0 10px; border-radius: 3px; background: var(--tile-2); color: var(--white); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .4), inset 0 0 0 2px var(--w4); font: 700 14px/1 var(--body); cursor: pointer; }
.kb:hover, .kb:focus-visible { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .4), inset 0 0 0 2px var(--pink); outline: none; }
.kb.wait { background: var(--pink); box-shadow: none; animation: glow 1.2s ease-in-out infinite; }
.kb2 kbd { display: inline-block; min-width: 26px; padding: 4px 6px; border-radius: 3px; background: var(--w5); color: var(--w2); font: 700 12px/1 var(--body); text-align: center; }
.kb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.kb-foot .btn[disabled] { opacity: .4; pointer-events: none; }
@media (max-width: 760px) { .set-cols, .kb-rows { grid-template-columns: 1fr; } }
/* ---------- ranked queue ---------- */
.queue-scr { display: grid; grid-template-columns: minmax(0, 600px) minmax(300px, 380px); justify-content: space-between; gap: 40px; width: 100%; margin-top: calc(5vh / var(--z)); align-items: start; }
.qseats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.qs { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 3px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 2px var(--w5); text-align: center; }
.qs b { font: 700 condensed 11px/1.1 var(--disp); text-transform: uppercase; color: var(--w3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs .label { font-size: 10px; }
.qs .portrait { width: 44px; height: 44px; border-radius: 50%; }
.qs-sil { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--w5); color: var(--w3); }
.qs-sil svg { width: 26px; height: 26px; }
.qs:not(.on):not(.me) .qs-sil { border: 2px dashed var(--w4); background: transparent; animation: qsPulse 1.6s ease-in-out infinite; }
.qs.on { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px var(--w4); animation: tileIn .4s var(--x) both; }
.qs.on b { color: var(--white); }
.qs.me { background: rgba(255, 31, 109, .16); box-shadow: inset 0 0 0 2px var(--pink); }
.qs.me b { color: var(--white); }
@keyframes qsPulse { 50% { opacity: .45; } }
.q-side { display: grid; gap: 14px; padding: 22px; align-content: start; }
.q-racer { display: flex; align-items: center; gap: 14px; }
.q-chal { grid-template-columns: 1fr 120px; min-height: 0; padding: 10px 12px; gap: 12px; }
.q-chal .nm { font: 700 condensed 13px/1.1 var(--disp); text-transform: uppercase; }
.q-chal .ds { font: 500 12px/1.3 var(--body); color: var(--w3); margin-top: 3px; }
.q-chal .pv { display: grid; gap: 6px; justify-items: end; }
.q-chal .bar { width: 100%; }
@media (max-width: 900px) { .queue-scr { grid-template-columns: 1fr; } .qseats { grid-template-columns: repeat(3, 1fr); } }
.boot .inner > .slot, .boot .inner > .loadbar, .boot .inner > .msg { justify-self: stretch; }
/* ---------- profile: one row of tabs, the trophy cabinet ---------- */
.prof .tabs { flex-wrap: nowrap; }
.prof .tab { flex: 1 1 auto; padding: 0 10px; font-size: 13px; white-space: nowrap; }
.tcab-wrap { display: grid; gap: 16px; margin-top: 10px; }
.tcab-g { display: grid; gap: 8px; }
.tcab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 4px; }
.tcab { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 10px 4px 8px; min-height: 84px; background: var(--tile); border-radius: 2px; text-align: center; }
.tcab svg { width: 28px; height: 28px; color: rgba(255, 255, 255, .5); }
.tcab:not(.won) svg { filter: grayscale(1); opacity: .3; }
.tcab b { font: 700 10px/1.15 var(--body); color: var(--w3); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tcab.won { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 22%, transparent), var(--tile)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent); }
.tcab.won svg { color: var(--rc); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rc) 60%, transparent)); }
.tcab.won b { color: var(--white); }

/* ---------- driving lesson offer (app.js UI.tutorialModal) and its Settings entry ---------- */
.tutm { max-width: 520px; }
.tutm .h2 { margin: 4px 0 10px; }
.tutm-lede { margin: 0 0 14px; font: 500 15px/1.5 var(--body); color: var(--w2); }
.tutm-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: tut; }
.tutm-steps li { counter-increment: tut; padding: 6px 11px 6px 8px; border-radius: 999px; background: var(--w5); font: 700 12px/1 var(--body); color: var(--w2); }
.tutm-steps li::before { content: counter(tut); display: inline-block; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: var(--pink); color: var(--white); font: 800 10px/16px var(--disp); text-align: center; }
.tutm .actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.set-tut { display: flex; align-items: center; gap: 14px; }
.set-tut .fine { flex: 1; margin: 0; }
.set-tut .btn svg { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }

/* ===================== reference frame (19 Nov 2026) =====================
   The grammar the racing games' menus share (research/UI-REFERENCE.md, measured from Forza Horizon 5/4, Gran
   Turismo 7, F1 and Need for Speed Unbound): a status bar with you on the left and your money on the right, the
   sections as their own row of plates under it (the current one pink), a square mosaic with tight gutters,
   white-framed photographs, solid plates with a centred icon, one focus style (pink outside white), condensed
   titles, and sentence-case prompts bottom-left. No website bar: the Store is a section like the others. */
:root { --gutter: clamp(16px, calc(4vw / var(--z)), 96px); --bar-h: 100px; --plate-l: #ececea; --plate-d: rgba(21, 22, 28, .94); }
.screen { inset: var(--bar-h) 0 62px; padding-top: 14px; }

/* status bar: logo mark, level, portrait and name on the left; coins, pearls and rewards on the right */
.topbar { top: 16px; height: 36px; padding-top: 0; gap: 14px; }
.wordmark > span { display: none; }
.wordmark .mark { width: 30px; height: 30px; }
.me-chip { gap: 10px; height: 36px; }
.me-chip .lvq { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 5px; background: var(--gold); color: var(--ink); font: 800 condensed 17px/1 var(--disp); font-variant-numeric: tabular-nums; }
.me-chip .portrait { width: 30px; height: 30px; border-radius: 0; }
.me-chip .nm { font: 700 condensed 18px/1 var(--disp); text-transform: none; letter-spacing: 0; }
.me-chip:hover .nm, .me-chip:focus-visible .nm { color: var(--pink-2); }
.wallet { flex-direction: row; align-items: center; gap: 18px; height: 36px; font: 700 condensed 19px/1 var(--disp); }
.wallet > span, .wallet .pw { height: 36px; gap: 7px; }
.wallet .ic { width: 20px; height: 20px; }
.wallet .pplus { width: 18px; height: 18px; margin-left: 2px; }
.rewbtn { position: relative; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; background: rgba(8, 9, 12, .62); color: var(--white); font: 700 condensed 15px/1 var(--disp); text-transform: uppercase; letter-spacing: .03em; }
.rewbtn .ic { width: 17px; height: 17px; }
.rewbtn.hot { background: var(--gold); color: var(--ink); }
.rewbtn:hover, .rewbtn:focus-visible { outline: 2px solid var(--white); outline-offset: 0; }
.gift.hot::after { content: none; }

/* the sections: a row of light plates from the left margin, the current one pink, Q / E keys at either end */
.tabsnav { position: absolute; left: var(--gutter); top: 46px; transform: none; margin: 0; gap: 2px; }
.tabsnav .tn-i { height: 28px; padding: 0 16px; font: 700 condensed 15px/28px var(--disp); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); background: rgba(236, 236, 234, .92); transition: background .15s, color .15s; }
.tabsnav .tn-i:hover { color: var(--ink); background: var(--white); }
.tabsnav .tn-i[aria-current="true"] { color: var(--white); background: var(--pink); }
.tabsnav .mk { display: none; }
.tabsnav button.key { display: inline-grid; width: 28px; min-width: 28px; height: 28px; margin: 0; padding: 0; border-radius: 0; background: rgba(8, 9, 12, .72); color: var(--white); font: 700 13px/1 var(--body); opacity: 1; }
.tabsnav button.key:first-child { margin-right: 4px; }
.tabsnav button.key:last-child { margin-left: 4px; }
.tabsnav button.key:hover { background: var(--ink); transform: none; }
.tabsnav .tn-i.has-new::after { top: -4px; right: -2px; width: 10px; height: 10px; border-radius: 0; background: var(--gold); box-shadow: none; }
.tabsnav .tn-i.has-new[aria-current="true"]::after { background: var(--gold); }

/* the prompts: white key caps and sentence-case words, bottom-left on the margin */
.foot { bottom: 16px; height: 32px; gap: 20px; font: 500 14px/1 var(--body); letter-spacing: 0; text-transform: none; color: var(--w2); }
.foot .hints { gap: 7px; }
.foot kbd { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 3px; font: 700 12px/1 var(--body); }
.foot .hints kbd + kbd { margin-left: -3px; }
.foot .status { gap: 8px; color: var(--w2); }
.foot .dot.on { box-shadow: none; }

/* ---------- home: a square mosaic ----------
   One cell is a third of the free height (about 172 px at 720p, 290 at 1080p) and never more than a quarter of
   58% of the width, so the kart keeps the right of the frame. Big tiles are exact multiples, gutters 4 px. */
.screen.home .mosaic { --cell: max(110px, min(calc((calc(100vh / var(--z)) - var(--bar-h) - 102px) / 3), calc((calc(58vw / var(--z)) - 12px) / 4), 300px));
  grid-template-columns: repeat(4, var(--cell)); grid-template-rows: repeat(3, var(--cell)); gap: 4px; width: auto; flex: none; max-height: none; min-height: 0; }
.mosaic .tile { padding: 0; border-radius: 0; background-color: var(--plate-d); color: var(--white); }
.mosaic .tile::after { content: none; }
.mosaic .tile:hover, .mosaic .tile:focus-visible, .mosaic .tile.on { transform: scale(1.05); z-index: 5; outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 6px var(--pink), 0 16px 36px rgba(0, 0, 0, .5); }
.mosaic .t-race:hover, .mosaic .t-race:focus-visible, .mosaic .t-race.on { transform: scale(1.025); }
.mosaic .tile .tl { font: 800 condensed calc(var(--cell) * .165)/.9 var(--disp); font-stretch: 66%; letter-spacing: 0; text-transform: uppercase; text-shadow: none; }
.mosaic .tile .ts { margin: 0; font: 600 condensed max(13px, calc(var(--cell) * .072))/1.1 var(--disp); letter-spacing: .03em; text-transform: uppercase; color: var(--white); }
.mosaic .tt { position: relative; z-index: 1; display: grid; gap: calc(var(--cell) * .03); }
/* photographs: a white frame, the title bottom-right over a dark corner (no wash over the whole picture) */
.mosaic .photo { align-items: flex-end; background-size: cover; background-position: center; }
.mosaic .photo::after { content: ''; position: absolute; inset: 0; z-index: 2; height: auto; border: 3px solid var(--white); background: none; transform: none; pointer-events: none; }
.mosaic .photo .corner { position: absolute; inset: 0; z-index: 0; background: radial-gradient(130% 85% at 100% 100%, rgba(8, 9, 12, .86) 0%, rgba(8, 9, 12, .5) 38%, rgba(8, 9, 12, 0) 70%); }
.mosaic .photo .tt { justify-items: end; text-align: right; padding: 0 calc(var(--cell) * .08) calc(var(--cell) * .08); }
/* solid plates: an icon in a ring, the name centred under it */
.mosaic .plate { align-items: center; justify-content: center; text-align: center; }
.mosaic .plate .tt { justify-items: center; padding: 0 10px; }
.mosaic .plate.light { background: var(--plate-l); color: var(--ink); }
.mosaic .plate.light .tl { color: var(--ink); }
.mosaic .plate.light .ts { color: rgba(11, 12, 16, .7); }
.mosaic .plate.dark .ts { color: var(--w2); }
.mosaic .ring { position: relative; z-index: 1; display: grid; place-items: center; width: calc(var(--cell) * .27); height: calc(var(--cell) * .27); margin-bottom: calc(var(--cell) * .08); border: 2px solid currentColor; border-radius: 50%; }
.mosaic .ring .ic { width: 52%; height: 52%; }
.mosaic .timer { position: absolute; left: 0; right: 0; top: calc(var(--cell) * .09); z-index: 1; font: 600 condensed 13px/1 var(--disp); letter-spacing: .04em; text-transform: uppercase; color: var(--gold); }
.mosaic .timer b { font-weight: 800; font-size: 1.3em; letter-spacing: 0; }
.mosaic .plate .bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 4px; margin: 0; border-radius: 0; background: rgba(255, 255, 255, .14); }
.mosaic .count { position: absolute; right: 10px; top: 10px; z-index: 3; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; background: var(--gold); color: var(--ink); font: 800 condensed 16px/1 var(--disp); font-variant-numeric: tabular-nums; }
/* the race tile: the featured circuits, RACE and the circuit's name bottom-right, how many are racing top-left */
.mosaic .t-race .tl { font-size: calc(var(--cell) * .4); line-height: .82; letter-spacing: 0; }
.mosaic .t-race .corner { background: radial-gradient(110% 70% at 100% 100%, rgba(8, 9, 12, .88) 0%, rgba(8, 9, 12, .5) 40%, rgba(8, 9, 12, 0) 72%); }
.mosaic .t-race .tt { padding: 0 calc(var(--cell) * .1) calc(var(--cell) * .1); }
.mosaic .t-race .feat { position: static; display: block; text-align: right; }
.mosaic .t-race .feat b { font: 600 condensed max(14px, calc(var(--cell) * .085))/1 var(--disp); letter-spacing: .03em; text-transform: uppercase; }
.mosaic .t-race .tk.live { left: 14px; top: 14px; z-index: 3; }
.mosaic .t-drivers { background-position: center 22%; }
@media (max-width: 1000px) {
  :root { --bar-h: 60px; }
  .screen.home .mosaic { --cell: calc((calc(100vw / var(--z)) - 2 * var(--gutter) - 4px) / 2); grid-template-columns: repeat(2, var(--cell)); grid-template-rows: none; grid-auto-rows: var(--cell); overflow-y: auto; }
}
@media (max-width: 640px) { .wallet { gap: 10px; } .rewbtn span { display: none; } }
/* the rule between items on one line (GT7 separates its status segments the same way; a middle dot reads generated) */
.sep { display: inline-block; width: 1px; height: .95em; margin: 0 .75em; vertical-align: -.12em; background: currentColor; opacity: .38; font-style: normal; }

/* ---------- shared pieces after the reference frame ----------
   Tabs inside a screen look like the section tabs (light plates, the current one pink); labels are 60% white and
   at least 13 px; buttons carry 14 px words; a section head is a gold plate. */
.tabs { gap: 2px; }
.tab { height: 30px; padding: 0 15px; font: 700 condensed 15px/30px var(--disp); letter-spacing: .02em; color: var(--ink); background: rgba(236, 236, 234, .92); border-radius: 0; }
.tab:hover { color: var(--ink); background: var(--white); }
.tab[aria-selected="true"] { color: var(--white); background: var(--pink); }
.tab .ct { font: 700 condensed 14px/1 var(--disp); opacity: .7; }
.label { font: 600 condensed 13.5px/1.2 var(--disp); letter-spacing: .04em; color: rgba(255, 255, 255, .62); }
.fine { font-size: 14.5px; }
.btn { font: 700 condensed 15px/1 var(--disp); letter-spacing: .03em; border-radius: 2px; }
.btn.small { font-size: 14px; }
.btn.big { font-size: 18px; }
.eyebrow { font: 700 condensed 15px/1 var(--disp); letter-spacing: .04em; }
.head-plate { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; background: var(--gold); color: var(--ink); font: 700 condensed 15px/1 var(--disp); letter-spacing: .03em; text-transform: uppercase; }
/* a section starts with a gold label plate flush with its block (FH); a kicker tinted by its event keeps its colour */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; height: 26px; padding: 0 10px; background: var(--gold); color: var(--ink); text-transform: uppercase; justify-self: start; align-self: flex-start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow .ic { width: 15px; height: 15px; }
.eyebrow .sep { opacity: .45; }
.eyebrow[style*="color"] { height: auto; padding: 0; background: none; }

/* ---------- race: the event cards ----------
   Photo cards in a white frame like the home tiles; a closed card shows its name only (its description, grey on a
   bright photo, could not be read); the open card takes the one focus style. */
.ev { outline: 3px solid var(--white); outline-offset: -3px; }
.ev:not(.on) .ev-main .d { display: none; }
.ev.on, .ev.on:hover { box-shadow: 0 0 0 2px var(--white), 0 0 0 6px var(--pink), 0 24px 60px rgba(0, 0, 0, .55); }
.ev-band { font: 600 condensed 14px/1 var(--disp); letter-spacing: .03em; color: rgba(255, 255, 255, .8); }
.ev-top .stag { background: rgba(8, 9, 12, .8); color: var(--white); font: 700 condensed 14px/1 var(--disp); letter-spacing: .04em; }

/* ---------- garage and drivers ----------
   The Driver / Kart steps and the Parts / Style / Flair pages are tab plates like every other tab (they were
   numbered "01 / 02" with a pink index: a generated look). Roster cards take the one focus style and keep their
   rarity strip; names fit on two lines in the narrow cut instead of breaking off. */
.lo-steps { gap: 2px; }
.lo-steps button { align-items: center; height: 30px; padding: 0 16px; font: 700 condensed 15px/30px var(--disp); letter-spacing: .02em; color: var(--ink); background: rgba(236, 236, 234, .92); }
.lo-steps button:hover { color: var(--ink); background: var(--white); }
.lo-steps button[aria-current="true"] { color: var(--white); background: var(--pink); }
.lo-pages { gap: 2px; }
.lo-pages button { height: 30px; padding: 0 16px; font: 700 condensed 15px/30px var(--disp); letter-spacing: .02em; color: var(--ink); background: rgba(236, 236, 234, .92); }
.lo-pages button:hover { color: var(--ink); background: var(--white); }
.lo-pages button[aria-pressed="true"] { color: var(--white); background: var(--pink); }
.rt .nm { font: 800 condensed 14.5px/1.02 var(--disp); font-stretch: 66%; letter-spacing: .01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-overflow: clip; }
.rt.on { box-shadow: 0 0 0 2px var(--white), 0 0 0 6px var(--pink), 0 16px 32px rgba(0, 0, 0, .5); }
.rt.on::after { height: 4px; background: var(--rc, var(--r-common)); }
.chip.live { background: var(--white); color: var(--ink); }
.lo-pages kbd { display: inline-grid; place-items: center; min-width: 30px; height: 22px; margin-left: 10px; padding: 0 6px; border-radius: 3px; background: var(--white); color: var(--ink); font: 700 12px/1 var(--body); }
/* the sticky Start button sits on the panel's bottom edge, so nothing scrolls past under it */
.side .go { bottom: -22px; }

/* ---------- store ----------
   Items stand on a light studio plate (FH's car cards), not on a coloured glow; the rarity strip stays under it. */
.st-h { display: flex; align-items: center; gap: 12px; }
.st-face { background: #e2e2df; }
.st-meta small { font: 600 condensed 13px/1 var(--disp); letter-spacing: .04em; }
.st-meta b { font-size: 16px; }

/* ---------- results ----------
   F1's hub: a dark edge on the left fading out by 45% of the width, so the place and the standings never sit on
   bright sky. The level is gold like the status bar's. A lone last button takes the whole row. */
.shell[data-screen="results"] .scrim { background: linear-gradient(90deg, rgba(8, 9, 12, .84) 0%, rgba(8, 9, 12, .55) 28%, rgba(8, 9, 12, 0) 48%), linear-gradient(0deg, rgba(8, 9, 12, .6) 0%, rgba(8, 9, 12, 0) 30%); }
.lvl-badge { background: var(--gold); color: var(--ink); }
.res-actions .btn:not(.big):nth-child(even):last-child { grid-column: 1 / -1; }

/* ---------- reveals (level up, promotion, unlock) ----------
   A level band across the frame on a dark plate, edged in the reward's colour; a gold label plate; the number or
   tier upright (it was a slanted pink slab with a giant yellow italic word). */
.reveal .rays { left: 0; right: 0; height: calc(52vh / var(--z)); margin-top: calc(-26vh / var(--z)); background: rgba(21, 22, 28, .97); box-shadow: inset 0 4px 0 var(--rc-solid, var(--gold)), inset 0 -4px 0 var(--rc-solid, var(--gold)); transform: none; opacity: 1; animation: slabIn .55s var(--x) both; }
@keyframes slabIn { from { transform: scaleY(0); } to { transform: none; } }
.reveal .kicker { background: var(--gold); color: var(--ink); font: 700 condensed 17px/1 var(--disp); letter-spacing: .03em; padding: 6px 12px; }
.reveal .lvl-num { font-style: normal; font-size: clamp(130px, calc(17vw / var(--z)), 230px); line-height: .82; text-shadow: none; }
.reveal .lvl-num.promo { color: var(--white); font-size: clamp(80px, calc(10vw / var(--z)), 150px); }
.reveal .tap { font: 500 14px/1 var(--body); color: var(--w2); }
/* a title's last word is never set apart (it was italic and coloured: a generated flourish) */
.tn em, .ttl em, .t2 em, .h1 em, .h2 em, .hero-name em, .itm-name em, #intro-name em { font-style: normal; color: inherit; }
/* empty CPU slots say "CPU" once per row and stay quiet */
.lr.cpu .who b { color: var(--w2); }
/* toasts sit over the status bar's right end (FH shows its notes in the bar zone), not over the panels below */
.toasts { top: 10px; }
/* ranked pay facts: plain dark plates with gap gutters (the pink edge on each was filler), upright numbers, 13 px notes */
.q-pay { gap: 4px; }
.q-pay > div { border-left: 0; background: rgba(14, 15, 21, .86); }
.q-pay b { font-style: normal; }
.q-pay .fine { font-size: 13px; color: var(--w2); }
/* ---------- review fixes after the rollout ---------- */
/* key caps inside buttons are square like the prompt bar's */
.btn kbd, kbd.key { border-radius: 3px; }
/* a disabled button reads as unavailable, not broken: readable words on a dim plate */
.btn:disabled, .btn[aria-disabled="true"], .btn.primary:disabled { opacity: 1; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .5); box-shadow: none; }
/* the sticky Start stays above whatever follows it in the panel */
.side .go { z-index: 3; }
/* time left is gold; pearl prices are white plates (pink marks the selection, gold would read as coins) */
.st-h .label { color: var(--gold); }
.pk-price { justify-self: stretch; margin: 10px -10px 0; background: var(--white); color: var(--ink); font-size: 16px; }
.pack:disabled .pk-price { background: var(--tile-2); color: var(--w2); }
.pack small { font-size: 13px; color: var(--w2); }
/* season track: readable amounts, the locked premium row dimmed less */
.tierc .rw, .track-wrap.pass .tierc .rw { font-size: 14px; }
.track-wrap.pass .tierc .rw .ic { width: 18px; height: 18px; }
.tierc.prem.locked { opacity: .78; }
.tierc.now { box-shadow: 0 0 0 2px var(--white), 0 0 0 6px var(--pink); }
/* trophies and leaderboards: names at reading size */
.tcab b { font: 600 condensed 13px/1.15 var(--disp); color: var(--w2); }
.lb-nm { font: 800 condensed 18px/1.1 var(--disp); text-transform: uppercase; }
.lbr .label { font-size: 12.5px; }
.lbr .pl.p2 { color: #c9d3e0; }
/* modals: no coloured stripe across the top; daily login amounts line up */
.modal::before { content: none; }
/* daily login: every day on the same rows (day, icon, amount, note) so the amounts line up; day 7 a flat tinted plate */
.day { align-content: start; grid-template-rows: auto 28px auto auto; }
.day .dn { color: var(--w2); }
.day.big { background: color-mix(in srgb, #7b4dff 34%, #17181e); }
.day.today { transform: none; }
.day .label { font-size: 12.5px; }
/* cup races numbered plainly */
.cuplist div span { color: var(--w2); min-width: 14px; }
/* the sign-in divider and part captions at reading size */
.auth .or { font-size: 14px; }
.pc-h { font-size: 13.5px; }
.n5 .pc-h { font-size: 13px; }
.pt .tn { font: 700 condensed 13px/1.05 var(--disp); }
.join .input { text-transform: uppercase; }
.join .input::placeholder { text-transform: none; letter-spacing: 0; }
/* store faces: rendered parts and drivers stand on the light studio plate; swatches, trails and badges sit on a flat
   plate tinted by their rarity (a bare icon on an off-white slab read as a placeholder) */
.st-face { background: color-mix(in srgb, var(--rc, #888) 13%, #17181e); }
.st-face.k-body, .st-face.k-wheels, .st-face.k-glider, .st-face.k-acc, .st-face.k-char { background: #e2e2df; }
.join .input { letter-spacing: .2em; }
.join .input::placeholder { letter-spacing: 0; }
.vc .name em, .name em { font-style: normal; color: inherit; }
/* the lobby heading's facts and the course note sit on the city: a soft shadow keeps them off the windows */
.lb-head span, .lobby-head > .label, .lb-sub span { text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 16px rgba(0, 0, 0, .7); }
/* the sticky Start: an opaque fade above it, so a paragraph scrolling under it never shows half-cut */
.side .go { box-shadow: 0 -12px 10px 2px #0e0f15; }
/* ---------- one scale for every screen size ----------
   Laid out at 1280x720 and scaled to the window like a console game (FH5 and GT7 keep their type the same share of
   the screen at 1080p and 4K). --z comes from the window size (app.js); vh/vw inside these boxes are divided by it. */
:root { --z: 1; }
#ui, #hud, #intro, #pause, #cine, #tut, #mapveil, #focus-hint, .boot, .modal-back, .toasts, .reveal { zoom: var(--z); }
/* scrollbars: a thin white bar on a faint track and no arrow buttons, the GT7 list bar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, .06); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .32); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .55); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
/* toasts: one dark plate, no coloured side bar; an error says so in its title colour */
.toast, .toast.err { box-shadow: 0 16px 40px rgba(0, 0, 0, .5); border-radius: 0; }
.toast.err b { color: var(--loss); }
/* results: the line under the place figure is read over the track, so it gets the same shade as the figure */
.res-hero .verdict small { color: rgba(255, 255, 255, .9); text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 18px rgba(0, 0, 0, .7); }
/* the reveal: the menu no longer shows through around the band; reward chips at button size */
.reveal { background: rgba(8, 9, 12, .97); }
.reveal .grants { gap: 8px; }
.reveal .grants .chip { height: 34px; padding: 0 13px; gap: 7px; font: 700 condensed 17px/1 var(--disp); letter-spacing: .02em; }
.reveal .grants .chip .ic, .reveal .grants .chip svg { width: 20px; height: 20px; }
/* ---------- 1080p review (19 Nov 2026) ----------
   Panels nearly opaque like FH5's (the kart no longer shows through stat tiles and the rewards panel); no coloured
   side bars anywhere; section kickers are gold plates, never pink text; text read over the scene gets a shade. */
:root { --tile: rgba(14, 15, 21, .95); --tile-2: rgba(28, 30, 40, .96); }
.ev .ev-top .stag { box-shadow: none; }
.ev.on .ev-top .stag, .ev:is([data-mode="casual"],[data-mode="ranked"],[data-mode="local-quick"]).on .ev-top .stag { background: var(--white); color: var(--ink); }
.trow[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--white); }
.cev-band { box-shadow: none; }
.rchip { box-shadow: none; }
.road-st.big { box-shadow: none; }
.req { border-left: 0; }
.ach.done, .chal.done, .mile.done { box-shadow: none; }
.q-pay > div { border-left: 0; }
.lo-hero .build i.sep { color: inherit; }
.tile .tk, .tdetail .where { font: 700 condensed 14px/1 var(--disp); letter-spacing: .04em; }
.dcard .cls { font-size: 13px; letter-spacing: .04em; }
.stat .label, .goal { letter-spacing: .04em; }
.home-head .hi small { letter-spacing: .04em; }
.pass-lbl span { font-size: 14px; letter-spacing: .04em; }
.tdetail .where, .tdetail .bl, .tdetail .label, .lb-sub, .lb-sub b, .tcab-wrap + .fine { text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 16px rgba(0, 0, 0, .7); }
.tdetail .bl { color: rgba(255, 255, 255, .9); }
/* settings: the section plates without the old underline (it pushed the word to the top of the plate); sliders
   are white blocks on a thin track like the pause menu's */
.set-sec > .eyebrow { border-bottom: 0; padding-bottom: 0; }
#ui input[type=range] { -webkit-appearance: none; appearance: none; height: 26px; background: transparent; }
#ui input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 0; background: rgba(255, 255, 255, .22); }
#ui input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 22px; margin-top: -9px; border-radius: 0; background: var(--white); border: 0; box-shadow: none; }
.pk-price { padding: 10px 12px; text-align: center; }
/* lists that run past their box fade out at the edge instead of slicing a row */
.res-left > .scroll, .tlist, .cuplist, .lb-rows { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 36px), transparent); padding-bottom: 24px; }
/* ranked queue: the column scrolls inside the screen instead of running under the prompts */
.queue-scr { flex: 1; min-height: 0; margin-top: 0; overflow-y: auto; }
.queue-scr > .stagger { gap: 14px !important; }
/* toasts sit under the tab row on the right, clear of the wallet and the rewards plate */
.toasts { top: calc(var(--bar-h) + 6px); }
/* the reveal: one solid band that holds the kicker, the figure, the rewards and the prompt */
.reveal { background: #08090c; }
.reveal .rays { display: none; }
.reveal .content { width: 100%; box-sizing: border-box; padding: 40px 20px 34px; background: #15161c; box-shadow: inset 0 4px 0 var(--rc-solid, var(--gold)), inset 0 -4px 0 var(--rc-solid, var(--gold)); }
/* panels over the 3D garage are solid: a wheel or a kart behind a stats tile read as a glitch at 1080p */
:root { --tile: #101117; --tile-2: #1c1e28; }
.ls, .lo.kart .lo-info, .lobby-side, .side, .gar-main { background: #101117; }
.pcol { background: rgba(16, 17, 23, .92); }
.pcol.on { background: #15161d; }
.trow { background: rgba(16, 17, 23, .93); }
/* the build line stays on one line; the rules between the parts are thin and close */
.lo-hero .build { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; gap: 0; }
.lo-hero .build span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lo-hero .build .sep { flex: none; align-self: center; margin: 0 .55em; }
/* the level road runs on past its box */
.road { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 40px), transparent); }
.page-scroll { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 40px), transparent); padding-bottom: 30px; }
/* ---------- no white blocks (owner, 19 Nov 2026: the whitish plates made Home look cheap) ----------
   FH5's home: photo tiles with no frame, solid dark tiles, the tab row as dark plates with the current one coloured.
   The light plates, the white photo frames and the light tab plates are gone; white stays for text, icons and the
   focus ring. */
.mosaic .plate.light { background: #1c1d24; color: var(--white); }
.mosaic .plate.light .tl { color: var(--white); }
.mosaic .plate.light .ts { color: var(--w2); }
.mosaic .plate.dark { background: #121319; }
.mosaic .photo::after { content: none; }
.tabsnav .tn-i, .tab, .lo-steps button, .lo-pages button { color: rgba(255, 255, 255, .86); background: rgba(12, 13, 18, .82); }
.tabsnav .tn-i:hover, .tab:hover, .lo-steps button:hover, .lo-pages button:hover { color: var(--white); background: rgba(44, 46, 56, .92); }
.tabsnav .tn-i[aria-current="true"], .tab[aria-selected="true"], .lo-steps button[aria-current="true"], .lo-pages button[aria-pressed="true"] { color: var(--white); background: var(--pink); }
.tabsnav button.key { width: 24px; min-width: 24px; height: 24px; align-self: center; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); color: var(--white); }
.tabsnav button.key:hover { background: rgba(255, 255, 255, .14); }
/* the same rule in the store and the pass: kart parts on a dark face under a soft spot (FH5's car cards), prices
   and Pearl amounts on dark plates, the premium row's label gold (it is the paid row) */
.st-face.k-body, .st-face.k-wheels, .st-face.k-glider, .st-face.k-acc, .st-face.k-char { background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 62%), color-mix(in srgb, var(--rc, #888) 10%, #1a1b22); }
.pk-price { background: #262832; color: var(--white); }
.pack:not(:disabled):hover .pk-price, .pack:focus-visible .pk-price { background: var(--pink); }
.chip.pearl { background: #262832; color: var(--white); }
.pass-lbl span:last-child { background: var(--gold); color: var(--ink); }
/* ---------- type after the owner's "the fonts still look AI" (19 Nov 2026) ----------
   Heavy condensed caps everywhere was the cliché. Big figures and mosaic titles take the extra-condensed cut (FH5's
   tall figures); labels, tabs and buttons drop to 600-700; reading text is Sofia Sans in sentence case. */
.mosaic .tile .tl, .mosaic .t-race .tl, .place-big, .reveal .lvl-num, .lvl-badge, .lvq, .hero-name, .tdetail .tn, .ev-main .t2, .h1 { font-family: var(--tight); }
.mosaic .tile .tl { font-weight: 800; font-size: calc(var(--cell) * .19); }
.mosaic .t-race .tl { font-size: calc(var(--cell) * .46); }
.mosaic .tile .ts, .ev-band, .tile .tk, .tdetail .where { font-weight: 600; }
.tabsnav .tn-i, .tab, .lo-steps button, .lo-pages button { font-weight: 600; font-size: 16px; letter-spacing: .01em; }
.label, .stat .label { font-weight: 600; }
.btn { font-weight: 700; letter-spacing: .02em; }
.fine, .tdetail .bl, .ev-main .d, p { font-family: var(--body); }
/* toasts drop into the empty middle of the status bar (where consoles put them), clear of panels and the wallet */
.toasts { top: 8px; left: 50%; right: auto; width: min(400px, calc(calc(100vw / var(--z)) - 32px)); transform: translateX(-50%); }
.toasts.low { left: var(--gutter); transform: none; }
/* figures keep clear of the scrollbar; a cut-off block fades over a longer run so it reads as "more below" */
.scroll { padding-right: 8px; }
.res-side .rewards.scroll { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 60px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 60px), transparent); padding-bottom: 40px; }
/* small things that were too small, too tracked or wrapping badly */
.field .seg button { padding: 0 12px; }
.day .label { font-size: 13px; }
.qs b { font-size: 13px; } .qs .label { font-size: 12px; }
.q-racer .fine { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-pay .fine { text-wrap: balance; }
.q-pay > div { align-content: start; }
.eyebrow { letter-spacing: .04em; }
.tile .tk, .ev-top .stag, .tdetail .where { letter-spacing: .04em; }
#ident p { letter-spacing: .12em; }
.toasts .toast { padding-top: 10px; padding-bottom: 10px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px); } }

/* ---------- reward cards: what you got, plainly (rewards.js itemCard) ----------
   The kind in large type, a real preview of the thing on a dark spot-lit stage, the name, the rarity, and one line on
   what it does and where it goes. Level-ups list their items as picture tiles. */
.reveal .kicker.rv-kind { font: 700 condensed 30px/1 var(--disp); padding: 9px 18px; letter-spacing: .02em; }
.reveal .rv-stage { width: 480px; height: 270px; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 3px; background: radial-gradient(ellipse at 50% 40%, #2c2f3b, #121319 74%); box-shadow: inset 0 -3px 0 var(--rc-solid, var(--gold)); animation: placeIn .6s .2s var(--x) both; }
.reveal .rv-stage.por { width: 250px; height: 320px; background: #1c1e28 center 18% / cover no-repeat; }
.reveal .rv-stage.wide { width: 600px; height: auto; padding: 22px; background: none; box-shadow: none; overflow: visible; }
.reveal .rv-stage .picon.rv-pic { width: 300px; height: 260px; background-repeat: no-repeat; }
.reveal .rv-paint { width: 320px; height: 180px; border-radius: 12px; box-shadow: inset 0 -36px 60px rgba(0, 0, 0, .35), inset 0 24px 40px rgba(255, 255, 255, .28), 0 12px 30px rgba(0, 0, 0, .5); }
.reveal .rv-stage.trail .rv-streak { position: absolute; left: -2%; right: 40%; top: 50%; height: 70px; margin-top: -26px; border-radius: 0 50px 50px 0; filter: blur(3px); }
.reveal .rv-stage .picon.rv-kart { position: absolute; right: 6%; top: 50%; width: 220px; height: 200px; margin-top: -100px; background-repeat: no-repeat; }
.reveal .rv-decal { width: 440px; height: 220px; background: center / contain no-repeat; }
.reveal .rv-big { display: grid; place-items: center; color: var(--white); }
.reveal .rv-big svg { width: 96px; height: 96px; }
.reveal .rv-stage.horn { gap: 14px; align-content: center; }
.reveal .rv-tag { font: 500 italic 20px/1.2 var(--body); color: var(--w2); }
.reveal .rv-stage .btn[data-honk] { pointer-events: auto; }
.reveal .sw.rv-ball { width: 180px; height: 180px; border-radius: 50%; box-shadow: 0 14px 30px rgba(0, 0, 0, .5); }
.reveal .sw.rv-puff { width: 260px; height: 190px; border-radius: 50%; background: radial-gradient(circle at 30% 60%, var(--s1) 0 26%, transparent 27%), radial-gradient(circle at 62% 42%, var(--s2) 0 30%, transparent 31%), radial-gradient(circle at 70% 72%, var(--s3) 0 22%, transparent 23%); filter: blur(4px); }
.reveal .vic.rv-vic { width: 200px; height: 200px; border-radius: 50%; display: grid; place-items: center; }
.reveal .vic.rv-vic .glyph { width: 84px; height: 84px; color: var(--white); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.reveal .rv-emo { position: relative; padding: 20px 34px; background: var(--white); color: var(--ink); font: 800 italic 56px/1 var(--disp); border-radius: 30px 30px 30px 6px; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
.reveal .rv-card { width: 100%; box-sizing: border-box; text-align: left; }
.reveal .rv-card .rv-cardtx { display: grid; gap: 8px; }
.reveal .rv-card .rv-cardtx b { font: 700 condensed 34px/1 var(--disp); color: var(--white); }
.reveal .rv-card .ttl { font-size: 18px; }
.reveal .rv-new { outline: 3px solid var(--gold); outline-offset: 5px; }
.reveal .ttl.rv-new { color: var(--gold); outline-offset: 4px; padding: 2px 6px; }
.reveal .rv-stage.decor { background: linear-gradient(180deg, var(--w) 0 66%, var(--c) 66%); }
.reveal .rv-stage.decor .sb { position: absolute; top: 12%; left: 10%; width: 96px; height: 120px; background: var(--s); opacity: .8; filter: blur(14px); }
.reveal .rv-stage.decor .sb.r { left: auto; right: 10%; }
.reveal .rv-stage.decor .fl { position: absolute; left: 0; right: 0; top: 66%; height: 5px; background: var(--l); }
.reveal .rv-stage.decor .picon.rv-kart { right: auto; left: 50%; margin-left: -110px; top: 58%; }
.reveal .rv-trophy { height: 236px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .55)); }
.reveal .rv-rar { font: 700 condensed 18px/1 var(--disp); text-transform: uppercase; letter-spacing: .1em; }
.reveal .rv-what { margin: 2px 0 0; max-width: 560px; font: 500 19px/1.35 var(--body); color: rgba(255, 255, 255, .8); }
.reveal .rv-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; animation: rise .5s .9s var(--x) both; }
.reveal .rv-tile { width: 176px; display: grid; justify-items: center; gap: 7px; padding: 14px 10px 16px; background: #1c1e28; box-shadow: inset 0 -3px 0 var(--rc); }
.reveal .rv-tile .rv-tf { width: 120px; height: 104px; display: grid; place-items: center; position: relative; }
.reveal .rv-tile .rv-tf > * { width: 100%; height: 100%; }
.reveal .rv-tile .rv-tf .sf-gl { display: grid; place-items: center; color: var(--white); } .reveal .rv-tile .rv-tf .sf-gl svg { width: 54px; height: 54px; }
.reveal .rv-tile .rv-tf .sf-sw { width: 84px; height: 84px; border-radius: 50%; }
.reveal .rv-tile .rv-tf .sf-por { background: center 18% / cover no-repeat; }
.reveal .rv-tile .rv-tk { font: 600 condensed 14px/1 var(--disp); text-transform: uppercase; letter-spacing: .06em; color: var(--gold); }
.reveal .rv-tile b { font: 700 condensed 20px/1.1 var(--disp); color: var(--white); }
/* driver skins and kart wraps (Pearl store, 2026-11-22): skins on tall driver cards in the store, a fourth column
   on the garage's Flair page; wraps as a larger ball of their own texture */
.pcols.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pt .skn { position: absolute; inset: 8% 14% 26%; border-radius: 2px; background: center 22% / cover no-repeat; }
.pt .gl .glyph { width: 34%; height: 34%; color: var(--w2); }
.store .shop-grid.skins .shop-tile { grid-template-rows: 236px auto auto; }
.st-face.k-skin { background: #0e0f13; }
.st-face.k-skin .sf-por { width: 100%; height: 100%; border-radius: 0; background-position: center 30%; }
.store .shop-grid.wraps .sf-sw { width: 92px; height: 92px; }
/* Pearl packs (2026-11-22): what you get, each a material a step up (silver, gold, a golden hoard, a diamond),
   rendered in tools/assets/render_packs.py; the diamond catches the light now and then */
.pack { position: relative; }
.pack .pk-art { display: block; position: relative; width: 100%; height: 96px; margin: -6px 0 0; background: center / contain no-repeat; }
.pack .pk-name { font: 700 condensed 12.5px/1 var(--disp); font-style: normal; letter-spacing: .02em; color: var(--w2); }
.pack.n0 .pk-name { color: #d6dae2; } .pack.n1 .pk-name, .pack.n2 .pk-name { color: #f1c75a; } .pack.n3 .pk-name { color: #c4ecff; }
.pack.best { padding-top: 30px; }
.pk-tag { position: absolute; top: 8px; left: 50%; translate: -50% 0; z-index: 1; padding: 4px 7px; background: #c4ecff; color: var(--ink); font: 800 condensed 11px/1 var(--disp); text-transform: uppercase; }
.pack.n3 .pk-art::after { content: ''; position: absolute; left: 56%; top: 6%; width: 26px; height: 26px; pointer-events: none;
  background: linear-gradient(90deg, transparent 46%, #fff 50%, transparent 54%), linear-gradient(0deg, transparent 46%, #fff 50%, transparent 54%);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 68%); mask: radial-gradient(circle, #000 15%, transparent 68%); opacity: 0; animation: pkGlint 3.2s ease-in-out infinite; }
@keyframes pkGlint { 0%, 62%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); } 72% { opacity: 1; transform: scale(1) rotate(30deg); } 84% { opacity: 0; transform: scale(.6) rotate(60deg); } }
@media (prefers-reduced-motion: reduce) { .pack.n3 .pk-art::after { animation: none; } }
.pack:disabled { opacity: .9; }   /* a guest still sees what the packs hold; the greyed price says it cannot buy yet */
