:root {
  color-scheme: dark;
  --ink: #151311;
  --panel: #211b16;
  --cream: #efdfb8;
  --muted: #b9a98d;
  --orange: #ddba68;
  --orange-light: #f3d88b;
  --gold: #d6b467;
  --brass: #8d6c36;
  --brass-dark: #44321d;
  --red: #8e201c;
  --border: #745633;
  --stone: radial-gradient(ellipse at 16% 3%, #3b352d 0%, transparent 54%), repeating-linear-gradient(118deg, #ffffff03 0 1px, transparent 1px 5px), linear-gradient(145deg, #211f1b, #111311);
  --leather: repeating-linear-gradient(38deg, #0000000a 0 1px, transparent 1px 5px), radial-gradient(ellipse at top, #3b281b, #1d1713 76%);
  --frame-shadow: inset 0 0 0 1px #c4a16488, inset 0 0 0 4px #16120e, 0 0 0 1px #17100a, 0 7px 18px #0008;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #151311; color: var(--cream); }
body { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable]:not([contenteditable="false"]) { -webkit-user-select: text; user-select: text; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .5; cursor: default; }
a { color: inherit; text-decoration: none; }
button, input, select { transition: filter .16s, border-color .16s, box-shadow .16s; }
button:hover { filter: brightness(1.15); }
button:active { filter: brightness(.9); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #ffe8a7; outline-offset: 4px; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#viewport { position: fixed; inset: 0; overflow: hidden; }
#viewport canvas { display: block; width: 100%; height: 100%; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; }
h1, h2 { margin: 0; line-height: 1.16; color: #f1d68b; text-shadow: 0 2px 1px #000, 0 0 15px #6e3e1730; }
h1 em, h2 em { font-style: normal; color: #f9e6b6; }
h3 { color: var(--gold); letter-spacing: .4px; }

/* Framed main menu over the Barrens. */
.menu-shade { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(90deg, #17120ac7 0%, #17120a58 40%, transparent 64%), linear-gradient(0deg, #14120ee8 0%, transparent 28%, transparent 80%, #11100cbc 100%); }
.menu-screen { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(370px, 465px) 1fr; grid-template-rows: 108px minmax(0, 1fr) 70px; column-gap: 5vw; padding: 0 4.2vw; overflow: auto; }
.menu-header { grid-column: 1 / -1; display: flex; align-items: center; gap: 36px; min-width: 0; position: relative; border-bottom: 2px solid #94713c; box-shadow: 0 1px 0 #18120b, 0 2px 0 #ceaa5c50; }
.menu-header::before { content: ''; position: absolute; z-index: -1; inset: 0 -4.3vw; background: linear-gradient(#11110ff0, #241d15e8 82%, #12110f); box-shadow: 0 4px 15px #0008; }
.brand { display: flex; align-items: center; justify-content: center; width: 300px; height: 98px; min-width: 0; flex-shrink: 0; }
.brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 3px #0009); }

.menu-nav { display: flex; gap: 5px; align-items: center; font-family: Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: .8px; }
.menu-nav button, .nav-current { padding: 11px 17px; border: 1px solid transparent; color: #c4ad83; background: none; }
.nav-current { background: linear-gradient(#762c22, #411711); border-color: #8c6937; box-shadow: inset 0 0 0 1px #24140e; color: #f1d38f; }
.nav-current span { display: none; }
.menu-nav button:hover { background: #201811; border-color: #6e5434; }
.header-actions { display: flex; gap: 11px; align-items: center; margin-left: auto; }
.local-status { color: #9b987a; display: none; gap: 7px; font-size: 8px; letter-spacing: 1px; }
.local-status i, .tiny-dot { height: 5px; width: 5px; background: #94b26c; border-radius: 50%; box-shadow: 0 0 5px #a4d37955; }
.icon-button { background: radial-gradient(circle at 40% 30%, #4a4031, #171714 80%); border: 3px ridge #92703d; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; color: #d3ba81; box-shadow: inset 0 0 0 1px #13110c, 0 2px 5px #0008; flex-shrink: 0; }
.icon-button .icon { width: 19px; height: 19px; }
.gold-wallet { display: flex; gap: 9px; align-items: center; min-width: 109px; padding: 5px 14px 5px 7px; background: #100e0ce6; border: 1px solid #6e532e; box-shadow: inset 0 0 7px #000b; }
.gold-wallet > div { display: flex; flex-direction: column; gap: 2px; }
.gold-wallet > div > span { font-family: Georgia, serif; color: #bda16b; font-size: 10px; }
.gold-wallet strong { font-family: Georgia, serif; font-size: 19px; color: #f1cf69; font-variant-numeric: tabular-nums; line-height: 1; }
.coin-medallion { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.gold-icon { display: block; width: 32px; height: 32px; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 2px 2px #0009); }
.menu-main, .selected-kart, .track-badge, .modal, .pause-card, .results-card { border: 4px ridge #927044; box-shadow: var(--frame-shadow); background: var(--stone); }
.menu-main { position: relative; grid-column: 1; grid-row: 2; align-self: center; padding: 27px 28px 23px; margin: 20px 0; }
.menu-main::before, .modal::before, .pause-card::before, .results-card::before { content: '◆'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 45px; text-align: center; color: #d6b169; font-size: 20px; line-height: 22px; background: linear-gradient(transparent 40%, #242019 40% 72%, transparent 72%); text-shadow: 0 2px 2px #000; pointer-events: none; }
.eyebrow { display: flex; gap: 9px; align-items: center; color: #ad8a53; font-family: Georgia, serif; font-size: 10px; letter-spacing: 1.7px; line-height: 1.5; font-weight: 700; text-transform: uppercase; }
.short-line { display: none; }
.menu-main > .eyebrow { justify-content: center; }
.menu-main h1 { margin: 10px 0 13px; text-align: center; font-size: 34px; white-space: normal; }
.menu-description { text-align: center; font-size: 12px; line-height: 1.7; color: #c0ad8e; margin: 0 0 23px; }
.section-label { display: flex; align-items: center; gap: 8px; color: #d0b982; font-family: Georgia, serif; font-size: 10px; letter-spacing: 1px; font-weight: 700; }
.section-label > span:first-child:not(.color-chip) { color: #987442; font-size: 9px; }
.setup-block { padding-top: 15px; border-top: 1px solid #695130; box-shadow: 0 -1px 0 #100f0c; }
.mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.mode-option { height: 83px; padding: 11px 7px; border: 2px ridge #735638; color: #c3ae83; background: var(--leather); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; position: relative; box-shadow: inset 0 0 8px #0009; }
.mode-option .icon { width: 24px; height: 24px; color: #b59350; }
.mode-option span { font-family: Georgia, serif; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mode-option.selected { border-color: #d1a958; background: radial-gradient(ellipse at top, #65251b, #271411); box-shadow: inset 0 0 0 1px #442719, 0 0 9px #d6ac521c; color: #ffe3a2; }
.mode-option.selected .icon { color: #f0ce77; }
.mode-option.selected::after { content: '◆'; position: absolute; bottom: -7px; font-size: 11px; color: #ddba70; text-shadow: 0 1px 2px #000; }
.mode-description { min-height: 35px; font-size: 11px; line-height: 1.65; margin: 12px 0 15px; color: #b1a084; text-align: center; }
.race-options { display: grid; grid-template-columns: 1fr 1.12fr .85fr; gap: 12px; padding-top: 14px; border-top: 1px solid #5d482c; margin-bottom: 20px; align-items: end; }
.race-options label { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.race-options label > span, .grid-size > span { font-family: Georgia, serif; font-size: 10px; color: #b79a64; letter-spacing: .5px; }
.race-options select { width: 100%; padding: 8px 5px; border: 2px ridge #7e603a; border-radius: 0; color: #e7d3a5; font-size: 11px; background: #15120f; cursor: pointer; }
.race-options select option { background: #211a13; }
.grid-size { display: flex; flex-direction: column; gap: 11px; padding-bottom: 9px; text-align: center; }
.grid-size > span { font-size: 8px; }
.grid-size strong { font-size: 10px; color: #c7b58e; white-space: nowrap; }
.button { min-height: 46px; padding: 12px 24px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; border: 3px ridge #ac8548; font-family: Georgia, serif; font-weight: 700; font-size: 15px; text-shadow: 0 2px 1px #000; color: #f4dfb5; box-shadow: inset 0 0 0 1px #24140d, inset 0 1px 0 #f4c86c22, 0 3px 7px #0007; }
.button.primary { background: linear-gradient(#b53c2a, #751b16 48%, #58110e 52%, #81251b); border-color: #b69550; }
.button.primary:hover { border-color: #e9c272; }
.button.secondary { background: linear-gradient(#4e4130, #2a241b 48%, #1c1b16 52%, #332a1e); border-color: #87683c; }
.button .icon { width: 18px; height: 18px; }
.start-button { width: 100%; min-height: 55px; font-size: 21px; letter-spacing: .8px; }
.start-button .icon { display: none; }
.start-caption { margin-top: 11px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 9px; color: #9e8d70; line-height: 1.5; }
.enter-hint { display: none; }
.track-badge { position: absolute; top: 146px; right: 4.2vw; min-width: 285px; padding: 17px 28px 19px; text-align: center; background: linear-gradient(#33291edc, #161612ed); }
.track-badge::before, .track-badge::after { content: '◆'; color: #9e7a3b; position: absolute; top: 42%; font-size: 14px; text-shadow: 0 1px #000; }
.track-badge::before { left: 12px; }.track-badge::after { right: 12px; }
.track-badge .section-label { justify-content: center; font-size: 9px; letter-spacing: 2px; }
.track-badge strong { display: block; font-family: Georgia, serif; color: #e9ce91; font-size: 25px; margin: 8px 0; text-shadow: 0 2px #000; }
.track-badge > span:last-child { display: block; font-size: 10px; color: #bdac8c; }
.track-badge i { display: none; }
.selected-kart { grid-column: 2; grid-row: 2; justify-self: end; align-self: end; display: flex; align-items: center; gap: 17px; padding: 22px 24px 21px; margin-bottom: 40px; width: 405px; min-height: 155px; background: var(--leather); }
.kart-portrait, .driver-portrait { position: relative; width: 84px; height: 84px; flex-shrink: 0; border-radius: 50%; border: 4px ridge #a0814a; background: radial-gradient(circle, #493820, #141511 75%); box-shadow: inset 0 0 10px #000, 0 2px 5px #0009; }
.portrait-art { height: 100%; width: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 50%; }
.portrait-art > .icon { width: 35px; height: 40px; color: #ad8345; }
.portrait-art .kart-illustration, .driver-portrait .kart-illustration { width: 124%; height: 100%; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; border-radius: 0; object-fit: cover; transform: translateX(-9%); }
.kart-number { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); font-family: Georgia, serif; color: #e2c685; font-size: 12px; background: #201a12; border: 2px ridge #997940; padding: 2px 7px; line-height: 1; }
.selected-kart-copy { min-width: 0; flex: 1; }
.selected-kart .section-label { font-size: 8px; color: #9d8458; }
.selected-kart h2 { font-size: 23px; margin: 9px 0 7px; line-height: 1.05; color: #e4ca92; }
.selected-kart p { font-size: 10px; line-height: 1.5; margin: 0 0 12px; color: #b5a184; }
.color-chip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1px solid #bc9352; }
.mini-stats { display: flex; gap: 12px; }.mini-stat { display: flex; flex-direction: column; gap: 6px; color: #a99a7b; font-size: 7px; letter-spacing: .4px; }
.stat-pips { display: flex; gap: 2px; }.stat-pips i { width: 8px; height: 5px; display: inline-block; border: 1px solid #4d4027; background: #161712; }.stat-pips i.filled { border-color: #ad8645; background: linear-gradient(#ddbd73, #86602c); }
.kart-change { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; align-self: stretch; border: 0; border-left: 1px solid #5f472b; padding: 0 0 0 12px; margin-left: 1px; background: none; color: #c5a462; font-family: Georgia, serif; font-size: 8px; }
.kart-change .icon { width: 21px; height: 21px; }
.menu-footer { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 8px; color: #9f8d6b; border-top: 1px solid #8a683b; box-shadow: 0 -1px 0 #1b160c; }
.menu-footer i { padding: 0 10px; font-style: normal; color: #6e5835; }
.menu-footer button { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: #b8a077; font-size: 9px; }
.menu-footer #controller-status { display: flex; align-items: center; gap: 7px; font-size: 8px; }
.menu-footer .icon { width: 16px; height: 16px; color: #a99360; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; min-height: 21px; padding: 3px 5px; border: 2px ridge #7c623b; color: #e7d1a1; background: linear-gradient(#3c3427, #1a1914); border-radius: 2px; font-family: Georgia, serif; font-size: 10px; font-weight: 700; box-shadow: 0 1px 2px #0008; line-height: 1; }

/* Stone windows and the character garage. */
.modal { color: var(--cream); position: fixed; width: min(960px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 35px 38px 30px; }
.modal::backdrop { background: #090b0bd6; backdrop-filter: blur(5px); }
.modal > .eyebrow { justify-content: center; margin-bottom: 8px; }
.modal > h2 { text-align: center; font-size: 34px; padding: 3px 0 17px; border-bottom: 1px solid #7b5e34; box-shadow: 0 1px 0 #100f0a; }
.dialog-close { position: absolute; right: 13px; top: 13px; margin: 0; }
.dialog-close .icon-button { width: 28px; height: 28px; border-width: 2px; background: radial-gradient(circle at 40% 30%, #8b3025, #3c100e); color: #e0bd7d; }
.dialog-close .icon { width: 14px; height: 14px; }
.dialog-intro { margin: 16px 0 24px; font-size: 12px; text-align: center; color: #b8a587; line-height: 1.6; }
.kart-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kart-card { padding: 22px 13px 18px; border: 3px ridge #715635; position: relative; display: flex; flex-direction: column; align-items: stretch; color: #c9b590; background: var(--leather); box-shadow: inset 0 0 0 1px #160e0b; text-align: left; }
.kart-card.selected { border-color: #d4ad5e; background: radial-gradient(ellipse at top, #5b3620, #251a13 80%); box-shadow: inset 0 0 0 1px #3c2513, 0 0 15px #bb7a201e; }
.kart-card-number { position: absolute; left: 9px; top: 8px; color: #9f7e48; font-family: Georgia, serif; font-size: 13px; }
.kart-card-selected { position: absolute; right: 8px; top: 9px; color: #ecd18a; font-size: 7px; font-weight: 700; letter-spacing: .4px; }
.kart-illustration { display: block; width: 130px; height: 130px; max-width: 100%; align-self: center; margin: 7px auto 17px; border: 3px ridge #86673d; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #66502f, #111610 80%); box-shadow: inset 0 0 15px #0009, 0 2px 7px #0009; padding: 3px; }
.kart-card-name { font-size: 18px; color: #ead29c; line-height: 1.22; min-height: 44px; margin: 0 0 7px; text-align: center; display: flex; align-items: center; justify-content: center; }
.kart-driver { color: #ad9574; font-size: 9px; line-height: 1.5; text-align: center; min-height: 28px; margin-bottom: 13px; }
.kart-card-stat { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 7px; padding: 7px 0; border-top: 1px solid #624b2b55; }
.kart-card-stat .stat-pips { gap: 2px; }.kart-card-stat .stat-pips i { width: 8px; height: 6px; }
.kart-spell-tooltip {
  position: absolute;
  z-index: 1;
  inset: auto 4px 4px;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid #a7834c;
  background: #211912;
  color: #ecd9b5;
  box-shadow: 0 3px 10px #0009;
  visibility: hidden;
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  font-weight: normal;
}
.kart-spell-tooltip .spell-icon { width: 38px; height: 38px; border: 2px ridge #9c7a3e; }
.kart-spell-tooltip strong { font: 700 14px/1.2 Georgia, serif; color: #f4d698; }
.kart-card:focus-visible:not(.tooltip-dismissed) .kart-spell-tooltip { visibility: visible; }
@media (hover: hover) {
  .kart-card:hover:not(.tooltip-dismissed) .kart-spell-tooltip { visibility: visible; }
}
.garage-footer { display: flex; gap: 26px; align-items: center; margin-top: 23px; border-top: 1px solid #65502d; padding-top: 20px; }
.garage-footer > p { flex: 1; color: #bca582; font-size: 12px; line-height: 1.6; margin: 0; }
.garage-footer .button { min-width: 200px; }
.controls-modal { width: min(950px, calc(100vw - 48px)); }
.controls-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 23px; }
.controls-columns h3 { font-size: 15px; margin: 0 0 12px; }.control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; border-bottom: 1px solid #87673a30; color: #c9b797; font-size: 11px; line-height: 1.4; }
.control-row > span:last-child { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }.control-row small { font-size: 9px; color: #988264; }
.controller-intro { color: #af9b7b; font-size: 11px; line-height: 1.6; margin: 0 0 16px; }
.driving-tip { display: flex; gap: 12px; padding: 14px; margin-top: 17px; background: #49351b35; border: 1px solid #725531; }.driving-tip > .icon { color: #caa14f; width: 22px; margin-top: 4px; }.driving-tip p { color: #a99778; font-size: 11px; line-height: 1.6; margin: 0; }.driving-tip strong { display: block; color: #d9bb7f; }
.spellbook-heading { font-size: 19px; text-align: center; margin: 26px 0 9px; padding-top: 21px; border-top: 1px solid #6c522e; }.spell-guide-intro { font-size: 11px; color: #ac9879; line-height: 1.65; text-align: center; margin: 0 auto 20px; max-width: 650px; }.spell-guide-intro kbd { font-size: 9px; min-width: 18px; min-height: 18px; padding: 2px 4px; }
.item-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }.item-guide > div { display: flex; align-items: flex-start; gap: 10px; background: #100f0b66; border: 1px solid #5f492d; padding: 11px; }.item-guide > div > .icon, .item-guide > div > img, .item-guide .spell-icon { width: 46px; height: 46px; flex-shrink: 0; object-fit: cover; border: 2px ridge #9c7a3e; background: #15130e; }.item-guide strong { font-family: Georgia, serif; font-size: 12px; line-height: 1.3; color: #e0c58e; display: block; margin: 0 0 5px; }.item-guide p { font-size: 9px; line-height: 1.55; color: #ad9a7b; margin: 0; }
.dialog-footnote { font-size: 10px; line-height: 1.6; color: #907f61; text-align: center; margin: 20px 0 0; }
.settings-modal { width: min(590px, calc(100vw - 48px)); }.settings-grid { margin: 16px 0 22px; }.setting-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; min-height: 69px; padding: 13px 0; border-bottom: 1px solid #86623a35; font-size: 13px; color: #dcc599; }.setting-row > span small { display: block; color: #978467; font-size: 10px; margin-top: 6px; line-height: 1.4; }
.setting-row input[type=text], .setting-row select { width: 165px; border: 2px ridge #87653a; color: #e7d1a1; background: #13120e; padding: 9px 10px; font-size: 12px; border-radius: 0; }.setting-row input[type=checkbox] { width: 23px; height: 23px; accent-color: #ad862e; cursor: pointer; }.setting-row input[type=range] { width: 165px; accent-color: #b89c50; cursor: pointer; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.settings-actions .button { flex: 1 1 175px; }
.records-modal { width: min(820px, calc(100vw - 48px)); }.records-content { margin-top: 23px; overflow-x: auto; }.records-content > p { text-align: center; line-height: 1.8; color: #bca686; padding: 25px 10px; font-size: 13px; }.records-table { width: 100%; border-collapse: collapse; font-size: 12px; }.records-table th { font-family: Georgia, serif; font-size: 11px; font-weight: 700; text-align: left; color: #c09c58; border-bottom: 2px ridge #866232; padding: 13px 10px; }.records-table td { border-bottom: 1px solid #6d54353b; padding: 14px 10px; color: #dac5a0; }.records-table small { display: block; margin-top: 6px; font-size: 10px; color: #9a8464; }.records-table .record-time { color: #edd391; font-variant-numeric: tabular-nums; font-weight: 700; }

/* Warcraft-style player frame, compass, spell slots, and speed dial. */
.hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 1px 2px #000; }
.hud button { pointer-events: auto; }
.hud-top { display: flex; align-items: flex-start; gap: 13px; position: absolute; top: 20px; left: 25px; right: 25px; }
.race-place { display: flex; align-items: center; gap: 12px; padding: 7px 17px 7px 7px; background: var(--stone); border: 3px ridge #927244; box-shadow: var(--frame-shadow); border-radius: 40px 4px 4px 40px; }
.driver-portrait { width: 62px; height: 62px; border-width: 3px; display: grid; place-items: center; overflow: hidden; }.driver-portrait > .icon { width: 29px; height: 33px; color: #bc984f; }
.position-copy { display: flex; align-items: flex-start; gap: 6px; }.position-copy > span { font-family: Georgia, serif; font-size: 40px; color: #f0d388; line-height: 1; }.position-copy small { font-family: Georgia, serif; color: #b8a67f; font-size: 17px; padding-top: 3px; }.position-copy b { display: block; font-family: 'Trebuchet MS', sans-serif; font-size: 7px; font-weight: 400; color: #8e7b56; margin-top: 9px; letter-spacing: .6px; }
.hud-lap, .hud-timing, .hud-top-right { background: linear-gradient(#272118eb, #11130fe8); border: 2px ridge #806337; box-shadow: inset 0 0 0 1px #120e0a, 0 3px 10px #0006; }
.hud-lap { min-height: 68px; padding: 11px 17px; display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }.hud-lap > span { color: #b69a62; font-size: 9px; letter-spacing: 1px; }.hud-lap strong { font-family: Georgia, serif; font-size: 25px; line-height: 1; color: #ead39c; }.hud-lap small { font-size: 16px; font-weight: 400; color: #b49b6d; }
.hud-timing { display: flex; gap: 23px; padding: 12px 18px; margin-top: 7px; min-height: 68px; }.hud-timing > div { display: flex; flex-direction: column; gap: 9px; }.hud-timing span { font-size: 8px; color: #aa8b53; letter-spacing: .7px; }.hud-timing strong { font-family: Georgia, serif; font-size: 18px; font-variant-numeric: tabular-nums; color: #e3d0a6; }.hud-timing > div:last-child strong { color: #bca777; }
.hud-top-right { display: flex; align-items: center; gap: 14px; padding: 9px 10px 9px 15px; margin-left: auto; margin-top: 7px; min-height: 60px; }.hud-top-right > span { font-family: Georgia, serif; font-size: 10px; color: #ae925e; }.hud-top-right .icon-button { width: 32px; height: 32px; border-width: 2px; }.hud-top-right .icon { width: 15px; height: 15px; }.hud-gold { display: flex; align-items: center; gap: 7px; color: #e8c565; font-size: 17px; font-family: Georgia, serif; }.hud-gold .gold-icon { width: 28px; height: 28px; }
.standings { position: absolute; top: 122px; left: 27px; width: 188px; display: flex; flex-direction: column; gap: 4px; }.standing-row { display: flex; align-items: center; gap: 9px; background: linear-gradient(90deg, #1f1b13ed, #272118cc); border: 1px solid #79603d77; border-left: 3px ridge #77603b; padding: 8px 9px; font-size: 10px; color: #bdad8b; }.standing-row.player { border-color: #b6934b; background: linear-gradient(90deg, #5c251be8, #2b1d15da); color: #f3d38c; }.standing-row > span:first-child { font-family: Georgia, serif; color: #d6bb7d; width: 13px; font-size: 13px; }.standing-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.standing-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 1px 2px #000; flex-shrink: 0; }.standing-row small { margin-left: auto; color: #c2a25a; font-size: 7px; }
.active-effects { position: absolute; top: 108px; right: 28px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; max-width: 450px; }
.active-effect, .effect-badge { position: relative; display: grid; grid-template-columns: 37px auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; min-width: 115px; padding: 5px 9px 5px 5px; background: #13140fe8; border: 2px ridge #9a7a3e; box-shadow: 0 3px 6px #0008; }.active-effect img, .effect-badge img { width: 37px; height: 37px; object-fit: cover; border: 1px solid #b49a58; grid-row: 1 / -1; }.active-effect strong, .effect-badge strong { font-family: Georgia, serif; font-size: 10px; color: #d7bb7c; line-height: 1.2; }.active-effect > span, .effect-time { color: #e0d4b5; font-size: 11px; font-variant-numeric: tabular-nums; }.active-effect small { color: #baac89; font-size: 10px; }
.race-center { position: absolute; top: 125px; left: 50%; transform: translateX(-50%); text-align: center; max-width: 80vw; }.race-notice { padding: 12px 23px; border: 2px ridge #b38c47; color: #f0d69e; background: linear-gradient(#352719ef, #15140fed); font-family: Georgia, serif; font-size: 15px; box-shadow: 0 4px 15px #0005; }.wrong-way { margin-top: 9px; color: #ffd48c; background: linear-gradient(#68251ae8, #35120ee8); border: 3px ridge #b89551; padding: 14px 22px; font-family: Georgia, serif; font-size: 22px; white-space: nowrap; }.wrong-way small { display: block; font-size: 8px; letter-spacing: .7px; margin-top: 8px; color: #d5ba8d; }.wrong-way.missed-checkpoint { color: #ffda8b; }
.countdown { position: absolute; top: 43%; left: 50%; transform: translate(-50%, -50%); color: #efcf7c; font-family: Georgia, serif; font-size: 135px; font-weight: 700; line-height: 1; text-shadow: 0 3px 0 #3a1b0e, 0 6px 5px #0009, 0 0 30px #c0812038; }.countdown.go { font-size: 100px; color: #f5d987; }
.minimap-panel { position: absolute; left: 28px; bottom: 25px; width: 210px; text-align: center; }.minimap-panel > .section-label { justify-content: center; position: absolute; left: 25px; right: 25px; top: -9px; z-index: 1; background: #242016; border: 2px ridge #96733e; padding: 5px 4px; color: #cfb67a; font-size: 9px; box-shadow: 0 2px 5px #000a; }
.minimap-disc { width: 210px; height: 210px; border-radius: 50%; border: 7px ridge #997940; background: radial-gradient(circle at 40% 30%, #332b1fef, #101510f5 75%); box-shadow: inset 0 0 0 2px #12110b, inset 0 0 25px #000, 0 0 0 2px #241809, 0 6px 14px #0009; display: grid; place-items: center; position: relative; padding: 13px 9px; }
.minimap-disc::after { content: '◆'; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); color: #d0b16b; font-size: 17px; text-shadow: 0 2px 3px #000; }.compass-n { position: absolute; top: 23px; color: #a28a59; font-family: Georgia, serif; font-size: 9px; }.minimap-panel canvas { display: block; width: 100%; height: auto; }.map-key { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 7px; color: #c7b28b; margin-top: 13px; }.map-key i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #e2b65f; }.map-key > span { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #eee0b4; margin-left: 7px; }
.speedometer { position: absolute; bottom: 26px; right: 28px; width: 210px; text-align: center; }.speed-dial { position: relative; width: 210px; height: 210px; border: 7px ridge #9b793e; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #3a3223ed, #111510f2 75%); box-shadow: inset 0 0 0 2px #15120b, inset 0 0 20px #000, 0 0 0 2px #211809, 0 6px 14px #0008; }.speed-gauge { width: 196px; height: 196px; display: block; overflow: visible; }.gauge-track { fill: none; stroke: #090d08; stroke-width: 9; }.gauge-fill { fill: none; stroke: var(--gold); stroke-width: 6; stroke-dasharray: 0 100; }.gauge-ticks { fill: none; stroke: #b79b60; stroke-width: 1.4; }.speed-digits { position: absolute; inset: 52px 0 auto; display: flex; flex-direction: column; align-items: center; }.speed-digits strong { font-family: Georgia, serif; font-size: 56px; font-weight: 700; line-height: 1; color: #f0daa1; font-variant-numeric: tabular-nums; text-shadow: 0 3px 2px #000; }.speed-digits > span { margin-top: 9px; font-size: 8px; letter-spacing: 2px; color: #ac9362; }.kart-status { position: absolute; bottom: 28px; left: 5px; right: 5px; font-family: Georgia, serif; font-size: 7px; letter-spacing: .3px; color: #beaa74; }
.nitro-label { display: flex; justify-content: space-between; align-items: center; padding: 0 7px; margin-top: 12px; font-size: 8px; color: #d1bd8c; }.nitro-label > span:first-child { display: flex; align-items: center; gap: 5px; }.nitro-label .icon { width: 12px; height: 13px; color: #7fa7ba; }.nitro-value { font-variant-numeric: tabular-nums; }.nitro-bar { height: 13px; margin: 6px 5px 0; border: 3px ridge #8f6a34; background: #11120d; box-shadow: inset 0 2px 3px #000b; }.nitro-bar > i { display: block; width: 100%; height: 100%; background: linear-gradient(#a0c6d5, #357391 47%, #235574 50%, #477b90); }.speedometer-foot { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 7px; color: #b9a982; margin-top: 7px; }.speedometer-foot kbd { font-size: 7px; min-height: 16px; padding: 2px 4px; }
.race-bottom-center { position: absolute; left: 50%; bottom: 25px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 13px; }.item-slot { position: relative; display: flex; align-items: center; gap: 15px; min-width: 295px; min-height: 89px; padding: 10px 16px 10px 11px; background: var(--stone); border: 4px ridge #ba9650; box-shadow: var(--frame-shadow); }.item-slot.empty { border-color: #806136; }.spell-frame, .item-icon { width: 62px; height: 62px; display: grid; place-items: center; background: radial-gradient(ellipse at top, #3b3320, #0f130d); border: 3px ridge #c2a362; box-shadow: inset 0 0 0 1px #0b0e08, inset 0 0 10px #000; color: #a68d52; flex-shrink: 0; position: relative; }.item-slot.empty .item-icon { border-color: #6f5733; color: #756644; }.item-icon .icon { width: 31px; height: 31px; }.item-icon .spell-icon { width: 100%; height: 100%; object-fit: cover; display: block; }.item-slot > div:nth-child(2) { display: flex; flex-direction: column; gap: 8px; max-width: 185px; }.item-slot > div:nth-child(2) > span { font-size: 8px; color: #ab915f; letter-spacing: .4px; }.item-slot strong { font-family: Georgia, serif; font-size: 17px; line-height: 1.15; color: #ecd599; }.item-slot.empty strong { color: #9f8d68; font-size: 15px; }.item-slot > kbd { position: absolute; bottom: 6px; left: 57px; min-height: 21px; min-width: 21px; color: #ffe2a2; background: #19140c; font-size: 11px; border-color: #af8e4c; }.item-slot.empty kbd { opacity: .55; }
.race-key-hints { display: flex; align-items: center; gap: 5px; font-size: 7px; color: #cebb92; background: #14130dc4; padding: 6px 9px; border: 1px solid #745a35; white-space: nowrap; }.race-key-hints kbd { font-size: 7px; min-height: 17px; padding: 2px 4px; border-width: 1px; }.race-key-hints kbd:not(:first-child) { margin-left: 5px; }
.drift-indicator { position: absolute; bottom: 139px; width: 260px; border: 2px ridge #9a743d; padding: 8px 11px; background: #211b11eb; text-align: center; }.drift-indicator > span { color: #efc365; font-family: Georgia, serif; font-size: 11px; }.drift-indicator > div { height: 8px; background: #100f0a; border: 1px solid #5f4c26; margin-top: 7px; }.drift-indicator i { display: block; height: 100%; width: 0; background: linear-gradient(#ffe0a0, #d19236); }.drift-indicator small { display: block; font-size: 7px; color: #baa47b; margin-top: 7px; }
.fps-counter { position: absolute; top: 99px; left: 260px; color: #b9a67a; font-size: 9px; }
.touch-controls { display: none; position: absolute; bottom: 13px; left: 13px; right: 13px; justify-content: space-between; gap: 12px; align-items: flex-end; pointer-events: auto; }.touch-steering, .touch-actions { display: flex; gap: 6px; align-items: flex-end; }.touch-controls button { height: 52px; width: 52px; border: 3px ridge #a88343; background: linear-gradient(#55432a, #211b12); box-shadow: inset 0 0 0 1px #24180e, 0 3px 6px #0008; border-radius: 4px; font-family: Georgia, serif; font-size: 9px; color: #ebcf91; user-select: none; -webkit-user-select: none; touch-action: none; }.touch-steering button { font-size: 16px; }.touch-controls button:active, .touch-controls button.pressed { background: linear-gradient(#9b3928, #4b160e); border-color: #ebc375; }.touch-actions .touch-gas { height: 65px; width: 62px; background: linear-gradient(#962b22, #50120d); font-weight: 700; }

/* Pause and earned rewards. */
.overlay-screen { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; background: #090b08b8; backdrop-filter: blur(6px); }
.pause-card, .results-card { position: relative; width: 100%; max-width: 790px; max-height: calc(100dvh - 48px); overflow: auto; padding: 32px 36px; }
.pause-card { width: 460px; text-align: center; padding: 36px 37px 28px; }.pause-card > .eyebrow { justify-content: center; }.pause-card h2 { font-size: 35px; margin: 12px 0 16px; padding-bottom: 18px; border-bottom: 1px solid #755631; }.pause-card > p { font-size: 12px; color: #bca789; line-height: 1.7; margin: 0 0 24px; }.pause-card > .button { width: 100%; }.pause-secondary { display: flex; gap: 10px; margin: 11px 0 21px; }.pause-secondary button { flex: 1; font-size: 12px; padding: 11px; }.text-button { border: 0; background: none; color: #b7975b; font-family: Georgia, serif; font-size: 11px; padding: 7px 12px; }
.results-heading { display: flex; align-items: center; gap: 16px; }.result-trophy { width: 65px; height: 65px; border: 4px ridge #ad8741; background: radial-gradient(circle, #5a4528, #1b1b11); border-radius: 50%; display: grid; place-items: center; color: #e5c26c; flex-shrink: 0; }.result-trophy .icon { width: 31px; height: 32px; }.results-heading .eyebrow { font-size: 9px; }.results-heading h2 { font-size: 31px; margin-top: 8px; }.result-position { margin-left: auto; color: #dfbd6e; font-family: Georgia, serif; font-size: 61px; line-height: 1; white-space: nowrap; text-shadow: 0 3px 2px #000; }.result-position small { font-size: 16px; vertical-align: top; display: inline-block; margin-top: 7px; }.result-position > .icon { width: 46px; height: 46px; }
.results-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 21px 0; margin: 23px 0 18px; border-top: 2px ridge #806035; border-bottom: 2px ridge #806035; gap: 21px; }.results-stats > div { display: flex; flex-direction: column; gap: 11px; }.results-stats span { font-size: 9px; letter-spacing: .7px; color: #a88b58; }.results-stats strong { font-family: Georgia, serif; font-size: 22px; font-variant-numeric: tabular-nums; color: #e5cda0; }.results-stats > div:last-child strong { font-size: 19px; }
.gold-reward { display: grid; grid-template-columns: 56px 1fr 1fr; align-items: center; gap: 0 15px; margin: 0 0 17px; padding: 12px 17px; border: 2px ridge #b49348; background: radial-gradient(ellipse at 20% 50%, #55401d55, transparent 75%), #15150fd9; }.reward-coin { grid-row: 1 / 3; display: grid; place-items: center; }.reward-coin { height: 52px; width: 52px; }.reward-coin .gold-icon { width: 52px; height: 52px; filter: drop-shadow(0 3px 5px #000b); }.reward-earned, .reward-total { display: flex; flex-direction: column; gap: 5px; }.reward-earned > span, .reward-total > span { color: #bca06b; font-family: Georgia, serif; font-size: 11px; }.reward-earned strong { color: #f3d17a; font-size: 26px; font-family: Georgia, serif; }.reward-total { align-items: flex-end; }.reward-total strong { color: #c5ad77; font-size: 20px; font-family: Georgia, serif; }.gold-reward > p { grid-column: 2 / -1; color: #907f60; font-size: 9px; line-height: 1.5; margin: 7px 0 0; }
.new-record { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: Georgia, serif; font-size: 12px; color: #e9d08b; padding: 9px; margin: 0 0 17px; background: #6f50242b; border-top: 1px solid #866232; border-bottom: 1px solid #866232; }.new-record .icon { width: 15px; height: 19px; }
.results-body { display: grid; grid-template-columns: 1.65fr 1fr; gap: 30px; }.results-body h3 { font-size: 12px; margin: 0 0 12px; }.result-standing { display: flex; align-items: center; gap: 8px; padding: 8px 9px; background: #100f0b55; margin-bottom: 4px; border: 1px solid #60492a40; font-size: 11px; color: #c1ac85; }.result-standing.player { border-color: #977139; background: #51251b55; color: #efd08b; }.result-standing > span:first-child { width: 12px; color: #bc9e61; font-family: Georgia, serif; }.result-standing .standing-dot { width: 5px; height: 5px; }.result-standing .standing-result { margin-left: auto; font-size: 10px; font-variant-numeric: tabular-nums; color: #b6a07b; }.result-standing small { font-size: 7px; color: #cfab61; margin-left: 4px; }
.lap-splits ol { margin: 0; padding: 0; list-style: none; }.lap-splits li { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #ac9770; border-bottom: 1px solid #8a66362b; padding: 10px 0; }.lap-splits li strong { color: #d8c195; font-variant-numeric: tabular-nums; font-size: 11px; }.lap-splits li.best strong { color: #f0cf7a; }.lap-splits li.best span::after { content: ' BEST'; color: #bc9851; font-size: 7px; margin-left: 5px; }
.results-actions { display: flex; gap: 12px; margin-top: 22px; }.results-actions > .button { flex: 1; min-height: 45px; padding: 11px 14px; font-size: 13px; }.result-save-note { font-size: 9px; line-height: 1.5; color: #8b7b60; margin: 15px 0 0; text-align: center; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; max-width: calc(100vw - 30px); padding: 13px 21px; background: linear-gradient(#35271a, #14130e); border: 3px ridge #b28c44; box-shadow: 0 6px 25px #0009; color: #e8c98e; font-family: Georgia, serif; font-size: 13px; text-align: center; }
.loading-screen { position: fixed; inset: 0; z-index: 99; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; background: radial-gradient(ellipse at center, #322718, #0b100b); }.loading-logo { display: block; width: min(440px, 84vw); height: 180px; object-fit: contain; filter: drop-shadow(0 4px 12px #0009); }.loading-screen > span { color: #a28e65; font-family: Georgia, serif; font-size: 13px; }
.fatal-error { position: fixed; inset: 0; z-index: 1000; padding: max(45px, 12vh) max(25px, 15vw); background: var(--stone); overflow: auto; }.fatal-error > .icon { color: #c5a15a; height: 50px; width: 45px; margin-bottom: 20px; }.fatal-error h1 { font-size: 38px; line-height: 1.2; max-width: 750px; margin-bottom: 24px; }.fatal-error p { font-size: 14px; line-height: 1.8; color: #bdab88; max-width: 650px; }.fatal-error .button { margin: 15px 0; }.fatal-error details { margin-top: 10px; color: #ad9062; font-size: 12px; }.fatal-error pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.6; }
@keyframes pulse { from { opacity: .65; box-shadow: 0 0 15px #ad713715; } to { opacity: 1; box-shadow: 0 0 45px #ad71374b; } }

/* Compact windows keep controls reachable and the full scene visible. */
@media (min-width: 1700px) { .menu-screen { grid-template-columns: 490px 1fr; }.menu-main { padding: 33px; }.menu-main h1 { font-size: 38px; }.mode-option { height: 90px; }.selected-kart { width: 430px; margin-bottom: 70px; }.track-badge { top: 165px; } }
@media (max-width: 1170px) { .menu-screen { grid-template-columns: 410px 1fr; column-gap: 25px; padding: 0 3vw; }.menu-header { gap: 22px; }.brand { width: 250px; height: 88px; }.menu-nav button, .nav-current { padding: 10px 11px; font-size: 11px; }.header-actions { gap: 8px; }.gold-wallet { min-width: 90px; padding-right: 10px; }.gold-wallet strong { font-size: 17px; }.gold-wallet .gold-icon { height: 28px; width: 28px; }.coin-medallion { height: 28px; width: 28px; }.menu-main { padding: 23px; }.menu-main h1 { font-size: 30px; }.menu-description { font-size: 11px; }.selected-kart { width: 335px; gap: 12px; padding: 18px; }.kart-portrait { height: 66px; width: 66px; }.selected-kart h2 { font-size: 20px; }.selected-kart p { font-size: 9px; }.mini-stats { gap: 8px; }.mini-stat { font-size: 6px; }.stat-pips i { width: 7px; }.kart-change { padding-left: 9px; font-size: 7px; }.track-badge { right: 3vw; min-width: 250px; }.track-badge strong { font-size: 22px; }.menu-footer { font-size: 7px; }.menu-footer button { font-size: 8px; }.hud-timing { gap: 16px; }.hud-timing strong { font-size: 15px; }.hud-top-right > span { display: none; }.race-place { padding-right: 12px; }.hud-top { gap: 9px; }.minimap-panel, .speedometer { transform: scale(.88); transform-origin: bottom left; }.speedometer { transform-origin: bottom right; }.race-key-hints { font-size: 6px; }.active-effects { max-width: 350px; }.item-slot { min-width: 280px; } }
@media (max-height: 760px) and (min-width: 761px) { .menu-screen { grid-template-rows: 83px minmax(460px, 1fr) 53px; }.brand { width: 250px; height: 77px; }.menu-main { padding: 17px 22px; margin: 15px 0; }.menu-main h1 { font-size: 29px; margin: 8px 0 9px; }.menu-main .eyebrow { font-size: 9px; }.menu-description { font-size: 11px; margin-bottom: 14px; }.setup-block { padding-top: 11px; }.mode-options { margin-top: 9px; }.mode-option { height: 67px; gap: 7px; padding: 8px 6px; }.mode-option .icon { width: 21px; height: 21px; }.mode-option span { font-size: 10px; }.mode-description { min-height: 18px; font-size: 10px; margin: 10px 0 11px; }.race-options { padding-top: 11px; margin-bottom: 15px; }.race-options label { gap: 5px; }.race-options select { padding: 6px 5px; }.start-button { min-height: 48px; font-size: 19px; }.start-caption { font-size: 8px; margin-top: 8px; }.selected-kart { margin-bottom: 24px; min-height: 132px; }.track-badge { top: 109px; padding-top: 13px; padding-bottom: 13px; }.track-badge strong { font-size: 21px; }.modal { padding-top: 28px; padding-bottom: 25px; }.modal > h2 { font-size: 29px; padding-bottom: 13px; }.modal .dialog-intro { margin: 12px 0 18px; }.kart-illustration { width: 112px; height: 112px; margin-bottom: 13px; }.kart-card { padding-top: 18px; }.results-card { padding-top: 25px; padding-bottom: 22px; }.results-heading h2 { font-size: 27px; }.results-stats { padding: 16px 0; margin: 18px 0 14px; }.gold-reward { margin-bottom: 14px; padding-top: 9px; padding-bottom: 9px; }.result-standing { padding-top: 6px; padding-bottom: 6px; }.results-actions { margin-top: 18px; } }
@media (max-width: 960px) { .menu-screen { grid-template-columns: 375px 1fr; gap: 0 20px; }.menu-header { gap: 18px; }.brand { width: 220px; height: 76px; }.menu-nav { gap: 0; }.menu-nav button, .nav-current { padding: 9px; font-size: 10px; }.header-actions .icon-button { width: 34px; height: 34px; border-width: 2px; }.gold-wallet { min-width: 80px; gap: 4px; padding: 5px 8px 5px 5px; }.gold-wallet > div > span { font-size: 8px; }.gold-wallet strong { font-size: 16px; }.selected-kart { width: 300px; gap: 10px; padding: 16px; }.selected-kart h2 { font-size: 18px; }.selected-kart .mini-stats { gap: 7px; }.selected-kart .stat-pips i { width: 6px; }.kart-portrait { width: 56px; height: 56px; }.kart-change { font-size: 6px; padding-left: 8px; }.track-badge { min-width: 230px; }.track-badge strong { font-size: 20px; }.track-badge > span:last-child { font-size: 8px; }.menu-footer #controller-status { display: none; }.menu-main { padding-left: 19px; padding-right: 19px; }.race-options { gap: 9px; }.race-options select { font-size: 10px; }.grid-size strong { font-size: 9px; }.grid-size > span { font-size: 7px; }.hud-top { left: 15px; right: 15px; top: 15px; gap: 7px; }.driver-portrait { height: 52px; width: 52px; }.position-copy > span { font-size: 34px; }.position-copy small { font-size: 14px; }.position-copy b { font-size: 6px; }.race-place { gap: 9px; padding: 6px 10px 6px 6px; }.hud-lap { padding: 10px 12px; min-height: 59px; margin-top: 5px; gap: 5px; }.hud-lap strong { font-size: 22px; }.hud-lap > span { font-size: 8px; }.hud-timing { min-height: 59px; padding: 11px 13px; gap: 15px; margin-top: 5px; }.hud-timing strong { font-size: 13px; }.hud-timing span { font-size: 7px; }.hud-top-right { margin-top: 5px; min-height: 59px; padding: 8px; gap: 8px; }.hud-gold { font-size: 14px; gap: 5px; }.hud-gold .gold-icon { width: 22px; height: 22px; }.standings { top: 104px; left: 17px; width: 160px; }.standing-row { font-size: 9px; padding: 7px; }.active-effects { top: 93px; right: 16px; gap: 5px; }.active-effect, .effect-badge { grid-template-columns: 29px auto; min-width: 90px; padding: 4px 6px 4px 4px; column-gap: 6px; }.active-effect img, .effect-badge img { width: 29px; height: 29px; }.active-effect strong, .effect-badge strong { font-size: 8px; }.effect-time, .active-effect > span { font-size: 9px; }.minimap-panel { left: 19px; bottom: 20px; transform: scale(.75); }.speedometer { right: 19px; bottom: 20px; transform: scale(.75); }.race-bottom-center { bottom: 24px; }.race-key-hints { display: none; }.item-slot { min-width: 255px; min-height: 78px; gap: 12px; padding: 8px 12px 8px 9px; }.item-icon { width: 53px; height: 53px; }.item-slot > kbd { left: 46px; bottom: 4px; }.item-slot strong { font-size: 16px; }.item-slot > div:nth-child(2) > span { font-size: 7px; }.drift-indicator { bottom: 94px; width: 230px; }.race-center { top: 110px; }.race-notice { font-size: 12px; padding: 10px 16px; }.wrong-way { font-size: 19px; padding: 12px 17px; }.wrong-way small { font-size: 7px; }.fps-counter { top: 85px; left: 190px; }.kart-card-name { font-size: 16px; }.kart-card-stat { font-size: 6px; }.kart-card-stat .stat-pips i { width: 7px; }.controls-columns { gap: 24px; }.control-row { font-size: 10px; }.modal { padding-left: 25px; padding-right: 25px; } }

/* Portrait layouts use a natural scrolling menu instead of clipped panels. */
@media (max-width: 760px) {
 .menu-screen { display: flex; flex-direction: column; padding: 0 20px; overflow: auto; }
 .menu-header { min-height: 116px; height: 116px; flex-shrink: 0; gap: 12px; padding-bottom: 28px; }
 .brand { width: clamp(170px, 35vw, 220px); height: 76px; }
 .menu-header::before { inset: 0 -21px; }
 
 .menu-nav { display: flex; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); gap: 9px; }.menu-nav button, .nav-current { padding: 5px 14px; font-size: 9px; }.header-actions { margin-left: auto; gap: 7px; }.header-actions .icon-button { width: 30px; height: 30px; }.header-actions .icon { width: 15px; height: 15px; }.gold-wallet { min-width: 68px; padding: 4px 6px; }.gold-wallet > div > span { display: none; }.gold-wallet strong { font-size: 14px; }.coin-medallion, .gold-wallet .gold-icon { height: 28px; width: 28px; }
 .menu-main { width: min(100%, 450px); margin: 30px auto 22px; padding: 23px 22px 20px; flex-shrink: 0; }
 .menu-main h1 { font-size: 30px; margin: 10px 0 13px; }.menu-main .eyebrow { font-size: 9px; }.menu-description { font-size: 11px; margin-bottom: 18px; }.setup-block { padding-top: 13px; }.section-label { font-size: 9px; }.mode-options { gap: 6px; margin-top: 10px; }.mode-option { height: 75px; padding: 10px 5px; gap: 8px; }.mode-option span { font-size: 10px; }.mode-option .icon { height: 22px; width: 22px; }.mode-description { min-height: 0; font-size: 10px; margin: 12px 0 16px; }.race-options { gap: 9px; padding-top: 13px; margin-bottom: 18px; }.race-options label > span { font-size: 9px; }.race-options select { font-size: 10px; padding: 7px 4px; }.grid-size > span { font-size: 7px; }.grid-size strong { font-size: 8px; }.start-button { min-height: 51px; font-size: 20px; }.start-caption { font-size: 8px; margin-top: 11px; }.track-badge { display: none; }
 .selected-kart { width: min(100%, 450px); min-height: 137px; margin: 0 auto 26px; padding: 19px; gap: 14px; align-self: center; flex-shrink: 0; }.kart-portrait { width: 62px; height: 62px; }.selected-kart h2 { font-size: 21px; }.selected-kart p { font-size: 9px; }.selected-kart .mini-stats { gap: 10px; }.selected-kart .mini-stat { font-size: 6px; }.selected-kart .stat-pips i { width: 6px; }.kart-change { font-size: 7px; padding-left: 10px; }.kart-change .icon { width: 18px; height: 18px; }
 .menu-footer { width: 100%; min-height: 65px; flex-shrink: 0; gap: 12px; margin-top: auto; font-size: 7px; line-height: 1.6; padding: 12px 0; }.menu-footer > span:first-child { max-width: 170px; }.menu-footer i { padding: 0 5px; }.menu-footer button { font-size: 7px; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 150px; }.menu-footer kbd { font-size: 7px; min-height: 17px; min-width: 17px; padding: 2px 4px; }
 .modal { width: calc(100vw - 24px); max-height: calc(100dvh - 26px); padding: 28px 22px 23px; }.modal > .eyebrow { font-size: 8px; letter-spacing: 1px; }.modal > h2 { font-size: 27px; padding-bottom: 15px; }.dialog-close { top: 10px; right: 10px; }.dialog-close .icon-button { width: 25px; height: 25px; }.dialog-intro { font-size: 11px; margin: 14px 0 18px; }.kart-options { grid-template-columns: repeat(2, 1fr); gap: 10px; }.kart-card { padding: 20px 10px 14px; }.kart-illustration { width: 120px; height: 120px; margin: 7px auto 12px; }.kart-card-name { font-size: 17px; min-height: 42px; }.kart-driver { font-size: 8px; min-height: 26px; margin-bottom: 10px; }.kart-card-number { font-size: 11px; }.kart-card-selected { font-size: 6px; }.kart-card-stat { font-size: 6px; }.kart-card-stat .stat-pips i { width: 7px; }.garage-footer { flex-direction: column; align-items: stretch; gap: 15px; margin-top: 17px; padding-top: 15px; }.garage-footer > p { font-size: 11px; text-align: center; }.garage-footer .button { width: 100%; }
 .controls-columns { grid-template-columns: 1fr; gap: 24px; margin-top: 20px; }.control-row { min-height: 38px; font-size: 11px; }.control-row kbd { font-size: 8px; min-width: 20px; }.item-guide { grid-template-columns: repeat(2, 1fr); gap: 9px; }.item-guide > div { padding: 9px; gap: 8px; }.item-guide > div > .icon, .item-guide > div > img, .item-guide .spell-icon { width: 36px; height: 36px; }.item-guide strong { font-size: 10px; }.item-guide p { font-size: 8px; }.spell-guide-intro { font-size: 10px; }.dialog-footnote { font-size: 9px; }.setting-row { gap: 15px; font-size: 12px; }.setting-row > span small { font-size: 9px; max-width: 165px; }.setting-row input[type=text], .setting-row select { width: 130px; font-size: 11px; padding: 8px; }.setting-row input[type=range] { width: 130px; }.records-table { font-size: 10px; }.records-table th { font-size: 9px; padding: 10px 7px; }.records-table td { padding: 12px 7px; }.records-table small { font-size: 8px; }
 .hud-top { top: 11px; left: 10px; right: 10px; gap: 6px; align-items: flex-start; }.race-place { border-width: 2px; padding: 4px 7px 4px 4px; gap: 6px; }.driver-portrait { width: 42px; height: 42px; border-width: 2px; }.driver-portrait > .icon { width: 21px; height: 25px; }.position-copy > span { font-size: 29px; }.position-copy small { font-size: 12px; padding-top: 1px; }.position-copy b { font-size: 5px; margin-top: 6px; }.hud-lap { padding: 7px 9px; min-height: 51px; margin-top: 1px; gap: 5px; }.hud-lap > span { font-size: 6px; }.hud-lap strong { font-size: 19px; }.hud-lap small { font-size: 12px; }.hud-timing { min-height: 51px; padding: 8px 9px; margin-top: 1px; }.hud-timing > div { gap: 8px; }.hud-timing span { font-size: 6px; }.hud-timing strong { font-size: 11px; }.hud-timing > div:last-child { display: none; }.hud-top-right { padding: 6px; min-height: 51px; margin-top: 1px; gap: 5px; }.hud-top-right .icon-button { width: 26px; height: 26px; }.hud-top-right .icon { width: 12px; height: 12px; }.hud-gold { font-size: 11px; gap: 3px; }.hud-gold .gold-icon { width: 22px; height: 22px; }.standings { top: 81px; left: 11px; width: 132px; gap: 3px; }.standing-row { font-size: 8px; padding: 6px; gap: 6px; }.standing-row > span:first-child { font-size: 11px; }.standing-row small { font-size: 6px; }.standing-dot { width: 4px; height: 4px; }.active-effects { top: 79px; right: 12px; max-width: 214px; gap: 5px; }.active-effect, .effect-badge { min-width: 0; grid-template-columns: 29px auto; padding: 3px 5px 3px 3px; column-gap: 5px; }.active-effect strong, .effect-badge strong { font-size: 7px; max-width: 70px; }.active-effect img, .effect-badge img { width: 29px; height: 29px; }.active-effect > span, .effect-time { font-size: 9px; }.race-center { top: 148px; left: 57%; max-width: 82vw; }.race-notice { font-size: 10px; padding: 9px 12px; }.wrong-way { font-size: 15px; padding: 11px; white-space: normal; min-width: 210px; }.wrong-way small { font-size: 6px; line-height: 1.4; }.countdown { font-size: 108px; }.countdown.go { font-size: 82px; }
 .minimap-panel { transform: scale(.59); left: 10px; bottom: 21px; }.speedometer { transform: scale(.59); right: 10px; bottom: 21px; }.race-bottom-center { bottom: 26px; }.item-slot { min-width: 188px; min-height: 65px; padding: 7px; gap: 9px; border-width: 3px; }.item-icon { width: 43px; height: 43px; border-width: 2px; }.item-icon .icon { width: 25px; height: 25px; }.item-slot > div:nth-child(2) { max-width: 111px; gap: 6px; }.item-slot > div:nth-child(2) > span { font-size: 6px; }.item-slot strong { font-size: 13px; }.item-slot.empty strong { font-size: 11px; }.item-slot > kbd { left: 35px; bottom: 3px; min-width: 17px; min-height: 17px; font-size: 9px; }.drift-indicator { bottom: 79px; width: 190px; padding: 6px 9px; }.drift-indicator > span { font-size: 9px; }.drift-indicator small { font-size: 6px; }.fps-counter { top: 66px; left: 150px; font-size: 8px; }
 .overlay-screen { padding: 12px; }.pause-card, .results-card { max-height: calc(100dvh - 26px); padding: 28px 23px 23px; }.pause-card h2 { font-size: 29px; }.pause-card > p { font-size: 11px; }.results-heading { gap: 10px; }.result-trophy { width: 44px; height: 44px; border-width: 3px; }.result-trophy .icon { width: 23px; height: 25px; }.results-heading .eyebrow { font-size: 6px; letter-spacing: .8px; }.results-heading h2 { font-size: 23px; }.result-position { font-size: 43px; }.result-position small { font-size: 12px; margin-top: 5px; }.results-stats { margin: 18px 0 15px; padding: 16px 0; gap: 13px; }.results-stats span { font-size: 6px; letter-spacing: .4px; }.results-stats strong { font-size: 16px; }.results-stats > div:last-child strong { font-size: 15px; }.gold-reward { grid-template-columns: 42px 1fr 1fr; gap: 0 9px; padding: 10px 11px; }.reward-coin, .reward-coin .gold-icon { width: 42px; height: 42px; }.reward-earned > span, .reward-total > span { font-size: 9px; }.reward-earned strong { font-size: 21px; }.reward-total strong { font-size: 17px; }.gold-reward > p { font-size: 8px; }.new-record { font-size: 10px; }.results-body { grid-template-columns: 1.5fr 1fr; gap: 15px; }.results-body h3 { font-size: 9px; }.result-standing { font-size: 9px; padding: 7px; gap: 6px; }.result-standing .standing-result { font-size: 8px; }.result-standing small { font-size: 5px; }.lap-splits li { font-size: 8px; }.lap-splits li strong { font-size: 9px; }.lap-splits li.best span::after { font-size: 6px; margin-left: 3px; }.results-actions { gap: 8px; margin-top: 18px; }.results-actions > .button { font-size: 10px; padding: 11px 8px; gap: 8px; }.results-actions > .button .icon { width: 15px; height: 15px; }.result-save-note { font-size: 8px; }.fatal-error { padding: 40px 24px; }.fatal-error h1 { font-size: 29px; }.fatal-error p { font-size: 12px; }
}
@media (max-width: 430px) { .menu-screen { padding: 0 14px; }.menu-header { gap: 7px; }.brand { width: clamp(134px, 43vw, 180px); height: 68px; }.menu-header::before { inset: 0 -15px; }.header-actions { gap: 5px; }.header-actions .icon-button { width: 28px; height: 28px; }.gold-wallet { min-width: 59px; gap: 3px; padding: 4px; }.gold-wallet strong { font-size: 12px; }.coin-medallion, .gold-wallet .gold-icon { height: 28px; width: 28px; }.menu-main { margin-top: 25px; padding: 21px 18px 18px; }.menu-main h1 { font-size: 28px; }.selected-kart { padding: 16px; gap: 12px; }.kart-portrait { width: 54px; height: 54px; }.selected-kart h2 { font-size: 18px; }.selected-kart .stat-pips i { width: 6px; }.selected-kart .mini-stats { gap: 8px; }.kart-change { font-size: 6px; padding-left: 8px; }.menu-footer { font-size: 6px; }.menu-footer button { font-size: 6px; max-width: 135px; }.modal { padding-left: 17px; padding-right: 17px; }.modal > h2 { font-size: 25px; }.kart-card { padding-left: 8px; padding-right: 8px; }.kart-illustration { width: 105px; height: 105px; }.kart-card-name { font-size: 15px; }.kart-card-stat .stat-pips i { width: 6px; }.item-guide { grid-template-columns: 1fr; }.item-guide > div > .icon, .item-guide > div > img, .item-guide .spell-icon { width: 44px; height: 44px; }.item-guide strong { font-size: 12px; }.item-guide p { font-size: 10px; }.setting-row input[type=text], .setting-row select { width: 120px; }.setting-row input[type=range] { width: 120px; }.setting-row { font-size: 11px; }.setting-row > span small { font-size: 8px; max-width: 145px; }.hud-top { gap: 5px; }.driver-portrait { width: 34px; height: 34px; }.race-place { gap: 5px; min-height: 48px; padding-right: 6px; }.position-copy > span { font-size: 25px; }.position-copy small { font-size: 10px; }.position-copy b { font-size: 4px; }.hud-lap { min-height: 47px; padding: 7px; gap: 4px; }.hud-lap strong { font-size: 17px; }.hud-lap small { font-size: 11px; }.hud-timing { padding: 8px 7px; min-height: 47px; }.hud-timing strong { font-size: 10px; }.hud-top-right { gap: 4px; padding: 5px; min-height: 47px; }.hud-top-right .icon-button { width: 23px; height: 23px; }.hud-gold { font-size: 10px; }.hud-gold .gold-icon { width: 20px; height: 20px; }.minimap-panel { transform: scale(.49); left: 10px; }.speedometer { transform: scale(.49); right: 9px; }.race-bottom-center { bottom: 28px; }.item-slot { min-width: 164px; max-width: 177px; min-height: 60px; gap: 7px; padding: 6px; }.item-icon { width: 38px; height: 38px; }.item-slot > div:nth-child(2) { max-width: 102px; }.item-slot > div:nth-child(2) > span { font-size: 5px; }.item-slot strong { font-size: 11px; }.item-slot.empty strong { font-size: 10px; }.item-slot > kbd { left: 29px; }.drift-indicator { width: 174px; bottom: 75px; }.result-trophy { display: none; }.results-heading h2 { font-size: 22px; }.result-position { font-size: 38px; }.results-stats { gap: 10px; }.results-stats strong { font-size: 14px; }.results-stats > div:last-child strong { font-size: 13px; }.results-body { grid-template-columns: 1fr; gap: 16px; }.lap-splits ol { display: flex; flex-wrap: wrap; gap: 6px 15px; }.lap-splits li { gap: 10px; border: 0; padding: 5px 0; }.results-actions > .button { font-size: 9px; }.gold-reward { gap: 0 8px; }.gold-reward > p { font-size: 7px; } }
@media (pointer: coarse) { .touch-controls { display: flex; }.race-bottom-center { bottom: 109px; }.minimap-panel { bottom: 100px; }.speedometer { bottom: 100px; }.touch-actions button:not(.touch-gas) { width: 45px; height: 44px; font-size: 8px; }.touch-steering button { width: 48px; height: 49px; }.touch-actions .touch-gas { width: 52px; height: 61px; }.race-key-hints { display: none; }.menu-footer button { display: none; } }
@media (pointer: coarse) and (max-width: 430px) { .touch-controls { left: 9px; right: 9px; gap: 8px; }.touch-steering, .touch-actions { gap: 4px; }.touch-steering button { width: 37px; height: 44px; font-size: 13px; }.touch-actions button:not(.touch-gas) { width: 33px; height: 37px; font-size: 6px; border-width: 2px; }.touch-actions .touch-gas { width: 41px; height: 54px; font-size: 8px; border-width: 2px; }.race-bottom-center { bottom: 100px; }.minimap-panel, .speedometer { bottom: 91px; } }
@media (max-height: 540px) and (orientation: landscape) { .menu-screen { grid-template-rows: 75px minmax(450px, 1fr) 50px; }.menu-header { min-height: 75px; height: 75px; }.brand { height: 67px; }.menu-main { margin-top: 14px; margin-bottom: 14px; }.track-badge { top: 100px; }.hud-top { top: 9px; }.driver-portrait { width: 40px; height: 40px; }.race-place { padding: 4px 9px 4px 4px; }.position-copy > span { font-size: 29px; }.hud-lap, .hud-timing, .hud-top-right { margin-top: 1px; min-height: 48px; padding-top: 7px; padding-bottom: 7px; }.hud-lap { gap: 4px; }.hud-lap strong { font-size: 20px; }.hud-timing { gap: 16px; }.hud-timing strong { font-size: 12px; }.hud-timing > div { gap: 7px; }.standings { top: 75px; width: 138px; gap: 3px; }.standing-row { padding: 5px 7px; font-size: 8px; }.standing-row:nth-child(n+5) { display: none; }.active-effects { top: 74px; }.race-center { top: 90px; }.race-notice { font-size: 10px; padding: 9px 14px; }.wrong-way { font-size: 16px; }.minimap-panel { transform: scale(.47); bottom: 78px; }.speedometer { transform: scale(.47); bottom: 78px; }.race-bottom-center { bottom: 83px; }.item-slot { min-height: 62px; min-width: 200px; padding: 6px; gap: 9px; }.item-icon { width: 41px; height: 41px; }.item-slot strong { font-size: 13px; }.item-slot > div:nth-child(2) > span { font-size: 6px; }.item-slot > kbd { left: 32px; bottom: 3px; }.drift-indicator { bottom: 75px; width: 195px; padding: 5px 9px; }.drift-indicator > span { font-size: 9px; }.drift-indicator small { display: none; }.countdown { font-size: 84px; }.countdown.go { font-size: 68px; }.touch-controls { bottom: 8px; }.touch-controls button { height: 42px; }.touch-actions .touch-gas { height: 52px; }.fps-counter { top: 63px; }.pause-card { width: 420px; padding: 23px 28px; }.pause-card h2 { font-size: 28px; margin: 9px 0 11px; padding-bottom: 12px; }.pause-card > p { margin-bottom: 16px; font-size: 11px; }.pause-card > .button { min-height: 42px; }.pause-secondary { margin: 9px 0 13px; }.pause-secondary button { min-height: 39px; padding: 8px; }.results-card { margin: auto; } }

/* Short desktop windows keep the entire garage confirmation in view. */
@media (max-height: 760px) and (min-width: 761px) {
 .garage-modal { padding-top: 21px; padding-bottom: 20px; }
 .garage-modal > h2 { margin-top: 8px; font-size: 27px; padding-bottom: 10px; }
 .garage-modal .dialog-intro { font-size: 10px; margin: 10px 0 13px; }
 .garage-modal .kart-card { padding: 16px 12px 12px; }
 .garage-modal .kart-illustration { width: 94px; height: 94px; margin-top: 3px; margin-bottom: 10px; }
 .garage-modal .kart-card-name { min-height: 30px; font-size: 15px; margin-bottom: 4px; }
 .garage-modal .kart-driver { min-height: 18px; margin-bottom: 9px; font-size: 8px; }
 .garage-modal .kart-card-stat { padding-top: 6px; padding-bottom: 6px; }
 .garage-modal .garage-footer { margin-top: 15px; padding-top: 15px; }
 .garage-modal .garage-footer > p { font-size: 10px; }
 .garage-modal .garage-footer > .button { min-height: 42px; }
}
.active-effect.debuff { border-color: #a2583d; background: linear-gradient(#3b201bea, #1c1411eb); }
.active-effect.debuff strong { color: #edb393; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; }button,input,select { transition: none; } }

/* WarKart 1.4 — rendered classic iron windows and crimson controls. */
:root {
 --window-frame: url('/assets/ui/window-frame.png'); --red-button: url('/assets/ui/red-button.png');
 --stone: linear-gradient(135deg,#30302e,#222220 75%); --leather: linear-gradient(#35302b,#211e1b);
 --cream:#eee9df; --muted:#bab5aa; --border:#74746e; --frame-shadow:inset 0 0 0 1px #111,0 5px 16px #000a;
}
.menu-header { border-bottom-color:#666662; box-shadow:0 1px #101010,0 2px #b0afa540; }
.menu-header::before { background:linear-gradient(#171715f5,#292824ef,#131311); }
.menu-main,.selected-kart,.track-badge,.modal,.pause-card,.results-card {
 border:4px solid #343431; border-image:var(--window-frame) 12% / 18px / 3px stretch;
 background:var(--stone); box-shadow:inset 0 0 0 2px #111,0 6px 20px #000a;
}
.menu-main::before,.modal::before,.pause-card::before,.results-card::before,.track-badge::before,.track-badge::after { content:none; }
.window-title,.classic-options h2.window-title {
 display:flex; align-items:center; justify-content:center; position:relative; width:max-content; max-width:calc(100% - 24px);
 min-height:29px; margin:-18px auto 16px; padding:5px 24px; border:3px ridge #767672; border-radius:3px;
 background:linear-gradient(#393936,#151614 50%,#252623); box-shadow:inset 0 0 0 1px #111,0 2px 3px #000a;
 color:#ffd100; font:400 14px/1.2 'Trebuchet MS',Arial,sans-serif; letter-spacing:.3px; text-transform:none; text-shadow:1px 1px 1px #000;
}
.menu-main>.window-title { margin-top:-42px; }
.button,.button.primary,.button.secondary,.menu-nav button,.nav-current,.touch-controls button {
 /* Slice only the actual 96px rim/bevel, not 22% of the whole texture.
    Fixed source pixels keep the silver metal and rounded corners readable. */
 border:4px solid transparent; border-image:var(--red-button) 96 fill / var(--button-art-edge,11px) / 0 stretch;
 background:transparent; border-radius:6px; color:#f8f4eb; font-family:'Trebuchet MS',Arial,sans-serif;
 font-weight:400; letter-spacing:.4px; text-shadow:1px 1px 1px #000; box-shadow:0 2px 4px #0009;
}
.button { min-height:40px; padding:7px 21px; }.start-button{--button-art-edge:12px;min-height:47px;font-size:18px;}
.button:hover,.menu-nav button:hover,.touch-controls button:hover { filter:brightness(1.2);color:#fff3c5;background-color:transparent; }
.button:active,.touch-controls button.pressed{filter:brightness(.82);transform:translateY(1px);}
.menu-nav{gap:7px}.menu-nav button,.nav-current{--button-art-edge:9px;padding:7px 14px}.nav-current{color:#ffdf80}
.icon-button{border-color:#82827c;color:#dbd9ce;background:radial-gradient(circle at 35% 30%,#53534d,#1c1d1a 80%)}
.dialog-close .icon-button{border-radius:3px;background:linear-gradient(#a41b13,#650b08);color:#eee8dc}
.gold-wallet,.race-place,.hud-lap,.hud-timing,.hud-top-right,.item-slot,.active-effect,.race-notice,.wrong-way,.drift-indicator,.toast {
 border-color:#686862; border-image:var(--window-frame) 12% / 10px / 1px stretch;
 box-shadow:inset 0 0 0 1px #141412,0 3px 8px #0008;
}
.hud-lap,.hud-timing,.hud-top-right,.gold-wallet,.item-slot{background:linear-gradient(#2d2d28ef,#1c1e19ee)}
.kart-portrait,.driver-portrait,.kart-illustration,.result-trophy,.spell-frame,.item-icon{border-color:#898980}
.setup-block,.race-options,.garage-footer,.control-row,.setting-row,.spellbook-heading,.results-stats,.records-table td,.records-table th,.lap-splits li{border-color:#77726765}
.menu-description,.dialog-intro,.selected-kart p,.controller-intro,.item-guide p,.dialog-footnote,.setting-row>span small{color:#c0bbb0}
.mode-option,.kart-card{border-color:#74746a;background:var(--leather)}
.mode-option.selected,.kart-card.selected{border-color:#c4a051;background:linear-gradient(#51251e,#2a1e19);box-shadow:inset 0 0 0 1px #111,0 0 7px #bf9c3230}
.mode-option.selected::after{content:none}.mode-option span{color:#e5dfd1}.mode-option.selected span{color:#ffdc77}
.race-options select,.setting-row select,.setting-row input[type=text],kbd{border-color:#77766c;background-color:#191a15;color:#eee8da}
.gold-reward,.item-guide>div,.driving-tip,.race-key-hints,.result-standing,.standing-row{border-color:#716d5e}
.standing-row{background:linear-gradient(90deg,#292a22ed,#313329d5)}.standing-row.player{background:linear-gradient(90deg,#66241bdc,#33271dd9);border-color:#b2944a}
.speed-dial{border-color:#96968b;background:radial-gradient(circle at 40% 30%,#35372df2,#1a2016f5 75%);box-shadow:inset 0 0 0 2px #11150f,inset 0 0 20px #000,0 0 0 2px #32352a,0 6px 14px #0008}
.speed-digits strong{color:#eee9d5}.gauge-ticks{stroke:#a8aa97}.nitro-bar,.drift-indicator>div{border-color:#7d8171}
.minimap-panel{width:210px}
.minimap-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;position:absolute;top:-27px;left:1px;right:1px;height:25px;padding:2px 10px;background:linear-gradient(#332a20d9,#201a11c9);border-top:1px solid #a28d5367;border-bottom:1px solid #8c86568c;box-shadow:0 2px 3px #0008;font:12px/1 'Trebuchet MS',Arial,sans-serif}
#minimap-zone{color:#ffdf58;text-shadow:1px 1px 2px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#minimap-clock{color:#f0eddf;font-size:11px;font-variant-numeric:tabular-nums}
.minimap-disc{display:block;width:210px;height:210px;padding:0;border:0;background:none;box-shadow:none;border-radius:0}.minimap-disc::after{content:none}
.minimap-viewport{position:absolute;inset:21px;border-radius:50%;overflow:hidden;background:#92502b;box-shadow:inset 0 0 12px #000}
.minimap-panel canvas{display:block;width:100%;height:100%;border-radius:50%}
.minimap-frame{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 2px #000b)}
.compass-n{top:15px;left:0;right:0;z-index:1;color:#fff0a8;font:700 9px Georgia,serif;text-shadow:0 1px 2px #000}
.minimap-zoom{display:flex;flex-direction:column;gap:2px;position:absolute;right:-1px;bottom:13px;z-index:2;pointer-events:auto}
.minimap-zoom button{display:grid;place-items:center;width:27px;height:27px;padding:0;border:2px ridge #89896a;border-radius:50%;background:radial-gradient(circle at 35% 25%,#655838,#282b1d 75%);color:#ffe28a;font:700 23px/1 Georgia,serif;text-shadow:0 2px 2px #000;box-shadow:0 2px 3px #0009}
.minimap-zoom button:disabled{opacity:.45;cursor:default}
.map-key{margin-top:3px;color:#ded5ad;font-size:7px;gap:4px}.map-key i{width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:6px solid #d9e8e9;background:none;border-radius:0}
.map-key>span{background:#e46a4b}#minimap-zoom-label{color:#c6bc96;font-size:8px;font-weight:400;margin-left:7px}
.pause-card.classic-options{width:325px;max-width:calc(100vw - 44px);padding:34px 31px 25px}
.classic-options h2.window-title{margin:-20px auto 12px;padding:5px 35px;font-size:16px}
.classic-options .pause-status{color:#aaa99a;font-size:10px;margin:0 0 14px;line-height:1.3}
.pause-actions{display:flex;flex-direction:column;gap:8px}.pause-actions .button{--button-art-edge:9px;width:100%;min-height:33px;padding:4px 10px;font-size:13px}
.pause-actions #resume-race{margin-top:12px}
@media(max-width:960px){.menu-nav button,.nav-current{padding:7px 9px;font-size:10px}.menu-main>.window-title{margin-top:-37px}}
@media(max-width:430px){.menu-main>.window-title{margin-top:-35px}.window-title{font-size:12px;padding:4px 18px}.button{padding:7px 12px;font-size:12px}.start-button{font-size:16px}.pause-card.classic-options{padding:29px 24px 22px}.classic-options h2.window-title{font-size:15px}.minimap-heading{font-size:12px}}

/* WarKart 1.7: painted Warcraft-style instrument and six-kart garage. */
.garage-modal { width: min(1180px, calc(100vw - 48px)); }
.speedometer { width: 236px; }
.speed-dial { width: 236px; height: 236px; border: 0; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 5px 6px #000a); }
.speedometer-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.speed-gauge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gauge-track { stroke: #352b1e; stroke-width: 3; }
.gauge-fill { stroke-width: 2; stroke-linecap: round; opacity: .8; }
.gauge-ticks { stroke: #dac38d; stroke-width: 1; }
.gauge-ticks .minor { opacity: .55; stroke-width: .65; }
.gauge-ticks .major { stroke: #ecd4a0; stroke-width: 1.4; }
.gauge-labels { fill: #d8c49b; font: 10px Georgia, serif; text-anchor: middle; paint-order: stroke; stroke: #0e0c09; stroke-width: 1.8; }
.gauge-needle-shadow { fill: #000a; transform: translate(1px, 1.5px); }
.gauge-needle { fill: url(#needle-gold); stroke: #4c2812; stroke-width: .65; }
.gauge-hub-ring { fill: #352518; stroke: #b28a45; stroke-width: 1.3; }
.gauge-hub { fill: #8d2922; stroke: #e3b975; stroke-width: .6; }

/* WarKart 1.9: the spell slot is the cast control, and a persistent course
   warning takes the single notice position until the kart is back on course. */
#item-slot { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
#item-slot:focus-visible { outline: 2px solid #ffe8a7; outline-offset: 4px; }
#item-slot.pressed { filter: brightness(1.25); }
.race-center:has(#wrong-way:not([hidden])) #race-notice { display: none; }
.race-notice, .wrong-way { padding: 8px 12px; font-size: 14px; line-height: 1.35; }
.wrong-way { min-width: 0; margin-top: 0; font-size: 16px; white-space: normal; }
.wrong-way small { margin-top: 5px; font-size: 10px; letter-spacing: .2px; }
.speed-title { position: absolute; top: 78px; left: 0; right: 0; color: #a58a5d; font: bold 9px Georgia, serif; letter-spacing: 1.5px; text-shadow: 0 1px #000; }
.speed-digits { inset: 135px auto auto 50%; width: 98px; transform: translateX(-50%); padding: 0; background: transparent; }
.speed-digits strong { font-size: 40px; line-height: 1; color: #f5dda0; text-shadow: 0 2px 1px #000, 0 0 9px #d6a34b30; }
.speed-digits > span { margin-top: 4px; font-size: 9px; letter-spacing: 1.5px; color: #bfa778; }
.kart-status { bottom: 41px; left: 40px; right: 40px; font-size: 6.5px; line-height: 1.2; letter-spacing: .25px; color: #c5ad7c; }
.speed-dial.boosting .speed-digits strong { color: #ffe5a8; text-shadow: 0 0 9px #ec8d3770, 0 2px #000; }
.speed-dial.boosting .gauge-needle { filter: drop-shadow(0 0 1.5px #ffba56); }
/* The turbo art shares the dial's iron/gold/red materials. Its clear aperture
   reveals the live fill; the PNG is never stretched into a solid progress bar. */
.turbo-meter { margin-top: 3px; }
.speedometer .nitro-label { padding: 0 12px; margin-top: 2px; font: bold 12px/1.2 'Trebuchet MS', Arial, sans-serif; letter-spacing: .6px; color: #f0d8a2; text-shadow: 0 1px 3px #000, 0 0 3px #000; }
.speedometer .nitro-label .icon { width: 15px; height: 16px; color: #b0d9e8; }
#nitro-value { font-variant-numeric: tabular-nums; }
.speedometer .nitro-bar { position: relative; height: 38px; margin: 1px 0 0; overflow: hidden; border: 0; background: transparent; box-shadow: none; }
.turbo-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; z-index: 1; }
.nitro-track { position: absolute; left: 9.8%; right: 9.8%; top: 36%; height: 28%; overflow: hidden; background: #100e0d; box-shadow: inset 0 1px 3px #000; }
.nitro-track > i { display: block; width: 100%; height: 100%; background: linear-gradient(#b8eaf1, #579fb8 40%, #246082 50%, #4287a1); box-shadow: inset 0 1px #d7f8ff80; }
.speedometer-foot { margin-top: 1px; gap: 7px; color: #e8d5ac; font: 11px/1.3 'Trebuchet MS', Arial, sans-serif; text-shadow: 0 1px 3px #000, 0 0 3px #000; }
.speedometer-foot kbd { font-size: 10px; min-height: 22px; padding: 3px 6px; }
@media (min-width: 761px) and (max-width: 1040px) { .kart-options { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .garage-modal { width: calc(100vw - 24px); } }
@media (max-width: 430px) { .speedometer { right: 8px; transform: scale(.43); } }
@media (max-height: 540px) and (orientation: landscape) { .speedometer { transform: scale(.43); } }
