/* SQ-041: the "world" themes. Loaded after style.css.
   1. Shared rules for every world theme, keyed on html[data-kind="world"] (set by app.js).
   2. One token block per theme, on [data-theme="…"] so that a single card (the profile picker,
      a tile in "Kies jou wêreld") can show a theme too.
   Racing and Perdry keep their rules in style.css. */

/* ---------- 1. shared world-theme skin ---------- */
[data-kind="world"] .btn.go { border-radius: var(--btn-radius); }
[data-kind="world"] .btn.go:not(:disabled) { color: var(--go-ink); }
[data-kind="world"] .quickbtn .arr { border-radius: min(var(--btn-radius), 50%); background: var(--asphalt); color: var(--go-hi); }
[data-kind="world"] .btn.dark, [data-kind="world"] .navpill #switch { background: var(--asphalt); }
[data-kind="world"] .res-actions .btn, [data-kind="world"] .lap-nav #prev { border-radius: var(--btn-radius); }
[data-kind="world"] .weak li .btn.red { background: var(--asphalt); border-radius: var(--btn-radius); }
[data-kind="world"] .pit-card.repair .btn.red { border-radius: var(--btn-radius); }
[data-kind="world"] .goalring .ring .val { stroke: var(--light-green); }
[data-kind="world"] .badge-new, [data-kind="world"] .tile { background: var(--hero-bg); }
[data-kind="world"] .fx-lights { background: color-mix(in srgb, var(--asphalt) 88%, transparent); }
[data-kind="world"] .fx-wipe { background-image: none; background: repeating-linear-gradient(90deg, var(--asphalt-2) 0 90px, var(--go) 90px 180px); }
[data-kind="world"] .answer.sel .key { background: var(--asphalt); }

/* the level: 7 theme icons with the same tier colours (1–3 A, 4–5 B, 6–7 C) */
[data-kind="world"] .sl {
  border-radius: 0; width: 20px; height: 20px; background: var(--light-off);
  -webkit-mask: var(--lv-mask) center / contain no-repeat; mask: var(--lv-mask) center / contain no-repeat;
  box-shadow: none !important;
}
[data-kind="world"] .sl.on.g { background: var(--light-green); }
[data-kind="world"] .sl.on.a { background: var(--light-amber); }
[data-kind="world"] .sl.on.b { background: var(--light-blue); }
[data-kind="world"] .shift.big .sl { width: 46px; height: 46px; }
[data-kind="world"] .hero .sl { background: rgba(255,255,255,.2); }
[data-kind="world"] .hero .sl.on.g { background: var(--lit-hero-a, var(--light-green)); }
[data-kind="world"] .hero .sl.on.a { background: var(--lit-hero-b, var(--light-amber)); }
[data-kind="world"] .hero .sl.on.b { background: var(--lit-hero-c, var(--light-blue)); }
[data-kind="world"] .shift .sl.on { filter: drop-shadow(0 0 6px rgba(255,255,255,.35)); }
[data-kind="world"] .sl.on { animation: lvpop .35s cubic-bezier(.2,.8,.2,1); }
@keyframes lvpop { 0% { transform: scale(.5); } 60% { transform: scale(1.2); } }

/* the question bar: the theme's ground, its marker and its finish */
[data-kind="world"] .lapbar { background: var(--lap-bg, var(--hero-bg)); height: 80px; box-shadow: inset 0 2px 6px rgba(0,0,0,.3), 0 12px 24px -16px rgba(var(--shadow-tint), .7); }
[data-kind="world"] .lapbar .lane { border-top: 3px dashed rgba(255,255,255,.35); }
[data-kind="world"] .lapbar .flag { background: none; box-shadow: none; right: 22px; top: 14px; bottom: 14px; width: 44px; }
[data-kind="world"] .lapbar .flag svg { width: 100%; height: 100%; display: block; overflow: visible; }
[data-kind="world"] .lapbar .car { top: 12px; width: 70px; height: 56px; margin-left: -35px; }
[data-kind="world"] .lapbar .tick { background: rgba(255,255,255,.16); color: rgba(255,255,255,.85); }
[data-kind="world"] .lapbar .tick.done { background: rgba(255,255,255,.9); color: var(--asphalt); box-shadow: none; }
[data-kind="world"] .lapbar .tick.flag { background: var(--light-amber); color: var(--ink); }
[data-kind="world"] .lapbar .glow { background: linear-gradient(90deg, transparent, rgba(255,255,255,.7)); box-shadow: 0 0 12px rgba(255,255,255,.5); }
[data-kind="world"] .lapbar .lastlap { background: color-mix(in srgb, var(--asphalt) 90%, transparent); }

/* the child's own picture and the mascot */
.helmet.kit svg { overflow: visible; }
.mascot-svg svg { width: 100%; height: 100%; display: block; }
.res .award { width: 130px; height: 130px; margin-bottom: -4px; }
.garage .show .kit { width: 260px; height: 216px; }
.garage .show .mover { width: 150px; height: 104px; display: block; }
.garage .show .mover svg { width: 100%; height: 100%; display: block; }

/* the profile picker shows each child in their own theme */
.driver[data-kind="world"] { background: var(--hero-bg); border-color: transparent; }
.driver[data-kind="world"] .nm { font-family: var(--display); text-transform: var(--disp-case); }

/* ---------- "Kies jou wêreld" ---------- */
.worlds-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.worlds-note { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 10px 16px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1); font-size: 17px; }
.worlds-note .ic-svg { color: var(--green); }
.worlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.world {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px 16px;
  border: 0; border-radius: 26px; background: var(--hero-bg); color: #fff; cursor: pointer; font: inherit;
  box-shadow: 0 0 0 5px transparent, var(--sh-1); transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s;
}
.world:active { transform: scale(.97); }
.world.sel { box-shadow: 0 0 0 5px #FFC93C, var(--sh-2); }
.world .mface { width: 120px; height: 120px; filter: drop-shadow(0 12px 12px rgba(0,0,0,.35)); }
.world .mface svg { width: 100%; height: 100%; display: block; }
.world .wn { font-family: var(--display); font-style: var(--disp-style); font-weight: var(--disp-weight); text-transform: var(--disp-case); font-size: 24px; line-height: 1.1; }
.world .wm { font-size: 15px; color: rgba(255,255,255,.8); }
.world .wn { max-width: 100%; overflow-wrap: anywhere; }
.world[data-theme="dino"] .wn { font-size: 21px; }
.world .now { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: #FFC93C; color: #161B26; display: inline-flex; align-items: center; justify-content: center; }
.world .now .ic-svg { width: 20px; height: 20px; stroke-width: 3; }
.world:disabled { cursor: default; }
.theme-card .btn { margin-top: 12px; width: 100%; }
.theme-card .now-world { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.theme-card .now-world .mface { width: 56px; height: 56px; }
.theme-card .now-world .mface svg { width: 100%; height: 100%; display: block; }

/* ---------- 2. theme tokens ---------- */
/* Rugby: Stormie the rhino. Green and gold, Oswald capitals. */
[data-theme="rugby"] {
  --bg: #EEF5EF; --surface: #FFFFFF; --border: #DCE7DE; --ink: #13241A; --ink-2: #4B5D50;
  --asphalt: #0C3B20; --asphalt-2: #1B6B3A; --on-asphalt-2: #CFE5D6;
  --go: #F2B518; --go-hi: #FFD24D; --go-shadow: #B98A0C; --go-ink: #13241A; --go-ink-2: #5C4A00;
  --red: #D9482B; --red-hi: #F06A4C; --red-soft: #FDEAE4; --red-ink: #A3301A;
  --light-green: #2BB673; --light-amber: #F2A900; --light-blue: #1B6B3A; --light-off: #D5DAD3;
  --lit-hero-c: #A6E8BE;
  --cream: #FFF6DC; --field: #F5FAF6; --field-line: #DCE7DE;
  --display: "Oswald", "Figtree", system-ui, sans-serif; --disp-style: normal; --disp-case: uppercase; --disp-weight: 700; --disp-track: 0.02em;
  --btn-radius: 20px;
  --hero-bg: linear-gradient(165deg, #1B6B3A 0%, #0C3B20 100%);
  --lap-bg: repeating-linear-gradient(90deg, #2A8A4D 0 60px, #24804A 60px 120px);
  --page-tint-1: #D6EBDC; --page-tint-2: #FFF1C9;
  --shadow-tint: 12, 59, 32;
  --lv-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M4.6 19.4A10.5 6.5 -45 0 1 19.4 4.6A10.5 6.5 -45 0 1 4.6 19.4ZM8 15L15 8L16 9L9 16ZM9.7 12.3L11.7 14.3L10.9 15.1L8.9 13.1ZM13.1 8.9L15.1 10.9L14.3 11.7L12.3 9.7Z'/%3E%3C/svg%3E");
}

/* Krieket: Stompie the meerkat. Navy and cricket-ball red, Bree Serif. */
[data-theme="cricket"] {
  --bg: #F7F5EC; --surface: #FFFFFF; --border: #E6E1CF; --ink: #1C2333; --ink-2: #555C6B;
  --asphalt: #132B55; --asphalt-2: #244A86; --on-asphalt-2: #D3DDF0;
  --go: #C22F23; --go-hi: #E5483A; --go-shadow: #8E1F16; --go-ink: #FFFFFF; --go-ink-2: #FFE3DF;
  --red: #C22F23; --red-hi: #E5483A; --red-soft: #FBE7E4; --red-ink: #8E1F16;
  --light-green: #3FA34D; --light-amber: #E5A13A; --light-blue: #244A86; --light-off: #E2DDCB;
  --lit-hero-c: #9DBAF0;
  --cream: #FFF6DC; --field: #FBFAF4; --field-line: #E6E1CF;
  --display: "Bree Serif", Georgia, serif; --disp-style: normal; --disp-case: none; --disp-weight: 400; --disp-track: 0;
  --btn-radius: 20px;
  --hero-bg: linear-gradient(165deg, #244A86 0%, #132B55 100%);
  --lap-bg: linear-gradient(180deg, #3F8F4A 0%, #3F8F4A 30%, #D9C48E 30%, #D9C48E 70%, #3F8F4A 70%);
  --page-tint-1: #EEEADB; --page-tint-2: #DCE6F7;
  --shadow-tint: 19, 43, 85;
  --lv-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 3A9 9 0 1 0 12 21A9 9 0 1 0 12 3ZM8.4 5.2Q11.3 12 8.4 18.8L9.6 19.2Q12.7 12 9.6 4.8ZM15.6 5.2Q12.7 12 15.6 18.8L14.4 19.2Q11.3 12 14.4 4.8Z'/%3E%3C/svg%3E");
}
/* the red primary button carries white text and a white arrow */
[data-theme="cricket"] .quickbtn .arr { background: rgba(255,255,255,.18); color: #fff; }

/* Netbal: Gina the giraffe. Purple court and orange pill buttons, Baloo 2. */
[data-theme="netball"] {
  --bg: #FCF1F6; --surface: #FFFFFF; --border: #EEDCE7; --ink: #2A1838; --ink-2: #5F4E6B;
  --asphalt: #45196E; --asphalt-2: #7A3BB0; --on-asphalt-2: #E6D6F3;
  --go: #FF7A2E; --go-hi: #FFA25C; --go-shadow: #C2561A; --go-ink: #2A1838; --go-ink-2: #5C2A00;
  --red: #E0457B; --red-hi: #F2709C; --red-soft: #FDE6EF; --red-ink: #A3204F;
  --light-green: #2BB5A5; --light-amber: #FF9A3D; --light-blue: #7A3BB0; --light-off: #EBDCE5;
  --lit-hero-c: #D6A8FF;
  --cream: #FFF3E6; --field: #FDF7FA; --field-line: #EEDCE7;
  --display: "Baloo 2", "Figtree", system-ui, sans-serif; --disp-style: normal; --disp-case: none; --disp-weight: 800; --disp-track: 0;
  --btn-radius: 999px;
  --hero-bg: linear-gradient(165deg, #7A3BB0 0%, #45196E 100%);
  --lap-bg: linear-gradient(90deg, #3E8FD0 0 33%, #3784C4 33% 66%, #3E8FD0 66%);
  --page-tint-1: #F5E3EE; --page-tint-2: #FFE6D2;
  --shadow-tint: 69, 25, 110;
  --lv-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='white'/%3E%3Cpath d='M2.5 12H21.5M12 2.5c-4 4-4 15 0 19M12 2.5c4 4 4 15 0 19' stroke='black' stroke-width='1.4' fill='none'/%3E%3C/mask%3E%3Crect width='24' height='24' mask='url(%23m)'/%3E%3C/svg%3E");
}
.bibbtn { font-family: var(--display); }

/* Hokkie: Rattie the honey badger. Blue turf and yellow buttons, Chakra Petch capitals. */
[data-theme="hockey"] {
  --bg: #EDF5FA; --surface: #FFFFFF; --border: #D6E5EF; --ink: #0F2233; --ink-2: #4A5E6E;
  --asphalt: #0A3558; --asphalt-2: #1468A8; --on-asphalt-2: #CFE3F2;
  --go: #FFC21A; --go-hi: #FFE04D; --go-shadow: #B98C00; --go-ink: #0F2233; --go-ink-2: #5C4A00;
  --red: #E0533A; --red-hi: #F2765E; --red-soft: #FDEAE5; --red-ink: #A3301A;
  --light-green: #2BB673; --light-amber: #F2A900; --light-blue: #1468A8; --light-off: #D3DFE8;
  --lit-hero-c: #8CCBFF;
  --cream: #FFF8DC; --field: #F5F9FC; --field-line: #D6E5EF;
  --display: "Chakra Petch", "Figtree", system-ui, sans-serif; --disp-style: normal; --disp-case: uppercase; --disp-weight: 700; --disp-track: 0.01em;
  --btn-radius: 16px;
  --hero-bg: linear-gradient(165deg, #1468A8 0%, #0A3558 100%);
  --lap-bg: repeating-linear-gradient(90deg, #1E7CC4 0 60px, #1A72B6 60px 120px);
  --page-tint-1: #DDEBF4; --page-tint-2: #FFF4C9;
  --shadow-tint: 10, 53, 88;
  --lv-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 2.5L17.5 3.5L11.5 17Q9.5 21.5 4.5 21.5L3.5 19Q8 19 9.4 15.8Z'/%3E%3Ccircle cx='18.5' cy='18.5' r='3'/%3E%3C/svg%3E");
}

/* Ruimte: Nagi the bushbaby astronaut. The one dark theme: deep night surfaces, light text, gold pill buttons, Exo 2 capitals.
   Body text stays at least 4.5:1 on #151C3D. The rules after the tokens re-colour the surfaces that are white in every other theme. */
[data-theme="space"] {
  --bg: #0B1026; --surface: #151C3D; --border: #2A3366; --ink: #F1F3FF; --ink-2: #B8BEDD;
  --asphalt: #120F3A; --asphalt-2: #3A2F8F; --on-asphalt-2: #D4D0FF;
  --go: #FFB020; --go-hi: #FFD45C; --go-shadow: #B97A00; --go-ink: #1A1440; --go-ink-2: #4A3200;
  --red: #FF5C7A; --red-hi: #FF8FA3; --red-soft: #3A1834; --red-ink: #FF9AAE;
  --green: #4BE3B0; --green-soft: #10352F; --green-ink: #8AF2CF;
  --light-green: #4BE3B0; --light-amber: #FFC24B; --light-blue: #9C8CFF; --light-off: #3A4470;
  --lit-hero-c: #C3B8FF;
  --cream: #2C2660; --field: #1C2450; --field-line: #2E3974;
  --display: "Exo 2", "Figtree", system-ui, sans-serif; --disp-style: normal; --disp-case: uppercase; --disp-weight: 800; --disp-track: 0.01em;
  --btn-radius: 999px;
  --hero-bg: linear-gradient(165deg, #3A2F8F 0%, #120F3A 100%);
  --lap-bg: radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%) 0 0 / 90px 80px, radial-gradient(1px 1px at 70% 70%, #fff 50%, transparent 51%) 0 0 / 70px 80px, linear-gradient(90deg, #1E1A5E, #2B2380);
  --page-tint-1: #2A2470; --page-tint-2: #0F2E52;
  --shadow-tint: 0, 0, 8;
  --glass: rgba(255,255,255,.08); --glass-line: rgba(255,255,255,.16);
  --lv-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.8L14.9 8.2L21.8 8.9L16.6 13.5L18.1 20.4L12 16.8L5.9 20.4L7.4 13.5L2.2 8.9L9.1 8.2Z'/%3E%3C/svg%3E");
  color-scheme: dark;
}
[data-theme="space"] .btn:not(.go):not(.red):not(.dark), [data-theme="f1"] .btn:not(.go):not(.red):not(.dark) { background: var(--field); color: var(--ink); }
[data-theme="space"] .navpill, [data-theme="f1"] .navpill, [data-theme="space"] .goalring, [data-theme="f1"] .goalring { background: rgba(21,28,61,.88); }
[data-theme="space"] .navpill .btn, [data-theme="f1"] .navpill .btn { background: transparent; }
[data-theme="space"] .answer .key, [data-theme="f1"] .answer .key, [data-theme="space"] .tutor-opt .key, [data-theme="f1"] .tutor-opt .key { background: #2A3470; color: var(--ink); }
[data-theme="space"] .answer.sel, [data-theme="f1"] .answer.sel { background: color-mix(in srgb, var(--child) 16%, var(--surface)); }
[data-theme="space"] .answer.sel .key, [data-theme="f1"] .answer.sel .key, [data-theme="space"] .answer .amark, [data-theme="f1"] .answer .amark { background: var(--child); color: #fff; }
[data-theme="space"] .numbtn.sel, [data-theme="f1"] .numbtn.sel, [data-theme="space"] .tutor-methods .btn.sel, [data-theme="f1"] .tutor-methods .btn.sel { background: var(--ink); color: var(--asphalt); }
[data-theme="space"] .pit-card.repair .btn.red, [data-theme="f1"] .pit-card.repair .btn.red { color: #B4123A; }
[data-theme="space"] .toast, [data-theme="f1"] .toast { background: var(--asphalt-2); color: #fff; }
[data-theme="space"] .swatch, [data-theme="f1"] .swatch { border-color: var(--surface); }
[data-theme="space"] .worlds-note .ic-svg, [data-theme="f1"] .worlds-note .ic-svg { color: var(--green); }
[data-theme="space"] input, [data-theme="f1"] input, [data-theme="space"] textarea, [data-theme="f1"] textarea { color: var(--ink); }

/* Dinosourusse: Massie the baby Massospondylus. Jungle green and orange buttons, Luckiest Guy. */
[data-theme="dino"] {
  --bg: #F3F1E2; --surface: #FFFFFF; --border: #E3DFC6; --ink: #22261A; --ink-2: #5A5F4A;
  --asphalt: #1F3A16; --asphalt-2: #3E6B2C; --on-asphalt-2: #DCE8CF;
  --go: #F2802A; --go-hi: #FFA94D; --go-shadow: #B85A14; --go-ink: #22261A; --go-ink-2: #5C2E00;
  --red: #D9482B; --red-hi: #F06A4C; --red-soft: #FBE8E0; --red-ink: #A3301A;
  --light-green: #6DBE45; --light-amber: #F2A23A; --light-blue: #8A5A2B; --light-off: #DEDAC2;
  --lit-hero-c: #E6C08F;
  --cream: #FFF3DA; --field: #FAF9F0; --field-line: #E3DFC6;
  --display: "Luckiest Guy", "Figtree", system-ui, sans-serif; --disp-style: normal; --disp-case: none; --disp-weight: 400; --disp-track: 0.03em;
  --btn-radius: 24px;
  --hero-bg: linear-gradient(165deg, #3E6B2C 0%, #1F3A16 100%);
  --lap-bg: linear-gradient(180deg, #8C6A3E 0%, #7A5A32 50%, #6A4C2A 100%);
  --page-tint-1: #E7E3CC; --page-tint-2: #DDEBCF;
  --shadow-tint: 31, 58, 22;
  --lv-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 19.5L5 6.5M12 19.5V3M12 19.5L19 6.5' stroke='black' stroke-width='4.2' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='12' cy='19' r='3.6'/%3E%3C/svg%3E");
}
.patbtn { font-family: var(--display); font-size: 22px !important; min-width: 120px !important; }

/* Strand: Pikkie the African penguin. Ocean blue and coral pill buttons, Sniglet. */
[data-theme="beach"] {
  --bg: #FFF8E8; --surface: #FFFFFF; --border: #F2E4C4; --ink: #123040; --ink-2: #4C6170;
  --asphalt: #0A5478; --asphalt-2: #1590C2; --on-asphalt-2: #D2ECF7;
  --go: #FF6F61; --go-hi: #FF8F7A; --go-shadow: #C24A3E; --go-ink: #123040; --go-ink-2: #5C1A12;
  --red: #E0533A; --red-hi: #F2765E; --red-soft: #FDEAE5; --red-ink: #A3301A;
  --light-green: #2BB5A5; --light-amber: #FFB84D; --light-blue: #FF6F61; --light-off: #EFE3C8;
  --lit-hero-c: #FFB3A8;
  --cream: #FFF1D2; --field: #FFFBF2; --field-line: #F2E4C4;
  --display: "Sniglet", "Figtree", system-ui, sans-serif; --disp-style: normal; --disp-case: none; --disp-weight: 800; --disp-track: 0;
  --btn-radius: 999px;
  --hero-bg: linear-gradient(165deg, #1590C2 0%, #0A5478 100%);
  --lap-bg: linear-gradient(180deg, #2FA6D6 0%, #1E93C6 60%, #F7DFA6 60%, #EBCB86 100%);
  --page-tint-1: #FDEFD2; --page-tint-2: #D6EEF7;
  --shadow-tint: 10, 84, 120;
  --lv-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Cpath d='M12 22L2.5 11C2.5 5.5 7 2 12 2s9.5 3.5 9.5 9z' fill='white'/%3E%3Cpath d='M12 21L7 4.5M12 21V2.5M12 21l5-16.5' stroke='black' stroke-width='1.4' fill='none'/%3E%3C/mask%3E%3Crect width='24' height='24' mask='url(%23m)'/%3E%3C/svg%3E");
}

/* Formula 1 (SQ-051): a dark showroom. The child's driver gives the accent (--child), set by app.js.
   Shares the dark-surface rules above with Ruimte. */
[data-theme="f1"] {
  --bg: #0B0E17; --surface: #161B2A; --border: #262D44; --ink: #FFFFFF; --ink-2: #9AA3BC;
  --asphalt: #0B0E17; --asphalt-2: #262D44; --on-asphalt-2: #C9D0E3;
  --go: #FFC21A; --go-hi: #FFD24D; --go-shadow: #B98C00; --go-ink: #11141C; --go-ink-2: #4A3A00;
  --red: #FF4D5E; --red-hi: #FF7A87; --red-soft: #3A1620; --red-ink: #FF9AA5;
  --green: #3DDC84; --green-soft: #10301F; --green-ink: #8AF0B8;
  --light-green: #3DDC84; --light-amber: #FFB020; --light-blue: #4D8DFF; --light-off: #2E3550;
  --lit-hero-c: #8DB4FF;
  --cream: #252C45; --field: #1C2236; --field-line: #2C3452;
  --display: "Titillium Web", "Figtree", system-ui, sans-serif; --disp-style: italic; --disp-case: uppercase; --disp-weight: 700; --disp-track: 0.01em;
  --btn-radius: 14px;
  --hero-bg: radial-gradient(ellipse at 50% 15%, #3A4260 0%, #161B2A 55%, #0B0E17 100%);
  --lap-bg: linear-gradient(180deg, #2A2F3A 0%, #2A2F3A 44%, #F2F3F5 44%, #F2F3F5 48%, #23272F 48%, #23272F 100%);
  --page-tint-1: #1C2338; --page-tint-2: #121726;
  --shadow-tint: 0, 0, 6;
  --glass: rgba(255,255,255,.08); --glass-line: rgba(255,255,255,.16);
  --lv-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='2' width='14' height='20' rx='7'/%3E%3C/svg%3E");
  color-scheme: dark;
}
/* the radio bubble and the helmet in place of a mascot */
[data-theme="f1"] .bubble::before { content: "SPANRADIO"; display: block; position: static; border: 0; width: auto; height: auto; font-size: 12px; font-weight: 900; letter-spacing: 1.5px; color: var(--child); margin-bottom: 2px; }
[data-theme="f1"] .blits .face { animation: none; }
.f1-helmet svg, .mascot-svg.f1 svg { width: 100%; height: 100%; display: block; }
/* the question bar: the car is long and low */
[data-theme="f1"] .lapbar .car { width: 128px; height: 30px; top: 24px; margin-left: -64px; }
[data-theme="f1"] .lapbar .car svg { width: 100%; height: 100%; display: block; }
/* the avatar screen's showroom */
.f1-show { position: relative; width: 100%; height: 100%; min-height: 190px; color: #fff; }
.f1-show .f1-id { position: absolute; left: 4px; top: 0; display: flex; align-items: baseline; gap: 12px; z-index: 1; }
.f1-show .f1-num { font-family: "Titillium Web", sans-serif; font-style: italic; font-weight: 900; font-size: 64px; line-height: .9; color: var(--acc); }
.f1-show .f1-name { display: flex; flex-direction: column; }
.f1-show .first { font-family: "Titillium Web", sans-serif; font-weight: 700; font-size: 20px; line-height: 1; color: #C9D0E3; }
.f1-show .last { font-family: "Titillium Web", sans-serif; font-weight: 900; font-size: 34px; line-height: 1; text-transform: uppercase; }
.f1-show .team { font-size: 15px; color: #9AA3BC; margin-top: 4px; }
.f1-show .f1-car { position: absolute; left: -4px; right: -4px; bottom: 0; }
.f1-show .f1-car svg { width: 100%; height: auto; display: block; }
.f1-show .f1-hel { position: absolute; right: 0; top: 4px; width: 34%; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 13px; color: #9AA3BC; }
.f1-show .f1-hel svg { width: 100%; height: auto; display: block; }
/* a short, wide hero (tablet upright): the car on the left, the helmet beside it */
@media (orientation: portrait) {
  .f1-show .f1-car { right: 36%; }
  .f1-show .f1-hel { width: min(32%, 170px); }
  .f1-show .f1-num { font-size: 48px; }
  .f1-show .last { font-size: 28px; }
}
/* "Kies jou jaer": the grid as team cards with two drivers each */
.f1-grid { flex: 1 1 100%; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.f1-team { display: flex; border-radius: 16px; background: var(--field); overflow: hidden; }
.f1-team .stripe { width: 8px; flex: none; }
.f1-team .in { flex: 1; min-width: 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.f1-team .tn { font-size: 14px; font-weight: 900; color: var(--ink-2); letter-spacing: .5px; }
.f1-team .ds { display: flex; gap: 6px; }
.drvbtn { flex: 1 1 0; min-width: 0; min-height: 52px; border-radius: 12px; border: 2px solid transparent; background: var(--surface); color: var(--ink); display: flex; align-items: center; gap: 6px; padding: 0 8px; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.drvbtn .n { font-family: "Titillium Web", sans-serif; font-style: italic; font-weight: 900; font-size: 19px; }
.drvbtn .f { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.drvbtn .f small, .drvbtn .f b { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drvbtn .f small { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.drvbtn .f b { font-size: 15px; }
.drvbtn.sel { border-color: var(--go-hi); background: #2E3756; }
