/* =========================================================
   CARS VS TRAINS RACE DAY — this game's colours only.
   Layout and logic come from the shared shell.css, which is byte-identical to
   UI Kit/shell.css and must never be edited here (CLAUDE.md §4).

   Palette lifted from the game's own art: the gold/amber signage, the carbon-fibre
   panels and the racing red that the 3D world already uses, so the menu and the
   track look like one product.

   ⚠️ TARGETS :root, NOT #gameShell — the bottom nav, every popup, the splash and the
   coachmark are SIBLINGS of the 450x800 design card, not children of it. A theme
   scoped to #gameShell reaches the home screen and leaves every popup on the default
   palette. (UI Kit/UI-SCALING-STANDARD.md)

   ⚠️ --gold and --green are SEMANTIC portfolio-wide: gold always means currency, green
   always means "this button plays a rewarded ad". Not ours to redefine.
   ========================================================= */
:root{
  /* ---- 🟣 PLAYGAMA BUILD — brand purple (#9747ff), sampled from playgama.com (playgama/PALETTE.md) ---- */
  --accent:#9747ff; --accent-dk:#682eb2; --accent-lt:#c7abff;

  /* ---- SEMANTIC: leave alone (green = rewarded ad, gold = currency, portfolio-wide) ---- */
  --green:#2fbf6b; --green-dk:#1d8c4c;
  --gold:#ffce3a;  --gold-dk:#e8a417;

  /* ---- furniture: Playgama carbon surfaces (--carbon-* from PALETTE.md) ---- */
  --ink:#050507;
  --panel:#1d1d21; --panel-2:#0d0d0f; --tab:#29292e; --nav-line:#050507; --text:#eef0f2;
  --nav1:#1d1d21;  --nav2:#0d0d0f;

  /* ---- button ramps (1 = face top, 2 = face bottom, 3 = hard shadow, ink = label) ---- */
  --pri-1:#aa76ff; --pri-2:#9747ff; --pri-3:#620fab; --pri-ink:#ffffff;  /* primary / RACE — Playgama purple */
  --go-1:#5ee08d;  --go-2:#2fbf6b;  --go-3:#1d8c4c;  --go-ink:#08240f;   /* rewarded ad (semantic green) */
  --gd-1:#ffca4d;  --gd-2:#f0aa22;  --gd-3:#cf8d0b;  --gd-ink:#3b2f06;   /* currency (semantic gold) */
  --gh-1:#29292e;  --gh-2:#1d1d21;  --gh-3:#0d0d0f;                      /* neutral carbon */

  --text-scene:#ffffff;
}

/* 🟣 PLAYGAMA BUILD — recolour the shell's wordmark bar from the host-red to Playgama purple.
   It shows "PLAYGAMA" here (Shell.init subscribe), so brand-purple is the on-theme colour.
   Still pointer-events:none signage (shell.css) — this only changes the paint. */
#shSub{ background:linear-gradient(180deg,#9747ff 0%,#620fab 100%) !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   NO LAYOUT OVERRIDES HERE — and that is deliberate.

   The square 512x512 Logo.png used to swallow the car name: the shell's home header
   expects a WIDE WORDMARK, with `.gTitle` at top:138px and `.gName` only 30px below,
   and the mark is sized by WIDTH, so a square badge is as tall as it is wide.

   Dropping the upgrades fixed it for free. With `upgrades:[]` the shell adds a `noupg`
   class and re-flows the home to a BOTTOM-ANCHORED selector (shell.css:357 — .gName
   bottom:196px, .gPerk 174px, .gStatus 154px, .garrow 158px), which hands the whole top
   of the screen to the logo. An override here would only fight it.

   If upgrades ever come back, this collision comes back with them. The fix then is a
   wide wordmark crop of the logo, NOT a per-game nudge of the shell's layout.
   ───────────────────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────────────
   NO GEMS IN THIS GAME

   Every car in the roster costs coins (`cur:'coin'`), so gems buy nothing here —
   there is no gem sink at all. The shell shows the gem chip and the rewarded
   "+5 GEMS" button whenever `economy:true` and an ad can serve; there is no config
   to turn the second currency off (shell.js only gates #shShopGems on adsOK()).

   Left alone, the player gets a counter that only ever goes up and a rewarded ad
   that pays in something worthless — PITFALLS §16, "placeholders ship", and worse
   than a placeholder because it spends the player's 30 seconds on nothing. It also
   competes with the +150 COINS button directly above it, which is the one we
   actually want watched.

   Hidden here rather than in shell.css: this is a per-game fact, not a shell change.
   🔴 If a gem sink is ever added (a premium car, a paint pack), DELETE THIS BLOCK —
   do not add a second gem UI somewhere else.
   ───────────────────────────────────────────────────────────────────────────── */
#shShopGems { display:none !important; }
#gameShell header .chip:has(#shGems) { display:none !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   HOME SCREEN — three per-game deviations from the shell, all deliberate.

   1. NO STARS ON THE WIN PANEL. This is a race, not a 3-star puzzle: there is no
      rating to give, and a 1-of-3 next to "KNOCKED OUT" read as a score the player
      had failed to reach. 🔴 Hiding it in CSS is not belt-and-braces — the shell
      DEFAULTS to three stars when `stars` is omitted (`o.stars == null ? 3 : …`),
      so simply not passing them would show a full row of three on every win.

   2. NO RETRY ON THE FAIL PANEL. Being knocked out ends the tournament, and the
      player should land back in the garage to spend what they just earned — that is
      the whole point of the coins and the WATCH AD button. RETRY would start a fresh
      tournament straight from the fail screen and skip the shop entirely, so HOME is
      the only way out. (The rewarded CONTINUE is unaffected and still appears when an
      ad can serve — §5: the fail moment is for a rewarded continue, never a purchase.)

   3. THE LOGO SITS HIGHER. The shell puts .gTitle at 138px with the subscribe bar,
      which is tuned for a short wide wordmark; this game's mark is a tall square badge
      at logoHomeScale 0.50, so it needs the extra room above the car.
   ───────────────────────────────────────────────────────────────────────────── */
#shWinStars  { display:none !important; }
#shLoseRetry { display:none !important; }
#gameShell.subbar .gTitle { top:104px; }

/* ─────────────────────────────────────────────────────────────────────────────
   GARAGE — four per-game adjustments.

   1. "TRY OUT" -> "TEST DRIVE". shell.js HARDCODES the locked-item label as
      `<img>TRY OUT` (there is no config for it), and §4 forbids editing shell.js, so
      the text node is suppressed and the real label comes from ::after. `.green` is
      set ONLY in the locked + adsOK() branch, so this can never catch the owned-car
      button, which keeps CFG.altLabel ("SINGLE RACE").
      The wording matters: the reference build (Overtake City Run, #garage-testdrive)
      says TEST DRIVE, and the player is about to spend 30 seconds on an ad — "TRY OUT"
      does not tell them they are getting a race in that car.
      🔴 If shell.js ever gains a config for this label, delete this and use it.

   2. Arrows up beside the car. The shell's `noupg` layout parks them at the bottom
      (shell.css:360) next to the name; the car is the thing you are browsing, so they
      belong either side of IT. 52% matches the reference's `.garage-arrow { top:54% }`.

   3. The price is the decision on this screen — 15px buried it under the car name.
   ───────────────────────────────────────────────────────────────────────────── */
/* 🟣 SINGLE RACE (owned-car secondary action) ships as the shell's `.btn.gold` = the amber
   currency ramp, which is off-theme on a Playgama purple build (and yellow is exactly what we're
   removing). Repoint just this button's ramp to the neutral CARBON one so RACE stays the sole
   purple hero and the secondary reads as clearly-secondary, not currency. `.green` (locked-car
   TEST DRIVE / rewarded) is untouched — that stays semantic green. */
#gameShell #shGAlt.gold, .sh-ov #shGAlt.gold{
  --c1:var(--gh-1); --c2:var(--gh-2); --base:var(--gh-3); color:#eef0f2;
}

/* 🟣 The garage play button turns `.gold` when the car is LOCKED (shell.js → "UNLOCK <price>").
   This build's currency coin is Playgama-purple (playgama-brand.js), so a gold spend button
   clashes with its own price tag. Repoint the locked/UNLOCK state to the primary purple ramp —
   same hero treatment as RACE, consistent with the purple coin. */
#gameShell #shGGo.gold, .sh-ov #shGGo.gold{
  --c1:var(--pri-1); --c2:var(--pri-2); --base:var(--pri-3); color:var(--pri-ink);
}

#gameShell #shGAlt.green            { font-size:0; gap:8px; }
#gameShell #shGAlt.green::after     { content:'TEST DRIVE'; font-size:17px; letter-spacing:2px; }
#gameShell #shGAlt.green img        { width:20px; height:20px; }

#gameShell.noupg .garrow  { top:52%; bottom:auto; transform:translateY(-50%); }

#gameShell .gStatus       { font-size:22px; letter-spacing:.5px; }

/* No car NAME on the garage. The car itself is on a lit turntable filling the screen —
   the word "HATCHBACK" under a picture of a hatchback is a label for something the player
   is already looking at, and it was competing with the price, which is the actual decision.
   The perk line (#shGPerk) stays: "2x coin earnings" is information the model cannot show. */
#gameShell .gName { display:none !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   NOTHING IS SELECTABLE OR TAP-HIGHLIGHTED. Reported on a real Android build:
   pressing a button raised the text-selection UI, as though highlighting the label.

   shell.css already does this for `#gameShell *`, `.col *` and `.sh-ov *` — but NOT for
   `#shNav`, `#shSplash` or `#shTut`, and the game only set it on `html, body`, which
   buttons can reset. This is a game with no text input, so the blanket rule is the right
   answer rather than chasing each element. Inputs are exempted so the DEV sliders still
   drag.
   ───────────────────────────────────────────────────────────────────────────── */
*:not(input):not(textarea), *::before, *::after {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
#shNav button, #gameShell button, .sh-ov button { touch-action: manipulation; }
