/* ==========================================================================
   KartShield Cyber — styles
   Fonts are self-hosted (no third-party requests — GDPR by design).
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "Orbitron"; font-weight: 500; font-display: swap; src: url("../fonts/orbitron-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Orbitron"; font-weight: 700; font-display: swap; src: url("../fonts/orbitron-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Orbitron"; font-weight: 900; font-display: swap; src: url("../fonts/orbitron-latin-900-normal.woff2") format("woff2"); }

:root {
  --yellow: #ffcc00;
  --yellow-deep: #f5a800;
  --red: #e52521;
  --red-deep: #b3120f;
  --green: #2fb344;
  --green-deep: #1d8a30;
  --blue: #0a8fe0;
  --blue-deep: #0564b0;

  --ink: #111118;
  --ink-2: #2b2b36;
  --muted: #5d5d6b;
  --paper: #fff8e6;
  --paper-2: #fff1c9;
  --card: #ffffff;
  --line: #111118;

  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-tech: "Orbitron", "Manrope", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 18px;
  --radius-lg: 28px;
  --border: 3px solid var(--line);
  --shadow: 6px 6px 0 var(--line);
  --shadow-sm: 3px 3px 0 var(--line);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 12px; }

.tech { font-family: var(--font-tech); letter-spacing: .04em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-tech); font-weight: 700; font-size: 12px;
  letter-spacing: .18em; text-transform: uppercase;
  padding: 7px 14px; border: var(--border); border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow-sm);
}
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47,179,68,.25); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(47,179,68,0); } }

h1, h2, h3, h4 { font-family: var(--font-sans); line-height: 1.05; margin: 0; letter-spacing: -0.025em; }
h2 { font-size: clamp(34px, 5vw, 60px); font-weight: 800; }
h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 60ch; }

.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-head { display: grid; gap: 18px; margin-bottom: 48px; max-width: 760px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: .06em; height: .38em; z-index: -1; border-radius: 6px; transform: skew(-8deg); }
.hl-y::after { background: var(--yellow); }
.hl-r::after { background: #ffb3b1; }
.hl-g::after { background: #a9ebb4; }
.hl-b::after { background: #9fd8fb; }

/* Buttons --------------------------------------------------------------- */
.btn {
  --bg: var(--yellow);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border: var(--border); border-radius: 14px;
  background: var(--bg); color: var(--ink);
  font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.btn-red { --bg: var(--red); color: #fff; }
.btn-blue { --bg: var(--blue); color: #fff; }
.btn-green { --bg: var(--green); color: #fff; }
.btn-white { --bg: #fff; }
.btn-ink { --bg: var(--ink); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 11px; }
.btn .arrow { transition: transform .2s; }

/* Racing stripe ---------------------------------------------------------- */
.stripe { display: grid; grid-template-columns: repeat(4, 1fr); height: 10px; }
.stripe span:nth-child(1) { background: var(--red); }
.stripe span:nth-child(2) { background: var(--yellow); }
.stripe span:nth-child(3) { background: var(--green); }
.stripe span:nth-child(4) { background: var(--blue); }

.checker {
  height: 24px;
  background-image: conic-gradient(var(--ink) 25%, #fff 0 50%, var(--ink) 0 75%, #fff 0);
  background-size: 24px 24px;
  border-block: var(--border);
}

/* Nav ------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 248, 230, .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo small { font-family: var(--font-tech); font-size: 10px; letter-spacing: .2em; display: block; color: var(--muted); font-weight: 700; line-height: 1; margin-top: 2px; }
.logo span { line-height: 1; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 10px; transition: background .15s; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; background: #fff; border: var(--border); border-radius: 12px; width: 46px; height: 46px; cursor: pointer; box-shadow: var(--shadow-sm); }
.menu-toggle span { display: block; width: 20px; height: 3px; background: var(--ink); margin: 4px auto; border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: var(--border); padding: 12px 20px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 12px; font-size: 18px; border-bottom: 1px dashed rgba(17,17,24,.2); border-radius: 0; }
  .nav-cta .btn-hide-sm { display: none; }
}

/* Hero ------------------------------------------------------------------ */
.hero { position: relative; padding: clamp(48px, 7vw, 88px) 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(17,17,24,.14) 1.3px, transparent 1.3px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(44px, 7vw, 92px); font-weight: 800; letter-spacing: -0.045em; line-height: .95; margin: 22px 0 22px; }
.hero h1 .word-red { color: var(--red); }
.hero h1 .word-blue { color: var(--blue); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 36px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 20px; height: 20px; }

.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 540px; justify-self: center; width: 100%; }
.hero-card {
  position: absolute; background: var(--card); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; font-weight: 700;
}
.hero-card .tech { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.hero-card strong { display: block; font-family: var(--font-tech); font-size: 30px; font-weight: 900; line-height: 1.1; }
.hc-1 { top: 4%; left: 0; transform: rotate(-4deg); animation: float 6s ease-in-out infinite; }
.hc-2 { bottom: 10%; right: -2%; transform: rotate(3deg); animation: float 7s ease-in-out -2s infinite; }
.hc-3 { bottom: 2%; left: 6%; transform: rotate(-2deg); animation: float 5.5s ease-in-out -1s infinite; background: var(--ink); color: #fff; }
.hc-3 .tech { color: var(--yellow); }
@keyframes float { 50% { translate: 0 -12px; } }
.hero-kart { position: absolute; inset: 8% 6% 12%; filter: drop-shadow(8px 10px 0 rgba(17,17,24,.9)); }
.hero-kart svg { width: 100%; height: 100%; }
.kart-bob { animation: bob .6s ease-in-out infinite alternate; transform-origin: center; }
@keyframes bob { to { transform: translateY(-5px); } }
.speed-lines line { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; animation: speed 1s linear infinite; }
.speed-lines line:nth-child(2) { animation-delay: -.3s; }
.speed-lines line:nth-child(3) { animation-delay: -.6s; }
@keyframes speed { from { transform: translateX(40px); opacity: 0; } 30% { opacity: 1; } to { transform: translateX(-80px); opacity: 0; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; }
}

/* Marquee --------------------------------------------------------------- */
.marquee { background: var(--ink); color: #fff; border-block: var(--border); overflow: hidden; margin-top: clamp(40px, 6vw, 72px); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 18px; padding: 18px 28px; font-family: var(--font-tech); font-weight: 700; font-size: 17px; letter-spacing: .1em; white-space: nowrap; }
.marquee-item i { width: 14px; height: 14px; border-radius: 4px; transform: rotate(45deg); display: inline-block; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Game ------------------------------------------------------------------ */
.game-section { background: var(--ink); color: #fff; overflow: hidden; }
.game-section::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: radial-gradient(60% 50% at 15% 10%, rgba(10,143,224,.35), transparent 60%),
              radial-gradient(50% 50% at 90% 90%, rgba(229,37,33,.3), transparent 60%);
}
.game-section .container { position: relative; }
.game-section .eyebrow { color: var(--ink); }
.game-section .lead { color: #c9c9d6; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
@media (max-width: 1000px) { .game-layout { grid-template-columns: 1fr; } }

.game-frame {
  position: relative; border: 4px solid #fff; border-radius: var(--radius-lg);
  overflow: hidden; background: #000; box-shadow: 10px 10px 0 var(--yellow);
  aspect-ratio: 16 / 10; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.game-frame canvas { width: 100%; height: 100%; image-rendering: auto; }
.game-frame:fullscreen { border-radius: 0; border: 0; aspect-ratio: auto; }

.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-tech); }
.hud-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hud-box { background: rgba(17,17,24,.78); border: 2px solid rgba(255,255,255,.9); border-radius: 12px; padding: 6px 12px; line-height: 1.15; }
.hud-box small { display: block; font-size: 9px; letter-spacing: .2em; color: var(--yellow); font-weight: 700; }
.hud-box b { font-size: clamp(14px, 2.2vw, 22px); font-weight: 900; }
.hud-left, .hud-right { display: flex; gap: 8px; }
.hud-item { width: clamp(46px, 7vw, 64px); height: clamp(46px, 7vw, 64px); border-radius: 14px; border: 3px solid #fff; background: rgba(17,17,24,.78); display: grid; place-items: center; font-size: clamp(20px, 3.4vw, 30px); position: relative; }
.hud-item.has { background: var(--yellow); border-color: var(--ink); box-shadow: 0 0 0 3px #fff; animation: itemglow 1s ease-in-out infinite alternate; }
@keyframes itemglow { to { box-shadow: 0 0 0 3px #fff, 0 0 18px 4px rgba(255,204,0,.8); } }
.hud-item small { position: absolute; bottom: -18px; font-size: 8px; letter-spacing: .14em; white-space: nowrap; color: #fff; }
.hud-shield { position: absolute; bottom: 14px; left: 14px; }
.hud-speed { position: absolute; bottom: 14px; right: 14px; text-align: right; }
.hud-speed b { font-size: clamp(22px, 4vw, 40px); }
.hud-shield .bar { width: clamp(90px, 16vw, 160px); height: 10px; border-radius: 6px; background: rgba(255,255,255,.2); overflow: hidden; margin-top: 4px; }
.hud-shield .bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), var(--yellow), var(--green)); transition: width .25s; }

.toast {
  position: absolute; left: 50%; top: 22%; transform: translate(-50%, -10px) scale(.95);
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 16px;
  padding: 10px 16px; box-shadow: 5px 5px 0 var(--ink); text-align: center; opacity: 0;
  transition: opacity .2s, transform .2s; max-width: min(90%, 420px); font-family: var(--font-sans);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast b { display: block; font-family: var(--font-tech); font-size: 14px; letter-spacing: .06em; }
.toast span { font-size: 13px; font-weight: 600; line-height: 1.35; display: block; }
.toast.good { border-color: var(--green-deep); box-shadow: 5px 5px 0 var(--green-deep); }
.toast.bad { border-color: var(--red-deep); box-shadow: 5px 5px 0 var(--red-deep); }

.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-tech); font-weight: 900; font-size: clamp(64px, 16vw, 160px); color: var(--yellow); text-shadow: 6px 6px 0 var(--ink), -2px -2px 0 var(--ink); pointer-events: none; }
.countdown.pop { animation: pop .7s ease-out; }
@keyframes pop { from { transform: scale(1.8); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); } }

.overlay {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at center, rgba(17,17,24,.55), rgba(17,17,24,.9));
  padding: 20px; pointer-events: auto;
}
.overlay[hidden] { display: none; }
.overlay-card { max-width: 520px; display: grid; gap: 14px; justify-items: center; }
.overlay-card h3 { font-family: var(--font-tech); font-size: clamp(22px, 4vw, 40px); font-weight: 900; letter-spacing: .02em; color: var(--yellow); text-shadow: 3px 3px 0 var(--red); }
.overlay-card p { color: #e5e5ee; font-size: clamp(13px, 1.6vw, 16px); }
.overlay-card .btn { pointer-events: auto; }
.lights { display: flex; gap: 10px; }
.lights i { width: 22px; height: 22px; border-radius: 50%; background: #333; border: 3px solid #fff; }
.lights i:nth-child(1) { background: var(--red); } .lights i:nth-child(2) { background: var(--yellow); }
.lights i:nth-child(3) { background: var(--green); } .lights i:nth-child(4) { background: var(--blue); }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.results div { background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.3); border-radius: 12px; padding: 8px; }
.results small { display: block; font-family: var(--font-tech); font-size: 9px; letter-spacing: .16em; color: var(--yellow); }
.results b { font-family: var(--font-tech); font-size: clamp(16px, 2.6vw, 24px); }
.overlay .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.kart-picker { display: flex; gap: 8px; }
.kart-picker button { width: 44px; height: 44px; border-radius: 12px; border: 3px solid #fff; cursor: pointer; background: var(--c); transition: transform .15s; }
.kart-picker button[aria-pressed="true"] { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px #fff; }

.touch-controls { display: none; position: absolute; bottom: 12px; left: 12px; right: 12px; justify-content: space-between; pointer-events: none; }
.touch-controls .grp { display: flex; gap: 10px; }
.touch-controls button { pointer-events: auto; width: 62px; height: 62px; border-radius: 50%; border: 3px solid #fff; background: rgba(17,17,24,.55); color: #fff; font-size: 22px; font-weight: 900; touch-action: none; }
.touch-controls button.go { background: rgba(47,179,68,.7); }
.touch-controls button.item { background: rgba(255,204,0,.8); color: var(--ink); }


.game-side { display: grid; gap: 16px; }
.side-card { background: #1c1c26; border: 2px solid #3a3a4a; border-radius: var(--radius); padding: 18px; }
.side-card h4 { font-family: var(--font-tech); font-size: 12px; letter-spacing: .18em; color: var(--yellow); margin-bottom: 12px; text-transform: uppercase; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.legend li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; font-size: 14px; line-height: 1.35; color: #d8d8e2; }
.legend li b { color: #fff; display: block; font-size: 14px; }
.legend .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 18px; border: 2px solid #fff; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 14px; color: #d8d8e2; align-items: center; }
kbd { font-family: var(--font-tech); font-size: 11px; font-weight: 700; background: #fff; color: var(--ink); border-radius: 6px; padding: 3px 7px; border-bottom: 3px solid #999; white-space: nowrap; }
.best { font-family: var(--font-tech); font-size: 26px; font-weight: 900; color: #fff; }

/* Services -------------------------------------------------------------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .services-grid { grid-template-columns: 1fr; } }
.svc {
  --c: var(--yellow);
  position: relative; background: var(--card); border: var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 26px; display: grid; gap: 14px; align-content: start;
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
}
.svc::before { content: ""; position: absolute; top: 0; right: 0; width: 120px; height: 120px; background: var(--c); border-bottom-left-radius: 100%; opacity: .18; transition: transform .3s; }
.svc-top { display: flex; align-items: center; justify-content: space-between; }
.svc-icon { width: 58px; height: 58px; border-radius: 16px; background: var(--c); border: var(--border); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.svc-icon svg { width: 30px; height: 30px; }
.svc-num { font-family: var(--font-tech); font-weight: 900; font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.svc p { color: var(--ink-2); font-size: 15.5px; }
.svc ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.svc li { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); }
.svc .stats { display: flex; gap: 6px; margin-top: 6px; }
.svc .stats span { flex: 1; font-family: var(--font-tech); font-size: 9px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.svc .stats i { display: block; height: 7px; border-radius: 4px; background: #eee; border: 1.5px solid var(--line); margin-top: 3px; position: relative; overflow: hidden; }
.svc .stats i::after { content: ""; position: absolute; inset: 0; width: var(--v); background: var(--c); }
.c-red { --c: var(--red); } .c-yellow { --c: var(--yellow); } .c-green { --c: var(--green); } .c-blue { --c: var(--blue); }
.c-red .svc-icon, .c-green .svc-icon, .c-blue .svc-icon { color: #fff; }

/* Regulations (track select) -------------------------------------------- */
.regs { background: var(--paper-2); border-block: var(--border); }
.reg-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.reg-tab {
  border: var(--border); border-radius: 14px; background: #fff; padding: 10px 18px; cursor: pointer;
  font-family: var(--font-tech); font-weight: 700; font-size: 14px; letter-spacing: .06em;
  box-shadow: var(--shadow-sm); transition: transform .15s, background .15s;
}
.reg-tab[aria-selected="true"] { background: var(--c, var(--yellow)); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.reg-tab.c-red[aria-selected="true"], .reg-tab.c-blue[aria-selected="true"], .reg-tab.c-green[aria-selected="true"] { color: #fff; }
.reg-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; background: #fff; border: var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 40px); }
.reg-panel[hidden] { display: none; }
@media (max-width: 860px) { .reg-panel { grid-template-columns: 1fr; } }
.reg-panel h3 { font-size: clamp(26px, 3.4vw, 38px); margin: 10px 0 12px; }
.reg-panel .tag { font-family: var(--font-tech); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.reg-panel p { color: var(--ink-2); }
.reg-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
.reg-facts div { border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--paper); }
.reg-facts small { display: block; font-family: var(--font-tech); font-size: 10px; letter-spacing: .14em; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.reg-facts b { font-size: 16px; line-height: 1.3; display: block; margin-top: 2px; }

.checklist { background: var(--ink); color: #fff; border-radius: 22px; padding: 22px; display: grid; gap: 12px; align-content: start; }
.checklist h4 { font-family: var(--font-tech); font-size: 13px; letter-spacing: .14em; color: var(--yellow); text-transform: uppercase; }
.checklist label { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 14.5px; line-height: 1.4; cursor: pointer; color: #e6e6ef; }
.checklist input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 7px; margin: 0; display: grid; place-items: center; cursor: pointer; background: transparent; }
.checklist input:checked { background: var(--green); border-color: var(--green); }
.checklist input:checked::after { content: ""; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.position { display: flex; align-items: center; gap: 14px; margin-top: 6px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.3); }
.position .place { font-family: var(--font-tech); font-weight: 900; font-size: 44px; line-height: 1; color: var(--yellow); min-width: 84px; }
.position .place sup { font-size: 18px; }
.position p { font-size: 13.5px; color: #cfcfdb; line-height: 1.4; }
.meter { height: 12px; border-radius: 8px; background: rgba(255,255,255,.15); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--yellow), var(--green)); transition: width .35s ease; }

/* Process (lap timeline) ------------------------------------------------ */
.laps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.laps::before { content: ""; position: absolute; top: 34px; left: 5%; right: 5%; height: 6px; background: repeating-linear-gradient(90deg, var(--ink) 0 18px, transparent 18px 30px); z-index: 0; }
@media (max-width: 960px) { .laps { grid-template-columns: 1fr; } .laps::before { display: none; } }
.lap { position: relative; z-index: 1; display: grid; gap: 12px; align-content: start; }
.lap-badge { width: 72px; height: 72px; border-radius: 50%; border: var(--border); background: var(--c); display: grid; place-items: center; font-family: var(--font-tech); font-weight: 900; font-size: 22px; box-shadow: var(--shadow-sm); }
.lap.c-red .lap-badge, .lap.c-blue .lap-badge, .lap.c-green .lap-badge { color: #fff; }
.lap .tech { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.lap p { font-size: 15px; color: var(--ink-2); }
@media (max-width: 960px) { .lap { grid-template-columns: 72px 1fr; column-gap: 18px; } .lap-badge { grid-row: span 3; } }

/* Why / EU -------------------------------------------------------------- */
.eu { background: var(--blue); color: #fff; border-block: var(--border); overflow: hidden; }
.eu .lead { color: #e7f4ff; }
.eu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .eu-grid { grid-template-columns: 1fr; } }
.eu .eyebrow { color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.stat { background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.55); border-radius: var(--radius); padding: 18px; }
.stat b { font-family: var(--font-tech); font-size: clamp(28px, 4vw, 42px); font-weight: 900; display: block; line-height: 1.1; color: var(--yellow); }
.stat span { font-size: 14.5px; font-weight: 600; }
.stars { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.stars svg { width: 100%; height: 100%; }
.stars .star { transform-origin: 250px 250px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pricing / Grand prix classes ------------------------------------------ */
.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
@media (max-width: 960px) { .classes { grid-template-columns: 1fr; } }
.cls { background: #fff; border: var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.cls.featured { background: var(--yellow); transform: translateY(-10px); }
.cls .cc { font-family: var(--font-tech); font-weight: 900; font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.cls .cc small { font-size: 18px; }
.cls .for { font-weight: 700; color: var(--ink-2); }
.cls ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; flex: 1; }
.cls li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 15px; line-height: 1.4; }
.cls li::before { content: ""; width: 20px; height: 20px; border-radius: 6px; background: var(--c, var(--green)); border: 2px solid var(--line); margin-top: 1px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ribbon { position: absolute; top: -16px; right: 20px; background: var(--red); color: #fff; border: var(--border); border-radius: 10px; padding: 4px 12px; font-family: var(--font-tech); font-size: 11px; font-weight: 700; letter-spacing: .14em; }

/* FAQ ------------------------------------------------------------------- */
.faq { display: grid; gap: 14px; max-width: 860px; margin-inline: auto; }
.faq details { background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 800; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-tech); font-weight: 900; font-size: 22px; width: 36px; height: 36px; flex: none; border-radius: 10px; border: 2px solid var(--line); display: grid; place-items: center; background: var(--yellow); transition: transform .2s; }
.faq details[open] summary::after { content: "−"; background: var(--green); color: #fff; }
.faq details p { padding: 0 24px 22px; color: var(--ink-2); }

/* Contact --------------------------------------------------------------- */
.contact { background: var(--red); color: #fff; border-top: var(--border); }
.contact .eyebrow { color: var(--ink); }
.contact .lead { color: #ffe3e2; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-points { display: grid; gap: 14px; margin-top: 30px; }
.contact-points div { display: flex; gap: 14px; align-items: center; font-weight: 700; }
.contact-points .ico { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--ink); border: var(--border); display: grid; place-items: center; flex: none; }
.contact-points .ico svg { width: 22px; height: 22px; }
.contact-points a { text-decoration: none; }
.contact-points a:hover { text-decoration: underline; }
.form { background: #fff; color: var(--ink); border: var(--border); border-radius: var(--radius-lg); box-shadow: 10px 10px 0 var(--ink); padding: clamp(22px, 4vw, 36px); display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: 14px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; padding: 12px 14px; border: 2.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 4px rgba(10,143,224,.35); border-color: var(--blue); background: #fff; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }
.form-note { font-size: 13px; color: var(--muted); }
.form-status { font-weight: 700; font-size: 15px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--green-deep); background: #e7f8ea; color: var(--green-deep); }
.form-status[hidden] { display: none; }

/* Footer ---------------------------------------------------------------- */
.footer { background: var(--ink); color: #cfcfdb; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer .logo { color: #fff; }
.footer .logo small { color: #9a9aab; }
.footer h4 { font-family: var(--font-tech); color: var(--yellow); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer p { font-size: 15px; margin-top: 14px; max-width: 34ch; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.badges span { font-family: var(--font-tech); font-size: 10px; font-weight: 700; letter-spacing: .12em; border: 1.5px solid #555566; border-radius: 8px; padding: 5px 8px; color: #e6e6ef; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 22px; border-top: 1px solid #2e2e3a; font-size: 14px; }
.footer-bottom button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; text-decoration: underline; font-size: 14px; }

/* Cookie / privacy notice ------------------------------------------------ */
.notice {
  position: fixed; left: 16px; bottom: 16px; z-index: 150; max-width: 420px;
  background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; display: grid; gap: 12px; font-size: 14.5px; line-height: 1.5;
}
.notice[hidden] { display: none; }
.notice b { font-family: var(--font-tech); font-size: 12px; letter-spacing: .14em; display: flex; align-items: center; gap: 8px; }
.notice .row { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .notice { left: 10px; right: 10px; bottom: 10px; max-width: none; } }

/* Reveal on scroll ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Legal pages ----------------------------------------------------------- */
.legal-hero { padding: 64px 0 40px; border-bottom: var(--border); background: var(--paper-2); }
.legal-hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 800; letter-spacing: -0.04em; margin: 18px 0 12px; }
.legal-hero p { color: var(--ink-2); }
.legal-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding: 56px 0 96px; align-items: start; }
@media (max-width: 900px) { .legal-wrap { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 96px; background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
@media (max-width: 900px) { .toc { position: static; } }
.toc h2 { font-family: var(--font-tech); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }
.toc a { text-decoration: none; font-weight: 600; }
.toc a:hover { text-decoration: underline; }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); margin: 44px 0 14px; scroll-margin-top: 96px; display: flex; gap: 12px; align-items: baseline; }
.prose h2 .n { font-family: var(--font-tech); font-size: 14px; font-weight: 900; background: var(--yellow); border: 2px solid var(--line); border-radius: 8px; padding: 2px 8px; letter-spacing: .04em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 6px; margin: 12px 0; }
.prose a { color: var(--blue-deep); font-weight: 700; }
.prose .callout { border: var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); padding: 18px 20px; margin: 20px 0; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: var(--border); border-radius: var(--radius); background: #fff; }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1.5px solid #e6e0cf; vertical-align: top; }
.prose th { background: var(--ink); color: #fff; font-family: var(--font-tech); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.prose tr:last-child td { border-bottom: 0; }

/* Additions ------------------------------------------------------------- */
.marquee-item:nth-child(4n+1) i { background: var(--yellow); }
.marquee-item:nth-child(4n+2) i { background: var(--red); }
.marquee-item:nth-child(4n+3) i { background: var(--green); }
.marquee-item:nth-child(4n+4) i { background: var(--blue); }
.c-ink { --c: var(--ink); }
.lap.c-ink .lap-badge { color: #fff; font-size: 28px; }
.kp-red { --c: var(--red); } .kp-yellow { --c: var(--yellow); } .kp-green { --c: var(--green); } .kp-blue { --c: var(--blue); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
img.ico { background: #fff; padding: 3px; object-fit: contain; }
.hud-item img { width: 70%; height: 70%; object-fit: contain; }
.overlay-card strong { color: #fff; }
.overlay-card .tech { color: var(--yellow); font-size: 12px; }
.game-frame:focus { outline: none; }
.svc .stats i::after { width: var(--v, 0%); transition: width 1s ease .2s; }
.checklist-cta { margin-top: 6px; justify-self: start; }

section[id], .section[id] { scroll-margin-top: 76px; }
.eu h2, .contact h2 { margin: 18px 0; }
@media (max-width: 640px) {
  .game-frame { aspect-ratio: 3 / 4; border-width: 3px; box-shadow: 6px 6px 0 var(--yellow); }
  .hud-top { top: 8px; left: 8px; right: 8px; }
  .hud-left, .hud-right { gap: 5px; }
  .hud-box { padding: 4px 7px; border-radius: 9px; }
  .hud-box small { font-size: 7px; letter-spacing: .12em; }
  .hud-box b { font-size: 13px; }
  .hud-speed b { font-size: 20px; }
  .hud-item { width: 44px; height: 44px; border-radius: 11px; }
  .overlay-card { gap: 10px; }
  .overlay-card p { font-size: 13px; }
  .results b { font-size: 15px; }
  .toast { top: 16%; }
}
.touch-hint { display: none; }
@media (hover: none) and (pointer: coarse) {
  .key-hint { display: none; }
  .touch-hint { display: block; }
}

/* ==========================================================================
   Interaction & device optimisation
   ========================================================================== */
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line); }
  .btn:hover .arrow { transform: translateX(4px); }
  .svc:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 10px 10px 0 var(--line); }
  .svc:hover::before { transform: scale(1.4); }
  .reg-tab:hover { transform: translateY(-2px); }
  .reg-tab[aria-selected="true"]:hover { transform: translate(2px, 2px); }
  .nav-links a:not(.btn):hover { background: var(--paper-2); }
  .svc-link:hover { gap: 12px; }
}
a, button, summary, label, input, select, textarea { -webkit-tap-highlight-color: rgba(10,143,224,.18); touch-action: manipulation; }

/* nav */
.nav-mobile-cta { display: none; }
@media (max-width: 960px) {
  .nav-links .nav-mobile-cta { display: block; padding-top: 14px; }
  .nav-links .nav-mobile-cta a { display: flex; border-bottom: var(--border); border-radius: 14px; font-size: 17px; padding: 14px 20px; }
  .nav-links { max-height: calc(100svh - 82px); overflow-y: auto; box-shadow: 0 16px 30px rgba(17,17,24,.15); }
}
.btn-hide-xs, .show-xs { display: none; }
.btn-hide-xs { display: inline-flex; }
@media (max-width: 480px) {
  .btn-hide-xs, .hide-xs { display: none; }
  .show-xs { display: inline; }
  .logo { font-size: 18px; }
}

/* touch sizes */
@media (pointer: coarse) {
  .btn { min-height: 48px; }
  .btn-sm { min-height: 44px; }
  .footer ul a, .toc a { display: inline-block; padding: 6px 0; }
  .footer ul { gap: 2px; }
  .faq summary { min-height: 60px; }
  .checklist label { padding: 4px 0; }
}

/* service card link */
.svc-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 800; text-decoration: none; justify-self: start; border-bottom: 3px solid var(--c); padding: 4px 0; transition: gap .2s; }

/* game side panel */
@media (max-width: 1000px) {
  .game-side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* in-frame tools */
.game-frame { scroll-margin-top: 90px; -webkit-user-select: none; -webkit-touch-callout: none; }
.frame-tools { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.frame-tools button {
  width: 40px; height: 40px; border-radius: 11px; border: 2px solid rgba(255,255,255,.9); background: rgba(17,17,24,.78);
  color: #fff; font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0;
}
@media (hover: hover) { .frame-tools button:hover { background: var(--yellow); color: var(--ink); border-color: var(--ink); } }
.game-frame:not([data-state="race"]) .frame-tools [data-action="pause"] { display: none; }
.game-frame[data-state="race"], .game-frame[data-state="countdown"] { touch-action: none; }
.overlay { z-index: 2; }
.touch-controls { z-index: 1; }

/* touch controls */
.touch-controls { display: none; }
.touch-controls button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.touch-controls button.is-down { transform: scale(.92); background: rgba(255,204,0,.9); color: var(--ink); }
@media (hover: none) and (pointer: coarse) {
  .touch-controls { display: flex; align-items: flex-end; }
  .touch-controls .grp { gap: 8px; }
  .touch-controls button { width: 60px; height: 60px; font-size: 20px; transition: transform .08s; }
}
/* phones in portrait: controls get their own bar so they never cover the kart */
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .game-frame { padding-bottom: 84px; background: #111118; }
  .game-frame canvas { border-bottom: 3px solid rgba(255,255,255,.9); }
  .hud { bottom: 84px; }
  .touch-controls { left: 0; right: 0; bottom: 0; height: 84px; padding: 0 10px; align-items: center; }
  .touch-controls .grp { gap: 6px; }
  .touch-controls button { width: 56px; height: 56px; }
  .frame-tools { top: auto; bottom: 22px; gap: 4px; }
  .frame-tools button { width: 38px; height: 38px; border-radius: 10px; font-size: 14px; }
}
@media (hover: none) and (pointer: coarse) and (orientation: portrait) and (max-width: 360px) {
  .touch-controls button { width: 50px; height: 50px; }
}
/* phones in landscape: fill the viewport height */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
  .game-frame { aspect-ratio: auto; height: calc(100svh - 96px); min-height: 260px; }
  .frame-tools { top: 8px; }
  .hud-top { top: 8px; }
  .overlay-card { gap: 8px; }
  .overlay-card h3 { font-size: 22px; }
  .overlay-card .lights { display: none; }
}

/* fullscreen (native + iOS fallback) */
.game-frame:fullscreen { max-height: none; width: 100%; height: 100%; box-shadow: none; }
.game-frame:-webkit-full-screen { width: 100%; height: 100%; border-radius: 0; border: 0; aspect-ratio: auto; }
.game-frame.is-fs {
  position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%; height: 100dvh;
  aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; margin: 0;
  padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
html.fs-lock, html.fs-lock body { overflow: hidden; overscroll-behavior: none; }

/* contact form fallback */
.form-status .status-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.form-status.is-error { border-color: var(--red-deep); color: var(--red-deep); background: #ffe9e8; }

/* legal pages: keep wide tables inside their scroll box */
.legal-wrap > * { min-width: 0; }
@media (max-width: 900px) { .legal-wrap { grid-template-columns: minmax(0, 1fr); } }

/* short landscape screens (phones sideways, small laptop windows) */
@media (orientation: landscape) and (max-height: 540px) {
  .game-frame { aspect-ratio: auto; height: calc(100svh - 96px); min-height: 250px; }
  .frame-tools, .hud-top { top: 8px; }
  .overlay-card { gap: 8px; }
  .overlay-card h3 { font-size: 22px; }
  .overlay-card .lights { display: none; }
  .overlay-card p { font-size: 13px; }
}

/* ==========================================================================
   X (Twitter) links + CA copy bar
   ========================================================================== */
.x-link {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--ink); color: #fff; border: var(--border); box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.x-link svg { width: 18px; height: 18px; }
@media (hover: hover) {
  .x-link:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line); background: #000; }
}
.x-link:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.nav-cta .menu-toggle { flex: none; }
.x-footer { width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--ink); border-color: #fff; box-shadow: none; }
.x-footer svg { width: 15px; height: 15px; }
.footer-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.btn-x svg { width: 16px; height: 16px; }
.footer-x { margin-top: 18px; }

/* CA bar */
.ca-wrap { margin-bottom: clamp(22px, 3vw, 34px); }
.ca-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; border: var(--border); border-radius: 16px;
  box-shadow: 5px 5px 0 var(--yellow); padding: 7px 7px 7px 7px;
  max-width: 760px;
}
.ca-label {
  flex: none; font-family: var(--font-tech); font-weight: 900; font-size: 13px; letter-spacing: .12em;
  background: var(--yellow); color: var(--ink); border-radius: 10px; padding: 9px 12px; line-height: 1;
}
.ca-value {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .02em;
  padding: 6px 4px; cursor: copy; user-select: all; -webkit-user-select: all;
}
.ca-bar.is-pending .ca-value { cursor: default; color: #b8b8c6; font-family: var(--font-tech); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; user-select: text; }
.ca-copy {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  background: var(--green); color: #fff; border: 2px solid #fff; border-radius: 10px;
  padding: 0 14px; font-weight: 800; font-size: 14px; cursor: pointer; transition: background .15s, transform .1s;
}
.ca-copy svg { width: 16px; height: 16px; }
.ca-copy:active { transform: scale(.96); }
.ca-copy:disabled { background: #3a3a48; color: #b8b8c6; border-color: #55556a; cursor: not-allowed; }
@media (hover: hover) { .ca-copy:not(:disabled):hover { background: var(--green-deep); } }
.ca-bar.is-copied { box-shadow: 5px 5px 0 var(--green); }
.ca-bar.is-copied .ca-copy { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.ca-x { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--ink); }
.ca-x svg { width: 17px; height: 17px; }
@media (hover: hover) { .ca-x:hover { background: var(--yellow); } }
@media (max-width: 520px) {
  .ca-bar { gap: 6px; padding: 5px; border-radius: 14px; }
  .ca-label { padding: 8px 9px; font-size: 11px; }
  .ca-value { font-size: 13px; }
  .ca-copy { padding: 0 10px; font-size: 13px; }
  .ca-copy svg { display: none; }
  .ca-x { width: 38px; height: 38px; }
}
