/* Mini-car GP light palette: panels only; canvas artwork and race rules stay intact. */
html[data-theme="light"] body.standalone-hub-page-diecast {
  --diecast-paper:#f7faff;
  --diecast-panel:#fff;
  --diecast-soft:#edf3fa;
  --diecast-line:#bfcedf;
  --diecast-ink:#253a52;
  --diecast-muted:#4d637b;
}
html[data-theme="light"] body.standalone-hub-page-diecast .race-main {
  background:var(--diecast-panel);
  border-color:var(--diecast-line);
  box-shadow:0 12px 32px rgb(34 62 91 / 9%);
}
/* Live status and clock must contrast with the bright dashboard. */
html[data-theme="light"] body.standalone-hub-page-diecast .race-topline {
  background:#ecf3fc;
  border-bottom-color:#bfd0e1;
  color:var(--diecast-ink);
}
html[data-theme="light"] body.standalone-hub-page-diecast .race-topline .mini-label {
  color:#375b80;
}
html[data-theme="light"] body.standalone-hub-page-diecast .live-indicator {
  color:#31546d;
}
html[data-theme="light"] body.standalone-hub-page-diecast .live-indicator i {
  background:#168156;
  box-shadow:0 0 0 3px #16815624;
}
html[data-theme="light"] body.standalone-hub-page-diecast .race-time {
  color:#1e3e5d;
}
/* Arcade items and event timeline use the same steel-blue card palette. */
html[data-theme="light"] body.standalone-hub-page-diecast .race-arcade-strip {
  background:#f1f6fc;
  border-bottom-color:#c6d5e4;
}
html[data-theme="light"] body.standalone-hub-page-diecast .race-arcade-strip .arcade-label {
  background:#fff;
  border-color:#b5c9dc;
  color:#294963;
}
html[data-theme="light"] body.standalone-hub-page-diecast .race-arcade-strip strong {
  color:#81530a;
}
html[data-theme="light"] body.standalone-hub-page-diecast .item-event-panel {
  background:#f8fbff;
  border-color:#c4d4e3;
  color:var(--diecast-ink);
}
html[data-theme="light"] body.standalone-hub-page-diecast .item-event-panel > strong {
  color:#315778;
}
html[data-theme="light"] body.standalone-hub-page-diecast .item-event-panel li {
  color:#405a73;
}
html[data-theme="light"] body.standalone-hub-page-diecast .item-event-panel li:first-child:last-child {
  color:#55708a;
}
html[data-theme="light"] body.standalone-hub-page-diecast .item-event-panel .event-time {
  color:#7d530f;
}
html[data-theme="light"] body.standalone-hub-page-diecast .item-event-panel li.event-boost,
html[data-theme="light"] body.standalone-hub-page-diecast .item-event-panel li.event-driftBoost {
  color:#8a510d;
}
html[data-theme="light"] body.standalone-hub-page-diecast .item-event-panel li.event-slip {
  color:#175a86;
}
/* The actual driving canvas stays unchanged; only its chrome follows theme. */
html[data-theme="light"] body.standalone-hub-page-diecast .track-frame {
  background:#dce6f0;
  border-block:1px solid #bfcfe0;
}
html[data-theme="light"] body.standalone-hub-page-diecast .track-direction,
html[data-theme="light"] body.standalone-hub-page-diecast .speed-readout {
  background:rgb(18 35 55 / 88%);
}
html[data-theme="light"] body.standalone-hub-page-diecast .track-overlay {
  background:rgb(11 24 40 / 69%);
}
html[data-theme="light"] body.standalone-hub-page-diecast .track-overlay span {
  color:#fff7da;
}
html[data-theme="light"] body.standalone-hub-page-diecast .course-overview {
  background:linear-gradient(110deg,#f3f8fe,#fff);
  border-bottom-color:#c4d4e4;
}
html[data-theme="light"] body.standalone-hub-page-diecast .course-overview-rail {
  background:#d8e4f1;
  border-color:#9db4ca;
}
html[data-theme="light"] body.standalone-hub-page-diecast .overview-tick {
  background:#50708d80;
}
html[data-theme="light"] body.standalone-hub-page-diecast .course-checkpoints,
html[data-theme="light"] body.standalone-hub-page-diecast .course-overview-bottom,
html[data-theme="light"] body.standalone-hub-page-diecast .course-overview-bottom span:last-child {
  color:#4a617b;
}
/* Race action bar and length selectors. */
html[data-theme="light"] body.standalone-hub-page-diecast .control-row {
  background:#fff;
  border-top:1px solid #c5d4e3;
  color:var(--diecast-ink);
}
html[data-theme="light"] body.standalone-hub-page-diecast .control-row .course-field {
  color:#334e69;
}
html[data-theme="light"] body.standalone-hub-page-diecast .control-row select {
  background:#f8fbff;
  color:#29455f;
  border-color:#aebfd3;
  color-scheme:light;
}
html[data-theme="light"] body.standalone-hub-page-diecast .control-row .camera-btn[aria-pressed="true"] {
  background:#dceaf8;
  color:#214e79;
  border-color:#6796bc;
}
html[data-theme="light"] body.standalone-hub-page-diecast .control-row .btn:disabled {
  opacity:.5;
}
/* Duration is no longer a dark inset instrument panel in light mode. */
html[data-theme="light"] body.standalone-hub-page-diecast .race-main .duration-config {
  background:#edf3fa;
  color:var(--diecast-ink);
  border-top-color:#c2d1e1;
}
html[data-theme="light"] body.standalone-hub-page-diecast .duration-config :is(label,.duration-head) {
  color:#29455f;
}
html[data-theme="light"] body.standalone-hub-page-diecast .duration-config .duration-head output {
  color:#81530a;
}
html[data-theme="light"] body.standalone-hub-page-diecast .duration-config .duration-note {
  color:#506780;
}
html[data-theme="light"] body.standalone-hub-page-diecast .duration-config input[type="range"] {
  accent-color:#296b9d;
}
/* Results shell remains legible after the race is complete. */
html[data-theme="light"] body.standalone-hub-page-diecast .race-results {
  background:#fff9ec;
  border-color:#d7ba80;
  color:#29445e;
}
/* Match related-games links to the page's blue/metal palette rather than dark cards. */
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-games {
  background:linear-gradient(145deg,#fff,#edf4fc);
  border-color:#bdcfdf;
  color:#263f58;
}
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-copy h2 {
  color:#263f58!important;
}
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-copy p {
  color:#4e657b;
}
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-links a {
  background:#fff!important;
  border-color:#bdcfdf;
  color:#263f58!important;
}
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-links a:hover {
  background:#e7f1fc!important;
  border-color:#779fbe;
}
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-links a:focus-visible {
  outline-color:#295f91;
}
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-icon {
  background:#e0ebf7;
}
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-links strong {
  color:#244562;
}
html[data-theme="light"] body.standalone-hub-page-diecast .seo-related-links small {
  color:#4a637c;
}

/* Adjacent score and instructions: avoid washed-out text on pale cards. */
html[data-theme="light"] body.standalone-hub-page-diecast .race-main .duration-config {
  color:#29455f;
}
html[data-theme="light"] body.standalone-hub-page-diecast .rank-position {
  color:#405c78;
}
html[data-theme="light"] body.standalone-hub-page-diecast .rank-item:first-child .rank-position {
  color:#81530a;
}
html[data-theme="light"] body.standalone-hub-page-diecast .standings-note {
  color:#4a637b;
  border-top-color:#c4d2e2;
}
html[data-theme="light"] body.standalone-hub-page-diecast .standings-note span {
  color:#9a690e;
}
html[data-theme="light"] body.standalone-hub-page-diecast .how-grid > div {
  border-top-color:#afc4d9;
}
html[data-theme="light"] body.standalone-hub-page-diecast .how-grid p {
  color:#4d637b;
}
html[data-theme="light"] body.standalone-hub-page-diecast .how-number {
  color:#8a5d0b;
}
html[data-theme="light"] body.standalone-hub-page-diecast :is(.how .mini-label,.lobby .mini-label) {
  color:#80580d;
}
