.platform-panel {
  color: #edf0f0;
  background: #111923;
  border: 1px solid #ffffff33;
  border-radius: 12px;
  padding: 24px;
  width: min(600px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  font:
    15px/1.5 Barlow,
    Arial,
    sans-serif;
}
.platform-panel::backdrop {
  background: #030911d9;
}
.platform-panel header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.platform-panel header button {
  min-width: 44px;
  min-height: 44px;
  background: #ffffff11;
  color: white;
  border: 1px solid #ffffff33;
  font-size: 24px;
}
.platform-panel h2 {
  font:
    700 32px 'Barlow Condensed',
    Arial,
    sans-serif;
  margin: 4px 0 12px;
}
.platform-panel h3 {
  margin: 16px 0 8px;
}
.platform-panel p {
  color: #b6c2cd;
  margin: 12px 0;
}
.platform-panel label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 12px 0;
}
.platform-panel input,
.platform-panel select {
  background: #070f1b;
  border: 1px solid #596777;
  color: #edf0f0;
  border-radius: 4px;
  min-height: 44px;
  padding: 9px;
  font: inherit;
  width: 100%;
}
.platform-panel .platform-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.platform-panel .platform-check input {
  width: 24px;
  min-width: 24px;
}
.platform-panel .primary,
.platform-panel .secondary {
  min-height: 44px;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  white-space: normal;
  text-align: center;
  display: block;
}
.platform-panel .platform-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.platform-panel .platform-buttons button {
  margin: 0;
}
.platform-panel .platform-callout {
  border-left: 3px solid #f0bb60;
  padding: 12px;
  background: #f0bb600a;
  color: #f0bb60;
}
.platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0;
}
.platform-links a {
  color: #f0bb60;
  text-decoration: underline;
}
.platform-panel .platform-message {
  color: #f0bb60;
  min-height: 24px;
  overflow-wrap: anywhere;
}
.platform-records {
  padding-left: 24px;
}
.platform-records li {
  padding: 8px 0;
  border-bottom: 1px solid #ffffff22;
}
.platform-records small {
  display: block;
  overflow-wrap: anywhere;
  color: #a4bac8;
}
.platform-panel[aria-busy='true'] button {
  opacity: 0.6;
  pointer-events: none;
}
.platform-panel :focus-visible {
  outline: 2px solid #f0bb60;
  outline-offset: 3px;
}
.account-connect {
  font-size: 12px;
  padding: 8px;
  min-height: 44px;
  background: #152231;
  color: #edf0f0;
  border: 1px solid #ffffff33;
}
@media (max-width: 500px) {
  .platform-panel {
    padding: 18px;
  }
  .platform-panel .platform-buttons {
    grid-template-columns: 1fr;
  }
  .account-connect {
    font-size: 10px;
    padding: 6px;
  }
}
/* Shared dialog geometry; Formula GP supplies the active color tokens. */
[hidden] {
  display: none !important;
}
dialog.modal-backdrop,
dialog.platform-panel {
  position: fixed;
  inset: auto;
  top: var(--dialog-top, 0px);
  left: var(--dialog-left, 0px);
  width: var(--dialog-width, 100vw);
  height: var(--dialog-height, 100dvh);
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: clip;
  box-sizing: border-box;
  backdrop-filter: none;
}
dialog.modal-backdrop[open],
dialog.platform-panel[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
dialog::backdrop {
  background: #030a13e8;
}
.modal.dialog-shell,
.platform-panel > .dialog-shell {
  width: min(100%, 640px);
  height: min(100%, 620px);
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #101b24;
  border: 1px solid #35424b;
  border-radius: 0;
  color: #edf0f0;
  box-shadow: 0 20px 60px #0008;
}
.dialog-shell > .dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #35424b;
}
.dialog-shell .dialog-header h2 {
  font:
    800 32px/1.05 'Barlow Condensed',
    sans-serif;
  margin: 0;
  overflow-wrap: anywhere;
}
.dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  background: #1b2b36;
  color: #edf0f0;
  border: 1px solid #54636d;
}
.dialog-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.dialog-pages {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.dialog-pages .page-container {
  display: contents;
}
.dialog-pages > *,
.dialog-pages [data-page-item] {
  flex: 0 0 auto;
  margin: 0;
  max-width: 100%;
}
.dialog-pages [data-page-item] {
  box-sizing: border-box;
}
.dialog-pages p {
  font:
    400 16px/1.4 Barlow,
    sans-serif;
  color: #c1cbd1;
}
.dialog-pages .platform-message {
  color: #ffd080;
  min-height: 0;
}
.dialog-pages .platform-message:empty {
  display: none;
}
.dialog-pages .eyebrow {
  color: #bac7d0;
}
.dialog-pages .setting-row {
  padding: 10px 0;
  min-height: 58px;
  gap: 12px;
}
.dialog-pages .setting-row strong {
  font-size: 16px;
}
.dialog-pages .setting-row small {
  font-size: 13px;
  color: #bac7d0;
}
.dialog-pages label {
  margin: 0;
}
.dialog-pages input:not([type='checkbox']),
.dialog-pages select {
  min-height: 44px;
  font-size: 16px;
  min-width: 0;
  max-width: 100%;
}
.dialog-pages input::placeholder {
  color: #aebfc9;
  opacity: 1;
}
.dialog-pages input {
  caret-color: var(--gold);
}
.dialog-pages .setting-row select {
  width: 52%;
  flex-shrink: 0;
}
.dialog-pages .platform-check {
  min-height: 48px;
}
.dialog-pages .wallet-history > div {
  display: flex;
  gap: 14px;
}
.dialog-pages .wallet-history b {
  flex: 0 0 auto;
  min-width: 7ch;
  white-space: nowrap;
}
.dialog-pages .track-picker button {
  min-height: 0;
  padding: 12px;
  width: 100%;
}
.dialog-pages .track-picker .route {
  height: 64px;
}
.dialog-pages .platform-records li {
  list-style-position: inside;
  padding: 10px 0;
}
.dialog-pages .platform-records small {
  font-size: 14px;
}
.dialog-shell > .dialog-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid #35424b;
}
.dialog-shell .dialog-footer > .primary {
  width: auto;
  flex: 0 1 210px;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
  justify-content: center;
}
.dialog-pages .primary,
.dialog-pages .secondary {
  margin: 0;
  min-height: 44px;
}
.dialog-shell button:disabled {
  opacity: 0.45;
}
.dialog-shell :focus-visible {
  outline: 2px solid #f0bb60;
  outline-offset: 2px;
}
.dialog-shell ::selection {
  color: #101b24;
  background: #f0bb60;
}
.field-error {
  color: #ffd080;
  font-size: 13px;
  line-height: 16px;
}
.dialog-short .dialog-shell {
  height: 100%;
  width: min(100%, 760px);
}
.dialog-short .dialog-shell > .dialog-header {
  padding: 4px 12px;
}
.dialog-short .dialog-header h2 {
  font-size: 26px;
}
.dialog-short .dialog-pages {
  margin: 10px 16px;
  gap: 10px;
}
.dialog-short .dialog-shell > .dialog-footer {
  padding: 6px 12px;
}
@media (max-width: 500px) {
  .dialog-shell > .dialog-header {
    padding: 8px 12px;
  }
  .dialog-shell .dialog-header h2 {
    font-size: 28px;
  }
  .dialog-pages {
    margin: 12px;
  }
  .dialog-shell > .dialog-footer {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .dialog-shell .dialog-footer > .primary {
    flex-basis: 100%;
  }
  .dialog-pages .setting-row:has(select) {
    flex-direction: column;
    align-items: stretch;
  }
  .dialog-pages .setting-row select {
    width: 100%;
  }
}
/* Keep the focused field, close and submit accessible above a docked keyboard. */
dialog.dialog-keyboard {
  padding: max(4px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right))
    max(4px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
}
.dialog-keyboard .dialog-shell {
  grid-template-columns: 48px minmax(0, 1fr) 170px;
  grid-template-rows: 22px minmax(0, 1fr);
  gap: 0 10px;
  padding: 4px;
}
.dialog-keyboard .dialog-shell > .dialog-header {
  display: contents;
}
.dialog-keyboard .dialog-header h2 {
  grid-column: 2;
  grid-row: 1;
  font-size: 18px;
  line-height: 22px;
}
.dialog-keyboard .dialog-close {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
}
.dialog-keyboard .dialog-pages {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  gap: 4px;
}
.dialog-keyboard .dialog-shell > .dialog-footer {
  grid-column: 3;
  grid-row: 1 / 3;
  padding: 0;
  border: 0;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.dialog-keyboard .dialog-shell .dialog-footer > .primary {
  flex: 0 0 auto;
  width: 100%;
  padding: 6px;
}
.dialog-keyboard .dialog-pages label {
  gap: 2px;
  font-size: 14px;
  line-height: 16px;
}
.dialog-keyboard .dialog-pages p {
  font-size: 15px;
  line-height: 19px;
}
.dialog-keyboard .dialog-pages .setting-row {
  padding: 0;
}
.dialog-keyboard .dialog-pages input:not([type='checkbox']),
.dialog-keyboard .dialog-pages select {
  height: 44px;
  min-height: 44px;
  padding: 6px;
}
/* barlow-vietnamese-400-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/play/formula-gp/assets/barlow-vietnamese-400-normal-Dpl4UHAZ.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-vietnamese-400-normal-BFeobeCK.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-latin-ext-400-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/play/formula-gp/assets/barlow-latin-ext-400-normal-HxX4XjxC.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-latin-ext-400-normal-CvBsJvxq.woff) format('woff');
  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;
}

/* barlow-latin-400-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/play/formula-gp/assets/barlow-latin-400-normal-qiz4-Cze.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-latin-400-normal-fsAxiSwU.woff) format('woff');
  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;
}/* barlow-vietnamese-500-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/play/formula-gp/assets/barlow-vietnamese-500-normal-zTViEIzf.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-vietnamese-500-normal-GNfB7rCE.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-latin-ext-500-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/play/formula-gp/assets/barlow-latin-ext-500-normal-DOaysfXq.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-latin-ext-500-normal-CJPcKP2Q.woff) format('woff');
  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;
}

/* barlow-latin-500-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/play/formula-gp/assets/barlow-latin-500-normal-BPAOfeC8.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-latin-500-normal-C1h8hMer.woff) format('woff');
  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;
}/* barlow-vietnamese-600-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/play/formula-gp/assets/barlow-vietnamese-600-normal-DcjprdFV.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-vietnamese-600-normal-CA_GiK2e.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-latin-ext-600-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/play/formula-gp/assets/barlow-latin-ext-600-normal-B8NK_A3D.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-latin-ext-600-normal-DMVRjfRT.woff) format('woff');
  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;
}

/* barlow-latin-600-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/play/formula-gp/assets/barlow-latin-600-normal-DILqtrty.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-latin-600-normal-CNwfPWQD.woff) format('woff');
  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;
}/* barlow-vietnamese-700-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/play/formula-gp/assets/barlow-vietnamese-700-normal-D6euyNzi.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-vietnamese-700-normal-4Jt4k04K.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-latin-ext-700-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/play/formula-gp/assets/barlow-latin-ext-700-normal-BLuWmldJ.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-latin-ext-700-normal-CctuGmmz.woff) format('woff');
  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;
}

/* barlow-latin-700-normal */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/play/formula-gp/assets/barlow-latin-700-normal-A9pxMQ4z.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-latin-700-normal-__SGTsZ1.woff) format('woff');
  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;
}/* barlow-condensed-vietnamese-600-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/play/formula-gp/assets/barlow-condensed-vietnamese-600-normal-A5AYRdjN.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-vietnamese-600-normal-CNlPk46_.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-condensed-latin-ext-600-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-ext-600-normal-18ESti3H.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-ext-600-normal-Clv9cIcR.woff) format('woff');
  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;
}

/* barlow-condensed-latin-600-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-600-normal-DepVgxBB.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-600-normal-BFJEwTuo.woff) format('woff');
  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;
}/* barlow-condensed-vietnamese-700-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/play/formula-gp/assets/barlow-condensed-vietnamese-700-normal-DYeBwlKR.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-vietnamese-700-normal-DhIzd8Tb.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-condensed-latin-ext-700-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-ext-700-normal-CwuXbfVR.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-ext-700-normal-BIHFfxf0.woff) format('woff');
  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;
}

/* barlow-condensed-latin-700-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-700-normal-v1xN8_Wq.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-700-normal-Dmwat-ge.woff) format('woff');
  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;
}/* barlow-condensed-vietnamese-800-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(/play/formula-gp/assets/barlow-condensed-vietnamese-800-normal-CpjukuLw.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-vietnamese-800-normal-BZxKbt5V.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-condensed-latin-ext-800-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-ext-800-normal-DGNyg4u8.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-ext-800-normal-gY_0Gifi.woff) format('woff');
  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;
}

/* barlow-condensed-latin-800-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-800-normal-BKzMuPgK.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-800-normal-e9GbPXiK.woff) format('woff');
  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;
}/* barlow-condensed-vietnamese-900-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 900;
  src: url(/play/formula-gp/assets/barlow-condensed-vietnamese-900-normal-Dt_hWMjt.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-vietnamese-900-normal-swJS2L_Y.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-condensed-latin-ext-900-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 900;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-ext-900-normal-BgjSW1bu.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-ext-900-normal-CoV-fQpy.woff) format('woff');
  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;
}

/* barlow-condensed-latin-900-normal */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 900;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-900-normal-SFh9ViAc.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-900-normal-Bz1RFETY.woff) format('woff');
  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;
}/* barlow-condensed-vietnamese-800-italic */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: italic;
  font-display: swap;
  font-weight: 800;
  src: url(/play/formula-gp/assets/barlow-condensed-vietnamese-800-italic-DdsBx9lY.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-vietnamese-800-italic-aDhyDJMT.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* barlow-condensed-latin-ext-800-italic */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: italic;
  font-display: swap;
  font-weight: 800;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-ext-800-italic-BbzArEj4.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-ext-800-italic-Ca7Cun8E.woff) format('woff');
  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;
}

/* barlow-condensed-latin-800-italic */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: italic;
  font-display: swap;
  font-weight: 800;
  src: url(/play/formula-gp/assets/barlow-condensed-latin-800-italic-Cnej2eWp.woff2) format('woff2'), url(/play/formula-gp/assets/barlow-condensed-latin-800-italic-B5BpsPSY.woff) format('woff');
  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;
}:root {
  font-family: 'Barlow', Arial, sans-serif;
  color: #edf0f0;
  background: #090e15;
  font-synthesis: none;
  --gold: #f0bb60;
  --muted: #9ca7af;
  --line: #ffffff22;
  --panel: #111923;
  --display: 'Barlow Condensed', 'Bahnschrift', Arial, sans-serif;
}

.race-options {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.race-options .secondary {
  margin: 0;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 12px;
  width: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0d1928d9;
}

.modal.track-picker-modal {
  max-width: 900px;
  width: 100%;
}

.track-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.track-picker button {
  background: #172633;
  border: 1px solid #ffffff26;
  border-left: 3px solid var(--track);
  padding: 18px;
  text-align: left;
  min-height: 180px;
}

.track-picker button:hover {
  background: #22394b;
}

.track-picker strong {
  display: block;
  font: 600 26px var(--display);
  margin-top: 10px;
}

.track-picker .route {
  position: static;
  height: 110px;
  width: 100%;
  opacity: 1;
  color: var(--track);
}

.track-picker small {
  display: block;
  color: #b4c2cd;
  font-size: 12px;
  line-height: 1.5;
}

#impact-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 130px 15px #ef6c37;
  opacity: 0;
}

.corner-hint {
  position: absolute;
  top: 125px;
  left: 50%;
  transform: translateX(-50%);
  color: #e9f4f5;
  width: 68px;
  text-align: center;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px #061018);
}
.turn-symbol {
  width: 38px;
  height: 42px;
  display: block;
  margin: 0 auto 3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#turn-distance {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.brake-cue {
  display: none;
  position: absolute;
  right: -17px;
  top: 12px;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.brake-needed {
  color: var(--gold);
}
.brake-needed .brake-cue {
  display: block;
}

@media (min-width: 601px) {
  .destinations {
    max-height: calc(100dvh - 250px);
    overflow-y: auto;
    padding-right: 6px;
  }
}

@media (max-width: 600px) {
  .track-picker {
    grid-template-columns: 1fr;
  }

  .race-options {
    flex-wrap: wrap;
  }

  .race-options .secondary {
    padding: 9px 12px;
    font-size: 11px;
  }

  .corner-hint {
    top: 225px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .corner-hint {
    top: 100px;
  }
  .turn-symbol {
    width: 27px;
    height: 30px;
  }

  .race-options {
    position: absolute;
    left: 0;
    top: 192px;
    white-space: nowrap;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}
button {
  border: 0;
}
button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  flex-shrink: 0;
}
button {
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 9, 15, 0.87), rgba(5, 9, 15, 0.4) 38%, transparent 68%),
    linear-gradient(
      0deg,
      rgba(5, 9, 15, 0.95),
      transparent 33%,
      transparent 77%,
      rgba(5, 9, 15, 0.65)
    );
  transition: opacity 0.5s;
}
body:has(.race-screen) #vignette {
  opacity: 0.28;
}
#app {
  position: relative;
  min-height: 100dvh;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
em {
  font-style: italic;
  color: var(--gold);
}
.topbar {
  height: 100px;
  padding: 0 4.5%;
  display: flex;
  align-items: center;
  gap: 55px;
  border-bottom: 1px solid #ffffff10;
  position: relative;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  background: none;
  text-align: left;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1px;
}
.brand small {
  display: block;
  font:
    8px 'Barlow',
    sans-serif;
  letter-spacing: 4px;
  color: #b0b5ba;
  margin-top: 2px;
}
.brand-mark {
  font: italic 800 46px var(--display);
  color: var(--gold);
  position: relative;
  line-height: 1;
}
.brand-mark > span {
  position: absolute;
  font: italic 14px var(--display);
  bottom: 4px;
  left: 15px;
  letter-spacing: -3px;
  color: #101721;
}
.topbar nav {
  display: flex;
  align-self: stretch;
  gap: 34px;
}
.topbar nav button {
  font-size: 13px;
  background: none;
  color: #9da6ae;
  position: relative;
  padding: 0 4px;
}
.topbar nav button:hover,
.topbar nav button.active {
  color: #fff;
}
.topbar nav button.active:after {
  content: '';
  height: 2px;
  position: absolute;
  bottom: 21px;
  left: 0;
  right: 0;
  background: var(--gold);
}
.account {
  margin-left: auto;
  display: flex;
  gap: 22px;
  align-items: center;
}
.credits {
  font-family: var(--display);
  font-size: 22px;
  white-space: nowrap;
}
.credits i {
  font: 700 9px 'Barlow';
  font-style: normal;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 2px 3px;
  vertical-align: middle;
  margin-right: 5px;
}
.icon-button {
  height: 40px;
  width: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #0d151c88;
  border-radius: 50%;
  font-size: 25px;
}
.icon-button:hover {
  background: #ffffff1b;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.3px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}
.home {
  height: calc(100dvh - 100px);
  min-height: 570px;
  position: relative;
  padding: 0 5%;
}
.hero {
  position: absolute;
  top: 9%;
  left: 5%;
  z-index: 2;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(72px, 7.6vw, 124px);
  font-weight: 800;
  font-style: italic;
  line-height: 0.81;
  letter-spacing: -2px;
  margin: 28px 0 25px;
}
.hero h1 em {
  font-style: inherit;
}
.hero-copy {
  font-size: 16px;
  line-height: 1.6;
  color: #c0c6ca;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 23px;
  margin-top: 30px;
}
.primary {
  background: var(--gold);
  color: #151719;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 13px 23px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
}
.primary:hover {
  background: #ffd28b;
}
.primary.big {
  height: 56px;
  min-width: 195px;
  font-size: 15px;
}
.text-button {
  background: transparent;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #c5ced4;
}
.text-button:hover {
  color: var(--gold);
}
.text-button > span {
  font-size: 18px;
}
.micro {
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #7f8c98;
  line-height: 1.7;
}
.hero > .micro {
  margin-top: 17px;
}
.car-caption {
  position: absolute;
  right: 6%;
  bottom: 26%;
  text-align: right;
}
.car-caption strong {
  display: block;
  font: italic 600 30px var(--display);
  margin: 6px 0;
}
.car-caption > .eyebrow {
  font-size: 8px;
}
.car-caption .text-button {
  font-size: 11px;
}
.home-bottom {
  position: absolute;
  bottom: 32px;
  left: 5%;
  right: 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.featured {
  display: flex;
  gap: 20px;
  align-items: center;
  background: none;
  text-align: left;
  padding: 0;
}
.featured-icon {
  width: 45px;
  height: 50px;
  border: 1px solid #ffffff26;
  display: grid;
  place-items: center;
  color: var(--gold);
}
.featured strong {
  display: block;
  font: 600 23px var(--display);
  margin: 5px 0;
}
.featured strong span {
  font: 9px 'Barlow';
  color: var(--muted);
  margin-left: 15px;
}
.featured p {
  font-size: 10px;
  color: #8e9da8;
}
.featured p b {
  margin: 0 7px;
  font-weight: 400;
}
.featured > .eyebrow {
  font-size: 8px;
}
.featured > svg {
  margin-left: 25px;
}
.home-guide {
  font-size: 8px;
  letter-spacing: 1.1px;
  color: #9aa6b0;
}
.key,
kbd {
  display: inline-flex;
  border: 1px solid #ffffff35;
  border-bottom-width: 2px;
  min-width: 23px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: #d2d7da;
  font: 10px 'Barlow';
  border-radius: 3px;
  margin-right: 5px;
}
.key:not(:first-child) {
  margin-left: 8px;
}
.key.wide {
  padding: 0 6px;
}
.home-guide small {
  display: block;
  margin-top: 12px;
  color: #667581;
  letter-spacing: 0.3px;
}
.edition {
  font-size: 8px;
  line-height: 1.9;
  letter-spacing: 1.8px;
  color: #6f7d88;
  text-align: right;
}
.edition b {
  font-weight: 500;
  color: #a7b0b8;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-heading h2 {
  font: 600 42px var(--display);
  margin-top: 8px;
  letter-spacing: -0.5px;
}
.garage {
  position: relative;
  height: calc(100dvh - 100px);
  padding: 30px 5%;
}
.car-spec {
  position: absolute;
  left: 5%;
  top: 136px;
  width: 255px;
}
.car-spec .eyebrow {
  font-size: 8px;
  margin-top: 17px;
}
.class-tag {
  font-size: 9px;
  border: 1px solid #e9ba6966;
  color: var(--gold);
  padding: 4px 7px;
  letter-spacing: 1px;
}
.car-spec h3 {
  font: italic 700 43px var(--display);
  margin: 7px 0 10px;
}
.description {
  font-size: 12px;
  line-height: 1.65;
  color: #99a6b0;
}
.spec-stats {
  margin: 20px 0;
}
.spec-stats > div {
  margin-bottom: 12px;
}
.spec-stats label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #9ca8b1;
}
.spec-stats b {
  font-weight: 500;
  color: #d6dce0;
}
.stat-line {
  display: block;
  height: 3px;
  background: #ffffff16;
  margin-top: 6px;
}
.stat-line i {
  display: block;
  background: #b5c1c9;
  height: 100%;
}
.paint-row {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}
.paint {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--paint);
  border: 2px solid transparent;
  box-shadow: 0 0 0 2px transparent;
}
.paint.selected {
  box-shadow: 0 0 0 1px var(--gold);
  border: 3px solid #111923;
}
.car-spec > .primary {
  width: 100%;
}
.car-spec > .micro {
  margin-top: 10px;
}
.upgrades {
  position: absolute;
  right: 5%;
  top: 130px;
  width: 225px;
}
.upgrades h4 {
  font: 500 28px var(--display);
  margin: 8px 0 20px;
}
.upgrades > .eyebrow {
  font-size: 8px;
}
.upgrade {
  display: flex;
  justify-content: space-between;
  text-align: left;
  gap: 16px;
  width: 100%;
  border-top: 1px solid var(--line);
  padding: 16px 0;
  background: none;
}
.upgrade strong {
  font-size: 12px;
  font-weight: 500;
}
.upgrade small {
  display: block;
  font-size: 9px;
  color: #96a3ae;
  line-height: 1.5;
  margin-top: 5px;
}
.upgrade > b {
  font: 500 22px var(--display);
  color: var(--gold);
}
.upgrade > b > small {
  font-size: 8px;
  text-align: right;
}
.upgrade-level {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}
.upgrade-level i {
  width: 32px;
  height: 3px;
  background: #ffffff19;
}
.upgrade-level i.filled {
  background: var(--gold);
}
.car-rail {
  position: absolute;
  bottom: 25px;
  left: 5%;
  right: 5%;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.car-card {
  background: #0c151ed9;
  border: 1px solid #ffffff15;
  padding: 12px 14px;
  text-align: left;
  min-width: 0;
}
.car-card.active {
  border-color: var(--gold);
  background: #19212ce8;
}
.car-number {
  display: flex;
  justify-content: space-between;
  color: #65717e;
  font: 13px var(--display);
}
.car-number small {
  font: 7px 'Barlow';
  color: #a3acb6;
  letter-spacing: 0.7px;
}
.car-card > strong {
  font: 600 19px var(--display);
  display: block;
}
.car-card > span:last-child {
  font-size: 8px;
  color: #8b99a5;
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.car-card b {
  color: var(--gold);
  font-weight: 500;
}
.campaign-screen {
  background: linear-gradient(90deg, #0a1119f2, #0a1119e6);
}
.campaign {
  padding: 30px 5%;
  height: calc(100dvh - 100px);
  overflow-y: auto;
}
.campaign-progress {
  text-align: right;
}
.campaign-progress strong {
  font: 600 38px var(--display);
  color: var(--gold);
}
.campaign-progress strong span {
  font-size: 20px;
  color: #5d6d7b;
  margin-left: 6px;
}
.campaign-progress small {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  color: #94a0a9;
  margin-top: 4px;
}
.campaign-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 42px;
  margin-top: 30px;
}
.destinations {
  display: grid;
  gap: 10px;
}
.destination {
  padding: 16px 20px;
  position: relative;
  text-align: left;
  background: #111d28;
  border: 1px solid #ffffff12;
  overflow: hidden;
  height: 115px;
}
.destination.active {
  border-color: var(--track);
  background: #1a2733;
}
.destination > .eyebrow {
  font-size: 7px;
  letter-spacing: 1.1px;
}
.destination strong {
  font: 600 25px var(--display);
  display: block;
  margin-top: 7px;
  position: relative;
  z-index: 1;
}
.destination .route {
  position: absolute;
  width: 120px;
  height: 60px;
  right: -5px;
  bottom: 8px;
  opacity: 0.5;
}
.route {
  fill: none;
  stroke: var(--track);
  stroke-width: 2;
  stroke-linecap: round;
}
.route-base {
  stroke: #ffffff0c;
  stroke-width: 11;
}
.destination-progress {
  position: absolute;
  bottom: 13px;
  font-size: 8px;
  color: #7f919e;
  letter-spacing: 1px;
}
.track-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 4px 0 23px;
  border-bottom: 1px solid var(--line);
}
.track-heading .eyebrow {
  font-size: 8px;
}
.track-heading h3 {
  font: 500 24px var(--display);
  margin-top: 8px;
}
.weather-label {
  font-size: 8px;
  letter-spacing: 1px;
  border: 1px solid var(--line);
  padding: 8px;
  white-space: nowrap;
  color: #b2bfc6;
}
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.event-card {
  min-height: 180px;
  padding: 18px;
  background: linear-gradient(140deg, #192732, #101b25);
  border: 1px solid #ffffff14;
  text-align: left;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.event-card:not(:disabled):hover {
  border-color: var(--gold);
  background: #1f2e39;
}
.event-card.locked {
  opacity: 0.36;
}
.event-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}
.event-number {
  font: 500 24px var(--display);
  color: #687b88;
}
.stars {
  color: #3a4853;
  letter-spacing: 3px;
  font-size: 13px;
  white-space: nowrap;
}
.stars .earned {
  color: var(--gold);
}
.event-card .eyebrow {
  font-size: 7px;
  letter-spacing: 1.4px;
}
.event-card h4 {
  font: 500 26px var(--display);
  margin: 6px 0 8px;
}
.event-card p {
  font-size: 9px;
  color: #93a4b0;
  text-transform: capitalize;
}
.event-card p b {
  padding: 0 4px;
}
.event-bottom {
  border-top: 1px solid #ffffff12;
  margin-top: 17px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a8b7c1;
  font-size: 7px;
  letter-spacing: 1px;
}
.event-bottom svg {
  width: 16px;
  height: 16px;
}
.campaign-note {
  font-size: 10px;
  line-height: 1.8;
  color: #758896;
  margin: 22px 0;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #030a13b8;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.modal {
  width: 440px;
  max-width: 100%;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: #111b26;
  border: 1px solid #ffffff20;
  padding: 32px;
  box-shadow: 0 30px 100px #0008;
}
.modal h2 {
  font: 600 44px var(--display);
  line-height: 1.1;
  margin: 13px 0 16px;
}
.modal > .primary,
.modal > .secondary {
  width: 100%;
  margin-top: 12px;
}
.modal-copy {
  font-size: 12px;
  line-height: 1.8;
  color: #a4b3be;
}
.secondary {
  background: #ffffff08;
  border: 1px solid #ffffff2a;
  min-height: 44px;
  font-size: 12px;
  padding: 12px 20px;
}
.secondary:hover {
  background: #ffffff14;
}
.centered {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-top .icon-button {
  height: 30px;
  width: 30px;
  font-size: 21px;
}
.settings-list {
  margin: 16px 0;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #ffffff12;
}
.setting-row strong {
  font-size: 12px;
  font-weight: 500;
}
.setting-row small {
  display: block;
  font-size: 10px;
  color: #8297a7;
  margin-top: 5px;
  line-height: 1.4;
}
.setting-row input {
  accent-color: var(--gold);
}
.setting-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.setting-row input[type='range'] {
  width: 110px;
}
.setting-row select {
  background: #1b2935;
  border: 1px solid #ffffff25;
  color: #dae0e5;
  padding: 8px;
  font-size: 10px;
  max-width: 170px;
}
.event-goals {
  margin: 22px 0;
}
.event-goals div {
  font-size: 12px;
  line-height: 2.4;
  color: #c6d0d7;
}
.event-goals span {
  color: var(--gold);
  margin-right: 10px;
}
.race-screen {
  user-select: none;
  touch-action: none;
}
.race-top {
  position: absolute;
  top: max(28px, env(safe-area-inset-top));
  left: 4%;
  right: 4%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  text-shadow: 0 2px 10px #0009;
}
.race-top .eyebrow {
  font-size: 9px;
  color: #bdc8cf;
}
.race-position strong {
  font: 600 56px var(--display);
  display: block;
  line-height: 1.2;
}
.race-position strong small {
  font: 400 18px var(--display);
  color: #9caebc;
  margin-left: 7px;
}
.race-timer {
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
}
.race-timer > strong {
  font: 500 30px var(--display);
  display: block;
  letter-spacing: 2px;
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
}
.progress-track {
  height: 2px;
  background: #ffffff30;
  display: block;
  margin-top: 13px;
  width: 220px;
}
.progress-track i {
  height: 100%;
  background: var(--gold);
  display: block;
  width: 0;
}
.race-distance {
  margin-left: auto;
  text-align: right;
  margin-right: 14px;
}
.race-distance strong {
  font: 500 29px var(--display);
  display: block;
  margin-top: 8px;
}
.race-distance small {
  font-size: 14px;
  color: #9caebc;
}
.pause-button {
  flex-shrink: 0;
  background: #0b172b66;
}
.race-callout {
  position: absolute;
  top: 27dvh;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 2px 30px #000;
}
.race-callout > strong {
  font: italic 800 100px var(--display);
  color: var(--gold);
  display: block;
}
.race-callout > span {
  position: fixed;
  top: 200px;
  left: 5%;
  right: 5%;
  font: 600 13px var(--display);
  letter-spacing: 3px;
  color: var(--gold);
  display: block;
  margin-top: 5px;
}
.race-location {
  position: absolute;
  left: 4%;
  bottom: 90px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.race-location > i {
  width: 4px;
  height: 34px;
  background: var(--gold);
}
.race-location > span {
  font: 500 20px var(--display);
  letter-spacing: 1px;
}
.race-location small {
  display: block;
  font: 8px 'Barlow';
  color: #a3b0bb;
  letter-spacing: 1.8px;
  margin-top: 6px;
}
.speedometer {
  position: absolute;
  right: 4%;
  bottom: 40px;
  width: 180px;
  text-align: center;
  text-shadow: 0 2px 12px #000;
}
.speedometer > svg {
  width: 180px;
  fill: none;
  stroke-width: 3;
}
.speed-base {
  stroke: #ffffff24;
}
#speed-arc {
  stroke: var(--gold);
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 0.1s;
}
.speed-value {
  position: absolute;
  top: 25px;
  left: 0;
  right: 0;
}
.speed-value > strong {
  font: 500 57px var(--display);
  letter-spacing: 2px;
  line-height: 1;
}
.speed-value > span {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 5px;
  color: #a7bbc9;
}
.speed-value b {
  font: 500 16px var(--display);
  display: inline-block;
  background: #ffffff20;
  padding: 1px 6px;
  color: var(--gold);
  margin-left: 5px;
}
.boost-meter {
  height: 3px;
  background: #ffffff26;
  margin: 0 20px;
}
.boost-meter i {
  height: 100%;
  display: block;
  background: #87cfdf;
}
.boost-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 7px;
  letter-spacing: 2px;
  color: #b1c8d0;
  margin-top: 10px;
}
.boost-caption svg {
  width: 10px;
  height: 10px;
  fill: #87cfdf;
}
.boost-caption b {
  font-weight: 500;
  margin-left: 10px;
}
.desktop-hints {
  position: absolute;
  bottom: 30px;
  left: 4%;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 8px;
  color: #c0cbd2;
  letter-spacing: 1px;
}
.desktop-hints kbd {
  margin-right: 3px;
  min-width: 20px;
  padding: 0 4px;
  font-size: 9px;
}
.desktop-hints > span:last-child {
  color: #8c9ca8;
  font-size: 7px;
}
.touch-controls {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.steering-controls,
.pedal-controls {
  pointer-events: auto;
  position: absolute;
  bottom: max(30px, env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.steering-controls {
  left: 4%;
}
.pedal-controls {
  right: 4%;
}
.left-handed .steering-controls {
  left: auto;
  right: 4%;
}
.left-handed .pedal-controls {
  right: auto;
  left: 4%;
}
.touch-button {
  width: calc(66px * var(--control-scale));
  height: calc(66px * var(--control-scale));
  border: 1px solid #ffffff45;
  background: #0c1a2988;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  touch-action: none;
  backdrop-filter: blur(4px);
}
.touch-button small {
  font-size: 7px;
  letter-spacing: 1px;
  margin-top: 3px;
}
.touch-button svg {
  width: 23px;
  height: 23px;
}
.touch-button.pressed {
  background: #f0bb6070;
  border-color: var(--gold);
}
.boost-button {
  color: var(--gold);
  border-color: #f0bb6088;
  margin-bottom: 35px;
}
.brake-button > span {
  font-size: 23px;
}
.gas-button {
  font-size: 27px;
}
.steer-button {
  font-size: 36px;
}
#steer-pad {
  width: calc(155px * var(--control-scale));
  height: calc(76px * var(--control-scale));
  background: #0c1a2988;
  border: 1px solid #ffffff3b;
  border-radius: 45px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  color: #b5c3cc;
  font-size: 25px;
  touch-action: none;
  backdrop-filter: blur(4px);
}
#steer-pad i {
  width: 48px;
  height: 48px;
  background: #ffffff17;
  border: 1px solid #ffffff6b;
  position: absolute;
  left: calc(50% - 24px);
  border-radius: 50%;
  pointer-events: none;
}
#steer-pad small {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  bottom: -18px;
  font-size: 7px;
  letter-spacing: 2px;
}
.shift-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}
.shift-controls button {
  height: 45px;
  width: 45px;
  border: 1px solid #ffffff55;
  background: #0c172b88;
  font-size: 28px;
  border-radius: 50%;
}
.shift-controls span {
  font-size: 7px;
  letter-spacing: 2px;
  color: #acbecb;
}
.recover {
  position: absolute;
  right: 4%;
  top: 125px;
  background: #0c172b55;
  border: 1px solid #ffffff26;
  padding: 7px 10px;
  font-size: 16px;
}
.recover span {
  font-size: 7px;
  letter-spacing: 1px;
  margin-left: 5px;
}
.result-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 24px 0;
}
.result-hero > strong {
  font: 600 60px var(--display);
  line-height: 1;
}
.result-hero > strong > span {
  font: 14px var(--display);
  color: #899dac;
  margin-left: 6px;
}
.result-stars {
  font-size: 23px;
  letter-spacing: 4px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.result-stats span {
  display: block;
  font-size: 7px;
  letter-spacing: 1.5px;
  color: #859ba9;
}
.result-stats b {
  font: 500 23px var(--display);
  display: block;
  margin-top: 6px;
}
.gold {
  color: var(--gold);
}
.result-note {
  font-size: 10px;
  line-height: 1.7;
  color: #91a7b6;
  margin: 18px 0;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  background: #eabb6f;
  color: #17212b;
  font-size: 12px;
  padding: 13px 22px;
  box-shadow: 0 4px 30px #0006;
  transition: 0.2s;
  max-width: 90%;
  text-align: center;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.fallback {
  max-width: 550px;
  margin: 15vh auto;
  padding: 30px;
}
.fallback h1 {
  font: 600 48px var(--display);
}
.fallback p {
  line-height: 1.8;
  margin: 25px 0;
  color: #a4b3bf;
}
@media (min-width: 1500px) {
  .hero {
    top: 14%;
  }
  .garage .car-spec {
    top: 160px;
  }
  .car-rail {
    bottom: 40px;
  }
  .car-card {
    padding: 18px;
  }
  .car-silhouette {
    height: 60px;
  }
  .upgrades {
    top: 165px;
    width: 260px;
  }
  .car-spec {
    width: 290px;
  }
}
@media (max-height: 760px) and (min-width: 901px) {
  .topbar {
    height: 78px;
  }
  .home,
  .garage,
  .campaign {
    height: calc(100dvh - 78px);
  }
  .hero {
    top: 5%;
  }
  .hero h1 {
    font-size: 83px;
    margin: 20px 0;
  }
  .hero-copy {
    font-size: 14px;
  }
  .hero-actions {
    margin-top: 18px;
  }
  .home-bottom {
    bottom: 24px;
  }
  .garage {
    padding-top: 20px;
  }
  .section-heading h2 {
    font-size: 34px;
  }
  .car-spec {
    top: 100px;
  }
  .car-spec h3 {
    font-size: 34px;
  }
  .description {
    font-size: 10px;
  }
  .spec-stats {
    margin: 12px 0;
  }
  .spec-stats > div {
    margin-bottom: 8px;
  }
  .paint-row {
    margin: 12px 0;
  }
  .car-rail {
    bottom: 16px;
  }
  .car-card {
    padding: 9px 12px;
  }
  .car-silhouette {
    height: 34px;
  }
  .upgrades {
    top: 105px;
  }
  .campaign {
    padding-top: 20px;
  }
  .campaign-layout {
    margin-top: 22px;
  }
  .destination {
    height: 100px;
  }
  .event-card {
    min-height: 165px;
    padding: 15px;
  }
  .event-top {
    margin-bottom: 12px;
  }
  .events-grid {
    margin-top: 18px;
  }
  .campaign-note {
    margin-top: 15px;
  }
}
@media (pointer: coarse), (max-width: 900px) {
  .touch-controls {
    display: block;
  }
  .desktop-hints {
    display: none;
  }
  .speedometer {
    width: 120px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
  }
  .speedometer > svg {
    width: 120px;
  }
  .speed-value {
    top: 18px;
  }
  .speed-value > strong {
    font-size: 36px;
  }
  .speed-value > span {
    font-size: 6px;
    margin-top: 2px;
  }
  .speed-value b {
    font-size: 12px;
  }
  .boost-meter {
    margin: 0 12px;
  }
  .boost-caption {
    font-size: 6px;
    letter-spacing: 1px;
    margin-top: 7px;
  }
  .race-location {
    bottom: 150px;
  }
  .shift-controls {
    bottom: 145px;
  }
  .race-top {
    gap: 15px;
  }
  .race-timer {
    min-width: 150px;
  }
  .progress-track {
    width: 160px;
  }
  .race-top .eyebrow {
    font-size: 7px;
  }
  .race-position strong {
    font-size: 40px;
  }
  .race-distance strong {
    font-size: 23px;
  }
  .race-distance small {
    font-size: 11px;
  }
  .race-timer > strong {
    font-size: 25px;
  }
  .topbar {
    height: 78px;
    gap: 26px;
  }
  .brand {
    font-size: 19px;
    gap: 8px;
  }
  .brand-mark {
    font-size: 36px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 3px;
  }
  .account {
    gap: 10px;
  }
  .credits {
    font-size: 18px;
  }
  .topbar nav {
    gap: 20px;
  }
  .home {
    height: calc(100dvh - 78px);
    min-height: 480px;
  }
  .home-guide,
  .edition {
    display: none;
  }
  .hero h1 {
    font-size: 94px;
  }
  .hero {
    top: 10%;
  }
  .car-caption {
    bottom: 24%;
  }
  .garage {
    height: calc(100dvh - 78px);
  }
  .upgrades {
    width: 190px;
    right: 4%;
  }
  .car-spec {
    width: 230px;
  }
  .car-rail {
    overflow-x: auto;
    display: flex;
    left: 4%;
    right: 4%;
    padding-bottom: 8px;
  }
  .car-card {
    min-width: 155px;
  }
  .campaign-layout {
    grid-template-columns: 180px 1fr;
    gap: 20px;
  }
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .campaign {
    height: calc(100dvh - 78px);
  }
  .track-heading {
    display: block;
  }
  .weather-label {
    display: inline-block;
    margin-top: 12px;
  }
  .destination {
    padding: 15px;
  }
  .destination strong {
    font-size: 23px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 70px;
    padding: 0 5%;
    gap: 16px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 16px;
  }
  .brand-mark {
    font-size: 31px;
  }
  .brand small {
    font-size: 5px;
    letter-spacing: 2.5px;
  }
  .topbar nav {
    position: absolute;
    top: 70px;
    height: 45px;
    left: 5%;
    gap: 28px;
  }
  .topbar nav button {
    font-size: 12px;
  }
  .topbar nav button.active:after {
    bottom: 3px;
  }
  .account {
    gap: 9px;
  }
  .credits {
    font-size: 19px;
  }
  .icon-button {
    width: 33px;
    height: 33px;
  }
  .home {
    height: calc(100dvh - 70px);
    min-height: 580px;
  }
  .hero {
    top: 12%;
    left: 6%;
  }
  .hero .eyebrow {
    font-size: 8px;
    letter-spacing: 1.7px;
  }
  .hero h1 {
    font-size: 88px;
    line-height: 0.83;
    margin: 24px 0 20px;
  }
  .hero-copy {
    font-size: 13px;
    line-height: 1.5;
  }
  .hero-actions {
    gap: 18px;
    margin-top: 24px;
  }
  .primary.big {
    min-width: 155px;
    height: 48px;
    font-size: 13px;
    padding: 12px 18px;
  }
  .hero-actions .text-button {
    font-size: 10px;
  }
  .hero > .micro {
    font-size: 6px;
    letter-spacing: 1.3px;
  }
  .car-caption {
    bottom: 19%;
    right: 6%;
  }
  .car-caption strong {
    font-size: 22px;
  }
  .car-caption > .eyebrow {
    font-size: 6px;
  }
  .car-caption .text-button {
    font-size: 9px;
    padding: 4px 0;
  }
  .home-bottom {
    bottom: 22px;
    padding-top: 18px;
  }
  .featured {
    gap: 14px;
  }
  .featured strong {
    font-size: 22px;
  }
  .featured .eyebrow {
    font-size: 7px;
  }
  .featured p {
    font-size: 9px;
  }
  .featured > svg {
    margin-left: 10px;
  }
  .featured-icon {
    width: 36px;
    height: 44px;
  }
  .garage-screen {
    background: linear-gradient(0deg, #0b131df0 0%, transparent 70%);
    height: 100dvh;
    overflow: auto;
  }
  .garage {
    height: auto;
    min-height: 1100px;
    padding: 70px 6% 20px;
  }
  .section-heading h2 {
    font-size: 35px;
  }
  .section-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .car-spec {
    position: relative;
    left: 0;
    top: auto;
    width: 100%;
    margin-top: 220px;
  }
  .car-spec h3 {
    font-size: 38px;
  }
  .description {
    max-width: 300px;
  }
  .spec-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
  }
  .paint-row {
    margin: 18px 0;
  }
  .upgrades {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 30px;
  }
  .upgrades h4 {
    font-size: 26px;
    margin-bottom: 10px;
  }
  .upgrade {
    padding: 13px 0;
  }
  .car-rail {
    position: relative;
    left: 0;
    right: auto;
    bottom: auto;
    width: calc(100% + 22px);
    margin-top: 25px;
  }
  .car-card {
    min-width: 140px;
  }
  .campaign {
    padding: 70px 5% 25px;
    height: calc(100dvh - 70px);
  }
  .campaign-progress strong {
    font-size: 29px;
  }
  .campaign-progress strong span {
    font-size: 15px;
  }
  .campaign-progress small {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .campaign-layout {
    display: block;
    margin-top: 24px;
  }
  .destinations {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }
  .destination {
    min-width: 165px;
    height: 110px;
  }
  .events-grid {
    gap: 10px;
    margin-top: 18px;
  }
  .event-card {
    padding: 13px;
    min-height: 175px;
  }
  .event-card h4 {
    font-size: 23px;
  }
  .event-card .eyebrow {
    font-size: 6px;
  }
  .event-card p {
    font-size: 8px;
  }
  .event-top {
    margin-bottom: 14px;
  }
  .stars {
    font-size: 11px;
    letter-spacing: 2px;
  }
  .event-bottom {
    font-size: 6px;
    letter-spacing: 0.7px;
  }
  .track-heading h3 {
    font-size: 23px;
  }
  .weather-label {
    font-size: 7px;
  }
  .modal-backdrop {
    padding: 16px;
  }
  .modal {
    padding: 25px;
    max-height: calc(100dvh - 32px);
  }
  .modal h2 {
    font-size: 39px;
  }
  .race-top {
    top: max(22px, env(safe-area-inset-top));
    left: 5%;
    right: 5%;
    gap: 6px;
  }
  .race-distance {
    display: none;
  }
  .race-position strong {
    font-size: 40px;
  }
  .race-timer {
    min-width: 140px;
  }
  .race-timer > strong {
    font-size: 24px;
  }
  .race-timer .eyebrow {
    font-size: 6px;
    letter-spacing: 1.5px;
  }
  .progress-track {
    width: 140px;
  }
  .race-location {
    left: 5%;
    bottom: 195px;
  }
  .race-location > span {
    font-size: 16px;
  }
  .race-location small {
    font-size: 6px;
  }
  .race-location > i {
    height: 28px;
  }
  .recover {
    top: 100px;
  }
  .recover span {
    display: none;
  }
  .speedometer {
    bottom: 132px;
    width: 135px;
  }
  .speedometer > svg {
    width: 135px;
  }
  .speed-value {
    top: 20px;
  }
  .speed-value > strong {
    font-size: 40px;
  }
  .touch-button {
    width: calc(58px * var(--control-scale));
    height: calc(58px * var(--control-scale));
  }
  .steering-controls,
  .pedal-controls {
    bottom: max(45px, env(safe-area-inset-bottom));
  }
  .pedal-controls {
    gap: 7px;
  }
  .boost-button {
    margin-bottom: 42px;
  }
  #steer-pad {
    width: calc(138px * var(--control-scale));
    height: calc(68px * var(--control-scale));
    padding: 0 12px;
  }
  .shift-controls {
    bottom: 270px;
  }
  .race-callout {
    top: 27dvh;
  }
  .race-callout > strong {
    font-size: 84px;
  }
  .race-callout > span {
    top: 294px;
    font-size: 11px;
    letter-spacing: 2px;
  }
  .result-hero > strong {
    font-size: 50px;
  }
  .result-stars {
    font-size: 21px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .topbar {
    height: 60px;
  }
  .home {
    height: calc(100dvh - 60px);
    min-height: 0;
  }
  .hero {
    top: 7%;
  }
  .hero h1 {
    font-size: 62px;
    margin: 15px 0;
  }
  .hero-copy {
    display: none;
  }
  .hero-actions {
    margin-top: 18px;
  }
  .hero > .micro {
    font-size: 6px;
  }
  .hero .eyebrow {
    font-size: 7px;
  }
  .home-bottom {
    bottom: 14px;
    padding-top: 12px;
    left: auto;
    width: 42%;
    right: 5%;
  }
  .featured-icon {
    height: 34px;
    width: 32px;
  }
  .featured strong {
    font-size: 19px;
  }
  .featured p {
    font-size: 8px;
  }
  .car-caption {
    bottom: 33%;
    right: 5%;
  }
  .hero .primary.big {
    height: 44px;
    min-width: 140px;
  }
  .car-caption strong {
    font-size: 24px;
  }
  .race-top {
    top: 14px;
  }
  .race-location {
    display: none;
  }
  .race-callout {
    top: 22dvh;
  }
  .race-callout > strong {
    font-size: 65px;
  }
  .race-callout > span {
    top: 160px;
    font-size: 10px;
  }
  .steering-controls,
  .pedal-controls {
    bottom: 22px;
  }
  .touch-button {
    width: 54px;
    height: 54px;
  }
  .boost-button {
    margin-bottom: 20px;
  }
  #steer-pad {
    height: 65px;
    width: 140px;
  }
  .speedometer {
    bottom: 14px;
  }
  .shift-controls {
    left: 68%;
    bottom: 24px;
    gap: 6px;
  }
  .shift-controls button {
    height: 34px;
    width: 34px;
  }
  .shift-controls span {
    display: none;
  }
  .recover {
    top: 90px;
  }
  .garage-screen {
    height: 100dvh;
    overflow: auto;
  }
  .garage {
    height: 800px;
  }
  .car-spec {
    top: 120px;
  }
  .upgrades {
    top: 120px;
  }
  .car-rail {
    bottom: 25px;
  }
  .campaign {
    height: calc(100dvh - 60px);
  }
  .modal {
    max-height: calc(100dvh - 25px);
  }
}
@media (prefers-reduced-motion: reduce) {
  button,
  #toast {
    transition: none;
  }
}

.garage > .section-heading {
  display: block;
}
.garage > .section-heading h2 {
  margin-top: 8px;
}
.car-caption {
  text-shadow: 0 2px 15px #000;
}
.upgrades {
  background: linear-gradient(90deg, transparent, #0b1526aa);
  padding: 16px;
  margin-right: -16px;
}

/* Weather is a visual layer; every control stays above it. */
#weather-lens {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.credits {
  background: #0d1724bb;
  border: 1px solid #ffffff20;
  padding: 8px 12px;
  min-height: 44px;
}

.credits:hover {
  border-color: var(--gold);
}

.garage-screen {
  height: 100dvh;
  overflow-y: auto;
}

.garage {
  min-height: 850px;
}

.upgrades {
  width: 280px;
}

.upgrade {
  min-height: 78px;
  padding: 13px 0;
}

.upgrade strong {
  font-size: 14px;
}

.upgrade small {
  font-size: 11px;
}

.upgrade-level {
  margin-top: 9px;
}

.garage-hint,
.save-note {
  font-size: 12px;
  line-height: 1.6;
  color: #99aab8;
  margin: 15px 0;
}

.paint {
  width: 32px;
  height: 32px;
}

.purchase-preview,
.reward-breakdown {
  margin: 18px 0;
}

.purchase-preview > div,
.reward-breakdown > div,
.purchase-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  font-size: 13px;
  color: #bac8d3;
}

.purchase-preview b {
  text-align: right;
  font-weight: 500;
}

.purchase-preview i {
  color: #8596a8;
  padding: 0 5px;
  font-style: normal;
}

.purchase-preview em {
  font-style: normal;
}

.purchase-total,
.reward-breakdown > .reward-balance {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 16px;
  color: var(--gold);
}

.wallet-career {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 20px 0;
  margin-bottom: 20px;
  border-block: 1px solid var(--line);
}

.wallet-career b {
  display: block;
  font: 600 30px var(--display);
}

.wallet-career span {
  font-size: 9px;
  letter-spacing: 1px;
  color: #93a6b5;
}

.wallet-history {
  max-height: 250px;
  overflow-y: auto;
  margin-top: 14px;
}

.wallet-history > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.wallet-history small {
  display: block;
  color: #93a6b5;
  margin-top: 5px;
}

.wallet-history b {
  white-space: nowrap;
  font-weight: 500;
}

/* Thumb-friendly portrait layout with the driving view in the centre. */
@media (max-width: 600px) {
  .menu-screen {
    height: 100dvh;
    overflow-y: auto;
  }

  .topbar {
    position: sticky;
    top: 0;
    background: #0a121ee8;
    padding-inline: max(16px, env(safe-area-inset-left));
    flex-wrap: nowrap;
    gap: 8px;
  }

  .topbar nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: 58px;
    padding-bottom: env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: #0b1420f5;
    border-top: 1px solid #ffffff25;
  }

  .topbar nav button {
    min-height: 58px;
    font-size: 13px;
  }

  .topbar nav button.active:after {
    bottom: auto;
    top: 0;
    left: 20%;
    right: 20%;
  }

  .account {
    gap: 6px;
  }

  .credits {
    padding: 7px 9px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .home {
    min-height: 650px;
  }

  .hero {
    top: 5%;
  }

  .home-bottom {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .car-caption {
    bottom: 29%;
  }

  .garage {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 25px 6% calc(90px + env(safe-area-inset-bottom));
  }

  .garage .section-heading {
    order: 0;
  }

  .garage .car-rail {
    order: 1;
    margin-top: 230px;
    width: 100%;
    scroll-snap-type: x proximity;
  }

  .car-card {
    scroll-snap-align: start;
  }

  .garage .car-spec {
    order: 2;
    margin-top: 28px;
    padding: 20px;
    background: #0b1421ee;
    border: 1px solid var(--line);
  }

  .garage .upgrades {
    order: 3;
    width: 100%;
    margin: 24px 0 0;
    padding: 20px;
    background: #0b1421ee;
    border: 1px solid var(--line);
  }

  .spec-stats {
    gap: 12px 18px;
  }

  .paint-row {
    gap: 8px;
  }

  .paint {
    width: 30px;
    height: 30px;
  }

  .campaign {
    padding-top: 25px;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .speedometer {
    top: calc(108px + env(safe-area-inset-top));
    bottom: auto;
    filter: drop-shadow(0 3px 8px #000);
  }

  .race-location {
    bottom: 192px;
  }

  .recover {
    min-height: 44px;
    min-width: 44px;
  }

  .pedal-controls {
    display: grid;
    grid-template-columns: repeat(2, auto);
    align-items: end;
  }

  .pedal-controls:has(.gas-button) .boost-button {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
  }

  .pedal-controls:has(.gas-button) .brake-button {
    grid-column: 1;
    grid-row: 2;
  }

  .gas-button {
    grid-column: 2;
    grid-row: 2;
  }

  .touch-button {
    width: calc(54px * min(var(--control-scale), 1.1));
    height: calc(60px * min(var(--control-scale), 1.1));
  }

  #steer-pad {
    width: calc(124px * min(var(--control-scale), 1.1));
  }

  .steering-controls {
    gap: 6px;
  }

  .shift-controls {
    bottom: 190px;
    left: 72%;
  }

  .shift-controls span {
    display: none;
  }

  #toast {
    bottom: calc(75px + env(safe-area-inset-bottom));
  }
}

/* Garage content flows in a grid so the model, upgrades and cards cannot overlap. */
.garage {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(240px, 1fr) minmax(230px, 280px);
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  height: auto;
  min-height: calc(100dvh - 100px);
  padding: 30px 4% 45px;
}
.garage .section-heading {
  grid-column: 1 / -1;
}
.garage .car-spec,
.garage .upgrades {
  position: static;
  width: auto;
  margin: 0;
  min-width: 0;
}
.garage .car-spec {
  grid-column: 1;
  grid-row: 2;
}
.garage .upgrades {
  grid-column: 3;
  grid-row: 2;
}
.garage-preview {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 320px;
  background:
    radial-gradient(ellipse at 50% 60%, #314c6866, transparent 65%),
    linear-gradient(#0c1522cc, #0c1522f2);
  border: 1px solid #ffffff12;
}
.garage-preview > img {
  width: 120%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  pointer-events: none;
}
.garage-preview > p {
  margin: 18px 0;
  font-size: 11px;
  letter-spacing: 1px;
  color: #e1e7ed;
}
.garage-preview > p > span {
  color: #9baaba;
}
.preview-controls {
  display: flex;
  gap: 8px;
  z-index: 1;
}
.preview-controls button {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #70839766;
  background: #101d2b;
  font-size: 11px;
  color: #aebdcc;
}
.preview-controls button[aria-pressed='true'] {
  border-color: var(--gold);
  color: var(--gold);
}
.garage .car-rail {
  position: static;
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  margin: 8px 0 0;
  padding: 0;
  overflow: visible;
}
.garage .car-card {
  min-width: 0;
  padding: 12px;
  background: #101a26;
}
.garage .car-card.active {
  background: #1e2b39;
}
.car-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  margin: 8px 0;
  pointer-events: none;
}
img[data-preview]:not([src]) {
  visibility: hidden;
}
@media (max-width: 1100px) {
  .garage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
  }
  .garage-preview {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 0;
  }
  .garage-preview > img {
    width: 100%;
    max-width: 560px;
  }
  .garage .car-spec {
    grid-column: 1;
    grid-row: 3;
  }
  .garage .upgrades {
    grid-column: 2;
    grid-row: 3;
  }
  .garage .car-rail {
    grid-row: 4;
    display: flex;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
  }
  .garage .car-card {
    flex: 0 0 180px;
    scroll-snap-align: start;
  }
}
@media (max-width: 700px) {
  .garage {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 0;
    padding: 24px 6% calc(90px + env(safe-area-inset-bottom));
  }
  .garage .section-heading {
    order: 0;
  }
  .garage-preview {
    order: 1;
    min-height: 0;
  }
  .garage-preview > img {
    width: 100%;
  }
  .garage-preview > p {
    text-align: center;
    font-size: 10px;
  }
  .garage .car-rail {
    order: 2;
    margin: 0;
  }
  .garage .car-card {
    flex-basis: 170px;
  }
  .garage .car-spec {
    order: 3;
    margin: 0;
  }
  .garage .upgrades {
    order: 4;
    margin: 0;
  }
}
.race-minimap {
  position: absolute;
  top: calc(140px + env(safe-area-inset-top));
  left: 4%;
  width: 140px;
  padding: 9px 8px 7px;
  background: #07121bc9;
  border: 1px solid #aac8d02b;
  border-radius: 8px;
  pointer-events: none;
}
.minimap-title,
.minimap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 8px;
  letter-spacing: 1.2px;
  color: #c4d4d9;
}
#race-map {
  display: block;
  width: 100%;
  height: 120px;
}
.minimap-road-border {
  fill: none;
  stroke: #07121b;
  stroke-width: 6;
}
.minimap-road {
  fill: none;
  stroke: #9bb8c3;
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.minimap-legend i,
.minimap-legend b {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff5d5;
}
.minimap-legend b {
  background: #df8145;
  margin-left: 5px;
}
.minimap-car {
  animation: car-marker-pulse 1.4s ease-in-out infinite;
}
.map-paused .minimap-car {
  animation-play-state: paused;
}
@keyframes car-marker-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.race-screen .boost-meter {
  height: 9px;
  margin: 7px 8px 0;
  border: 1px solid #92d3e259;
  border-radius: 3px;
  overflow: hidden;
}
.race-screen .boost-meter i {
  transition: width 0.08s linear;
  background: linear-gradient(90deg, #439ab4, #a2e9ee);
}
.race-screen .boost-meter.low-charge i {
  background: #e6a950;
}
.boosting .boost-meter {
  box-shadow: 0 0 12px #6adbef6b;
}
.race-screen .boost-caption {
  font-size: 9px;
  letter-spacing: 0.7px;
  margin-top: 5px;
}
.boost-caption b {
  margin-left: 3px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .race-minimap {
    top: calc(103px + env(safe-area-inset-top));
    left: 4%;
    width: 94px;
    padding: 5px;
  }
  #race-map {
    height: 82px;
  }
  .minimap-title,
  .minimap-legend {
    font-size: 6px;
    letter-spacing: 0.5px;
    gap: 3px;
  }
  .race-screen .speedometer {
    width: 120px;
  }
  .race-screen .speedometer > svg {
    width: 120px;
  }
  .race-screen .speed-value {
    top: 17px;
  }
  .race-screen .speed-value > strong {
    font-size: 36px;
  }
  .race-screen .boost-caption {
    font-size: 8px;
  }
}
@media (max-width: 350px) {
  .race-minimap {
    width: 78px;
  }
  #race-map {
    height: 78px;
  }
  .race-screen .speedometer {
    width: 108px;
  }
  .race-screen .speedometer > svg {
    width: 108px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .race-minimap {
    top: 88px;
    width: 90px;
    padding: 4px;
  }
  #race-map {
    height: 72px;
  }
  .minimap-title,
  .minimap-legend {
    font-size: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .minimap-car {
    animation: none;
  }
  .race-screen .boost-meter i {
    transition: none;
  }
}
.start-lights {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  padding: 12px 16px;
  background: #071018e8;
  border: 1px solid #ffffff30;
  border-radius: 10px;
}
.start-lights[hidden] {
  display: none;
}
.race-screen.starting .corner-hint {
  visibility: hidden;
}
.start-lamp-row {
  display: flex;
  gap: 10px;
}
.start-lamp-row i {
  display: block;
  width: clamp(23px, 4vw, 42px);
  height: clamp(23px, 4vw, 42px);
  border-radius: 50%;
  background: #351115;
  border: 2px solid #080b10;
}
.start-lamp-row i.lit {
  background: #ff382b;
  box-shadow:
    0 0 18px #ff241b88,
    inset 0 2px 4px #ffb59d;
}
#start-light-label {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 10px;
  white-space: nowrap;
}
.race-screen .boost-meter.boost-ready {
  animation: boost-ready-pulse 1.6s ease-in-out infinite;
}
.boost-ready i {
  background-size: 200% 100% !important;
  animation: boost-ready-shimmer 1.6s linear infinite;
}
@keyframes boost-ready-pulse {
  0%,
  100% {
    box-shadow: 0 0 3px #8eeaff40;
  }
  50% {
    box-shadow: 0 0 15px #8eeaffbb;
  }
}
@keyframes boost-ready-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: 0 0;
  }
}
.motion-setting {
  padding: 16px 0;
  border-bottom: 1px solid #ffffff18;
}
.motion-setting p,
.motion-setting small {
  font-size: 12px;
  color: #bbc9ce;
  line-height: 1.5;
}
#steer-pad.round-steer {
  width: calc(112px * var(--control-scale));
  height: calc(112px * var(--control-scale));
  border-radius: 50%;
  justify-content: center;
  padding: 0;
}
#steer-pad.wheel i {
  width: 84%;
  height: 84%;
  left: 8%;
  top: 8%;
  border: 7px solid #b2c6d7;
  background: linear-gradient(0deg, transparent 42%, #b2c6d7 42%, #b2c6d7 53%, transparent 53%);
}
#steer-pad.wheel i::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 20px;
  background: #f0bb60;
  top: -7px;
  left: calc(50% - 3px);
}
.tilt-hint {
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 8px;
  letter-spacing: 1px;
}
/* Short landscape phones keep instruments above a separate bottom control row. */
@media (max-height: 500px) and (orientation: landscape) {
  .race-screen .speedometer {
    top: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 50%;
    right: auto;
    width: 108px;
    transform: translateX(-50%);
  }
  .race-screen .speedometer > svg {
    width: 108px;
  }
  .race-screen .speed-value > strong {
    font-size: 32px;
  }
  .race-minimap {
    top: 80px;
    width: 78px;
  }
  #race-map {
    height: 52px;
  }
  .steering-controls,
  .pedal-controls {
    bottom: max(22px, env(safe-area-inset-bottom));
  }
  .shift-controls {
    left: 50%;
    transform: translateX(-50%);
    bottom: 120px;
  }
  .race-callout > span {
    top: 148px;
  }
  .corner-hint {
    top: 90px;
  }
  .recover {
    top: 80px;
  }
  .left-handed .steering-controls,
  .pedal-controls {
    right: max(4%, env(safe-area-inset-right));
  }
  .steering-controls,
  .left-handed .pedal-controls {
    left: max(4%, env(safe-area-inset-left));
  }
  .left-handed .steering-controls {
    left: auto;
  }
  .left-handed .pedal-controls {
    right: auto;
  }
}
@media (max-width: 350px) and (orientation: portrait) {
  .start-lights {
    top: 220px;
  }
}
@media (max-width: 350px), (max-height: 500px) {
  #steer-pad.round-steer {
    width: calc(86px * var(--control-scale));
    height: calc(86px * var(--control-scale));
  }
}
@media (prefers-reduced-motion: reduce) {
  .race-screen .boost-meter.boost-ready,
  .boost-ready i {
    animation: none;
    box-shadow: 0 0 6px #8eeaff80;
  }
}
.corner-hint.reversing .turn-symbol {
  transform: rotate(180deg);
}
/* Shared display controls stay reachable in menus, races and the pause panel. */
.fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  color: #edf0f0;
  background: transparent;
}

.fullscreen-button svg {
  flex: 0 0 20px;
}

.fullscreen-button[aria-pressed='true'] {
  color: var(--gold);
}

.race-actions {
  display: flex;
  gap: 8px;
}

.race-fullscreen span {
  display: none;
}

.race-actions .icon-button,
.modal-top .icon-button {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.modal-backdrop {
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.modal,
.platform-panel {
  overscroll-behavior: contain;
  touch-action: pan-y;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  scrollbar-color: #697b89 #111923;
  overflow-wrap: anywhere;
}

.modal select,
.modal input:not([type='checkbox']),
.platform-panel input,
.platform-panel select {
  font-size: 16px;
  min-height: 44px;
}

.modal .text-button,
.platform-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.setting-row {
  min-height: 56px;
  gap: 14px;
}

.setting-row strong {
  font-size: 14px;
}

.setting-row small {
  font-size: 12px;
  color: #b6c2cd;
}

.setting-row input[type='checkbox'] {
  width: 24px;
  height: 24px;
}

.expanded-play .home-guide,
.expanded-play .edition,
.expanded-play .hero > .micro {
  display: none;
}

.expanded-play .hero-actions .primary {
  min-height: 52px;
}

@media (max-width: 1100px) {
  .topbar {
    gap: 18px;
  }

  .topbar nav {
    gap: 16px;
  }

  .account {
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(70px + env(safe-area-inset-top));
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }

  .topbar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  }

  .topbar nav .fullscreen-button {
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    line-height: 1.2;
  }

  .brand {
    padding: 0;
    gap: 8px;
    font-size: 15px;
    flex-shrink: 0;
  }

  .account {
    gap: 5px;
    min-width: 0;
  }

  .credits {
    min-height: 44px;
    padding: 6px;
    font-size: 18px;
  }

  .credits i {
    margin-right: 2px;
  }

  .account-connect {
    min-width: 44px;
  }

  .home {
    min-height: 680px;
    height: calc(100dvh - 70px - env(safe-area-inset-top));
  }

  .hero {
    left: 6%;
    right: 6%;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .text-button {
    min-height: 44px;
    font-size: 12px;
  }

  .race-options .secondary {
    font-size: 12px;
  }

  .race-actions {
    flex-direction: column;
    gap: 8px;
  }

  .race-top {
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
  }

  .recover {
    top: calc(136px + env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    min-width: 44px;
    min-height: 44px;
  }

  .modal {
    padding: 20px;
  }

  .modal h2 {
    font-size: 36px;
  }
}

/* Short landscape keeps the start buttons in flow and the road clear. */
@media (max-height: 500px) and (orientation: landscape) {
  .menu-screen {
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .topbar {
    height: calc(60px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(18px, env(safe-area-inset-right)) 0
      max(18px, env(safe-area-inset-left));
    gap: 12px;
  }

  .brand {
    font-size: 17px;
    gap: 8px;
  }

  .brand-mark {
    font-size: 32px;
  }

  .topbar nav {
    gap: 12px;
  }

  .topbar nav button {
    font-size: 12px;
    min-height: 44px;
  }

  .topbar nav .fullscreen-button svg {
    display: none;
  }

  .home {
    min-height: 310px;
  }

  .hero {
    top: 16px;
  }

  .hero h1 {
    font-size: 58px;
    margin: 12px 0;
  }

  .hero-actions {
    margin-top: 12px;
  }

  .race-options {
    position: static;
    margin-top: 10px;
    gap: 8px;
  }

  .hero > .micro {
    display: none;
  }

  .home-bottom {
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .race-top {
    top: max(10px, env(safe-area-inset-top));
    left: max(18px, env(safe-area-inset-left));
    right: max(18px, env(safe-area-inset-right));
  }

  .race-actions {
    flex-direction: row;
  }

  .recover {
    min-width: 44px;
    min-height: 44px;
    right: max(18px, env(safe-area-inset-right));
  }
}
/* Viewport decks replace long menu documents. No synthetic status-bar spacer. */
html,
body {
  width: 100%;
  height: 100%;
  overflow: clip;
}
#app,
#app.menu-screen {
  height: 100dvh;
  min-height: 0;
  overflow: visible;
}
#app.menu-screen {
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
.menu-screen .topbar {
  flex: 0 0 76px;
  height: 76px;
  padding: 0 4%;
  flex-wrap: nowrap;
}
.menu-screen .topbar nav {
  position: static;
  display: flex;
  height: auto;
  padding: 0;
  gap: 22px;
  min-height: 44px;
}
.menu-screen .topbar nav button.active:after {
  top: auto;
  bottom: 3px;
}
.topbar nav button,
.account .icon-button {
  min-height: 44px;
  min-width: 44px;
}
.menu-screen .home {
  flex: 1;
  min-height: 0;
  height: auto;
}
.home .hero {
  top: 7%;
}
.home .hero h1 {
  font-size: clamp(64px, 10vh, 112px);
}
.home .home-bottom {
  bottom: 20px;
}
.garage-deck,
.campaign-deck {
  flex: 1;
  min-height: 0;
  padding: 20px 5%;
  display: grid;
  gap: 16px;
}
.garage-deck {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.deck-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.deck-heading h2 {
  font:
    800 42px/1 'Barlow Condensed',
    sans-serif;
}
.deck-heading label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  color: #c1cbd1;
  min-width: 0;
}
.deck-heading select {
  min-height: 44px;
  width: min(360px, 100%);
  max-width: 100%;
  background: #101b24;
  color: #edf0f0;
  border: 1px solid #54636d;
  font:
    500 16px Barlow,
    sans-serif;
  padding: 8px 12px;
}
.garage-deck .garage-preview {
  position: static;
  width: 100%;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: center;
  justify-items: center;
  gap: 8px;
}
.garage-deck .garage-preview img {
  width: min(100%, 800px);
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.garage-deck .preview-controls {
  position: static;
  display: flex;
  gap: 8px;
  transform: none;
}
.garage-deck .preview-controls button {
  min-height: 44px;
  padding: 8px 18px;
}
.garage-deck .garage-preview p {
  font-size: 18px;
  margin: 0;
}
.garage-deck .garage-preview p span {
  font-size: 14px;
}
.garage-tools {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr;
  gap: 10px;
}
.garage-tools button {
  min-height: 48px;
  margin: 0;
  justify-content: center;
}
.dialog-pages .paint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dialog-pages .paint {
  width: 44px;
  height: 44px;
}
.dialog-pages .upgrade {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
}
.dialog-pages .upgrade strong,
.dialog-pages .upgrade small {
  display: block;
  text-align: left;
}
.dialog-pages .upgrade small {
  font-size: 13px;
  color: #c1cbd1;
}
.campaign-deck {
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.campaign-deck .deck-heading {
  grid-column: 1 / -1;
}
.campaign-route {
  align-self: center;
  min-width: 0;
}
.campaign-route h3 {
  font:
    700 32px 'Barlow Condensed',
    sans-serif;
}
.campaign-route .route {
  width: 100%;
  height: min(20vh, 160px);
}
.campaign-route p {
  color: #c1cbd1;
  font-size: 15px;
}
.campaign-event {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: #101b24e8;
  border: 1px solid #35424b;
  min-width: 0;
}
.campaign-event h3 {
  font:
    800 36px/1.05 'Barlow Condensed',
    sans-serif;
}
.campaign-event p {
  font-size: 16px;
  color: #c1cbd1;
}
.campaign-event .event-top {
  margin-bottom: 0;
}
.campaign-event .primary {
  min-height: 44px;
}
.event-pagination {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.event-pagination .secondary {
  width: auto;
  min-height: 44px;
  margin: 0;
}
.event-pagination span {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .menu-screen .topbar {
    flex: 0 0 106px;
    height: 106px;
    padding: 0 12px 44px;
    gap: 6px;
  }
  .menu-screen .topbar nav {
    position: absolute;
    bottom: 0;
    top: auto;
    left: 12px;
    right: 12px;
    height: 44px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .topbar nav button.active:after {
    bottom: 2px;
  }
  .account {
    gap: 4px;
  }
  .brand {
    font-size: 15px;
    gap: 6px;
  }
  .credits {
    font-size: 18px;
  }
  .home .hero {
    top: 22px;
    left: 6%;
    right: 6%;
  }
  .home .hero h1 {
    font-size: clamp(66px, 12vh, 100px);
    margin: 18px 0;
  }
  .home .hero-actions {
    margin-top: 18px;
    gap: 12px;
  }
  .home .hero-actions .text-button {
    font-size: 13px;
  }
  .home .race-options {
    position: static;
    display: flex;
    margin-top: 14px;
    gap: 8px;
  }
  .home .race-options button {
    min-height: 44px;
    font-size: 13px;
    padding: 8px;
  }
  .home .car-caption {
    bottom: 16px;
  }
  .home .car-caption .text-button {
    min-height: 44px;
    font-size: 14px;
  }
  .home-bottom,
  .home .hero > .micro {
    display: none;
  }
  .garage-deck,
  .campaign-deck {
    padding: 14px;
    gap: 12px;
  }
  .deck-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .deck-heading h2 {
    font-size: 34px;
  }
  .deck-heading select {
    width: 100%;
  }
  .garage-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .garage-tools .primary {
    grid-column: 1 / -1;
  }
  .garage-tools .secondary {
    padding: 8px 4px;
    font-size: 13px;
  }
  .campaign-deck {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }
  .campaign-route {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
  }
  .campaign-route h3 {
    font-size: 24px;
  }
  .campaign-route .route {
    grid-column: 2;
    grid-row: 1 / 3;
    height: 60px;
  }
  .campaign-route p {
    font-size: 13px;
  }
  .campaign-route p:last-child {
    grid-column: 1 / -1;
  }
  .campaign-event {
    gap: 10px;
    padding: 14px;
  }
  .campaign-event h3 {
    font-size: 30px;
  }
  .campaign-event p {
    font-size: 14px;
  }
  .event-pagination {
    gap: 8px;
  }
  .event-pagination .secondary {
    font-size: 13px;
    padding: 8px 10px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .menu-screen .topbar {
    flex: 0 0 54px;
    height: 54px;
    padding: 0 16px;
    gap: 14px;
  }
  .menu-screen .topbar nav {
    position: static;
    display: flex;
    gap: 12px;
    height: 54px;
  }
  .brand {
    font-size: 16px;
  }
  .brand-mark {
    font-size: 30px;
  }
  .topbar nav button.active:after {
    bottom: 4px;
  }
  .home .hero {
    inset: 14px auto auto 4%;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 6px 22px;
    max-width: 90%;
  }
  .home .hero > .eyebrow {
    grid-column: 1;
    font-size: 9px;
  }
  .home .hero h1 {
    grid-column: 1;
    grid-row: 2 / 5;
    font-size: 64px;
    margin: 8px 0;
  }
  .home .hero-copy {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 14px;
  }
  .home .hero-actions {
    grid-column: 2;
    margin: 0;
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .home .hero-actions .primary {
    min-height: 44px;
  }
  .home .hero-actions .text-button {
    min-height: 44px;
    font-size: 13px;
  }
  .home .race-options {
    grid-column: 2;
    position: static;
    margin: 4px 0 0;
    display: flex;
    gap: 8px;
  }
  .home .race-options .secondary {
    min-height: 44px;
    font-size: 12px;
    padding: 6px 10px;
  }
  .home .home-bottom,
  .home .hero > .micro,
  .home .car-caption {
    display: none;
  }
  .garage-deck,
  .campaign-deck {
    padding: 10px 18px;
    gap: 8px;
  }
  .deck-heading {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .deck-heading h2 {
    font-size: 30px;
  }
  .deck-heading label {
    flex-direction: row;
    align-items: center;
    font-size: 13px;
  }
  .deck-heading select {
    width: 230px;
    font-size: 15px;
  }
  .garage-deck .garage-preview {
    grid-template-columns: minmax(0, 1fr) 180px;
    grid-template-rows: 1fr auto;
  }
  .garage-deck .garage-preview img {
    grid-row: 1 / 3;
  }
  .garage-deck .preview-controls {
    flex-direction: column;
    gap: 4px;
  }
  .garage-deck .preview-controls button {
    padding: 4px 12px;
  }
  .garage-deck .garage-preview p {
    font-size: 16px;
    text-align: center;
  }
  .garage-deck .garage-preview p span {
    display: block;
  }
  .garage-tools {
    grid-template-columns: 1fr 1fr 1fr 1.5fr;
    gap: 8px;
  }
  .garage-tools button {
    min-height: 44px;
    font-size: 13px;
    padding: 8px;
  }
  .garage-tools .primary {
    grid-column: auto;
  }
  .campaign-deck {
    grid-template-columns: 0.8fr 1.2fr;
    grid-template-rows: auto minmax(0, 1fr) 44px;
  }
  .campaign-route .route {
    height: 60px;
  }
  .campaign-route h3 {
    font-size: 24px;
  }
  .campaign-route p {
    font-size: 13px;
  }
  .campaign-event {
    padding: 8px;
    gap: 4px;
  }
  .campaign-event h3 {
    font-size: 24px;
  }
  .campaign-event p {
    font-size: 13px;
  }
  .campaign-event .event-top {
    font-size: 13px;
  }
  .event-pagination .secondary {
    min-height: 44px;
    padding: 8px 16px;
  }
}
/* Shared responsive controls, dialog layouts and result sheets. */
.menu-screen .topbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 22px;
}
.topbar .series-switch {
  justify-self: center;
}
.topbar .series-switch button {
  padding: 8px 14px;
  font-size: 14px;
  white-space: nowrap;
}
.topbar .account {
  margin-left: 0;
  justify-self: end;
}
:root[data-series='formula'] {
  --gold: #ff9a85;
}
.series-switch {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  background: #0b151f;
  border: 1px solid #52616e;
  border-radius: 12px;
}
.series-switch button {
  background: transparent;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 8px;
  color: #c7d2dc;
  font-size: 16px;
  font-weight: 600;
}
.series-switch button[aria-pressed='true'] {
  background: var(--gold);
  color: #10171d;
}
.home .hero {
  top: 24px;
  display: grid;
  gap: 14px;
}
.home .hero h1 {
  margin: 0;
  font-size: clamp(76px, 12vh, 116px);
}
.home .hero-copy,
.home .hero-actions,
.home .race-options {
  margin: 0;
}
.home .race-options {
  position: static;
}
.selection-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  min-width: 210px;
  padding: 10px 16px;
  background: #162530;
  border: 1px solid #526675;
  border-radius: 10px;
  color: #f2f5f7;
  text-align: left;
  font-size: 15px;
}
.selection-trigger strong,
.selection-trigger span {
  display: block;
}
.selection-trigger strong {
  font:
    700 22px/1.1 'Barlow Condensed',
    sans-serif;
  margin-top: 2px;
}
.selection-trigger > span:first-child {
  color: #c7d2dc;
}
.selection-trigger svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.home .selection-trigger > span {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.dialog-pages .car-choice {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 16px;
  min-height: 90px;
  padding: 8px 12px;
  width: 100%;
  text-align: left;
  background: #172732;
  border: 1px solid #4b6070;
  border-radius: 12px;
}
.dialog-pages {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9a7b48 #101b24;
  padding: 4px 6px 16px 0;
  scroll-padding: 12px;
}
.dialog-pages .car-picker,
.dialog-pages .track-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.dialog-pages .car-choice {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 14px;
}
.dialog-pages .car-choice img {
  height: 100px;
}
.dialog-pages .track-picker button {
  min-height: 150px;
  border-radius: 10px;
  background: #172732;
}
.dialog-pages .settings-list,
.dialog-pages .wallet-history,
.dialog-pages .platform-records {
  overflow: visible;
  max-height: none;
  margin: 0;
}
.dialog-pages .settings-list {
  display: grid;
  gap: 12px;
}
.settings-group {
  padding: 14px;
  border: 1px solid #354856;
  border-radius: 10px;
  background: #13232f;
}
.settings-group h3 {
  color: var(--gold);
  font:
    700 22px 'Barlow Condensed',
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px;
}
.dialog-shell .dialog-footer > .primary {
  margin-left: auto;
}
.event-stages {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.event-stages button {
  min-width: 0;
  min-height: 52px;
  color: #bac7d0;
  background: #12222edb;
  border: 1px solid #4a5c69;
  border-radius: 8px;
}
.event-stages button[aria-pressed='true'] {
  color: #10171d;
  border-color: var(--gold);
  background: var(--gold);
}
.event-stages strong,
.event-stages span {
  display: block;
}
.event-stages strong {
  font:
    700 24px 'Barlow Condensed',
    sans-serif;
}
.event-stages span {
  font-size: 9px;
  letter-spacing: 0.5px;
}
.car-choice img {
  width: 100%;
  height: 72px;
  object-fit: contain;
}
.car-choice strong,
.car-choice small {
  display: block;
}
.car-choice strong {
  font:
    700 24px 'Barlow Condensed',
    sans-serif;
}
.car-choice small {
  font-size: 14px;
  color: #c7d2dc;
}
.dialog-pages button[aria-pressed='true'] {
  border-color: var(--gold);
}
.dialog-shell select,
.platform-panel select {
  appearance: none;
  background: #172732
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7 5 5 5-5' fill='none' stroke='%23dbe5ed' stroke-width='2'/%3E%3C/svg%3E")
    no-repeat right 10px center / 20px;
  color: #f2f5f7;
  border: 1px solid #526675;
  border-radius: 8px;
  padding: 10px 38px 10px 12px;
  min-height: 44px;
  font:
    500 16px 'Barlow',
    sans-serif;
}
select option {
  background: #172732;
  color: #f2f5f7;
}
.selection-trigger:focus-visible,
.series-switch button:focus-visible,
.car-choice:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Throttle and brake stay next to one another; drift has its own hold target. */
.pedal-controls {
  --pedal-size: calc(60px * var(--control-scale));
  display: grid;
  grid-template-columns: repeat(2, var(--pedal-size));
  gap: 10px;
}
.pedal-controls .boost-button {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}
.pedal-controls .brake-button {
  grid-column: 1;
  grid-row: 2;
}
.pedal-controls .gas-button {
  grid-column: 2;
  grid-row: 2;
  background: #244436bb;
  border-color: #82ba95;
}
.pedal-controls .touch-button {
  width: var(--pedal-size);
  height: var(--pedal-size);
}
.touch-controls .drift-button {
  grid-column: 1;
  grid-row: 1;
  pointer-events: auto;
  font-size: 13px;
  font-weight: 700;
}

.modal.results-shell {
  color: #edf0f0;
  width: min(720px, 100%);
  height: min(550px, 100%);
  max-height: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto 44px minmax(0, 1fr) auto;
  background: #101c26;
  border: 1px solid #52616e;
  border-radius: 16px;
  overflow: visible;
}
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
}
.results-header p {
  color: #c7d2dc;
  font-size: 13px;
  margin: 0 0 4px;
}
.results-header h2 {
  font:
    800 44px/1 'Barlow Condensed',
    sans-serif;
  margin: 0;
}
.result-tabs {
  display: flex;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid #354856;
}
.result-tabs button {
  background: transparent;
  min-height: 44px;
  color: #bdcad4;
  border-bottom: 2px solid transparent;
  font-size: 15px;
}
.result-tabs [aria-selected='true'] {
  border-bottom-color: var(--gold);
  color: var(--gold);
}
.finish-panel {
  min-height: 0;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-content: center;
  align-items: center;
  gap: 16px 26px;
  padding: 16px 24px;
}
.finish-place strong {
  display: block;
  font:
    800 clamp(46px, 9vh, 80px)/1 'Barlow Condensed',
    sans-serif;
  color: var(--gold);
}
.finish-place > span {
  font-size: 13px;
  color: #c7d2dc;
}
.finish-place .stars {
  margin-top: 10px;
  font-size: 22px;
}
.finish-stats,
.reward-panel dl {
  display: grid;
  gap: 12px;
  margin: 0;
}
.finish-stats div,
.reward-panel dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}
.finish-panel dt {
  color: #c7d2dc;
  font-size: 15px;
}
.finish-panel dd {
  font-weight: 700;
  font-size: 20px;
  margin: 0;
  white-space: nowrap;
}
.finish-panel .finish-note {
  grid-column: 1 / -1;
  color: #c7d2dc;
  font-size: 14px;
  margin: 0;
}
.reward-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.reward-panel p {
  font-size: 14px;
  color: #c7d2dc;
  margin: 0;
}
.finish-actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid #354856;
}
.finish-actions button {
  min-height: 48px;
  margin: 0;
  justify-content: center;
  padding: 10px;
  font-size: 15px;
}
.finish-actions:has([data-next]) {
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
}
@media (max-width: 600px) {
  .home .hero {
    inset: 16px 16px auto;
    gap: 10px;
  }
  .home .hero h1 {
    font-size: clamp(62px, 11vh, 90px);
    margin: 4px 0;
  }
  .home .hero-actions {
    margin: 0;
  }
  .series-switch {
    width: 100%;
  }
  .series-switch button {
    flex: 1;
    padding: 8px;
  }
  .selection-trigger {
    min-width: 0;
    width: 100%;
  }
  .home .race-options {
    margin: 0;
  }
  .car-choice img {
    height: 60px;
  }
  .dialog-pages .car-choice {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
  }
  .dialog-pages .car-choice img {
    height: 70px;
  }
  .dialog-pages .car-choice strong {
    font-size: 21px;
  }
  .dialog-pages .car-choice small {
    font-size: 12px;
  }
  .dialog-pages .track-picker {
    grid-template-columns: 1fr;
  }
  .event-stages {
    gap: 5px;
  }
  .results-header,
  .finish-panel,
  .finish-actions,
  .finish-actions:has([data-next]) {
    padding: 16px;
  }
  .results-header h2 {
    font-size: 38px;
  }
  .result-tabs {
    padding: 0 16px;
  }
  .finish-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .finish-place {
    text-align: center;
  }
  .finish-actions,
  .finish-actions:has([data-next]) {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .finish-actions .primary {
    grid-column: 1 / -1;
  }
  .finish-actions:has([data-next]) .primary {
    grid-column: auto;
  }
}
@media (max-width: 1100px) {
  .menu-screen .topbar {
    flex: 0 0 100px;
    height: 100px;
    padding: 4px 16px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 44px 44px;
    gap: 4px 12px;
  }
  .topbar .brand {
    grid-area: 1 / 1;
    justify-self: start;
  }
  .topbar .account {
    grid-area: 1 / 2;
  }
  .menu-screen .topbar nav {
    grid-area: 2 / 1;
    position: static;
    height: 44px;
    display: flex;
    gap: 22px;
    justify-content: flex-start;
  }
  .topbar .series-switch {
    grid-area: 2 / 2;
    justify-self: end;
  }
}
@media (max-width: 600px) {
  .menu-screen .topbar {
    flex-basis: 148px;
    height: 148px;
    padding: 4px 12px;
    grid-template-rows: repeat(3, 44px);
  }
  .menu-screen .topbar nav {
    grid-area: 3 / 1 / 4 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .topbar .series-switch {
    grid-area: 2 / 1 / 3 / -1;
    width: 100%;
    padding: 0;
  }
  .home .hero h1 {
    font-size: clamp(58px, 10vh, 80px);
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .menu-screen .topbar {
    flex: 0 0 60px;
    height: 60px;
    padding: 4px 12px;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-rows: 44px;
    gap: 10px;
  }
  .topbar .brand {
    grid-area: 1 / 1;
  }
  .topbar .brand > span:last-child {
    display: none;
  }
  .menu-screen .topbar nav {
    grid-area: 1 / 2;
    display: flex;
    gap: 10px;
  }
  .topbar .series-switch {
    grid-area: 1 / 3;
    justify-self: center;
    width: fit-content;
    padding: 0;
  }
  .topbar .series-switch button {
    padding: 8px;
    font-size: 13px;
  }
  .topbar .account {
    grid-area: 1 / 4;
  }
  .garage-deck .garage-preview {
    grid-template-columns: minmax(0, 1fr) 240px;
    grid-template-rows: minmax(44px, 1fr) auto;
    gap: 4px;
  }
  .garage-deck .preview-controls {
    flex-direction: row;
  }
  .garage-deck .garage-preview p {
    font-size: 14px;
  }
  .garage-deck .garage-preview p span {
    font-size: 12px;
    line-height: 16px;
  }
  .event-stages button {
    min-height: 44px;
  }
  .home .hero {
    inset: 14px auto auto 4%;
    grid-template-columns: 220px minmax(0, 380px);
    gap: 10px 24px;
    max-width: 92%;
  }
  .home .hero h1 {
    grid-column: 1;
    grid-row: 1 / 3;
    font-size: 64px;
    align-self: center;
    margin: 0;
  }
  .home .hero-copy {
    display: none;
  }
  .home .hero-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 4px 12px;
  }
  .home .race-options {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }
  .home .race-options .selection-trigger {
    min-height: 50px;
  }
  .deck-heading .selection-trigger {
    min-height: 50px;
    padding: 6px 12px;
    font-size: 12px;
  }
  .deck-heading .selection-trigger strong {
    font-size: 20px;
  }
  .results-header {
    padding: 8px 18px;
  }
  .results-header h2 {
    font-size: 30px;
  }
  .results-header p {
    font-size: 11px;
    margin: 0;
  }
  .finish-panel {
    padding: 8px 18px;
    gap: 4px 26px;
  }
  .finish-place strong {
    font-size: 46px;
  }
  .finish-place .stars {
    margin: 0;
    font-size: 18px;
  }
  .finish-stats {
    gap: 4px;
  }
  .finish-panel dt,
  .finish-panel .finish-note,
  .reward-panel p {
    font-size: 13px;
  }
  .finish-panel dd {
    font-size: 17px;
  }
  .reward-panel dl {
    grid-template-columns: 1fr 1fr;
    gap: 6px 28px;
  }
  .finish-actions {
    padding: 8px 18px;
    gap: 8px;
  }
  .finish-actions button {
    min-height: 44px;
    padding: 8px;
  }
}
/* Formula GP: a paddock, circuit directory and race engineering workspace. */
:root,
:root[data-series='formula'] {
  --gp-red: #ce332b;
  --gp-red-bright: #ff766c;
  --gp-ink: #141618;
  --gp-panel: #202326;
  --gp-paper: #f0eee6;
  --gp-muted: #babfbe;
  --gold: #ff766c;
  --panel: #202326;
  --muted: #babfbe;
  --line: #454a4b;
  color: var(--gp-paper);
  background: var(--gp-ink);
  accent-color: var(--gp-red);
  scrollbar-color: #707675 #202326;
}

::selection {
  background: #e83e35;
  color: white;
}

button,
input,
select {
  caret-color: var(--gp-red-bright);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #ff766c;
  outline-offset: 3px;
}

.primary {
  background: var(--gp-red);
  color: white;
  border-radius: 5px;
  font-size: 15px;
  letter-spacing: 0;
}

.primary:hover {
  background: #c72e28;
}

.primary:disabled {
  background: #414647;
  color: #c2c6c4;
  opacity: 1;
}

.secondary,
.selection-trigger {
  background: #252a2c;
  border-color: #505758;
  border-radius: 5px;
  color: var(--gp-paper);
}

body:has(.menu-screen) #vignette {
  background: linear-gradient(0deg, #141618 8%, #14161845 65%, #14161885);
  opacity: 1;
}

#app.menu-screen {
  background: #14161870;
}

.menu-screen .topbar {
  display: grid;
  grid-template-columns: minmax(195px, 1fr) auto minmax(195px, 1fr);
  grid-template-rows: 1fr;
  flex: 0 0 80px;
  height: 80px;
  padding: 0 28px;
  gap: 24px;
  background: #141618;
  border-bottom: 1px solid #3e4445;
}

.topbar .brand {
  grid-area: 1 / 1;
  gap: 12px;
  min-height: 44px;
  letter-spacing: 0;
}

.brand .gp-mark {
  display: block;
  color: var(--gp-red-bright);
  font: italic 900 40px/1 var(--display);
  letter-spacing: -0.04em;
}

.brand .gp-wordmark {
  display: block;
  font: 800 24px/1 var(--display);
}

.gp-wordmark b {
  color: var(--gp-red-bright);
}

.brand .gp-wordmark small {
  display: block;
  font:
    600 9px/1.6 Barlow,
    sans-serif;
  letter-spacing: 0.12em;
  color: #babfbe;
}

.menu-screen .topbar nav {
  grid-area: 1 / 2;
  position: static;
  display: flex;
  gap: 30px;
  height: 100%;
  padding: 0;
  align-items: stretch;
}

.topbar nav button {
  color: #babfbe;
  font-size: 15px;
  font-weight: 600;
}

.menu-screen .topbar nav button.active::after {
  bottom: 0;
  height: 3px;
  background: var(--gp-red);
}

.topbar .account {
  grid-area: 1 / 3;
  gap: 10px;
  justify-self: end;
}

.topbar .credits,
.topbar .account-connect,
.topbar .icon-button {
  border-color: #444b4c;
  background: #202326;
  min-height: 44px;
}

.topbar .credits {
  font-variant-numeric: tabular-nums;
}

.topbar .credits i {
  color: var(--gp-paper);
  border-color: #8e9794;
}

.paddock {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
  grid-template-rows: minmax(390px, 1fr) auto auto;
  gap: 22px 32px;
  padding: 26px 28px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.race-entry {
  background: var(--gp-paper);
  color: var(--gp-ink);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.race-entry h1 {
  font: 800 clamp(48px, 4.4vw, 72px)/0.95 var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.race-entry h1 em {
  color: #c32e28;
}

.paddock-intro {
  color: #535956;
  margin-top: 12px;
  font-size: 15px;
}

.entry-circuit {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid #b9bfba;
}

.entry-circuit h2 {
  font: 700 25px/1.1 var(--display);
}

.entry-circuit > p {
  color: #535956;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 6px;
}

.race-facts {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 12px;
  margin: 18px 0 22px;
  font-variant-numeric: tabular-nums;
}

.race-facts dt {
  font-size: 12px;
  color: #535956;
}

.race-facts dd {
  font: 700 26px/1.3 var(--display);
  margin: 3px 0 0;
}

.race-facts small {
  font:
    500 12px Barlow,
    sans-serif;
}

.grid-launch {
  width: 100%;
  min-height: 52px;
  flex-shrink: 0;
}

.championship-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: #141618;
  text-align: left;
  min-height: 56px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
}

.championship-link small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: #535956;
}

.paddock-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 300px;
}

.stage-circuit {
  position: absolute;
  right: 0;
  top: 0;
  width: min(45%, 280px);
  text-align: right;
  color: #e5e9e4;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.stage-circuit .route {
  position: static;
  width: 100%;
  height: 100px;
  margin-top: 12px;
  color: #f0eee6;
  opacity: 1;
}

.stage-model {
  position: absolute;
  inset: 2% 0 12%;
  width: 100%;
  height: 86%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 22px 18px #0008);
}

.stage-car {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #707775;
}

.stage-car h2 {
  font: 800 32px/1.1 var(--display);
}

.stage-car p {
  color: #ced2cd;
  font-size: 14px;
  margin-top: 5px;
}

.stage-car .secondary {
  display: flex;
  align-items: center;
  gap: 18px;
  width: auto;
  min-height: 44px;
  margin: 0;
  font-size: 14px;
}

.paddock-circuits,
.paddock-footer {
  grid-column: 1 / -1;
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2 {
  font: 700 25px/1.2 var(--display);
}

.section-heading span {
  color: var(--gp-muted);
  font-size: 13px;
}

.circuit-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  min-height: 140px;
  gap: 2px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
}

.circuit-rail button {
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: 58px auto auto;
  column-gap: 8px;
  padding: 14px 18px;
  position: relative;
  background: #252a2ce8;
  color: var(--gp-paper);
  text-align: left;
  scroll-snap-align: start;
  border: 1px solid transparent;
}

.circuit-rail button:hover {
  background: #373e40;
}

.circuit-rail button[aria-pressed='true'] {
  background: #f0eee6;
  color: #141618;
  border-color: #f0eee6;
}

.circuit-number {
  font:
    600 13px/1.3 Barlow,
    sans-serif;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.circuit-rail .route {
  grid-column: 2;
  position: static;
  width: 100%;
  height: 50px;
  color: #bdc9c6;
  opacity: 1;
}

.circuit-rail button[aria-pressed='true'] .route {
  color: #c32e28;
}

.circuit-rail strong,
.circuit-rail small {
  grid-column: 1 / -1;
  display: block;
}

.circuit-rail strong {
  font: 700 22px/1.2 var(--display);
}

.circuit-rail small {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

.paddock-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #babfbe;
  font-size: 12px;
}

.paddock-footer p {
  display: flex;
  align-items: center;
  gap: 8px;
}

.paddock-footer kbd {
  font:
    600 11px Barlow,
    sans-serif;
  border: 1px solid #636d6d;
  padding: 4px 6px;
  border-radius: 3px;
  color: #f0eee6;
}

.paddock-footer button {
  min-height: 44px;
}

/* Engineering and championship inherit one consistent application shell. */
.garage-screen,
.campaign-screen {
  background: #141618ed !important;
}

.menu-screen .garage-deck,
.menu-screen .campaign-deck {
  overflow-y: auto;
  padding: 26px 28px;
  gap: 22px;
  min-width: 0;
}

.deck-heading h2 {
  color: var(--gp-paper);
  font-size: clamp(32px, 3.5vw, 48px);
  letter-spacing: -0.02em;
}

.deck-description {
  color: var(--gp-muted);
  margin-top: 8px;
  font-size: 15px;
}

.garage-deck .garage-preview {
  background: #e6e6dc;
  color: #141618;
  border-radius: 0;
  padding: 16px;
  min-height: 260px;
}

.garage-deck .garage-preview p span {
  color: #535956;
}

.garage-deck .garage-preview p {
  color: #141618;
}

.menu-screen .deck-heading {
  min-height: min-content;
  flex-shrink: 0;
}

.deck-heading > div {
  min-width: 0;
}

.garage-deck .preview-controls button {
  background: #d5d8d0;
  border: 1px solid #8f9992;
  color: #141618;
  border-radius: 4px;
}

.garage-deck .preview-controls button[aria-pressed='true'] {
  background: #141618;
  color: #f0eee6;
}

.garage-tools button {
  min-height: 52px;
}

.menu-screen .campaign-deck {
  grid-template-rows: max-content max-content minmax(220px, 1fr) max-content;
  grid-template-columns: 1fr 1.1fr;
}

.campaign-deck > .circuit-rail {
  grid-column: 1 / -1;
}

.campaign-route {
  padding: 20px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.campaign-route .route {
  height: clamp(75px, 14vh, 160px);
  color: var(--track);
  position: static;
}

.campaign-route h3 {
  font-size: 30px;
}

.campaign-route p {
  color: var(--gp-muted);
  line-height: 1.4;
  margin-top: 8px;
}

.campaign-event {
  align-self: stretch;
  justify-content: center;
  background: #f0eee6;
  color: #141618;
  border: 0;
  padding: 24px;
  border-radius: 0;
}

.campaign-event p,
.campaign-event .event-top {
  color: #535956;
}

.campaign-event .stars .earned {
  color: #b82a24;
}

.event-stages button {
  background: #252a2c;
  color: #f0eee6;
  border: 1px solid #505758;
  border-radius: 4px;
}

.event-stages button[aria-pressed='true'] {
  background: #f0eee6;
  color: #141618;
  border-color: #f0eee6;
}

.modal,
.results-shell,
.platform-panel > .dialog-shell,
.modal.dialog-shell {
  background: #202326;
  color: #f0eee6;
  border-color: #505758;
}

.dialog-header,
.dialog-footer,
.results-header,
.finish-actions {
  background: #202326;
  border-color: #505758;
}

.settings-group,
.dialog-pages .car-choice,
.dialog-pages .track-picker button {
  background: #292e30;
  border: 1px solid #596162;
  border-radius: 8px;
}

.dialog-pages .track-picker button[aria-pressed='true'] {
  border-color: #ff766c;
  background: #3c302f;
}

.settings-group > h3 {
  color: #f0eee6;
}

input,
select,
.setting-row select {
  background-color: #141618;
  color: #f0eee6;
  border-color: #747d7b;
}

.results-header h2 {
  color: #f0eee6;
}

.result-tabs [aria-selected='true'] {
  color: #ff766c;
  border-color: #ff766c;
}

@media (max-width: 1000px) {
  .menu-screen .topbar {
    grid-template-columns: auto 1fr;
    grid-template-rows: 52px 44px;
    flex-basis: 104px;
    height: 104px;
    gap: 0 12px;
    padding: 4px 20px;
  }

  .topbar .account {
    grid-area: 1 / 2;
  }

  .menu-screen .topbar nav {
    grid-area: 2 / 1 / 3 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    min-height: 44px;
  }

  .paddock {
    grid-template-columns: minmax(290px, 0.9fr) 1fr;
    padding: 20px;
    gap: 20px;
  }

  .race-entry {
    padding: 24px;
  }

  .stage-car {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .menu-screen .topbar {
    padding: 4px 12px;
  }

  .topbar .brand {
    gap: 0;
  }

  .brand .gp-mark {
    display: none;
  }

  .brand .gp-wordmark {
    font-size: 23px;
  }

  .brand .gp-wordmark small {
    font-size: 8px;
  }

  .topbar .account {
    gap: 5px;
  }

  .topbar .account-connect {
    padding: 8px;
    font-size: 12px;
  }

  .topbar .credits {
    padding: 8px;
    font-size: 18px;
    gap: 5px;
  }

  .topbar .credits i {
    font-size: 9px;
  }

  .menu-screen .topbar nav button {
    font-size: 14px;
  }

  .paddock {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 230px auto auto;
    padding: 16px 12px;
    gap: 18px;
  }

  .race-entry {
    padding: 22px;
  }

  .race-entry h1 {
    font-size: 50px;
  }

  .race-entry h1 br {
    display: none;
  }

  .paddock-intro {
    margin-top: 8px;
  }

  .entry-circuit {
    padding-top: 16px;
    margin-top: 16px;
  }

  .race-facts {
    margin: 14px 0 18px;
  }

  .paddock-stage {
    min-height: 230px;
  }

  .stage-circuit {
    display: none;
  }

  .stage-model {
    inset: -22px 0 32px;
    height: 210px;
  }

  .stage-car {
    flex-direction: row;
    align-items: center;
    padding: 12px 0;
  }

  .stage-car h2 {
    font-size: 24px;
  }

  .stage-car p {
    font-size: 12px;
  }

  .stage-car .secondary {
    padding: 8px 12px;
    gap: 8px;
  }

  .section-heading {
    display: block;
  }

  .section-heading span {
    display: block;
    margin-top: 4px;
  }

  .circuit-rail {
    grid-template-columns: repeat(5, 150px);
  }

  .circuit-rail button {
    padding: 12px;
  }

  .paddock-footer {
    justify-content: flex-end;
  }

  .paddock-footer > p {
    display: none;
  }

  .menu-screen .garage-deck,
  .menu-screen .campaign-deck {
    padding: 18px 12px;
    gap: 16px;
  }

  .deck-description {
    font-size: 14px;
  }

  .menu-screen .deck-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 14px;
  }

  .garage-deck {
    grid-template-rows: auto minmax(240px, 1fr) auto;
  }

  .garage-deck .garage-preview {
    padding: 12px;
    min-height: 240px;
  }

  .garage-deck .garage-preview p {
    font-size: 15px;
    text-align: center;
  }

  .garage-deck .garage-preview p span {
    display: block;
    margin-top: 4px;
  }

  .menu-screen .campaign-deck {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(4, max-content);
  }

  .campaign-route {
    display: none;
  }

  .campaign-event {
    padding: 22px;
    gap: 12px;
  }

  .event-stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .menu-screen .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr;
    flex-basis: 56px;
    height: 56px;
    padding: 4px 14px;
    gap: 18px;
  }

  .brand .gp-mark {
    font-size: 32px;
  }

  .brand .gp-wordmark {
    display: none;
  }

  .menu-screen .topbar nav {
    grid-area: 1 / 2;
    display: flex;
    justify-content: center;
    gap: 22px;
  }

  .topbar .account {
    grid-area: 1 / 3;
  }

  .paddock {
    grid-template-columns: minmax(300px, 0.9fr) 1fr;
    grid-template-rows: auto auto auto;
    padding: 14px;
    gap: 16px;
  }

  .race-entry {
    padding: 20px;
  }

  .race-entry h1 {
    font-size: 44px;
  }

  .race-entry h1 br {
    display: none;
  }

  .entry-circuit {
    margin-top: 14px;
    padding-top: 14px;
  }

  .paddock-stage {
    min-height: 260px;
  }

  .menu-screen .garage-deck {
    grid-template-rows: auto minmax(200px, 1fr) auto;
    padding: 18px;
  }

  .garage-deck .garage-preview {
    min-height: 200px;
  }

  .menu-screen .campaign-deck {
    grid-template-rows: max-content max-content minmax(220px, auto) max-content;
  }

  .deck-heading {
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

/* Shared source artwork, sized independently of the racing wordmark. */
.brand .app-logo { display:block; width:46px; height:46px; flex:0 0 46px; object-fit:contain; border-radius:10px; }
@media (max-width:600px) { .brand .app-logo { width:36px; height:36px; flex-basis:36px; border-radius:8px; } }
/* Account controls follow the Formula paddock palette. */
.platform-panel input,
.platform-panel select {
  background: #141618;
  color: #f0eee6;
  border-color: #747d7b;
  border-radius: 0;
  caret-color: #ff766c;
}
.platform-panel .primary {
  background: #e43e34;
  color: white;
  border-radius: 0;
}
.platform-panel .secondary {
  background: #32383a;
  color: #f0eee6;
  border: 1px solid #697170;
  border-radius: 0;
}
.platform-panel .platform-callout {
  background: #3c302f;
  border-color: #ff766c;
  color: #f0eee6;
}
.platform-panel .platform-links a,
.platform-panel .platform-message {
  color: #ffaaa2;
}
.platform-panel :focus-visible {
  outline-color: #ff766c;
}
@media (max-height: 420px) and (min-width: 600px) {
  .platform-panel .platform-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
