/* Garage Racers — a workshop: concrete and steel, a warm orange for what you can press, the race
   itself full screen. Light and dark follow the system unless the player picks one. */
:root {
  color-scheme: light;
  --bg: #eef0f2;
  --bg2: #e2e5e9;
  --surface: #ffffff;
  --surface2: #f5f6f8;
  --text: #191c21;
  --muted: #545b66;
  --line: rgba(25, 28, 33, 0.12);
  --accent: #b8470c; /* white text on it: 5.3:1 */
  --accent-hi: #ff7a1f;
  --accent-ink: #9a3a08;
  --good: #1f7a3c;
  --warn: #9a6400;
  --bad: #b3261e;
  --gold: #c99a1a;
  --silver: #8a949e;
  --bronze: #a8612e;
  --shadow: 0 14px 34px -18px rgba(20, 24, 30, 0.45);
  --ca-accent: #b8470c; /* the accounts SDK's sheets and chip */
  --font: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --bar-h: calc(64px + var(--safe-t));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14171c; --bg2: #0f1115; --surface: #1d2128; --surface2: #252a32; --text: #eef1f5; --muted: #a9b1bd;
    --line: rgba(255, 255, 255, 0.11); --accent-ink: #ff9a52; --good: #5fd08a; --warn: #f0b84a; --bad: #ff8a80;
    --shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14171c; --bg2: #0f1115; --surface: #1d2128; --surface2: #252a32; --text: #eef1f5; --muted: #a9b1bd;
  --line: rgba(255, 255, 255, 0.11); --accent-ink: #ff9a52; --good: #5fd08a; --warn: #f0b84a; --bad: #ff8a80;
  --shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.8);
}
* { box-sizing: border-box; }
/* no double-tap zoom on iOS: js/touch-guard.js adds the same rule plus a JS fallback; this copy
   covers Safari before 16.4 under the strict CSP */
:where(html, body, body *) { touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: calc(100dvh / var(--ca-zoom, 1)); background: var(--bg); color: var(--text);
  font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* a game page: no text selection or long-press callouts anywhere, HUD and menus included; form
   fields and long text (the Help sheet) opt back in */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, [contenteditable], .help p { -webkit-user-select: text; user-select: text; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent-hi); outline-offset: 2px; }
[hidden] { display: none !important; }
i[data-icon] { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; flex: none; }
i[data-icon] svg { width: 100%; height: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- the race canvas */
.stage { position: fixed; inset: 0; width: calc(100vw / var(--ca-zoom, 1)); height: calc(100vh / var(--ca-zoom, 1)); height: calc(100dvh / var(--ca-zoom, 1)); display: block; z-index: 0; background: #3d4a2c; }
body:not(.mode-race):not(.mode-results) .stage { visibility: hidden; }

/* ---------------------------------------------------------------- top bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; gap: 10px;
  padding: var(--safe-t) calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l));
  background: linear-gradient(to bottom, var(--bg) 55%, color-mix(in srgb, var(--bg) 0%, transparent));
  /* the bar's round buttons (the SDK's tools, Back, Pause) in the look of the coins pill */
  --ca-tool-bg: var(--surface); --ca-tool-line: var(--line); --ca-tool-hover: var(--surface2);
}
/* the bar (App Standard §4.1): the SDK's brand, then Back or Pause and the coins, the SDK's tools and
   chip at the far end; the brand gives way first (its name goes, the icon stays) */
.bar-mid { display: flex; align-items: center; gap: 8px; flex: none; }
.bar > .ca-end { margin-left: auto; }
/* (the bar's look shows a .ca-tool with !important: Back and Pause hide by their hidden attribute) */
.bar .ca-tool[hidden] { display: none !important; }
.mode-race .bar, .mode-results .bar { background: none; pointer-events: none; }
.mode-race .bar > *, .mode-results .bar > * { pointer-events: auto; }
/* in a race the bar is the mark, the game's icon, Pause and the chip (with Talk in an online race),
   over the track: light on dark glass; Help, Results and Settings wait behind Pause and the menu */
.mode-race .coins, .mode-race .bar .ca-brand-name, .mode-race .bar .ca-tools-app { display: none !important; }
.mode-race .bar { color: #fff; --ca-tool-bg: rgba(20, 23, 28, 0.62); --ca-tool-line: rgba(255, 255, 255, 0.18); --ca-tool-ink: #fff; --ca-tool-hover: rgba(20, 23, 28, 0.78); }
.mode-race .bar .ca-tool { backdrop-filter: blur(6px); }
html[data-ca-lite] .mode-race .bar .ca-tool { backdrop-filter: none; }
.coins {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.coins i { color: var(--gold); }
.coins.bump { animation: bump 0.45s ease; }
@keyframes bump { 40% { transform: scale(1.14); } }

/* ---------------------------------------------------------------- screens */
main { position: relative; z-index: 1; }
.screen { min-height: calc(100dvh / var(--ca-zoom, 1)); padding: var(--bar-h) calc(16px + var(--safe-r)) calc(24px + var(--safe-b)) calc(16px + var(--safe-l)); }
.screen.enter { animation: enter 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

/* the hero: the workshop canvas */
.hero { position: relative; border-radius: 22px; overflow: hidden; background: #2a2f37; box-shadow: var(--shadow); }
.hero-canvas { display: block; width: 100%; height: clamp(230px, calc(42vh / var(--ca-zoom, 1)), 420px); }
.home .hero-canvas { height: clamp(230px, calc(38vh / var(--ca-zoom, 1)), 420px); }
.hero-text { position: absolute; left: 18px; top: 14px; right: 18px; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); pointer-events: none; }
.kicker { margin: 0; font-weight: 850; font-style: italic; text-transform: uppercase; letter-spacing: 0.02em; font-size: 15px; opacity: 0.92; }
.ride { margin: 2px 0 0; font-size: 22px; font-weight: 800; }
.ride small { display: block; font-size: 13px; font-weight: 600; opacity: 0.85; }

.home { display: flex; flex-direction: column; gap: 14px; }
.continue {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border: 0; border-radius: 16px;
  background: var(--accent); color: #fff; font-weight: 750; box-shadow: var(--shadow);
}
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
  min-height: 78px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile i { grid-row: 1 / 3; width: 42px; height: 42px; padding: 9px; border-radius: 13px; background: var(--surface2); color: var(--accent-ink); }
.tile b { font-size: 16px; line-height: 1.2; }
/* a long word (Akadálypályák) is hyphenated where the browser can, broken where it cannot */
.tile b, .tile small { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.tile small { color: var(--muted); font-size: 13px; line-height: 1.25; }
.tile:hover { transform: translateY(-2px); }
.tile:active { transform: scale(0.98); }
.tile-records { grid-column: 1 / -1; min-height: 60px; }
.tile-race { grid-column: 1 / -1; background: linear-gradient(120deg, var(--accent) 0%, #d8601c 100%); color: #fff; border: 0; }
.tile-race i { background: rgba(255, 255, 255, 0.18); color: #fff; }
.tile-race small { color: rgba(255, 255, 255, 0.88); }
.tile-online i { color: #2b6fd6; }
/* a child's profile hides the online tile (data-social, App Standard §4.13): the derby takes its row alone */
html.ca-kid .tile-derby { grid-column: 1 / -1; }
:root[data-theme="dark"] .tile-online i { color: #8ab8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile-online i { color: #8ab8ff; } }
@media (min-width: 900px) {
  .home { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; gap: 18px; }
  .home .hero-canvas { height: min(calc(68vh / var(--ca-zoom, 1)), 620px); }
  .home .continue { grid-column: 2; }
  .home .tiles { grid-column: 2; grid-row: 1; }
}
/* a laptop, a monitor or a TV: the workshop takes the screen's height below the bar, the ways out
   of it beside it share that height (no empty band under either) */
@media (min-width: 900px) and (orientation: landscape) and (min-height: 600px) {
  .home .hero-canvas { height: min(calc(calc(100dvh / var(--ca-zoom, 1)) - var(--bar-h) - 28px - var(--safe-b)), 820px); }
  .home .tiles { align-self: stretch; grid-auto-rows: 1fr; }
  .home .tile { align-content: center; }
  .home:has(> .continue:not([hidden])) { grid-template-rows: minmax(0, 1fr) auto; }
  .home:has(> .continue:not([hidden])) .hero { grid-row: 1 / span 2; }
}
@media (max-width: 360px) { .tiles { grid-template-columns: 1fr; } .tile-race { grid-column: auto; } }
/* a short phone upright (iPhone SE and smaller): the workshop gives way to the ways out of it —
   a lower hero, two tiles a row, the subtitles only on the race */
@media (orientation: portrait) and (max-height: 700px) {
  .home { gap: 10px; }
  .home .hero-canvas { height: clamp(116px, calc(22vh / var(--ca-zoom, 1)), 220px); }
  .home .hero-text { left: 14px; top: 10px; right: 14px; }
  .home .kicker { font-size: 12.5px; }
  .home .ride { font-size: 19px; }
  .home .ride small { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { min-height: 0; padding: 10px 12px; column-gap: 10px; }
  .tile i { width: 36px; height: 36px; padding: 8px; border-radius: 11px; }
  .tile b { font-size: 15px; }
  .tile small { display: none; }
  .tile:not(.tile-race):not(.tile-records) b { grid-row: 1 / -1; }
  .tile-race, .tile-records { grid-column: 1 / -1; }
  .tile-race small, .tile-records small { display: block; }
}
/* … and narrow too: the icon over the label, so a long word (Akadálypályák) keeps its room */
@media (orientation: portrait) and (max-height: 700px) and (max-width: 400px) {
  .tile:not(.tile-race):not(.tile-records) { grid-template-columns: minmax(0, 1fr); row-gap: 6px; align-content: start; }
  .tile:not(.tile-race):not(.tile-records) i, .tile:not(.tile-race):not(.tile-records) b { grid-row: auto; }
  .tile b { font-size: 14.5px; }
}
/* a phone on its side: the workshop on the left, the ways out on the right, all in view */
@media (orientation: landscape) and (max-height: 500px) {
  .home { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; gap: 12px; }
  .home .hero { grid-row: 1 / span 2; }
  .home .hero-canvas { height: max(180px, calc(calc(100dvh / var(--ca-zoom, 1)) - var(--bar-h) - 24px - var(--safe-b))); }
  .home .continue { grid-column: 2; min-height: 46px; }
  .home .tiles { grid-column: 2; grid-template-columns: 1fr 1fr; gap: 8px; }
  .home .kicker { font-size: 12.5px; }
  .home .ride { font-size: 19px; }
  .tile { min-height: 0; padding: 9px 12px; column-gap: 10px; }
  .tile i { width: 34px; height: 34px; padding: 7px; border-radius: 11px; }
  .tile b { font-size: 14.5px; }
  .tile small { display: none; }
  .tile b { grid-row: 1 / -1; }
  .tile-race, .tile-records { grid-column: auto; }
}
/* … and only 320 px tall and narrow: the ways out take the whole width, with their subtitles */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 620px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home .hero { display: none; }
  .home .continue, .home .tiles { grid-column: 1; }
  .tile small { display: block; font-size: 12.5px; }
  .tile b { grid-row: auto; }
}

/* pills and buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 14px; border: 0; background: var(--accent); color: #fff; font-weight: 750;
}
.btn.soft { background: var(--surface2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--accent-ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(18, 21, 26, 0.6); color: #fff; font-weight: 650; font-size: 14px;
  backdrop-filter: blur(8px); white-space: nowrap;
}
.pill.accent { background: var(--accent); border-color: transparent; }
.pill.danger { color: #ffb4ab; }
.pill[aria-pressed="true"] { background: rgba(255, 255, 255, 0.92); color: #191c21; }
html[data-ca-lite] .pill { backdrop-filter: none; }

/* ---------------------------------------------------------------- garage */
.garage { padding-left: 0; padding-right: 0; }
.garage-hero { margin: 0 calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l)); }
.garage-hero .hero-canvas { height: clamp(220px, calc(36vh / var(--ca-zoom, 1)), 380px); }
/* a phone on its side: a lower workshop, so the parts' tabs show under it */
@media (orientation: landscape) and (max-height: 500px) { .garage-hero .hero-canvas { height: max(176px, calc(52vh / var(--ca-zoom, 1))); } }
.vehicles { position: absolute; left: 0; right: 0; top: 0; display: flex; gap: 8px; padding: 12px; overflow-x: auto; scrollbar-width: none; }
.vehicles::-webkit-scrollbar { display: none; }
.veh {
  flex: none; display: grid; grid-template-columns: auto auto; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px 4px 6px;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(18, 21, 26, 0.55); color: #fff; font-size: 13px; font-weight: 650;
  backdrop-filter: blur(8px);
}
.veh canvas { width: 46px; height: 28px; display: block; }
.veh[aria-selected="true"] { background: #fff; color: #191c21; }
.veh .cur { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-hi); margin-left: 2px; }
.veh.add { grid-template-columns: auto; padding: 0 12px; }
.hero-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 12px; overflow-x: auto; scrollbar-width: none; }
.hero-actions::-webkit-scrollbar { display: none; }
.garage-body { padding: 0 calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l)); }
.slots {
  position: sticky; top: var(--bar-h); z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 10px; margin-bottom: 4px;
  background: linear-gradient(to bottom, var(--bg) 80%, transparent); scrollbar-width: none;
}
.slots::-webkit-scrollbar { display: none; }
.slot {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 14px;
}
.slot[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: transparent; }
.slot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-hi); }
.garage-cols { display: grid; gap: 14px; }
@media (min-width: 820px) { .garage-cols { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .stats-col { position: sticky; top: calc(var(--bar-h) + 64px); } }
.slot-hint { margin: 2px 2px 10px; color: var(--muted); font-size: 14px; }
.parts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.part {
  position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; padding: 12px; text-align: left;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 8px 20px -16px rgba(0, 0, 0, 0.5);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.part:hover { transform: translateY(-1px); }
.part[aria-pressed="true"] { border-color: var(--accent-hi); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-hi) 45%, transparent), 0 8px 20px -16px rgba(0, 0, 0, 0.5); }
.part.preview { border-color: color-mix(in srgb, var(--accent-hi) 60%, var(--line)); }
.part .art { grid-row: 1 / 4; width: 64px; height: 64px; border-radius: 12px; background: var(--surface2); display: block; }
.part b { font-size: 15px; line-height: 1.2; }
.part p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.3; }
.part .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: var(--surface2); color: var(--muted); }
.tag.up { color: var(--good); }
.tag.down { color: var(--bad); }
.tag.state { background: color-mix(in srgb, var(--accent-hi) 16%, transparent); color: var(--accent-ink); }
.tag.price { color: var(--text); }
.tag.price i { color: var(--gold); width: 1em; height: 1em; }
.tag.no { color: var(--muted); font-weight: 600; }
.part .act { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 8px; }
.part .act .btn { min-height: 40px; padding: 0 14px; font-size: 14px; flex: 1; }
.grips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-top: 6px; }
.grip { display: grid; gap: 2px; font-size: 10.5px; color: var(--muted); text-align: center; }
.grip span { height: 5px; border-radius: 3px; background: var(--surface2); overflow: hidden; position: relative; }
.grip span::after { content: ""; position: absolute; inset: 0; width: var(--g, 50%); background: linear-gradient(90deg, #3a8f5b, #7bd389); border-radius: 3px; }

.stats-col { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.stats-col h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.stat { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 8px 0; font-size: 14px; }
.stat b { font-weight: 650; }
.stat em { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 750; }
.stat em.up { color: var(--good); }
.stat em.down { color: var(--bad); }
.bar-track { grid-column: 1 / -1; position: relative; height: 9px; border-radius: 5px; background: var(--surface2); overflow: hidden; }
.bar-fill, .bar-ghost { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; transform-origin: left; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); width: 100%; }
.bar-fill { background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }
.bar-ghost { background: var(--good); opacity: 0.55; }
.bar-ghost.down { background: var(--bad); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.fact { background: var(--surface2); border-radius: 12px; padding: 8px; text-align: center; }
.fact small { display: block; color: var(--muted); font-size: 12px; }
.fact b { font-variant-numeric: tabular-nums; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent-hi); }
.paint-group { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.paint-group h3 { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface2); font-weight: 650; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.num-row { display: flex; align-items: center; gap: 10px; }
.num-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.num-row b { min-width: 2.5ch; text-align: right; font-variant-numeric: tabular-nums; font-size: 18px; }

/* ---------------------------------------------------------------- events */
.tabs { position: sticky; top: var(--bar-h); z-index: 5; display: flex; gap: 6px; padding: 8px 0 12px; background: linear-gradient(to bottom, var(--bg) 80%, transparent); }
.tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: transparent; }
.tracks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.track {
  display: grid; grid-template-columns: 112px 1fr; gap: 4px 14px; padding: 12px; text-align: left;
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.track canvas { grid-row: 1 / 5; width: 112px; height: 112px; border-radius: 14px; display: block; }
.track b { font-size: 17px; }
.track p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.3; }
.track .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.medal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; }
.medal.gold { background: radial-gradient(circle at 35% 30%, #ffe48a, var(--gold)); }
.medal.silver { background: radial-gradient(circle at 35% 30%, #f3f5f7, var(--silver)); }
.medal.bronze { background: radial-gradient(circle at 35% 30%, #f0b88a, var(--bronze)); }
.setup { display: grid; gap: 4px; }
.setup .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--surface2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { min-width: 44px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.4); color: var(--accent-ink); }
.veh-pick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.veh-pick button { flex: none; display: grid; justify-items: center; gap: 2px; padding: 6px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); font-size: 12px; font-weight: 650; min-width: 88px; }
.veh-pick button[aria-pressed="true"] { border-color: var(--accent-hi); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-hi) 45%, transparent); }
.veh-pick canvas { width: 70px; height: 40px; display: block; }
.medals-line { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- HUD */
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; color: #fff; }
.hud-top { position: absolute; top: calc(10px + var(--safe-t)); left: calc(64px + var(--safe-l)); right: calc(10px + var(--safe-r)); display: flex; align-items: flex-start; gap: 8px; }
.hud-box { background: rgba(14, 16, 20, 0.62); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 6px 12px; backdrop-filter: blur(6px); line-height: 1.1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
html[data-ca-lite] .hud-box { backdrop-filter: none; background: rgba(14, 16, 20, 0.78); }
.hud-place b { font-size: 30px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; }
.hud-place span { font-size: 15px; font-weight: 700; opacity: 0.8; }
.hud-place small, .hud-time small { display: block; font-size: 12px; font-weight: 700; opacity: 0.85; margin-top: 2px; }
.hud-time b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.minimap { margin-left: auto; width: 110px; height: 110px; border-radius: 14px; background: rgba(14, 16, 20, 0.45); border: 1px solid rgba(255, 255, 255, 0.14); }
.hud-banner {
  position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: clamp(44px, calc(14vw / var(--ca-zoom, 1)), 96px); font-weight: 900; font-style: italic;
  text-transform: uppercase; letter-spacing: -0.02em; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.3); opacity: 0;
}
.hud-banner.show { animation: banner 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.hud-banner.go { color: #8af0a3; }
@keyframes banner { 0% { opacity: 0; transform: scale(1.6); } 25% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(0.94); } }
.hud-toast { position: absolute; left: 50%; top: calc(86px + var(--safe-t)); transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; }
.hud-toast span { background: rgba(14, 16, 20, 0.72); border-radius: 18px; padding: 6px 14px; font-weight: 750; font-size: 15px; animation: toastIn 2.2s ease forwards; white-space: nowrap; }
.hud-toast span.warn { color: #ffd166; }
.hud-toast span.bad { color: #ff9a8f; }
@keyframes toastIn { 0% { opacity: 0; transform: translateY(-8px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.hud-bottom { position: absolute; left: 50%; bottom: calc(176px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: flex-end; gap: 10px; }
@media (hover: hover) and (pointer: fine) { .hud-bottom { bottom: calc(14px + var(--safe-b)); } }
.mode-race.no-pad .hud-bottom { bottom: calc(14px + var(--safe-b)); }
.gauge { text-align: center; line-height: 1; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.gauge b { display: block; font-size: 34px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; }
.gauge small { font-size: 12px; font-weight: 700; opacity: 0.85; }
.hud-car canvas { width: 48px; height: 48px; display: block; }
.boost { position: relative; width: 12px; height: 48px; border-radius: 6px; background: rgba(14, 16, 20, 0.6); border: 1px solid rgba(255, 255, 255, 0.2); overflow: hidden; }
.boost span { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transform-origin: bottom; transform: scaleY(var(--b, 0.5)); background: linear-gradient(to top, #2c7be0, #8fe0ff); }
.skip { position: absolute; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); pointer-events: auto; }

/* touch pedals and steering */
.pad { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 calc(12px + var(--safe-r)) calc(14px + var(--safe-b)) calc(12px + var(--safe-l)); pointer-events: none; }
.pad-left, .pad-right { display: flex; gap: 10px; align-items: flex-end; pointer-events: auto; }
.pad-right { flex-wrap: wrap; justify-content: flex-end; max-width: 236px; }
.pad-btn {
  width: 74px; height: 74px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(14, 16, 20, 0.42);
  color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); touch-action: none; -webkit-user-select: none; user-select: none;
  transition: transform 0.06s ease, background 0.06s ease;
}
html[data-ca-lite] .pad-btn { backdrop-filter: none; }
.pad-btn i { width: 30px; height: 30px; }
.pad-btn.on { background: rgba(255, 255, 255, 0.34); transform: scale(0.95); }
.pad-btn.small { width: 52px; height: 52px; border-radius: 16px; }
.pad-btn.small i { width: 22px; height: 22px; }
.pad-btn.gas { width: 84px; height: 104px; background: rgba(46, 140, 80, 0.5); }
.pad-btn.brake { width: 74px; height: 84px; background: rgba(170, 50, 40, 0.48); }
.pad .slider-knob { display: none; }
.pad[data-layout="slider"] .steer { display: none; }
.pad[data-layout="slider"] .pad-left { width: calc(46vw / var(--ca-zoom, 1)); max-width: 300px; height: 120px; border-radius: 24px; border: 1px dashed rgba(255, 255, 255, 0.3); background: rgba(14, 16, 20, 0.25); position: relative; touch-action: none; }
.pad[data-layout="slider"] .slider-knob { display: block; position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); transform: translateX(var(--knob-x, 0)); }
.pad.auto-gas .gas { display: none; }
@media (hover: hover) and (pointer: fine) { .pad { display: none; } }
.mode-race.no-pad .pad { display: none; }
/* a game controller in use (the SDK marks <html data-ca-pad>): the pedals and steering step aside */
html[data-ca-pad] .mode-race .pad { display: none; }
html[data-ca-pad] .mode-race .hud-bottom { bottom: calc(14px + var(--safe-b)); }
/* a phone on its side: the map gives way to the pedals under it */
@media (orientation: landscape) and (max-height: 420px) { .minimap { width: 84px; height: 84px; } }
/* the bar keeps both ends in a race (App Standard §4.1): the mark and the game's icon, Pause, then the
   chip. Where the bar has room (from 560 px) the place and time boxes sit in its row after Pause — the
   brand without its name (88.5 px: a 30 px mark, the divider, a 30 px icon — fixed sizes) and the 36 px
   Pause — and the map below the chip; on a narrow phone upright the HUD's row comes below the bar. */
@media (min-width: 560px) {
  .hud-top { left: calc(158px + var(--safe-l)); }
  .minimap { position: absolute; right: 0; top: calc(var(--bar-h) - 10px - var(--safe-t)); }
}
@media (max-width: 559.98px) {
  .hud-top { top: calc(var(--bar-h) - 6px); left: calc(10px + var(--safe-l)); }
  .hud-toast { top: calc(var(--bar-h) + 70px); }
}

/* ---------------------------------------------------------------- results */
.results { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); }
html[data-ca-lite] .results { backdrop-filter: none; background: var(--bg); }
.results-in, .records-in, .show-body { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.res-head { text-align: center; padding: 10px 0 0; }
.res-head h2 { font-size: clamp(28px, calc(7vw / var(--ca-zoom, 1)), 40px); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -0.02em; }
.res-head p { margin: 4px 0 0; color: var(--muted); }
.res-big { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.res-big .fact { min-width: 110px; background: var(--surface); border: 1px solid var(--line); }
.res-big .fact b { font-size: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.card h3 { font-size: 15px; margin-bottom: 8px; }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.standings tr.me td { font-weight: 800; color: var(--accent-ink); }
.standings td:first-child { width: 2.5em; font-weight: 800; }
.standings td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.standings .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.dmg-list { display: grid; gap: 10px; }
.dmg { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.dmg b { font-size: 14px; }
.dmg small { grid-column: 1; color: var(--muted); font-size: 12.5px; }
.dmg .lvl { font-size: 12.5px; font-weight: 750; }
.dmg .lvl.ok { color: var(--good); }
.dmg .lvl.worn { color: var(--warn); }
.dmg .lvl.bad, .dmg .lvl.broken { color: var(--bad); }
.dmg .meter { grid-column: 1 / -1; height: 7px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.dmg .meter span { display: block; height: 100%; transform-origin: left; background: linear-gradient(90deg, #e8b23a, #d6342c); }
.dmg .btn { grid-column: 2; grid-row: 1 / 3; min-height: 40px; font-size: 13px; padding: 0 12px; }
.note { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.actions .btn { flex: 1 1 140px; max-width: 260px; }
.medal-big { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-size: 26px; color: #fff; margin: 6px auto 0; box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.5); }
.medal-big.gold { background: radial-gradient(circle at 35% 30%, #ffe48a, var(--gold)); }
.medal-big.silver { background: radial-gradient(circle at 35% 30%, #f3f5f7, var(--silver)); }
.medal-big.bronze { background: radial-gradient(circle at 35% 30%, #f0b88a, var(--bronze)); }
.pop { animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }

/* ---------------------------------------------------------------- records */
.rec-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rec-row:last-child { border-bottom: 0; }
.rec-row em { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 700; }
.board-pick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.board-slot { min-height: 120px; }

/* ---------------------------------------------------------------- sheets */
.sheet {
  border: 0; border-radius: 24px; padding: 0; width: min(calc(94vw / var(--ca-zoom, 1)), 460px); max-height: min(calc(88dvh / var(--ca-zoom, 1)), 760px); background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); display: none; flex-direction: column;
}
.sheet[open] { display: flex; animation: sheetIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.sheet::backdrop { background: rgba(10, 12, 16, 0.5); }
.sheet h2 { font-size: 19px; padding: 20px 20px 8px; }
.sheet-body { padding: 4px 20px 8px; overflow-y: auto; }
.sheet-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 16px 0 4px; }
.sheet-body p { margin: 6px 0 10px; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); }
.sheet.small { width: min(calc(92vw / var(--ca-zoom, 1)), 340px); }
.stack { display: grid; gap: 10px; padding-bottom: 18px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); }
.row select { min-height: 40px; max-width: 58%; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); }
.row input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--accent); }
.row input[type="text"] { flex: 1; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); font-size: 16px; }
.version { color: var(--muted); font-size: 13px; }
.friend-list { display: grid; gap: 6px; margin: 6px 0; }
.friend-list button { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); font-weight: 650; }
.class-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.class-pick button { display: grid; justify-items: center; gap: 4px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface2); }
.class-pick canvas { width: 120px; height: 70px; display: block; }
.class-pick b { font-size: 15px; }
.class-pick small { color: var(--muted); font-size: 12px; text-align: center; line-height: 1.25; }
@media (max-width: 560px) {
  .sheet { width: calc(100vw / var(--ca-zoom, 1)); max-width: calc(100vw / var(--ca-zoom, 1)); margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: calc(90dvh / var(--ca-zoom, 1)); }
}

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 60; transform: translate(-50%, 20px); opacity: 0;
  background: #191c21; color: #fff; padding: 10px 16px; border-radius: 14px; font-weight: 650; box-shadow: var(--shadow); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease; max-width: calc(90vw / var(--ca-zoom, 1)); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* motion */
@media (prefers-reduced-motion: reduce) { :root:not(.full) *, :root:not(.full) *::before { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
:root.reduce *, :root.reduce *::before { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }

/* cloud-apps bar 1.30.0 */
:root { --ca-brand-icon-w: 89px; } /* the brand's width with the icon alone (the mark, the divider, the app's icon) */
.ca-start { display: flex; align-items: center; flex: 0 100 auto; min-width: min(var(--ca-brand-icon-w), 100%); }
.ca-brand { display: flex; align-items: center; min-width: 0; height: 40px; color: inherit; font-family: inherit; }
.ca-brand a { display: flex !important; align-items: center !important; box-sizing: border-box !important; color: inherit !important; text-decoration: none !important; border-radius: 12px !important; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease; }
.ca-brand-home { flex: none !important; justify-content: center !important; width: 40px !important; height: 40px !important; padding: 0 !important; margin: 0 0 0 -5px !important; }
.ca-brand-home img { display: block !important; width: 30px !important; height: 30px !important; margin: 0 !important; transition: transform .38s cubic-bezier(.34, 1.56, .64, 1); }
.ca-brand-sep { flex: none; display: block; width: 1.5px; height: 18px; margin: 0 4px; border-radius: 1px; background: currentColor; opacity: .22; transform: rotate(18deg); }
.ca-brand-app { flex: 0 1 auto !important; min-width: 44px !important; height: 40px !important; padding: 0 9px 0 5px !important; margin: 0 !important; }
.ca-brand-in { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; column-gap: 9px; min-width: 0; height: 40px; overflow: hidden; }
.ca-brand-in img { flex: none; display: block !important; width: 30px !important; height: 30px !important; margin: 5px 0 !important; border-radius: 8px; }
.ca-brand[data-ca-icon] .ca-brand-name { display: none !important; }
.ca-brand[data-ca-icon] .ca-brand-app { padding-right: 5px !important; }
.ca-brand-name { display: block; height: 40px; margin: 0 !important; padding: 0 !important; line-height: 40px !important; white-space: nowrap; font-family: var(--ca-brand-font, inherit); font-size: 17px !important; font-weight: 700; letter-spacing: -.015em; color: inherit; text-shadow: var(--ca-brand-shadow, none); }
@media (hover: hover) { .ca-brand a:hover { background-color: color-mix(in srgb, currentColor 7%, transparent); } .ca-brand-home:hover img { transform: rotate(-6deg) scale(1.06); } }
.ca-brand a:focus-visible { outline: 3px solid var(--ca-accent, #4f6bff); outline-offset: -3px; }
.ca-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: none; min-width: 0; }
.ca-tools { display: flex; align-items: center; gap: 6px; }
.ca-tools[hidden] { display: none !important; }
.ca-tool { position: relative; flex: none; display: inline-grid; place-items: center !important; box-sizing: border-box !important; width: 36px !important; height: 36px !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; padding: 0 !important; margin: 0; border-radius: 50% !important;
  border: 1px solid var(--ca-tool-line, color-mix(in srgb, currentColor 16%, transparent)) !important; background: var(--ca-tool-bg, color-mix(in srgb, currentColor 6%, transparent)) !important; color: var(--ca-tool-ink, inherit) !important;
  font: inherit; line-height: 0 !important; letter-spacing: 0; text-decoration: none !important; box-shadow: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, transform .12s ease; }
.ca-tool[hidden] { display: none !important; }
.ca-tool::before { content: ""; position: absolute; inset: -4px; }
.ca-tool svg { display: block; width: 20px !important; height: 20px !important; margin: 0 !important; pointer-events: none; }
.ca-tool svg[hidden] { display: none !important; }
@media (hover: hover) { .ca-tool:hover { background: var(--ca-tool-hover, color-mix(in srgb, currentColor 13%, transparent)) !important; } }
.ca-tool:active { transform: scale(.94); }
.ca-tool:focus-visible { outline: 3px solid var(--ca-accent, #4f6bff); outline-offset: 2px; }
.ca-tool-talk { color: var(--ca-accent, #4f6bff) !important; border-color: color-mix(in srgb, var(--ca-accent, #4f6bff) 50%, transparent) !important; background: color-mix(in srgb, var(--ca-accent, #4f6bff) 13%, transparent) !important; }
.ca-tool .ca-tlive { position: absolute; top: 1px; right: 1px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 30%, transparent); }
.ca-tool-talk.ca-new::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; pointer-events: none; animation: ca-bar-ring 1.2s ease-out 2; }
@keyframes ca-bar-ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ca-accent, #4f6bff) 55%, transparent); } to { box-shadow: 0 0 0 11px transparent; } }
.ca-tool .ca-tcount, .ca-tool .ca-tunread { position: absolute; right: -5px; display: grid; place-items: center; box-sizing: border-box; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; color: #fff; font: 700 10.5px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0; pointer-events: none; }
.ca-tool .ca-tcount { bottom: -5px; background: #1f9d55; }
.ca-tool .ca-tunread { top: -5px; background: #e5484d; }
@media (max-width: 599.98px), (max-height: 499.98px) { .ca-tools-app { display: none !important; } }
.ca-end[data-ca-cramped] .ca-tools-app { display: none !important; }
.ca-end[data-ca-tight] .ca-tool-friends { display: none !important; }
@media (prefers-reduced-motion: reduce) { .ca-tool, .ca-brand a, .ca-brand-home img { transition: none; } .ca-tool-talk.ca-new::after { animation: none; } }
/* end of the cloud-apps bar */
/* ---- cloud-apps: big screens (App Standard §6.5) — written by `cloud-apps vendor-sdk`; do not edit ---- */
/* Past 1584 × 990 the page is laid out at about 1440 × 900 and zoomed to fill the screen; viewport
   units in this file are divided by --ca-zoom. cloud-kit.js turns it off where the engine has no
   standard zoom (html[data-ca-zoom="off"]). */
@media (min-width: 1585px) and (min-height: 991px) { :root { --ca-zoom: 1.1; } }
@media (min-width: 1656px) and (min-height: 1035px) { :root { --ca-zoom: 1.15; } }
@media (min-width: 1728px) and (min-height: 1080px) { :root { --ca-zoom: 1.2; } }
@media (min-width: 1800px) and (min-height: 1125px) { :root { --ca-zoom: 1.25; } }
@media (min-width: 1872px) and (min-height: 1170px) { :root { --ca-zoom: 1.3; } }
@media (min-width: 1945px) and (min-height: 1215px) { :root { --ca-zoom: 1.35; } }
@media (min-width: 2016px) and (min-height: 1260px) { :root { --ca-zoom: 1.4; } }
@media (min-width: 2088px) and (min-height: 1305px) { :root { --ca-zoom: 1.45; } }
@media (min-width: 2160px) and (min-height: 1350px) { :root { --ca-zoom: 1.5; } }
@media (min-width: 2232px) and (min-height: 1395px) { :root { --ca-zoom: 1.55; } }
@media (min-width: 2304px) and (min-height: 1440px) { :root { --ca-zoom: 1.6; } }
@media (min-width: 2376px) and (min-height: 1485px) { :root { --ca-zoom: 1.65; } }
@media (min-width: 2448px) and (min-height: 1530px) { :root { --ca-zoom: 1.7; } }
@media (min-width: 2520px) and (min-height: 1575px) { :root { --ca-zoom: 1.75; } }
@media (min-width: 2592px) and (min-height: 1620px) { :root { --ca-zoom: 1.8; } }
@media (min-width: 2664px) and (min-height: 1665px) { :root { --ca-zoom: 1.85; } }
@media (min-width: 2736px) and (min-height: 1710px) { :root { --ca-zoom: 1.9; } }
@media (min-width: 2808px) and (min-height: 1755px) { :root { --ca-zoom: 1.95; } }
@media (min-width: 2880px) and (min-height: 1800px) { :root { --ca-zoom: 2; } }
@media (min-width: 2952px) and (min-height: 1845px) { :root { --ca-zoom: 2.05; } }
@media (min-width: 3024px) and (min-height: 1890px) { :root { --ca-zoom: 2.1; } }
@media (min-width: 3096px) and (min-height: 1935px) { :root { --ca-zoom: 2.15; } }
@media (min-width: 3169px) and (min-height: 1981px) { :root { --ca-zoom: 2.2; } }
@media (min-width: 3240px) and (min-height: 2025px) { :root { --ca-zoom: 2.25; } }
@media (min-width: 3312px) and (min-height: 2070px) { :root { --ca-zoom: 2.3; } }
@media (min-width: 3384px) and (min-height: 2115px) { :root { --ca-zoom: 2.35; } }
@media (min-width: 3456px) and (min-height: 2160px) { :root { --ca-zoom: 2.4; } }
@media (min-width: 3529px) and (min-height: 2205px) { :root { --ca-zoom: 2.45; } }
@media (min-width: 3600px) and (min-height: 2250px) { :root { --ca-zoom: 2.5; } }
@media (min-width: 3672px) and (min-height: 2295px) { :root { --ca-zoom: 2.55; } }
@media (min-width: 3744px) and (min-height: 2340px) { :root { --ca-zoom: 2.6; } }
@media (min-width: 3816px) and (min-height: 2385px) { :root { --ca-zoom: 2.65; } }
@media (min-width: 3889px) and (min-height: 2430px) { :root { --ca-zoom: 2.7; } }
@media (min-width: 3960px) and (min-height: 2475px) { :root { --ca-zoom: 2.75; } }
@media (min-width: 4032px) and (min-height: 2520px) { :root { --ca-zoom: 2.8; } }
@media (min-width: 4104px) and (min-height: 2565px) { :root { --ca-zoom: 2.85; } }
@media (min-width: 4176px) and (min-height: 2610px) { :root { --ca-zoom: 2.9; } }
@media (min-width: 4248px) and (min-height: 2655px) { :root { --ca-zoom: 2.95; } }
@media (min-width: 4320px) and (min-height: 2700px) { :root { --ca-zoom: 3; } }
@media (min-width: 4392px) and (min-height: 2745px) { :root { --ca-zoom: 3.05; } }
@media (min-width: 4464px) and (min-height: 2790px) { :root { --ca-zoom: 3.1; } }
@media (min-width: 4536px) and (min-height: 2835px) { :root { --ca-zoom: 3.15; } }
@media (min-width: 4608px) and (min-height: 2880px) { :root { --ca-zoom: 3.2; } }
@media (min-width: 4680px) and (min-height: 2925px) { :root { --ca-zoom: 3.25; } }
@media (min-width: 4752px) and (min-height: 2970px) { :root { --ca-zoom: 3.3; } }
@media (min-width: 4824px) and (min-height: 3015px) { :root { --ca-zoom: 3.35; } }
@media (min-width: 4896px) and (min-height: 3060px) { :root { --ca-zoom: 3.4; } }
@media (min-width: 4968px) and (min-height: 3105px) { :root { --ca-zoom: 3.45; } }
@media (min-width: 5040px) and (min-height: 3150px) { :root { --ca-zoom: 3.5; } }
@media (min-width: 5112px) and (min-height: 3195px) { :root { --ca-zoom: 3.55; } }
@media (min-width: 5184px) and (min-height: 3240px) { :root { --ca-zoom: 3.6; } }
@media (min-width: 5256px) and (min-height: 3285px) { :root { --ca-zoom: 3.65; } }
@media (min-width: 5328px) and (min-height: 3330px) { :root { --ca-zoom: 3.7; } }
@media (min-width: 5400px) and (min-height: 3375px) { :root { --ca-zoom: 3.75; } }
@media (min-width: 5472px) and (min-height: 3420px) { :root { --ca-zoom: 3.8; } }
@media (min-width: 5544px) and (min-height: 3465px) { :root { --ca-zoom: 3.85; } }
@media (min-width: 5616px) and (min-height: 3510px) { :root { --ca-zoom: 3.9; } }
@media (min-width: 5688px) and (min-height: 3555px) { :root { --ca-zoom: 3.95; } }
@media (min-width: 5760px) and (min-height: 3600px) { :root { --ca-zoom: 4; } }
@media (min-width: 5832px) and (min-height: 3645px) { :root { --ca-zoom: 4.05; } }
@media (min-width: 5904px) and (min-height: 3690px) { :root { --ca-zoom: 4.1; } }
@media (min-width: 5977px) and (min-height: 3736px) { :root { --ca-zoom: 4.15; } }
@media (min-width: 6048px) and (min-height: 3780px) { :root { --ca-zoom: 4.2; } }
@media (min-width: 6120px) and (min-height: 3825px) { :root { --ca-zoom: 4.25; } }
@media (min-width: 6192px) and (min-height: 3870px) { :root { --ca-zoom: 4.3; } }
@media (min-width: 6264px) and (min-height: 3915px) { :root { --ca-zoom: 4.35; } }
@media (min-width: 6337px) and (min-height: 3961px) { :root { --ca-zoom: 4.4; } }
@media (min-width: 6408px) and (min-height: 4005px) { :root { --ca-zoom: 4.45; } }
@media (min-width: 6480px) and (min-height: 4050px) { :root { --ca-zoom: 4.5; } }
@media (min-width: 6552px) and (min-height: 4095px) { :root { --ca-zoom: 4.55; } }
@media (min-width: 6624px) and (min-height: 4140px) { :root { --ca-zoom: 4.6; } }
@media (min-width: 6697px) and (min-height: 4185px) { :root { --ca-zoom: 4.65; } }
@media (min-width: 6768px) and (min-height: 4230px) { :root { --ca-zoom: 4.7; } }
@media (min-width: 6840px) and (min-height: 4275px) { :root { --ca-zoom: 4.75; } }
@media (min-width: 6912px) and (min-height: 4320px) { :root { --ca-zoom: 4.8; } }
@media (min-width: 6984px) and (min-height: 4365px) { :root { --ca-zoom: 4.85; } }
@media (min-width: 7057px) and (min-height: 4410px) { :root { --ca-zoom: 4.9; } }
@media (min-width: 7128px) and (min-height: 4455px) { :root { --ca-zoom: 4.95; } }
@media (min-width: 7200px) and (min-height: 4500px) { :root { --ca-zoom: 5; } }
@media (min-width: 1585px) and (min-height: 991px) {
  html { zoom: var(--ca-zoom, 1); }
  html[data-ca-zoom='off'] { --ca-zoom: 1 !important; }
}
/* ---- end of big screens ---- */
