/* Hunt Racers neon look: the STORE screen, the lobby's car platform card, the restyled GP Pass
   and the race HORN button. Dark panels, glowing neon edges; rarity colours: common grey, rare
   blue, epic purple, legendary gold. Uses tokens.css. */
:root { --neo-bg: #0b0816; --neo-panel: #140f26; --neo-panel-2: #1c1534; --neo-pink: #ff3fa4; --neo-cyan: #38f2ff; --neo-violet: #a64dff;
  --r-common: #a9a3b8; --r-rare: #3a9bff; --r-epic: #b45cff; --r-legendary: #ffc42e; }

/* ---------------------------------------------------------------- store screen */
.store-screen { background: radial-gradient(ellipse at 30% 20%, #2a1450 0%, #120a26 55%, #07050f 100%); padding-bottom: 0; }
.store-screen .ui-head { margin-bottom: 6px; }
.store-screen .ui-head .title { color: #fff; text-shadow: 0 0 10px var(--neo-pink), 0 0 2px var(--neo-pink); }
.st-curs { display: flex; gap: 6px; }
.st-curs .cur { position: relative; display: flex; align-items: center; gap: 4px; background: rgba(18,9,30,.85); border: 3px solid var(--ink); border-radius: 8px; padding: 2px 8px; font-family: var(--font); font-size: max(var(--t-sm), calc(var(--u) * 2)); color: #fff; }
.st-curs .cur b { font-weight: 400; } .st-curs .cur small { font-size: var(--t-xs); color: var(--text-dim); }
.st-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(230px, 40%) minmax(0, 1fr); gap: calc(var(--u) * 1.4); }
.st-stage, .st-shop { min-height: 0; background: rgba(20,15,38,.92); border: 2px solid rgba(255,63,164,.65); border-radius: 14px; box-shadow: 0 0 14px rgba(255,63,164,.25), inset 0 0 22px rgba(56,242,255,.06); }
.st-stage { display: flex; flex-direction: column; overflow: hidden; }
.st-cvwrap { position: relative; flex: 1; min-height: 60px; background: radial-gradient(ellipse at 50% 70%, rgba(166,77,255,.22), rgba(0,0,0,0) 65%); }
.st-cvwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-try { position: absolute; left: 8px; top: 8px; font: 400 var(--t-xs) var(--font); color: var(--ink); background: var(--neo-cyan); border-radius: 999px; padding: 2px 8px; box-shadow: 0 0 10px var(--neo-cyan); }
.st-try[hidden] { display: none; }
.st-carrow { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px; }
.st-arrow { width: var(--tap); height: var(--tap); flex: none; border: 2px solid rgba(56,242,255,.7); border-radius: 12px; background: var(--neo-panel-2); color: #fff; font: 400 26px/1 var(--font); cursor: pointer; padding: 0 0 3px; box-shadow: 0 0 8px rgba(56,242,255,.3); }
.st-carname { flex: 1; min-width: 0; text-align: center; font: 400 max(var(--t-sm), calc(var(--u) * 2.6)) var(--font); color: #fff; letter-spacing: .08em; text-shadow: 0 0 8px var(--neo-cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the action bar: pinned at the bottom of the preview, never inside the scrolling cards */
.st-act { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 8px 8px; background: rgba(7,5,15,.85); border-top: 2px solid rgba(255,63,164,.45); }
.st-info { min-width: 0; display: flex; flex-direction: column; line-height: 1.1; font-family: var(--font); }
.st-info b { font-weight: 400; color: #fff; font-size: max(var(--t-sm), calc(var(--u) * 1.9)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-rar { font-size: var(--t-xs); color: var(--text-dim); letter-spacing: .06em; }
.st-rar.r-common { color: var(--r-common); } .st-rar.r-rare { color: var(--r-rare); } .st-rar.r-epic { color: var(--r-epic); } .st-rar.r-legendary { color: var(--r-legendary); }
.st-price { display: flex; align-items: center; gap: 4px; font: 400 max(var(--t-sm), calc(var(--u) * 2)) var(--font); color: #fff; white-space: nowrap; }
.st-price b, .st-cost b { font-weight: 400; } .st-price s, .st-cost s { color: var(--text-dim); font-size: var(--t-xs); }
.st-buy { min-height: var(--tap); min-width: 96px; position: relative; z-index: 1; }
.st-buy.off { filter: grayscale(.7) brightness(.75); cursor: default; }
.btn.gold.st-buy { color: var(--ink); -webkit-text-stroke: 0; }

.st-shop { display: flex; flex-direction: column; overflow: hidden; padding: 6px; gap: 6px; }
.st-tabs { flex: none; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 2px; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab { flex: none; min-height: var(--tap); padding: 0 12px; border: 2px solid rgba(166,77,255,.55); border-radius: 10px; background: var(--neo-panel-2); color: #d9ccff; font: 400 max(var(--t-sm), calc(var(--u) * 1.7)) var(--font); letter-spacing: .04em; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.st-tab.on { color: #fff; border-color: var(--neo-pink); background: linear-gradient(#3a1747, #22102f); box-shadow: 0 0 10px rgba(255,63,164,.55); }
.st-new { width: 8px; height: 8px; border-radius: 50%; background: var(--neo-cyan); box-shadow: 0 0 6px var(--neo-cyan); }
.st-dhead { flex: none; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; padding: 2px 6px; font-family: var(--font); color: #fff; }
.st-dhead[hidden] { display: none; }
.st-dhead b { font-weight: 400; font-size: max(var(--t-sm), calc(var(--u) * 2)); color: var(--r-legendary); text-shadow: 0 0 8px rgba(255,196,46,.6); }
.st-dhead span { font-size: max(var(--t-xs), calc(var(--u) * 1.5)); color: var(--text-dim); }
.st-dhead time { color: var(--neo-cyan); font-variant-numeric: tabular-nums; }
.st-grid { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: min-content; gap: 8px; padding: 4px 4px 10px; align-content: start; }
.st-grid[data-tab="cars"] { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.st-card { --rc: var(--r-common); position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 120px; padding: 6px 6px 0; border: 2px solid var(--rc); border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 22%, var(--neo-panel)) 0%, var(--neo-panel) 70%); color: #fff; font-family: var(--font); cursor: pointer; text-align: center; overflow: hidden; box-shadow: 0 0 8px color-mix(in srgb, var(--rc) 35%, transparent); }
.st-card.r-rare { --rc: var(--r-rare); } .st-card.r-epic { --rc: var(--r-epic); } .st-card.r-legendary { --rc: var(--r-legendary); }
.st-card.sel { outline: 3px solid #fff; outline-offset: 1px; box-shadow: 0 0 16px var(--rc); }
.st-art { height: 46px; display: grid; place-items: center; }
.st-svg { height: 42px; width: auto; max-width: 100%; filter: drop-shadow(0 0 4px rgba(255,255,255,.25)); }
.st-svg.anim { animation: st-pulse 1.6s ease-in-out infinite; }
@keyframes st-pulse { 0%, 100% { filter: drop-shadow(0 0 2px rgba(255,255,255,.3)); } 50% { filter: drop-shadow(0 0 9px rgba(255,255,255,.9)); } }
body.reduce-flash .st-svg.anim { animation: none; }
.st-glow { position: relative; width: 70px; height: 34px; }
.st-glow i { position: absolute; inset: 4px 6px; border-radius: 50%; background: radial-gradient(closest-side, var(--c), transparent); }
.st-glow.twin i:first-child { inset: 4px 34px 4px 4px; } .st-glow.twin i:last-child { inset: 4px 4px 4px 34px; }
.st-glow.mist i { filter: blur(3px); } .st-glow.mist i:last-child { inset: 0 16px; opacity: .6; }
.st-glow.pool i:last-child { display: none; }
.st-stock { font-size: 26px; opacity: .55; }
.st-nm { font-size: max(var(--t-sm), calc(var(--u) * 1.7)); line-height: 1.1; }
.st-tag { font-size: var(--t-xs); color: color-mix(in srgb, var(--rc) 70%, #fff); letter-spacing: .03em; line-height: 1.15; }
.st-stats { display: grid; grid-template-columns: auto 1fr; gap: 1px 6px; align-items: center; text-align: left; font-size: var(--t-xs); color: var(--text-dim); }
.st-stats i { height: 6px; border-radius: 3px; background: #2a2340; overflow: hidden; } .st-stats i b { display: block; height: 100%; background: linear-gradient(90deg, var(--neo-cyan), var(--neo-pink)); }
.st-strip { margin: auto -6px 0; min-height: 26px; display: flex; align-items: center; justify-content: center; gap: 4px; background: rgba(0,0,0,.45); border-top: 1px solid color-mix(in srgb, var(--rc) 60%, transparent); font-size: max(var(--t-sm), calc(var(--u) * 1.6)); }
.st-cost { display: flex; align-items: center; gap: 4px; }
.st-badge { font-size: var(--t-xs); padding: 1px 8px; border-radius: 999px; letter-spacing: .05em; }
.st-badge.own { background: #2b2346; color: #d9ccff; border: 1px solid #6b5aa8; }
.st-badge.on { background: var(--green); color: var(--ink); box-shadow: 0 0 8px var(--green); }
.st-foot { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 18px; padding: 2px 0 max(2px, env(safe-area-inset-bottom)); }
.st-note { font: 400 var(--t-xs) var(--font-ui); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.st-credit { flex: none; font: 400 11px var(--font); color: var(--gold); text-shadow: 0 1px 0 var(--ink), 0 0 3px var(--ink); white-space: nowrap; }
@media (orientation: portrait) {
  .st-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(190px, 42%) minmax(0, 1fr); }
  .st-note { display: none; } .st-foot { justify-content: flex-end; }
}
@media (max-height: 420px) and (orientation: landscape) {
  .store-screen .ui-head .title { font-size: calc(var(--u) * 3.4); }
  .st-card { min-height: 108px; } .st-art { height: 38px; } .st-svg { height: 34px; }
}

/* ---------------------------------------------------------------- lobby (racing): STORE tab, neon car card */
#lobby.racing .tabbtn#rail_store { background: linear-gradient(#d0247e, #8a1556); box-shadow: inset 0 0 12px rgba(255,63,164,.8); }
#lobby.racing .tabbtn#rail_store.on { background: linear-gradient(#ff4fb4, #c41c78); }
#lobby.racing .tabbtn#rail_store .tabchip { background: var(--neo-cyan); }
#lobby.racing .slot.me { background: radial-gradient(ellipse at 50% 70%, #24124a, #0d0a1c 75%); border-color: #07050f; box-shadow: var(--drop), inset 0 0 0 2px var(--car-neon, var(--neo-cyan)), 0 0 14px color-mix(in srgb, var(--car-neon, var(--neo-cyan)) 45%, transparent); }
#lobby.racing .np-name { letter-spacing: .06em; text-shadow: 0 0 8px var(--car-neon, var(--neo-cyan)); }
/* driver select (racing): dark cards with a glowing edge in each car's neon, stat bars in that neon */
.grid-cards.drivers .dcard { background: radial-gradient(ellipse at 50% 22%, #24124a, #0d0a1c 70%); border-color: #07050f; box-shadow: var(--drop), inset 0 0 0 2px var(--card-col), 0 0 12px color-mix(in srgb, var(--card-col) 45%, transparent); }
.grid-cards.drivers .dcard .bc-name { color: #fff; text-shadow: 0 0 8px var(--card-col); }
.grid-cards.drivers .dcard .dc-car { color: var(--card-col); }
.grid-cards.drivers .dcard .dc-stats i { background: #2a2340; } .grid-cards.drivers .dcard .dc-stats b { background: var(--card-col); }
.detail.driver .card-b { background: radial-gradient(ellipse at 30% 30%, #24124a, #0d0a1c 75%); box-shadow: var(--drop), inset 0 0 0 2px var(--card-col), 0 0 14px color-mix(in srgb, var(--card-col) 45%, transparent); }
.ui-screen.neon .tier { padding: 4px; }

/* ---------------------------------------------------------------- GP Pass, neon (racing) */
.ui-screen.neon { background: radial-gradient(ellipse at 30% 20%, #2a1450 0%, #120a26 55%, #07050f 100%); }
.ui-screen.neon .ui-head .title { color: #fff; text-shadow: 0 0 10px var(--r-legendary), 0 0 2px var(--r-legendary); }
.ui-screen.neon .pass-top .bar { background: #140f26; border-color: #07050f; box-shadow: 0 0 10px rgba(255,196,46,.35); }
.ui-screen.neon .pass-top .bar i { background: linear-gradient(90deg, var(--neo-cyan), var(--neo-pink)); border-right: 0; }
.ui-screen.neon .tier { background: rgba(20,15,38,.92); border: 2px solid rgba(166,77,255,.45); border-radius: 12px; }
.ui-screen.neon .tier.reached { border-color: var(--neo-cyan); box-shadow: 0 0 10px rgba(56,242,255,.45); }
.ui-screen.neon .tier .num { color: #fff; text-shadow: 0 0 6px var(--neo-pink); }
.ui-screen.neon .tier.reached .num { text-shadow: 0 0 8px var(--neo-cyan); }
.ui-screen.neon .rw { background: var(--neo-panel-2); border: 2px solid rgba(255,63,164,.5); color: #fff; box-shadow: none; }
.ui-screen.neon .rw.premium { border-color: rgba(255,196,46,.7); box-shadow: inset 0 0 12px rgba(255,196,46,.18); }
.ui-screen.neon .rw.got { border-color: var(--green); box-shadow: 0 0 8px rgba(75,224,110,.5); }
.ui-screen.neon .rw.locked { opacity: .65; }
.ui-screen.neon .track { scrollbar-color: var(--neo-pink) #140f26; }

/* ---------------------------------------------------------------- race HORN button (beside the pause button) */
.rc-horn { position: absolute; z-index: 5; left: -100px; top: 0; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #12091e; background: rgba(27,16,51,.75); color: #fff; padding: 9px; cursor: pointer; touch-action: none; box-shadow: 0 0 8px rgba(56,242,255,.45); } /* left/top: horn.js, beside the pause button */
.rc-horn[hidden] { display: none; }
.rc-horn svg { width: 100%; height: 100%; display: block; }
.rc-horn.cd { opacity: .5; }
/* unlockable cars: a locked car's progress toward unlocking */
.st-lockp { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: #d9ccff; }
.st-lockp i { display: block; width: 46px; height: 7px; border-radius: 4px; background: #1a1330; border: 1px solid #4a3d78; overflow: hidden; }
.st-lockp.wide { max-width: 100%; white-space: normal; } .st-lockp.wide i { flex: 0 0 60px; }
.st-lockp b { display: block; height: 100%; background: var(--rc, var(--r-epic)); }
