/* Clash-interface (graphics-ronde 2, uitgebreid in ronde 8): dikke banners, gouden randen, gloed, glanzende knoppen
   met een indruk-animatie en beloningsanimaties. Geldt voor alle panelen (.panel-screen) en de garage; menu en HUD
   staan verderop (ronde 3).
   Alleen transform en opacity animeren (goedkoop op een iPhone 12), geen extra backdrop-filter. */
:root {
  --cr-blue1: #3d8bff; --cr-blue2: #1d55c9; --cr-blue3: #0f2f7a; --cr-navy: #0a1a44; --cr-ink: #071233;
  --cr-gold1: #ffe9a3; --cr-gold2: #ffc928; --cr-gold3: #d68a0c; --cr-gold4: #8a5200;
  --cr-yel1: #ffe45c; --cr-yel2: #ffb800; --cr-yel3: #b86d00;
  --cr-grn1: #9cf06b; --cr-grn2: #3fbf2a; --cr-grn3: #1d7a12;
  --cr-pur1: #d58bff; --cr-pur2: #8b3dff; --cr-pur3: #4b1aa8;
  --cr-out: 0 2px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink), 0 3px 6px rgba(0, 0, 0, .45);
  /* speelgoedknoppen: gezicht met een Clash-band net onder de glans, teruggekaatst licht onderin, glanslaag, glimlicht,
     lichte binnenrand en een veer */
  --cr-blue-face: radial-gradient(70% 60% at 50% 118%, rgba(120, 210, 255, .5), transparent 70%),
    linear-gradient(180deg, #52a0ff 0%, #347ff0 45%, #2465d6 49%, #1f5bcf 72%, #173f9c 100%);
  --cr-yel-face: radial-gradient(70% 60% at 50% 118%, rgba(255, 244, 180, .55), transparent 70%),
    linear-gradient(180deg, #ffe066 0%, #ffc61e 45%, #ffa400 49%, #ff9800 72%, #ea7c00 100%);
  --cr-gloss: linear-gradient(180deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, .2) 72%, rgba(255, 255, 255, .13) 100%);
  --cr-gloss-gold: linear-gradient(180deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, .34) 72%, rgba(255, 255, 255, .26) 100%);
  --cr-glint: radial-gradient(3px 3px at 11px 8px, #fff 65%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(16px 3.4px at 32px 6px, rgba(255, 255, 255, .95) 62%, rgba(255, 255, 255, 0) 100%);
  --cr-glint-s: radial-gradient(2px 2px at 7px 6px, #fff 65%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(7px 2.2px at 16px 4.5px, rgba(255, 255, 255, .9) 62%, rgba(255, 255, 255, 0) 100%);
  /* terugknop en kleine knoppen: alleen een streepje in de hoek, een stip naast de pijl of de eerste letter leest als een los puntje */
  --cr-glint-xs: radial-gradient(8px 2.2px at 8px 4px, rgba(255, 255, 255, .9) 62%, rgba(255, 255, 255, 0) 100%);
  --cr-rim: inset 0 0 0 1px rgba(255, 255, 255, .32), inset 0 2px 0 rgba(255, 255, 255, .28);
  --cr-rim-gold: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 2px 0 rgba(255, 255, 255, .4);
  --cr-spring: cubic-bezier(.3, 2.2, .5, 1);
}

/* ---------- paneel: diepblauw met een gouden dubbele rand ---------- */
:is(.panel-screen, #s-garage) .panel {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(120, 180, 255, .28), transparent 60%),
    linear-gradient(180deg, #1c4bb0 0%, #12357f 45%, #0b2259 100%);
  border: 3px solid var(--cr-gold2); border-radius: 24px;
  box-shadow: 0 0 0 2px var(--cr-gold4), 0 0 0 5px rgba(7, 18, 51, .9), inset 0 2px 0 rgba(255, 255, 255, .35),
    inset 0 0 40px rgba(0, 10, 40, .55), 0 24px 60px rgba(0, 0, 0, .55);
}
/* binnenkomen alleen vlak na het openen (rewardfx.js zet .cr-enter ~0,7 s), niet bij elke nieuwe render */
:is(.panel-screen, #s-garage).cr-enter .panel { animation: cr-pop-in .42s var(--ease-back) both; }
.panel-screen { background: radial-gradient(ellipse at center, rgba(20, 50, 120, .35), rgba(3, 8, 24, .7)); }

/* ---------- kop als dik lint ---------- */
:is(.panel-screen, #s-garage) .panel-head { position: relative; margin: -4px -6px 12px; padding: 8px 10px; border-radius: 16px;
  background: linear-gradient(180deg, #4f9dff 0%, #2667e0 52%, #1a4fb8 53%, #163f96 100%);
  border: 2px solid var(--cr-gold2); box-shadow: 0 0 0 2px var(--cr-gold4), inset 0 2px 0 rgba(255, 255, 255, .45), 0 6px 0 rgba(7, 18, 51, .55); }
:is(.panel-screen, #s-garage) .panel h2 { font-size: clamp(24px, 3.6vw, 34px); color: #fff; letter-spacing: .04em; text-shadow: var(--cr-out); }
:is(.panel-screen, #s-garage) .mode-line { color: #d6e6ff; text-shadow: 0 1px 0 var(--cr-ink); }
:is(.panel-screen, #s-garage) .panel h3 { color: var(--cr-gold1); letter-spacing: .14em; text-shadow: 0 2px 0 var(--cr-ink); font-size: 13.5px; }
:is(.panel-screen, #s-garage) .back { background: linear-gradient(180deg, #ff7a66 0%, #f23b28 45%, #d22414 75%, #b51a10 100%); border: 2px solid var(--cr-ink);
  box-shadow: var(--cr-rim-gold), inset 0 -3px 0 rgba(90, 0, 0, .35), 0 4px 0 #7a0e06, 0 4px 0 2px var(--cr-ink); color: #fff; }
:is(.panel-screen, #s-garage) .back svg { filter: drop-shadow(0 2px 0 var(--cr-ink)); }

/* ---------- glanzende knoppen met indruk (glans, veer en indrukken: onderaan bij de speelgoedknoppen) ---------- */
:is(.panel-screen, #s-garage, #confirm) :is(.big-btn, .ghost-btn, .chip, .back, .seg button, .gc, .pts-chip) {
  position: relative; transition: transform .08s ease-out, box-shadow .08s ease-out, filter .12s; }
:is(.panel-screen, #s-garage) .big-btn {
  border-radius: 16px; color: #fff; font-size: clamp(20px, 2.8vw, 25px); padding: 12px 16px 14px; overflow: hidden; isolation: isolate;
  background: var(--cr-yel-face);
  border: 2px solid var(--cr-ink); text-shadow: var(--cr-out);
  box-shadow: var(--cr-rim-gold), inset 0 -5px 0 rgba(140, 70, 0, .4), 0 6px 0 var(--cr-yel3), 0 6px 0 2px var(--cr-ink), 0 12px 20px rgba(0, 0, 0, .4); }
/* glimlijn die er af en toe overheen veegt */
:is(.panel-screen, #s-garage) .big-btn::after { content: ''; position: absolute; inset: -20% auto -20% 0; width: 38%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: translateX(-160%) skewX(-18deg);
  animation: cr-shine 3.4s ease-in-out 1s infinite; }
:is(.panel-screen, #s-garage) .big-btn:active:not(:disabled) { filter: brightness(1.06);
  box-shadow: var(--cr-rim-gold), inset 0 -3px 0 rgba(140, 70, 0, .4), 0 1px 0 var(--cr-yel3), 0 1px 0 2px var(--cr-ink), 0 3px 8px rgba(0, 0, 0, .35); }
:is(.panel-screen, #s-garage) .big-btn:disabled { filter: grayscale(.8) brightness(.8); opacity: .8; }
:is(.panel-screen, #s-garage) .big-btn:disabled::after { display: none; }

/* groene koopknoppen (prijs) */
:is(.panel-screen, #s-garage) :is(.ar-buy, .gb-buy, .ar-claim, .ar-up) {
  color: #fff; font-family: var(--display); font-weight: 400; letter-spacing: .03em; text-shadow: var(--cr-out); border-radius: 12px;
  background: linear-gradient(180deg, var(--cr-grn1) 0%, #5fd83e 48%, var(--cr-grn2) 52%, #2fa51e 100%); border: 2px solid var(--cr-ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(10, 70, 0, .4), 0 4px 0 var(--cr-grn3), 0 4px 0 2px var(--cr-ink); }
:is(.panel-screen, #s-garage) :is(.ar-buy, .gb-buy, .ar-claim, .ar-up):active:not(:disabled) { transform: translateY(4px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 0 0 var(--cr-grn3), 0 0 0 2px var(--cr-ink); }
:is(.panel-screen, #s-garage) :is(.ar-buy, .ar-up).poor { background: linear-gradient(180deg, #c8d0dc, #8d97a8 52%, #6e7889); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 #4a5260, 0 4px 0 2px var(--cr-ink); }
:is(.panel-screen, #s-garage) .ar-buy:disabled { filter: grayscale(.6); opacity: .85; }
/* claim: zachte gloed-puls (opacity van een laag, geen box-shadow-animatie) */
:is(.panel-screen, #s-garage) .ar-claim::before { content: ''; position: absolute; inset: -6px; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 16px 4px rgba(156, 240, 107, .85); animation: cr-pulse 1.3s ease-in-out infinite; }

/* gewone knoppen: blauw glas (niet de Apple-knop en de Apple-status, die houden hun eigen uiterlijk) */
:is(.panel-screen, #s-garage) .ghost-btn:not(:is(.ar-buy, .gb-buy, .ar-claim, .ar-up, .apple-btn, .apple-on)) {
  color: #fff; text-shadow: 0 1px 0 var(--cr-ink); border-radius: 12px; border: 2px solid var(--cr-ink);
  background: var(--cr-blue-face);
  box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .35), 0 5px 0 #123a85, 0 5px 0 2px var(--cr-ink); }
:is(.panel-screen, #s-garage) .ghost-btn:not(:is(.ar-buy, .gb-buy, .ar-claim, .ar-up, .apple-btn, .apple-on)):active { box-shadow: var(--cr-rim), inset 0 -2px 0 rgba(5, 20, 70, .35), 0 1px 0 #123a85, 0 1px 0 2px var(--cr-ink); }
:is(.panel-screen, #s-garage) .ghost-btn:not(:is(.ar-buy, .gb-buy, .ar-claim, .ar-up, .apple-btn, .apple-on)) svg { filter: drop-shadow(0 2px 0 var(--cr-ink)); }
/* Inloggen met Apple: Apples zwarte knop in de systeemletter (Apple-richtlijn), zonder glans, lip of veer;
   de status 'bewaard' is geen knop en geeft dus ook geen indruk */
:is(.panel-screen, #s-garage) .ghost-btn.apple-btn { font-family: -apple-system, system-ui, sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 0; }
:is(.panel-screen, #s-garage) .ghost-btn.apple-on:is(:hover, :active) { background: rgba(255, 255, 255, .07); transform: none; }
:is(.panel-screen, #s-garage) .back:active { box-shadow: var(--cr-rim-gold), inset 0 -2px 0 rgba(90, 0, 0, .35), 0 1px 0 #7a0e06, 0 1px 0 2px var(--cr-ink); }

/* ---------- tabbladen ---------- */
:is(.panel-screen, #s-garage) :is(.ar-tabs .chip, .gar-tabs button, .on-kind button) {
  font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .03em; color: #cfe0ff; text-shadow: 0 2px 0 var(--cr-ink);
  padding: 8px 12px 9px; border-radius: 12px; border: 2px solid var(--cr-ink);
  background: linear-gradient(180deg, #2b5fc4, #1b4296 55%, #163781); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .22), 0 3px 0 var(--cr-ink); }
:is(.panel-screen, #s-garage) :is(.ar-tabs .chip.sel, .gar-tabs button.sel, .on-kind button.sel) { color: #fff; text-shadow: var(--cr-out);
  background: linear-gradient(180deg, var(--cr-gold1) 0%, var(--cr-gold2) 50%, #f0a810 51%, var(--cr-gold3) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 3px 0 var(--cr-gold4), 0 3px 0 2px var(--cr-ink), 0 0 14px rgba(255, 201, 40, .55); transform: translateY(-1px); }
:is(.panel-screen, #s-garage) :is(.ar-tabs .chip, .gar-tabs button, .on-kind button):active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3); }
#s-garage .gar-tabs { gap: 5px; background: none; border: 0; padding: 0; }
#s-arena .ar-tabs { flex-wrap: nowrap; gap: 5px; }
#s-arena .ar-tabs .chip { flex: 1 1 auto; min-width: 0; white-space: nowrap; padding: 8px 8px 9px; font-size: clamp(12.5px, 1.75vw, 15px); }

/* ---------- kaarten en rijen: lichtere tegels met gouden rand ---------- */
:is(.panel-screen, #s-garage).cr-enter :is(.ar-card, .gc, .ar-row) { animation: cr-rise .38s var(--ease-back) both; }
:is(.panel-screen, #s-garage) .ar-card { border-radius: 18px; border: 2px solid rgba(7, 18, 51, .9);
  background: linear-gradient(180deg, rgba(110, 170, 255, .26), rgba(30, 80, 190, .22) 40%, rgba(8, 26, 80, .55));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28), 0 0 0 1px rgba(255, 201, 40, .55), 0 4px 0 rgba(7, 18, 51, .6); }
:is(.panel-screen, #s-garage) .ar-card > small { color: var(--cr-gold1); text-shadow: 0 2px 0 var(--cr-ink); letter-spacing: .14em; }
:is(.panel-screen, #s-garage) :is(.ar-cn b, .gc b) { color: #fff; text-shadow: var(--cr-out); }
:is(.panel-screen, #s-garage) :is(.note, .muted, .gc small, .ar-rn small) { color: #c3d6f7; }
:is(.panel-screen, #s-garage) .ar-row { padding: 9px 11px; border-radius: 14px; border: 2px solid rgba(7, 18, 51, .85);
  background: linear-gradient(180deg, rgba(120, 175, 255, .22), rgba(20, 60, 160, .3)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 3px 0 rgba(7, 18, 51, .55); }
:is(.panel-screen, #s-garage) .ar-row.me { background: linear-gradient(180deg, rgba(255, 220, 110, .35), rgba(214, 138, 12, .25)); border-color: var(--cr-gold3);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 0 0 2px var(--cr-gold2), 0 0 18px rgba(255, 201, 40, .45); outline: 0; }
:is(.panel-screen, #s-garage) .ar-rn b { color: #fff; font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: .02em; text-shadow: var(--cr-out); }
/* lange kartnaam in de autolijst (PHANTOM GLIDE in de smalle garage): op twee regels in plaats van afgesneden */
:is(.panel-screen, #s-garage) .ar-carrow .ar-rn b { white-space: normal; line-height: 1.05; }
:is(.panel-screen, #s-garage) .ar-ri { display: grid; place-items: center; width: 42px; height: 42px; flex: none; font-size: 26px; border-radius: 12px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .45), rgba(80, 150, 255, .25) 45%, rgba(10, 30, 90, .6));
  border: 2px solid rgba(7, 18, 51, .8); box-shadow: inset 0 0 12px rgba(150, 210, 255, .5); filter: drop-shadow(0 2px 0 rgba(7, 18, 51, .7)); }
/* diamantpakketten: de beste waarde krijgt een gouden gloed en een lint */
:is(.panel-screen, #s-garage) .ar-pack:last-of-type .ar-ri, :is(.panel-screen, #s-garage) .ar-pack .ar-ri { animation: cr-bob 2.4s ease-in-out infinite; }
:is(.panel-screen, #s-garage) .ar-pack:has(.ar-rn small) { border-color: var(--cr-gold3); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 0 0 2px var(--cr-gold2), 0 0 20px rgba(255, 201, 40, .45); }

/* Pass: paars met goud, de duurste kaart */
:is(.panel-screen, #s-garage) .ar-pass { background: radial-gradient(120% 90% at 85% 0%, rgba(255, 140, 220, .4), transparent 55%), linear-gradient(160deg, #9b4dff 0%, #6a24d6 45%, #3b108a 100%);
  border-color: var(--cr-ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 0 0 2px var(--cr-gold2), 0 0 0 4px var(--cr-gold4), 0 0 26px rgba(190, 110, 255, .55); }
/* knoppen in de Pass-kaart (winkel): de oude Clash-knop, zonder glanslaag of veer */
:is(.panel-screen, #s-garage) .ar-pass .big-btn { font-size: clamp(16px, 2.2vw, 21px); white-space: nowrap;
  background: linear-gradient(180deg, var(--cr-yel1) 0%, var(--cr-yel2) 50%, #f29a00 51%, #e88a00 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -4px 0 rgba(140, 70, 0, .45), 0 6px 0 var(--cr-yel3), 0 6px 0 2px var(--cr-ink), 0 12px 20px rgba(0, 0, 0, .4); }
:is(.panel-screen, #s-garage) .ar-pass .big-btn:active:not(:disabled) { transform: translateY(5px);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(140, 70, 0, .45), 0 1px 0 var(--cr-yel3), 0 1px 0 2px var(--cr-ink), 0 3px 8px rgba(0, 0, 0, .35); }
:is(.panel-screen, #s-garage) .ar-pass .ghost-btn { background: linear-gradient(180deg, #6fb2ff 0%, #3d84f0 50%, #2a6bd6 51%, #1f56b5 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 #123a85, 0 4px 0 2px var(--cr-ink); }
:is(.panel-screen, #s-garage) .ar-pass .ghost-btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 0 0 2px var(--cr-ink); }

/* munten en voortgang */
:is(.panel-screen, #s-garage) :is(.ar-chip, .pts-chip) { border-radius: 999px; padding: 5px 12px 5px 8px; color: #fff; font-family: var(--display); font-weight: 400; text-shadow: var(--cr-out);
  background: linear-gradient(180deg, rgba(7, 18, 51, .85), rgba(7, 18, 51, .65)); border: 2px solid var(--cr-gold3); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15), 0 2px 0 var(--cr-ink); }
:is(.panel-screen, #s-garage) .pts-chip i { display: grid; place-items: center; width: 20px; height: 20px; margin-left: 4px; border-radius: 6px; font-size: 16px; line-height: 1; color: #fff;
  background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2)); border: 1.5px solid var(--cr-ink); text-shadow: 0 1px 0 var(--cr-ink); }
:is(.panel-screen, #s-garage) :is(.ar-bar, .ar-qbar) { height: 14px; border-radius: 8px; background: rgba(7, 18, 51, .85); border: 2px solid var(--cr-ink); overflow: hidden; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6); }
:is(.panel-screen, #s-garage) :is(.ar-bar, .ar-qbar) i { display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6); }
:is(.panel-screen, #s-garage) .ar-pips i, :is(.panel-screen, #s-garage) .ar-dots i { border: 1.5px solid var(--cr-ink); }
:is(.panel-screen, #s-garage) :is(.ar-pips i.on, .ar-dots i.on) { background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2)); box-shadow: 0 0 8px rgba(255, 201, 40, .7); }

/* ---------- garage-tegels ---------- */
#s-garage .gc { border-radius: 14px; border: 2px solid rgba(7, 18, 51, .85);
  background: linear-gradient(180deg, rgba(120, 175, 255, .25), rgba(20, 60, 160, .32)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .22), 0 4px 0 rgba(7, 18, 51, .6); }
#s-garage .gc:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 1px 0 rgba(7, 18, 51, .6); }
#s-garage .gc.sel { border-color: var(--cr-gold3); background: linear-gradient(180deg, rgba(255, 214, 90, .78), rgba(214, 138, 12, .66) 55%, rgba(150, 90, 0, .7));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 0 0 2px var(--cr-gold2), 0 0 18px rgba(255, 201, 40, .55), 0 4px 0 var(--cr-gold4); }
#s-garage .gc.try { border-color: #0a6a8a; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 0 0 2px #4fe3ff, 0 0 18px rgba(79, 227, 255, .55); }
#s-garage .gc.prem { background: linear-gradient(160deg, rgba(200, 120, 255, .45), rgba(90, 30, 200, .5)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 0 0 2px var(--cr-pur1), 0 4px 0 var(--cr-pur3); }
#s-garage .gc-price { color: #fff; font-family: var(--display); font-weight: 400; text-shadow: 0 2px 0 var(--cr-ink); }
/* ronde 27: labels minstens 12 px, vet en met inktrand; 'Gekozen' wit met een groen vinkje */
#s-garage .gc-tag { font-size: 12px; font-weight: 800; }
#s-garage .gc-tag.sel { display: inline-flex; align-items: center; gap: 3px; color: #fff; text-shadow: var(--cr-out); }
#s-garage .gc-tag.sel .ck { width: 14px; height: 14px; flex: none; color: var(--cr-grn1); filter: drop-shadow(0 1px 0 var(--cr-ink)) drop-shadow(0 -1px 0 var(--cr-ink)); }
#s-garage .gc-tag.own { color: var(--cr-grn1); text-shadow: var(--cr-out); }
#s-garage .sw-dot { width: 26px; height: 26px; border: 2px solid var(--cr-ink); box-shadow: inset 0 2px 3px rgba(255, 255, 255, .45), 0 2px 0 rgba(7, 18, 51, .6); }
/* 'Groot nummer': de ring hoort bij het stalletje (de Clash-schaduw hierboven gooide hem weg) */
#s-garage .sw-dot.liv-7 { box-shadow: inset 0 0 0 5px #c8ccd4, inset 0 0 0 9px #15171b, 0 2px 0 rgba(7, 18, 51, .6); }
/* patroon: mini-auto van boven; velgen: velgje met spaken (garage.js liveryIcon / rimIcon) */
#s-garage .sw-ico { flex: none; display: block; filter: drop-shadow(0 2px 0 rgba(7, 18, 51, .55)); }
#s-garage .sw-ico.liv { width: 24px; height: 40px; margin: -7px 2px -7px 1px; }
#s-garage .sw-ico.rim { width: 28px; height: 28px; }
#s-garage .gc.sw .gc-price, #s-garage .gc.sw .gc-tag { padding-left: 32px; }
#s-garage .gar-bar { border-top: 2px solid rgba(255, 201, 40, .5); }
#s-garage .gb-txt small { color: #7fe9ff; text-shadow: 0 1px 0 var(--cr-ink); }
#s-garage .gb-txt b { text-shadow: var(--cr-out); }
.gar-name b { text-shadow: var(--cr-out), 0 0 24px rgba(61, 139, 255, .6); }

/* ---------- beloningen (rewardfx.js): vliegende iconen, het getal dat oppompt, een lint ---------- */
.cr-fly { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; font-size: 30px; line-height: 1; will-change: transform, opacity;
  filter: drop-shadow(0 3px 0 rgba(7, 18, 51, .8)) drop-shadow(0 0 10px rgba(255, 230, 120, .7)); }
.cr-bump { animation: cr-bump .5s var(--ease-back); }
.cr-gain { position: fixed; z-index: 61; pointer-events: none; font-family: var(--display); font-size: 26px; color: #fff; text-shadow: var(--cr-out), 0 0 14px rgba(255, 220, 90, .9);
  animation: cr-gain 1.2s ease-out forwards; }
.cr-burst { position: fixed; z-index: 59; pointer-events: none; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 230, 120, .55) 0 8deg, transparent 8deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%);
  animation: cr-burst .9s ease-out forwards; }

@keyframes cr-pop-in { from { opacity: 0; transform: scale(.9) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cr-rise { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes cr-shine { 0%, 62% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(340%) skewX(-18deg); } }
@keyframes cr-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes cr-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
@keyframes cr-bump { 0% { transform: scale(1); } 35% { transform: scale(1.32); } 100% { transform: scale(1); } }
@keyframes cr-gain { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.6); } 18% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); }
  70% { opacity: 1; transform: translate(-50%, -26px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -44px) scale(.95); } }
@keyframes cr-burst { 0% { opacity: 0; transform: scale(.3) rotate(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25) rotate(40deg); } }

/* rijtjes niet allemaal tegelijk binnen */
:is(.panel-screen, #s-garage).cr-enter :is(.ar-row, .gc):nth-child(2) { animation-delay: .03s; }
:is(.panel-screen, #s-garage).cr-enter :is(.ar-row, .gc):nth-child(3) { animation-delay: .06s; }
:is(.panel-screen, #s-garage).cr-enter :is(.ar-row, .gc):nth-child(4) { animation-delay: .09s; }
:is(.panel-screen, #s-garage).cr-enter :is(.ar-row, .gc):nth-child(n+5) { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  :is(.panel-screen, #s-garage) :is(.panel, .ar-card, .gc, .ar-row, .big-btn::after, .ar-claim::before, .ar-ri) { animation: none !important; }
}

/* ======================= ronde 3: hoofdmenu en HUD ======================= */
/* ---------- logo: dikke inktrand, gouden glans die er af en toe overheen gaat ---------- */
#s-home .logo { filter: drop-shadow(0 4px 0 var(--cr-ink)) drop-shadow(0 0 2px var(--cr-ink)) drop-shadow(0 10px 22px rgba(0, 0, 0, .55)); }
#s-home .logo span { background: linear-gradient(180deg, #fff6c2 0%, var(--cr-gold2) 38%, #ff8a1a 70%, #ff3b2f 100%); -webkit-background-clip: text; background-clip: text; }
#s-home .tagline { color: #fff; text-shadow: var(--cr-out); }
#s-home { background: linear-gradient(90deg, rgba(8, 22, 66, .82) 0%, rgba(8, 22, 66, .45) 40%, rgba(8, 22, 66, 0) 66%); }

/* ---------- menuknoppen: dikke glanzende speelgoedblokken met een donkere lip (glans en veer: onderaan) ---------- */
#s-home .menu-btn { position: relative; overflow: hidden; isolation: isolate; border-radius: 18px; border: 2px solid var(--cr-ink);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  background: var(--cr-blue-face);
  box-shadow: var(--cr-rim), inset 0 -5px 0 rgba(5, 20, 70, .38), 0 6px 0 #0d2a70, 0 6px 0 2px var(--cr-ink), 0 13px 20px rgba(0, 0, 0, .38); }
#s-home .menu-btn:hover { filter: brightness(1.06); }
#s-home .menu-btn:active {
  box-shadow: var(--cr-rim), inset 0 -3px 0 rgba(5, 20, 70, .38), 0 1px 0 #0d2a70, 0 1px 0 2px var(--cr-ink), 0 4px 8px rgba(0, 0, 0, .3); }
#s-home .menu-btn b { color: #fff; text-shadow: var(--cr-out); font-size: clamp(19px, 2.8vw, 26px); }
#s-home .menu-btn small { color: #dbe8ff; text-shadow: 0 1px 0 var(--cr-ink); }
/* icoontegels: elk een eigen felle kleur met een harde glansrand en een lip, het icoon wit met een inktschaduw */
#s-home :is(.menu-btn, .garage-btn) .mb-icon { --ic1: #c9e4ff; --ic2: #4d9bff; --ic3: #1747a8; --icg: rgba(77, 155, 255, .55);
  border-radius: 12px; border: 2px solid var(--cr-ink); color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, .14) 46%, rgba(255, 255, 255, 0) 47%),
    radial-gradient(circle at 50% 28%, var(--ic1), var(--ic2) 58%, var(--ic3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(0, 0, 0, .22), 0 3px 0 var(--cr-ink), 0 0 12px var(--icg);
  filter: none; }
#s-home :is(.menu-btn, .garage-btn) .mb-icon svg { color: #fff; filter: drop-shadow(0 2px 0 var(--cr-ink)); }
#s-home .menu-btn[data-act=hotseat] .mb-icon { --ic1: #ffd3e8; --ic2: #ff4f9a; --ic3: #b0175c; --icg: rgba(255, 79, 154, .55); }
#s-home .menu-btn[data-act=online] .mb-icon { --ic1: #dcffbe; --ic2: #3fc22c; --ic3: #17700e; --icg: rgba(63, 194, 44, .55); }
#s-home .menu-btn[data-act=practice] .mb-icon { --ic1: #f0d6ff; --ic2: #a052ff; --ic3: #4b1aa8; --icg: rgba(160, 82, 255, .55); }
/* Arena: de grote gouden knop, met glimlijn; een rode tegel met een gouden kroon, zodat het icoon van de gouden knop loskomt */
#s-home .menu-btn.arena-btn { background: var(--cr-yel-face);
  box-shadow: var(--cr-rim-gold), inset 0 -5px 0 rgba(140, 70, 0, .4), 0 6px 0 var(--cr-yel3), 0 6px 0 2px var(--cr-ink), 0 0 26px rgba(255, 190, 40, .5), 0 13px 20px rgba(0, 0, 0, .38); }
#s-home .menu-btn.arena-btn:active { box-shadow: var(--cr-rim-gold), inset 0 -3px 0 rgba(140, 70, 0, .4), 0 1px 0 var(--cr-yel3), 0 1px 0 2px var(--cr-ink), 0 0 18px rgba(255, 190, 40, .4); }
#s-home .menu-btn.arena-btn small { color: #fff7d6; }
#s-home .menu-btn.arena-btn .mb-icon { --ic1: #ffc7a8; --ic2: #ff5a2e; --ic3: #b8200e; --icg: rgba(255, 90, 46, .55); }
#s-home .menu-btn.arena-btn .mb-icon svg { color: #ffe27a; }
#s-home .menu-btn.arena-btn::after, #s-home .garage-btn::after { content: ''; position: absolute; inset: -30% auto -30% 0; width: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: translateX(-200%) skewX(-18deg); animation: cr-shine 4.2s ease-in-out 1.5s infinite; }
#s-home .garage-btn::after { animation-delay: 3.2s; opacity: .6; }
/* binnenkomen van links bij het openen van het menu */
#s-home.show .menu-btn { animation: cr-slide-in .5s var(--ease-back) both; }
#s-home.show .menu-btn:nth-child(2) { animation-delay: .06s; } #s-home.show .menu-btn:nth-child(3) { animation-delay: .12s; } #s-home.show .menu-btn:nth-child(4) { animation-delay: .18s; }
#s-home.show .logo { animation: cr-logo-in .7s var(--ease-back) both; }
#s-home.show .home-side > * { animation: cr-rise .5s var(--ease-back) .2s both; }

/* zijknoppen (Champions, Garage): blauw met gouden rand */
#s-home .garage-btn { position: relative; overflow: hidden; isolation: isolate; border-radius: 16px; border: 2px solid var(--cr-ink); backdrop-filter: none; -webkit-backdrop-filter: none;
  background: var(--cr-blue-face);
  box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .38), 0 0 0 2px var(--cr-gold2), 0 5px 0 2px var(--cr-gold4), 0 5px 0 4px var(--cr-ink), 0 12px 20px rgba(0, 0, 0, .35); }
#s-home .garage-btn:active { box-shadow: var(--cr-rim), inset 0 -2px 0 rgba(5, 20, 70, .38), 0 0 0 2px var(--cr-gold2), 0 1px 0 2px var(--cr-gold4), 0 1px 0 4px var(--cr-ink), 0 4px 8px rgba(0, 0, 0, .3); }
#s-home .garage-btn b { color: #fff; text-shadow: var(--cr-out); }
#s-home .garage-btn small { color: #d2e3ff; text-shadow: 0 1px 0 var(--cr-ink); }
#s-home .garage-btn .mb-icon { --ic1: #c9f6ff; --ic2: #29d3ff; --ic3: #0b6fa8; --icg: rgba(41, 211, 255, .55); }
#s-home .garage-btn.champ-btn .mb-icon { --ic1: #fff8d0; --ic2: var(--cr-gold2); --ic3: var(--cr-gold3); --icg: rgba(255, 201, 40, .55); }
#s-home .garage-btn .gb-pts { color: #fff; font-family: var(--display); text-shadow: var(--cr-out); }
#s-home .resume-card { background: linear-gradient(180deg, #1c4bb0, #0b2259); border: 2px solid var(--cr-gold2); box-shadow: 0 0 0 2px var(--cr-ink), inset 0 2px 0 rgba(255, 255, 255, .3), 0 16px 40px rgba(0, 0, 0, .45); }
#s-home .resume-card h4 { color: var(--cr-gold1); text-shadow: var(--cr-out); }

/* tandwiel en andere ronde knoppen */
:is(#s-home, #s-arena, #s-garage) .icon-btn { border-radius: 14px; border: 2px solid var(--cr-ink); color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none;
  background: var(--cr-blue-face);
  box-shadow: var(--cr-rim), inset 0 -3px 0 rgba(5, 20, 70, .35), 0 5px 0 #123a85, 0 5px 0 2px var(--cr-ink); }
:is(#s-home, #s-arena, #s-garage) .icon-btn:active { box-shadow: var(--cr-rim), inset 0 -2px 0 rgba(5, 20, 70, .35), 0 1px 0 #123a85, 0 1px 0 2px var(--cr-ink); }
:is(#s-home, #s-arena, #s-garage) .icon-btn svg { filter: drop-shadow(0 2px 0 var(--cr-ink)); }
#s-home .wallet-chip { color: #fff; font-family: var(--display); text-shadow: var(--cr-out); background: linear-gradient(180deg, rgba(7, 18, 51, .9), rgba(7, 18, 51, .7));
  border: 2px solid var(--cr-gold3); box-shadow: 0 2px 0 var(--cr-ink); }

/* ---------- HUD: vaste glans, geen blur en geen doorlopende animaties (iPhone 12) ---------- */
.hud .hbtn { border-radius: 12px; border: 2px solid rgba(7, 18, 51, .95); color: #fff; text-shadow: 0 1px 0 var(--cr-ink);
  background: linear-gradient(180deg, rgba(90, 160, 255, .92) 0%, rgba(47, 114, 230, .9) 48%, rgba(35, 97, 208, .9) 52%, rgba(22, 63, 150, .92) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 rgba(7, 18, 51, .9); transition: transform .06s ease-out, box-shadow .06s; }
.hud .hbtn span { font-weight: 800; }
.hud .hbtn small, .hud .hbtn span small { text-shadow: 0 1px 0 var(--cr-ink); font-weight: 700; }
.hs-sub { color: #fff; text-shadow: 0 1px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); }
.hud .hbtn:active, .hud .hbtn.on { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35); background: linear-gradient(180deg, rgba(90, 160, 255, .95), rgba(22, 63, 150, .95)); }
.hud .hbtn.giveup { background: linear-gradient(180deg, #ff8aa8, #fc5381 50%, #d6285a); border-color: var(--cr-ink); }
.hud .minimap { border-radius: 14px; border: 2px solid rgba(255, 201, 40, .85); background: radial-gradient(circle at 50% 40%, rgba(40, 90, 200, .55), rgba(7, 18, 51, .7));
  box-shadow: 0 0 0 2px rgba(7, 18, 51, .9), inset 0 2px 0 rgba(255, 255, 255, .2); }
/* medailletabel: glanzende rijen met een inktrand */
.hs-row .r-ico, .hs-row .r-time { border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.hs-row .r-ico { border-radius: 6px 3px 3px 6px; background: linear-gradient(180deg, rgba(30, 60, 140, .85), rgba(7, 18, 51, .85)); }
.hs-row .r-cell { border-radius: 3px; background: rgba(7, 18, 51, .62); }
.hs-row .r-fill { background: linear-gradient(180deg, var(--pc-hi, var(--pc)) 0%, var(--pc) 48%, var(--pc-lo, var(--pc)) 100%); }
.hs-row .r-time { border-radius: 3px 6px 6px 3px; background: rgba(7, 18, 51, .72); }
.hs-row .r-n, .hs-row .r-time { text-shadow: 0 1px 0 rgba(7, 18, 51, .9), 0 0 2px rgba(7, 18, 51, .7); }
.hs-row .r-n1 { text-shadow: none; }
.hs-row.drv .r-time { background: linear-gradient(180deg, var(--pc-hi, var(--pc)), var(--pc) 50%, var(--pc-lo, var(--pc))); }
/* racetijd en splits: dikke inktrand zoals de Clash-cijfers */
.tm-time { text-shadow: 0 3px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 2px 0 0 var(--cr-ink), -2px 0 0 var(--cr-ink), 0 0 16px rgba(61, 139, 255, .45); }
.sp-box { border-radius: 8px; background: linear-gradient(180deg, rgba(30, 60, 140, .8), rgba(7, 18, 51, .82)); box-shadow: 0 0 0 2px rgba(7, 18, 51, .85), inset 0 1px 0 rgba(255, 255, 255, .25); }
.sp-delta { border-radius: 0 0 8px 8px; }
.sp-delta.better { background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2) 52%, var(--cr-grn3)); }
.sp-delta.worse { background: linear-gradient(180deg, #ff7a6a, #e8302e 52%, #a8140f); }
/* TURBO-stempel en aftellen: zie ronde 26 */
/* stuurknoppen: ronde glazen knoppen; ingedrukt licht de rand op */
.hud [data-ctl=left] .ctl-face, .hud [data-ctl=right] .ctl-face { width: 64px; height: 64px; border-radius: 50%; padding: 8px; color: rgba(255, 255, 255, .55);
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .22), rgba(40, 90, 200, .18) 55%, rgba(7, 18, 51, .3)); border: 2px solid rgba(255, 255, 255, .28); }
.hud [data-ctl=brake] .ctl-face, .hud [data-ctl=gas] .ctl-face { border-radius: 16px; border-width: 2px; color: rgba(255, 255, 255, .6);
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(40, 90, 200, .14) 50%, rgba(7, 18, 51, .3)); }
.hud .ctl.on .ctl-face { color: #fff; border-color: #fff; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .45), rgba(61, 139, 255, .4) 60%, rgba(7, 18, 51, .35)); transform: scale(.94); }
.hud [data-ctl=brake].drift .ctl-face { border-color: var(--cr-gold2); color: var(--cr-gold1); background: radial-gradient(circle at 50% 30%, rgba(255, 230, 140, .5), rgba(255, 170, 20, .35) 60%, rgba(7, 18, 51, .3)); }

@keyframes cr-slide-in { from { opacity: 0; transform: translateX(-36px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes cr-logo-in { 0% { opacity: 0; transform: scale(.6) rotate(-4deg); } 60% { opacity: 1; transform: scale(1.08) rotate(1deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #s-home .menu-btn, #s-home .logo, #s-home .home-side > *, #s-home .menu-btn.arena-btn::after, #s-home .garage-btn::after { animation: none !important; }
}

/* ======================= ronde 8: overige schermen ======================= */
/* segmentknoppen (instellingen, Hot Seat, oefenen): blauwe rij, de keuze goud */
:is(.panel-screen, #confirm) .seg { gap: 4px; padding: 3px; border-radius: 14px; background: rgba(7, 18, 51, .6); border: 2px solid rgba(7, 18, 51, .9); }
:is(.panel-screen, #confirm) .seg button { border-radius: 10px; color: #cfe0ff; font-family: var(--display); font-weight: 400; text-shadow: 0 2px 0 var(--cr-ink);
  background: linear-gradient(180deg, #2b5fc4, #1b4296 55%, #163781); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 var(--cr-ink); }
:is(.panel-screen, #confirm) .seg button.sel, :is(.panel-screen, #confirm) .seg button[aria-pressed="true"] { color: #fff; text-shadow: var(--cr-out);
  background: linear-gradient(180deg, var(--cr-gold1) 0%, var(--cr-gold2) 50%, #f0a810 51%, var(--cr-gold3) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 2px 0 var(--cr-gold4), 0 0 12px rgba(255, 201, 40, .5); }
:is(.panel-screen, #confirm) .seg button:active { transform: translateY(2px); }
.panel-screen .chip { border-radius: 11px; border: 2px solid var(--cr-ink); color: #dbe8ff; text-shadow: 0 1px 0 var(--cr-ink);
  background: linear-gradient(180deg, #2b5fc4, #1b4296 55%, #163781); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 var(--cr-ink); }
.panel-screen .chip.sel { color: #fff; text-shadow: var(--cr-out); background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 2px 0 var(--cr-gold4), 0 0 12px rgba(255, 201, 40, .5); }
.panel-screen .chip.sel small { color: #fff7d6; }
.panel-screen .set-row, .panel-screen .row-line { color: #fff; text-shadow: 0 1px 0 var(--cr-ink); }
.panel-screen input[type="text"], .panel-screen input:not([type]) { border-radius: 12px; border: 2px solid var(--cr-ink); background: rgba(7, 18, 51, .75); color: #fff;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5); }
/* tegels in lijsten (oefenen, online, Champions): zelfde blauwe tegels als de winkel */
.panel-screen :is(.trk, .room, .ch-row, .pr-row, .lb-row) { border-radius: 14px; border: 2px solid rgba(7, 18, 51, .85);
  background: linear-gradient(180deg, rgba(120, 175, 255, .22), rgba(20, 60, 160, .3)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 3px 0 rgba(7, 18, 51, .55); }
/* resultaat na een oefenrit en het eindscherm: glanzende knoppen met indruk */
:is(#s-presult, #s-end, #s-final, #s-turn) :is(.big-btn, .ghost-btn) { position: relative; border-radius: 16px; border: 2px solid var(--cr-ink); color: #fff; text-shadow: var(--cr-out);
  background: var(--cr-blue-face);
  box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .35), 0 5px 0 #123a85, 0 5px 0 2px var(--cr-ink), 0 10px 18px rgba(0, 0, 0, .35); }
:is(#s-presult, #s-end, #s-final, #s-turn) .big-btn {
  background: var(--cr-yel-face);
  box-shadow: var(--cr-rim-gold), inset 0 -5px 0 rgba(140, 70, 0, .4), 0 5px 0 var(--cr-yel3), 0 5px 0 2px var(--cr-ink), 0 0 22px rgba(255, 190, 40, .4), 0 10px 18px rgba(0, 0, 0, .35); }
:is(#s-presult, #s-end, #s-final, #s-turn) :is(.big-btn, .ghost-btn):active { box-shadow: var(--cr-rim), inset 0 -2px 0 rgba(5, 20, 70, .35), 0 1px 0 #123a85, 0 1px 0 2px var(--cr-ink), 0 3px 8px rgba(0, 0, 0, .3); }
:is(#s-presult, #s-end, #s-final, #s-turn) .big-btn:active {
  box-shadow: var(--cr-rim-gold), inset 0 -3px 0 rgba(140, 70, 0, .4), 0 1px 0 var(--cr-yel3), 0 1px 0 2px var(--cr-ink), 0 0 16px rgba(255, 190, 40, .35); }
/* iconen in de knoppen met een inktschaduw; modusiconen in de kleur van hun menuknop met een inktrandje
   (Hot Seat roze, Replay paars zoals Practice; uitdagen is al goud in style.css) */
:is(#s-presult, #s-end, #s-final, #s-turn) .ghost-btn svg { filter: drop-shadow(0 2px 0 var(--cr-ink)); }
#s-presult :is(#p-hs, #p-replay, #p-chal) svg { filter: drop-shadow(0 0 1px var(--cr-ink)) drop-shadow(0 0 1px var(--cr-ink)) drop-shadow(0 2px 0 var(--cr-ink)); }
#s-presult #p-hs svg { color: #ff8cc0; }
#s-presult #p-replay svg { color: #e2c4ff; }
/* toasts en dialogen */
#toast { border-radius: 14px !important; border: 2px solid var(--cr-gold2) !important; color: #fff; text-shadow: 0 1px 0 var(--cr-ink);
  background: linear-gradient(180deg, #1c4bb0, #0b2259) !important; box-shadow: 0 0 0 2px var(--cr-ink), inset 0 2px 0 rgba(255, 255, 255, .3), 0 10px 26px rgba(0, 0, 0, .45) !important; }
/* bevestigen en invoeren: Clash-paneel met dezelfde speelgoedknoppen; stoppen en opgeven in rood */
#confirm .confirm-box { border: 3px solid var(--cr-gold2); border-radius: 20px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(120, 180, 255, .28), transparent 60%), linear-gradient(180deg, #1c4bb0 0%, #12357f 45%, #0b2259 100%);
  box-shadow: 0 0 0 2px var(--cr-gold4), 0 0 0 5px rgba(7, 18, 51, .9), inset 0 2px 0 rgba(255, 255, 255, .35), 0 24px 60px rgba(0, 0, 0, .55); }
#confirm .confirm-box h3 { color: #fff; text-shadow: var(--cr-out); }
#confirm .confirm-box p { color: #d6e6ff; text-shadow: 0 1px 0 var(--cr-ink); }
#confirm .dlg-input { border: 2px solid var(--cr-ink); background: rgba(7, 18, 51, .75); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5); }
#confirm .dlg-input:focus { border-color: var(--cr-gold2); }
#confirm :is(.big-btn, .ghost-btn) { position: relative; border: 2px solid var(--cr-ink); border-radius: 14px; color: #fff; text-shadow: var(--cr-out);
  background: var(--cr-blue-face); box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .35), 0 5px 0 #123a85, 0 5px 0 2px var(--cr-ink); }
#confirm .big-btn { background: var(--cr-yel-face); box-shadow: var(--cr-rim-gold), inset 0 -5px 0 rgba(140, 70, 0, .4), 0 5px 0 var(--cr-yel3), 0 5px 0 2px var(--cr-ink); }
#confirm .big-btn.danger { background: linear-gradient(180deg, #ff7a66 0%, #f23b28 45%, #d22414 75%, #b51a10 100%);
  box-shadow: var(--cr-rim-gold), inset 0 -4px 0 rgba(90, 0, 0, .35), 0 5px 0 #7a0e06, 0 5px 0 2px var(--cr-ink); }
#confirm :is(.big-btn, .ghost-btn) svg { filter: drop-shadow(0 2px 0 var(--cr-ink)); }
/* knoppen naast elkaar in een dialoog: dezelfde letter en altijd op één rij. De breedte volgt het label en wat over is
   gaat vooral naar de hoofdknop (bij een kort label als OK kan die dus smaller zijn dan Annuleren). Een lang label
   breekt binnen de knop af. Alleen het streepje als glimlicht, want op twee regels staat de stip tegen de eerste letter */
#confirm .row { flex-wrap: nowrap; }
#confirm .row > :is(.big-btn, .ghost-btn) { flex: 1 1 auto; width: auto; font-family: var(--display); font-weight: 400;
  font-size: clamp(17px, 2.2vw, 20px); letter-spacing: .04em; padding: 10px; text-align: center; --cr-glint: var(--cr-glint-xs); }
#confirm .row > .big-btn { flex-grow: 3; }
/* deelkaart: drie knoppen op één rij, met een kleinere letter; het deelicoon 20 px (ronde 27) */
#confirm .sh-box .row { gap: 6px; }
#confirm .sh-box .row > * { font-size: 16px; padding: 10px 8px; gap: 5px; }
#confirm .sh-box .row svg { width: 20px; height: 20px; flex: none; }
/* smal venster (staand met een muis): Delen over de volle breedte, de andere twee eronder */
@media (max-width: 471px) {
  #confirm .sh-box .row { flex-wrap: wrap; row-gap: 12px; }
  #confirm .sh-box .row > #sh-share { flex-basis: 100%; }
}
/* lage schermen: een lange tekst scrolt binnen de dialoog (boven- en onderrand vervagen), titel en knoppen blijven heel in beeld */
@media (max-height: 430px) {
  #confirm .confirm-box { display: flex; flex-direction: column; }
  #confirm .confirm-box > * { flex: none; }
  #confirm .confirm-box > .dlg-input { margin-top: 0; }
  #confirm .confirm-box > p { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: -6px 0 0; padding: 6px 0 14px;
    -webkit-mask-image: linear-gradient(transparent, #000 6px, #000 calc(100% - 14px), transparent);
    mask-image: linear-gradient(transparent, #000 6px, #000 calc(100% - 14px), transparent); }
  /* zonder tekst (aankopen): gewoon 14px tussen titel en knoppen */
  #confirm .confirm-box > p:empty { margin: 0 0 8px; padding: 0; }
  /* profielkaart: de hele doos scrolt (main.js bouwt de kaart na elke tik opnieuw, de doos blijft en houdt zijn stand)
     en Klaar plakt onderaan op een donkere band over de volle breedte */
  #confirm .confirm-box > .sheet { margin: 0; }
  #confirm .confirm-box > .sheet + .row { position: sticky; bottom: -18px; z-index: 1; margin: 0 -20px -18px; padding: 12px 20px 18px;
    background: linear-gradient(rgba(11, 34, 89, 0), #0b2259 12px); }
}
#confirm .ghost-btn:active { box-shadow: var(--cr-rim), inset 0 -2px 0 rgba(5, 20, 70, .35), 0 1px 0 #123a85, 0 1px 0 2px var(--cr-ink); }
#confirm .big-btn:active { box-shadow: var(--cr-rim-gold), inset 0 -3px 0 rgba(140, 70, 0, .4), 0 1px 0 var(--cr-yel3), 0 1px 0 2px var(--cr-ink); }
#confirm .big-btn.danger:active { box-shadow: var(--cr-rim-gold), inset 0 -2px 0 rgba(90, 0, 0, .35), 0 1px 0 #7a0e06, 0 1px 0 2px var(--cr-ink); }
/* laadscherm: diepblauw met gouden laadbalk (alleen ?stijl=oud; de GLORPZ-stijl tekent het in glorpz.css), de
   achtergrond in ::before */
#s-loading { background: none; }
#s-loading::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, #1c4bb0 0%, #0b2259 55%, #050d2a 100%); }
#s-loading .loadbar { height: 10px; border-radius: 6px; border: 2px solid var(--cr-ink); background: rgba(7, 18, 51, .85); }
#s-loading .loadbar i { background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3)); }
#s-loading .logo { filter: drop-shadow(0 4px 0 var(--cr-ink)) drop-shadow(0 0 2px var(--cr-ink)) drop-shadow(0 10px 22px rgba(0, 0, 0, .55)); }
#s-loading p { color: #fff; text-shadow: var(--cr-out); }
/* Laadscherm: Nicks GLORPZ Racing-afbeelding over het hele scherm, laadbalk onderin */
#s-loading.splash { justify-content: flex-end; padding-bottom: max(5vh, env(safe-area-inset-bottom)); }
#s-loading.splash::before { background: #2a0a4a url('../img/glorpz-splash.webp') center top / cover no-repeat; }
#s-loading.splash .loadbar { width: min(46vw, 420px); }

/* ======================= ronde 9: beloningsmomenten en binnenkomen ======================= */
/* banners (medaille, nieuw record, gered, eruit): dik lint met inktrand en glans; bij een medaille goud met stralen */
.banner .bn-plate { position: relative; overflow: visible; border: 3px solid var(--cr-ink); border-radius: 10px;
  background: linear-gradient(180deg, #4f9dff 0%, #2667e0 50%, #1a4fb8 51%, #163f96 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 0 0 2px var(--cr-gold2), 0 6px 0 2px var(--cr-ink), 0 16px 30px rgba(0, 0, 0, .45); }
.banner b { color: #fff; text-shadow: 0 4px 0 var(--cr-ink), 0 -2px 0 var(--cr-ink), 3px 0 0 var(--cr-ink), -3px 0 0 var(--cr-ink), 0 0 26px var(--bc, rgba(255, 255, 255, .5)); }
.banner span { color: #fff; text-shadow: 0 2px 0 var(--cr-ink); }
.banner.medalwin .bn-plate, .banner.best .bn-plate { background: linear-gradient(180deg, #fff1a8 0%, var(--cr-gold2) 46%, #f0a810 52%, var(--cr-gold3) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .8), inset 0 -4px 0 rgba(140, 70, 0, .45), 0 0 0 2px var(--cr-gold4), 0 6px 0 2px var(--cr-ink), 0 0 40px rgba(255, 200, 60, .6); }
.banner.medalwin span, .banner.best span { color: #fff; }
.banner.saved .bn-plate { background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2) 52%, var(--cr-grn3)); }
.banner.out .bn-plate, .banner.reserve .bn-plate { background: linear-gradient(180deg, #ff8aa8, #fc5381 50%, #b51a40); }
/* glimlijn over het lint en stralen erachter (alleen zolang de banner er staat) */
.banner .bn-plate::after { content: ''; position: absolute; inset: 0; border-radius: 8px; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) no-repeat; background-size: 220% 100%; background-position: 160% 0; }
.banner.show .bn-plate::after { animation: cr-sweep 1.1s ease-out .25s both; }
.banner.medalwin.show::before, .banner.best.show::before { content: ''; position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 110, .38) 0 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 14%, transparent 62%); mask: radial-gradient(circle, #000 14%, transparent 62%);
  animation: cr-rays 6s linear infinite, cr-fade-in .4s ease-out both; }
.banner.compact.medalwin.show::before, .banner.compact.best.show::before { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
@keyframes cr-sweep { from { background-position: 160% 0; } to { background-position: -60% 0; } }
@keyframes cr-rays { to { transform: rotate(360deg); } }
@keyframes cr-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .banner.show .bn-plate::after, .banner.show::before { animation: none !important; } }

/* ---------- Hot Seat: beurtscherm (wie is er aan de beurt) ---------- */
/* ronde 27: lichter en in de spelerkleur (de telefoon gaat naar een kind): tint uit JS (--pc-tint), rand rond .36
   (ook een baan bij zonsopkomst blijft zo licht genoeg) */
#s-handover { background: none; }
.ts { background: radial-gradient(ellipse at 50% 48%, var(--pc-tint, rgba(20, 50, 130, .45)) 0%, rgba(10, 30, 90, .22) 45%, rgba(3, 8, 24, .36) 78%); }
/* naamvlak als dik lint in de spelerkleur met inktrand en glans (tinten uit JS: --pc-hi, --pc-lo, --pc-glow) */
.ts-name { border: 3px solid var(--cr-ink); border-radius: 10px; font-style: normal; color: #fff;
  background: linear-gradient(180deg, var(--pc-hi, #fff) 0%, var(--pc) 48%, var(--pc-lo, #000) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 0 0 2px var(--cr-gold2), 0 5px 0 2px var(--cr-ink), 0 0 30px var(--pc-glow, transparent);
  text-shadow: 0 3px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 2px 0 0 var(--cr-ink), -2px 0 0 var(--cr-ink); }
#s-handover.show .ts-name { animation: cr-name-in .5s var(--ease-back) both; }
.ts-beat, .ts-press, .ts-start { text-shadow: 0 2px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
.ts-emb { filter: drop-shadow(0 2px 0 var(--cr-ink)) drop-shadow(0 0 10px var(--pc)); }
/* de GO-schijf: glanzende gouden knop met een zacht kloppende gloed */
.hold .hold-in { color: #fff; border: 3px solid var(--cr-ink); text-shadow: 0 3px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 2px 0 0 var(--cr-ink), -2px 0 0 var(--cr-ink);
  background: radial-gradient(circle at 50% 30%, #fff6c2 0%, var(--cr-gold2) 45%, #f0a810 60%, var(--cr-gold3) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -5px 0 rgba(140, 70, 0, .45), 0 5px 0 var(--cr-ink), 0 0 26px rgba(255, 200, 60, .55); }
.hold::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; pointer-events: none; box-shadow: 0 0 26px 8px rgba(255, 210, 80, .55);
  animation: cr-pulse 1.4s ease-in-out infinite; }
.hold:active .hold-in { transform: translateY(4px) scale(.97); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 1px 0 var(--cr-ink), 0 0 18px rgba(255, 200, 60, .5); }
.hold svg .bg { stroke: rgba(255, 255, 255, .28); }
.ho-links .ghost-btn, .ho-chip { border-radius: 12px; border: 2px solid var(--cr-ink); color: #fff; text-shadow: 0 1px 0 var(--cr-ink);
  background: linear-gradient(180deg, #4f9dff, #2667e0 50%, #1a4fb8 51%, #163f96); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--cr-ink); }
.ho-pill { border-radius: 8px; background: rgba(7, 18, 51, .75); border: 1.5px solid rgba(255, 201, 40, .45); }

/* ---------- Hot Seat: eindpaneel van het potje (schuin, nu blauw en goud) ---------- */
.endp { border: 3px solid var(--cr-gold2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 3px var(--cr-ink), 0 0 40px rgba(255, 200, 60, .35), 0 20px 50px rgba(0, 0, 0, .55); }
.ep-head { background: linear-gradient(180deg, #4f9dff, #2667e0 50%, #1a4fb8 51%, #163f96); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4); }
.ep-head b, .ep-head em { color: #fff; text-shadow: var(--cr-out); }
.ep-head em { color: var(--cr-gold1); }
.ep-head small { color: #dbe8ff; }
.ep-banner { color: #fff; border-top: 2px solid var(--cr-ink); border-bottom: 2px solid var(--cr-ink);
  background: linear-gradient(180deg, var(--wc-hi, #fff) 0%, var(--wc, #fff) 48%, var(--wc-lo, #000) 100%);
  text-shadow: 0 3px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 2px 0 0 var(--cr-ink), -2px 0 0 var(--cr-ink); }
.ep-grid { background: radial-gradient(120% 80% at 50% 0%, rgba(120, 180, 255, .3), transparent 60%), linear-gradient(180deg, #1c4bb0, #0b2259); }
.ep-rank { border-radius: 6px; border: 2px solid var(--cr-ink); background: linear-gradient(180deg, #6fb2ff, #1f56b5); text-shadow: 0 2px 0 var(--cr-ink); }
.ep-cell:first-child .ep-rank { background: radial-gradient(circle at 50% 30%, #fff6c2, var(--cr-gold2) 50%, var(--cr-gold3)); box-shadow: 0 0 14px rgba(255, 200, 60, .7); }
/* eindronde: regelhoogte binnen de rand (de letters zakten 2 px en de onderkant viel weg) en overal wit met inktrand
   zoals het naamlint van het beurtscherm (donker op geel en wit kreeg een donkere schaduw eronder en werd vlekkerig) */
.ep-name { border-radius: 6px; border: 2px solid var(--cr-ink); line-height: calc(var(--rp) * .78 - 4px); color: #fff;
  text-shadow: 0 2px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink);
  background: linear-gradient(180deg, var(--pc-hi, #fff), var(--pc) 50%, var(--pc-lo, #000)); }
.ep-time { text-shadow: 0 2px 0 var(--cr-ink); }
.ep-restart { color: #fff; border-top: 2px solid var(--cr-ink); text-shadow: var(--cr-out);
  background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2) 52%, var(--cr-grn3)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5); }
.ep-btns { background: var(--cr-ink); }
.ep-btns button { background: linear-gradient(180deg, #2f6fe0, #1d4fb3 55%, #163f96); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3); text-shadow: 0 2px 0 var(--cr-ink); }
.ep-btns button svg { color: #cfe0ff; filter: drop-shadow(0 2px 0 var(--cr-ink)); }
.ep-btns button.ep-more { color: #fff; background: linear-gradient(180deg, var(--cr-yel1), var(--cr-yel2) 50%, #e88a00); text-shadow: var(--cr-out); }
.ep-btns button.ep-more svg { color: #fff; }
.ep-btns button:active { filter: brightness(.9); transform: translateY(2px); }
.ep-tally { border-radius: 10px; border: 2px solid var(--cr-gold3); background: rgba(7, 18, 51, .85); }

@keyframes cr-name-in { 0% { opacity: 0; transform: translateX(-50%) scale(.5); } 70% { opacity: 1; transform: translateX(-50%) scale(1.08); } 100% { transform: translateX(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .hold::before, #s-handover.show .ts-name { animation: none !important; } }

/* ======================= ronde 10 + 26: aftellen ======================= */
/* 3-2-1-GO (hud.js count): .tm-count is een punt op 34% H (ronde 27: hoger, het hoofd van de Glorp blijft vrij);
   inktrand en schaduw zijn kopieën achter de tekst (data-t), want text-shadow valt over background-clip. .low: de
   finish-pop-up stond er bij de inslag, dan 18% H lager en 0,6 (hud.js fitCount rekent met dezelfde getallen). */
.tm-count { top: 34%; width: 0; height: 0; transform: none; z-index: 1; font-style: normal; font-weight: 400; font-size: calc(var(--H, 390px) * .585); text-shadow: none;
  --c1: #ffb9ae; --c2: #ff5242; --c3: #ec2418; --c4: #a50b0b; --cg: rgba(255, 82, 66, .55); }
/* tv (spiegelen, opnemen): cijfer iets kleiner, de auto blijft zichtbaar */
body.tv .tm-count { font-size: calc(var(--H, 390px) * .48); }
.tm-count[data-n="2"] { --c1: #ffdcab; --c2: #ffa22c; --c3: #f77d00; --c4: #ad4600; --cg: rgba(255, 162, 44, .55); }
.tm-count[data-n="1"] { --c1: #fffad0; --c2: #ffe53f; --c3: #ffc400; --c4: #c27e00; --cg: rgba(255, 229, 63, .55); }
.tm-count[data-n="go"] { --c1: #eaffc2; --c2: #92f250; --c3: #4bd02a; --c4: #19800f; --cg: rgba(146, 242, 80, .55); }
.tm-count.low { transform: translateY(calc(var(--H, 390px) * .18)) scale(.6); }
/* GO! is breed: kleiner en begrensd op de breedte (hud.js fitCount past het daarna precies naast de tabel) */
.tm-count.go { font-size: min(calc(var(--H, 390px) * .515), 21vw); }
body.tv .tm-count.go { font-size: min(calc(var(--H, 390px) * .515), 16vw); }
.cn-num { position: absolute; left: 0; top: 0; display: block; white-space: nowrap; line-height: 1; letter-spacing: .02em; isolation: isolate;
  transform: translate(-50%, -50%) skewX(-9deg); }
.cn-num > span { color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(180deg, var(--c1) 20%, var(--c2) 46%, var(--c3) 50.5%, var(--c4) 78%); }
.cn-num::before, .cn-num::after { content: attr(data-t); position: absolute; left: 0; top: 0; z-index: -1; color: var(--cr-ink); -webkit-text-stroke: .085em var(--cr-ink); }
.cn-num::after { z-index: -2; color: #030920; -webkit-text-stroke-color: #030920; transform: translateY(.06em);
  text-shadow: 0 .02em .1em rgba(0, 0, 0, .45), 0 0 .18em var(--cg); }
.cn-ring { position: absolute; left: 0; top: 0; width: .9em; height: .9em; margin: -.45em 0 0 -.45em; border-radius: 50%; pointer-events: none; opacity: 0;
  border: .03em solid var(--c2); box-shadow: 0 0 0 .012em var(--cr-ink), inset 0 0 0 .012em var(--cr-ink), 0 0 .1em var(--c2); }
.tm-count.show .cn-num { animation: cn-punch .18s var(--ease-back) both; }
.tm-count.show .cn-ring { animation: cn-ring .42s ease-out both; }
.tm-count.go.show .cn-ring { animation: cn-ring-go .55s ease-out both; }
.tm-count.out .cn-num { animation: cn-out .17s ease-in both; }
/* GO: een flits van stralen achter de letters */
.tm-count.go.show::before { content: ''; position: absolute; left: 0; top: 0; width: 1.8em; height: 1.8em; margin: -.9em 0 0 -.9em; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(150, 255, 120, .5) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 64%); mask: radial-gradient(circle, #000 18%, transparent 64%); animation: cr-burst .6s ease-out forwards; }
@keyframes cn-punch { 0% { opacity: .35; transform: translate(-50%, -50%) skewX(-9deg) scale(1.6); } 35% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -50%) skewX(-9deg) scale(1); } }
@keyframes cn-out { from { opacity: 1; transform: translate(-50%, -50%) skewX(-9deg) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) skewX(-9deg) scale(1.22); } }
@keyframes cn-ring { 0% { opacity: .95; transform: scale(.35); } 100% { opacity: 0; transform: scale(1.45); } }
@keyframes cn-ring-go { 0% { opacity: .95; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.9); } }

/* ---------- groot plaatsnummer (graphics 2 nov, A5; hud.js setPlace/fitPlace): rechts boven de remknop, zonder knoppen
   rechtsonder. Cijfer ~64 px op de telefoon (~110 px op 1440x900), de uitgang half zo groot bovenaan (Mario Kart). Goud, zilver, brons, de rest
   wit; inktrand en schaduw zijn kopieen achter de tekst (data-t), zoals het aftellen. Geen tikvlak. ---------- */
.lr-place { position: absolute; right: calc(28px + var(--sar)); bottom: calc(58px + var(--sab)); z-index: 2; pointer-events: none; display: none;
  font-family: var(--display); font-size: clamp(64px, calc(var(--H, 390px) * .2), 160px); line-height: 1;
  --c1: #ffffff; --c2: #f6f8ff; --c3: #d9e2f2; --c4: #9aa8c0; --cg: rgba(170, 200, 255, .35); }
.lr-place.show { display: block; animation: pl-show .3s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes pl-show { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
/* je startplek op de grid: rustig infaden, geen pop; terug na een setup (zelfde plek): zonder animatie */
.lr-place.calm.show { animation: pl-calm .45s ease-out; }
.lr-place.still.show { animation: none; }
@keyframes pl-calm { from { opacity: 0; } to { opacity: 1; } }
.lr-place.pad { font-size: clamp(64px, calc(var(--H, 390px) * .2), 96px); }
/* breed scherm zonder knoppen: onder de minikaart (hud.js fitPlace) */
.lr-place.up { font-size: clamp(64px, calc(var(--H, 390px) * .13), 120px); }
.lr-place.up { transform-origin: 100% 0; }
/* de pop groeit naar links en omlaag: vanuit het midden liep hij onder de minikaart en buiten de rechterrand ('4t') */
.lr-place.up .pl-in { transform-origin: 100% 0; }
.lr-place[data-p="1"] { --c1: #fffbe2; --c2: #ffe45a; --c3: #ffbf14; --c4: #c47400; --cg: rgba(255, 205, 60, .6); }
.lr-place[data-p="2"] { --c1: #ffffff; --c2: #e9eef6; --c3: #b4c0d0; --c4: #6f7d92; --cg: rgba(220, 232, 255, .5); }
.lr-place[data-p="3"] { --c1: #ffe6cc; --c2: #f4a868; --c3: #d4773a; --c4: #8a4518; --cg: rgba(244, 150, 90, .5); }
.lr-place .pl-in { position: relative; display: flex; align-items: flex-start; transform-origin: 60% 70%; }
.lr-place.lft .pl-in { transform-origin: 40% 70%; }
.lr-place :is(.pl-d, .pl-s) { position: relative; display: block; isolation: isolate; white-space: nowrap; transform: skewX(-9deg); letter-spacing: .01em; }
/* de uitgang klein en vast tegen de schouder van het cijfer (Mario Kart), met een even dikke inktrand als het cijfer */
.lr-place .pl-s { font-size: .36em; margin: .2em 0 0 -.05em; }
.lr-place :is(.pl-d, .pl-s) > span { color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(180deg, var(--c1) 18%, var(--c2) 44%, var(--c3) 50.5%, var(--c4) 82%); }
/* lichtrand langs de letter (binnen de inktrand): het cijfer leest dikker en glanzender */
.lr-place .pl-d > span { -webkit-text-stroke: .03em rgba(255, 255, 255, .55); }
.lr-place :is(.pl-d, .pl-s)::before, .lr-place :is(.pl-d, .pl-s)::after { content: attr(data-t); position: absolute; left: 0; top: 0; z-index: -1;
  color: var(--cr-ink); -webkit-text-stroke: .11em var(--cr-ink); }
.lr-place :is(.pl-d, .pl-s)::after { z-index: -2; color: #030920; -webkit-text-stroke-color: #030920; transform: translateY(.07em);
  text-shadow: 0 .02em .1em rgba(0, 0, 0, .4), 0 0 .2em var(--cg); }
.lr-place .pl-d::before, .lr-place .pl-d::after { -webkit-text-stroke-width: .13em; }
.lr-place .pl-s::before, .lr-place .pl-s::after { -webkit-text-stroke-width: .36em; }
/* stijgen: een ring in de kleur van de plek achter het cijfer (hud.js animeert alleen opacity en transform) */
.lr-place .pl-ring { position: absolute; left: 30%; top: 50%; width: 1.25em; height: 1.25em; margin: -.625em 0 0 -.625em; border-radius: 50%;
  pointer-events: none; opacity: 0; z-index: -3; border: .07em solid var(--c2); box-shadow: 0 0 .18em var(--cg), inset 0 0 .14em var(--cg); }
.lr-place.lft .pl-ring { left: 34%; }
/* finish: even weg voor de banner met je eindplek, daarna rustig terug */
.lr-place { transition: opacity .22s ease-out, transform .22s ease-out; transform-origin: 100% 100%; }
.lr-place.lft { transform-origin: 0 100%; }
/* Live Race: de standlijst komt samen met het cijfer en de plek in de labels, als de stand klopt met wat je ziet (hud.js
   setPlace, scene/car.js SETTLE); tot dan zegt de lijst iets anders dan het beeld */
body.lr-on:not(.lr-live) .hs-panel { opacity: 0; }
.lr-place.gone { opacity: 0; transform: scale(.7); }
.hud:is(.photo-on, .beat-on, .fin-clean) .lr-place { visibility: hidden; }
/* vanaf GO (het grote cijfer komt of staat): geen tweede plek en racetijd klein in de klok bovenin (liverace.js schrijft
   de tekst, hud.js zet alleen .arm en .ends op het cijfer); loopt de race af, dan blijft die regel */
#s-hud:has(> .lr-place.arm:not(.ends)) .ta-clock small { display: none; }
@media (prefers-reduced-motion: reduce) {
  .tm-count.show .cn-num, .tm-count.out .cn-num, .tm-count.show .cn-ring, .tm-count.go.show::before { animation: none !important; }
  .lr-place.show { animation: none; }
  .tm-count.out .cn-num { opacity: 0; }
}

/* ======================= ronde 26: TURBO-stempel en een schoon finishmoment ======================= */
/* TURBO goud, SUPER TURBO rood (SUPER klein erboven); popt bij elke boost, weg met een fade van 0,15 s.
   Plek en maat hieronder zijn de basis: hud.js fitTurbo past de stempel in de vrije strook (tabel, bovenbalk, klok). */
.tm-turbo { top: 13.5%; transform: translate(-50%, -50%) rotate(-4deg) skewX(-9deg); font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: max(calc(var(--H, 390px) * .135), 44px); letter-spacing: .03em; line-height: 1; color: #fff; text-shadow: none; opacity: 0;
  transition: opacity .15s ease-out, visibility 0s linear .15s;
  --t1: #fffbd8; --t2: #ffe45c; --t3: #ffb800; --t4: #e57400; --tg: rgba(255, 196, 40, .7); }
.tm-turbo.show { opacity: 1; transition: none; }
/* opnieuw passen terwijl hij staat (ondertitel komt of gaat, pop-up weg): glijden in plaats van springen */
.tm-turbo.show.glide { transition: left .18s ease-out, top .18s ease-out, font-size .18s ease-out; }
.tm-turbo.super { --t1: #ffe3e8; --t2: #ff6f83; --t3: #ff2b4b; --t4: #b5062a; --tg: rgba(255, 64, 90, .75); }
.tb-st { display: flex; flex-direction: column; align-items: center; }
.tm-turbo.show .tb-st { animation: tb-pop .26s var(--ease-back) both; }
.tb-l { position: relative; display: block; white-space: nowrap; isolation: isolate; }
.tb-l > span { color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(180deg, var(--t1) 20%, var(--t2) 46%, var(--t3) 50.5%, var(--t4) 78%); }
.tb-l::before, .tb-l::after { content: attr(data-t); position: absolute; left: 0; top: 0; z-index: -1; color: var(--cr-ink); -webkit-text-stroke: .18em var(--cr-ink); }
.tb-l::after { z-index: -2; color: #030920; -webkit-text-stroke-color: #030920; transform: translateY(.075em); text-shadow: 0 0 .32em var(--tg); }
.tb-s { font-size: max(.5em, 12px); margin-bottom: -.04em; --t1: #ffffff; --t2: #fff7cc; --t3: #ffe45c; --t4: #ffc21a; }
@keyframes tb-pop { 0% { opacity: 0; transform: scale(.35) rotate(-8deg); } 50% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tm-turbo.show .tb-st { animation: none !important; } .tm-turbo.show.glide { transition: none; } }

/* Finish (hud.js setFinishClean): knoppen, tank, minikaart en de medaillelijst in 250 ms weg en niet meer aan te tikken;
   oefenen houdt RESTART (de snelle nieuwe poging, zoals TM). De bediening wordt alleen doorzichtig: een duim die al op
   het gas ligt, telt bij de volgende start gewoon mee. */
.hud .tb-row > .hbtn { transition: transform .06s ease-out, box-shadow .06s, opacity .25s ease-out; }
.hud .tb-row2, .hud .controls, .hs-panel { transition: opacity .25s ease-out; }
.hud.fin-clean .controls { opacity: 0; }
.hud.fin-clean .tb-row > .hbtn, .hud.fin-clean .tb-row2, .hs-panel.fin-clean { opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease-out, visibility 0s linear .25s; }
.hud.fin-clean.practice #btn-restart { opacity: 1; visibility: visible; pointer-events: auto; transition: transform .06s ease-out, box-shadow .06s; }

/* ======================= ronde 16: levendig hoofdmenu ======================= */
/* glanslijn die af en toe over het logo trekt (achtergrond van de geknipte tekst schuift) */
#s-home .logo { background: linear-gradient(100deg, #fff 0%, #dfe3ec 40%, #ffffff 47%, #ffffff 50%, #dfe3ec 57%, #fff 100%); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; }
#s-home .logo span { background: linear-gradient(100deg, #ffd34d 0%, #ff7a1a 40%, #fff3c4 48%, #fff3c4 50%, #ff7a1a 58%, #ff3b2f 100%); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; }
#s-home.show .logo, #s-home.show .logo span { animation: cr-logo-shine 5s ease-in-out 1.2s infinite; }
#s-home.show .logo { animation: cr-logo-in .7s var(--ease-back) both, cr-logo-shine 5s ease-in-out 1.2s infinite; }
/* de Arena-knop ademt zachtjes (alleen transform) */
#s-home.show .menu-btn.arena-btn { animation: cr-slide-in .5s var(--ease-back) both, cr-breathe 2.2s ease-in-out .9s infinite; }
@keyframes cr-logo-shine { 0%, 70% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
@keyframes cr-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@media (prefers-reduced-motion: reduce) { #s-home .logo, #s-home .logo span, #s-home .menu-btn.arena-btn { animation: none !important; } }

/* ======================= ronde 18: eindscherm na een potje (winnaar, podium, prijzen) ======================= */
/* linksonder lichter (ronde 27: max .45, de Glorp op het podium werd een donkere vlek onder het verloop) */
#s-final { --scr-dim: radial-gradient(ellipse at 28% 70%, rgba(20, 60, 160, .2), rgba(3, 8, 24, 0) 60%), linear-gradient(0deg, rgba(4, 10, 32, .45) 0%, rgba(4, 10, 32, .22) 45%, rgba(4, 10, 32, 0) 75%); }
.f-name { color: #fff; -webkit-text-stroke: 0; text-shadow: 0 5px 0 var(--cr-ink), 0 -2px 0 var(--cr-ink), 3px 0 0 var(--cr-ink), -3px 0 0 var(--cr-ink), 0 0 30px var(--pc), 0 0 60px var(--pc-glow, transparent); }
.f-title svg { color: var(--cr-gold2); filter: drop-shadow(0 3px 0 var(--cr-ink)) drop-shadow(0 0 18px rgba(255, 201, 40, .8)); }
.f-sub { color: #fff; text-shadow: 0 2px 0 var(--cr-ink); }
.pod .p-name, .pod .p-time { color: #fff; text-shadow: 0 2px 0 var(--cr-ink); }
/* blokken in goud, zilver en brons (ronde 27; was de spelerkleur, dan stond in de Tijdrit plek 1 geel en 3 blauw),
   met een band en een autootje in de spelerkleur */
.pod .p-block { position: relative; border: 3px solid var(--cr-ink); border-bottom: 0; border-radius: 10px 10px 0 0; --m1: #ffffff; --m2: #c5cedb; --m3: #6c788b;
  background: linear-gradient(180deg, var(--m1) 0%, var(--m2) 42%, var(--m3) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), inset 0 -10px 18px rgba(0, 0, 0, .2); }
.pod.p1 .p-block { --m1: #fff5bd; --m2: #ffc928; --m3: #b77208;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), inset 0 -10px 18px rgba(0, 0, 0, .2), 0 0 0 2px var(--cr-gold2), 0 0 30px rgba(255, 201, 40, .55); }
.pod.p3 .p-block { --m1: #ffd9b3; --m2: #d0844a; --m3: #7c461f; }
.pod .p-block i { border: 2px solid var(--cr-ink); background: linear-gradient(180deg, #2f6fe0, #163f96); text-shadow: 0 2px 0 var(--cr-ink); }
.pod.p1 .p-block i { background: linear-gradient(180deg, #4f9dff, #1d4fb3); }
/* rechterkaart: blauw paneel met gouden rand, prijzen als glanzende tegels */
#final .f-right { border: 3px solid var(--cr-gold2); border-radius: 18px; background: linear-gradient(180deg, #1c4bb0, #0b2259);
  box-shadow: 0 0 0 2px var(--cr-ink), inset 0 2px 0 rgba(255, 255, 255, .3), 0 16px 36px rgba(0, 0, 0, .45); }
#final .f-tabs { gap: 4px; padding: 3px; border-radius: 12px; background: rgba(7, 18, 51, .6); border: 2px solid rgba(7, 18, 51, .9); }
#final .f-tabs button { border-radius: 9px; color: #cfe0ff; font-family: var(--display); font-weight: 400; text-shadow: 0 2px 0 var(--cr-ink);
  background: linear-gradient(180deg, #2b5fc4, #1b4296 55%, #163781); }
#final .f-tabs button.sel { color: #fff; text-shadow: var(--cr-out); background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3)); }
.aw { border-radius: 12px; border: 2px solid rgba(7, 18, 51, .85); border-left: 6px solid var(--pc);
  background: linear-gradient(180deg, rgba(120, 175, 255, .22), rgba(20, 60, 160, .3)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 3px 0 rgba(7, 18, 51, .55); }
.aw-ic { border: 2px solid var(--cr-ink); background: radial-gradient(circle at 50% 30%, #fff6c2, var(--cr-gold2) 50%, var(--cr-gold3)); color: #fff; filter: drop-shadow(0 2px 0 var(--cr-ink)); }
.aw-txt small { color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink); }
/* naam met een dunne onderstreping in de spelerkleur (ronde 27; de gloed las als een roze markeerbalk). overflow hidden
   (voor de ellips) knipt anders de laatste cursieve letter en de onderstreping af: padding rechts (.24em, ook de haak
   van een f) en onder, de marge eronder trekt die ruimte weer terug zodat de tegel even hoog blijft */
.aw-txt b { align-self: flex-start; max-width: 100%; padding: 0 .24em 4px 0; margin-bottom: -4px; color: #fff; text-shadow: 0 2px 0 var(--cr-ink); text-decoration-line: underline; text-decoration-color: var(--pc);
  text-decoration-thickness: 2px; text-underline-offset: 2px; text-decoration-skip-ink: none; }
.aw-txt em { color: #dbe8ff; }
.tl-row, .rc-row { border-radius: 10px; background: linear-gradient(180deg, rgba(120, 175, 255, .2), rgba(20, 60, 160, .28)); border: 1.5px solid rgba(7, 18, 51, .8); color: #fff; }
/* knoppen (ronde 27): boven Nog een keer breed met Nieuwe baan ernaast, eronder ronde icoonknoppen (Delen, Uitdagen,
   Menu; .r-ic in het blok onderaan). Nooit afkappen: de rij breekt af (f-brk) en labels houden hun breedte */
#s-final .f-btns { flex-wrap: wrap; gap: 7px 6px; align-items: flex-start; justify-content: center; }
#s-final .f-btns :is(.ghost-btn, .big-btn) { flex: 1 1 auto; min-width: max-content; padding-left: 10px; padding-right: 10px; }
#s-final .f-btns .big-btn { flex-grow: 1.6; font-size: 17px; }
#s-final .f-btns .ghost-btn { font-size: 14px; gap: 4px; }
#s-final .f-btns .f-brk { flex: 0 0 100%; height: 0; }

/* ---- ronde 25: opties voor de medailletabel tijdens het oefenen (hud.js HUD_STYLE, ?hud=kort|mini) ---- */
.hs-row.kort-weg { display: none; }
.hs-panel.mini { transform: scale(.68); transform-origin: 0 0; }

/* ---- Glorpz: kies je bestuurder (garage). Kaart met fotootje, schuine naamsticker zoals op Nick's foto ---- */
#s-garage .gz-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 2px 8px; }
#s-garage .gz-head b { font-size: 17px; color: #fff; text-shadow: var(--cr-out); letter-spacing: .03em; }
#s-garage .gz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#s-garage .gc.gz { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 4px 8px; min-height: 0;
  background: radial-gradient(120% 90% at 50% 25%, #ffffff 0%, #e8ecf6 55%, #c9d2e8 100%); overflow: visible; }
#s-garage .gc.gz.sel { background: radial-gradient(120% 90% at 50% 25%, #fffbe6 0%, #ffe9a6 55%, #f3c548 100%); }
#s-garage .gz-pic { display: block; width: 100%; aspect-ratio: 1; }
#s-garage .gz-pic img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 4px 3px rgba(0, 0, 40, .25)); }
#s-garage .gc.gz:hover .gz-pic img, #s-garage .gc.gz.try .gz-pic img { animation: gz-wiggle .7s ease-in-out infinite; }
#s-garage .gz-wait { display: block; width: 46%; aspect-ratio: 1; margin: 27% auto 0; border-radius: 50%; background: rgba(40, 60, 120, .15); animation: cr-bob 1s ease-in-out infinite; }
#s-garage .gz-stk { display: inline-block; margin-top: -4px; padding: 3px 10px 4px; background: var(--stk); color: #141414 !important; text-shadow: none !important;
  font-size: 13px; letter-spacing: .05em; transform: rotate(-3deg); clip-path: polygon(3% 10%, 97% 0, 100% 86%, 4% 100%, 0 50%);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .15); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* ronde 27: gekozen = groen lint met vinkje over de linkerrand; op slot = donker silhouet met een groot vraagteken */
#s-garage .gz-rib { position: absolute; top: 7px; left: -5px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px 4px 6px;
  border-radius: 4px 9px 9px 4px; border: 2px solid var(--cr-ink); color: #fff; font-family: var(--display); font-weight: 400; font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; text-shadow: var(--cr-out); background: linear-gradient(180deg, var(--cr-grn1) 0%, var(--cr-grn2) 55%, var(--cr-grn3) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 2px 0 var(--cr-ink); }
#s-garage .gz-rib .ck { width: 14px; height: 14px; flex: none; filter: drop-shadow(0 1px 0 var(--cr-ink)); }
#s-garage .gz-pic { position: relative; }
/* 1.2: op slot = de echte figuur iets gedimd met een slotje (je ziet wat je koopt), geen zwart silhouet met '?' */
#s-garage .gc.gz.lock .gz-pic img { filter: saturate(.7) brightness(.78); opacity: .95; }
#s-garage .gz-padlock { position: absolute; right: 6%; bottom: 8%; width: 22px; height: 22px; color: #fff; filter: drop-shadow(0 2px 0 rgba(7, 18, 51, .9)); pointer-events: none; }
#s-garage .gc.gz.lock .gz-pic .gz-wait { background: rgba(7, 18, 51, .5); }
#s-garage .gz-q { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-family: var(--display); font-style: normal; line-height: 1;
  font-size: clamp(28px, 4.6vw, 42px); color: #fff; text-shadow: var(--cr-out), 0 0 14px rgba(90, 160, 255, .9); pointer-events: none; }
#s-garage .gz-lock { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 3px; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; background: rgba(10, 22, 60, .86); color: #ffe27a; font-size: 12px; font-weight: 800; letter-spacing: .02em; text-shadow: var(--cr-out); }
#s-garage .gz-lock i { font-style: normal; font-size: 12px; }
#s-garage .gz-name { margin: 12px 2px 4px; }
#s-garage .gz-name label { display: block; color: #fff; font-weight: 800; text-shadow: var(--cr-out); margin-bottom: 6px; }
#s-garage .gz-nrow { display: flex; gap: 8px; align-items: stretch; }
/* naamveld in de stijl van de dialogen (dlg-input): donker, inktrand, gouden rand bij focus */
#s-garage .gz-nrow input { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; font: inherit; font-size: 16px; font-weight: 800; padding: 9px 12px; border-radius: 12px;
  border: 2px solid var(--cr-ink); background: rgba(7, 18, 51, .75); color: #fff; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5); outline: none; }
#s-garage .gz-nrow input:focus { border-color: var(--cr-gold2); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5), 0 0 0 2px rgba(255, 201, 40, .35); }
#s-garage .gz-nrow input::placeholder { color: rgba(207, 224, 255, .5); }
#s-garage .gz-nrow .big-btn { flex: none; width: auto; padding: 8px 16px; }
@keyframes gz-wiggle { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-4deg) scale(1.04, .97); } 75% { transform: rotate(4deg) scale(.97, 1.04); } }
@media (prefers-reduced-motion: reduce) { #s-garage .gc.gz .gz-pic img { animation: none !important; } }

/* tikvlak over de Glorp op menu en uitslag (glorpbuddy.js); het ligt boven #ui. glorpbuddy.js snijdt het bij tot het
   geen knop raakt en verbergt het zolang #confirm of #coach open is (geen :has, ronde 27) */
.gz-hit { position: fixed; z-index: 6; display: none; touch-action: none; cursor: grab; }

/* ======================= speelgoedknoppen: glans, indruk en veer ======================= */
/* Menu, panelen, garage, uitslag en dialogen; niet de HUD, niet de winkel (groene koopknoppen, Pass-kaart) en niet de Apple-knop.
   Indruk met translate en scale, want de binnenkom- en ademanimaties bezetten transform. */
:is(:is(#s-home, #s-arena, #s-garage) :is(.menu-btn, .garage-btn, .icon-btn),
  :is(.panel-screen, #s-garage) :is(.big-btn:not(:is(.gb-buy, .ar-pass *)), .back, .ghost-btn:not(:is(.ar-buy, .gb-buy, .ar-claim, .ar-up, .apple-btn, .apple-on, .ar-pass *))),
  :is(#s-presult, #s-end, #s-final, #s-turn, #confirm) :is(.big-btn, .ghost-btn)) {
  isolation: isolate; transition: translate .18s var(--cr-spring), scale .18s var(--cr-spring), box-shadow .14s ease-out, filter .12s; }
:is(:is(#s-home, #s-arena, #s-garage) :is(.menu-btn, .garage-btn, .icon-btn),
  :is(.panel-screen, #s-garage) :is(.big-btn:not(:is(.gb-buy, .ar-pass *)), .back, .ghost-btn:not(:is(.ar-buy, .gb-buy, .ar-claim, .ar-up, .apple-btn, .apple-on, .ar-pass *))),
  :is(#s-presult, #s-end, #s-final, #s-turn, #confirm) :is(.big-btn, .ghost-btn))::before {
  content: ''; position: absolute; z-index: -1; left: 3px; right: 3px; top: 2px; height: 45%; border-radius: inherit; pointer-events: none;
  background: var(--cr-glint), var(--cr-gloss); }
:is(:is(#s-home, #s-arena, #s-garage) :is(.menu-btn, .garage-btn, .icon-btn),
  :is(.panel-screen, #s-garage) :is(.big-btn:not(:is(.gb-buy, .ar-pass *)), .back, .ghost-btn:not(:is(.ar-buy, .gb-buy, .ar-claim, .ar-up, .apple-btn, .apple-on, .ar-pass *))),
  :is(#s-presult, #s-end, #s-final, #s-turn, #confirm) :is(.big-btn, .ghost-btn)):active:not(:disabled) {
  transform: none; translate: 0 var(--cr-sink, 4px); scale: .95; transition-duration: .07s; transition-timing-function: ease-out; }
/* zakken tot er 1 px lip over is; goud krijgt een sterkere glans; kleine knoppen een kleiner glimlicht */
:is(#s-home .menu-btn, :is(.panel-screen, #s-garage) .big-btn) { --cr-sink: 5px; }
:is(.panel-screen, #s-garage) .back { --cr-sink: 3px; --cr-glint: var(--cr-glint-xs); }
:is(#s-home .arena-btn, :is(.panel-screen, #s-garage) .big-btn, :is(#s-presult, #s-end, #s-final, #s-turn) .big-btn, #confirm .big-btn:not(.danger)) { --cr-gloss: var(--cr-gloss-gold); }
:is(#s-home, #s-arena, #s-garage) .icon-btn { --cr-glint: var(--cr-glint-s); }
:is(.set-btns, .tc-actions, .ar-row, .gar-restore, .hs-tbtns, .on-room-btns, .on-foot) .ghost-btn, .ghost-btn:is(.pf-say, .sm) { --cr-glint: var(--cr-glint-xs); }
@media (prefers-reduced-motion: reduce) { :root { --cr-spring: ease-out; } }

/* ======================= ronde 26: oefenscherm ======================= */
/* Speelse baankaarten: bovenin een baanpreview (svg uit de echte middenlijn, één keer per baan berekend en bewaard) op
   de lucht van het tijdstip, eronder naam, tijd en vier medaillevakjes. De eerstvolgende campagnebaan krijgt een
   gouden rand met een zachte gloed-puls (opacity van een laag). Geen blur of backdrop-filter. */
/* ---------- campagne als voortgangsbalk ---------- */
#s-practice .pr-camp { display: flex; align-items: center; gap: 10px; margin: 4px 2px 9px; }
#s-practice .pr-camp h3.pr-head { margin: 0; flex: none; }
#s-practice .pr-bar { position: relative; flex: 1 1 auto; max-width: 380px; height: 17px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(180deg, #050d2a, #0d1f55); border: 2px solid var(--cr-ink); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .18); }
#s-practice .pr-bar i { position: relative; display: block; height: 100%; border-radius: 8px; overflow: hidden; transform-origin: 0 50%;
  background: linear-gradient(180deg, #fff6c8 0%, var(--cr-gold2) 46%, #f0a810 54%, var(--cr-gold3) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(140, 70, 0, .35), 0 0 10px rgba(255, 201, 40, .7); }
#s-practice .pr-bar i::after { content: ''; position: absolute; inset: -20% auto -20% 0; width: 40px; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: translateX(-160%) skewX(-18deg);
  animation: cr-shine 3.8s ease-in-out 1.2s infinite; }
/* een streepje per baan */
#s-practice .pr-bar::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(100% - 2px), rgba(7, 18, 51, .55) 0) 0 0 / calc(100% / var(--segs, 10)) 100% repeat-x; }
#s-practice .pr-score { display: inline-flex; align-items: center; gap: 6px; flex: none; font-family: var(--display); font-weight: 400; font-size: 16px;
  letter-spacing: .02em; color: #fff; text-shadow: var(--cr-out); }
#s-practice .pr-score b { font-weight: 400; color: var(--cr-gold1); }
#s-practice .pr-score .pr-sk { width: 17px; height: 17px; }

/* ---------- kaart ---------- */
#s-practice .pr-grid { gap: 12px 10px; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); margin-top: 4px; }
#s-practice .pr-grid + h3.pr-head { margin: 16px 2px 6px; }
#s-practice .pr-wrap { isolation: isolate; }
#s-practice .pr-card { display: flex; flex-direction: column; padding: 0; min-height: 0; overflow: hidden; text-align: left; color: #fff;
  border-radius: 16px; border: 2px solid var(--cr-ink); background: linear-gradient(180deg, #3b7fec 0%, #2659c6 48%, #183f9c 100%);
  box-shadow: inset 0 -3px 0 rgba(7, 18, 51, .35), 0 0 0 1px rgba(255, 201, 40, .5), 0 4px 0 rgba(7, 18, 51, .65);
  transition: transform .08s ease-out, filter .12s; }
#s-practice .pr-card:active { transform: translateY(3px) scale(.985); }
@media (hover: hover) { #s-practice .pr-card:hover { filter: brightness(1.08); } }
/* eerstvolgende campagnebaan: gouden dubbele rand, gloed eronder die zacht pulseert */
#s-practice .pr-wrap.next .pr-card { border-color: var(--cr-gold4);
  box-shadow: inset 0 -3px 0 rgba(7, 18, 51, .3), 0 0 0 2px var(--cr-gold2), 0 0 0 4px var(--cr-gold4), 0 5px 0 3px rgba(7, 18, 51, .55); }
#s-practice .pr-wrap.next::before { content: ''; position: absolute; inset: -4px; z-index: -1; border-radius: 20px; pointer-events: none;
  box-shadow: 0 0 16px 4px rgba(255, 205, 50, .8); animation: cr-pulse 1.8s ease-in-out infinite; }

/* ---------- preview: lucht per tijdstip, witte baanlijn met zachte gloed ---------- */
:is(#s-practice, #s-champ) .pr-pv { position: relative; flex: none; height: 64px; overflow: hidden; border-bottom: 2px solid var(--cr-ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -10px 14px -8px rgba(7, 18, 51, .35); }
:is(#s-practice, #s-champ) .pr-pv[data-sky="day"] { background:
  radial-gradient(circle at 70% 30%, #fffef2 0 5px, rgba(255, 244, 180, .9) 6px, rgba(255, 236, 150, .3) 11px, transparent 20px),
  radial-gradient(34% 30% at 16% 100%, rgba(255, 255, 255, .7), transparent 70%), radial-gradient(28% 24% at 44% 104%, rgba(255, 255, 255, .55), transparent 70%),
  linear-gradient(180deg, #3aa4ff 0%, #74c4ff 55%, #c6ebff 100%); }
:is(#s-practice, #s-champ) .pr-pv[data-sky="sunrise"] { background:
  radial-gradient(circle at 24% 100%, #fffbe6 0 8px, rgba(255, 236, 170, .9) 9px, rgba(255, 210, 140, .35) 18px, transparent 32px),
  linear-gradient(180deg, #ff8f6b 0%, #ffb27d 45%, #ffd69e 80%, #ffeccb 100%); }
:is(#s-practice, #s-champ) .pr-pv[data-sky="sunset"] { background:
  radial-gradient(circle at 76% 100%, #fff3d0 0 8px, rgba(255, 214, 120, .9) 9px, rgba(255, 170, 90, .4) 18px, transparent 34px),
  linear-gradient(180deg, #c95bd0 0%, #ff679c 40%, #ff8f5e 76%, #ffbe68 100%); }
:is(#s-practice, #s-champ) .pr-pv[data-sky="night"] { background:
  radial-gradient(circle at 67% 22%, #1b1458 0 5px, transparent 5.6px),
  radial-gradient(circle at 70% 30%, #fffbe6 0 6px, rgba(220, 225, 255, .35) 7px, transparent 15px),
  radial-gradient(circle at 12% 24%, #fff 0 .8px, transparent 1.4px), radial-gradient(circle at 31% 12%, #fff 0 .7px, transparent 1.3px),
  radial-gradient(circle at 46% 34%, #fff 0 .9px, transparent 1.5px), radial-gradient(circle at 58% 14%, #fff 0 .6px, transparent 1.2px),
  radial-gradient(circle at 86% 46%, #fff 0 .8px, transparent 1.4px), radial-gradient(circle at 22% 56%, #fff 0 .6px, transparent 1.2px),
  linear-gradient(180deg, #0f0b3e 0%, #241a72 55%, #4a2d9c 100%); }
:is(#s-practice, #s-champ) .pr-pv[data-sky="new"] { background:
  radial-gradient(circle at 18% 30%, rgba(255, 255, 255, .5) 0 2px, transparent 2.6px), radial-gradient(circle at 82% 66%, rgba(255, 230, 120, .8) 0 2.5px, transparent 3px),
  radial-gradient(circle at 70% 22%, rgba(120, 255, 220, .7) 0 2px, transparent 2.6px), radial-gradient(circle at 30% 78%, rgba(255, 140, 210, .75) 0 2.5px, transparent 3px),
  linear-gradient(160deg, #b977ff 0%, #8a3ff0 50%, #5a22c0 100%); }
:is(#s-practice, #s-champ) .pr-pv[data-sky="code"] { background: radial-gradient(90% 80% at 30% 0%, rgba(255, 255, 255, .35), transparent 60%), linear-gradient(160deg, #46e6c8 0%, #17ae9f 50%, #0b7380 100%); }
/* ruime inzet: links vrij van de nummersticker, rechts van het Hot Seat-knopje en boven van het lipje Volgende
   (gemeten op 568 tot 1920 breed, alle tien banen: start en finish minstens 4 px, de lijn minstens 8 px van die drie af) */
:is(#s-practice, #s-champ) .pr-map { position: absolute; left: 30px; top: 15px; width: calc(100% - 74px); height: calc(100% - 20px); overflow: visible; }
:is(#s-practice, #s-champ) .pr-pv.pv-in .pr-map { animation: cr-fade-in .35s ease-out both; }
:is(#s-practice, #s-champ) .pr-map path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
:is(#s-practice, #s-champ) .pr-map .g { stroke: rgba(255, 255, 255, .24); stroke-width: 13px; }
:is(#s-practice, #s-champ) .pr-map .o { stroke: rgba(7, 18, 51, .6); stroke-width: 6.5px; }
:is(#s-practice, #s-champ) .pr-map .l { stroke: #fff; stroke-width: 3.2px; }
:is(#s-practice, #s-champ) .pr-pv[data-sky="night"] .pr-map .g { stroke: rgba(170, 200, 255, .3); }
:is(#s-practice, #s-champ) .pr-map .s { fill: var(--green); stroke: #fff; stroke-width: 2px; vector-effect: non-scaling-stroke; }
:is(#s-practice, #s-champ) .pr-map .fb { fill: var(--cr-ink); stroke: #fff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
:is(#s-practice, #s-champ) .pr-map .f { color: #fff; }
#s-practice .pr-ico { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; color: #fff; transform: rotate(-10deg);
  filter: drop-shadow(0 2px 0 var(--cr-ink)); }

/* ---------- stickers en knopjes rond de preview ---------- */
/* baannummer als gouden sticker over de hoek (ster bij de baan van de dag) */
#s-practice .pr-num { position: absolute; left: -5px; top: -5px; z-index: 2; display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 4px;
  border-radius: 999px; border: 2px solid var(--cr-ink); pointer-events: none; transform: rotate(-8deg);
  font-family: var(--display); font-size: 12.5px; line-height: 1; color: #fff; text-shadow: 0 1px 0 var(--cr-ink), 0 0 2px var(--cr-ink);
  background: radial-gradient(circle at 35% 28%, #fffbe0 0 12%, var(--cr-gold2) 45%, var(--cr-gold3) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 0 var(--cr-ink); }
#s-practice .pr-num.star { background: radial-gradient(circle at 35% 28%, #ffe1f3 0 12%, #ff5fae 45%, #c2207a 100%); }
#s-practice .pr-num.star svg { width: 14px; height: 14px; color: #fff; filter: drop-shadow(0 1px 0 var(--cr-ink)); }
/* 'Volgende': gouden lipje boven op de kaart, wipt zachtjes */
#s-practice .pr-next { position: absolute; left: 50%; top: -10px; z-index: 2; padding: 0 9px 1px; border-radius: 999px; border: 2px solid var(--cr-ink);
  font-family: var(--display); font-size: 12px; line-height: 14px; letter-spacing: .06em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 0 var(--cr-ink);
  pointer-events: none; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, #f0a810 51%, var(--cr-gold3)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 0 var(--cr-ink);
  animation: pr-hop 1.8s ease-in-out infinite; }
@keyframes pr-hop { 0%, 100% { transform: translateX(-50%); } 50% { transform: translate(-50%, -3px); } }
/* Hot Seat op deze baan: rond glasknopje rechtsboven op de preview */
#s-practice .pr-hs { top: 6px; right: 6px; bottom: auto; width: 28px; height: 28px; border-radius: 50%; font-size: 15px; color: var(--cr-gold1);
  background: rgba(7, 18, 51, .55); border: 1.5px solid rgba(255, 255, 255, .45); box-shadow: 0 2px 0 rgba(7, 18, 51, .5); }

/* ---------- onderkant: code, naam, tijd en medaillevakjes ---------- */
#s-practice .pr-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; padding: 5px 10px 8px; }
/* bovenregel: de code (klein, als er een naam is) en rechts de hoogte-badge */
#s-practice .pr-top { display: flex; align-items: center; gap: 6px; min-height: 15px; }
#s-practice .pr-code { font-family: var(--num); font-weight: 700; font-size: 12px; line-height: 13px; letter-spacing: .16em; color: #a8c8ff; }
#s-practice .pr-top .pr-elev.on { margin: 0 0 0 auto; padding: 0 5px 0 3px; border-radius: 999px; background: rgba(7, 18, 51, .5); color: #8be9ff; vertical-align: 0; line-height: 15px; }
#s-practice .pr-top .pr-elev.on b { font-size: 12px; }
#s-practice .pr-top .pr-elev.on svg { width: 11px; height: 11px; }
#s-practice .pr-name { display: block; padding-bottom: 2px; font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 20px; letter-spacing: .02em;
  color: #fff; text-shadow: var(--cr-out); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#s-practice .pr-name.tc-code { font-family: var(--num); font-weight: 700; font-size: 18px; letter-spacing: .12em; }
#s-practice .pr-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 4px; }
#s-practice .pr-best { display: block; margin: 0; min-width: 0; }
#s-practice .pr-time { font-family: var(--num); font-weight: 700; font-size: 14.5px; color: #fff; text-shadow: 0 1px 0 var(--cr-ink); font-variant-numeric: tabular-nums; }
#s-practice .pr-none { font-size: 12px; font-weight: 700; color: #b4cdf5; white-space: nowrap; }
#s-practice .pr-meds { position: static; display: block; flex: none; }
/* medaillevakjes: donkere socket met een randje in de medaillekleur; behaald = glanzend gevuld met een glinster */
#s-practice .pr-socks { display: inline-flex; gap: 3px; padding: 2px; border-radius: 999px; background: rgba(7, 18, 51, .62);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .14); }
#s-practice .pr-sk { position: relative; display: block; flex: none; width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(0, 0, 0, .5), rgba(4, 10, 32, .95) 75%);
  box-shadow: inset 0 0 0 1.5px var(--mr), inset 0 2px 3px rgba(0, 0, 0, .8); }
#s-practice .pr-sk.m-bronze { --m1: #ffd9b3; --m2: #d0844a; --m3: #7c461f; --mr: rgba(208, 132, 74, .5); }
#s-practice .pr-sk.m-silver { --m1: #ffffff; --m2: #c5cedb; --m3: #6c788b; --mr: rgba(197, 206, 219, .45); }
#s-practice .pr-sk.m-gold { --m1: #fff5bd; --m2: #ffc928; --m3: #b77208; --mr: rgba(255, 201, 40, .5); }
#s-practice .pr-sk.m-author { --m1: #cdffe2; --m2: #2fd27a; --m3: #0c6e3e; --mr: rgba(47, 210, 122, .5); }
#s-practice .pr-sk.on { background: radial-gradient(circle at 34% 30%, #fff 0 9%, var(--m1) 22%, var(--m2) 56%, var(--m3) 100%);
  box-shadow: 0 0 0 1.5px var(--cr-ink), inset 0 -2px 2px rgba(0, 0, 0, .22), 0 0 7px var(--mr); }
#s-practice .pr-sk.on::after { content: ''; position: absolute; right: -2px; top: -2px; width: 7px; height: 7px; background: #fff; opacity: .85;
  -webkit-clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
#s-practice .pr-sk.top::after { right: -4px; top: -4px; width: 10px; height: 10px; }
/* alleen op de Volgende-kaart twinkelt de hoogste medaille (op elke kaart was dat te onrustig) */
#s-practice .pr-wrap.next .pr-sk.top::after { animation: pr-twinkle 2.6s ease-in-out infinite; }
@keyframes pr-twinkle { 0%, 50%, 100% { transform: scale(.55) rotate(0); opacity: .55; } 68% { transform: scale(1.2) rotate(45deg); opacity: 1; } }

/* ---------- tegels Nieuwe baan en Code invoeren ---------- */
#s-practice .pr-card.act { justify-content: flex-start; align-items: stretch; gap: 0; }
#s-practice .pr-card.act .pr-body { padding-top: 7px; }
#s-practice .pr-card.act .pr-name { font-size: 16px; }
#s-practice .pr-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 12px; line-height: 14px; font-weight: 700; color: #b4cdf5; }
/* zes codevakjes onderin, op de plek van tijd en medailles: vraagtekens (verrassing) of leeg met een cursor (intikken) */
#s-practice .pr-slots { display: flex; gap: 4px; margin-top: auto; padding-top: 6px; }
#s-practice .pr-slots i { display: grid; place-items: center; flex: 1 1 0; max-width: 24px; height: 22px; border-radius: 6px;
  font-family: var(--num); font-style: normal; font-weight: 700; font-size: 12.5px; line-height: 1; color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink);
  background: rgba(7, 18, 51, .62); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .14); }
#s-practice .pr-slots i.cur { box-shadow: inset 0 0 0 1.5px #46e6c8, inset 0 1px 3px rgba(0, 0, 0, .6), 0 0 6px rgba(70, 230, 200, .45); }
#s-practice .pr-slots i.cur::after { content: ''; width: 2px; height: 12px; border-radius: 1px; background: #fff; }

/* ---------- binnenkomen ---------- */
#s-practice.cr-enter :is(.pr-wrap, .pr-card.act) { animation: cr-rise .38s var(--ease-back) both; }
#s-practice.cr-enter .pr-grid > :nth-child(2) { animation-delay: .03s; }
#s-practice.cr-enter .pr-grid > :nth-child(3) { animation-delay: .06s; }
#s-practice.cr-enter .pr-grid > :nth-child(4) { animation-delay: .09s; }
#s-practice.cr-enter .pr-grid > :nth-child(n+5) { animation-delay: .12s; }
#s-practice.cr-enter .pr-bar i { animation: pr-grow .7s var(--ease-back) .15s both; }
@keyframes pr-grow { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #s-practice :is(.pr-wrap, .pr-card.act, .pr-bar i, .pr-next, .pr-map) { animation: none !important; }
  #s-practice :is(.pr-bar i, .pr-sk.top)::after, #s-practice .pr-wrap.next::before { animation: none !important; }
}

/* ======================= ronde 26: Hot Seat-opzet ======================= */
/* spelers als tegels in hun eigen kleur, onderin baankaart en Start; maatklassen zet main.js (setupFit, iOS 15) */
/* onderaan mag het paneel half in de strook van de thuisbalk (iPhone dwars: 21 px); Start blijft er ruim boven */
#s-setup.screen { padding-bottom: calc(6px + var(--sab) * .5); }
#s-setup .panel-head { margin-bottom: 8px; padding-top: 6px; padding-bottom: 6px; }
#s-setup .ph-txt { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 16px; }
#s-setup .ph-txt h2 { flex: none; line-height: 1.05; }
#s-setup .mode-line { flex: 1 1 260px; min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.22; }
#s-setup .setup-grid { flex: 1 1 auto; min-height: 110px; overflow: hidden; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 14px; }
#s-setup .setup-col { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding: 0 3px 4px; }
/* scrollhint: staat er onder de rand nog iets (crews, Ghosts), dan vervaagt de kolom onderaan (main.js zet .more) */
#s-setup :is(.setup-col, .setup-grid).more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 36px), rgba(0, 0, 0, .12)); mask-image: linear-gradient(180deg, #000 calc(100% - 36px), rgba(0, 0, 0, .12)); }
#s-setup .col-head h3 { margin-bottom: 2px; }
#s-setup .col-head .count { color: var(--cr-gold1); font-family: var(--display); font-weight: 400; font-size: 14px; text-shadow: 0 2px 0 var(--cr-ink); }

/* ---------- spelertegels: kleur, nummer, auto, naam ---------- */
/* ruimte boven en rechts voor het weghaal-rondje dat over de hoek steekt */
#s-setup .pl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 64px; gap: 9px 9px; padding: 10px 7px 7px 0; }
#s-setup .pl-grid[data-rows="1"] { grid-auto-rows: 118px; }
/* hoge rij: de lege tegel is smaller, zodat de spelerskaarten (naam, autonaam) breder zijn */
#s-setup .pl-grid[data-rows="1"][data-cols="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, .72fr); }
#s-setup .pl-grid[data-rows="1"][data-cols="4"] { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .72fr); }
/* 4 of 5 spelers: 3 kolommen, zodat de lege tegel niet als brede balk onder de rest ligt */
#s-setup .pl-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* compact: nummer en auto naast elkaar, de naam eronder; met weghalen blijft rechtsboven een kolom vrij voor het rondje */
#s-setup .pl-row { position: relative; isolation: isolate; height: auto; min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: 22px minmax(0, 1fr); grid-template-areas: ". car" "name name"; align-items: center; gap: 4px 2px; padding: 4px 5px 6px;
  border-radius: 15px; border: 2px solid var(--cr-ink);
  background: radial-gradient(130% 70% at 25% 0%, rgba(255, 255, 255, .45), transparent 58%), linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, .3)), var(--pc);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(0, 0, 0, .2), 0 4px 0 var(--pcd), 0 4px 0 2px var(--cr-ink), 0 10px 14px rgba(0, 0, 0, .35); }
#s-setup .pl-row.del { grid-template-columns: 24px minmax(0, 1fr) 10px; grid-template-areas: ". car ." "name name name"; }
/* schuine glansstreep over de tegel */
#s-setup .pl-row::before { content: ''; position: absolute; inset: 0; border-radius: 13px; pointer-events: none; z-index: 0;
  background: linear-gradient(112deg, transparent 52%, rgba(255, 255, 255, .22) 52.5%, rgba(255, 255, 255, .22) 62%, transparent 62.5%); }
/* de tegel zelf kiest de kleur; het nummer (regenboogrand) ligt met z-index 2 boven de autoknop (z-index 1) */
#s-setup .pl-col { position: absolute; inset: 0; width: auto; height: auto; display: block; border-radius: 13px; background: none; box-shadow: none; }
#s-setup .pl-col b { position: absolute; z-index: 2; left: 3px; top: 3px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 400 14px/1 var(--display); color: var(--cr-ink); border: 2px solid var(--cr-ink); box-shadow: 0 2px 0 rgba(7, 18, 51, .55);
  background: radial-gradient(circle, #fff 0 54%, transparent 56%), conic-gradient(#ff4a4a, #ffc414, #3ee485, #29d3ff, #4d8bff, #b47aff, #ff4a4a);
  transition: transform .08s ease-out; }
#s-setup .pl-col:active b { transform: scale(.9); }
/* autoknop: vult het hele vak tussen nummer en hoek (groot tikdoel), het autootje in het midden */
#s-setup .pl-car { grid-area: car; position: relative; z-index: 1; justify-self: stretch; min-width: 0; max-width: none; height: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  padding: 0 6px 0 4px; border-radius: 999px; background: rgba(7, 18, 51, .45); border: 1.5px solid rgba(7, 18, 51, .6); color: #fff;
  font: 700 12px var(--ui); letter-spacing: .02em; text-shadow: 0 1px 0 var(--cr-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
#s-setup .pl-car span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* tikvlak iets hoger dan het pilletje (tot in de rand erboven en de kier eronder) */
#s-setup .pl-car::after { content: ''; position: absolute; inset: -4px 0; }
#s-setup .pl-car:active { transform: scale(.94); }
/* standaardauto: alleen het autootje (de naam 'Racer' zegt niets en past niet) */
#s-setup .pl-car.std { padding: 0 4px; }
#s-setup .pl-car.std span { display: none; }
#s-setup .side-car { width: 27px; height: 16px; flex: none; overflow: visible; }
#s-setup .side-car .cb { fill: #fff; stroke: var(--cr-ink); stroke-width: 2; stroke-linejoin: round; }
#s-setup .side-car .cs { fill: none; stroke: var(--pc); stroke-width: 2.8; stroke-linecap: round; }
#s-setup .side-car .cd { fill: var(--pc); stroke: var(--cr-ink); stroke-width: 1.8; }
#s-setup .side-car .cv { fill: var(--cr-ink); }
#s-setup .side-car .cw { fill: #252b40; stroke: var(--cr-ink); stroke-width: 1.8; }
#s-setup .side-car .ch { fill: #d9e0ee; }
/* weghalen: rood rondje op de hoek van de tegel; ::after maakt het tikvlak iets groter, alleen naar buiten */
#s-setup .pl-del { position: absolute; z-index: 3; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 700 19px/1 var(--ui); color: #fff; text-shadow: 0 1px 0 var(--cr-ink); background: linear-gradient(180deg, #ff6b5a, #e0281a 55%, #b51a10);
  border: 2px solid var(--cr-ink); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .5), 0 2px 0 var(--cr-ink); }
#s-setup .pl-del::after { content: ''; position: absolute; top: -4px; right: -4px; bottom: 0; left: 0; border-radius: 50%; }
#s-setup .pl-del:hover { color: #fff; background: linear-gradient(180deg, #ff8273, #ea3626 55%, #c01f14); }
#s-setup .pl-del:active { transform: scale(.88); }
/* naamveld: donker met een zweem van de spelerskleur, op geel en wit strak marineblauw (--pcn uit main.js) */
#s-setup .pl-row input { grid-area: name; position: relative; z-index: 1; align-self: center; height: 100%; width: 100%; min-width: 0; padding: 0 8px; border: 0; border-radius: 10px;
  background: var(--pcn); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3);
  max-height: 34px; color: #fff; font: 400 15px var(--display); letter-spacing: .02em; text-shadow: 0 1px 0 var(--cr-ink); text-overflow: ellipsis; }
#s-setup .pl-row input::placeholder { color: rgba(255, 255, 255, .74); }
#s-setup .pl-row input:focus { box-shadow: inset 0 0 0 40px rgba(4, 10, 30, .3), inset 0 2px 4px rgba(0, 0, 0, .5), 0 0 0 2px #fff; }
/* weinig spelers: één hoge rij; bovenin nummer (en de naam van een eigen auto), in het midden een groot autootje */
#s-setup .pl-grid[data-rows="1"] .pl-row { grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: 22px minmax(0, 1fr) 30px; grid-template-areas: ". ." "car car" "name name"; padding: 5px 6px 7px; }
/* de autoknop ligt zelf boven de kleurlaag (position en z-index), niet dankzij de schaduw van het autootje;
   rechthoekig, zodat ook de hoeken van het vak de autokiezer openen */
#s-setup .pl-grid[data-rows="1"] .pl-car { position: relative; z-index: 1; align-self: stretch; height: auto; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
#s-setup .pl-grid[data-rows="1"] .pl-car:active { transform: none; }
#s-setup .pl-grid[data-rows="1"] .pl-car::after { display: none; }
#s-setup .pl-grid[data-rows="1"] .pl-car:active .side-car { transform: scale(.92); }
#s-setup .pl-grid[data-rows="1"] .side-car { width: 70px; height: 41px; filter: drop-shadow(0 3px 0 rgba(7, 18, 51, .35)); }
/* een eigen auto: de naam rechtsboven naast het nummer, in de rij boven de knop (hoort bij de autoknop) */
#s-setup .pl-grid[data-rows="1"] .pl-car span { position: absolute; top: -24px; right: 0; max-width: calc(100% - 30px); padding: 2px 8px; border-radius: 999px;
  background: rgba(7, 18, 51, .45); font-size: 12px; line-height: 1.2; }
#s-setup .pl-grid[data-rows="1"] .pl-row.del .pl-car span { right: 15px; max-width: calc(100% - 40px); padding: 2px 5px; font-size: 12px; }
#s-setup .pl-grid[data-rows="1"] .pl-row input { font-size: 16px; }
/* compacte tegels: de naam van een eigen auto past alleen in een brede tegel, die ook een groter autootje krijgt */
#s-setup .pl-grid:not([data-rows="1"]):is([data-tw="m"], [data-tw="xs"]) .pl-car span { display: none; }
#s-setup .pl-grid:not([data-rows="1"])[data-tw=""] .side-car { width: 32px; height: 19px; }
/* smalle tegels (iPhone SE, notch-iPhones): kleinere naam, autootje zonder pilletje */
#s-setup .pl-grid[data-tw="xs"] .pl-row input { font-size: 13.5px; padding: 0 5px; }
#s-setup .pl-grid[data-tw="xs"] .pl-car:not(.std) span { display: none; }
#s-setup .pl-grid[data-tw="xs"] .pl-car { padding: 0; background: none; border-color: transparent; box-shadow: none; }
#s-setup .pl-grid[data-tw="xs"] .side-car { width: 24px; height: 14px; }
/* lange autonaam die op één regel niet past (main.js fitCarName): op twee regels, compact zonder autootje; past ook dat
   niet, dan alleen het autootje */
#s-setup .pl-grid .pl-car.two span { white-space: normal; line-height: 1; text-align: center; text-overflow: clip; }
#s-setup .pl-grid:not([data-rows="1"]) .pl-car.two .side-car { display: none; }
#s-setup .pl-grid .pl-car.bare span { display: none; }
#s-setup .pl-grid[data-rows="1"][data-tw="xs"] .pl-row { padding-left: 4px; padding-right: 4px; }
#s-setup .pl-grid[data-rows="1"][data-tw="xs"] .pl-row input { font-size: 14.5px; }
#s-setup .pl-grid[data-rows="1"][data-tw="xs"] .side-car { width: 60px; height: 35px; }
/* lege tegel: speler erbij, hoogstens 2 tegels breed; is er plek, dan staat de plus naast de tekst */
#s-setup .pl-add { height: auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: 3px 9px; padding: 3px 4px; border-radius: 15px;
  border: 2.5px dashed rgba(255, 255, 255, .5); background: rgba(120, 175, 255, .13); color: #fff; font: 400 13px/1.05 var(--display); letter-spacing: .02em; text-align: center;
  text-shadow: 0 2px 0 var(--cr-ink); transition: transform .08s ease-out, background .12s; }
#s-setup .pl-grid:not([data-cols="3"]) .pl-add:not(:nth-child(4n)), #s-setup .pl-grid[data-cols="3"] .pl-add:not(:nth-child(3n)) { grid-column: span 2; }
#s-setup .pl-add span { flex: 0 1 auto; min-width: 0; }
#s-setup .pl-add:hover { background: rgba(120, 175, 255, .22); border-color: rgba(255, 255, 255, .75); }
#s-setup .pl-add:active { transform: scale(.95); }
#s-setup .pl-add i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--cr-ink);
  background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2) 55%, var(--cr-grn3)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 0 var(--cr-ink); }
#s-setup .pl-add i svg { width: 15px; height: 15px; color: #fff; filter: drop-shadow(0 1px 0 var(--cr-ink)); }
/* smalle compacte lege tegel ('Speler erbij' op twee regels, main.js zet .slim): kleinere plus binnen de rand */
#s-setup .pl-grid:not([data-rows="1"]) .pl-add.slim i { width: 22px; height: 22px; }
#s-setup .pl-grid:not([data-rows="1"]) .pl-add.slim i svg { width: 13px; height: 13px; }
#s-setup .pl-grid:not([data-rows="1"]) .pl-add.slim span { font-size: 12px; line-height: 1; }
#s-setup .pl-grid[data-rows="1"] .pl-add { flex-direction: column; flex-wrap: nowrap; gap: 5px; font-size: 13.5px; }
#s-setup .pl-grid[data-rows="1"] .pl-add i { width: 38px; height: 38px; }
#s-setup .pl-grid[data-rows="1"] .pl-add i svg { width: 22px; height: 22px; }
#s-setup.cr-enter :is(.pl-row, .pl-add) { animation: cr-rise .38s var(--ease-back) both; }
#s-setup.cr-enter :is(.pl-row, .pl-add):nth-child(2) { animation-delay: .04s; }
#s-setup.cr-enter :is(.pl-row, .pl-add):nth-child(3) { animation-delay: .08s; }
#s-setup.cr-enter :is(.pl-row, .pl-add):nth-child(n+4) { animation-delay: .12s; }
#s-setup .pl-row.pop { animation: hs-pop .4s var(--ease-back) both; }
@keyframes hs-pop { from { opacity: 0; transform: scale(.55) rotate(-4deg); } to { opacity: 1; transform: none; } }

/* recente namen en crews */
#s-setup .name-chips { margin-top: 2px; }
#s-setup .nc-lbl { color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink); }
#s-setup .nc-chip { border-radius: 10px; border: 2px solid var(--cr-ink); color: #fff; text-shadow: 0 1px 0 var(--cr-ink); padding: 3px 9px;
  background: linear-gradient(180deg, #2b5fc4, #1b4296 55%, #163781); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 var(--cr-ink); }
#s-setup .nc-chip i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--cr-ink); }
#s-setup .nc-chip.crew .dots i { width: 8px; height: 12px; border-radius: 3px; }
#s-setup .nc-chip.save { color: var(--cr-gold1); border: 2px dashed rgba(255, 201, 40, .7); background: rgba(7, 18, 51, .35); box-shadow: none; }

/* opties rechts */
#s-setup .hs-opts .opt-row { margin-bottom: 7px; row-gap: 3px; }
#s-setup .hs-opts .opt-row h3 { margin: 0; }
#s-setup .len-row .chip { padding-left: 8px; padding-right: 8px; }
#s-setup .len-note { color: #d6e6ff; text-shadow: 0 1px 0 var(--cr-ink); }
#s-setup .rules { margin-top: 2px; color: #e3ecff; }
#s-setup .rules summary { color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink); }

/* ---------- onderbalk: baankaart en Start ---------- */
#s-setup .setup-foot { flex: none; display: flex; align-items: stretch; gap: 12px; height: 72px; margin: 8px 0 4px; }
#s-setup .hs-track { --sk1: #2a74de; --sk2: #5fb0ff; --sk3: #c4ebff; position: relative; isolation: isolate; flex: 1 1 auto; min-width: 0; display: flex; align-items: center;
  gap: 10px; padding: 5px 8px 5px 6px; border-radius: 16px; overflow: hidden; border: 2px solid var(--cr-ink);
  background: linear-gradient(180deg, var(--sk1) 0%, var(--sk2) 58%, var(--sk3) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -6px 12px rgba(255, 255, 255, .12), 0 0 0 2px var(--cr-gold2), 0 0 0 4px var(--cr-ink); }
/* tijdstip: dag (warm), zonsopkomst, zonsondergang, nacht */
#s-setup .hs-track[data-sky="desert"] { --sk1: #2f7fdc; --sk2: #6db4f0; --sk3: #ffe2a6; }
/* zonsopkomst zoals in het spel: grijze, nevelige lucht met bleek goudgeel licht (zonsondergang is paars naar oranje) */
#s-setup .hs-track[data-sky="autumn"] { --sk1: #7a88a8; --sk2: #cdc3a4; --sk3: #ffd970; }
#s-setup .hs-track[data-sky="coast"] { --sk1: #3f2a7c; --sk2: #c2548a; --sk3: #ff8f4a; }
#s-setup .hs-track[data-sky="night"] { --sk1: #060b28; --sk2: #14215a; --sk3: #2d3d8c; }
/* nachtsterren alleen rond de baanlijn, zacht, zodat ze nooit als puntjes tussen de tekst staan */
#s-setup .hs-track[data-sky="night"] .hs-map::after { content: ''; position: absolute; inset: -4px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 8% 10%, rgba(255, 255, 255, .75) 0 1px, transparent 1.6px), radial-gradient(circle at 46% 4%, rgba(255, 255, 255, .55) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 30% 34%, rgba(255, 255, 255, .5) 0 .8px, transparent 1.4px), radial-gradient(circle at 4% 58%, rgba(255, 255, 255, .6) 0 .9px, transparent 1.5px),
    radial-gradient(circle at 62% 46%, rgba(255, 255, 255, .45) 0 .7px, transparent 1.3px); }
#s-setup .hs-card { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; align-items: center; gap: 10px; }
/* zon of maan achter de baanlijn */
#s-setup .hs-map { position: relative; flex: none; width: 58px; height: 58px; }
#s-setup .hs-map::before { content: ''; position: absolute; z-index: 0; right: -2px; top: -2px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle, #fffbe0 0 45%, #ffe27a 60%, rgba(255, 226, 122, 0) 72%); box-shadow: 0 0 18px 6px rgba(255, 240, 170, .55); }
#s-setup .hs-track[data-sky="autumn"] .hs-map::before { left: -4px; right: auto; top: auto; bottom: 2px; width: 30px; height: 30px;
  background: radial-gradient(circle, #fffdf0 0 42%, #ffe270 60%, rgba(255, 220, 100, 0) 72%); box-shadow: 0 0 26px 12px rgba(255, 232, 150, .6); }
#s-setup .hs-track[data-sky="coast"] .hs-map::before { top: auto; bottom: 2px; right: -4px; width: 30px; height: 30px;
  background: radial-gradient(circle, #ffe0b0 0 40%, #ff7a3a 58%, rgba(255, 90, 40, 0) 72%); box-shadow: 0 0 22px 8px rgba(255, 110, 60, .5); }
#s-setup .hs-track[data-sky="night"] .hs-map::before { width: 18px; height: 18px; top: 0; right: 0; background: none; box-shadow: inset -5px 3px 0 0 #fff4c8, 0 0 14px rgba(255, 244, 200, .35); }
#s-setup .hs-map svg { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; }
#s-setup .hs-map path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* H-banen: hoge stukken (dek, toren, viaduct, spiraal) geel over de baan, sprongen als roze punt */
#s-setup .hs-map path.hw-hi { stroke: #ffd21a; stroke-width: 6; }
#s-setup .hs-map circle.hw-j { fill: #ff3df0; stroke: #1a0a2a; stroke-width: 2; }
#s-setup .hs-map path.o { stroke: var(--cr-ink); stroke-width: 10; }
#s-setup .hs-map path.l { stroke: #fff; stroke-width: 4.6; }
#s-setup .hs-map circle { stroke: var(--cr-ink); stroke-width: 3; }
#s-setup .hs-map circle.s { fill: #3ee485; }
#s-setup .hs-map circle.f { fill: #ff4a4a; }
#s-setup .hs-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
/* code en sfeer altijd op één regel, de cijfers op hoogstens twee; past het niet, dan kiest setupFit een kleinere maat */
#s-setup .hs-head { max-width: 100%; display: flex; align-items: baseline; gap: 0 9px; white-space: nowrap; }
#s-setup .hs-info .tc-code { flex: none; font: 700 24px/1.05 var(--num); letter-spacing: .1em; color: #fff; text-shadow: var(--cr-out); }
#s-setup .hs-info .tc-biome { min-width: 0; font: 400 14px/1.2 var(--display); letter-spacing: .02em; color: #fff; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); }
#s-setup .hs-info .tc-biome::first-letter { text-transform: uppercase; }
#s-setup .hs-info .tc-stats { margin: 0; gap: 0 8px; max-height: 2.36em; overflow: hidden; font-size: 12.5px; line-height: 1.18; color: #fff;
  text-shadow: 0 1px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink), 0 0 3px var(--cr-ink); }
#s-setup .hs-info .tc-stats span { white-space: nowrap; }
#s-setup .hs-medals { flex: none; display: grid; grid-template-columns: repeat(2, auto); gap: 3px; }
#s-setup .hs-medals div { display: flex; flex-direction: column; padding: 2px 7px 3px 6px; border-radius: 8px; background: rgba(7, 18, 51, .64); border: 1.5px solid rgba(7, 18, 51, .9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
#s-setup .hs-medals small { font-size: 12px; line-height: 1.15; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #c3d6f7; white-space: nowrap; }
#s-setup .hs-medals b { font: 700 12.5px/1.15 var(--num); color: #fff; white-space: nowrap; }
#s-setup .hs-tbtns { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding-bottom: 3px; }
#s-setup .hs-tbtns .ghost-btn { justify-content: flex-start; gap: 6px; height: 25px; padding: 0 10px 0 8px; font-size: 12.5px; border-radius: 10px; white-space: nowrap; }
#s-setup .hs-tbtns .ghost-btn svg { font-size: 15px; }
/* maat m (telefoons): kleinere letters, medailles als smal lijstje; Nieuwe baan / Code invoeren houden hun tekst */
#s-setup .hs-track:is([data-w="m"], [data-w="s"], [data-w="xs"]) .hs-tbtns .ghost-btn { gap: 4px; height: 25px; padding: 0 8px 0 6px; font-size: 12px; }
#s-setup .hs-track:is([data-w="m"], [data-w="s"], [data-w="xs"]) .hs-tbtns .ghost-btn svg { font-size: 13px; }
#s-setup .hs-track:is([data-w="m"], [data-w="s"]) .hs-medals { grid-template-columns: auto auto; align-items: center; gap: 0 6px; padding: 2px 7px; border-radius: 9px;
  background: rgba(7, 18, 51, .64); border: 1.5px solid rgba(7, 18, 51, .9); }
#s-setup .hs-track:is([data-w="m"], [data-w="s"]) .hs-medals div { display: contents; }
#s-setup .hs-track:is([data-w="m"], [data-w="s"]) .hs-medals small { display: flex; align-items: center; gap: 3px; font-size: 12px; letter-spacing: .06em; }
#s-setup .hs-track:is([data-w="m"], [data-w="s"]) .hs-medals small .medal { font-size: 10px; /* icoon, geen tekst */ }
#s-setup .hs-track:is([data-w="m"], [data-w="s"]) .hs-medals b { font-size: 12px; line-height: 1.22; }
#s-setup .hs-track[data-w="m"] .tc-code { font-size: 21px; }
#s-setup .hs-track[data-w="m"] .tc-biome { font-size: 13px; }
#s-setup .hs-track[data-w="m"] .tc-stats { font-size: 12px; }
/* maat s en xs (iPhones met safe areas, SE): kleinere baanlijn, letters en knoppen; bij xs geen medailles */
#s-setup .hs-track:is([data-w="s"], [data-w="xs"]) .hs-card { gap: 5px; }
#s-setup .hs-track:is([data-w="s"], [data-w="xs"]) .hs-map { width: 40px; height: 40px; }
#s-setup .hs-track:is([data-w="s"], [data-w="xs"]) .tc-code { font-size: 18px; letter-spacing: .06em; }
#s-setup .hs-track:is([data-w="s"], [data-w="xs"]) .hs-head { column-gap: 7px; }
#s-setup .hs-track:is([data-w="s"], [data-w="xs"]) .hs-tbtns .ghost-btn { gap: 3px; padding: 0 7px 0 5px; }
#s-setup .hs-track:is([data-w="s"], [data-w="xs"]) .hs-tbtns .ghost-btn svg { font-size: 12px; }
#s-setup .hs-track:is([data-w="s"], [data-w="xs"]) .tc-biome { font-size: 12px; letter-spacing: 0; }
#s-setup .hs-track:is([data-w="s"], [data-w="xs"]) .tc-stats { font-size: 12px; gap: 0 6px; }
/* bij s alleen het medaille-icoon en de tijd: de kleur is het label */
#s-setup .hs-track[data-w="s"] .hs-medals { column-gap: 0; padding: 2px 5px 2px 4px; }
#s-setup .hs-track[data-w="s"] .hs-medals small { font-size: 0; letter-spacing: 0; gap: 0; }
#s-setup .hs-track[data-w="s"] .hs-medals small .medal { font-size: 13px; margin-right: 3px; }
#s-setup .hs-track[data-w="xs"] .hs-medals { display: none; }
#s-setup .hs-track[data-w="xs"] .tc-code { font-size: 16px; letter-spacing: .04em; }
#s-setup .hs-track[data-w="xs"] .tc-biome { font-size: 12px; }
/* smaller dan de kleinste maat (smal venster): de sfeer dan onder de code in plaats van afgekapt */
#s-setup .hs-track[data-w="xs"] .hs-head { flex-wrap: wrap; }
/* Start: groot, glanzend, rechtsonder; de stippen zijn de spelers die meedoen */
#s-setup .hs-start { flex: none; width: clamp(150px, 24vw, 220px); margin: 0; padding: 4px 10px 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border-radius: 18px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -4px 0 rgba(140, 70, 0, .45), 0 6px 0 var(--cr-yel3), 0 6px 0 2px var(--cr-ink), 0 0 24px rgba(255, 190, 40, .5), 0 12px 20px rgba(0, 0, 0, .4); }
#s-setup .hs-go { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(25px, 3.5vw, 32px); line-height: 1; letter-spacing: .04em; }
#s-setup .hs-go svg { width: .82em; height: .82em; color: #fff; animation: hs-nudge 1.4s ease-in-out infinite; will-change: transform;
  filter: drop-shadow(0 2px 0 var(--cr-ink)) drop-shadow(0 -1px 0 var(--cr-ink)) drop-shadow(1px 0 0 var(--cr-ink)) drop-shadow(-1px 0 0 var(--cr-ink)); }
#s-setup .hs-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
#s-setup .hs-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); border: 2px solid var(--cr-ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55); }
@keyframes hs-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { #s-setup .hs-go svg, #s-setup .pl-row, #s-setup .pl-add { animation: none !important; } }

/* kleur- en autokiezer in dezelfde stijl */
#s-setup .color-pop { border-radius: 16px; border: 2px solid var(--cr-gold2); background: linear-gradient(180deg, #1c4bb0, #0b2259);
  box-shadow: 0 0 0 2px var(--cr-ink), inset 0 2px 0 rgba(255, 255, 255, .3), 0 14px 30px rgba(0, 0, 0, .55); }
#s-setup .color-pop > button { border-radius: 10px; border: 2px solid var(--cr-ink); color: rgba(7, 18, 51, .85);
  background: radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, .5), transparent 55%), var(--pc); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--cr-ink); }
#s-setup .color-pop > button.sel { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 0 0 3px #fff, 0 0 12px rgba(255, 255, 255, .7); }
#s-setup .color-pop .car-pop .cp-car { border: 2px solid var(--cr-ink); color: #fff; text-shadow: 0 1px 0 var(--cr-ink);
  background: linear-gradient(180deg, #2b5fc4, #1b4296 55%, #163781); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2); }
#s-setup .color-pop .car-pop .cp-car.sel { color: #fff; text-shadow: var(--cr-out); background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 0 10px rgba(255, 201, 40, .5); }
#s-setup .cp-car .side-car { width: 31px; height: 18px; }

/* grotere schermen: alles iets ruimer */
@media (min-height: 520px) and (min-width: 700px) {
  #s-setup .pl-grid { grid-auto-rows: 82px; }
  #s-setup .pl-grid[data-rows="1"] { grid-auto-rows: 136px; }
  #s-setup .setup-foot { height: 94px; }
  #s-setup .hs-map { width: 78px; height: 78px; }
  #s-setup .hs-info .tc-code { font-size: 27px; }
  #s-setup .pl-car { height: 25px; }
  #s-setup .side-car { width: 34px; height: 20px; }
  #s-setup .pl-row input { font-size: 17px; }
}
/* lage telefoons (iPhone dwars, 375 tot 390 hoog): iets lagere tegels zodat de crews nog in beeld staan */
@media (max-height: 400px) { #s-setup .pl-grid { grid-auto-rows: 60px; row-gap: 8px; padding-top: 9px; padding-bottom: 4px; } }
/* iPhone SE 1 (320 hoog): lagere tegels en een kortere vervaging, zodat ook de namen van de tweede tegelrij (3 tot 5
   spelers) helder in beeld staan; compact een smallere bovenrij en een kleiner nummer, het naamvak blijft even hoog */
@media (max-height: 340px) {
  #s-setup .panel-head { margin-bottom: 6px; }
  #s-setup .mode-line { font-size: 12px; }
  #s-setup .pl-grid { grid-auto-rows: 52px; row-gap: 6px; }
  #s-setup .pl-grid:not([data-rows="1"]) .pl-row { grid-template-rows: 18px minmax(0, 1fr); row-gap: 3px; padding-top: 3px; padding-bottom: 4px; }
  #s-setup .pl-grid:not([data-rows="1"]) .pl-col b { left: 2px; top: 2px; width: 22px; height: 22px; font-size: 12.5px; }
  #s-setup .pl-grid:not([data-rows="1"]) .pl-car { height: 18px; }
  #s-setup .pl-grid[data-rows="1"] { grid-auto-rows: 104px; }
  #s-setup .pl-grid[data-rows="1"] .pl-row { grid-template-rows: 22px minmax(0, 1fr) 28px; }
  #s-setup :is(.setup-col, .setup-grid).more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 16px), rgba(0, 0, 0, .25)); mask-image: linear-gradient(180deg, #000 calc(100% - 16px), rgba(0, 0, 0, .25)); }
}
/* iPhone SE dwars (667 x 375 en de eerste, 568 x 320): Start iets smaller voor de baankaart, smallere lengtekeuzes (op 667 in
   2 rijen; op 568 in 3, want 2 rijen vragen daar letters van 11 px; de rechterkolom scrolt dan naar Ghosts, met vervaging) */
@media (min-width: 521px) and (max-width: 700px) {
  #s-setup .hs-track { gap: 6px; padding-left: 5px; padding-right: 6px; }
  #s-setup .hs-start { width: 148px; }
  #s-setup .hs-go { font-size: 23px; }
  #s-setup .len-row .chip { padding-left: 6px; padding-right: 6px; }
  #s-setup .hs-opts .opt-row { margin-bottom: 5px; }
}
/* smal (portret of klein venster): één kolom, de onderbalk onder elkaar */
@media (max-width: 520px) {
  #s-setup .setup-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: max-content; align-content: start; overflow-y: auto; touch-action: pan-y; }
  #s-setup .setup-col { overflow: visible; }
  #s-setup .setup-foot { height: auto; flex-direction: column; }
  #s-setup .hs-track { min-height: 80px; }
  /* de kaart groeit hier mee, dus alle cijfers (ook op een derde of vierde regel) */
  #s-setup .hs-info .tc-stats { max-height: none; }
  #s-setup .hs-start { width: 100%; height: 64px; flex-direction: row; gap: 14px; }
}

/* ===== ronde 27: hud-rit ===== */
/* ---------- één Clash-chip voor de kleine HUD-vakjes: Tijdrit-klok, LIVE, melding, ondertitel, tank en pop-up. Blauw
   verloop, 2 px inkt, gouden haarlijn binnen de inkt, letters met een inktrand; roze-rood voor slecht nieuws. ---------- */
.ta-clock b, .spec-tag, .hud-msg, .subtitle, .hud .tank, .sp-box, .hs-sub, .hs-more {
  background: linear-gradient(180deg, #4f9dff 0%, #2f74e6 47%, #2160d2 53%, #163f96 100%);
  border: 2px solid var(--cr-ink); border-radius: 10px; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 90, .9), inset 0 2px 0 rgba(255, 255, 255, .35), 0 2px 0 var(--cr-ink);
  text-shadow: 0 1.5px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); }
.spec-tag, .hud-msg, .subtitle, .hs-sub, .hs-more { font-family: var(--display); font-weight: 400; letter-spacing: .02em; }
.hud-msg.warn, .ta-clock.red b, .ta-clock small {
  background: linear-gradient(180deg, #ff8aa8 0%, #f2466f 40%, #d0245a 60%, #a3123f 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 230, .85), inset 0 2px 0 rgba(255, 255, 255, .4), 0 2px 0 var(--cr-ink); }
/* Tijdrit-klok: recht (niet meer scheef), de cijfers met inktrand; LAATSTE RIT als kleine roze chip eronder */
.ta-clock b { transform: none; padding: 0 14px; border-radius: 12px; color: #fff; }
.ta-clock.red b { color: #fff; }
.ta-clock small { margin-top: 3px; padding: 1px 9px; border-radius: 7px; font-size: 12px; border: 2px solid var(--cr-ink); text-shadow: 0 1px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
/* LIVE-tag: de stip met een inktrand */
.spec-tag { border-radius: 999px; padding: 3px 14px; }
.spec-tag i { border: 1.5px solid var(--cr-ink); }
/* tank: chip met gouden jerrycan; de streep onderin blijft de meter */
.hud .tank { border-radius: 9px; overflow: hidden; }
.hud .tank b { text-shadow: 0 1.5px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
.hud .tank .tank-can { color: var(--cr-gold2); filter: drop-shadow(0 1px 0 var(--cr-ink)); }
.hud .tank .tank-bar { left: 2px; right: 2px; bottom: 1px; height: 3px; background: rgba(7, 18, 51, .7); }
/* ondertitel: iets ronder, regelhoogte voor de inktrand */
.subtitle { border-radius: 12px; line-height: 1.25; }
body[data-screen=hud] .subtitle { max-height: calc(2.5em + 10px); }
/* melding: icoon (waarschuwing of pijl), tekst max 2 regels (hud.js fitMsg zet plek en breedte) */
.hud-msg { border-radius: 11px; }

/* ---------- checkpoint- en finish-pop-up: chip met een korte flits bij verschijnen; het verschil als pil eronder ---------- */
.sp-box { border-radius: 10px; }
.sp-box::after { content: ''; position: absolute; inset: -2px; border-radius: 10px; background: #fff; opacity: 0; pointer-events: none; }
.split.show .sp-box::after { animation: cr-flash .3s ease-out both; }
.sp-delta { top: calc(100% + 2px); border: 2px solid var(--cr-ink); border-top: 0; border-radius: 0 0 9px 9px; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 var(--cr-ink); text-shadow: 0 1.5px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
.sp-ord { color: var(--cr-gold1); }
@keyframes cr-flash { 0% { opacity: .85; } 100% { opacity: 0; } }

/* ---------- pauze: tank als pil met jerrycan, info wit 85% ---------- */
#pause .pz-tank { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px 0 7px; border-radius: 999px; color: #fff;
  font-family: var(--num); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #4f9dff 0%, #2f74e6 47%, #2160d2 53%, #163f96 100%); border: 2px solid var(--cr-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 90, .9), inset 0 2px 0 rgba(255, 255, 255, .35); text-shadow: 0 1.5px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
#pause .pz-tank svg { width: 16px; height: 16px; color: var(--cr-gold2); filter: drop-shadow(0 1px 0 var(--cr-ink)); }
#pause .pz-tank.res { background: linear-gradient(180deg, #ff8aa8 0%, #f2466f 40%, #d0245a 60%, #a3123f 100%); font-family: var(--display); font-weight: 400; letter-spacing: .05em; }
#pause .pz-tank.res svg { color: #fff; }
#pause .pause-info { text-shadow: 0 1px 0 var(--cr-ink); }
/* opgeven en stoppen: rood gezicht (zelfde knop, andere kleur), zodat een kind niet per ongeluk stopt */
#pause .ghost-btn.danger { background: radial-gradient(70% 60% at 50% 118%, rgba(255, 190, 180, .45), transparent 70%), linear-gradient(180deg, #ff7a66 0%, #f04a36 45%, #d8301f 52%, #b51f12 100%);
  box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(90, 0, 0, .35), 0 5px 0 #7a0e06, 0 5px 0 2px var(--cr-ink); }
#pause .ghost-btn.danger:active { box-shadow: var(--cr-rim), inset 0 -2px 0 rgba(90, 0, 0, .35), 0 1px 0 #7a0e06, 0 1px 0 2px var(--cr-ink); }
@media (max-height: 419px) { #pause .big-btn { padding: 7px 16px 9px; } }
/* glimlijn op VERDER: een smalle laag die met transform door de knop schuift (compositor, geen repaints zoals een
   schuivend verloop). Hij blijft binnen de knop (rechterrand hooguit op 98,6%) en vervaagt aan de randen met opacity,
   dus de knop meet schoon (scrollWidth en scrollHeight gelijk aan de knop). */
#pause .big-btn::after { inset: 0 auto 0 0; width: 34%; transform: translateX(0); opacity: 0;
  background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, .5) 50%, transparent 85%);
  animation: cr-pz-shine 3.4s ease-in-out 1s infinite; }
@keyframes cr-pz-shine { 0%, 62% { transform: translateX(0); opacity: 0; } 68%, 94% { opacity: 1; } 100% { transform: translateX(190%); opacity: 0; } }

/* ---------- banners: elke medaille een eigen metalen bord met stralen in die kleur; goud en NIEUW RECORD houden het
   gouden bord. Links van de titel de munt (1,2 em). ---------- */
.banner[data-medal=silver] .bn-plate { background: linear-gradient(180deg, #ffffff 0%, #dfe6ef 30%, #c9d3df 48%, #aab6c5 54%, #8b97a8 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .9), inset 0 -4px 0 rgba(50, 60, 80, .35), 0 0 0 2px #56606f, 0 6px 0 2px var(--cr-ink), 0 0 40px rgba(220, 232, 255, .6); }
.banner[data-medal=bronze] .bn-plate { background: linear-gradient(180deg, #ffd2a8 0%, #eda46a 30%, #d9894a 48%, #b8692e 54%, #8a4a1f 100%);
  box-shadow: inset 0 3px 0 rgba(255, 240, 220, .8), inset 0 -4px 0 rgba(70, 30, 0, .4), 0 0 0 2px #5a2e10, 0 6px 0 2px var(--cr-ink), 0 0 40px rgba(255, 170, 100, .55); }
.banner[data-medal=author] .bn-plate { background: linear-gradient(180deg, #a8f7c8 0%, #5fe39a 30%, #2fd27a 48%, #1fae62 54%, #12804a 100%);
  box-shadow: inset 0 3px 0 rgba(235, 255, 240, .8), inset 0 -4px 0 rgba(0, 60, 30, .4), 0 0 0 2px #0b4d2c, 0 6px 0 2px var(--cr-ink), 0 0 40px rgba(80, 240, 150, .55); }
/* zilver is licht: de ondertekst in inkt met een witte glimrand (wit met een dunne inktrand las slecht op #c9d3df) */
.banner[data-medal=silver] span { color: var(--cr-ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .8); }
.banner[data-medal=silver].show::before { background: repeating-conic-gradient(from 0deg, rgba(225, 235, 250, .45) 0 7deg, transparent 7deg 20deg); }
.banner[data-medal=bronze].show::before { background: repeating-conic-gradient(from 0deg, rgba(255, 180, 120, .42) 0 7deg, transparent 7deg 20deg); }
.banner[data-medal=author].show::before { background: repeating-conic-gradient(from 0deg, rgba(120, 255, 170, .42) 0 7deg, transparent 7deg 20deg); }
.banner .bn-coin { position: relative; width: 1.2em; height: 1.2em; margin: 0 .28em 0 0; vertical-align: -.2em; }
/* een ster in de munt, zodat het een medaille is en geen bal */
.banner .bn-coin::after { content: '\2605\FE0E'; position: absolute; inset: 0; display: grid; place-items: center; font-size: .62em; line-height: 1; text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  color: rgba(110, 70, 0, .55); }
.banner .bn-coin.m-silver::after { color: rgba(60, 72, 95, .5); }
.banner .bn-coin.m-bronze::after { color: rgba(80, 34, 6, .55); }
.banner .bn-coin.m-author::after { color: rgba(0, 80, 36, .55); }
/* munten in de HUD (tabel, banner, pil, pop-up): metaal zoals de rijen, met een inktrand (vaste hex) */
:is(.hs-panel, .banner, .split) .medal { box-shadow: 0 0 0 .07em var(--cr-ink), inset 0 -.08em 0 rgba(0, 0, 0, .22); }
:is(.hs-panel, .banner, .split) .medal.m-gold { background: radial-gradient(circle at 35% 28%, #fff 0, rgba(255, 255, 255, 0) 38%), linear-gradient(160deg, #fff1a8, #ffc928 50%, #d68a0c); }
:is(.hs-panel, .banner, .split) .medal.m-silver { background: radial-gradient(circle at 35% 28%, #fff 0, rgba(255, 255, 255, 0) 38%), linear-gradient(160deg, #ffffff, #c9d3df 50%, #8b97a8); }
:is(.hs-panel, .banner, .split) .medal.m-bronze { background: radial-gradient(circle at 35% 28%, #fff 0, rgba(255, 255, 255, 0) 38%), linear-gradient(160deg, #ffd2a8, #d9894a 50%, #8a4a1f); }
:is(.hs-panel, .banner, .split) .medal.m-author { background: radial-gradient(circle at 35% 28%, #fff 0, rgba(255, 255, 255, 0) 38%), linear-gradient(160deg, #a8f7c8, #2fd27a 50%, #12804a); }

/* ---------- de tabel ---------- */
/* de witte laag alleen in het lege deel: geen halo meer om donkere namen op geel en goud */
.hs-row .r-n0 { clip-path: inset(0 0 0 calc(var(--f, 1) * 100%)); }
/* zwart en grijs: antraciet met witte haarlijn, anders leest de rij als leeg */
.hs-row.grey .r-fill { background: linear-gradient(180deg, #6a7385 0%, #3a414f 48%, #22262f 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85); }
.hs-row.drv.grey .r-time { background: linear-gradient(180deg, #6a7385, #3a414f 50%, #22262f); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85); color: #fff; }
/* het grijze autootje in het embleem viel weg op het blauw: een witte rand eromheen */
.hs-row.grey .r-ico svg { filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 .5px #fff); }
/* de rijder: witte ring om de rij en een gouden pijltje ervoor */
.hs-row.drv::after { content: ''; position: absolute; inset: -2px; border: 2px solid #fff; border-radius: 7px; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(7, 18, 51, .85), 0 0 8px rgba(255, 255, 255, .45); }
.hs-row.drv::before { content: '\25B6\FE0E'; position: absolute; left: -5px; top: 50%; transform: translateY(-52%); z-index: 1; font-size: max(10px, calc(var(--rh) * .62)); /* icoon, geen tekst */
  line-height: 1; color: var(--cr-gold2); text-shadow: 0 1px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); pointer-events: none; }
/* volgende medaille: Clash-pil onder de tabel met de munt ervoor */
.hs-sub { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; font-size: max(12px, calc(var(--rh) * .58)); line-height: 1.25; }
.hs-sub .medal { width: 1.3em; height: 1.3em; margin: 0; }
/* compacte tabel: '+3' op de plek van de ingeklapte rijen (hud.js layoutRows: 3 px lager dan een rij, schuift mee) */
.hs-more { position: absolute; left: 0; top: 0; height: calc(var(--rh) - 3px); display: flex; align-items: center; padding: 0 8px; border-radius: 7px; font-size: 12px; line-height: 1;
  transition: transform .22s ease-out; }

/* ---------- RESERVE: roze chip links naast de klok, klopt zacht (geen knipperen naar 35% meer). Wit op de chip (#d0245a in het
   midden) met een inktrand: contrast ruim boven 4,5:1. ---------- */
.tm-res { padding: .2em .55em .16em; border-radius: 8px; border: 2px solid var(--cr-ink);
  background: linear-gradient(180deg, #ff8aa8 0%, #f2466f 22%, #d0245a 52%, #b51a40 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 230, .7), inset 0 2px 0 rgba(255, 255, 255, .45), 0 2px 0 var(--cr-ink), 0 0 12px rgba(252, 83, 129, .55);
  text-shadow: 0 2px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1.5px 0 0 var(--cr-ink), -1.5px 0 0 var(--cr-ink); }
.hud.reserve.driving .tm-res { animation: cr-res-pulse .6s ease-in-out infinite alternate; }
@keyframes cr-res-pulse { from { transform: scale(1); } to { transform: scale(1.08); } }

/* ---------- einde beurt: Clash-lint in de spelerskleur (hud.js zet --pc-hi en --pc-lo als vaste hex) ---------- */
.bt-label { color: #fff; border: 3px solid var(--cr-ink); border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, .1) 46%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, var(--pc-hi, var(--bc)) 0%, var(--bc, #fff) 48%, var(--pc-lo, var(--bc)) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(0, 0, 0, .18), 0 5px 0 var(--cr-ink), 0 12px 24px rgba(0, 0, 0, .45);
  text-shadow: 0 3px 0 var(--cr-ink), 0 -2px 0 var(--cr-ink), 2px 0 0 var(--cr-ink), -2px 0 0 var(--cr-ink), 2px 2px 0 var(--cr-ink), -2px 2px 0 var(--cr-ink); }
.beat.gold .bt-label { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(0, 0, 0, .18), 0 0 0 3px var(--cr-gold2), 0 0 0 5px var(--cr-ink),
  0 7px 0 5px var(--cr-ink), 0 0 34px rgba(255, 200, 60, .65); }
/* de plek in een medaillon dat links over het lint hangt */
.bt-ord { display: grid; place-items: center; flex: none; width: calc(var(--bh) * 1.18); height: calc(var(--bh) * 1.18); margin-left: calc(var(--bh) * -.62);
  border-radius: 50%; border: 3px solid var(--cr-ink); font-size: .66em; font-weight: 400; color: #fff; letter-spacing: 0;
  background: radial-gradient(circle at 50% 26%, #fff6c2 0%, var(--cr-gold2) 46%, #f0a810 62%, var(--cr-gold3) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(140, 70, 0, .45), 0 3px 0 var(--cr-ink), 0 0 14px rgba(255, 200, 60, .55); }
.bt-ord.hidden { display: none; }
.beat.bad .bt-ord { background: radial-gradient(circle at 50% 26%, #8a95ad 0%, #4a5470 50%, #262d42 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 3px 0 var(--cr-ink); }
/* ondertekst (de laatste rijder, onder 'X wint de match!') */
.bt-sub { padding: 3px 12px; border-radius: 999px; font-family: var(--display); font-size: max(14px, calc(var(--H, 390px) * .036)); color: #fff;
  background: rgba(7, 18, 51, .82); border: 2px solid var(--cr-ink); box-shadow: inset 0 0 0 1px rgba(255, 214, 90, .7);
  text-shadow: 0 1.5px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
.bt-sub.hidden { display: none; }
/* goud (leider, gered, de winnaar): stralen achter het lint, draaien één keer een stukje (geen doorlopende animatie) */
.beat.gold.show::before { content: ''; position: absolute; left: 50%; top: var(--by, 50.5%); width: calc(var(--bh) * 9); height: calc(var(--bh) * 9);
  margin: calc(var(--bh) * -4.5) 0 0 calc(var(--bh) * -4.5); pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 110, .4) 0 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 12%, transparent 60%); mask: radial-gradient(circle, #000 12%, transparent 60%);
  animation: cr-beat-rays 3s ease-out both; }
@keyframes cr-beat-rays { 0% { opacity: 0; transform: scale(.5) rotate(0); } 15% { opacity: 1; } 100% { opacity: 1; transform: scale(1) rotate(50deg); } }
/* slecht nieuws: na de pop even schudden (translate, de pop gebruikt transform) */
.beat.bad.show .bt-label { animation: btpop .5s var(--ease-back) .07s both, cr-shake .42s ease-in-out .58s both; }
@keyframes cr-shake { 0%, 100% { translate: 0 0; } 20% { translate: -7px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 2px 0; } }

/* ---------- fotofinish: Clash-bord met een flits (de foto), het verschil in een gouden pil ---------- */
.photo .ph-plate { border: 3px solid var(--cr-ink); border-radius: 14px;
  background: radial-gradient(120% 70% at 50% 0%, rgba(140, 200, 255, .45), transparent 60%), linear-gradient(180deg, #4f9dff 0%, #2667e0 50%, #1a4fb8 51%, #163f96 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 0 0 3px var(--cr-gold2), 0 0 0 5px var(--cr-ink), 0 8px 0 5px var(--cr-ink), 0 16px 30px rgba(0, 0, 0, .45); }
.photo .ph-head { text-shadow: 0 4px 0 var(--cr-ink), 0 -2px 0 var(--cr-ink), 3px 0 0 var(--cr-ink), -3px 0 0 var(--cr-ink), 0 0 22px rgba(120, 190, 255, .7); }
.photo .ph-gap { padding: 1px 14px 2px; border-radius: 999px; border: 2px solid var(--cr-ink); color: #fff;
  background: linear-gradient(180deg, #fff1a8 0%, var(--cr-gold2) 46%, #f0a810 54%, var(--cr-gold3) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 2px 0 var(--cr-ink); text-shadow: 0 2px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); }
.photo .ph-gap:empty { display: none; }
.photo .ph-plate::after { content: ''; position: absolute; inset: -3px; border-radius: 14px; background: #fff; opacity: 0; pointer-events: none; }
.photo.frozen .ph-plate::after { animation: cr-flash .35s ease-out both; }
.photo.frozen::before { content: ''; position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; animation: cr-photo-flash .32s ease-out both; }
@keyframes cr-photo-flash { 0% { opacity: .55; } 100% { opacity: 0; } }

/* ---------- aanwijzing op een knop (checkpoint gemist, te traag, nog eens drukken): rode laag met glans in opacity ---------- */
.hud .hbtn.pulse::after, .hud #btn-restart.hint::after, .hud .hbtn.armed::after { content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: 12px; pointer-events: none;
  background: linear-gradient(180deg, #ff9a8a 0%, #fa3a3a 47%, #d61f1f 53%, #a10f0f 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 0 12px rgba(255, 60, 60, .7);
  animation: cr-cue .75s ease-in-out infinite alternate; }
.hud .hbtn.armed::after { animation-duration: .5s; }
@keyframes cr-cue { from { opacity: .12; } to { opacity: .95; } }

/* ---------- minikaart: groter (style.css), bijna dicht, baan met donkere omlijning, eigen auto groot met ring ---------- */
.hud .minimap { background: radial-gradient(circle at 50% 40%, rgba(40, 90, 200, .92), rgba(7, 18, 51, .94)); }
.minimap .mm-ol { stroke: rgba(7, 18, 51, .95); stroke-width: 8; }
/* eigen auto: groot met een witte ring, stil (geen doorlopende animatie in de HUD) */
#h-map-car { stroke: #fff; stroke-width: 2.4; }
.minimap .mm-flag .bg { fill: #fff; stroke: var(--cr-ink); stroke-width: .9; }
.minimap .mm-flag .pole { stroke: var(--cr-ink); stroke-width: 1.4; stroke-linecap: round; }
/* de blokjes: '.minimap path' (de baan: wit, 4,6 dik, geen vulling) mag hier niet gelden */
.minimap .mm-flag .chk { fill: var(--cr-ink); stroke: none; }

/* ---------- aanraakknoppen: labels 12 px met inktrand; REM en GAS een eigen icoon (index.html) ---------- */
/* pedaallabels in de smalle UI-letter: BRAKE · DRIFT past zo op 12,5 px in het gezicht van 88 px */
.hud .ctl-face b { font-family: var(--ui); font-weight: 700; font-size: 12.5px; letter-spacing: .03em; }
.hud [data-ctl=gas] .ctl-face .gas-ic { width: 26px; height: 26px; }
/* ?touch=clash (hud.js, optie voor Nick): dikke Clash-gezichten op ~75%, REM rood, GAS groen, sturen blauw met een witte
   chevron; ingedrukt kleiner en fel. Alleen het uiterlijk: maten (en dus de zones) blijven gelijk. */
html[data-touch=clash] .hud .ctl-face { opacity: .78; color: #fff; border: 3px solid var(--cr-ink) !important;
  text-shadow: 0 2px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(0, 0, 0, .22), 0 4px 0 var(--cr-ink);
  transition: scale .08s ease-out, opacity .08s, filter .08s; }
html[data-touch=clash] .hud .ctl-face svg { filter: drop-shadow(0 2px 0 var(--cr-ink)); }
html[data-touch=clash] .hud :is([data-ctl=left], [data-ctl=right]) .ctl-face { color: #fff; background: var(--cr-blue-face); }
html[data-touch=clash] .hud [data-ctl=brake] .ctl-face { color: #fff; background: radial-gradient(70% 60% at 50% 118%, rgba(255, 180, 170, .5), transparent 70%),
  linear-gradient(180deg, #ff8a7a 0%, #f2412e 45%, #d8261a 52%, #a8140f 100%); }
html[data-touch=clash] .hud [data-ctl=gas] .ctl-face { color: #fff; background: radial-gradient(70% 60% at 50% 118%, rgba(200, 255, 170, .5), transparent 70%),
  linear-gradient(180deg, var(--cr-grn1) 0%, #5fd83e 45%, var(--cr-grn2) 52%, var(--cr-grn3) 100%); }
html[data-touch=clash] .hud .ctl.on .ctl-face { opacity: 1; scale: .9; filter: brightness(1.22) saturate(1.15);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 1px 0 var(--cr-ink), 0 0 18px 4px rgba(255, 255, 255, .55); transition: none; }
html[data-touch=clash] .hud [data-ctl=brake].drift .ctl-face { color: #fff; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 0 0 3px #ffb000, 0 0 18px rgba(255, 176, 0, .7); }
html[data-touch=clash] body.tv .hud .ctl-face { opacity: .4; }

/* TURBO wijkt voor een melding of banner: meteen weg, zonder fade (hud.js cutTurbo) */
.tm-turbo.cut { transition: none; }

/* ---------- laag scherm (iPhone SE 1): klok kleiner en lager, het snelheidsgetal op de auto blijft vrij ---------- */
@media (max-height: 359px) {
  .tm-bottom { bottom: max(2px, calc(var(--sab) * .45 + 1px)); }
  .tm-time { font-size: 29px; }
  /* RESERVE kleiner en 3 px hoger: met de klop (1,08) en de inktrand eronder blijft de chip binnen de onderrand */
  .tm-res { font-size: 15px; top: calc(50% - 3px); }
}
@media (prefers-reduced-motion: reduce) {
  .hud.reserve.driving .tm-res, .beat.gold.show::before, .beat.bad.show .bt-label, .split.show .sp-box::after, .photo.frozen::before { animation: none !important; }
}

/* ===== ronde 28: rit-hud ===== */
/* Compacte hoek-HUD zoals Mario Kart World. Alleen uiterlijk: tikvlakken, zones en knopmaten (en dus de invoer) blijven
   gelijk. Animaties alleen met transform en opacity, geen blur. data-sky (hud.js): day, dusk of night. */

/* ---------- bovenbalk: een rond gezicht (--hf, 78% van de knophoogte) in het oude tikvlak. TERUGZETTEN en
   OPNIEUW tonen hun oude knop met label alleen als dat iets zegt: checkpoint gemist, te langzaam, opgeven, nog eens
   drukken of de eerste ritten tijdens het aftellen (.learn.counting). Hun eigen inhoud blijft in de opmaak (zelfde
   breedte in elke taal) en is anders onzichtbaar. ---------- */
.hud { --hf: calc(var(--hb, 44px) * .78); --hi: calc((var(--hb, 44px) - var(--hf)) / 2); --bst: 255, 178, 26; }
.hud .hbtn, .hud .hbtn:active, .hud .hbtn.on, .hud .hbtn.giveup { background: none; border-color: transparent; box-shadow: none; transform: none; }
.hud .hb-face { position: absolute; right: var(--hi); top: var(--hi); width: var(--hf); height: var(--hf); z-index: 0; display: grid; place-items: center;
  border-radius: 50%; border: 2px solid rgba(7, 18, 51, .95); pointer-events: none;
  background: linear-gradient(180deg, rgba(96, 166, 255, .9) 0%, rgba(47, 114, 230, .86) 48%, rgba(35, 97, 208, .86) 52%, rgba(22, 63, 150, .9) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 2px 0 rgba(7, 18, 51, .8); transition: transform .06s ease-out, opacity .16s ease-out; }
.hud .hb-face svg { width: 55%; height: 55%; color: #fff; filter: drop-shadow(0 1.5px 0 var(--cr-ink)); }
/* gelijke afstanden tussen de vier gezichten (bij 844 breed ~62 px hart op hart): TERUGZETTEN tegen de rechterrand van
   zijn vlak, OPNIEUW in het midden, camera tegen de linkerrand, pauze tegen de rechterrand */
.hud #btn-respawn > .hb-face, .hud #btn-pause > .hb-face { right: 0; }
.hud #btn-restart > .hb-face { right: calc(50% - var(--hf) / 2); }
.hud #btn-camera > .hb-face { right: auto; left: 0; }
.hud #btn-camera > svg { margin-left: calc(var(--hi) * -2); }
.hud #btn-pause > svg { margin-right: calc(var(--hi) * -2); }
.hud .hbtn > svg { position: relative; z-index: 1; transition: transform .06s ease-out, opacity .16s ease-out; }
.hud .hbtn:active .hb-face, .hud .hbtn.on .hb-face, .hud :is(#btn-camera, #btn-pause):active > svg { transform: translateY(2px) scale(.93); }
.hud :is(#btn-respawn, #btn-restart) > :not(.hb-face) { opacity: 0; transition: opacity .16s ease-out; }
.hud :is(#btn-respawn, #btn-restart)::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 12px; border: 2px solid rgba(7, 18, 51, .95);
  background: linear-gradient(180deg, rgba(90, 160, 255, .92) 0%, rgba(47, 114, 230, .9) 48%, rgba(35, 97, 208, .9) 52%, rgba(22, 63, 150, .92) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 rgba(7, 18, 51, .9);
  opacity: 0; transform: scaleX(.4); transform-origin: 100% 50%; transition: opacity .16s ease-out, transform .22s var(--ease-back); }
.hud #btn-restart.giveup::before { background: linear-gradient(180deg, #ff8aa8, #fc5381 50%, #d6285a); }
/* label aan: de oude knop terug, het gezicht weg */
:is(.hud #btn-respawn.pulse, .hud #btn-restart:is(.hint, .giveup, .armed), .hud.learn.counting :is(#btn-respawn, #btn-restart))::before { opacity: 1; transform: none; }
:is(.hud #btn-respawn.pulse, .hud #btn-restart:is(.hint, .giveup, .armed), .hud.learn.counting :is(#btn-respawn, #btn-restart)) > :not(.hb-face) { opacity: 1; }
:is(.hud #btn-respawn.pulse, .hud #btn-restart:is(.hint, .giveup, .armed), .hud.learn.counting :is(#btn-respawn, #btn-restart)) > .hb-face { opacity: 0; transform: scale(.6); }
/* avond en nacht: donker glas met een dunne gloedrand, zodat de lucht het beeld draagt */
.hud:is([data-sky=night], [data-sky=dusk]) .hb-face, .hud:is([data-sky=night], [data-sky=dusk]) #btn-respawn::before, .hud:is([data-sky=night], [data-sky=dusk]) #btn-restart::before {
  background: linear-gradient(180deg, rgba(46, 58, 124, .9) 0%, rgba(24, 31, 86, .88) 50%, rgba(12, 16, 52, .9) 100%);
  box-shadow: inset 0 0 0 1px rgba(150, 210, 255, .62), inset 0 2px 0 rgba(255, 255, 255, .22), 0 2px 0 rgba(4, 6, 20, .8); }
.hud[data-sky=dusk] .hb-face, .hud[data-sky=dusk] #btn-respawn::before, .hud[data-sky=dusk] #btn-restart::before {
  box-shadow: inset 0 0 0 1px rgba(255, 196, 130, .55), inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 rgba(20, 6, 20, .8); }
.hud[data-sky=night] .hb-face svg, .hud[data-sky=night] .hbtn > svg { color: #d8e8ff; }
.hud:is([data-sky=night], [data-sky=dusk]) #btn-restart.giveup::before { background: linear-gradient(180deg, #ff8aa8, #fc5381 50%, #d6285a); }
/* OPNIEUW is geen tweede blauw rondje: de startvlag op oranje ('s avonds en 's nachts een oranje binnenrand) */
.hud #btn-restart > .hb-face { background: linear-gradient(180deg, rgba(255, 196, 92, .95) 0%, rgba(255, 150, 30, .92) 48%, rgba(243, 126, 0, .92) 52%, rgba(190, 84, 0, .95) 100%); }
.hud #btn-restart > .hb-face svg { width: 58%; height: 58%; }
.hud:is([data-sky=night], [data-sky=dusk]) #btn-restart > .hb-face { box-shadow: inset 0 0 0 1.5px rgba(255, 168, 72, .85), inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 rgba(4, 6, 20, .8); }
.hud[data-sky=night] #btn-restart > .hb-face svg { color: #fff; }

/* ---------- minikaart: een kwart kleiner, een vast donker plaatje (~.8, de tribunes schemeren niet meer door de lijn) met
   een zachte binnengloed en een dunne rand (geen dikke goudrand) ---------- */
.hud .minimap { width: max(62px, calc(var(--hb, 44px) * 1.46)); height: max(62px, calc(var(--hb, 44px) * 1.46)); border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .26); background: radial-gradient(circle at 50% 38%, rgba(40, 80, 176, .8), rgba(12, 30, 84, .82) 62%, rgba(6, 14, 42, .86));
  box-shadow: inset 0 0 0 1px rgba(170, 205, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .16), 0 2px 0 rgba(7, 18, 51, .5); }
/* avond en nacht: hetzelfde vaste plaatje in de kleur van de lucht, met een lichte binnenrand */
.hud[data-sky=dusk] .minimap { background: radial-gradient(circle at 50% 38%, rgba(70, 42, 108, .8), rgba(34, 16, 56, .83) 62%, rgba(16, 7, 28, .87)); border-color: rgba(255, 210, 170, .45);
  box-shadow: inset 0 0 0 1px rgba(255, 226, 196, .2), 0 2px 0 rgba(20, 6, 20, .5); }
.hud[data-sky=night] .minimap { background: radial-gradient(circle at 50% 38%, rgba(30, 40, 100, .8), rgba(12, 16, 52, .83) 62%, rgba(4, 6, 24, .87)); border-color: rgba(160, 196, 255, .48);
  box-shadow: inset 0 0 0 1px rgba(200, 222, 255, .2), 0 2px 0 rgba(4, 6, 20, .5); }
.hud[data-sky=night] #h-map-path { stroke: rgba(222, 232, 255, .9); }

/* ---------- minikaart in de Live Race (graphics 2 nov, A9; hud.js mapExtras/updateGhostDots, svg.lr alleen op een
   rondecircuit): groter (~106 px op de telefoon, ~250 px op 1440x900) en dicht, zodat de bomen er niet door schemeren.
   Stippen 6 px met witte rand en een inktrand eromheen, als treintje op de baan (klein naast je pijl met een wit randje
   als het treintje vol is), eigen pijl in de rijrichting (groter), de leider met een gouden ring en de kroon daar vast
   op, voortgangsring per ronde langs de rand (goud, de laatste ronde rood, na de finish vol goud) en een geblokte
   finishstreep in plaats van het vlaggetje. ---------- */
body.lr-on .hud .minimap { --mm: min(max(calc(var(--hb, 44px) * 2.4), calc(var(--H, 390px) * .21)), 196px); width: var(--mm); height: var(--mm); border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, .5); background: radial-gradient(circle at 50% 38%, #2a5bc0, #10296e 62%, #071433);
  box-shadow: 0 0 0 2px var(--cr-ink), inset 0 1px 0 rgba(255, 255, 255, .22), 0 3px 0 rgba(7, 18, 51, .6); }
body.lr-on .hud[data-sky=dusk] .minimap { background: radial-gradient(circle at 50% 38%, #4c2f7a, #26123f 62%, #12061f); }
body.lr-on .hud[data-sky=night] .minimap { background: radial-gradient(circle at 50% 38%, #1f2c74, #0c1140 62%, #04061a); }
/* groot scherm: een grotere kaart (Mario Kart World), de tekens groeien mee (viewBox) */
@media (min-width: 1000px) and (min-height: 600px) { body.lr-on .hud .minimap { --mm: min(calc(var(--H, 900px) * .28), 260px); border-radius: 18px; } }
.minimap .mm-ring-bg { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 3.6; }
.minimap .mm-ring { fill: none; stroke: #ffd23f; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.minimap .mm-ring.final { stroke: #ff4a3d; }
.minimap .mm-ring.done { stroke: #ffd23f; stroke-width: 4.2; }
/* de ronde loopt vol over de baan: goud, de laatste ronde rood (hud.js updateMapRing); inkt rond de witte baan blijft */
.minimap .mm-trail { fill: none; stroke: #ffc414; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.minimap .mm-trail.final { stroke: #ff3b30; }
.minimap .mm-trail.done { stroke: #ffc414; }
.minimap .mm-line .ln-bg { fill: #fff; stroke: var(--cr-ink); stroke-width: 1.1; }
.minimap .mm-line .ln-chk { fill: var(--cr-ink); stroke: none; }
.minimap .mm-dot path { stroke-linejoin: round; stroke-linecap: round; }
/* buiten de Live Race het oude rondje (r 4, dunne witte rand) */
#h-map-ghosts .mm-dot { opacity: .9; }
.minimap .mm-dot .d-ol { display: none; }
.minimap.lr #h-map-path { stroke-width: 5.3; }
.minimap.lr .mm-ol { stroke-width: 9.3; }
.minimap .mm-dot .d-f { stroke: #fff; stroke-width: 1.2; }
.minimap .mm-me :is(.me-ol, .me-f) { display: none; }
.minimap.lr .mm-dot { opacity: 1; }
.minimap.lr .mm-dot .d-ol { display: inline; fill: var(--cr-ink); stroke: var(--cr-ink); stroke-width: 4.4; }
.minimap.lr .mm-dot .d-f { stroke-width: 2.3; paint-order: stroke; }
.minimap.lr .mm-dot .d-st { fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; }
.minimap.lr .mm-dot .d-st.d-in { fill: #fff; stroke: none; }
/* klein naast je pijl (het treintje rond je pijl was vol, hud.js spreadDots): kleur, inktrand en een wit randje erbuiten,
   zodat het teken los van je pijl en van de baan leest */
/* tweede rijder van een kleur: omgekeerd (hud.js mapTwin) */
.minimap.lr .mm-dot.twin .d-f { fill: #fff !important; stroke: var(--dc); }
.minimap.lr .mm-dot.twin .d-st { stroke: var(--dc) !important; }
.minimap.lr .mm-dot.twin .d-st.d-in { fill: var(--dc) !important; stroke: none !important; }
.minimap.lr .mm-dot.tuck .d-ol { fill: var(--cr-ink); stroke: #fff; stroke-width: 7.4; }
.minimap.lr .mm-dot.tuck .d-f { stroke: var(--cr-ink); stroke-width: 4.6; }
.minimap.lr .mm-me :is(.me-ol, .me-f) { display: inline; }
.minimap.lr .mm-me .me-ol { fill: var(--cr-ink); stroke: var(--cr-ink); stroke-width: 5; stroke-linejoin: round; }
.minimap.lr .mm-me .me-f { stroke: #fff; stroke-width: 2.6; stroke-linejoin: round; paint-order: stroke; }
.minimap.lr .mm-me #h-map-car { display: none; }
/* jij leidt: je pijl krijgt een gouden rand (de kroon staat erboven) */
.minimap.lr .mm-me.lead .me-f { stroke: #ffd23f; }
/* de leider (een ander): inkt onder zijn teken, een gouden ring en inkt eromheen; de kroon zit op de ring */
.minimap .mm-halo .h-ol { fill: var(--cr-ink); stroke: var(--cr-ink); stroke-width: 4.8; }
.minimap .mm-halo .h-in { fill: var(--cr-ink); stroke: #ffd23f; stroke-width: 2.4; }
.minimap .mm-crown { fill: #ffd23f; stroke: var(--cr-ink); stroke-width: 2.2; stroke-linejoin: round; paint-order: stroke; }
/* kleur plus teken per stoel (A6, scene/biomes.js seatStyle zet --mk en --pt per stoel): het teken als icoon in de
   standlijst (in plaats van het kartje) en het patroon in het kleurvlak, maar nooit achter de naam: de naam (.r-n1)
   krijgt een effen plaat in de rijkleur zo breed als de tekst, het patroon begint daarachter. Op de introkaart en in de
   eindstand het teken in plaats van het kleurvlakje. De plaat mag 6 px buiten de cel (die knipt): zo houdt een lange
   naam dezelfde breedte als zonder plaat (geen 'MIA_COMET · ...' waar 'MIA_COMET · L1' paste). */
.hs-row[data-k] .r-ico { position: relative; }
.hs-row[data-k] .r-ico > svg { visibility: hidden; }
.hs-row[data-k] .r-ico::before { content: ''; position: absolute; inset: 8%; background: var(--mk) center / contain no-repeat; }
/* rijdt-stip rechtsboven: het teken kleiner linksonder, de stip op de hoek erbuiten */
.hs-row.driving[data-k] .r-ico::before { inset: 26% 30% 0 0; }
.hs-row.driving[data-k] .r-ico::after { right: 0; top: 0; }
.hs-row[data-k] .r-fill::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--pt); }
.hs-row[data-k] .r-n1 { right: auto; width: fit-content; max-width: calc(100% + 6px); box-sizing: border-box; padding-right: 10px;
  background: linear-gradient(180deg, var(--pc-hi, var(--pc)) 0%, var(--pc) 48%, var(--pc-lo, var(--pc)) 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 7px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 7px), transparent); }
.seat-mk { background: var(--mk) center / contain no-repeat !important; border: 0 !important; border-radius: 0 !important; }
.intro-card .ic-players i.seat-mk { width: clamp(20px, 1.4em, 28px); height: clamp(20px, 1.4em, 28px); }
@media (min-width: 1000px) and (min-height: 600px) { .intro-card .ic-players i.seat-mk { width: 24px; height: 24px; } }
.st-name > i.seat-mk { width: clamp(24px, 2vw, 30px); height: clamp(24px, 2vw, 30px); flex: none; }
/* podium: het teken groot in de hoek van het blok, naast het blokcijfer leesbaar (ook op 1440x900) */
.pod .p-car.seat-mk { width: clamp(30px, 3vw, 44px); height: clamp(30px, 3vw, 44px); right: 6px; bottom: 6px; filter: drop-shadow(0 2px 0 rgba(7, 18, 51, .5)); }
.pod .p-car.seat-mk use { display: none; }

/* ---------- doelchip (oefenen): munt, doel met doeltijd plus het verschil bij het laatste checkpoint. De ladder staat alleen
   open bij een checkpoint (3 s, hud.js openLadder) en in de pauze. --gh = hoogte van de chip. ---------- */
.hs-panel.goal-on .hs-rows, .hs-panel.goal-on .hs-sub { display: none; }
.hs-panel.goal-on.open .hs-rows { display: block; margin-top: 6px; transform-origin: 0 0; animation: hg-open .22s var(--ease-back) both; }
@keyframes hg-open { from { opacity: 0; transform: translateY(-10px) scaleY(.5); } to { opacity: 1; transform: none; } }
.hs-goal { --gh: max(32px, calc(var(--H, 390px) * .085)); display: flex; width: max-content; align-items: center; gap: 6px; height: var(--gh);
  padding: 0 4px 0 3px; border-radius: 999px; color: #fff; border: 2px solid var(--cr-ink);
  background: linear-gradient(180deg, #4f9dff 0%, #2f74e6 47%, #2160d2 53%, #163f96 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 90, .9), inset 0 2px 0 rgba(255, 255, 255, .35), 0 2px 0 var(--cr-ink); }
.hs-goal.hidden { display: none; }
.hs-goal .hg-ic { display: grid; place-items: center; flex: none; width: calc(var(--gh) - 8px); height: calc(var(--gh) - 8px); font-size: calc(var(--gh) - 8px); }
.hs-goal .medal.hg-coin { position: relative; width: 1em; height: 1em; margin: 0; vertical-align: 0; }
.hs-goal .hg-car { width: 92%; height: 92%; filter: drop-shadow(0 1px 0 var(--cr-ink)) drop-shadow(0 0 1px var(--cr-ink)); }
.hs-goal .hg-txt { display: flex; flex-direction: column; justify-content: center; line-height: 1; padding: 2px 3px 0 0; }
.hs-goal small { font-family: var(--display); font-size: max(12px, calc(var(--gh) * .3)); letter-spacing: .06em; text-transform: uppercase; color: var(--cr-gold1);
  white-space: nowrap; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
.hs-goal[data-medal=silver] small { color: #eef3fa; }
.hs-goal[data-medal=bronze] small { color: #ffcfa3; }
.hs-goal[data-medal=author] small { color: #b4f9cf; }
.hs-goal b { margin-top: 2px; font-family: var(--tmnum); font-weight: 700; font-size: max(15px, calc(var(--gh) * .5)); letter-spacing: .01em; font-variant-numeric: tabular-nums;
  text-shadow: 0 1.5px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); }
.hs-goal .hg-d { display: none; align-items: center; height: calc(var(--gh) - 10px); padding: 0 .5em; border-radius: 999px; border: 2px solid var(--cr-ink);
  font-family: var(--tmnum); font-weight: 700; font-size: max(13px, calc(var(--gh) * .44)); letter-spacing: .01em; font-variant-numeric: tabular-nums;
  text-shadow: 0 1.5px 0 var(--cr-ink), 0 0 2px var(--cr-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.hs-goal .hg-d.on { display: flex; }
.hs-goal .hg-d.better { background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2) 52%, var(--cr-grn3)); }
.hs-goal .hg-d.worse { background: linear-gradient(180deg, #ff7a6a, #e8302e 52%, #a8140f); }
.hs-goal .hg-d.pop { animation: hg-pop .36s var(--ease-back) both; }
/* nieuw doel (bv. BRONS naar GOUD bij het eerste checkpoint): de munt draait in, de chip popt en een gouden ring slaat uit */
.hs-goal { position: relative; }
.hs-goal::after { content: ''; position: absolute; inset: -3px; border-radius: 999px; border: 3px solid #ffe066; pointer-events: none; opacity: 0;
  box-shadow: 0 0 10px rgba(255, 214, 70, .8), inset 0 0 8px rgba(255, 214, 70, .6); }
.hs-goal.swap { animation: hg-swap .42s var(--ease-back) both; transform-origin: 20% 50%; }
.hs-goal.swap::after { animation: hg-ring .7s ease-out both; }
.hs-goal.swap .hg-ic { animation: hg-flip .55s cubic-bezier(.2, .8, .25, 1) both; }
@keyframes hg-swap { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: none; } }
@keyframes hg-ring { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.28, 1.6); } }
@keyframes hg-flip { 0% { transform: perspective(160px) rotateY(-540deg) scale(.5); } 100% { transform: perspective(160px) rotateY(0) scale(1); } }
@keyframes hg-pop { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.18); } 100% { opacity: 1; transform: none; } }
/* sterretje in de munten van de chip en de pop-up (zoals de banner) */
:is(.hs-goal .hg-coin, .sp-delta .sp-coin)::after { content: '\2605\FE0E'; position: absolute; inset: 0; display: grid; place-items: center; font-size: .62em; line-height: 1;
  color: rgba(110, 70, 0, .55); text-shadow: 0 1px 0 rgba(255, 255, 255, .55); }
:is(.hs-goal, .sp-delta) .m-silver::after { color: rgba(60, 72, 95, .5); }
:is(.hs-goal, .sp-delta) .m-bronze::after { color: rgba(80, 34, 6, .55); }
:is(.hs-goal, .sp-delta) .m-author::after { color: rgba(0, 80, 36, .55); }
.hs-panel:is([data-sky=night], [data-sky=dusk]) .hs-goal { background: linear-gradient(180deg, rgba(46, 58, 124, .9) 0%, rgba(24, 31, 86, .88) 50%, rgba(12, 16, 52, .9) 100%);
  box-shadow: inset 0 0 0 1px rgba(130, 200, 255, .55), inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 var(--cr-ink); }
.hs-panel[data-sky=dusk] .hs-goal { box-shadow: inset 0 0 0 1px rgba(255, 196, 130, .6), inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 var(--cr-ink); }
/* tank en pop-up 's avonds en 's nachts ook donker glas */
.hud:is([data-sky=night], [data-sky=dusk]) :is(.tank, .sp-box) { background: linear-gradient(180deg, rgba(46, 58, 124, .9) 0%, rgba(24, 31, 86, .88) 50%, rgba(12, 16, 52, .9) 100%);
  box-shadow: inset 0 0 0 1px rgba(130, 200, 255, .55), inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 var(--cr-ink); }
.hud[data-sky=dusk] :is(.tank, .sp-box) { box-shadow: inset 0 0 0 1px rgba(255, 196, 130, .6), inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 0 var(--cr-ink); }
/* ladder bij een checkpoint: het verschil met elke medaille in het tijdvak, groen of rood */
.hs-panel.goal-on .hs-row .r-time.better { background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2) 52%, var(--cr-grn3)); }
.hs-panel.goal-on .hs-row .r-time.worse { background: linear-gradient(180deg, #ff7a6a, #e8302e 52%, #a8140f); }
/* pauze: de hele ladder onder de chip, links naast het pauzepaneel (alleen als daar ruimte is) */
@media (min-width: 830px) {
  body[data-screen=pause] .hs-panel.goal-on { display: block; --nw: clamp(84px, calc(50vw - 333px), 158px); --tw: 62px; }
  body[data-screen=pause] .hs-panel.goal-on .hs-rows { display: block; margin-top: 6px; }
}
/* munt in de verschilpil van de pop-up: metaal zoals in de tabel */
.sp-delta .sp-coin { position: relative; width: .92em; height: .92em; margin: 0 .3em 0 0; vertical-align: -.12em; font-size: 1em; }

/* ---------- Hot Seat: de ladder blijft (te verslaan: de tijd boven je), wel smaller ---------- */
body:not(.tv) .hs-panel:not(.practice) { --nw: clamp(96px, 13.5vw, 150px); --tw: max(64px, calc(var(--rh) * 3.4)); }
/* ---------- Live Race (QA 6 nov): online namen (tot 14 tekens) heel in de standlijst, ook op een breed scherm (daar stond
   'SILLY PENG...', 'NICO_LIGHT...'). Het naamvak groeit met de letter van de rij mee: de breedste echte naam is ~9,7 em
   in Russo One, plus de marge links (max(8px, 1vw)) en 6 px. Nooit smaller dan hierboven en nooit tot aan de klok
   midden bovenin (50vw min ~75 px, ook op een iPhone SE van 568 pt). ---------- */
body.lr-on:not(.tv) .hs-panel:not(.practice) {
  --nw: max(clamp(96px, 13.5vw, 150px), min(calc(max(12px, var(--rh) * .6) * 9.8 + max(8px, 1vw) + 6px), calc(50vw - 75px - var(--rh) - var(--tw)))); }

/* ---------- aanraakknoppen: alleen een pijl of icoon met een dunne rand op ~35%, ingedrukt fel en iets groter (scale; de
   zones van input.js blijven gelijk). REM · DRIFT met label alleen de eerste ritten (#controls.learn), daarna een rond
   gezicht zoals de stuurknoppen. ?touch=clash houdt zijn eigen gezichten. ---------- */
html:not([data-touch=clash]) .hud .ctl-face { color: rgba(255, 255, 255, .38); background: none; border: 1.5px solid rgba(255, 255, 255, .34);
  box-shadow: 0 0 0 1px rgba(7, 18, 51, .16), inset 0 0 0 1px rgba(7, 18, 51, .12); transition: scale .1s ease-out, color .1s, border-color .1s, background-color .1s; }
html:not([data-touch=clash]) .hud .ctl-face svg { filter: drop-shadow(0 1px 1px rgba(7, 18, 51, .5)); }
html:not([data-touch=clash]) .hud .ctl.on .ctl-face { color: #fff; border-color: rgba(255, 255, 255, .95); background: rgba(255, 255, 255, .14); transform: none; scale: 1.08;
  box-shadow: 0 0 0 1px rgba(7, 18, 51, .3), 0 0 14px rgba(255, 255, 255, .35); transition: none; }
html:not([data-touch=clash]) .hud [data-ctl=brake].drift .ctl-face { color: var(--cr-gold1); border-color: var(--cr-gold2); background: rgba(255, 190, 40, .18); }
html:not([data-touch=clash]) .hud #controls:not(.learn) [data-ctl=brake] .ctl-face { width: 64px; height: 64px; border-radius: 50%; }
html:not([data-touch=clash]) .hud #controls:not(.learn) [data-ctl=brake] .ctl-face b { display: none; }
html:not([data-touch=clash]) .hud #controls:not(.learn) [data-ctl=brake] .drift-ic { font-size: 26px; }
/* de eerste ritten (uitleg): REM · DRIFT op een donker plaatje met heldere tekst, ook op een lichte weg leesbaar */
html:not([data-touch=clash]) .hud #controls.learn [data-ctl=brake]:not(.on):not(.drift) .ctl-face { color: rgba(255, 255, 255, .95); border-color: rgba(255, 255, 255, .7);
  background: rgba(7, 18, 51, .5); box-shadow: 0 0 0 1px rgba(7, 18, 51, .35), 0 2px 0 rgba(7, 18, 51, .4); }
html:not([data-touch=clash]) .hud #controls.learn [data-ctl=brake] .ctl-face b { text-shadow: 0 1px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
@media (prefers-reduced-motion: reduce) { html:not([data-touch=clash]) .hud .ctl.on .ctl-face { scale: 1; } }

/* ---------- turbo: gloed onderaan en langs de zijkanten in de boostkleur (TURBO goud, SUPER TURBO roze), de klok gloeit
   kort en de streepjes kleuren mee. Oefenen heeft geen rode onderrand meer (die zei niets). ---------- */
.hud[data-boost="2"] { --bst: 255, 56, 140; }
.hud.practice .tm-glow { display: none; }
.tm-boost { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.tm-boost i { position: absolute; display: block; opacity: 0; transition: opacity .45s ease-out; }
.tm-boost .tb-b { left: 0; right: 0; bottom: 0; height: max(calc(var(--H, 390px) * .12), 34px);
  background: linear-gradient(0deg, rgba(var(--bst), .5) 0%, rgba(var(--bst), .18) 45%, rgba(var(--bst), 0) 100%); }
.tm-boost .tb-lf, .tm-boost .tb-rt { top: 0; bottom: 0; width: max(3.4vw, 20px); }
.tm-boost .tb-lf { left: 0; background: linear-gradient(90deg, rgba(var(--bst), .42), rgba(var(--bst), 0)); }
.tm-boost .tb-rt { right: 0; background: linear-gradient(270deg, rgba(var(--bst), .42), rgba(var(--bst), 0)); }
.hud[data-boost] .tm-boost i { opacity: 1; transition: opacity .1s ease-out; }
.hud:is(.photo-on, .beat-on, .spectate) .tm-boost { visibility: hidden; }
.tm-bottom::before { content: ''; position: absolute; left: -18%; right: -18%; top: -60%; bottom: -60%; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(var(--bst), .75), rgba(var(--bst), .28) 55%, rgba(var(--bst), 0)); }
.hud[data-boost] .tm-bottom::before { animation: hb-clock .9s ease-out both; }
.hud[data-boost] .tm-time { animation: hb-pop .34s var(--ease-back) both; }
.hud.has-drv[data-boost] .tm-sl i { background: rgb(var(--bst)); }
@keyframes hb-clock { 0% { opacity: 0; transform: scale(.7); } 18% { opacity: 1; transform: scale(1.06); } 100% { opacity: 0; transform: scale(1); } }
@keyframes hb-pop { 0% { transform: scale(1.18); } 100% { transform: none; } }

/* ---------- GO: korte schok door de knopgezichten, kaart, chip en klok (hud.js shock, alleen translate; de tikvlakken staan stil) ---------- */
.hud.shock :is(.hb-face, .tb-row > .hbtn > svg, .tb-row2), .hud.shock .tm-bottom, .hs-panel.shock { animation: hud-shock .34s ease-out; }
@keyframes hud-shock { 0% { translate: 0 0; } 15% { translate: 0 -5px; } 38% { translate: -3px 3px; } 60% { translate: 2px -2px; } 80% { translate: -1px 1px; } 100% { translate: 0 0; } }

/* ---------- FINISH! (oefenen, hud.js finishMoment): zoals het aftellen, goud met een geblokte vlag erachter ---------- */
.tm-count.fin { font-size: min(calc(var(--H, 390px) * .34), 12vw); --c1: #ffffff; --c2: #fff2a6; --c3: #ffcb2e; --c4: #c8730a; --cg: rgba(255, 205, 60, .6); }
.tm-count.fin.show:not(.out) .cn-num { animation: cn-fin .46s var(--ease-back) both; }
.tm-count.fin.show:not(.out) .cn-ring { animation: cn-ring-go .6s ease-out both; }
.tm-count.fin.show::before { content: ''; position: absolute; left: 0; top: 0; width: 2.4em; height: 2.4em; margin: -1.2em 0 0 -1.2em; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 110, .5) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 16%, transparent 62%); mask: radial-gradient(circle, #000 16%, transparent 62%); animation: cr-burst .7s ease-out forwards; }
.tm-count.fin::after { content: ''; position: absolute; left: 0; top: 0; width: 5.1em; height: .46em; margin: -.23em 0 0 -2.55em; z-index: -1; pointer-events: none;
  border: .028em solid var(--cr-ink); border-radius: .06em; box-shadow: 0 .04em 0 var(--cr-ink);
  background: repeating-conic-gradient(#ffffff 0 25%, #151a26 0 50%) 0 0 / .115em .115em; transform: skewX(-9deg) scaleX(0); }
.tm-count.fin.show::after { animation: fin-flag .42s cubic-bezier(.2, .9, .3, 1.15) .05s both; }
.tm-count.fin.out::after { opacity: 0; transition: opacity .17s ease-in; }
@keyframes cn-fin { 0% { opacity: .4; transform: translate(-50%, -50%) skewX(-9deg) scale(2.3); } 35% { opacity: 1; }
  65% { transform: translate(-50%, -50%) skewX(-9deg) scale(.93); } 100% { opacity: 1; transform: translate(-50%, -50%) skewX(-9deg) scale(1); } }
@keyframes fin-flag { from { transform: skewX(-9deg) scaleX(0); } to { transform: skewX(-9deg) scaleX(1); } }

/* ---------- medaille- of recordbanner na de finish (.res): een slank bord hoog in de lucht (de auto draagt het beeld),
   de munt draait in, eindtijd en verschil (groen) eronder; de klok onderin gaat weg (.fin-banner) ---------- */
.banner.res { top: calc(3% + var(--sat)); }
.banner.res .bn-plate { padding-top: 4px; padding-bottom: 5px; padding-left: clamp(18px, 2.8vw, 36px); padding-right: clamp(18px, 2.8vw, 36px); }
.banner.res .bn-plate > b { font-size: clamp(22px, 3.4vw, 36px); }
.banner.res .bn-plate > span:not(.bn-res) { font-size: clamp(12px, 1.6vw, 15px); margin-top: 1px; }
.banner .bn-res { display: flex; align-items: center; gap: .45em; margin-top: 2px; overflow: visible; max-width: none;
  font-family: var(--tmnum); font-weight: 700; font-size: clamp(14px, 1.9vw, 19px); line-height: 1.2; }
.banner .bn-res b { font: inherit; color: #fff; letter-spacing: .01em; font-variant-numeric: tabular-nums; transform: none; white-space: nowrap;
  text-shadow: 0 2px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1.5px 0 0 var(--cr-ink), -1.5px 0 0 var(--cr-ink); }
.banner .bn-res em { font-style: normal; padding: 0 .45em; border-radius: 999px; border: 2px solid var(--cr-ink); color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2) 52%, var(--cr-grn3)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 0 var(--cr-ink);
  text-shadow: 0 1.5px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
.banner.res .bn-coin { width: 1.3em; height: 1.3em; vertical-align: -.26em; }
.banner.res.show .bn-coin { animation: bn-coin-in .65s cubic-bezier(.2, .8, .25, 1) .05s both; }
@keyframes bn-coin-in { 0% { opacity: 0; transform: perspective(240px) rotateY(-900deg) scale(.2); } 55% { opacity: 1; transform: perspective(240px) rotateY(-70deg) scale(1.25); }
  100% { opacity: 1; transform: perspective(240px) rotateY(0) scale(1); } }
.hud .tm-bottom { transition: opacity .25s ease-out; }
.hud.fin-banner .tm-bottom { opacity: 0; }
/* lage telefoon (iPhone SE): het bord hoger en kleiner, zodat de auto er in de finishcamera ruim onder past */
@media (max-height: 340px) {
  .banner.res { top: calc(2% + var(--sat)); }
  .banner.res .bn-plate { padding-top: 3px; padding-bottom: 4px; }
  .banner.res .bn-plate > b { font-size: 24px; }
  .banner.res .bn-plate > .bn-res { font-size: 14px; margin-top: 1px; }
  .banner.res .bn-plate > span:not(.bn-res) { font-size: 12px; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-panel.goal-on.open .hs-rows, .hs-goal .hg-d.pop, .hud[data-boost] .tm-bottom::before, .hud[data-boost] .tm-time, .tm-count.fin.show .cn-num, .tm-count.fin.show .cn-ring,
  .tm-count.fin.show::before, .banner.res.show .bn-coin, .hs-goal.swap, .hs-goal.swap .hg-ic { animation: none !important; }
  .tm-count.fin.show::after { animation: none !important; transform: skewX(-9deg); }
}

/* ===== ronde 27: menu ===== */
/* Eindronde menu: alles tikbaar (doel 44, minstens 40 px), labels vanaf 12 px, niets onder de rand, één tab- en chipstijl.
   Alleen transform en opacity animeren; geen color-mix of :has (iOS 15). */

/* ---------- valuta en kleine iconen als eigen SVG ---------- */
.cur-ic { display: inline-block; width: 1.08em; height: 1.08em; flex: none; vertical-align: -.18em; margin-right: .22em; filter: drop-shadow(0 1px 0 rgba(7, 18, 51, .85)); }
.cur-ic.tr { color: var(--cr-gold2); }
.cur-ic.st { color: #ffd23f; }
.cur-ic.dm { color: #3fd0ff; }
.coin-amt { display: inline-flex; align-items: center; white-space: nowrap; }
.coin-amt .cur-ic { margin-right: .18em; vertical-align: 0; }
#s-home .wallet-chip { display: inline-flex; align-items: center; gap: 4px; }
#s-home .garage-btn .gb-pts .cur-ic { width: 18px; height: 18px; margin: 0; }
#s-home .menu-btn.arena-btn small .cur-ic { width: 1.15em; height: 1.15em; color: #ffe27a; }

/* ---------- hoofdmenu: rood nieuwsstipje op de Arena-knop (eigen element, de glansveeg zit al op ::after) ---------- */
#s-home .menu-btn .news-dot { display: none; position: absolute; z-index: 3; top: 6px; right: 8px; width: 18px; height: 18px; border-radius: 50%; pointer-events: none;
  border: 2.5px solid #fff; background: radial-gradient(circle at 34% 30%, #ffb0a8 0 16%, #ff3030 52%, #c40d0d 100%);
  box-shadow: 0 0 0 1.5px var(--cr-ink), 0 2px 0 1.5px var(--cr-ink), 0 0 10px rgba(255, 40, 40, .75); }
/* fase 3e herstel 1 (iPhone 12): drie kloppen en dan stil; een eindeloze animatie hield het menu elk beeldje bezig */
#s-home .menu-btn.has-news .news-dot { display: block; animation: news-pop .5s var(--ease-back) .55s both, news-beat 2s ease-in-out 1.4s 3; }
@keyframes news-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes news-beat { 0%, 72%, 100% { transform: scale(1); } 82% { transform: scale(1.25); } 92% { transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) { #s-home .menu-btn.has-news .news-dot { animation: none; } }

/* ---------- panelen: vaste kop, per kolom een eigen scrollgebied ---------- */
#ui .panel-screen .panel > .panel-head { position: sticky; top: 0; z-index: 3; }
#ui .panel-screen .panel-head .back { width: 40px; height: 40px; flex: none; font-size: 21px; }
/* tikvlak van de terugknop 48 x 48 (de knop zelf 40) */
#ui .panel-screen .panel-head .back::after { content: ''; position: absolute; inset: -5px; }
:is(#s-settings, #s-champ, #s-arena, #s-online) .panel { display: flex; flex-direction: column; overflow: hidden; }
:is(#s-settings, #s-champ, #s-arena, #s-online) .panel > * { flex: none; }
/* scrollgebieden: een beetje lucht rondom, zodat lippen en gloed niet afgeknipt worden */
#s-settings .set-body, #s-online .on-body { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  -webkit-overflow-scrolling: touch; margin: 0 -8px; padding: 2px 8px 8px; }
:is(#s-champ, #s-arena) :is(.cp-grid, .ar-grid) { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); }
:is(#s-champ, #s-arena) :is(.cp-col, .ar-col) { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 2px 6px 10px; }
#s-champ .cp-board .lb-list { max-height: none; overflow: visible; }
/* Arena rechts: tabbladen vast, de lijst scrolt */
#s-arena .ar-col:last-child { overflow: hidden; padding-bottom: 0; }
#s-arena .ar-col:last-child > .ar-tabs { flex: none; }
#s-arena .ar-col:last-child > .ar-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; margin: 0 -6px; padding: 2px 6px 10px; }
/* smal (één kolom): het raster scrolt als geheel */
@media (max-width: 720px) {
  #s-arena .ar-grid { overflow-y: auto; grid-template-rows: none; }
  #s-arena .ar-col, #s-arena .ar-col:last-child { overflow: visible; }
  #s-arena .ar-col:last-child > .ar-list { overflow: visible; }
}
@media (max-width: 599px) {
  #s-champ .cp-grid { overflow-y: auto; grid-template-rows: none; }
  #s-champ .cp-col { overflow: visible; }
}

/* ---------- segmentknoppen, chips en tabbladen: groot genoeg om te tikken ---------- */
:is(.panel-screen, #confirm) .seg button { min-height: 40px; min-width: 44px; padding: 6px 12px; font-size: 15px; }
.panel-screen .chip { min-height: 36px; }
#s-arena .ar-tabs .chip, #s-online .on-kind button { min-height: 40px; }
@media (max-width: 760px) {
  #s-arena .ar-tabs { gap: 4px; }
  #s-arena .ar-tabs .chip { padding: 6px 6px 7px; font-size: clamp(12px, 1.9vw, 14px); }
}

/* ---------- instellingen: icoon per rij, de pauze-noot in de rij zelf ---------- */
.set-lbl { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.set-lbl svg { width: 22px; height: 22px; flex: none; color: var(--cr-gold1); filter: drop-shadow(0 2px 0 var(--cr-ink)); }
.set-sub { color: #c3d6f7; font-size: 13px; font-weight: 700; text-shadow: 0 1px 0 var(--cr-ink); }
.set-sub.set-full { flex-basis: 100%; margin-top: -2px; }   /* regel onder de knoppen (Beeldkwaliteit: wat Auto koos) */
#s-settings .set-row { min-height: 52px; }
#confirm .sheet .set-row { color: #fff; text-shadow: 0 1px 0 var(--cr-ink); border-bottom-color: rgba(255, 255, 255, .12); }

/* ---------- dialogen: veer bij openen, icoon boven de titel, tekenteller, gouden selectie ---------- */
#confirm .confirm-box { animation: cr-pop-in .42s var(--ease-back) both; }
#confirm .confirm-box.wide { width: min(760px, 100%); }
#confirm .dlg-ic { display: grid; place-items: center; width: 46px; height: 46px; margin: -2px auto 8px; border-radius: 50%; font-size: 24px; color: #fff;
  border: 2px solid var(--cr-ink); background: radial-gradient(circle at 50% 30%, #8cc4ff, #2f74e6 60%, #1747a8);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--cr-ink), 0 0 14px rgba(61, 139, 255, .55); }
#confirm .dlg-ic svg { filter: drop-shadow(0 2px 0 var(--cr-ink)); }
#confirm .dlg-ic.danger { background: radial-gradient(circle at 50% 30%, #ffb3a8, #f23b28 60%, #b51a10); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--cr-ink), 0 0 14px rgba(242, 59, 40, .55); }
#confirm .dlg-ic + h3, #confirm .dlg-ic ~ p { text-align: center; }
#confirm .dlg-field { position: relative; }
#confirm .dlg-field .dlg-input { padding-right: 66px; }
#confirm .dlg-count { position: absolute; right: 12px; top: 4px; bottom: 14px; display: flex; align-items: center; pointer-events: none;
  font-size: 13px; font-weight: 700; color: #9fb8e6; }
#confirm .dlg-count.low { color: #ff8a80; }
#confirm .dlg-input::selection { background: var(--cr-gold2); color: var(--cr-ink); }
#confirm .row > :only-child { flex: 1 1 100%; }
@media (max-height: 430px) {
  #confirm .confirm-box > .dlg-field > .dlg-input { margin-top: 0; }
  #confirm .dlg-ic { width: 38px; height: 38px; font-size: 20px; margin-bottom: 4px; }
}

/* ---------- Online: lobby als kolom met een vaste voetbalk ---------- */
#s-online .online-panel .panel-head .ph-right { gap: 6px; }
#s-online .ghost-btn.sm { min-height: 40px; padding: 6px 12px; font-size: 14px; gap: 6px; }
#s-online .coin-pill { display: inline-flex; align-items: center; gap: 2px; min-height: 36px; font-size: 16px; }
#s-online .coin-pill .cur-ic { width: 22px; height: 22px; }
#s-online .on-foot { display: flex; align-items: center; gap: 12px; margin: 4px -6px -4px; padding: 10px 6px 8px; border-top: 2px solid rgba(255, 201, 40, .45); }
#s-online .on-foot .big-btn { flex: none; width: auto; min-width: clamp(200px, 32vw, 290px); margin: 0; padding: 11px 18px 13px; white-space: nowrap; }
#s-online .on-foot > .ghost-btn { flex: none; min-height: 46px; min-width: 120px; padding: 8px 16px; font-size: 16px; }
#s-online .on-foot > .ghost-btn.on-cancel { min-width: 160px; margin-left: auto; }
#s-online .on-sum { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 9px; color: #e3ecff; font-weight: 700; font-size: 14px; line-height: 1.22;
  text-shadow: 0 1px 0 var(--cr-ink); }
#s-online .on-sum span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#s-online .on-sum.end { justify-content: flex-end; }
#s-online .on-sum .spinner { width: 22px; height: 22px; }
#s-online .on-info { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #fff;
  border: 2px solid var(--cr-ink); background: var(--cr-blue-face); box-shadow: var(--cr-rim), 0 3px 0 var(--cr-ink); transition: transform .12s var(--cr-spring); }
#s-online .on-info::after { content: ''; position: absolute; inset: -4px; }
#s-online .on-info:active { transform: translateY(2px) scale(.94); }
#s-online .on-info svg { filter: drop-shadow(0 2px 0 var(--cr-ink)); }
/* Hot Seat | Tijdrit als dikke tabbladen */
#s-online .on-kind { display: flex; gap: 6px; margin: 0 0 10px; }
#s-online .on-kind button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#s-online .on-kind button svg { width: 22px; height: 22px; color: #fff; filter: drop-shadow(0 2px 0 var(--cr-ink)); }
/* modekaarten: dikke inktrand, blauwe bolle kaart, gekozen kaart goud met gloed */
#s-online .on-modes { gap: 8px; margin-bottom: 2px; }
#s-online .on-mode { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px; border-radius: 16px; color: #fff; text-align: left;
  border: 2px solid var(--cr-ink); background: var(--cr-blue-face);
  box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .35), 0 4px 0 #123a85, 0 4px 0 2px var(--cr-ink); transition: transform .14s var(--cr-spring); }
#s-online .on-mode.sel { border-color: var(--cr-ink); background: linear-gradient(180deg, var(--cr-gold1) 0%, var(--cr-gold2) 50%, #f0a810 51%, var(--cr-gold3) 100%);
  box-shadow: var(--cr-rim-gold), inset 0 -4px 0 rgba(140, 70, 0, .35), 0 4px 0 var(--cr-gold4), 0 4px 0 2px var(--cr-ink), 0 0 18px rgba(255, 201, 40, .65); transform: translateY(-2px); }
#s-online .on-mode:active { transform: translateY(3px) scale(.98); }
#s-online .om-ic { display: flex; flex: none; }
#s-online .om-ic svg { width: 28px; height: 28px; margin-left: -11px; filter: drop-shadow(0 2px 0 rgba(7, 18, 51, .55)); }
#s-online .om-ic svg:first-child { margin-left: 0; }
#s-online .om-txt { min-width: 0; display: flex; flex-direction: column; }
#s-online .on-mode b { font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.1; text-shadow: var(--cr-out); white-space: nowrap; }
#s-online .on-mode small { color: #dbe8ff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 0 var(--cr-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#s-online .on-mode.sel small { color: #fff7d6; }
#s-online .on-grid { gap: 14px; }
#s-online .on-grid.one { grid-template-columns: minmax(0, 1fr); }
#s-online .on-col { min-width: 0; }
#s-online .on-stakes { flex-wrap: nowrap; gap: 5px; }
#s-online .on-stakes .chip { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; padding: 6px 9px; white-space: nowrap; }
#s-online .on-stakes .cur-ic { width: 17px; height: 17px; }
#s-online .opt-lbl { color: #c3d6f7; font-weight: 800; font-size: 13px; text-shadow: 0 1px 0 var(--cr-ink); }
#s-online .on-room-btns { margin-top: 10px; }
#s-online .on-room-btns > .ghost-btn { flex: 1 1 auto; min-height: 44px; white-space: nowrap; font-size: 15px; gap: 6px; }
#s-online .on-topup { margin-top: 10px; width: 100%; }
#s-online .ta-hero { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 4px; border-radius: 16px; border: 2px solid var(--cr-ink);
  background: radial-gradient(120% 90% at 85% 0%, rgba(255, 220, 120, .35), transparent 55%), linear-gradient(180deg, #3b7fec, #183f9c);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(255, 201, 40, .55), 0 4px 0 rgba(7, 18, 51, .6); }
#s-online .ta-hero b { color: #fff; text-shadow: var(--cr-out); }
#s-online .ta-hero small { color: #dbe8ff; margin: 0; font-weight: 700; text-shadow: 0 1px 0 var(--cr-ink); }
#s-online .ta-hero .om-ic svg { width: 24px; height: 24px; margin-left: -9px; }
#s-online .ta-hero .om-ic svg:first-child { margin-left: 0; }
/* Live Race-tab (2 nov): dezelfde kaart, iets groter en warmer, zodat 'tot 12 vrienden · 3 rondes' meteen opvalt */
#s-online .ta-hero.lr-hero { padding: 14px 16px; background: radial-gradient(120% 110% at 90% 0%, rgba(255, 170, 60, .55), transparent 60%), linear-gradient(180deg, #3b7fec, #183f9c); }
#s-online .ta-hero.lr-hero b { font-size: clamp(19px, 2.6vw, 26px); }
/* 2 nov review: de kaart is zelf een knop (maakt de kamer tot 12), 12 helmpjes in twee rijen van 6 met een witte rand
   (blauw en zwart vielen weg op het blauw), Kamer maken · tot 12 met een gouden rand, de tab Live Race een gouden stip */
#s-online button.lr-hero { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .08s; }
#s-online button.lr-hero:active { transform: translateY(2px); }
#s-online button.lr-hero:focus-visible { outline: 3px solid var(--cr-gold2); outline-offset: 2px; }
#s-online .lr-hero .lr-helmets { flex: none; display: grid; grid-template-columns: repeat(6, 16px); grid-auto-rows: 18px; padding-right: 13px; }
#s-online .ta-hero.lr-hero .lr-helmets svg { width: 21px; height: 21px; margin: 0;
  filter: drop-shadow(0 0 .6px #fff) drop-shadow(0 0 .6px #fff) drop-shadow(0 1px 0 var(--cr-ink)); }
#s-online .ta-hero.lr-hero .lr-helmets svg:nth-child(n+7) { margin-left: 8px; }
#s-online .lr-hero .lr-hero-txt { flex: 1 1 auto; min-width: 0; }
#s-online .lr-hero .lr-hero-go { flex: none; width: 30px; height: 30px; padding: 5px; border-radius: 50%; color: var(--cr-ink);
  background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2)); border: 2px solid var(--cr-ink); box-shadow: 0 2px 0 var(--cr-ink); }
#s-online .on-room-btns > .ghost-btn.lr-create { border-color: var(--cr-gold2); box-shadow: 0 0 0 1px var(--cr-gold3), 0 3px 0 rgba(7, 18, 51, .55); }
#s-online .on-room-btns > .ghost-btn.lr-create svg { color: var(--cr-gold2); }
#s-online .on-kind button.lr-tab { position: relative; }
#s-online .on-kind button.lr-tab::after { content: ''; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cr-gold2); box-shadow: 0 0 0 1.5px var(--cr-ink); }
#s-online .on-kind button.lr-tab.sel::after { display: none; }
#s-online .on-foot .big-btn.lr-go { letter-spacing: .02em; }
@media (max-height: 340px) {
  #s-online .ta-hero.lr-hero { padding: 8px 12px; }
  #s-online .ta-hero.lr-hero small { font-size: 12px; }
  #s-online .lr-hero .lr-helmets { grid-template-columns: repeat(6, 14px); grid-auto-rows: 16px; padding-right: 11px; }
  #s-online .ta-hero.lr-hero .lr-helmets svg { width: 18px; height: 18px; }
  #s-online .ta-hero.lr-hero .lr-helmets svg:nth-child(n+7) { margin-left: 7px; }
}
#s-online .update-box h3 { color: var(--cr-gold1); }
/* kleine telefoons: smallere kaarten en chips, alles op één regel */
@media (max-width: 700px) {
  #s-online .on-mode { gap: 7px; padding: 6px 9px; min-height: 52px; }
  #s-online .on-mode small { display: none; }
  #s-online .on-mode b { font-size: 16px; }
  #s-online .om-ic svg { width: 22px; height: 22px; margin-left: -9px; }
  #s-online .on-stakes .chip { padding: 5px 5px; font-size: 13px; }
  #s-online .on-stakes .cur-ic { width: 14px; height: 14px; }
  #s-online .on-room-btns > .ghost-btn { font-size: 14px; padding-left: 8px; padding-right: 8px; }
  #s-online .on-foot .big-btn { min-width: 0; font-size: 19px; padding-left: 14px; padding-right: 14px; }
  #s-online .on-sum { font-size: 13px; }
}
@media (max-height: 340px) {
  #s-online .on-kind { margin-bottom: 7px; }
  #s-online .on-mode { min-height: 46px; }
  #s-online .on-foot { padding-top: 7px; padding-bottom: 6px; }
  #s-online .on-foot .big-btn { padding-top: 8px; padding-bottom: 10px; font-size: 18px; }
}

/* ---------- Online: wachtrij en privékamer met plekken ---------- */
#s-online .on-wait-top { display: flex; align-items: center; gap: 14px; margin: 4px 2px 12px; }
#s-online .on-wait-top .spinner { width: 40px; height: 40px; border-width: 5px; border-color: rgba(7, 18, 51, .7); border-top-color: var(--cr-gold2); }
#s-online .on-wait-txt { min-width: 0; }
#s-online .on-wait-txt b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(19px, 3vw, 24px); line-height: 1.15; color: #fff; text-shadow: var(--cr-out); }
#s-online .on-wait-txt small { display: block; margin-top: 2px; color: #d6e6ff; font-weight: 700; font-size: 13.5px; text-shadow: 0 1px 0 var(--cr-ink); }
/* aftellen naar de bots: ronde gouden balk die leegloopt */
.on-ring { position: relative; flex: none; width: 62px; height: 62px; }
.on-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.on-ring circle { fill: none; }
.on-ring .bg { stroke: rgba(7, 18, 51, .8); stroke-width: 9; }
.on-ring .fg { stroke: var(--cr-gold2); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100 100; animation: on-ring var(--dur, 10s) linear var(--del, 0s) both; }
.on-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 21px; font-weight: 700; color: #fff; text-shadow: var(--cr-out); }
@keyframes on-ring { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 100; } }
.on-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; padding: 6px 0 4px; }
.on-slot { width: 86px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.os-dot { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--cr-ink);
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .7) 0 12%, rgba(255, 255, 255, 0) 40%), var(--pc);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .25), 0 4px 0 var(--cr-ink), 0 0 16px rgba(255, 255, 255, .18); animation: hs-pop .4s var(--ease-back) both; }
.os-dot b { font: 400 26px/1 var(--display); color: #fff; text-shadow: var(--cr-out); }
.os-dot > svg { width: 34px; height: 34px; color: #fff; }
.os-host { position: absolute; top: -13px; left: 50%; width: 24px; height: 24px; margin-left: -12px; color: var(--cr-gold2);
  filter: drop-shadow(0 0 1px var(--cr-ink)) drop-shadow(0 0 1px var(--cr-ink)) drop-shadow(0 2px 0 var(--cr-ink)); }
.os-name { max-width: 100%; padding: 2px 9px 3px; border-radius: 999px; border: 2px solid var(--cr-ink); background: rgba(7, 18, 51, .82); color: #fff;
  font-weight: 800; font-size: 13px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 var(--cr-ink); }
.on-slot.me .os-name { background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3)); text-shadow: var(--cr-out); }
.on-slot.open .os-dot { border: 3px dashed rgba(255, 255, 255, .6); background: rgba(120, 175, 255, .12); box-shadow: none; animation: os-pulse 1.6s ease-in-out infinite; }
.on-slot.open .os-dot b { color: rgba(255, 255, 255, .78); }
.on-slot.open .os-name { border-color: transparent; background: none; color: #a8c4f0; }
@keyframes os-pulse { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.07); opacity: 1; } }
/* privékamer: de kamercode groot in de displayletter met een kopieericoon */
#s-online .on-room { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin: 2px 0 12px; }
#s-online .on-code { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 6px 52px 9px 16px; border-radius: 16px; color: #fff; text-align: left;
  border: 2px solid var(--cr-ink); background: linear-gradient(180deg, rgba(7, 18, 51, .92), rgba(7, 18, 51, .72));
  box-shadow: 0 0 0 2px var(--cr-gold2), inset 0 2px 0 rgba(255, 255, 255, .14), 0 5px 0 2px var(--cr-ink), 0 0 20px rgba(255, 201, 40, .3); transition: transform .12s var(--cr-spring); }
#s-online .on-code:active { transform: translateY(3px) scale(.98); }
#s-online .on-code small { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink); }
#s-online .on-code b { font: 400 clamp(30px, 5.2vw, 44px)/1.05 var(--display); letter-spacing: .14em; color: #fff; text-shadow: var(--cr-out), 0 0 18px rgba(255, 201, 40, .45); }
#s-online .on-code svg { position: absolute; right: 14px; top: 50%; width: 26px; height: 26px; margin-top: -13px; color: var(--cr-gold1); filter: drop-shadow(0 2px 0 var(--cr-ink)); }
#s-online .on-room-info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
#s-online .on-tags { display: flex; flex-wrap: wrap; gap: 6px; }
#s-online .on-tags .ar-chip { font-size: 14px; }
#s-online .on-tags .cur-ic { width: 16px; height: 16px; }
/* Start uitgeschakeld: ontkleurd blauw met wat er nog nodig is (niet grijsbruin) */
#s-online .on-foot .big-btn.on-go { margin-left: auto; }
#s-online .on-foot .big-btn.wait:disabled { opacity: 1; filter: none; color: #e6eeff; font-size: clamp(15px, 2.2vw, 19px);
  background: linear-gradient(180deg, #7d91bd 0%, #5b6f9c 50%, #4d6190 51%, #3e5180 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(10, 20, 60, .3), 0 5px 0 #2b3a63, 0 5px 0 2px var(--cr-ink); }
@media (max-width: 700px) {
  .on-slot { width: 66px; }
  .os-dot { width: 46px; height: 46px; }
  .os-dot b { font-size: 21px; }
  .os-dot > svg { width: 27px; height: 27px; }
  .os-name { font-size: 12px; padding: 1px 6px 2px; }
  #s-online .on-code { padding: 4px 46px 7px 12px; }
  .on-ring { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .on-slot.open .os-dot, .os-dot, .on-ring .fg { animation: none !important; } }

/* ---------- Online Hot Seat-tussenstand: Clash-paneel zoals het eindpaneel ---------- */
#s-turn { background: radial-gradient(ellipse at 50% 45%, rgba(20, 50, 130, .5), rgba(3, 8, 24, .84) 75%); }
#s-turn .turn-card { width: min(720px, 100%); }
.tb-panel { --rp: max(calc(var(--H, 390px) * .078), 26px); display: flex; flex-direction: column; min-height: 0; max-height: 100%; border: 3px solid var(--cr-gold2); border-radius: 16px;
  overflow: hidden; box-shadow: 0 0 0 3px var(--cr-ink), 0 0 40px rgba(255, 200, 60, .3), 0 20px 50px rgba(0, 0, 0, .55); animation: cr-pop-in .42s var(--ease-back) both; }
.tb-panel > * { flex: none; }
#s-turn .tb-head { padding: 6px 16px 5px; }
#s-turn .tb-head small { font-family: var(--num); letter-spacing: .14em; }
/* lint in de kleur van de rijder (vaste tinten uit online.js, geen color-mix) */
#s-turn .tb-banner { height: auto; min-height: max(calc(var(--H, 390px) * .1), 36px); padding: 4px 16px; font-size: clamp(17px, 3.3vw, 26px); line-height: 1.1;
  background: linear-gradient(180deg, var(--pc-hi) 0%, var(--pc) 48%, var(--pc-lo) 100%); }
#s-turn .tb-banner span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#s-turn .tb-grid { flex: 0 1 auto; min-height: 0; overflow-y: auto; display: grid; gap: 6px 14px; padding: 10px 14px; touch-action: pan-y;
  background: radial-gradient(120% 80% at 50% 0%, rgba(120, 180, 255, .3), transparent 60%), linear-gradient(180deg, #1c4bb0, #0b2259); }
#s-turn .tb-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 4), auto); }
#s-turn .tb-cell { gap: 8px; padding: 3px 8px 3px 3px; border-radius: 11px; border: 2px solid rgba(7, 18, 51, .85);
  background: linear-gradient(180deg, rgba(120, 175, 255, .22), rgba(20, 60, 160, .3)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 3px 0 rgba(7, 18, 51, .55); }
#s-turn .tb-cell.me { border-color: var(--cr-gold3); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 0 0 2px var(--cr-gold2), 0 0 14px rgba(255, 201, 40, .4); }
#s-turn .tb-cell.out { opacity: .6; }
#s-turn .ep-rank { flex: none; }
#s-turn .ep-name { position: relative; flex: 1 1 auto; min-width: 0; text-align: left; padding: 0 9px; color: #fff; text-shadow: 0 1px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink);
  background: linear-gradient(180deg, var(--pc-hi) 0%, var(--pc) 50%, var(--pc-lo) 100%); }
#s-turn .tb-fuel { position: absolute; left: 4px; right: 4px; bottom: 2px; height: 3px; border-radius: 2px; transform-origin: 0 50%; background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 1px rgba(7, 18, 51, .55); }
#s-turn .ep-time { display: flex; align-items: center; color: #fff; font-size: max(calc(var(--rp) * .58), 15px); }
#s-turn .ep-time .medal { font-size: .8em; }
.tb-tag { flex: none; padding: 2px 6px; border-radius: 6px; border: 1.5px solid var(--cr-ink); font-size: 12px; font-weight: 800; letter-spacing: .06em; line-height: 1.1;
  color: #fff; background: #2b5fc4; text-shadow: 0 1px 0 var(--cr-ink); }
.tb-tag.lead { background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3)); }
.tb-tag.next { background: linear-gradient(180deg, var(--cr-grn1), var(--cr-grn2)); }
.tb-tag.out, .tb-tag.left { background: linear-gradient(180deg, #ff7a66, #d22414); }
.tb-tag.dry { background: #6a7fa8; }
.tb-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 12px 10px; background: linear-gradient(180deg, #0b2259, #071233); border-top: 2px solid var(--cr-ink); }
.tb-next { display: inline-flex; align-items: center; gap: 8px; padding: 3px 14px 3px 4px; border-radius: 999px; border: 2px solid var(--cr-ink);
  background: linear-gradient(180deg, var(--cr-gold1) 0%, var(--cr-gold2) 50%, #f0a810 51%, var(--cr-gold3) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 0 var(--cr-gold4), 0 3px 0 2px var(--cr-ink), 0 0 16px rgba(255, 201, 40, .5); }
.tb-next.gold { padding-left: 14px; }
.tb-next small { padding: 2px 9px; border-radius: 999px; background: var(--cr-ink); color: var(--cr-gold1); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.tb-next b { font: 400 18px/1.2 var(--display); color: #fff; text-shadow: var(--cr-out); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-soon { color: #d6e6ff; font-weight: 700; font-size: 13px; text-shadow: 0 1px 0 var(--cr-ink); }
@media (max-height: 340px) { .tb-panel { --rp: 24px; } #s-turn .tb-grid { padding: 7px 10px; gap: 4px 10px; } }
@media (prefers-reduced-motion: reduce) { .tb-panel { animation: none; } }

/* ---------- Champions: grote baankaart, lege ranglijst, medailles ---------- */
#s-champ .cp-track.big { padding: 0; overflow: hidden; border-radius: 16px; border: 2px solid var(--cr-ink); background: linear-gradient(180deg, #3b7fec 0%, #2659c6 48%, #183f9c 100%);
  box-shadow: inset 0 -3px 0 rgba(7, 18, 51, .35), 0 0 0 1px rgba(255, 201, 40, .55), 0 4px 0 rgba(7, 18, 51, .65); }
#s-champ .cp-track .tc-pv { height: clamp(78px, 22vh, 118px); }
#s-champ .cp-track .tc-pv .pr-map { left: 18px; top: 12px; width: calc(100% - 36px); height: calc(100% - 24px); }
#s-champ .cp-track .tc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; padding: 7px 12px 0; }
#s-champ .cp-track .tc-title { font: 400 clamp(19px, 2.6vw, 24px)/1.1 var(--display); letter-spacing: .02em; color: #fff; text-shadow: var(--cr-out); }
#s-champ .cp-track .tc-code { font: 700 12px/1.2 var(--num); letter-spacing: .16em; color: #b9d3ff; text-shadow: 0 1px 0 var(--cr-ink); }
#s-champ .cp-track .tc-stats { padding: 2px 12px 0; gap: 0 10px; color: #dbe8ff; font-size: 13px; text-shadow: 0 1px 0 var(--cr-ink); }
#s-champ .cp-track .tc-medals { margin: 8px 10px 10px; gap: 5px; }
#s-champ .cp-track .tc-medals div { border-radius: 10px; background: rgba(7, 18, 51, .62); border: 1.5px solid rgba(7, 18, 51, .9); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); padding: 4px 7px; }
#s-champ .tc-medals small { display: flex; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #fff; text-shadow: var(--cr-out); }
#s-champ .tc-medals b { font-size: 14px; color: #fff; text-shadow: 0 1px 0 var(--cr-ink); }
/* jouw beste tijd en Race even hoog, met dezelfde lip */
#s-champ .cp-act { align-items: stretch; margin-bottom: 6px; }
#s-champ .cp-you { border-radius: 14px; border: 2px solid var(--cr-ink); background: linear-gradient(180deg, rgba(7, 18, 51, .8), rgba(7, 18, 51, .6));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(255, 201, 40, .5), 0 5px 0 var(--cr-ink); color: #fff; }
#s-champ .cp-you small { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink); }
#s-champ .cp-gh { min-height: 44px; border-radius: 12px; border: 2px solid rgba(7, 18, 51, .85); color: #fff; text-shadow: 0 1px 0 var(--cr-ink);
  background: linear-gradient(180deg, rgba(120, 175, 255, .22), rgba(20, 60, 160, .3)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 3px 0 rgba(7, 18, 51, .55); }
#s-champ .cp-gh.sel { border-color: var(--gc); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 0 0 2px var(--gc), 0 3px 0 rgba(7, 18, 51, .55); }
#s-champ .cp-chl { width: 44px; border-radius: 12px; border: 2px solid rgba(7, 18, 51, .85); background: rgba(120, 175, 255, .2); }
#s-champ .cp-rw-list div { border-radius: 10px; background: rgba(7, 18, 51, .5); color: #fff; }
#s-champ .cp-rw-list .cur-ic { width: 15px; height: 15px; }
@media (max-width: 700px) { #s-champ .cp-track .tc-medals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* lege ranglijst (Champions en Arena): podium met een autootje en een uitnodiging */
.panel-screen .board-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 4px; padding: 16px 12px 18px; text-align: center; border-radius: 16px;
  border: 2.5px dashed rgba(255, 255, 255, .32); background: radial-gradient(90% 70% at 50% 30%, rgba(255, 220, 120, .16), rgba(120, 175, 255, .08)); }
.board-empty .be-pod { width: min(210px, 80%); height: auto; overflow: visible; margin-bottom: 4px; }
.board-empty .be-pod rect { stroke: var(--cr-ink); stroke-width: 2.5; }
.board-empty .be-pod .p1 { fill: var(--cr-gold2); }
.board-empty .be-pod .p2 { fill: #c5cedb; }
.board-empty .be-pod .p3 { fill: #d0844a; }
.board-empty .be-pod text { font: 400 20px var(--display); fill: #fff; text-anchor: middle; stroke: var(--cr-ink); stroke-width: 3px; paint-order: stroke; }
.board-empty .be-pod use { color: #fff; animation: cr-bob 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.board-empty b { font: 400 18px/1.2 var(--display); color: #fff; text-shadow: var(--cr-out); }
.board-empty small { color: #c3d6f7; font-weight: 700; font-size: 13px; text-shadow: 0 1px 0 var(--cr-ink); }

/* ---------- Arena: trofeeënpad in sfeerkleuren, gouden JIJ, top 3 ---------- */
#s-arena .ar-road { display: flex; flex-direction: column; gap: 4px; }
#s-arena .ar-road .ar-tile { color: #fff; font-family: var(--display); font-size: 20px; text-shadow: var(--cr-out); filter: none; border-color: var(--cr-ink);
  background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%), var(--ac);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--cr-ink); }
#s-arena .ar-road .ar-row.locked { opacity: .68; }
#s-arena .ar-road .ar-row.locked .ar-tile { filter: saturate(.45) brightness(.85); }
#s-arena .ar-you { flex: none; padding: 3px 10px 4px; border-radius: 999px; border: 2px solid var(--cr-ink); color: #fff; font: 400 14px/1 var(--display); letter-spacing: .1em;
  text-shadow: var(--cr-out); background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3)); box-shadow: 0 2px 0 var(--cr-ink), 0 0 12px rgba(255, 201, 40, .6);
  animation: cr-bob 2.4s ease-in-out infinite; }
#s-arena .ar-rw { display: inline-flex; align-items: center; flex: none; font-family: var(--display); font-size: 15px; color: #fff; text-shadow: 0 2px 0 var(--cr-ink); white-space: nowrap; }
#s-arena .ar-rw.got { opacity: .6; }
#s-arena .ar-row:is(.top1, .top2, .top3) .ar-ri { color: #fff; font-family: var(--display); text-shadow: var(--cr-out); }
#s-arena .ar-row.top1 .ar-ri { background: radial-gradient(circle at 50% 30%, #fff6c2, var(--cr-gold2) 50%, var(--cr-gold3)); }
#s-arena .ar-row.top2 .ar-ri { background: radial-gradient(circle at 50% 30%, #fff, #c5cedb 50%, #6c788b); }
#s-arena .ar-row.top3 .ar-ri { background: radial-gradient(circle at 50% 30%, #ffd9b3, #d0844a 50%, #7c461f); }
#s-arena .ar-trn { display: inline-flex; align-items: center; flex: none; font-weight: 700; }
#s-arena .ar-tr { display: flex; align-items: center; }
#s-arena .ar-tr .cur-ic { width: .9em; height: .9em; margin-right: .2em; }
#s-arena .ar-chip { gap: 2px; }
#s-arena .ar-chip .cur-ic { width: 19px; height: 19px; }
#s-arena .ar-claim .cur-ic, #s-arena .ar-qr .cur-ic { width: 15px; height: 15px; vertical-align: -.2em; }
@media (prefers-reduced-motion: reduce) { #s-arena .ar-you, .board-empty .be-pod use { animation: none; } }
/* garage: compacte autokaart (naam, x-factor en upgrades, geen groot plaatje) */
.ar-car.compact { padding: 10px 12px; }
.ar-car.compact .ar-cn { justify-content: flex-start; align-items: baseline; gap: 10px; margin: 0 0 4px; }
.ar-car.compact .ar-cn small { flex: none; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink); }
.ar-car.compact .ar-cn b { min-width: 0; font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-car.compact .ar-rt { margin-left: auto; }
.ar-car.compact .ar-part { padding: 5px 0; }
.ar-car.compact .note { margin-top: 4px; }

/* ---------- Hot Seat-opzet: knopjes, kleine schermen, autokiezer ---------- */
/* baanknoppen 32 px (tikvlak 44 met ::after), de onderbalk een paar px hoger zodat ze erin passen */
#s-setup .setup-foot { height: 76px; }
#s-setup .hs-track { padding-top: 4px; padding-bottom: 4px; }
#s-setup .hs-tbtns { gap: 4px; padding-bottom: 2px; }
#s-setup .hs-tbtns .ghost-btn, #s-setup .hs-track:is([data-w="m"], [data-w="s"], [data-w="xs"]) .hs-tbtns .ghost-btn { height: 32px; font-size: 13px; }
#s-setup .hs-tbtns .ghost-btn::after { content: ''; position: absolute; inset: -6px -3px; }
#s-setup .len-row .chip, #s-setup .hs-opts .chip { min-height: 36px; }
#s-setup #ghost-seg button { min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
#s-setup .nc-chip { min-height: 36px; padding: 4px 11px; font-size: 14px; }
#s-setup .pl-del { width: 30px; height: 30px; top: -10px; right: -10px; }
#s-setup .pl-del::after { top: -7px; right: -7px; bottom: -2px; left: -2px; }
#s-setup .pl-car::after { inset: -8px -2px; }
/* medailles op de baankaart: alleen het medaille-icoon met de tijd (de kleur is het label) */
#s-setup .hs-track[data-w] .hs-medals small { font-size: 0; letter-spacing: 0; gap: 0; }
#s-setup .hs-track[data-w] .hs-medals small .medal { font-size: 13px; margin-right: 4px; }
#s-setup .hs-track[data-w] .hs-medals b { font-size: 12.5px; }
#s-setup .hs-track:not([data-w="m"]):not([data-w="s"]) .hs-medals div { flex-direction: row; align-items: center; }
/* scroll-pijl onderin een kolom waar nog meer onder staat (in plaats van alleen een vervaging) */
#s-setup .setup-col.more { -webkit-mask-image: none; mask-image: none; }
#s-setup .setup-col.more::after { content: ''; position: sticky; bottom: 2px; z-index: 2; display: block; width: 26px; height: 26px; margin: -26px 0 0 auto; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--cr-ink); box-shadow: 0 2px 0 var(--cr-ink), 0 0 12px rgba(255, 201, 40, .6);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23071233' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat,
    linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3));
  animation: pr-hop-down 1.4s ease-in-out infinite; }
@keyframes pr-hop-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
/* autokiezer: kleine blauwe Clash-knop naar de garage */
#s-setup .color-pop .car-pop .cp-garage { width: auto; height: auto; min-height: 36px; justify-content: flex-start; padding: 5px 12px; font-size: 14px; gap: 7px; color: #fff; }
#s-setup .color-pop .car-pop .cp-garage svg { width: 22px; height: 22px; }
/* lage telefoons (iPhone SE 1): de modusregel staat ook in 'Zo werkt het'; Ghosts boven de lengte en
   Geavanceerd vervangt de lengterij, zodat er niets half onder de rand verdwijnt */
@media (max-height: 400px) {
  #s-setup .hs-opts { display: flex; flex-direction: column; }
  #s-setup .hs-opts > .opt-row:not(.len-row) { order: -1; margin-bottom: 6px; }
  #s-setup #tank-chips.adv-open > .chip:not(.adv) { display: none; }
  #s-setup #tank-chips.adv-open .adv-row { display: contents; }
}
@media (max-height: 360px) {
  #s-setup .mode-line { display: none; }
}
@media (prefers-reduced-motion: reduce) { #s-setup .setup-col.more::after { animation: none; } }

/* ---------- oefenen: kleine kop op lage telefoons, klif-badge, knopjes en labels ---------- */
#s-practice .pr-code { font-size: 12px; line-height: 14px; }
#s-practice .pr-top .pr-elev.on b { font-size: 12px; }
#s-practice .pr-top .pr-elev.on svg.pr-cliff { width: 18px; height: 15px; margin-left: 3px; }
#s-practice .pr-hs { width: 36px; height: 36px; top: 4px; right: 4px; font-size: 21px; color: #fff; background: rgba(7, 18, 51, .62); border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 2px 0 rgba(7, 18, 51, .6); }
#s-practice .pr-hs::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; }
#s-practice .pr-hs svg { filter: drop-shadow(0 1px 0 var(--cr-ink)); }
@media (max-height: 380px) {
  #ui #s-practice .panel > .panel-head { position: relative; padding-top: 4px; padding-bottom: 4px; }
  #s-practice .panel-head h2 { font-size: 26px; }
  #s-practice .pr-camp { position: absolute; z-index: 4; top: 15px; left: 218px; right: 22px; margin: 0; gap: 8px; }
  #s-practice .pr-camp h3.pr-head { font-size: 12px; }
}
/* lobby passend op 844 x 390: kop van de privékamer met de tankkeuze op één regel, compacte opties, vervaging als hint */
#s-online .on-body.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), rgba(0, 0, 0, .3)); mask-image: linear-gradient(180deg, #000 calc(100% - 22px), rgba(0, 0, 0, .3)); }
#s-online .on-kind { margin-bottom: 8px; }
#s-online .on-mode { min-height: 52px; }
#s-online .on-h { flex-wrap: nowrap; margin-bottom: 4px; }
#s-online .on-h h3 { margin: 0; }
#s-online .on-h .chips { flex-wrap: nowrap; align-items: center; }
#s-online .opt-ic { width: 22px; height: 22px; margin-right: 2px; color: var(--cr-gold1); filter: drop-shadow(0 2px 0 var(--cr-ink)); }
#s-online .opt-row { margin-bottom: 5px; }
#s-online .opt-lbl { display: inline-flex; align-items: center; gap: 6px; }
#s-online .opt-lbl svg { width: 20px; height: 20px; color: var(--cr-gold1); filter: drop-shadow(0 2px 0 var(--cr-ink)); }
#s-online .chip { min-width: 38px; }
#s-online .on-room-btns { margin-top: 8px; }
#s-turn .ep-name { line-height: calc(var(--rp) * .78 - 4px); }
/* kolommen: kaarten krimpen niet (overflow hidden geeft een flex-kind anders hoogte 0) */
#s-champ .cp-col > *, #s-arena .ar-col:first-child > * { flex-shrink: 0; }
/* kleine labels en knoppen in de opzet en de instellingen */
#s-setup .nc-lbl { font-size: 12px; }
#s-setup .chip small { font-size: 12px; }
.panel-screen .set-btns .ghost-btn { min-height: 40px; }
/* privékamer: code links, plekken rechts (past ook op 568 x 320 zonder scrollen) */
#s-online .on-roomgrid { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 18px; min-height: 100%; }
#s-online .on-roomgrid .on-slots { padding: 14px 0 4px; }
#s-online .on-code .oc-sub { margin-top: 3px; display: inline-flex; align-items: center; gap: 4px; color: #d6e6ff; font-weight: 700; font-size: 13px; text-shadow: 0 1px 0 var(--cr-ink); }
#s-online .on-code .oc-sub .cur-ic { width: 15px; height: 15px; }
#s-online .on-foot > #on-share { min-width: 0; }
@media (max-width: 700px) { #s-online .on-foot > .ghost-btn { min-width: 0; padding: 8px 12px; font-size: 15px; } }
/* smal: kolommen schuiven onder elkaar en mogen niet krimpen (het raster scrolt) */
@media (max-width: 720px) { #s-arena .ar-col { min-height: auto; } }
@media (max-width: 599px) { #s-champ .cp-col { min-height: auto; } #s-champ .cp-act { order: -1; } }
/* Champions links: alleen kaart, ghosts en prijzen scrollen; jouw tijd en Race staan als vaste voet altijd in beeld
   (op 844 x 390 viel Race eerst onder de rand) */
#s-champ .cp-main { overflow: hidden; padding-bottom: 9px; }
#s-champ .cp-main > .cp-scroll { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; margin: -2px -6px 0; padding: 2px 6px 6px; }
#s-champ .cp-scroll > * { flex-shrink: 0; }
#s-champ .cp-scroll.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), rgba(0, 0, 0, .3)); mask-image: linear-gradient(180deg, #000 calc(100% - 22px), rgba(0, 0, 0, .3)); }
#s-champ .cp-main > .cp-act { margin-bottom: 0; }
@media (max-width: 599px) {
  #s-champ .cp-main, #s-champ .cp-main > .cp-scroll { overflow: visible; }
  #s-champ .cp-scroll.more { -webkit-mask-image: none; mask-image: none; }
}
/* lage telefoons: lagere baanpreview, zodat de eerste rij medailles boven de voet past */
@media (max-height: 430px) { #s-champ .cp-track .tc-pv { height: clamp(60px, 16.5vh, 78px); } }
/* lage telefoons: Ghosts boven de lengte, kop en knoppen onder elkaar, labels passen; de pijl alleen rechts
   (links staat alleen nog Crews onder de rand, daar is de vervaging genoeg) */
@media (max-height: 360px) {
  #s-setup .hs-opts > .opt-row:not(.len-row) { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 3px; }
  #s-setup .hs-opts > .opt-row:not(.len-row) .seg { width: 100%; flex-wrap: wrap; }
  #s-setup .hs-opts > .opt-row:not(.len-row) .seg button { flex: 1 1 auto; min-width: 40px; padding: 3px 6px; font-size: 12.5px; }
}
#s-setup .hs-players.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 30px), rgba(0, 0, 0, .2)); mask-image: linear-gradient(180deg, #000 calc(100% - 30px), rgba(0, 0, 0, .2)); }
#s-setup .hs-players.more::after { display: none; }
/* tussenstand op een smalle telefoon: JIJ en LEIDER weg (gouden rand en plek 1 zeggen het al), de naam krijgt de ruimte */
@media (max-width: 700px) {
  .tb-tag:not(.next):not(.out):not(.left):not(.dry) { display: none; }
  .tb-tag { font-size: 12px; padding: 1px 5px; }
}
/* online op lage telefoons: compacter, zodat er meer van de opties in beeld staat */
@media (max-height: 360px) {
  #s-online .on-kind button { min-height: 38px; padding-top: 5px; padding-bottom: 6px; }
  #s-online .on-mode { min-height: 44px; }
  #s-online .on-body h3 { margin-top: 0; }
  .on-slot { width: 62px; }
  .os-dot { width: 44px; height: 44px; }
  #s-online .on-code b { font-size: 30px; }
}
#s-setup .setup-col.more::after { flex: none; }
/* plekken: alleen een nieuw gevulde plek springt erin; de puls loopt door over de renders heen (--ph) */
.os-dot { animation: none; }
.on-slot.new .os-dot { animation: hs-pop .4s var(--ease-back) both; }
.on-slot.open .os-dot { animation-delay: var(--ph, 0s); }
@media (max-width: 700px) { #s-online .on-room-btns > .ghost-btn { font-size: 13.5px; padding-left: 7px; padding-right: 7px; gap: 4px; } }
/* Champions: medailles altijd 2 x 2 (past ook met notch-randen van 47 px) */
#s-champ .cp-track .tc-medals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Arena-tabs: letter en ruimte naar de echte breedte zonder de notch-randen (geen container queries op iOS 15) */
#s-arena .ar-tabs .chip { font-size: clamp(12px, calc((100vw - var(--sal) - var(--sar)) * .0172), 15px);
  padding-left: clamp(4px, calc((100vw - var(--sal) - var(--sar)) * .0085 - 1px), 8px); padding-right: clamp(4px, calc((100vw - var(--sal) - var(--sar)) * .0085 - 1px), 8px); }
/* Ghosts op lage schermen: één rij als het past */
@media (max-height: 400px) {
  #s-setup #ghost-seg { flex-wrap: nowrap; max-width: 100%; }
  #s-setup #ghost-seg button { font-size: 13px; padding: 4px 8px; white-space: nowrap; }
}
@media (max-height: 360px) { #s-setup #ghost-seg { flex-wrap: wrap; } #s-setup #ghost-seg button { font-size: 12.5px; padding: 3px 6px; } }
#s-arena .ar-claim { min-height: 40px; }
/* ---------- na de review: tussenstand, Online op lage telefoons, Arena-teller, hostkroon ---------- */
/* tussenstand: baancode leesbaar, naamplaatje 12 px met ruimte boven het tankbalkje */
#s-turn .tb-head small { font-size: 12px; }
#s-turn .tb-cell { --nh: max(calc(var(--rp) * .78), 21px); }
#s-turn .ep-rank { height: var(--nh); }
#s-turn .ep-name { height: var(--nh); line-height: calc(var(--nh) - 8px); font-size: max(calc(var(--rp) * .4), 12px); }
/* tankmeter: donkere goot over de hele breedte, de witte vulling erin (een kort balkje las als een liggend streepje voor de naam) */
#s-turn .tb-fuel { bottom: 1px; z-index: 1; }
#s-turn .ep-name.fu::before { content: ''; position: absolute; left: 4px; right: 4px; bottom: 1px; height: 3px; border-radius: 2px; background: rgba(7, 18, 51, .5); }
/* twee kolommen (5 tot 8 rijders): tijd begrensd, naam minstens 30 % breed, LEIDER en JIJ weg (gouden rand en plek 1 zeggen het al) */
#s-turn .tb-grid.two .ep-time { font-size: clamp(15px, calc(var(--rp) * .58), 22px); }
#s-turn .tb-grid.two .ep-name { min-width: 30%; }
#s-turn .tb-grid.two .tb-tag:not(.next):not(.out):not(.left):not(.dry) { display: none; }
/* groot scherm (iPad): rijen niet groter dan 44 px en een breder paneel, zodat 8 namen heel blijven */
@media (min-height: 565px) { #s-turn .tb-grid.two { --rp: 44px; } }
@media (min-width: 900px) and (min-height: 565px) { #s-turn .turn-card { width: min(860px, 100%); } }
/* tags (VOLGENDE, ERUIT) altijd 12 px */
#s-turn .tb-tag { font-size: 12px; }
/* smalle telefoon met twee kolommen: tags en tussenruimte iets krapper, zodat 'Bot Zoe' naast VOLGENDE heel blijft */
@media (max-width: 700px) {
  #s-turn .tb-grid.two .tb-cell { gap: 6px; padding-right: 7px; }
  #s-turn .tb-grid.two .tb-tag { padding: 1px 4px; letter-spacing: .02em; }
}

/* Online: rijen chips die niet naast hun label passen (online.js zet .tight) krijgen alleen het icoon als label */
#s-online .opt-row.tight { flex-wrap: nowrap; gap: 8px; }
#s-online .opt-row.tight .opt-lbl { flex: none; font-size: 0; gap: 0; }
#s-online .opt-row.tight .chips { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; }
#s-online .opt-row.tight .chip { flex: 1 1 0; min-width: 0; max-width: 54px; padding-left: 2px; padding-right: 2px; }
/* lage telefoons: iets minder lucht, zodat de opties van de privékamer in beeld komen */
@media (max-height: 400px) {
  #s-online .on-kind { margin-bottom: 6px; }
  #s-online .on-grid { margin-top: 6px; }
  #s-online .on-mode { min-height: 48px; }
  #s-online .opt-row { margin-bottom: 4px; }
  #s-online .on-room-btns { margin-top: 6px; }
}
/* 667 x 375: Kamer maken en Meedoen met code van Tijdrit heel in beeld (scheelde 12 px) */
@media (max-height: 380px) {
  #s-online .on-kind { margin-bottom: 4px; }
  #s-online .on-grid { margin-top: 3px; }
  #s-online .on-col > h3 { margin-top: 0; margin-bottom: 4px; }
  #s-online .on-room-btns { margin-top: 5px; }
  #s-online .on-foot { padding-top: 7px; }
}
/* 568 x 320: kop, modekaarten en Snel spelen compacter, zodat de inzetrij heel in beeld staat */
@media (max-height: 340px) {
  #s-online .online-panel > .panel-head { margin-bottom: 6px; padding-top: 4px; padding-bottom: 4px; }
  #s-online .on-mode { min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
  #s-online .om-ic svg, #s-online .ta-hero .om-ic svg { width: 19px; height: 19px; margin-left: -8px; }
  #s-online .om-ic svg:first-child, #s-online .ta-hero .om-ic svg:first-child { margin-left: 0; }
  #s-online .ta-hero { padding: 4px 10px; gap: 8px; }
  #s-online .ta-hero b { font-size: 16px; line-height: 1.15; }
  #s-online .ta-hero small { font-size: 12px; margin-bottom: 0; }
  #s-online .on-body h3 { margin-bottom: 5px; }
}

/* lage telefoons, twee kolommen: medailles op één regel als ze alle vier passen (champions.js zet .line)
   en een compactere voet, zodat er meer van de baankaart boven Race staat */
@media (max-height: 430px) and (min-width: 600px) {
  #s-champ .cp-track .tc-medals { margin-top: 6px; }
  #s-champ .cp-track .tc-medals.line div { flex-direction: row; align-items: baseline; justify-content: space-between; column-gap: 6px; padding: 4px 8px; }
  #s-champ .cp-you { padding-top: 6px; padding-bottom: 6px; row-gap: 2px; line-height: 1.2; }
  #s-champ .cp-you .num { font-size: 18px; }
}
/* Online: scrollhint met de gouden pijl uit de opzet, als lipje op de scheidslijn boven de voetbalk (op 568 x 320 staat de
   privékamer helemaal onder de rand en liet de vervaging niets zien; binnen het scrollvak viel de pijl over een inzetchip) */
#s-online .on-body.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 8px), rgba(0, 0, 0, .15)); mask-image: linear-gradient(180deg, #000 calc(100% - 8px), rgba(0, 0, 0, .15)); }
#s-online .on-foot { position: relative; }
#s-online .on-body.more + .on-foot::before { content: ''; position: absolute; z-index: 2; left: 30%; top: -14px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--cr-ink); box-shadow: 0 2px 0 var(--cr-ink), 0 0 12px rgba(255, 201, 40, .6);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%23071233' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 17px no-repeat,
    linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3));
  animation: pr-hop-down 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { #s-online .on-body.more + .on-foot::before { animation: none; } }
/* Champions: daar zou de pijl over een medailletijd vallen, dus alleen een korte vervaging onderaan; op 812 x 375 een iets
   lagere preview, zodat de tweede rij medailles heel boven Race staat */
#s-champ .cp-scroll.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 8px), rgba(0, 0, 0, .2)); mask-image: linear-gradient(180deg, #000 calc(100% - 8px), rgba(0, 0, 0, .2)); }
@media (max-height: 430px) and (min-width: 600px) {
  #s-champ .cp-track .tc-pv { height: 56px; }
  #s-champ .cp-track .tc-title { font-size: clamp(19px, 2.4vw, 22px); }
  #s-champ .cp-track .tc-medals { margin-bottom: 8px; }
}
@media (max-height: 380px) and (min-width: 600px) { #s-champ .cp-track .tc-pv { height: 50px; } }

/* Arena-kaart: '0 / 500' met lucht rond de schuine streep (flex knipt de spatie weg) */
#s-arena .ar-tr .muted { margin-left: .3em; }
/* besturingskaart: Uitspraak-knop even hoog als de keuzeknoppen ernaast (was 34 px) */
.sheet #pf-say { min-height: 40px; }
/* privékamer: de kroon van de host goud en 24 px in het midden (de regel voor het helmpje maakte hem wit en groter) */
.os-dot > .os-host { width: 24px; height: 24px; color: var(--cr-gold2); }

/* ---------- tweede review: standaardnamen heel, VOLGENDE-tag vrij, Arena-kop op 568 x 320 ---------- */
/* plekken: 'Driver2125' past heel (was 'Driver2…'); op lage telefoons iets minder tussenruimte, zodat 4 plekken naast de code blijven */
@media (max-width: 700px) {
  .on-slot { width: 74px; }
  .os-name { padding-left: 4px; padding-right: 4px; letter-spacing: -.01em; }
}
@media (max-height: 360px) {
  .on-slot { width: 70px; }
  .on-slots { column-gap: 6px; }
}
/* oefenen op lage telefoons: lucht tussen de compacte kop en de VOLGENDE-tag van kaart 01 (de marge valt samen met die van de kop) */
@media (max-height: 380px) { #s-practice .pr-grid { margin-top: 20px; } }
/* Arena op 568 x 320: ondertitel weg en de drie tellers op één rij, zodat Race bij het openen heel in beeld staat */
@media (max-height: 360px) {
  #s-arena .mode-line { display: none; }
  #s-arena .ar-wallet { flex-wrap: nowrap; }
}

/* ---------- derde review: Online op 844 x 390 met notch (iPhone 12) zonder scrollen, hint onder de verborgen knoppen ---------- */
/* rij met alleen een icoon als label: chips direct na het icoon */
#s-online .opt-row.tight .chips { justify-content: flex-start; }
/* pijl midden onder de eerste rij verborgen knoppen (online.js zet --mx), iets hoger zodat hij de hoofdknop niet raakt */
#s-online .on-body.more + .on-foot::before { left: var(--mx, 30%); top: -17px; }
/* lage telefoons boven 340 px: lagere voetbalk en modekaarten, krappere rijen (568 x 320 houdt zijn eigen maten) */
@media (max-height: 400px) and (min-height: 341px) {
  #s-online .on-body { padding-bottom: 6px; }
  #s-online .on-kind button { min-height: 38px; }
  #s-online .on-mode { min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
  #s-online .on-h { margin-bottom: 3px; }
  #s-online .on-grid { margin-top: 3px; }
  #s-online .on-room-btns { margin-top: 5px; }
  #s-online .on-foot { padding-top: 7px; padding-bottom: 6px; }
  #s-online .on-foot .big-btn { padding-top: 8px; padding-bottom: 10px; }
  /* Snel spelen iets hoger: Tijdrit even hoog als Hot Seat, zodat de kop niet verspringt bij een tabwissel */
  #s-online .ta-hero { min-height: 69px; }
}
@media (min-height: 401px) { #s-online .ta-hero { min-height: 82px; } }
/* tabbladen Hot Seat | Tijdrit op lage telefoons 39 px hoog (de algemene tabregel met :is woog zwaarder dan de oude 360-regel) */
@media (max-height: 400px) { #s-online .on-kind button[data-kind] { padding-top: 6px; padding-bottom: 7px; } }

/* ---------- eindronde, nacontrole na het samenvoegen ---------- */
/* Online: lobby, wachtrij en kamer even hoog (Kamer maken liet het paneel krimpen en 40 px zakken). Op een telefoon
   het hele scherm; op een iPad niet opgerekt (een lege band onder Kamer maken), daar houden wachtrij en kamer de
   hoogte van de lobby (online.js zet --lobby-h en .mid) */
@media (max-height: 430px) { #s-online .online-panel { min-height: min(100%, 520px); } }
@media (min-height: 431px) { #s-online .online-panel.mid { min-height: min(100%, var(--lobby-h, 0px)); } }
#s-online .on-body.mid { display: flex; flex-direction: column; }
#s-online .on-body.mid > .on-roomgrid { min-height: 0; margin: auto 0; }
#s-online .on-body.mid > .on-wait { flex: 1 0 auto; display: flex; flex-direction: column; }
#s-online .on-body.mid > .on-wait > .on-slots { margin: auto 0; }
/* Champions: valt het tweede rijtje medailles half onder de voet, dan per tegel alleen de stip met de tijd (champions.js zet .dots) */
#s-champ .cp-track .tc-medals.dots div { flex-direction: row; align-items: center; justify-content: center; column-gap: 7px; padding: 4px 8px; }
#s-champ .cp-track .tc-medals.dots small { font-size: 0; letter-spacing: 0; }
#s-champ .cp-track .tc-medals.dots small .medal { font-size: 14px; margin-right: 0; }
/* trofeeënpad en toplijst: jouw rij massief goud zoals een gekozen tab (de doorschijnende gouden laag werd op het blauw
   een grijze vlek); JIJ als donker plaatje met gouden letters, anders verdwijnt het in het goud. Niet de autolijst en de Pass-rij. */
#s-arena .ar-road .ar-row.me, #s-arena .ar-list > .ar-row.me:not(.ar-carrow):not(.ar-season) {
  border-color: var(--cr-ink); background: linear-gradient(180deg, #ffdb6a 0%, #f7b928 48%, #e8990f 52%, #cf7f06 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(140, 70, 0, .35), 0 0 0 2px var(--cr-gold2), 0 3px 0 2px var(--cr-ink), 0 0 18px rgba(255, 201, 40, .5); }
#s-arena .ar-road .ar-row.me .ar-rn small, #s-arena .ar-list > .ar-row.me:not(.ar-carrow):not(.ar-season) .ar-rn small { color: #fff6d6; text-shadow: 0 1px 0 var(--cr-ink); }
#s-arena .ar-road .ar-row.me .ar-you { background: var(--cr-ink); color: var(--cr-gold1); box-shadow: 0 2px 0 rgba(7, 18, 51, .5); }
/* Online: brandstofblik en helmpje in hetzelfde goud als de tank in de HUD (het bleke goud las als uitgeschakeld) */
#s-online .opt-ic, #s-online .opt-lbl svg { color: var(--cr-gold2); }
/* tussenstand: naam 2 px lager, zodat hij niet tegen de bovenrand van het naamplaatje plakt (het tankbalkje blijft vrij) */
#s-turn .ep-name { padding-top: 2px; line-height: calc(var(--nh) - 10px); }
/* uitgeschakelde Start: geen glimlicht (las als een knop die je kunt indrukken), alleen de zachte glans */
#s-online .on-foot .big-btn.wait:disabled { --cr-glint: none; }
/* Online Tijdrit op 667: de spelerschips minstens 36 px breed */
#s-online .opt-row.tight { gap: 6px; }
#s-online .opt-row.tight .chips { gap: 3px; }
/* oefenkaarten: labels 12 px (was 11 en 11,5) */
#s-practice .pr-none, #s-practice .pr-top .pr-elev.on b, #s-practice .pr-next { font-size: 12px; }
#s-practice .pr-sub { font-size: 12px; line-height: 14.5px; }
/* Hot Seat-opzet op 568 x 320: Ghosts op één regel (op twee regels viel Speelduur onder de rand). De lange labels krimpen
   nooit onder hun tekst, alleen Uit tot 36 px; 12 px letters en iets minder lucht ('Leader + target' liep 3 px over zijn knop) */
@media (max-height: 360px) {
  #s-setup #ghost-seg { flex-wrap: nowrap; gap: 3px; padding: 2px; }
  #s-setup .hs-opts > .opt-row:not(.len-row) #ghost-seg button { flex: 1 1 auto; min-width: auto; padding: 3px 4px; font-size: 12px; letter-spacing: -.01em; white-space: nowrap; }
  #s-setup .hs-opts > .opt-row:not(.len-row) #ghost-seg button:last-child { min-width: 36px; }
}
/* Champions op een lage telefoon (twee kolommen): links minstens 300 px, zodat jouw tijd en Race niet op vier regels
   staan en de baannaam met de code op één regel past (met notch op 667 breed); de ranglijst krijgt de rest */
@media (max-height: 430px) and (min-width: 600px) { #s-champ .cp-grid { grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr); } }
/* past de baankaart niet boven de voet, dan eerst dichter op elkaar (champions.js zet .tight vóór .dots en de lagere preview) */
#s-champ .cp-track.tight .tc-head { padding-top: 4px; }
#s-champ .cp-track.tight .tc-title { line-height: 1.02; }
#s-champ .cp-track.tight .tc-stats { padding-top: 1px; line-height: 16px; }
#s-champ .cp-track.tight .tc-medals { margin-top: 5px; margin-bottom: 7px; }
#s-champ .cp-track.tight .tc-medals div { padding-top: 3px; padding-bottom: 3px; }
/* jouw tijd op een lage telefoon: medaille, tijd en plek op één regel (op 812 met notch viel de plek op een derde regel
   en duwde Race omhoog); de plek iets kleiner dan de tijd en Race iets smaller. Past het nog niet (een plek met vier
   cijfers), dan het label alleen nog voor de voorleesstem (champions.js zet .bare). */
@media (max-height: 430px) and (min-width: 600px) {
  #s-champ .cp-you { column-gap: 6px; padding-left: 10px; padding-right: 10px; }
  #s-champ .cp-you .medal { margin-right: 0; }
  #s-champ .cp-you > .num + span { font-size: 14px; }
  #s-champ .cp-act > .big-btn { padding-left: 12px; padding-right: 12px; }
}
#s-champ .cp-you { position: relative; }
#s-champ .cp-you.bare small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* lege ranglijst die niet past (champions.js zet .tight): kleiner podium en minder lucht, de stippelrand blijft heel */
#s-champ .cp-board.tight .board-empty { flex: 1 0 auto; justify-content: center; gap: 2px; padding: 10px 10px 12px; }
#s-champ .cp-board.tight .be-pod { width: min(160px, 64%); margin-bottom: 2px; }
/* lege ranglijst naast de baankaart: de stippelrand loopt door tot onderaan de kolom (op een iPad bleef ruim de helft
   leeg), podium en tekst in het midden; op een hoog scherm een groter podium */
@media (min-width: 600px) { #s-champ .cp-board > .board-empty { flex: 1 0 auto; justify-content: center; } }
@media (min-width: 600px) and (min-height: 431px) {
  #s-champ .cp-board:not(.tight) > .board-empty { gap: 8px; padding: 24px 18px 28px; }
  #s-champ .cp-board:not(.tight) .be-pod { width: min(280px, 78%); margin-bottom: 6px; }
  #s-champ .cp-board:not(.tight) .board-empty b { font-size: 22px; }
  #s-champ .cp-board:not(.tight) .board-empty small { font-size: 14px; }
}
/* smalle ranglijst (champions.js zet .narrow): zonder de achterstand, de naam krijgt die ruimte */
#s-champ .cp-board.narrow .lb-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 6px; padding-left: 8px; padding-right: 8px; }
#s-champ .cp-board.narrow .lb-gap { display: none; }

/* ===== ronde 27: uitslag ===== */
/* Ronde icoonknoppen met een klein bijschrift (oefenuitslag: Uitdagen, Herhaling, Hot Seat; podium: Delen, Uitdagen,
   Menu). Het rondje is een Clash-knop met glans en indruk, het bijschrift wit met inktrand (minstens 11 px). */
.r-ic { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; flex: none; min-width: 52px; max-width: 78px; color: #fff; -webkit-tap-highlight-color: transparent; }
.r-ic .ri { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--cr-ink); isolation: isolate;
  background: var(--cr-blue-face); box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .35), 0 4px 0 #123a85, 0 4px 0 2px var(--cr-ink), 0 8px 14px rgba(0, 0, 0, .3);
  transition: translate .18s var(--cr-spring), scale .18s var(--cr-spring), box-shadow .14s ease-out; }
.r-ic .ri::before { content: ''; position: absolute; z-index: -1; left: 6px; right: 6px; top: 3px; height: 44%; border-radius: 50% 50% 40% 40%; pointer-events: none;
  background: var(--cr-glint-xs), var(--cr-gloss); }
.r-ic .ri svg { width: 25px; height: 25px; color: #fff; filter: drop-shadow(0 0 1px var(--cr-ink)) drop-shadow(0 2px 0 var(--cr-ink)); }
.r-ic small { font-family: var(--display); font-weight: 400; font-size: 12px; line-height: 1.05; letter-spacing: .02em; text-align: center; white-space: normal;
  text-shadow: 0 1px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); }
.r-ic:active .ri { translate: 0 3px; scale: .93; transition-duration: .07s;
  box-shadow: var(--cr-rim), inset 0 -2px 0 rgba(5, 20, 70, .35), 0 1px 0 #123a85, 0 1px 0 2px var(--cr-ink); }
#p-hs .ri svg { color: #ff8cc0; }
#p-replay .ri svg { color: #e2c4ff; }
:is(#p-chal, #f-chal) .ri svg { color: #ffe27a; }
#f-share .ri svg { color: #9fe8ff; }
@media (prefers-reduced-motion: reduce) { .r-ic .ri { transition: none; } }

/* diamantchip (zoals .ta-earn in de Tijdrit): vult zich met rewardBurst, de reden klein eronder */
.r-earn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.r-earn .dm-earn { margin: 0; padding: 2px 11px 2px 7px; border: 2px solid var(--cr-ink); color: #fff; font-size: 18px; text-shadow: var(--cr-out);
  background: linear-gradient(180deg, #5fe0ff 0%, #22b8f0 50%, #1489c9 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 2px 0 var(--cr-ink), 0 0 14px rgba(63, 208, 255, .45); }
.r-earn .dm-earn .pi { width: 19px; height: 19px; color: #fff; filter: drop-shadow(0 1px 0 var(--cr-ink)); }
.r-earn .dm-earn b { min-width: 2.2ch; font-variant-numeric: tabular-nums; }
.r-earn small { font-weight: 800; font-size: 12px; color: #dbe8ff; text-shadow: 0 1px 0 var(--cr-ink); white-space: nowrap; }
/* op het podium naast de winnaarstijd (scheelt een regel op een lage telefoon); de reden staat daar op het 3D-beeld,
   dus op een donker pilletje (leesbaar op lichte weg en curbs), zonder extra hoogte zodat de titel niet omhoog schuift */
.f-sub .r-earn { align-items: flex-start; margin-left: 8px; }
.f-sub .r-earn .dm-earn { font-size: 16px; }
.f-sub .r-earn small { padding: 0 7px; border-radius: 8px; background: rgba(7, 18, 51, .72); box-shadow: 0 0 0 1.5px rgba(7, 18, 51, .55); }
/* podiumpaneel: tabbladen op één regel, de prijzen scrollen in hun tabblad (style.css .f-tab) zodat beide knoppenrijen
   altijd in het paneel staan; Nog een keer en Nieuwe baan even hoog */
#s-final .f-tabs { flex-wrap: nowrap; max-width: 100%; }
#s-final .f-tabs button { flex: 0 1 auto; white-space: nowrap; }
#s-final .f-btns :is(.ghost-btn, .big-btn) { align-self: stretch; }
/* zit er nog iets onder de rand van het tabblad (main.js finalTabFade zet .more), dan vervaagt de onderkant */
#s-final .f-tab.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 30px), rgba(0, 0, 0, .1));
  mask-image: linear-gradient(180deg, #000 calc(100% - 30px), rgba(0, 0, 0, .1)); }
@media (max-height: 430px) {
  #s-final .f-tabs button { padding: 5px 8px; font-size: 12.5px; }
  #s-final .f-btns .r-ic .ri { width: 44px; height: 44px; }
  #s-final .f-btns .r-ic .ri svg { width: 22px; height: 22px; }
}
/* smalle telefoon (iPhone SE): vier tabbladen passen op één regel */
@media (max-height: 430px) and (max-width: 640px) { #s-final .f-tabs button { padding: 4px 5px; font-size: 12px; } }
/* heel lage telefoon: prijs op twee regels (naam en waarde naast elkaar), dan piept de derde onder de rand uit */
@media (max-height: 340px) {
  .aw-txt { flex-flow: row wrap; align-items: baseline; column-gap: 6px; }
  .aw-txt small { flex: 0 0 100%; }
  .aw-txt b { align-self: baseline; max-width: 68%; }   /* een naam van 12 tekens past met de padding rechts */
  .aw-txt em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* smalle telefoon: in de eindstand van het podium geen WINNAAR-label (titel en podium zeggen het al); met JIJ erbij
   bleef in de Tijdrit van de naam alleen 'Dr...' over (eindronde) */
@media (max-width: 640px) { #final .st-tag.win { display: none; } }
/* eindpaneel op een smalle telefoon iets naar links: rechts een goot waar de Glorp naast het paneel past */
@media (max-aspect-ratio: 19/10) and (max-height: 430px) { body.gz-on #s-end .endp { left: 40%; } }
@media (max-height: 340px) { #s-final .f-title > svg { display: none; } }

/* ---------- beurtscherm: potlood los naast het naamlint, TURN/FUEL/RECORD op kleine Clash-plaatjes ---------- */
.ts-pen { color: #fff; border: 2px solid var(--cr-ink); background: var(--cr-yel-face);
  box-shadow: var(--cr-rim-gold), inset 0 -3px 0 rgba(140, 70, 0, .4), 0 3px 0 var(--cr-yel3), 0 3px 0 2px var(--cr-ink); }
.ts-pen svg { filter: drop-shadow(0 1px 0 var(--cr-ink)) drop-shadow(0 0 1px var(--cr-ink)); }
.ho-top { gap: 6px; padding: 3px 11px; border-radius: 10px; border: 2px solid var(--cr-ink); font-size: 12.5px; letter-spacing: .08em; color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink), 0 0 2px var(--cr-ink);
  background: linear-gradient(180deg, #4f9dff, #2667e0 50%, #1a4fb8 51%, #163f96); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--cr-ink); }
.ho-top span:first-child { color: #fff; }
.ho-pill { padding: 3px 10px; border-radius: 9px; border: 2px solid var(--cr-ink); font-size: 12px; letter-spacing: .06em; color: var(--cr-gold1); text-shadow: 0 1px 0 var(--cr-ink);
  background: linear-gradient(180deg, #2b5fc4, #1b4296 55%, #163781); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 2px 0 var(--cr-ink); }
.ho-pill b { font-size: 15px; color: #fff; text-shadow: 0 2px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
.ho-pill b small { color: #dbe8ff; }
.ho-pill.record b { color: #ffe45c; }
.ho-pill.reserve, .ho-pill.reserve b { color: #ff8aa8; }
.ts-sub { color: #fff; text-shadow: 0 1px 0 var(--cr-ink), 0 0 3px var(--cr-ink); }
/* nachtbaan (eindronde): het luchtbeeld is zelf al donker (luma 52 op 844), dus geen donkere rand maar een lichte blauwe
   waas om de spelerkleur heen */
.ts[data-sky="night"] { background: radial-gradient(ellipse at 50% 48%, var(--pc-tint, rgba(20, 50, 130, .45)) 0%, rgba(60, 120, 230, .22) 50%, rgba(90, 150, 255, .32) 85%); }
/* hoekknoppen (bewaren, menu, besturing) minstens 40 px hoog */
.ho-links .ghost-btn, .ho-chip { min-height: 40px; padding-top: 0; padding-bottom: 0; }

/* ---------- coach: Clash-paneel, gele Volgende en blauwe Overslaan, de echte knoppen uit de rit met een vinger ---------- */
#coach .coach-box { border: 3px solid var(--cr-gold2);
  background: radial-gradient(120% 60% at 50% 0%, rgba(120, 180, 255, .28), transparent 60%), linear-gradient(180deg, #1c4bb0 0%, #12357f 45%, #0b2259 100%);
  box-shadow: 0 0 0 2px var(--cr-gold4), 0 0 0 5px rgba(7, 18, 51, .9), inset 0 2px 0 rgba(255, 255, 255, .35), 0 24px 60px rgba(0, 0, 0, .55); }
#coach .co-head b { color: #fff; text-shadow: var(--cr-out); }
#coach .co-dots { display: flex; gap: 5px; }
#coach .co-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--cr-ink); background: rgba(7, 18, 51, .7); }
#coach .co-dots i.on { background: radial-gradient(circle at 50% 30%, #fff6c2, var(--cr-gold2) 50%, var(--cr-gold3)); }
#coach .coach-box p { color: #fff; text-shadow: 0 1px 0 var(--cr-ink), 0 0 2px var(--cr-ink); }
#coach .row { display: flex; flex-wrap: nowrap; gap: 10px; }
#coach .row > :is(.big-btn, .ghost-btn) { position: relative; flex: 1 1 auto; width: auto; margin: 0; padding: 10px; border: 2px solid var(--cr-ink); border-radius: 14px; color: #fff;
  font-family: var(--display); font-weight: 400; font-size: clamp(17px, 2.2vw, 20px); letter-spacing: .04em; text-shadow: var(--cr-out); isolation: isolate; overflow: hidden;
  background: var(--cr-blue-face); box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .35), 0 5px 0 #123a85, 0 5px 0 2px var(--cr-ink);
  transition: translate .18s var(--cr-spring), scale .18s var(--cr-spring); }
#coach .row > .big-btn { flex-grow: 2; background: var(--cr-yel-face); box-shadow: var(--cr-rim-gold), inset 0 -5px 0 rgba(140, 70, 0, .4), 0 5px 0 var(--cr-yel3), 0 5px 0 2px var(--cr-ink); }
#coach .row > :is(.big-btn, .ghost-btn)::before { content: ''; position: absolute; z-index: -1; left: 3px; right: 3px; top: 2px; height: 45%; border-radius: inherit; pointer-events: none;
  background: var(--cr-glint-xs), var(--cr-gloss); }
#coach .row > :is(.big-btn, .ghost-btn):active { translate: 0 4px; scale: .96; }
/* plaatjes: vaste maten zodat de vinger precies op de knoppen tikt (midden van de rij = 0) */
.co-art { position: relative; display: flex; align-items: center; justify-content: center; gap: 24px; height: 96px; margin: 6px 0 2px; }
.co-btn { position: relative; flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--cr-ink); color: #fff;
  background: var(--cr-blue-face); box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .35), 0 4px 0 #123a85, 0 4px 0 2px var(--cr-ink); }
.co-btn svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 0 var(--cr-ink)); }
.co-btn svg.flip, .co-slide svg.flip { transform: scaleX(-1); }
.co-btn.small { width: 46px; height: 46px; } .co-btn.small svg { width: 22px; height: 22px; }
.co-btn.brake { width: 110px; border-radius: 18px; align-content: center; background: linear-gradient(180deg, #ff7a66 0%, #f23b28 45%, #d22414 75%, #b51a10 100%);
  box-shadow: var(--cr-rim-gold), inset 0 -4px 0 rgba(90, 0, 0, .35), 0 4px 0 #7a0e06, 0 4px 0 2px var(--cr-ink); }
.co-btn.brake svg { width: 24px; height: 24px; }
.co-btn.brake b { font-family: var(--display); font-weight: 400; font-size: 13px; letter-spacing: .03em; text-shadow: var(--cr-out); white-space: nowrap; }
.co-btn.resp { background: linear-gradient(180deg, #9cf06b, #3fbf2a 52%, #1d7a12); box-shadow: var(--cr-rim-gold), inset 0 -4px 0 rgba(0, 60, 0, .35), 0 4px 0 #145a0b, 0 4px 0 2px var(--cr-ink); }
.co-drift { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--cr-ink); color: #fff;
  background: radial-gradient(circle at 50% 30%, #fff6c2, var(--cr-gold2) 50%, var(--cr-gold3)); box-shadow: 0 0 18px rgba(255, 201, 40, .6); }
.co-drift svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 0 var(--cr-ink)); animation: co-drift 1.6s ease-in-out infinite; }
.co-x2 { font-family: var(--display); font-size: 26px; color: var(--cr-gold1); text-shadow: var(--cr-out); }
.co-art.s3 { gap: 12px; }
.co-slide { position: relative; display: flex; align-items: center; justify-content: space-between; width: 210px; height: 48px; padding: 0 8px; border-radius: 999px;
  border: 3px solid var(--cr-ink); background: rgba(7, 18, 51, .7); color: #9fc4ff; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .5); }
.co-slide svg { width: 22px; height: 22px; }
.co-knob { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid var(--cr-ink);
  background: var(--cr-blue-face); animation: co-knob 1.8s ease-in-out infinite; }
.co-tilt { position: relative; display: grid; place-items: center; width: 110px; height: 70px; }
.co-dev { width: 104px; height: 54px; border-radius: 12px; border: 3px solid #fff; background: rgba(7, 18, 51, .75); box-shadow: 0 0 0 2px var(--cr-ink);
  animation: co-tilt 1.8s ease-in-out infinite; }
/* de vinger: de punt (19,5 px; 5 px in het plaatje) staat op het midden van de rij plus de verschuiving. --fy = rust,
   --fy2 = ingedrukt; in rust zo hoog dat de vinger niet over de uitlegtekst valt (ronde 27) */
.co-finger { --fy: 10px; --fy2: -2px; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -5px 0 0 -19.5px; pointer-events: none; z-index: 2;
  fill: #fff; stroke: var(--cr-ink); stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .45)); }
.l-buttons.s1 .co-finger { animation: co-f-lr 2.4s ease-in-out infinite; }
.l-buttons.s1 .co-btn.l { animation: co-press 2.4s ease-in-out infinite; }
.l-buttons.s1 .co-btn.r { animation: co-press 2.4s ease-in-out 1.2s infinite; }
.l-slide.s1 .co-finger { animation: co-f-slide 1.8s ease-in-out infinite; }
.co-art.s2 .co-finger { --fx: 44px; animation: co-f-tap 1.3s ease-in-out infinite; }
.co-art.s2 .co-btn.brake { animation: co-press 1.3s ease-in-out infinite; }
.co-art.s3 .co-finger { --fx: -24px; animation: co-f-double 1.6s ease-in-out infinite; }
.co-art.s3 .co-btn.resp { animation: co-press2 1.6s ease-in-out infinite; }
@keyframes co-f-lr { 0%, 100% { transform: translate(-44px, var(--fy)); } 12% { transform: translate(-44px, var(--fy2)) scale(.92); } 26% { transform: translate(-44px, var(--fy)); }
  50% { transform: translate(44px, var(--fy)); } 62% { transform: translate(44px, var(--fy2)) scale(.92); } 76% { transform: translate(44px, var(--fy)); } }
@keyframes co-press { 0%, 6%, 22%, 100% { transform: none; } 12% { transform: translateY(3px) scale(.92); } }
@keyframes co-press2 { 0%, 6%, 20%, 30%, 44%, 100% { transform: none; } 12%, 36% { transform: translateY(3px) scale(.92); } }
@keyframes co-f-slide { 0%, 100% { transform: translate(-54px, 4px); } 50% { transform: translate(54px, 4px); } }
@keyframes co-knob { 0%, 100% { transform: translateX(-54px); } 50% { transform: translateX(54px); } }
@keyframes co-f-tap { 0%, 30%, 100% { transform: translate(var(--fx), var(--fy)); } 12% { transform: translate(var(--fx), var(--fy2)) scale(.92); } }
@keyframes co-f-double { 0%, 22%, 46%, 100% { transform: translate(var(--fx), var(--fy)); } 12%, 36% { transform: translate(var(--fx), var(--fy2)) scale(.92); } }
@keyframes co-tilt { 0%, 100% { transform: rotate(-16deg); } 50% { transform: rotate(16deg); } }
@keyframes co-drift { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateX(2px); } }
/* build 25 (herstel r1): stap 1 met GAS en REM. De sturing in .co-pair (de vinger rekent vanaf het midden van het paar,
   zoals zonder GAS), rechts GAS zoals in de rit: groen, hoog, vastgehouden door een tweede vinger die blijft drukken */
.co-art.s1.gas { gap: 30px; }
.co-pair, .co-gasw { position: relative; display: flex; align-items: center; gap: 24px; }
.co-btn.gas { width: 58px; height: 80px; border-radius: 16px; align-content: center; gap: 1px; color: #fff;
  background: radial-gradient(70% 60% at 50% 118%, rgba(200, 255, 170, .5), transparent 70%), linear-gradient(180deg, var(--cr-grn1) 0%, #5fd83e 45%, var(--cr-grn2) 52%, var(--cr-grn3) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 1px 0 var(--cr-ink), 0 0 16px 3px rgba(182, 255, 42, .55); transform: translateY(3px) scale(.95); }
.co-btn.gas svg { width: 26px; height: 26px; }
.co-btn.gas b { font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .03em; text-shadow: var(--cr-out); }
.co-art.s1 .co-gasw .co-finger { animation: none; transform: translate(2px, 12px) scale(.94); }
@media (prefers-reduced-motion: reduce) { .co-art, .co-art * { animation: none !important; } }
/* lage schermen: plaatje iets kleiner, de vinger ook (punt op 16 bij 4 px) en hoger in rust */
@media (max-height: 340px) {
  .co-art { height: 78px; margin-top: 2px; } .coach-box p { margin-bottom: 8px; font-size: 15px; }
  .co-finger { --fy: 6px; --fy2: -4px; width: 36px; height: 36px; margin: -4px 0 0 -16px; }
  .co-btn.gas { width: 52px; height: 70px; } .co-btn.gas svg { width: 22px; height: 22px; }
}

/* ---------- uitleg bij de eerste Arena-race en Live Race (howto.js, audit 30 okt punt 7): het coachpaneel met eigen
   plaatjes. Alleen transform/opacity-animaties; 'beweging beperken' zet ze uit via de regel van .co-art hierboven ---------- */
#coach:focus { outline: none; }
/* eigen plaatjes iets dichter op elkaar (de stuurstappen houden 24 px: daar rekent de vinger mee) */
.co-art.h-arena, .co-art.h-live { gap: 18px; }
/* terugzetten met één tik: de knop in het midden, de vinger erop */
.co-art.s3.once .co-finger { --fx: 0px; animation: co-f-tap 1.3s ease-in-out infinite; }
.co-art.s3.once .co-btn.resp { animation: co-press 1.3s ease-in-out infinite; }
/* Arena: klok 3:00, opnieuw rijden, trofee */
.ho-clock { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 14px 0 10px; border-radius: 999px; border: 3px solid var(--cr-ink); color: #fff;
  background: var(--cr-blue-face); box-shadow: var(--cr-rim), inset 0 -4px 0 rgba(5, 20, 70, .35), 0 4px 0 #123a85, 0 4px 0 2px var(--cr-ink); }
.ho-clock svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 0 var(--cr-ink)); }
.ho-clock b { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--cr-gold1); text-shadow: var(--cr-out); }
.ho-loop { display: grid; place-items: center; color: #9fc4ff; }
.ho-loop svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 var(--cr-ink)); animation: ho-spin 2.4s linear infinite; }
.ho-cup { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; border: 3px solid var(--cr-ink); color: var(--cr-gold2);
  background: var(--cr-blue-face); box-shadow: var(--cr-rim-gold), 0 4px 0 #123a85, 0 4px 0 2px var(--cr-ink), 0 0 22px rgba(255, 201, 40, .55); animation: ho-bounce 1.6s ease-in-out infinite; }
.ho-cup svg { width: 40px; height: 40px; filter: drop-shadow(0 2px 0 var(--cr-ink)); }
/* Live Race: vier auto's op een weg naar de finishlijn, '3 laps' ernaast; spoken: de blauwe rijdt door de rode heen */
.ho-road { position: relative; flex: none; width: 236px; height: 66px; border-radius: 14px; border: 3px solid var(--cr-ink); overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 14px, transparent 14px 28px) 0 50% / 100% 3px no-repeat, linear-gradient(180deg, #535d7b, #2c3349);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .5), 0 3px 0 var(--cr-ink); }
.ho-road:not(.ghost)::after { content: ''; position: absolute; right: 22px; top: 0; bottom: 0; width: 8px; background: repeating-conic-gradient(#fff 0 25%, #071233 0 50%) 0 0 / 8px 8px; }
.ho-car { position: absolute; left: 0; width: 38px; height: 38px; z-index: 1; filter: drop-shadow(0 2px 0 rgba(7, 18, 51, .6)); }
.ho-car.c0, .ho-car.c2 { top: -3px; } .ho-car.c1, .ho-car.c3 { top: 26px; }
.ho-car.c0 { animation: ho-drive 2.6s linear -0.4s infinite; } .ho-car.c1 { animation: ho-drive 2.9s linear -1.6s infinite; }
.ho-car.c2 { animation: ho-drive 3.3s linear -2.2s infinite; } .ho-car.c3 { animation: ho-drive 3.6s linear -0.9s infinite; }
.ho-laps { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--cr-ink); white-space: nowrap;
  font-family: var(--display); font-weight: 400; font-size: 18px; color: #fff; text-shadow: var(--cr-out);
  background: linear-gradient(180deg, var(--cr-gold1), var(--cr-gold2) 50%, var(--cr-gold3)); box-shadow: 0 3px 0 var(--cr-gold4), 0 3px 0 2px var(--cr-ink); }
.ho-laps svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 0 var(--cr-ink)); }
.ho-road.ghost .ho-car { top: 6px; width: 48px; height: 48px; }
.ho-car.solid { left: 50%; margin-left: -24px; animation: ho-idle 1.2s ease-in-out infinite; }
.ho-car.boo { z-index: 2; opacity: .6; filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 2px #dff0ff); animation: ho-drive 2.6s linear infinite; }
/* gap-meter in de Live Race-uitleg (keuring 6 nov): zelfde kleuren als in de klok, rood ▲ voor je, groen ▼ achter je */
.ho-gap { display: flex; flex-direction: column; gap: 4px; }
.ho-gap i { display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border-radius: 7px; border-left: 3px solid var(--pc);
  font-style: normal; font-size: 12px; line-height: 20px; color: var(--pc); background: rgba(10, 11, 16, .78); }
.ho-gap b { font-family: var(--tmnum); font-weight: 700; font-size: 14px; color: #fff; }
/* toetsenbord: pijltjes, SPATIE en ENTER als toetsen */
.ho-arrows { display: grid; grid-template-columns: repeat(3, 40px); grid-template-rows: repeat(2, 40px); gap: 5px; }
.ho-arrows .up { grid-column: 2; grid-row: 1; } .ho-arrows .l { grid-column: 1; grid-row: 2; }
.ho-arrows .dn { grid-column: 2; grid-row: 2; } .ho-arrows .r { grid-column: 3; grid-row: 2; }
.ho-key { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 9px; border: 2px solid var(--cr-ink); color: var(--cr-ink);
  font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .05em;
  background: linear-gradient(180deg, #ffffff, #d6e0f3); box-shadow: 0 4px 0 #8796b8, 0 4px 0 2px var(--cr-ink); }
.ho-key svg { width: 18px; height: 18px; }
.ho-key svg.r { transform: scaleX(-1); } .ho-key svg.up { transform: rotate(90deg); } .ho-key svg.dn { transform: rotate(-90deg); }
.ho-key.held { transform: translateY(3px); background: linear-gradient(180deg, #fff6c2, var(--cr-gold2)); }
.ho-key.wide { min-width: 124px; height: 46px; font-size: 18px; }
.ho-arrows .l { animation: co-press 2.4s ease-in-out infinite; } .ho-arrows .r { animation: co-press 2.4s ease-in-out 1.2s infinite; }
.ho-key.tap { animation: co-press 1.3s ease-in-out infinite; }
@keyframes ho-spin { to { transform: rotate(-360deg); } }
@keyframes ho-bounce { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-6px) scale(1.06); } 60% { transform: translateY(0) scale(.98); } }
@keyframes ho-drive { from { transform: translateX(-50px); } to { transform: translateX(244px); } }
@keyframes ho-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }
@media (max-height: 340px) {
  .ho-arrows { grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(2, 34px); gap: 4px; }
  .ho-arrows .ho-key { min-width: 34px; height: 34px; }
  .ho-cup { width: 62px; height: 62px; } .ho-cup svg { width: 34px; height: 34px; }
}

/* ===== ronde 27: laden-garage ===== */
/* laadwiel tijdens een lange fade (main.js fadeTo): verschijnt pas na 0,6 s zwart; alleen transform en opacity, dus het
   draait ook door terwijl de hoofdthread een baan bouwt. Terug in beeld met een fade-in van 0,2 s */
#fade .fade-wheel { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #0b2259 0 34%, var(--cr-ink) 35% 41%, transparent 42%),
    conic-gradient(var(--cr-gold1) 0 18%, var(--cr-gold2) 18% 30%, rgba(61, 139, 255, .35) 30% 50%, var(--cr-gold2) 50% 68%, var(--cr-gold3) 68% 80%, rgba(61, 139, 255, .35) 80% 100%);
  box-shadow: 0 0 0 3px var(--cr-ink), 0 0 22px rgba(255, 201, 40, .45); }
#fade.on .fade-wheel { animation: fw-in .2s ease-out .6s both, fw-spin .9s linear infinite; }
#fade.in { transition-duration: .2s; }
@keyframes fw-spin { to { transform: rotate(360deg); } }
@keyframes fw-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #fade.on .fade-wheel { animation: fw-in .2s ease-out .6s both; } }

/* garage-tabbladen altijd op één regel en even breed. Over de volle breedte (smal scherm) passen ze op 15 px; naast
   het beeld (vanaf 641 px breed) is een tab ~9,5vw breed: de letter schaalt mee tot 'Patroon' past (667: 12 px) */
#s-garage .gar-tabs.seg { flex-wrap: nowrap; }
#s-garage .gar-tabs.seg button { flex: 1 1 0; min-width: 0; padding: 8px 5px 9px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 641px) { #s-garage .gar-tabs.seg button { padding-left: 3px; padding-right: 3px; font-size: clamp(12px, calc(2.3vw - 3.2px), 15px); } }

/* Clash-veeg over het 3D-beeld bij het openen en sluiten van de garage (garage.js wipe), onder de schermen */
.gar-wipe { position: fixed; inset: 0; z-index: 1; pointer-events: none; visibility: hidden; transform: translateX(-104%);
  background: radial-gradient(70% 55% at 50% 50%, rgba(120, 190, 255, .35), rgba(120, 190, 255, 0) 70%), linear-gradient(180deg, #4f9dff 0%, #2667e0 46%, #1a4fb8 54%, #12398a 100%);
  box-shadow: 7px 0 0 var(--cr-gold2), 11px 0 0 var(--cr-ink); }
.gar-wipe.in { visibility: visible; transform: translateX(0); transition: transform .18s cubic-bezier(.3, .7, .4, 1); }
.gar-wipe.in.out { transform: translateX(104%); transition: transform .3s cubic-bezier(.55, 0, .75, .45); }

/* 'Tik op mij!' als tekstballon boven de Glorp op het podium (garage.js bubble) */
.gz-bubble { position: absolute; left: 0; top: 0; z-index: 3; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.gz-bubble.show { opacity: 1; }
.gz-bubble span { position: absolute; left: 0; bottom: 12px; white-space: nowrap; padding: 6px 13px 7px; border-radius: 16px; background: #fff; color: #0b2259;
  border: 3px solid var(--cr-ink); font-family: var(--display); font-size: clamp(15px, 2.1vw, 19px); letter-spacing: .02em; box-shadow: 0 4px 0 var(--cr-ink);
  transform: translateX(-50%); animation: gzb-bob 1.4s ease-in-out infinite; }
.gz-bubble span::after { content: ''; position: absolute; left: 50%; bottom: -10px; width: 14px; height: 14px; margin-left: -8px; background: #fff;
  border-right: 3px solid var(--cr-ink); border-bottom: 3px solid var(--cr-ink); transform: rotate(45deg); }
@keyframes gzb-bob { 0%, 100% { transform: translate(-50%, 0) rotate(-2deg); } 50% { transform: translate(-50%, -5px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .gz-bubble span { animation: none; } }

/* oefenen: lege tegels (main.js openPractice) houden ongeveer de maat van een gevulde kaart */
.pr-tile .pr-card { pointer-events: none; }
.pr-tile .pr-body { min-height: 62px; }

/* melding 'up' op de oefenuitslag (uitdagen): rechtsboven, boven de Glorp, niet over de tijd, de medailles of de
   knoppen onderin (op 568 breed valt hij over het lege stuk rechtsboven in de tijdkaart) */
body[data-screen=presult] #toast.up { left: auto; right: calc(12px + var(--sar, 0px)); bottom: auto; top: calc(56px + var(--sat, 0px));
  width: max-content; max-width: min(max(38vw, 260px), 380px); transform: translateY(-12px); }
body[data-screen=presult] #toast.up.show { transform: none; }

/* Live Race A4: naamlabel met plek boven de tegenstanders ('2 · SAM12') en de pijl voor wie vlak achter je zit.
   scene/car.js (tegenstanders) zet --pc (spelerkleur), dark (lichte kleur: inkt in plaats van wit) en de stand; per beeldje alleen
   transform en opacity. Vooraan in #s-hud (z-index 0): aftelcijfer, GO!, meldingen en knoppen liggen erboven. */
.rv-tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.rv-tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 4px; padding: 1px 9px 1px 2px; opacity: 0;
  background: var(--pc, #fff); border: 2px solid var(--cr-ink); border-radius: 999px; box-shadow: 0 2px 0 var(--cr-ink), 0 3px 6px rgba(0, 0, 0, .35);
  color: #fff; font-family: var(--display); font-size: 13px; line-height: 17px; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
  text-shadow: 0 1px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); will-change: transform, opacity; }
/* A10: YOU boven je eigen Glorp op het gridbeeld (scene/car.js updateTags): slijmgroen, met een punt die op en neer wipt */
.rv-you { position: absolute; left: 0; top: 0; z-index: 25; padding-bottom: 9px; opacity: 0; will-change: transform; }
.rv-you.on { opacity: 1; }
.rv-you b { position: relative; display: block; font-weight: 400; font-family: var(--display); font-size: 15px; line-height: 20px; letter-spacing: .08em; padding: 0 9px; white-space: nowrap;
  color: var(--cr-ink); background: #b6ff2a; border: 2px solid var(--cr-ink); border-radius: 999px; box-shadow: 0 2px 0 var(--cr-ink), 0 0 12px rgba(182, 255, 42, .75); }
.rv-you b::after { content: ''; position: absolute; left: 50%; top: 100%; margin: 2px 0 0 -7px; border: 7px solid transparent; border-bottom: 0; border-top: 9px solid #b6ff2a; filter: drop-shadow(0 2px 0 var(--cr-ink)); }
.rv-you.on b { animation: rv-you 0.62s ease-in-out infinite alternate; }
@keyframes rv-you { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .rv-you.on b { animation: none; } }
/* een label is er of niet: geen fade, een half doorzichtig label over een kart of de tribune las als een spook */
/* punt onder het label; wijkt het label uit (scene/car.js: opzij en omhoog), dan wijzen een steel in de spelerkleur met
   inktrand (van --tx in het label, recht of schuin: --sl lang onder hoek --sa) en de punt (op --tx + --sx, --st lager)
   naar het anker boven zijn kart */
.rv-tag { --tx: 0px; --st: 0px; --sx: 0px; --sl: 0px; --sa: 0deg; }
.rv-tag.st::before { content: ''; position: absolute; left: calc(50% + var(--tx)); top: 100%; width: 3px; height: calc(var(--sl) + 2px); margin-left: -1.5px;
  background: var(--pc, #fff); box-shadow: 0 0 0 1.5px var(--cr-ink); transform-origin: 50% 0; transform: rotate(var(--sa)); }
.rv-tag::after { content: ''; position: absolute; left: calc(50% + var(--tx) + var(--sx)); bottom: calc(-7px - var(--st)); margin-left: -5px; border: 5px solid transparent; border-top: 5px solid var(--cr-ink); border-bottom: 0; }
.rv-tag b:empty { display: none; }
.rv-tag b { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--cr-ink); color: #fff; text-align: center; font-weight: 400; text-shadow: none; }
/* A6: het stoelteken (streep, ster, ruit, ...) zoals op de minikaart en in de standlijst (scene/biomes.js markSvg, als
   plaatje gezet door scene/car.js): de vorm in de spelerkleur met witte en inktrand */
.rv-tag i, .rv-behind i { display: block; flex: none; width: 19px; height: 19px; margin: -1px 0; background: center / contain no-repeat; }
.rv-tag i.off, .rv-behind i.off { display: none; }
/* de punt alleen tussen plek en naam (op de grid is er nog geen plek) */
.rv-tag b:not(:empty) + span::before { content: '· '; }
.rv-tag.dark, .rv-behind.dark .rv-chip { color: var(--cr-ink); text-shadow: none; }
.rv-behind { position: absolute; left: 0; bottom: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0;
  transform-origin: 50% 100%; transition: opacity .18s; will-change: transform, opacity; }
.rv-behind.on { opacity: 1; }
.rv-behind svg { width: 30px; height: 19px; overflow: visible; animation: rv-pulse .6s ease-in-out infinite alternate; }
.rv-behind path { fill: var(--pc, #fff); stroke: var(--cr-ink); stroke-width: 2.6; stroke-linejoin: round; }
.rv-behind .rv-chip { display: flex; align-items: center; gap: 4px; padding: 1px 8px 1px 2px; background: var(--pc, #fff); border: 2px solid var(--cr-ink); border-radius: 999px;
  color: #fff; font-family: var(--display); font-size: 13px; line-height: 17px; text-transform: uppercase; white-space: nowrap;
  text-shadow: 0 1px 0 var(--cr-ink), 0 -1px 0 var(--cr-ink), 1px 0 0 var(--cr-ink), -1px 0 0 var(--cr-ink); }
.rv-behind b { font-weight: 400; }
@keyframes rv-pulse { from { transform: translateY(2px); } to { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .rv-behind svg { animation: none; } }
/* groot scherm: even groot als de rest van de HUD (klok en standlijst) */
@media (min-width: 1100px) and (min-height: 640px) {
  .rv-tag { font-size: 20px; line-height: 26px; padding: 2px 13px 2px 3px; gap: 5px; border-width: 2.5px; }
  .rv-you b { font-size: 22px; line-height: 30px; padding: 0 13px; border-width: 2.5px; }
  .rv-tag b { min-width: 26px; height: 26px; padding: 0 6px; }
  .rv-tag i, .rv-behind i { width: 28px; height: 28px; }
  .rv-tag::after { bottom: calc(-9px - var(--st)); margin-left: -6px; border-width: 6px; border-bottom: 0; }
  .rv-tag.st::before { width: 4px; margin-left: -2px; height: calc(var(--sl) + 3px); box-shadow: 0 0 0 2px var(--cr-ink); }
  .rv-behind { bottom: 14px; }
  .rv-behind svg { width: 44px; height: 28px; }
  .rv-behind .rv-chip { font-size: 20px; line-height: 26px; padding: 2px 12px 2px 3px; }
}

/* Ouderpoort (1.2): som in woorden plus een eigen cijferblok, past ook op een liggende telefoon (390 px hoog) */
#confirm .pg-q { margin: 4px 0 6px; font-size: 17px; }
#confirm .pg-show { min-height: 30px; margin: 0 auto 8px; max-width: 200px; text-align: center; font-size: 24px; font-weight: 800; letter-spacing: .08em;
  border-radius: 10px; background: rgba(0, 0, 0, .25); padding: 2px 8px; }
#confirm .pg-show.bad { font-size: 14px; letter-spacing: 0; color: #ff8a8a; line-height: 26px; }
#confirm .pg-pad { display: grid; grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 6px; margin-bottom: 8px; }
#confirm .pg-k { min-height: 44px; padding: 0; font-size: 19px; font-weight: 800; }
#confirm .pg-k.big-btn { font-size: 15px; }
/* nav:2 (keuring nav2-13): in het nieuwe menu betekent paars diamanten. De ouderpoort komt na een gouden tik (echt geld)
   of voor een link naar buiten, dus geen paarse toetsen: cijfers, wissen en Annuleren neutraal (wit-grijs), OK goud */
:root.nav2 #confirm .confirm-box:is(:has(.pg-pad), :has(.pg-locked)) .ghost-btn {
  background: linear-gradient(180deg, #ffffff 0%, #f1edf8 45%, #e2dcef 52%, #c9c1dc 100%); color: #2a1450; text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), inset 0 -4px 0 rgba(40, 20, 80, .16), 0 5px 0 #8c82a8, 0 5px 0 2px #16042f; }
:root.nav2 #confirm .confirm-box:has(.pg-pad) .pg-k.big-btn {
  background: linear-gradient(180deg, #fff3a0 0%, #ffd43a 45%, #ffc21a 52%, #e89a00 100%); color: #2a1450; text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 -4px 0 rgba(140, 70, 0, .3), 0 5px 0 #8a5200, 0 5px 0 2px #16042f; }
:root.nav2 #confirm .confirm-box:is(:has(.pg-pad), :has(.pg-locked)) :is(.ghost-btn, .pg-k.big-btn):active { transform: translateY(3px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 2px 0 #8c82a8, 0 2px 0 2px #16042f; }
@media (max-height: 430px) { #confirm .confirm-box:has(.pg-pad) { padding-top: 10px; padding-bottom: 10px; } #confirm .confirm-box:has(.pg-pad) .dlg-ic { display: none; } #confirm .pg-q { margin: 0 0 4px; } }

/* 1.2: Tijdrit is de tweede knop naast de grote Live Race. Karts (RULES 3): elke kart heeft een koopknop, op slot met de
   vroege prijs (4x) en eronder in welke arena hij vrijkomt; bovenaan de lijst één regel uitleg (.ar-knote) */
#s-arena .ar-arena .ghost-btn.ar-trial { display: block; width: 100%; margin-top: 8px; min-height: 44px; font-size: 16px; font-weight: 800; }
@media (max-width: 720px) and (max-height: 420px) { #s-arena .ar-arena .ghost-btn.ar-trial { margin-top: 6px; } }
.ar-list > .ar-knote { margin: 0 4px 8px; font-size: 12.5px; }
.ar-carrow .ar-lock { display: block; }

/* ---------------- spelersideeen lijst A (5 nov 2026) ----------------
   A1 snelheidsmeter: rechts naast de klok (na de R van achteruit), onderaan op de hoogte van de klok. Niet boven de klok:
   daar staat de kart. Alleen transform en opacity bewegen; de ring loopt in stappen van 2% via stroke-dashoffset. */
.speedo { position: absolute; left: calc(100% + 1.2vw + 24px); bottom: -2px; width: max(56px, calc(var(--H, 390px) * .125)); aspect-ratio: 1;
  opacity: 0; transition: opacity .2s ease-out; pointer-events: none; font-size: max(56px, calc(var(--H, 390px) * .125));
  --sp-c: #fff; --sp-ink: var(--cr-ink, #071233); }
.speedo.on { opacity: 1; }
body.no-speedo .speedo { display: none; }
.speedo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.speedo path { fill: none; stroke-linecap: round; stroke-width: 6.5; }
.speedo .sp-bg { stroke: rgba(7, 18, 51, .62); stroke-width: 9; }
.speedo .sp-fg { stroke: var(--sp-c); stroke-dasharray: 100 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .35)); }
/* het getal iets kleiner en lager, waar de ring breder open is: drie cijfers raken de ring dan niet */
.speedo b { position: absolute; left: 0; right: 0; top: 27%; text-align: center; font-family: var(--tmnum); font-weight: 700; font-size: .32em; line-height: 1;
  color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .01em; transition: transform .06s ease-out;
  text-shadow: 0 2px 0 var(--sp-ink), 0 -1px 0 var(--sp-ink), 1.5px 0 0 var(--sp-ink), -1.5px 0 0 var(--sp-ink); }
.speedo small { position: absolute; left: 0; right: 0; top: 55%; text-align: center; font-family: var(--display); font-size: max(12px, .2em); line-height: 1;
  color: #fff; letter-spacing: .04em; text-shadow: 0 1px 0 var(--sp-ink), 0 0 2px var(--sp-ink); }
.speedo .sp-max { display: none; color: var(--sp-c); }
.speedo[data-lvl=max] .sp-u { display: none; }
.speedo[data-lvl=max] .sp-max { display: block; }
.speedo i { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); min-width: 1.35em; padding: 1px 0 0; border-radius: 6px; text-align: center;
  font-family: var(--tmnum); font-style: normal; font-weight: 700; font-size: max(12px, .2em); line-height: 1.15; color: var(--sp-ink); background: var(--sp-c);
  box-shadow: 0 0 0 1.5px var(--sp-ink); }
.speedo[data-lvl=mid] { --sp-c: #ffd23f; }
.speedo[data-lvl=hi] { --sp-c: #b6ff2a; }
.speedo[data-lvl=max] { --sp-c: #ffc928; }
.speedo[data-lvl=max] .sp-fg { filter: drop-shadow(0 0 4px rgba(255, 201, 40, .8)); }
.speedo.tick b { transform: scale(1.06); }
/* Rustig: alleen het getal (geen ring, geen tik) */
html[data-feel=calm] .speedo svg { display: none; }
html[data-feel=calm] .speedo.tick b { transform: none; }
@media (prefers-reduced-motion: reduce) { .speedo.tick b { transform: none; } }

/* A4 pops tijdens de rit: klein feestje boven de kart, op de plek van de inhaal-pop (hud.js laat ze nooit samen staan).
   Kleur van de vonkfase: oranje (x2), paars (x3); sprong cyaan, topsnelheid goud. */
.ride-pop { position: absolute; left: 50%; top: 27%; z-index: 4; pointer-events: none; opacity: 0; transform: translateX(-50%); }
.ride-pop b { display: block; padding: 2px 14px; border-radius: 10px; background: rgba(10, 11, 16, .72); font-family: var(--display); font-weight: 400;
  font-size: max(18px, calc(var(--H, 390px) * .052)); letter-spacing: .03em; white-space: nowrap; color: #fff;
  box-shadow: inset 0 0 0 2px var(--rp, #fff); text-shadow: 0 2px 0 var(--cr-ink, #071233); }
.ride-pop.drift.st1 { --rp: #ff9a1f; } .ride-pop.drift.st1 b { color: #ffc070; }
.ride-pop.drift.st2 { --rp: #c35cff; } .ride-pop.drift.st2 b { color: #e2b0ff; }
.ride-pop.air { --rp: #38e2ff; } .ride-pop.air b { color: #aef3ff; }
.ride-pop.top { --rp: #ffc928; } .ride-pop.top b { color: #ffe27a; }
.ride-pop.show { animation: ride-pop 1.2s ease-out both; }
@keyframes ride-pop { 0% { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.85); } 12% { opacity: 1; transform: translateX(-50%) scale(1.06); }
  22% { transform: translateX(-50%) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
.hud.photo-on .ride-pop, .hud.beat-on .ride-pop { visibility: hidden; }
/* Rustig en minder beweging: tekst zonder animatie (alleen aan en uit) */
html[data-feel=calm] .ride-pop.show { animation: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ride-pop.show { animation: none; opacity: 1; } }

/* A3 eindscherm: lichtpuntje onder de ondertitel en een grote trofeeënchip die optelt, het totaal klein eronder */
.f-bright { display: inline-block; margin-top: 6px; padding: 2px 12px; border-radius: 999px; background: rgba(7, 18, 51, .62); box-shadow: 0 0 0 1.5px rgba(255, 201, 40, .55);
  font-family: var(--display); font-size: clamp(14px, 1.9vw, 18px); letter-spacing: .03em; color: #ffe27a; text-shadow: 0 1.5px 0 var(--cr-ink, #071233); white-space: nowrap; }
.ar-sum .ar-chip.tr.big { flex-direction: column; align-items: center; gap: 0; padding: 4px 16px 5px; border-radius: 16px; line-height: 1; }
.ar-chip.tr.big .ar-tr-top { display: inline-flex; align-items: center; gap: 5px; font-size: 1.35em; }
.ar-chip.tr.big .ar-tr-top b { font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: left; }
.ar-chip.tr.big .ar-total { margin-top: 2px; font-size: 12px; font-family: var(--num); letter-spacing: .02em; }

/* Hot Wheels-baan (H-code): naam en stunts op de baankaart in oranje */
#s-setup .hs-head .hw-name { color: #ff8a2a; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.tc-stats .hw-chip { color: #ff9a3c; font-weight: 800; }

/* fase 3f: zes talen in Instellingen, elk in zijn eigen taal; op telefoon in twee rijen van drie */
#s-settings .set-lang .seg[data-key="lang"] { display: grid; grid-template-columns: repeat(6, auto); }
@media (max-width: 900px) { #s-settings .set-lang .seg[data-key="lang"] { grid-template-columns: repeat(3, 1fr); } }
