:root {
  color-scheme: dark;
  --page: #101216;
  --panel: #1a1d21;
  --panel-high: #24272b;
  --line: #34373d;
  --text: #f4f2ee;
  --muted: #acb0b8;
  --accent: #ff7542;
  --gold: #f0c876;
  --positive: #a7e08b;
  --danger: #ff847b;
  --radius: 2px;
  --display: 'Bahnschrift', 'Arial Narrow', 'Roboto Condensed', 'Arial', sans-serif;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-synthesis: none;
  font-size: 16px;
  background: var(--page);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 290px; min-height: 100vh; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
a { color: inherit; }
.icon { flex: 0 0 auto; vertical-align: middle; }
small, .muted { color: var(--muted); }
.top { min-height: 70px; padding: calc(12px + var(--tg-content-safe-area-inset-top, env(safe-area-inset-top, 0px))) max(27px, var(--tg-content-safe-area-inset-right, 0px)) 12px max(25px, var(--tg-content-safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #15171b; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: none; padding: 0; text-align: left; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 39px; flex: 0 0 auto; }
.game-logo { width: 100%; max-height: 100%; object-fit: contain; }
.brand-name { font-family: var(--display); font-weight: 850; font-size: 1.1rem; letter-spacing: .045em; white-space: nowrap; }
.brand-name span { color: var(--accent); }
.wallets { display: flex; align-items: center; gap: 9px; }
.resource { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 11px; height: 40px; border: 1px solid var(--line); background: #202328; white-space: nowrap; font-size: .88rem; font-variant-numeric: tabular-nums; }
.resource .icon { width: 18px; height: 18px; color: var(--accent); }
.resource strong span { color: var(--muted); font-weight: 500; }
.resource-plus { display: grid; place-items: center; width: 21px; height: 21px; border-left: 1px solid var(--line); padding-left: 3px; }
.resource-plus .icon { width: 14px; height: 14px; }
.resource:hover:where(button) { border-color: #82553f; }
.effects-button { flex: 0 0 auto; width: 40px; padding: 0; }
.effects-button .icon { color: var(--muted); }
.layout { display: grid; grid-template-columns: 215px minmax(0, 1fr); min-height: calc(100vh - 70px); }
.nav { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 28px 14px 18px; position: sticky; top: 70px; height: calc(100dvh - 70px); overflow-y: auto; border-right: 1px solid var(--line); background: #15171b; }
.nav-links, .nav-tools { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; border: 1px solid transparent; border-radius: var(--radius); padding: 0 13px; text-align: left; background: transparent; color: var(--muted); font-weight: 650; font-size: .92rem; transition: background .16s ease, color .16s ease; }
.nav-link:hover { color: var(--text); background: #24272d; }
.nav-link.selected { color: var(--accent); background: #28262b; border-color: transparent; box-shadow: inset 3px 0 var(--accent); }
.nav-link .icon { width: 19px; height: 19px; }
.nav-more { display: none; }
.pilot-profile { width: 100%; background: none; text-align: left; }
.pilot-copy { min-width: 0; }
.pilot-profile:hover .pilot-copy strong { color: var(--accent); }
.nav-tail { display: grid; gap: 14px; }
.pilot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; border-top: 1px solid var(--line); padding: 14px 4px 0; }
.pilot-avatar, .tool-icon, .slot-icon { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #393c43; border-radius: var(--radius); background: #24272c; color: var(--accent); flex: 0 0 auto; }
.pilot strong, .pilot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot strong { font-size: .86rem; }
.pilot small { margin-top: 1px; font-size: .73rem; }
.xp-bar { display: block; height: 3px; margin-top: 6px; background: #343841; border-radius: 10px; overflow: hidden; }
.xp-bar i { display: block; height: 100%; background: var(--accent); }
.main { width: min(100%, 1380px); margin: 0 auto; padding: 30px clamp(22px, 3.2vw, 48px) 54px; outline: none; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 17px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
h1, .hero-caption h2 { font-family: var(--display); font-size: clamp(2.35rem, 3.6vw, 3.35rem); font-weight: 850; line-height: .96; letter-spacing: -.025em; text-transform: uppercase; }
.page-title p { margin-top: 9px; color: var(--muted); line-height: 1.42; }
h2 { font-size: 1.2rem; line-height: 1.15; font-weight: 750; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 8px 14px; border: 1px solid transparent; border-radius: var(--radius); text-align: center; font-weight: 725; font-size: .88rem; line-height: 1.25; text-decoration: none; transition: background .16s, color .16s, border-color .16s; }
.button .icon { width: 17px; height: 17px; }
.button.primary { background: var(--accent); color: #19120f; border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: #ff8d63; border-color: #ff8d63; }
.button.secondary, .button.tune-buy { background: #26292f; border-color: #3d4149; color: var(--text); }
.button.secondary:hover:not(:disabled), .button.tune-buy:hover:not(:disabled) { border-color: #b97154; background: #303238; }
.button.quiet { color: var(--muted); background: transparent; border-color: #3b3e43; }
.button.quiet:hover { color: var(--text); border-color: #8b9199; }
.button.wide { width: 100%; }
.button.gold { color: var(--gold); border-color: #896f3e; background: #2e261c; }
.button.gold:hover:not(:disabled) { background: #45351f; border-color: var(--gold); }
.gold-part { border-color: #695333; }
.gold-part strong, .gold-part .slot-icon { color: var(--gold); }
.button.compact { min-height: 37px; padding: 6px 10px; font-size: .82rem; }
.button:disabled { opacity: .53; }
.button.selected-car { color: var(--accent); background: #362b28; opacity: 1; cursor: default; }
.panel { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head > .icon { color: var(--muted); }
.panel-head > small { text-align: right; }
.garage-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .49fr); align-items: start; gap: 17px; }
.garage-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.column { display: grid; gap: 15px; min-width: 0; }
.hero-image { position: relative; isolation: isolate; overflow: hidden; min-height: 220px; height: clamp(280px, 25vw, 380px); background: #23262c; }
.studio-photo { position: absolute; inset: 0; overflow: hidden; background: #222328 url('/assets/studio.jpg') center 53% / cover no-repeat; }
.studio-car { position: absolute; width: 85%; max-width: 760px; left: 50%; bottom: 17%; transform: translateX(-50%); }
.studio-car .sprite { width: 100%; }
.studio-car .sprite-shadow { bottom: -1%; left: 4%; width: 92%; height: 9%; filter: blur(clamp(3px, .75vw, 8px)); }
.studio-number { position: absolute; z-index: 1; inset: clamp(6px, 1.2vw, 15px) clamp(6px, 1.2vw, 15px) auto auto; font-size: clamp(.72rem, 1.25vw, 1rem); }
.number-status { display: inline-block; padding: .34em .5em; border: 1px solid #636974; border-radius: 2px; background: #22262cec; color: #e1e3e7; font: 650 .85em/1.1 var(--display); white-space: nowrap; }
.class-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; background: #d9e0e7; color: #1d232c; font-size: .72rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.class-B { background: #99c5ec; color: #15283a; }
.class-A { background: #ff916b; color: #32170e; }
.class-S { background: #f1cf82; color: #382709; }
.hero-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 15px 16px; border-top: 2px solid var(--accent); background: #1a1d21; }
.hero-caption > div > small { display: block; margin-bottom: 4px; font-size: .81rem; font-weight: 650; }
.hero-caption h2 { font-size: clamp(1.95rem, 4vw, 3.8rem); font-style: italic; line-height: .93; letter-spacing: -.05em; }
.hero-caption .button { min-width: 103px; flex: 0 0 auto; }
.car-title { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; }
.plate-chip { display: inline-block; flex: 0 0 auto; padding: 3px 6px; border: 1px solid #d6ba7c; border-radius: 2px; background: #efe1bb; color: #25211a; font: 800 .78rem/1.1 var(--display); white-space: nowrap; letter-spacing: .045em; }
.plate-chip.chip-unmounted { background: #2b3038; color: #c1c5cb; border-color: #4a4c52; letter-spacing: 0; }
.car-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px 0; background: #1d2024; border-top: 1px solid #3b3e44; }
.car-stats > div { padding: 3px 14px; border-left: 1px solid #3b3d42; }
.car-stats > div:first-child { border-left: 0; }
.car-stats span { display: block; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.car-stats strong { display: block; font-size: clamp(1.15rem, 2.15vw, 1.66rem); line-height: 1.23; letter-spacing: -.02em; font-family: var(--display); }
.car-stats small { font-size: .58em; font-weight: 500; }
.car-stats .performance strong { color: var(--accent); }
.owned-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.tuning, .spec-panel, .plate-panel, .modules-panel { padding: 17px; }
.tuning-rows { margin-top: 11px; }
.tune { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 78px; border-bottom: 1px solid var(--line); }
.tune:last-child { border-bottom: 0; }
.tune-name strong, .tune-name small { display: block; }
.tune-name strong { font-size: .9rem; line-height: 1.18; }
.tune-name small { margin-top: 4px; font-size: .73rem; line-height: 1.25; }
.stages { display: flex; gap: 4px; margin-top: 6px; }
.stages i { width: 13px; height: 3px; background: #3b3e44; border-radius: 2px; }
.stages i.lit { background: var(--accent); }
.button.tune-buy { padding: 5px 7px; min-height: 35px; white-space: nowrap; font-size: .77rem; }
.spec-rows { margin: 11px 0; }
.class-note { margin-top: 9px; color: var(--muted); font-size: .79rem; }
.spec-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.spec-rows dt, .market-facts dt { color: var(--muted); font-size: .79rem; }
.spec-rows dd, .market-facts dd { margin: 0; font-weight: 750; font-size: .88rem; text-align: right; overflow-wrap: anywhere; }
.spec-time { padding: 10px 0 12px; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; border-top: 1px solid var(--line); }
.spec-time span { color: var(--muted); font-size: .79rem; }
.spec-time strong { color: var(--accent); font-family: var(--display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.personal-best { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.personal-best strong, .personal-best small { display: block; }
.best-panel { padding: 14px 16px 3px; }
.personal-best strong { margin-top: 2px; font-family: var(--display); font-size: 1.28rem; }
.plate-content { display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr); gap: 15px; margin-top: 12px; }
.plate-box { display: grid; justify-items: start; gap: 4px; }
.plate-box small { font-size: .72rem; }
.plate { display: inline-flex; background: #f5f5ee; color: #141411; border: 2px solid #efeee4; border-radius: 6px; box-shadow: inset 0 0 0 2px #20201c, 0 2px 6px #0008; font: 800 2rem/.8 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; user-select: none; }
.plate.unmounted { opacity: .64; }
.plate-main { display: flex; align-items: center; justify-content: space-between; gap: 2px; padding: 7px 6px; min-width: 108px; }
.plate-letter { align-self: flex-end; font-size: .66em; padding-bottom: 1px; }
.plate-region { display: grid; align-content: center; text-align: center; gap: 2px; padding: 3px 5px; border-left: 1.5px solid #252520; }
.plate-region strong { font-size: .61em; }
.plate-region span { display: flex; align-items: center; justify-content: center; gap: 2px; font: 850 .28em/1 var(--display); }
.rus-flag { width: 11px; height: 7px; border: 1px solid #23232353; background: linear-gradient(#fff 0 33.3%, #1645a1 33.3% 66.6%, #e12e37 66.6%); }
.plate.plate-compact { align-items: stretch; vertical-align: middle; border-width: 1px; border-radius: 3px; box-shadow: inset 0 0 0 1px #232320, 0 1px 5px #0009; font-size: clamp(1.05rem, 1.48em, 1.42rem); line-height: .96; }
.plate-compact.unmounted { background: #b7bdc5; border-color: #9da5af; opacity: 1; }
.plate-compact .plate-main { min-width: 0; gap: .11em; padding: .27em .26em .22em; }
.plate-compact .plate-letter { padding-bottom: .04em; font-size: .73em; }
.plate-compact .plate-region { gap: 1px; padding: .18em .19em; border-left-width: 1px; }
.plate-compact .plate-region strong { font-size: .64em; }
.plate-compact .plate-region span { font-size: .33em; }
.plate-compact .rus-flag { width: 8px; height: 5px; }
.owned-strip .plate-compact { font-size: 1.02rem; }
.plate-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.plate-roll { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 4px 5px; border: 1px solid #393d43; border-radius: 8px; background: #25282d; font-size: .83rem; text-align: left; font-weight: 700; }
.plate-roll .icon { color: var(--accent); width: 14px; height: 14px; }
.plate-roll small { display: block; font-size: .7rem; font-weight: 500; white-space: nowrap; }
.plate-roll:hover { border-color: #a05740; }
.plate-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.plate-actions .muted { font-size: .83rem; }
.build-preview { display: flex; align-items: center; justify-content: center; position: relative; min-height: 175px; padding: 16px 0 36px; margin: 13px 0; overflow: hidden; border: 1px solid #3a3f46; background: repeating-linear-gradient(0deg, #b1bdcc16 0 1px, transparent 1px 18px), repeating-linear-gradient(90deg, #b1bdcc16 0 1px, transparent 1px 18px), #22262d; }
.build-preview .sprite { width: min(91%, 490px); }
.build-preview-caption { position: absolute; bottom: 8px; left: 10px; display: grid; gap: 1px; font-family: var(--display); }
.build-preview-caption strong { font-size: .76rem; letter-spacing: .045em; }
.build-preview-caption small { font: .7rem/1.2 'Segoe UI', sans-serif; }
.module-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.slot { min-width: 0; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #23262b; padding: 9px 7px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.slot:hover { border-color: #a05740; background: #312c2b; }
.slot strong, .slot small { display: block; overflow-wrap: anywhere; }
.slot strong { font-size: .82rem; }
.slot small { font-size: .72rem; }
.slot-icon { width: 29px; height: 29px; }
.slot-icon .icon { width: 16px; height: 16px; }
.slot-edit { font-size: .72rem; color: var(--accent); flex-basis: 100%; }
.showroom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.market-image { position: relative; aspect-ratio: 1.55; background: #282c31; }
.market-image .class-tag { position: absolute; top: 11px; left: 11px; }
.market-detail { padding: 16px; }
.market-detail h2 { font: 850 clamp(1.28rem, 2.8vw, 2.3rem)/1.07 var(--display); font-style: italic; margin: 3px 0 12px; }
.market-facts { margin: 10px 0 14px; }
.market-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-top: 1px solid var(--line); padding: 5px 0; }
.market-detail .car-title { margin: 3px 0 5px; }
.market-detail .car-title h2 { margin: 0; }
.market-car { display: flex; flex-direction: column; }
.market-detail { display: flex; flex: 1 0 auto; flex-direction: column; align-items: stretch; }
.market-detail > .button { margin-top: auto; }
.market-actions { display: grid; gap: 7px; margin-top: auto; }
.exchange-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 14px; padding: 10px 0 15px; }
.exchange-filters label, .listing-form label { display: grid; min-width: 0; gap: 5px; font-size: .84rem; font-weight: 650; color: var(--muted); }
.exchange-filters .own-filter { display: flex; align-items: center; min-height: 41px; }
.market-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 0 8px; }
.market-tabs .button[aria-pressed='true'] { border-color: #8e5840; cursor: default; }
.market-prices { display: grid; gap: 12px; max-width: 760px; padding: clamp(12px, 2.4vw, 20px); }
.market-prices .table-shell { margin: 0; }
.market-prices td:last-child, .market-prices th:last-child { text-align: right; }
.market-prices td:last-child { font-weight: 720; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.price-summary > div { padding: clamp(5px, 1.4vw, 11px); border: 1px solid var(--line); background: #22262c; }
.price-summary dt { color: var(--muted); font-size: .73rem; }
.price-summary dd { margin: 4px 0 0; font: 800 clamp(.86rem, 2.6vw, 1.22rem)/1.2 var(--display); font-variant-numeric: tabular-nums; }
.price-trend { display: block; width: 100%; max-height: 137px; background: #15181d; border: 1px solid var(--line); }
.price-trend .price-grid { stroke: #363b43; stroke-width: 1; }
.price-trend polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.price-trend circle { fill: var(--accent); }
.exchange-filters input { accent-color: var(--accent); width: 16px; height: 16px; }
.exchange-filters select, .listing-form select, .listing-form input { width: 100%; min-height: 41px; min-width: 0; padding: 7px 10px; font: inherit; color: var(--text); background: var(--panel-high); border: 1px solid var(--line); border-radius: var(--radius); }
.listing-form select, .listing-form input { font-size: 1rem; }
.exchange-filters select:focus-visible, .listing-form :is(select, input):focus-visible, .setup-slider input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.listing-price { margin: 0 0 11px; font: 850 1.53rem/1.1 var(--display); font-variant-numeric: tabular-nums; color: var(--accent); }
.sale-net { margin: -5px 0 9px; }
.plate-lots, .league-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.plate-lots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plate-lot { padding: 14px; display: grid; justify-items: start; gap: 8px; }
.plate-lot p { color: var(--muted); font-size: .86rem; }
.plate-lot .listing-price { margin: 3px 0 0; }
.plate-lot .button { align-self: end; }
.plate-collection { padding: 14px; margin-top: 14px; }
.plate-collection > p { margin-top: 10px; }
.plate-collection ul { padding: 0; margin: 9px 0 0; list-style: none; }
.plate-collection li { display: flex; justify-content: space-between; align-items: center; gap: 7px; border-top: 1px solid var(--line); padding: 8px 0; }
.plate-collection li small { display: block; margin-top: 3px; }
.collection-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 4px; }
.plate-lot-modal { margin: 12px 0; }
.listing-form { display: grid; gap: 13px; }
.listing-form .muted, .market-explain { font-size: .84rem; }
.market-explain, .modal-route { margin-top: 9px; }
.listing-build { padding-top: 6px; }
.empty-exchange { min-height: 175px; padding: 22px; border-left: 3px solid var(--accent); }
.empty-exchange p { color: var(--muted); margin: 8px 0 15px; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .58fr); gap: 14px; align-items: start; }
.setup-form { padding: 0 16px 16px; }
.setup-group { min-width: 0; padding: 0; margin: 15px 0 0; border: 0; }
.setup-group legend { padding: 0; color: var(--accent); font: 800 .98rem/1.2 var(--display); }
.forecast-stats dd small { white-space: nowrap; }
.season-pass { --ice: #b1dbf2; --pass-gap: clamp(10px, 1.5vw, 20px); min-width: 0; }
.pass-hero {
  display: grid;
  min-height: clamp(295px, 29vw, 400px);
  align-content: space-between;
  gap: var(--pass-gap);
  padding: clamp(16px, 2.75vw, 38px);
  border-color: #3a4b57;
  border-top: 2px solid #81a8be;
  background:
    linear-gradient(90deg, #0d161ff7 0%, #0d161fca 26%, #0d161f28 62%, #0d161f00 100%),
    linear-gradient(0deg, #0c131d 0%, #0c131d00 48%),
    #17232d url('/assets/pass-winter-hero.jpg') right center / cover no-repeat;
}
.pass-hero-copy { align-self: start; width: min(57%, 580px); }
.pass-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--ice); font-size: .74rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.pass-eyebrow .icon, .pass-date .icon { width: 15px; height: 15px; }
.pass-hero h1 { margin: 8px 0 11px; font: 900 clamp(2.6rem, 5.2vw, 5.35rem)/.97 var(--display); text-transform: uppercase; text-wrap: balance; text-align: left; }
.pass-date { display: flex; align-items: center; gap: 7px; color: #d3e2ed; font-size: .86rem; }
.pass-hero-copy .button { margin-top: 13px; }
.pass-summary { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: stretch; gap: 8px; }
.pass-progress, .pass-upgrade { display: grid; align-content: center; gap: 5px; padding: 10px 12px; background: #101923eb; border: 1px solid #394b5a; }
.pass-progress-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.pass-progress-heading b { color: var(--ice); font: 850 1.42rem/1 var(--display); }
.pass-progress-heading span { color: var(--ice); font-size: .8rem; font-variant-numeric: tabular-nums; }
.pass-progress progress { display: block; width: 100%; height: 8px; border: 0; appearance: none; background: #303e4d; color: var(--ice); accent-color: var(--ice); }
.pass-progress progress::-webkit-progress-bar { background: #303e4d; }
.pass-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #4689a9, #bce7ff); }
.pass-progress progress::-moz-progress-bar { background: #a4d5ef; }
.pass-progress > small { color: #cedce7; }
.pass-upgrade { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 9px; border-color: #67543b; background: #1d1b19ed; }
.pass-upgrade strong { display: block; color: var(--gold); font-size: .94rem; }
.pass-upgrade strong .icon { width: 15px; height: 15px; }
.pass-upgrade small { display: block; margin-top: 3px; font-size: .75rem; }
.pass-upgrade .button { white-space: nowrap; }
.pass-buy-note { grid-column: 1 / -1; }
.pass-tasks, .pass-rewards { margin-top: var(--pass-gap); padding: clamp(9px, 1.65vw, 19px); }
.pass-tasks { scroll-margin-block-start: 94px; }
.pass-task-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 7px; margin: 9px 0; }
.pass-task-grid .pass-task-premium { border-color: #514330; border-top-color: var(--gold); }
.pass-task-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.pass-task-actions .button { min-height: 28px; }
.pass-rewards { background: #171d25; border-color: #39434c; }
.pass-rewards-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.pass-rewards-head h2, .pass-tasks h2 { font: 850 1.39rem/1.2 var(--display); }
.pass-rewards-head small { display: block; margin-top: 3px; font-size: .78rem; }
.pass-track-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pass-arrow { width: 37px; min-height: 37px; padding: 0; }
.pass-arrow[aria-disabled='true'] { opacity: .46; cursor: default; }
.pass-track {
  --lane-width: 117px;
  --tier-width: clamp(118px, 10.1vw, 148px);
  overflow: auto hidden;
  max-width: 100%;
  padding-bottom: 4px;
  overscroll-behavior-x: contain;
  scrollbar-color: #597588 #202a35;
  scrollbar-width: thin;
  scroll-padding-inline-start: var(--lane-width);
}
.pass-track:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.pass-track-table { width: max-content; margin: 0; border-collapse: separate; border-spacing: 0 5px; }
.pass-track-table th, .pass-track-table td { border: 0; padding: 0; font-weight: 650; color: var(--text); }
.pass-track-table td, .pass-track-table .pass-tier { width: var(--tier-width); padding-right: 5px; }
.pass-track-table .pass-lane {
  position: sticky; left: 0; z-index: 1; width: var(--lane-width); min-width: var(--lane-width);
  padding: 8px; border-left: 2px solid #8cc4e2; border-right: 5px solid #171d25; background: #253743; color: var(--ice);
  font: 800 .85rem/1.18 var(--display);
}
.pass-lane .icon { display: block; margin: 0 0 6px; }
.pass-track-table .pass-lane-heading { border-left-color: #586979; background: #232c36; color: #d1dce8; }
.pass-lane-premium .pass-lane { border-left-color: var(--gold); background: #392f25; color: var(--gold); }
.pass-tier { vertical-align: middle; text-align: center; white-space: nowrap; }
.pass-tier strong, .pass-tier small { display: inline-block; padding: 4px 5px; vertical-align: middle; }
.pass-tier strong { min-width: 22px; background: #2b3741; font: 850 .93rem/1 var(--display); }
.pass-tier small { font-size: .67rem; font-variant-numeric: tabular-nums; }
.pass-tier-unlocked strong { background: #9bd0e9; color: #14232e; }
.pass-tier[data-pass-current] strong { border: 1px solid var(--ice); }
.pass-prize {
  display: grid; grid-template-rows: 76px 70px; border: 1px solid #435564; border-top: 2px solid #6897b1;
  background: #1c2934; color: var(--text);
}
.pass-lane-premium .pass-prize { border-color: #695840; border-top-color: #ae884b; background: #2b2621; }
.pass-prize-picture { position: relative; overflow: hidden; background: #101923; }
.pass-prize-picture img { width: 100%; height: 100%; object-fit: cover; }
.pass-prize-picture span { position: absolute; top: 4px; right: 4px; padding: 2px 4px; background: #10161edb; color: #e4ecf7; font-size: .68rem; }
.pass-prize-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; padding: 6px; }
.pass-prize-copy strong { font-size: .8rem; line-height: 1.12; }
.pass-prize-copy small { display: flex; align-items: center; min-height: 24px; gap: 3px; color: #b7c5d3; font-size: .67rem; }
.pass-prize .icon { width: 12px; height: 12px; }
.pass-prize .button { min-height: 28px; padding: 4px; font-size: .73rem; }
.pass-prize.pass-prize-ready { border-color: #9bd0e9; }
.pass-lane-premium .pass-prize-ready, .pass-lane-premium .pass-prize-case { border-color: var(--gold); }
.pass-prize-collected .pass-prize-copy small { color: var(--positive); }
.pass-prize:focus { outline: 2px solid var(--ice); outline-offset: -2px; }
.setup-slider { border-bottom: 1px solid var(--line); padding: 13px 0 11px; }
.setup-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.setup-label label { font-weight: 740; }
.setup-label output { font: 750 1.25rem/1.2 var(--display); font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap; }
.setup-control { display: grid; grid-template-columns: 39px minmax(0, 1fr) 39px; gap: 8px; align-items: center; margin: 7px 0 4px; }
.setup-slider input { display: block; width: 100%; margin: 0; height: 26px; accent-color: var(--accent); cursor: ew-resize; }
.step-button { width: 100%; height: 37px; border: 1px solid var(--line); background: var(--panel-high); font: 750 1.15rem/1 var(--display); }
.step-button:hover:not(:disabled) { border-color: var(--accent); }
.step-button:disabled { opacity: .53; }
.setup-limits { display: flex; justify-content: space-between; gap: 6px; font-variant-numeric: tabular-nums; }
.setup-slider p { margin-top: 4px; color: var(--muted); font-size: .84rem; line-height: 1.38; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.setup-forecast { position: sticky; top: 85px; border-top: 2px solid var(--accent); padding: 15px 16px 7px; }
.forecast-time { display: grid; gap: 7px; }
.forecast-time span { font-size: .88rem; color: var(--muted); }
.forecast-time strong { font: 850 clamp(1.9rem, 3.9vw, 3.25rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.forecast-stats { margin-bottom: 0; }
.race-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.distance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.distance-choice { min-width: 0; display: grid; text-align: left; gap: 4px; padding: 9px 10px; min-height: 61px; border: 1px solid var(--line); background: var(--panel); }
.distance-choice strong { font: 800 1.15rem/1.1 var(--display); }
.distance-choice small { font-size: .75rem; line-height: 1.22; }
.distance-choice[aria-pressed='true'] { border-color: var(--accent); background: #2c2321; }
.distance-choice[aria-pressed='true'] strong { color: var(--accent); }
.league-grid { margin-bottom: 14px; }
.league { display: grid; justify-items: start; gap: 5px; padding: 10px; border: 1px solid var(--line); background: var(--panel); }
.league strong { font-family: var(--display); }
.league > span:not(.class-tag) { font-size: .82rem; }
.league small { font-size: .74rem; }
.league.current-league { border-top: 2px solid var(--accent); background: #252022; }
.race-payout { display: flex; flex-wrap: wrap; gap: 5px 13px; margin: 9px 0 5px; font-size: .85rem; }
.race-payout strong { color: var(--accent); }
.race-offer { display: grid; align-content: space-between; gap: 24px; min-height: 203px; padding: 20px; }
.duel-offer { border-top: 2px solid var(--accent); }
.offer-copy h2 { margin: 10px 0 6px; font: 850 1.72rem/1.05 var(--display); text-transform: uppercase; }
.offer-copy p { color: var(--muted); line-height: 1.45; }
.energy-cost { display: inline-flex; align-items: center; gap: 2px; padding-left: 7px; margin-left: 2px; border-left: 1px solid currentColor; }
.energy-cost .icon { width: 14px; height: 14px; }
.search-state { display: flex; align-items: center; gap: 9px; }
.search-state strong, .search-state small { display: block; }
.search-state .button { margin-left: auto; }
.search-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 13px #ff754280; animation: pulse 1.25s infinite alternate; }
@keyframes pulse { to { opacity: .35; } }
.race-guide { display: flex; gap: 13px; align-items: center; padding: 13px 16px; margin-top: 14px; }
.race-guide p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.race-guide strong { color: var(--text); }
kbd { display: inline-block; padding: 0 4px; font: inherit; border: 1px solid #42464d; border-radius: 4px; }
.daily-panel, .history-panel, .leaderboard { padding: 16px; margin-top: 15px; }
.daily-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.daily-card { display: grid; justify-items: start; align-content: space-between; gap: 9px; padding: 12px; background: #23262b; border: 1px solid #393d43; border-radius: 9px; }
.daily-card strong, .daily-card small { display: block; }
.daily-progress { width: 100%; display: flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; font-size: .79rem; }
.daily-progress progress { display: block; width: 100%; height: 8px; accent-color: var(--accent); }
.history-list { list-style: none; padding: 0; margin: 7px 0 0; }
.history-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.history-list li:first-child { border-top: 0; }
.history-list strong, .history-list small { display: block; overflow-wrap: anywhere; }
.ladder-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.table-shell { overflow-x: auto; }
table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 650; }
td:last-child { font-weight: 750; color: var(--accent); }
.rank-own { background: #362d2b; }
.empty-rank { display: flex; gap: 11px; align-items: center; padding: 23px 4px 9px; color: var(--muted); }
.empty-rank .icon { color: var(--accent); }
.result-win, .mark-perfect { color: var(--positive); }
.result-loss, .result-dnf, .mark-false, .mark-miss { color: var(--danger); }
.mark-good { color: #dbec92; }
.mark-off { color: #f8c276; }
.finish-panel { padding: clamp(16px, 4vw, 32px); }
.finish-title { display: flex; gap: 12px; align-items: center; }
.finish-title h2 { text-transform: uppercase; font: 850 clamp(1.72rem, 4vw, 3rem)/1 var(--display); }
.finish-times { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.finish-times > div { border: 1px solid #393d43; background: #23262c; padding: 12px; border-radius: 9px; }
.finish-times small, .finish-times strong { display: block; overflow-wrap: anywhere; }
.finish-times strong { font: 800 clamp(1.4rem, 4.8vw, 2.6rem)/1.2 var(--display); font-variant-numeric: tabular-nums; }
.trial-note { margin-top: 13px; }
.finish-rewards, .finish-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.finish-rewards span { font-weight: 700; }
.finish-rewards .icon { color: var(--accent); width: 16px; height: 16px; margin-right: 4px; }
.finish-marks { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; margin-top: 16px; }
.finish-marks > div { display: grid; gap: 3px; border-radius: 7px; border: 1px solid var(--line); padding: 9px; min-width: 0; font-size: .82rem; }
.finish-marks span { font-size: .74rem; opacity: .82; }
dialog { padding: 18px; width: min(460px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); border: 1px solid #42464e; border-top: 2px solid var(--accent); border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: 0 20px 70px #000b; }
dialog::backdrop { background: #080a08be; backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.mobile-menu { overscroll-behavior: contain; }
.mobile-menu::backdrop { backdrop-filter: none; }
.mobile-menu-sections { display: grid; gap: 14px; }
.mobile-menu-sections h3 { margin-bottom: 6px; color: var(--muted); font-size: .79rem; font-weight: 700; }
.mobile-menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mobile-menu-grid .nav-link {
  display: grid; align-content: center; justify-items: center; gap: 6px; min-height: 66px; padding: 5px 2px;
  border: 1px solid var(--line); background: var(--panel-high); color: var(--text); font-size: .78rem; text-align: center;
}
.mobile-menu-grid .nav-link:hover { border-color: #966046; }
.mobile-menu-grid .nav-link.selected { border-color: #966046; background: #342922; color: var(--accent); box-shadow: none; }
.mobile-menu-grid .nav-link .icon { color: var(--accent); }
.mobile-menu-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; padding-top: 8px; border-top: 1px solid var(--line); }
.mobile-menu-tools .nav-link { width: auto; min-height: 44px; padding-inline: 8px; font-size: .78rem; }
.effects-settings { display: grid; gap: 7px; }
.effect-toggle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 55px; padding: 8px; border: 1px solid var(--line); background: #22262c; text-align: left; }
.effect-toggle:hover { border-color: #8e5840; }
.effect-toggle small { display: block; margin-top: 2px; }
.effect-toggle .icon { color: var(--muted); }
.effect-toggle > i { position: relative; width: 35px; height: 18px; border: 1px solid #6b717b; border-radius: 12px; background: #353a41; }
.effect-toggle > i::after { content: ''; position: absolute; inset: 2px auto auto 2px; width: 12px; aspect-ratio: 1; border-radius: 50%; background: #c2c8d1; transition: transform .12s ease; }
.effect-toggle[aria-checked='true'] > i { background: #704333; border-color: #df896c; }
.effect-toggle[aria-checked='true'] > i::after { transform: translateX(17px); background: #ffd1bf; }
.tutorial-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.tutorial-progress progress { display: block; flex: 1; min-width: 0; height: 5px; appearance: none; border: 0; background: #343840; color: var(--accent); accent-color: var(--accent); }
.tutorial-progress progress::-webkit-progress-bar { background: #343840; }
.tutorial-progress progress::-webkit-progress-value { background: var(--accent); }
.tutorial-progress progress::-moz-progress-bar { background: var(--accent); }
.tutorial-progress small { font: 700 .77rem/1 var(--display); white-space: nowrap; }
.tutorial-reply { width: fit-content; max-width: 88%; margin: 0 0 9px auto; padding: 6px 9px; border: 1px solid #6c4a3e; background: #362925; }
.tutorial-reply small, .tutorial-speech small { display: block; margin-bottom: 4px; font-size: .73rem; }
.tutorial-reply p { font-size: .85rem; }
.tutorial-dialogue { display: grid; grid-template-columns: clamp(51px, 17vw, 95px) minmax(0, 1fr); align-items: start; gap: 9px; }
.tutorial-dialogue img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 1px solid #5d4439; }
.tutorial-speech { padding: clamp(8px, 2.4vw, 13px); background: #22262c; border: 1px solid #3c4148; border-left: 2px solid #b66b4d; }
.tutorial-speech small { color: #ffb59a; }
.tutorial-speech h3 { margin: 0 0 6px; font: 800 1.04rem/1.1 var(--display); }
.tutorial-speech h3:focus { outline: none; }
.tutorial-speech p { font-size: .88rem; line-height: 1.48; }
.tutorial-actions { display: grid; gap: 6px; margin-top: 12px; }
.tutorial-actions > .muted { font-size: .8rem; }
.tutorial-navigation { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.tutorial-exercise { display: grid; gap: 8px; margin-top: 11px; padding: 10px; background: #1b1f24; border: 1px solid #3c4148; }
.tutorial-exercise-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; }
.tutorial-exercise h4 { margin: 0; font-size: .87rem; }
.tutorial-exercise-head small { display: block; margin-top: 2px; font-size: .76rem; }
.tutorial-options { display: grid; gap: 5px; }
.tutorial-options .button { justify-content: space-between; min-height: 36px; text-align: left; }
.tutorial-options .correct { background: #263c31; border-color: #709b75; }
.tutorial-options .incorrect { background: #3a2a27; border-color: #a6715e; }
.tutorial-feedback { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.tutorial-feedback:empty { display: none; }
.tutorial-feedback strong { margin-right: 4px; color: #ffb59a; }
.tutorial-drive { --sprite-width: clamp(68px, 22vw, 105px); }
.tutorial-drive .lane-road { height: 55px; border: 0; }
.tutorial-drive .lane-road::before { bottom: 8%; }
.tutorial-drive .rev-gauge { height: 13px; }
.tutorial-drive .lights i { width: 9px; height: 9px; }
.tutorial-drive.tutorial-green .tutorial-drive-button { color: #1c2719; background: var(--positive); border-color: var(--positive); }
.tutorial-drive.tutorial-green .tutorial-feedback { color: var(--positive); }
.icon-button { min-width: 37px; min-height: 37px; background: #24272d; border: 1px solid #3f434b; border-radius: var(--radius); }
.icon-button:hover { border-color: var(--accent); }
.module-options { display: grid; gap: 7px; margin-top: 12px; }
.module-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #22252b; }
.module-option strong, .module-option small { display: block; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .39fr); gap: 14px; align-items: start; }
.case-opening, .case-details { min-width: 0; padding: clamp(14px, 2vw, 23px); }
.case-hero { display: flex; align-items: center; gap: 13px; margin-bottom: 15px; }
.case-hero h2 { font: 800 clamp(1.38rem, 3vw, 2rem)/1.07 var(--display); margin-bottom: 4px; }
.case-emblem { display: grid; place-items: center; flex: 0 0 48px; aspect-ratio: 1; background: #33291c; color: var(--gold); border: 1px solid #735b36; }
.case-emblem .icon { width: 25px; height: 25px; }
.case-reel {
  --reel-tile-width: clamp(103px, 18vw, 140px);
  --reel-gap: 8px;
  --reel-step: calc(var(--reel-tile-width) + var(--reel-gap));
  position: relative; overflow: hidden; isolation: isolate; padding: 12px 0;
  border: 1px solid #504232; background: #131416;
}
.case-reel::after { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(90deg, #121315 0%, transparent 20% 80%, #121315 100%); }
.reel-strip { position: relative; left: 50%; display: flex; width: max-content; gap: var(--reel-gap); transform: translateX(calc(-1 * var(--reel-index) * var(--reel-step) - var(--reel-tile-width) / 2)); }
.reel-tile {
  display: grid; flex: 0 0 var(--reel-tile-width); width: var(--reel-tile-width); min-height: 104px; align-content: center; justify-items: center; gap: 9px;
  padding: 8px 5px; background: #22252a; border: 1px solid #444a50; border-bottom: 3px solid #78838b; color: #e0e5e9; text-align: center;
}
.reel-tile .icon { width: 29px; height: 29px; }
.reel-tile strong { font-size: .81rem; line-height: 1.15; }
.reel-tile.gold-part { background: #31281b; border-color: #7a5a32; border-bottom-color: #e0ab58; color: var(--gold); }
.reel-tile.landed { border-color: #ffce81; background: #40311e; color: #fff0d4; }
.reel-marker { position: absolute; z-index: 2; inset: 0 auto 0 50%; width: 2px; transform: translateX(-50%); background: #ffd18b80; pointer-events: none; }
.reel-marker::before, .reel-marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border-inline: 8px solid transparent; }
.reel-marker::before { top: 0; border-top: 9px solid #ffd18b; }
.reel-marker::after { bottom: 0; border-bottom: 9px solid #ffd18b; }
.reel-revealed .reel-marker { background: transparent; }
.case-status { display: grid; justify-items: center; align-content: center; min-height: 67px; gap: 2px; text-align: center; }
.case-status:focus { outline: none; }
.case-status strong { color: var(--gold); }
.case-actions { display: flex; gap: 8px; }
.case-actions > .button { flex: 1 1 0; }
.case-details > h2 { margin-bottom: 7px; }
.case-details .muted { font-size: .84rem; }
.case-parts { display: grid; gap: 6px; list-style: none; margin: 10px 0 0; padding: 0; color: var(--muted); font-size: .83rem; }
.case-parts li { display: flex; gap: 7px; align-items: center; }
.case-parts .icon { width: 16px; height: 16px; color: var(--gold); }
.club-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.club-tables { margin-top: 12px; }
.club-banner, .club-panel { padding: clamp(13px, 2vw, 19px); min-width: 0; }
.club-leaders { margin-bottom: 12px; }
.club-leader-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 10px 0 0; padding: 0; }
.club-leader-photo { position: relative; aspect-ratio: 2.45; }
.club-leader-rank { position: absolute; z-index: 1; inset: 7px auto auto 7px; padding: 4px 7px; background: #d6bd82; color: #24211a; font: 850 .82rem/1 var(--display); }
.club-leader:nth-child(2) .club-leader-rank { background: #b7c3d1; }
.club-leader:nth-child(3) .club-leader-rank { background: #d69a77; }
.club-leader-info { display: flex; justify-content: space-between; gap: 6px; padding: 7px 9px; }
.club-leader-info > div { min-width: 0; }
.club-leader-info small { display: block; color: var(--muted); font-size: .73rem; }
.club-leader-score { text-align: right; }
.club-leader-score strong { font: 800 1.36rem/1 var(--display); color: var(--accent); }
.club-banner, .club-intro { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.club-banner { flex-wrap: wrap; border-left: 3px solid var(--accent); background: linear-gradient(110deg, #332521, #1a1d21 65%); }
.club-banner > div:first-child, .club-intro > div { flex: 1 1 210px; min-width: 0; }
.club-banner h2 { font: 850 clamp(1.35rem, 3.5vw, 2rem)/1.08 var(--display); margin: 5px 0 2px; overflow-wrap: anywhere; }
.club-tag { display: inline-block; flex: 0 0 auto; padding: 3px 6px; border: 1px solid #865c48; color: #ffba97; background: #31231e; font: 800 .72rem/1.1 var(--display); letter-spacing: .05em; }
.club-score { min-width: 90px; }
.club-score strong, .club-score small, .club-list strong, .club-list small { display: block; }
.club-score strong { font: 850 1.65rem/1 var(--display); color: var(--accent); }
.club-panel p { margin: 8px 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.club-panel .daily-progress { margin: 13px 0 9px; }
.club-panel .distance-grid { margin-top: 12px; margin-bottom: 8px; }
.club-panel .race-payout { margin-bottom: 10px; }
.club-list { list-style: none; margin: 6px 0 0; padding: 0; }
.club-list li { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.club-list li > div { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.club-list small { margin-top: 3px; }
.club-excluded-title { margin-top: 13px; font-size: .92rem; }
.club-tasks { margin-top: 12px; }
.club-task-points { display: flex; align-items: center; gap: 5px; font-weight: 720; color: var(--accent); font-size: .81rem; }
.club-member-actions { display: grid; gap: 9px; }
.club-member-actions p { font-size: .86rem; }
.finish-club { margin: 10px 0; color: var(--muted); }
.finish-club .icon { width: 16px; height: 16px; vertical-align: middle; }
.drivers-panel { max-width: 780px; padding: clamp(13px, 2vw, 21px); }
.drivers-panel > p { margin: 8px 0 12px; }
.driver-profile { display: grid; gap: 11px; }
.drivers-self > h2 { margin: 0 0 9px; font: 850 clamp(1.38rem, 3.2vw, 2.15rem)/1.1 var(--display); overflow-wrap: anywhere; }
.driver-level, .driver-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.driver-level .tool-icon { width: 29px; height: 29px; }
.driver-level .icon { width: 17px; height: 17px; }
.driver-car { margin: 0; overflow: hidden; border: 1px solid var(--line); background: #22252b; }
.driver-car .studio-photo { position: relative; aspect-ratio: 2.55; }
.driver-garage-list .studio-number { inset: 5px 5px auto auto; font-size: .69rem; }
.driver-car figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; }
.driver-car figcaption small { display: block; color: var(--muted); }
.driver-garage { margin-top: 12px; border-top: 1px solid var(--line); }
.driver-garage summary { padding: 10px 0; cursor: pointer; font-weight: 720; }
.driver-garage summary span { color: var(--muted); margin-left: 5px; }
.driver-garage-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 7px; }
.driver-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0; }
.driver-stats > div { background: #21262c; border: 1px solid var(--line); padding: 8px; }
.driver-stats dt { font-size: .73rem; color: var(--muted); }
.driver-stats dd { margin: 3px 0 0; font: 800 1.15rem/1 var(--display); }
.driver-profile h3 { font-size: .9rem; }
.driver-actions { margin-top: 6px; }
.driver-actions > span { color: var(--muted); font-size: .82rem; }
.driver-link { display: inline; border: 0; padding: 0; background: none; color: var(--text); font-weight: 720; text-align: left; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: #df896c73; text-underline-offset: 3px; }
.driver-link:hover { color: var(--accent); }
.driver-search { display: flex; align-items: stretch; gap: 8px; }
.driver-search input { width: 100%; min-width: 0; padding: 8px; color: var(--text); border: 1px solid var(--line); background: #14171b; }
.driver-search .button { flex: 0 0 auto; }
.driver-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.duel-pick-terms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-bottom: 8px; font-size: .84rem; }
.duel-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; gap: 8px; padding: 0; margin: 10px 0; }
.duel-choice { display: flex; flex-direction: column; }
.duel-choice-photo { position: relative; aspect-ratio: 2.2; }
.duel-choice-photo .studio-number, .club-leader-photo .studio-number { inset: 6px 6px auto auto; font-size: .73rem; }
.duel-choice-info { display: grid; align-content: space-between; gap: 7px; padding: 8px; flex: 1; }
.duel-choice-info small { display: block; color: var(--muted); overflow-wrap: anywhere; font-size: .74rem; }
.duel-pagination { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.drivers-group + .drivers-group { margin-top: 17px; }
.driver-list { list-style: none; padding: 0; margin: 8px 0 0; }
.driver-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.driver-list > li > div:first-child { flex: 1 1 135px; min-width: 0; }
.driver-list small { display: block; margin-top: 3px; }
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 315px), 1fr)); gap: 10px; }
.inventory-card, .inventory-case { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; }
.inventory-card h2, .inventory-case h2 { font-size: 1rem; line-height: 1.2; margin-bottom: 3px; }
.inventory-card small, .inventory-case small { display: block; font-size: .76rem; }
.inventory-card.gold-part .tool-icon, .inventory-case .tool-icon { color: var(--gold); }
.inventory-case { margin-bottom: 12px; border-color: #735b36; }
.inventory-history { margin-top: 14px; }
.season-rules, .season-prize { color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: 8px; }
.season-prize .plate-chip { margin-right: 5px; }
.leaderboard-tabs + .leaderboard-tabs { margin-top: 2px; }
.module-option .button { flex-shrink: 0; }
.module-description { display: flex; align-items: center; gap: 9px; min-width: 0; }
.module-description .class-tag { margin-top: 4px; padding: 2px 6px; }
.rim-option { flex: 0 0 auto; width: 39px; height: 39px; object-fit: contain; }
.rim-original { display: grid; place-items: center; color: var(--muted); }
.rim-original .icon { width: 29px; height: 29px; }
.build-appearance { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 0 13px; }
.build-appearance small { display: block; margin-top: 3px; }
.appearance-preview { min-height: 112px; padding: 13px 10px; }
.appearance-preview .sprite { width: min(94%, 386px); }
.appearance-group { min-width: 0; border: 0; padding: 0; margin: 0 0 13px; }
.appearance-group legend { padding: 0; margin-bottom: 6px; font-size: .88rem; font-weight: 720; }
.paint-options, .tint-options, .rim-options { display: grid; gap: 5px; }
.paint-options { grid-template-columns: repeat(auto-fit, minmax(114px, 1fr)); }
.tint-options { grid-template-columns: repeat(auto-fit, minmax(87px, 1fr)); }
.rim-options { grid-template-columns: repeat(auto-fit, minmax(102px, 1fr)); }
.appearance-choice { min-height: 42px; display: flex; gap: 6px; align-items: center; padding: 5px 7px; background: #22262c; border: 1px solid var(--line); font-size: .76rem; text-align: left; }
.appearance-choice:hover, .appearance-choice[aria-pressed='true'] { border-color: var(--accent); background: #302724; }
.appearance-choice[aria-pressed='true'] { box-shadow: inset 0 -2px var(--accent); }
.appearance-choice:disabled[aria-pressed='false'] { opacity: .63; cursor: default; }
.appearance-choice small { display: block; margin-top: 2px; color: var(--muted); font-size: .7rem; white-space: nowrap; }
.paint-swatch { display: block; flex: 0 0 19px; aspect-ratio: 1; background: linear-gradient(140deg, #ffffff60, transparent 46%), var(--swatch); border: 1px solid #ffffff3d; }
.paint-factory { background: repeating-linear-gradient(135deg, #474a51 0 4px, #737780 4px 8px); }
.module-option.has-body-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.module-body-preview { grid-column: 1 / -1; display: grid; place-items: center end; padding: 6px 12px 0; }
.module-body-preview .sprite { width: min(100%, 210px); }
.battery { padding: 13px; background: #28252a; border: 1px solid #5c4640; border-radius: 9px; margin-bottom: 12px; }
.battery > div:first-child { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 1.8rem; }
.battery span { color: #ede6e0; font-size: .88rem; }
.cells { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 9px; }
.cells i { height: 12px; border-radius: 2px; background: #3b3f47; }
.cells i.charged { background: var(--accent); }
.energy-shop { margin-top: 13px; }
.energy-shop .panel-head span { color: var(--muted); font-size: .8rem; }
.energy-packs { display: grid; gap: 6px; margin: 8px 0; padding: 0; list-style: none; }
.energy-packs li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); background: #22252b; }
.energy-packs strong { display: flex; gap: 5px; align-items: center; }
.energy-packs .icon { width: 16px; height: 16px; color: var(--accent); }
.toast { z-index: 7; position: fixed; bottom: 20px; right: 20px; width: max-content; max-width: calc(100vw - 40px); background: #2c3230; color: var(--text); border: 1px solid #708c71; border-radius: 10px; padding: 10px 13px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .16s, transform .16s; font-weight: 625; font-size: .89rem; }
.toast.error { background: #432720; border-color: #a85b4e; }
.toast.visible { opacity: 1; transform: none; }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 55vh; color: var(--muted); font-weight: 650; }
.loading .brand-mark { width: 24px; height: 24px; background: center / contain no-repeat url('/assets/night-run-logo.png'); animation: pulse 1.1s alternate infinite; }
.unavailable { padding: 24px; }
.unavailable h1 { font-size: 1.8rem; }
.unavailable p { margin: 12px 0; }
.guest { background: linear-gradient(90deg, #0d131eee, #0d131e85), #12191f url('/assets/pass-winter-hero.jpg') 72% center / cover no-repeat fixed; }
.guest :is(.top, .nav) { display: none; }
.guest .layout { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; min-height: 100dvh; }
.guest .main { width: min(100%, 470px); padding: 18px; }
.login-panel { padding: clamp(18px, 5vw, 32px); background: #191f27f2; border: 1px solid #48545e; border-top: 2px solid var(--accent); }
.login-panel img { width: 58px; height: 58px; object-fit: contain; margin-bottom: 12px; }
.login-panel h1 { font: 850 clamp(2.15rem, 8vw, 3rem)/1.02 var(--display); text-transform: uppercase; }
.login-panel p { margin: 10px 0 0; color: var(--muted); line-height: 1.4; }
.login-panel .login-status { color: #ffb59d; }
.login-buttons { display: grid; gap: 7px; margin: 18px 0 10px; }
.admin-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(126px, 100%), 1fr)); gap: 7px; }
.admin-overview > div { display: grid; gap: 5px; padding: 10px; }
.admin-overview strong { font: 850 1.65rem/1 var(--display); color: var(--accent); }
.admin-panel { min-width: 0; margin-top: 12px; padding: clamp(10px, 2vw, 16px); }
.admin-panel h2 { font: 800 1.22rem/1.15 var(--display); }
.admin-tabs .button[aria-pressed='true'] { background: #362b28; color: var(--accent); }
.admin-panel .table-shell { max-width: 100%; }
.admin-panel th:last-child, .admin-panel td:last-child { white-space: normal; }
.admin-panel td .button { white-space: nowrap; }
.admin-filter { display: flex; gap: 6px; margin-top: 10px; }
.admin-filter input { min-width: 0; flex: 1; padding: 7px 8px; border: 1px solid #434853; background: #22262c; color: var(--text); font: inherit; }
.admin-filter label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.admin-form label[hidden] { display: none; }
.admin-form { margin-top: 10px; }
.admin-block { color: var(--danger); padding-block: 7px; }
.admin-vehicles { margin-block: 9px; }
.admin-roles p, .admin-empty { margin-top: 10px; }
.admin-pagination { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); }

/* Shared side profiles for the showroom, garage and race lanes. */
.sprite { position: relative; isolation: isolate; width: 150px; }
.sprite-render { position: relative; width: 100%; height: auto; }
.sprite i { position: absolute; display: block; }
.sprite-shadow { bottom: 1%; left: 4%; width: 93%; height: 13%; background: #07090bd0; filter: blur(4px); border-radius: 50%; }
.sprite-hub { transform: translate(-50%, -50%); aspect-ratio: 1; border-radius: 50%; overflow: hidden; }
.wheel-face { display: block; width: 100%; height: 100%; border-radius: inherit; background: #202227 var(--rim-art) center / 105% 105% no-repeat; transform: rotate(var(--wheel-angle, 0deg)); }
.rims-original .sprite-hub { display: none; }
.race-sprite .rims-original .sprite-hub { display: block; }
.rims-original .wheel-face { background: var(--car-image) var(--stock-x) var(--stock-y) / var(--stock-size) auto no-repeat; }
.sprite-hub-blended .wheel-face { -webkit-mask-image: radial-gradient(circle closest-side, #000 91%, transparent); mask-image: radial-gradient(circle closest-side, #000 91%, transparent); }
.sprite-refinish, .sprite-tint {
  inset: 0; -webkit-mask: var(--surface-mask) center / 100% 100% no-repeat; mask: var(--surface-mask) center / 100% 100% no-repeat;
}
.sprite-refinish { isolation: isolate; }
.sprite-refinish::before { content: ''; position: absolute; inset: 0; background: var(--car-image) center / 100% 100% no-repeat; filter: brightness(var(--paint-exposure)) saturate(.15); }
.sprite-refinish b {
  position: absolute; inset: 0; background: var(--paint-color); mix-blend-mode: color; opacity: .9;
  -webkit-mask: var(--car-image) center / 100% 100% no-repeat; mask: var(--car-image) center / 100% 100% no-repeat;
}
.sprite-tint { background: #071017; mix-blend-mode: multiply; }
.kit-piece { background: linear-gradient(180deg, #555a62 0 12%, #25282e 29%, #101216 82%, #555960 100%); }
.kit-splitter, .kit-diffuser { background: linear-gradient(180deg, #4a4b4d, #1d2025 44%, #0c0d0f 78%, #54575b); }
.kit-wing { background: linear-gradient(165deg, #777a7e 2%, #43464b 12%, #1b1d21 20%, #282b31 88%, #111214); }
.kit-gold .kit-side, .kit-gold .kit-splitter, .kit-gold .kit-diffuser { background: linear-gradient(180deg, #87704e, #332c23 21%, #111216 77%, #ae8143); }
.kit-gold .kit-wing { background: linear-gradient(165deg, #ad8c52, #42352b 19%, #232124 25%, #241d17); }
.my-sprite { filter: drop-shadow(0 1px 3px #ffa18065); }
.sprite .sprite-smoke { display: none; }
.race-sprite .sprite-smoke { display: block; left: -12%; top: 64%; width: 32%; height: 24%; background: radial-gradient(ellipse at 70% 50%, #bec7d1b3, transparent 70%); filter: blur(2px); opacity: var(--launch-smoke, 0); }
.race-board { background: #181b20; }
.track-head { display: flex; justify-content: space-between; padding: 12px 17px; align-items: center; background: #202329; border-bottom: 1px solid #363a42; }
.track-head > div { display: flex; align-items: center; gap: 10px; }
.track-head strong { font: 850 1.65rem/1 var(--display); font-variant-numeric: tabular-nums; }
.distance { color: var(--accent); }
.distance small { white-space: nowrap; }
.lights { display: flex; gap: 4px; padding: 5px; background: #101218; border-radius: 6px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #40434b; }
[data-lights='1'] .lights i:first-child, [data-lights='2'] .lights i:nth-child(-n+2), [data-lights='3'] .lights i:nth-child(-n+3) { background: #ff674f; box-shadow: 0 0 7px #ff674f83; }
[data-lights='go'] .lights i:last-child { background: var(--positive); box-shadow: 0 0 8px #a7e08b8c; }
.city { position: relative; height: clamp(48px, 8vw, 85px); background: linear-gradient(180deg, #1b2028, #373a44); overflow: hidden; }
.city-back, .city-front { position: absolute; bottom: 0; left: 0; width: 200%; background-repeat: repeat-x; }
.city-back { height: 66%; background-image: repeating-linear-gradient(90deg, #2b313a 0 29px, transparent 29px 35px, #2e303c 35px 67px, transparent 67px 82px, #2b343a 82px 99px, transparent 99px 109px, #292f38 109px 143px, transparent 143px 166px); mask: repeating-linear-gradient(90deg, #000 0 26px, #000 26px 37px, transparent 37px 43px, #000 43px 93px, transparent 93px 96px); }
.city-front { height: 35%; background-image: radial-gradient(ellipse at 16px 3px, #d0e697a6 0 2px, transparent 3px), linear-gradient(#1d2128, #171a20); background-size: 75px 12px, auto; border-top: 1px solid #4e4f58; }
.city-back { transform: translate3d(var(--city-far, 0px), 0, 0); }
.city-front { transform: translate3d(var(--city-near, 0px), 0, 0); }
.track { padding: 0 15px 3px; background: linear-gradient(#2c2f35, #23252b); --sprite-width: clamp(93px, 15vw, 188px); }
.lane { min-height: clamp(65px, 10.5vw, 103px); display: grid; grid-template-columns: minmax(96px, .15fr) minmax(0, 1fr); align-items: stretch; position: relative; border-bottom: 1px solid #555763; }
.lane:last-child { border-bottom: 0; }
.lane-name { position: relative; z-index: 2; display: grid; align-content: center; gap: 4px; padding-right: 7px; background: #25282e; }
.lane-name > strong, .lane-name > span:first-of-type { line-height: 1.1; overflow-wrap: anywhere; }
.lane-name > strong { font-size: .9rem; }
.own-lane .lane-name > strong { color: var(--accent); }
.lane-name > span:first-of-type { font: 700 .68rem/1.1 var(--display); color: var(--muted); }
.lane-name .plate-compact, .lane-name .number-status { justify-self: start; }
.lane-name .plate-compact { font-size: 1.03rem; }
.lane-name .number-status { font-size: .66rem; }
.podium-frame-1 { outline: 2px solid #d5ab4f; outline-offset: 0; }
.podium-frame-2 { outline: 2px solid #9cadca; outline-offset: 0; }
.podium-frame-3 { outline: 2px solid #c4774d; outline-offset: 0; }
.lane-road { isolation: isolate; position: relative; display: grid; align-items: center; overflow: hidden; background: linear-gradient(0deg, #1c1e24 0, #3e414a 48%, #2e3038 75%, #23252d); border-left: 1px solid #5d606b; }
.lane-road::before, .lane-road::after { content: ''; position: absolute; z-index: -1; left: 0; }
.lane-road::before { bottom: 13%; right: -61px; height: 2px; background: repeating-linear-gradient(90deg, #aeb2c08a 0 24px, transparent 24px 61px); transform: translate3d(var(--road-offset, 0px), 0, 0); }
.lane-road::after { bottom: 28%; right: -96px; height: 18%; background: repeating-linear-gradient(90deg, transparent 0 6px, #b6bcc57a 17px, transparent 58px 96px) center 70% / 96px 1px repeat-x; opacity: var(--streak-opacity, 0); transform: translate3d(var(--streak-offset, 0px), 0, 0); }
.lane-run { position: absolute; inset: 0 calc(var(--sprite-width) + 10px) 0 5px; z-index: 1; will-change: transform; }
.race-sprite { position: absolute; bottom: 15%; left: 0; width: var(--sprite-width); }
.race-sprite .sprite { width: 100%; }
.finish-line { position: absolute; z-index: 0; top: 0; bottom: 0; right: 7px; width: 12px; opacity: .54; background: conic-gradient(#dce9cf 25%, #24272d 0 50%, #dce9cf 0 75%, #24272d 0) 0 0/12px 12px; }
.driving-controls { display: grid; gap: 9px; padding: 16px; background: linear-gradient(165deg, #23262c, #191c20); border-top: 1px solid #393e46; }
.shift-head { min-height: 22px; display: flex; justify-content: space-between; gap: 7px; flex-wrap: wrap; }
#shift-feedback { font-size: .84rem; font-weight: 750; }
.rev-gauge { isolation: isolate; position: relative; height: 22px; background: repeating-linear-gradient(90deg, #414650 0 4px, #2e3037 4px 7px); border: 2px solid #17191f; border-radius: 5px; }
.rev-gauge i { position: absolute; inset: 0 auto 0 0; background: #a7e08b9e; border-inline: 1px solid var(--positive); }
.rev-gauge b { position: absolute; z-index: 2; left: 0; top: -3px; bottom: -3px; width: 3px; transform: translateX(-50%); background: #f2ffea; border-radius: 3px; box-shadow: 0 0 8px #f4ffedad; }
.sweet-spot .rev-gauge { box-shadow: 0 0 11px #a7e08b75; }
.phase-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
.phase-list span { text-align: center; font-weight: 700; padding: 3px 1px; min-height: 25px; border: 1px solid #464952; border-radius: 5px; background: #25282f; font-size: .75rem; }
.phase-list .current { border-color: var(--accent); }
.button.drive { min-height: 57px; font-size: 1.1rem; touch-action: manipulation; background: #56403a; border-color: #755044; color: #f4eae6; }
.button.drive:hover:not(:disabled) { background: #64473e; border-color: #a87161; }
.sweet-spot .button.drive:not(:disabled) { background: var(--positive); color: #132113; border-color: var(--positive); }
.button.drive:disabled { background: #282a31; color: #bfc2c9; border-color: #464a53; opacity: .85; }

@media (max-width: 1190px) {
  .layout { grid-template-columns: 174px minmax(0, 1fr); }
  .nav { padding-inline: 9px; }
  .plate-content { grid-template-columns: 1fr; gap: 9px; }
  .plate-box { grid-template-columns: auto 1fr; align-items: center; gap: 9px; }
}
@media (max-width: 950px) {
  .layout { grid-template-columns: 132px minmax(0, 1fr); }
  .nav-link { gap: 7px; padding: 0 8px; font-size: .85rem; }
  .pilot { grid-template-columns: minmax(0, 1fr); }
  .pilot-avatar { display: none; }
  .main { padding-inline: 17px; }
  .garage-grid { grid-template-columns: minmax(0, 1fr) minmax(225px, .54fr); gap: 11px; }
  .tuning, .spec-panel, .plate-panel, .modules-panel { padding: 13px; }
  .tune { gap: 5px; }
  .tune .tool-icon { width: 29px; height: 29px; }
  .tune .tool-icon .icon { width: 16px; height: 16px; }
  .car-stats > div { padding-inline: 6px; }
}
@media (max-width: 760px) {
  :root { --mobile-safe-bottom: max(var(--tg-content-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px)); }
  .top { min-height: 54px; padding-block: calc(4px + var(--tg-content-safe-area-inset-top, env(safe-area-inset-top, 0px))) 4px; padding-right: max(12px, var(--tg-content-safe-area-inset-right, 0px)); padding-left: max(12px, var(--tg-content-safe-area-inset-left, 0px)); }
  .brand { gap: 7px; }
  .brand-mark { width: 33px; height: 33px; }
  .brand-name { max-width: 117px; white-space: normal; text-align: left; line-height: .95; font-size: .87rem; }
  .brand-name span { display: block; }
  .wallets { gap: 5px; }
  .resource { gap: 4px; padding: 6px; height: 34px; font-size: .82rem; }
  .resource .icon { width: 15px; height: 15px; }
  .top .energy { min-height: 44px; }
  .top .effects-button { display: none; }
  .resource-plus { width: 17px; height: 17px; }
  .resource-plus .icon { width: 12px; height: 12px; }
  .layout { display: block; }
  .main { padding: 16px 13px calc(76px + var(--mobile-safe-bottom)); }
  .nav { position: fixed; inset: auto 0 0; z-index: 4; height: auto; padding: 3px max(5px, var(--tg-content-safe-area-inset-right, 0px)) calc(3px + var(--mobile-safe-bottom)) max(5px, var(--tg-content-safe-area-inset-left, 0px)); background: #15171b; border: 0; border-top: 1px solid #383c43; overflow: visible; }
  .nav-links { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; width: min(100%, 560px); margin-inline: auto; }
  .nav-links > .nav-link { display: grid; place-content: center; justify-items: center; gap: 3px; min-height: 51px; padding-inline: 1px; font-size: .72rem; white-space: nowrap; }
  .nav-links > .nav-link:not(.nav-primary, .nav-more) { display: none; }
  .nav-links > .nav-link.selected { box-shadow: inset 0 -2px var(--accent); }
  .nav-tail { display: none; }
  .garage-heading-actions, .race-invite { display: none; }
  .mobile-menu {
    inset: auto 0 0; width: min(100%, 520px); margin: 0 auto; max-height: calc(100dvh - 16px);
    padding: 12px max(12px, var(--tg-content-safe-area-inset-right, 0px)) calc(9px + var(--mobile-safe-bottom)) max(12px, var(--tg-content-safe-area-inset-left, 0px));
    border-radius: 12px 12px 0 0; border-bottom: 0;
  }
  body:has(.mobile-menu[open]) { overflow: hidden; }
  .pass-hero {
    padding: 14px;
    background:
      linear-gradient(180deg, #0c131d38 0%, #0c131d00 24%, #0c131dd9 49%, #0c131d 64%),
      #101924 url('/assets/pass-winter-hero.jpg') 79% top / auto 230px no-repeat;
  }
  .pass-hero-copy { width: 100%; padding-top: 72px; }
  .pass-hero h1 { margin: 6px 0; font-size: clamp(1.95rem, 7.6vw, 3.7rem); text-wrap: initial; }
  .pass-eyebrow { color: #c1eaff; }
  .pass-summary { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pass-progress, .pass-upgrade { padding: 7px; }
  .pass-upgrade strong { font-size: .84rem; }
  .pass-track { --lane-width: 83px; --tier-width: 115px; }
  .pass-track-table .pass-lane { padding: 5px; font-size: .69rem; }
  .pass-rewards .button.compact, .pass-arrow { min-height: 42px; }
  .pass-rewards .pass-prize .button { min-height: 32px; }
  .pass-prize { grid-template-rows: 67px 67px; }
  .pass-arrow { width: 42px; }
  .toast { bottom: calc(67px + var(--mobile-safe-bottom)); }
  .case-layout, .club-grid { grid-template-columns: 1fr; }
  .club-leader-grid { grid-template-columns: 1fr; }
  .club-leader { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; }
  .club-leader-info { flex-wrap: wrap; gap: 4px 8px; }
  .club-leader-score { text-align: left; }
  .hero-image { height: clamp(235px, 54vw, 350px); min-height: 0; }
  .car-stats > div { text-align: center; }
  .page-title { margin-bottom: 14px; }
  .page-title p { font-size: .88rem; margin-top: 6px; }
  .page-title h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .showroom { gap: 8px; }
  .market-detail { padding: 11px; }
}
@media (max-width: 565px) {
  .garage-grid { display: flex; flex-direction: column; }
  .garage-grid > .column { display: contents; }
  .garage-grid > .column > * { width: 100%; }
  .car-hero { order: 0; }
  .owned-strip { order: 1; }
  .spec-panel { order: 2; }
  .tuning { order: 3; }
  .plate-panel { order: 4; }
  .modules-panel { order: 5; }
  .personal-best, .best-panel { order: 6; }
  .tune { min-height: 58px; grid-template-columns: 35px minmax(0, 1fr) auto; }
  .tuning-rows { margin-top: 4px; }
  .hero-caption { padding: 11px; }
  .car-stats span { font-size: .66rem; }
  .showroom { grid-template-columns: 1fr; }
  .market-image { aspect-ratio: 1.95; }
  .race-offers, .daily-grid { grid-template-columns: 1fr; }
  .race-offer { min-height: 0; gap: 12px; padding: 13px; }
  .offer-copy h2 { margin-top: 7px; font-size: 1.45rem; }
  .offer-copy p { font-size: .87rem; }
  .track { padding-inline: 6px; --sprite-width: clamp(91px, 27vw, 128px); }
  .lane { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(64px, 1fr); }
  .lane-name { display: flex; align-items: center; flex-wrap: wrap; padding: 4px 5px; border-bottom: 1px solid var(--line); }
  .lane-name .plate-compact, .lane-name .number-status { margin-left: auto; }
  .lane-name > strong { font-size: .77rem; }
  .lane-name > span:first-of-type { font-size: .59rem; }
  .lane-road { border-left: 0; }
  .track-head { padding-inline: 10px; }
  .driving-controls { padding: 11px; }
  .finish-marks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .league-grid, .plate-lots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plate-lot { padding: 8px; }
  .plate-lot .plate { font-size: 1.62rem; }
  .plate-lot .plate-main { min-width: 83px; }
  .setup-grid { grid-template-columns: minmax(0, 1fr); }
  .setup-forecast { position: static; grid-row: 1; }
  .forecast-time { grid-template-columns: 1fr auto; align-items: baseline; }
  .forecast-time small { grid-column: 1 / -1; }
  .forecast-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 9px; }
  .forecast-stats dt, .forecast-stats dd { font-size: .76rem; }
  .exchange-filters { gap: 8px; }
  .exchange-filters label:has(select) { flex: 1 0 40%; }
  .desktop-link { min-height: 36px; padding: 5px 7px; font-size: .78rem; }
  .desktop-link .icon { display: none; }
}
@media (max-width: 360px) {
  .top .brand-name { display: none; }
  .nav-links > .nav-link { font-size: .67rem; }
  .hero-caption .button { min-width: 0; padding-inline: 8px; }
  .hero-caption .button .icon { display: none; }
  .pass-inventory .icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .wheel-face { transform: none; }
  .city-front, .city-back, .lane-road::before { transform: none; }
  .tutorial-drive .lane-run { transform: none !important; }
  .lane-road::after, .race-sprite .sprite-smoke { opacity: 0; }
}
