/* «Бешеные горки»: гонка, HUD, окна. Палитра — небо, огонь, лайм, фуксия; объём: блик сверху, тёмная кромка снизу. */
body { background: linear-gradient(#2fb4ff, #9fe3ff 55%, #46d43a 55%, #2e9a27); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #fff; }
#scr-menu { background: #2fb4ff; }
#scr-game { background: #2fb4ff; }
#cv { position: absolute; left: 0; top: 0; display: block; touch-action: none; }
.btn { min-height: 42px; padding: 0 16px; border: 3px solid #14161a; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 900; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 4px 0 #0a0b0e; }
.btn * { pointer-events: none; }
.btn:active { transform: translateY(3px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 1px 0 #0a0b0e; }
.btn.sm { min-height: 40px; font-size: 13px; padding: 0 10px; }
.b-orange { background: linear-gradient(#ffd23a, #ff6a12); }
.b-green { background: linear-gradient(#8df27a, #1f9e2c); }
.b-blue { background: linear-gradient(#8fd8ff, #1877d8); }
.b-grey { background: linear-gradient(#a8aeb8, #4a505a); }
.b-pink { background: linear-gradient(#ff9ad8, #c42a8a); }
.btn-icon { width: 44px; height: 44px; border: 3px solid #14161a; border-radius: 12px; color: #fff; background: linear-gradient(#5a606c, #2a2f3a); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 #0a0b0e; }
.cn { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; color: #ffe14a; text-shadow: 0 1px 2px #000; }
.btn .cn { color: #fff; }
/* ---------- HUD ---------- */
.hud { pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; left: 8px; right: 8px; top: 6px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-race { flex: 1; display: flex; align-items: center; gap: 10px; }
.hud-place { min-width: 58px; height: 42px; padding: 0 8px; border-radius: 12px; background: linear-gradient(#ffd23a, #ff6a12); border: 3px solid #14161a; color: #fff; font-size: 26px; font-weight: 900;
  display: flex; align-items: baseline; justify-content: center; text-shadow: 0 2px 0 #7a1a00; box-shadow: 0 3px 0 #0a0b0e; }
.hud-place small { font-size: 14px; }
.hud-prog { position: relative; flex: 1; height: 14px; border-radius: 7px; background: rgba(20, 22, 26, .65); border: 2px solid #14161a; }
.hud-prog .flag { position: absolute; right: -4px; top: -6px; width: 16px; height: 22px; background: repeating-conic-gradient(#fff 0 25%, #14161a 0 50%) 0 0 / 8px 8px; border: 2px solid #14161a; }
.dot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #14161a; display: none; }
.d1 { background: #ff3b2f; } .d2 { background: #1e90ff; } .d3 { background: #7ee836; } .d4 { background: #ffcc12; } .d5 { background: #ff5ab4; }
.hud-time { min-width: 52px; font-size: 18px; font-weight: 900; text-shadow: 0 2px 0 #14161a, 0 0 4px #000; }
.hud-coins { display: flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 6px; border-radius: 18px; background: rgba(20, 22, 26, .7); border: 2px solid #14161a; font-size: 18px; font-weight: 900; color: #ffe14a; }
.hud-fuel { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 18px; text-shadow: 0 2px 0 #14161a; }
.fuelbox { width: 160px; height: 16px; border-radius: 8px; background: rgba(20, 22, 26, .65); border: 2px solid #14161a; overflow: hidden; }
.fuelbox b { display: block; height: 100%; background: linear-gradient(#8df27a, #1f9e2c); transform-origin: 0 50%; }
.fuelbox b.low { background: linear-gradient(#ff8a6a, #c41a0e); }
.hud-count { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%) scale(.5); opacity: 0; font-size: 110px; font-weight: 900; color: #ffe14a; pointer-events: none;
  text-shadow: 0 6px 0 #a8160e, 0 10px 0 #3a0a00, 0 14px 20px rgba(0, 0, 0, .5); transition: transform .2s, opacity .2s; }
.hud-count.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hud-count.go { color: #8df27a; text-shadow: 0 6px 0 #1a6a10, 0 10px 0 #0a3a00; }
.hud-hint { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); padding: 8px 16px; border-radius: 12px; background: rgba(20, 22, 26, .85); border: 2px solid #ffe14a; font-size: 16px; font-weight: 800;
  opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; }
.hud-hint.show { opacity: 1; }
.ctrl-group { position: absolute; bottom: 10px; display: flex; align-items: flex-end; gap: 10px; }
.cg-left { left: 10px; transform-origin: 0 100%; }
.cg-right { right: 10px; transform-origin: 100% 100%; }
.pedal { width: 104px; height: 120px; border-radius: 22px; border: 4px solid #14161a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-weight: 900; font-size: 14px; touch-action: none; user-select: none; box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35), 0 6px 0 #0a0b0e; opacity: .9; }
.pedal * { pointer-events: none; }
.pedal.gas { background: linear-gradient(#8df27a, #1f9e2c); }
.pedal.brake { background: linear-gradient(#ff8a6a, #c41a0e); }
.pedal.jump { background: linear-gradient(#9ad8ff, #2a6ae8); }
.cg-left { display: flex; align-items: flex-end; gap: 10px; }
.pedal.sm { width: 88px; height: 96px; }
.pedal.on { transform: translateY(5px) scale(.97); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35), 0 1px 0 #0a0b0e; filter: brightness(1.15); }
.items { display: flex; flex-direction: column-reverse; gap: 8px; }
.itbtn { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 3px solid #14161a; background: radial-gradient(circle at 35% 25%, #fff, #c8d0e0 70%); display: flex; align-items: center; justify-content: center;
  touch-action: none; box-shadow: 0 4px 0 #0a0b0e; }
.itbtn * { pointer-events: none; }
.itbtn i { position: absolute; right: -6px; bottom: -4px; min-width: 22px; height: 22px; border-radius: 11px; background: #ff2a4a; border: 2px solid #fff; font-style: normal; font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.itbtn.empty { opacity: .4; }
.itbtn:active { transform: translateY(3px); }
.lobby { position: absolute; left: 50%; top: 50%; width: 440px; margin: -150px 0 0 -220px; padding: 14px 18px; border-radius: 18px; background: rgba(20, 22, 26, .88); border: 4px solid #ffd23a;
  display: none; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.lobby.show { display: flex; }
.lb-title { font-size: 24px; font-weight: 900; color: #ffe14a; }
.lb-track { font-size: 14px; color: #9fe3ff; font-weight: 800; }
.lb-slots { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ls { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #8a909a; font-size: 14px; font-weight: 800; overflow: hidden; white-space: nowrap; }
.ls.on { color: #fff; background: rgba(255, 255, 255, .18); }
.ls b { position: relative; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #14161a; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; text-shadow: 0 1px 2px #000; }
.ls b img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ls small { color: #9fe3ff; }
.ls .rd { margin-left: auto; padding: 1px 6px; border-radius: 6px; background: #2fbf3a; color: #fff; font-style: normal; font-size: 11px; }
#lobby-ready.off { filter: grayscale(.7); }
.acc-body { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 14px; line-height: 1.35; }
.acc-body p { margin: 0 0 4px; }
.acc-ava { position: relative; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(#ff7a3a, #d4280f); border: 3px solid #ffb21a; color: #fff; font-size: 26px; font-weight: 900; }
.acc-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ya-btn { display: flex; align-items: center; gap: 10px; background: #000; color: #fff; }
.ya-btn i { width: 26px; height: 26px; border-radius: 50%; background: #fc3f1d; color: #fff; font-style: normal; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.hud-room { align-self: center; padding: 3px 8px; border-radius: 8px; background: rgba(20, 22, 26, .7); color: #ffe14a; font-size: 12px; font-weight: 900; white-space: nowrap; }
.hud-room:empty { display: none; }
.lb-left { font-size: 13px; color: #d0d4dc; }
.lb-left b { color: #ffe14a; font-size: 18px; }
.lb-btns { display: flex; gap: 10px; }
/* ---------- окна ---------- */
.overlay { background: rgba(8, 20, 40, .62); }
.panel { width: 640px; padding: 14px 16px 16px; border-radius: 20px; background: linear-gradient(#2a3f6a, #16233f); border: 4px solid #14161a;
  box-shadow: 0 0 0 4px #ffd23a, 0 0 0 7px #14161a, 0 16px 30px rgba(0, 0, 0, .5); animation: pin .22s ease-out; }
@keyframes pin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.p-small { width: 320px; align-items: stretch; }
.p-lb { width: 420px; }
.panel-title { font-size: 24px; font-weight: 900; text-align: center; color: #ffe14a; text-shadow: 0 3px 0 #a8160e, 0 4px 6px rgba(0, 0, 0, .5); }
.x-close { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #14161a; background: linear-gradient(#ff8a6a, #c41a0e); box-shadow: 0 3px 0 #0a0b0e; z-index: 2; }
.x-close::before, .x-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 4px; margin: -2px 0 0 -9px; background: #fff; border-radius: 2px; transform: rotate(45deg); }
.x-close::after { transform: rotate(-45deg); }
.tabs { display: flex; gap: 6px; justify-content: center; }
.tab { min-height: 40px; padding: 0 16px; border-radius: 12px 12px 4px 4px; border: 3px solid #14161a; background: linear-gradient(#5a606c, #2a2f3a); color: #d0d4dc; font: inherit; font-size: 14px; font-weight: 900; }
.tab.on { background: linear-gradient(#ffd23a, #ff6a12); color: #fff; text-shadow: 0 1px 2px #7a1a00; }
.tabc { display: none; }
.tabc.on { display: block; }
.list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; padding: 4px; }
.list.grid { display: grid; grid-template-columns: 1fr 1fr; }
.card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 14px; background: linear-gradient(#3a5590, #22355e); border: 3px solid #14161a; text-align: center; }
.card b { font-size: 15px; }
.card small { font-size: 11px; color: #c8d4ec; line-height: 1.25; }
.card.sel { border-color: #ffd23a; box-shadow: 0 0 0 2px #ffd23a; }
.card.lock { filter: saturate(.4) brightness(.8); }
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 10px; border-radius: 8px; background: rgba(0, 0, 0, .35); font-size: 12px; font-weight: 900; color: #d0d4dc; }
.tag.on { background: #1f9e2c; color: #fff; }
.hint { padding: 6px; font-size: 12px; color: #9fb4dc; text-align: center; }
.row { display: grid; grid-template-columns: 1fr 120px 100px auto; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 13px; }
.row b { font-size: 14px; }
.row em { font-style: normal; color: #c8d4ec; font-size: 12px; }
.row.done { background: rgba(31, 158, 44, .3); }
.pips { height: 12px; border-radius: 6px; background: rgba(0, 0, 0, .5); overflow: hidden; border: 1px solid #14161a; }
.pips i { display: block; height: 100%; background: linear-gradient(#ffe14a, #ff8a1a); transform-origin: 0 50%; }
/* гараж */
.p-big { width: 660px; }
.gar { display: flex; gap: 12px; }
/* гараж — в стиле приборной панели меню: тёмный бокс, янтарные цифры, сегментные шкалы */
.gar-l { width: 250px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
#gar-prev { width: 250px; height: 136px; border-radius: 14px; border: 3px solid #0a0b0e;
  background: linear-gradient(transparent 70%, rgba(255, 178, 26, .18) 71%, transparent 73%), radial-gradient(ellipse at 50% 85%, #3a4252 0, #16181d 70%);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .7), 0 0 0 2px #c9d1dc; }
.gar-name { margin-top: -18px; align-self: center; position: relative; padding: 3px 16px; border-radius: 10px; background: #14161a; border: 2px solid #ffb21a;
  font-size: 14px; font-weight: 900; color: #ffe14a; text-align: center; white-space: nowrap; }
.gar-pw { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: #0f1116; border: 2px solid rgba(255, 255, 255, .1); }
.pw-n { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pw-n small { font-size: 9px; letter-spacing: 1px; color: #8fa0b5; }
.pw-n b { font-size: 26px; color: #ffb21a; font-variant-numeric: tabular-nums; text-shadow: 0 0 8px rgba(255, 178, 26, .55); }
.pw-r { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pw-r i { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.pw-r i b { display: block; height: 100%; background: linear-gradient(90deg, #ffd23a, #ff8a1a); transform-origin: 0 50%; box-shadow: 0 0 6px #ffb21a; }
.pw-r span { font-size: 11px; color: #c8d4ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gar-stats { display: flex; flex-direction: column; gap: 4px; padding: 0 2px; }
.gar-stats div { display: grid; grid-template-columns: 76px 1fr; align-items: center; font-size: 12px; font-weight: 800; color: #e8eef5; }
.seg { display: flex; gap: 2px; }
.seg b { flex: 1; height: 9px; border-radius: 2px; background: rgba(255, 255, 255, .1); }
.seg b.on { background: #7ee836; box-shadow: 0 0 4px rgba(126, 232, 54, .6); }
.seg b.on:nth-child(n+5) { background: #ffd23a; box-shadow: 0 0 4px rgba(255, 210, 58, .6); }
.seg b.on:nth-child(n+8) { background: #ff6a1a; box-shadow: 0 0 4px rgba(255, 106, 26, .6); }
.gar-r { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
#gar-list { display: grid; grid-template-columns: 1fr 1fr; }
.card.car img { width: 150px; height: 82px; object-fit: contain; pointer-events: none; }
.tune .row { grid-template-columns: 82px 1fr auto; }
.tu-m { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tu-m em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pips { display: flex; gap: 2px; }
.pips b { flex: 1; height: 10px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.pips b:nth-child(5n) { margin-right: 4px; } .pips b:last-child { margin-right: 0; }
.pips.u-eng b.on { background: #ff8a3a; } .pips.u-tire b.on { background: #c8d0dc; } .pips.u-susp b.on { background: #4fa8ff; } .pips.u-armor b.on { background: #a0a8b4; }
.pips b.on { box-shadow: 0 0 4px rgba(255, 255, 255, .35); }
.ut { padding: 4px 8px; border-radius: 8px; text-align: center; font-size: 13px; }
.ut.u-eng { background: #e8501a; } .ut.u-tire { background: #3a3f4a; } .ut.u-susp { background: #1877d8; } .ut.u-armor { background: #6a707c; }
.sw { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.sw.on { background: rgba(255, 210, 58, .25); }
.sw.fl img { width: 42px; height: 28px; border-radius: 3px; border: 2px solid #14161a; flex-shrink: 0; pointer-events: none; }
.sw i.fl-none { width: 42px; height: 28px; border-radius: 3px; border: 2px dashed #8a909a; flex-shrink: 0; }
.sw i { width: 36px; height: 36px; border-radius: 10px; border: 3px solid; flex-shrink: 0; }
.sw b { flex: 1; font-size: 13px; text-align: left; }
/* трассы */
.trk { display: flex; gap: 10px; padding: 6px 4px; }
.card.trk { flex: 0 0 168px; white-space: normal; }
.thumb { position: relative; width: 150px; height: 74px; border-radius: 10px; border: 3px solid #14161a; }
.thumb .stars { position: absolute; left: 4px; bottom: 2px; display: flex; }
.thumb .stars svg { opacity: .3; } .thumb .stars svg.on { opacity: 1; }
.ev { position: absolute; right: -6px; top: -8px; padding: 2px 8px; border-radius: 8px; background: #ff2a4a; border: 2px solid #fff; font-style: normal; font-size: 11px; font-weight: 900; transform: rotate(6deg); }
.card.trk .btn { width: 100%; }
/* магазин */
.loadout { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 900; }
.slot { position: relative; width: 58px; height: 58px; border-radius: 14px; border: 3px dashed #ffd23a; background: rgba(0, 0, 0, .3); color: #fff; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slot * { pointer-events: none; }
.slot small { font-size: 11px; }
.slot.lock { border-color: #6a707c; }
.qmark { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #14161a; background: linear-gradient(#8fd8ff, #1877d8); color: #fff; font: inherit; font-size: 20px; font-weight: 900; }
.shop .card { padding: 6px; }
.card.item em { font-style: normal; font-size: 12px; color: #ffe14a; }
.two { display: flex; gap: 6px; }
/* дорога */
.league { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 900; }
.league b { padding: 6px 14px; border-radius: 10px; border: 3px solid #14161a; color: #14161a; }
.league span { display: flex; align-items: center; gap: 4px; }
.road { display: flex; gap: 8px; padding: 8px 4px; }
.node { flex: 0 0 88px; min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 4px; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 3px solid #14161a; font-size: 12px; font-weight: 800; white-space: normal; }
.node em { font-style: normal; color: #ffe14a; font-size: 14px; }
.node > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.node.reach { background: rgba(255, 210, 58, .18); }
.node.got { opacity: .55; }
.node.ready { border-color: #ffd23a; animation: m3pulse 1s infinite; }
.pc { display: inline-block; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #14161a; vertical-align: middle; margin-right: 4px; }
/* сундук, подсказка */
.chest { align-items: center; }
.chest-ico { animation: shake .6s ease-in-out 2; }
@keyframes shake { 25% { transform: rotate(-6deg) scale(1.05); } 75% { transform: rotate(6deg) scale(1.05); } }
.chest-list { display: flex; flex-direction: column; gap: 4px; align-items: center; font-weight: 900; font-size: 16px; }
.chest-list div { display: flex; align-items: center; gap: 6px; }
.help-text { font-size: 15px; line-height: 1.4; text-align: center; color: #e0e8f8; }
/* итоги */
.p-res { width: 640px; }
.res-head { display: flex; align-items: center; justify-content: center; gap: 14px; }
.res-medal { position: relative; display: flex; }
.res-badge { position: relative; }
/* ---------- плашка победы (класс .vic): салют, конфетти, флаги, лампочки, блик по заголовку ---------- */
.vic-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: none; pointer-events: none; z-index: 0; }
.vic-cv.front { z-index: 2; }
.vic .vic-cv { display: block; }
.p-res { position: relative; z-index: 1; }
.vic-flag { display: none; width: 84px; height: 64px; flex-shrink: 0; }
.vic .vic-flag { display: block; }
.vic-rays { display: none; position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 210, 58, .7) 0 9deg, rgba(255, 210, 58, 0) 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 28%, transparent 70%); mask: radial-gradient(circle, #000 28%, transparent 70%); animation: vicspin 7s linear infinite; }
.vic .vic-rays { display: block; }
.vic-strip { display: none; height: 10px; margin: 4px 0 6px; border-radius: 3px; border: 2px solid #14161a;
  background: repeating-conic-gradient(#14161a 0 25%, #f4f6fa 0 50%) 0 0 / 12px 12px; animation: vicstrip .7s linear infinite; }
.vic .vic-strip { display: block; }
.vic .p-res { border-color: #ffd23a; background: linear-gradient(rgba(58, 42, 106, .8), rgba(26, 22, 64, .84) 60%, rgba(22, 35, 63, .88));   /* салют светится сквозь плашку */
  animation: vicpop .75s cubic-bezier(.2, 1.6, .4, 1) both, vicglow 1.1s ease-in-out .75s infinite; }
.vic .p-res::after { content: ""; position: absolute; inset: 3px; border-radius: 16px; padding: 9px; pointer-events: none;   /* гирлянда лампочек внутри рамки, бежит */
  background: radial-gradient(circle, #ffffff 0 2px, #fff2a0 3px, #ffb21a 4.2px, rgba(255, 178, 26, .35) 5.5px, rgba(255, 178, 26, 0) 8px) 0 0 / 20px 20px;
  filter: drop-shadow(0 0 3px #ffd23a);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: vicbulb .45s steps(2) infinite; }
.vic #res-title { font-size: 42px; letter-spacing: 2px; color: transparent; -webkit-text-fill-color: transparent; text-shadow: none;
  background: linear-gradient(100deg, #ffb21a 0 38%, #fffbe0 47%, #ffffff 50%, #fffbe0 53%, #ffb21a 62% 100%) 0 0 / 260% 100%; -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 3px 0 #a8160e) drop-shadow(0 0 10px rgba(255, 210, 58, .75)); animation: vicshine 1.8s linear infinite, vicbeat 1.1s ease-in-out infinite; }
.vic .res-badge.p1 { animation: vicbeat 1.1s ease-in-out infinite; box-shadow: 0 0 0 3px #fff2a0, 0 0 30px #ffd23a; }
@keyframes vicspin { to { transform: rotate(360deg); } }
@keyframes vicstrip { to { background-position: 24px 0; } }
@keyframes vicpop { 0% { transform: scale(.5) rotate(-4deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes vicglow { 0%, 100% { box-shadow: 0 0 0 3px #ffd23a, 0 0 22px rgba(255, 210, 58, .55); } 50% { box-shadow: 0 0 0 3px #fff2a0, 0 0 48px rgba(255, 210, 58, .95); } }
@keyframes vicbulb { to { background-position: 10px 10px; } }
@keyframes vicshine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes vicbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.res-badge { min-width: 64px; height: 64px; padding: 0 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 900; border: 4px solid #14161a;
  background: linear-gradient(#c0c6d0, #6a707c); text-shadow: 0 2px 0 #14161a; }
.res-badge.p0 { border-radius: 16px; font-size: 22px; background: linear-gradient(#8fd8ff, #1877d8); }
.res-badge.p1 { background: linear-gradient(#fff2a0, #ffb21a 50%, #c46a00); box-shadow: 0 0 20px #ffd23a; }
.res-badge.p2 { background: linear-gradient(#ffffff, #b8c0cc 50%, #6a707c); }
.res-badge.p3 { background: linear-gradient(#ffd0a0, #c8783a 50%, #7a3a10); }
.res-reason { font-size: 13px; color: #c8d4ec; text-align: center; }
.res-cols { display: flex; gap: 12px; }
.res-list { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.rr { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 14px; font-weight: 800; }
.rr.me { background: rgba(255, 210, 58, .3); outline: 2px solid #ffd23a; }
.rr span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr em { font-style: normal; color: #c8d4ec; font-size: 13px; }
.rr i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #14161a; }
.pl { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #4a505a; font-size: 13px; }
.pl.p1 { background: #e0a100; } .pl.p2 { background: #8a96b0; } .pl.p3 { background: #a8582a; }
.res-side { width: 250px; display: flex; flex-direction: column; gap: 6px; }
.res-lines { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.res-lines div { display: flex; justify-content: space-between; gap: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .2); }
.res-lines span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-total { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 900; color: #ffe14a; }
.res-total span { display: flex; align-items: center; gap: 3px; margin-left: auto; font-size: 16px; color: #fff; }
.res-xp { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; }
.res-xp i { height: 10px; border-radius: 5px; background: rgba(0, 0, 0, .5); overflow: hidden; }
.res-btns { display: flex; gap: 8px; justify-content: center; }
/* рейтинг */
.lb-row { border-radius: 10px; background: rgba(255, 255, 255, .08); font-weight: 800; }
.lb-row.top-1 { background: linear-gradient(90deg, #c48a00, #6a4a00); } .lb-row.top-2 { background: linear-gradient(90deg, #8a96b0, #4a5060); } .lb-row.top-3 { background: linear-gradient(90deg, #a8582a, #5a2a10); }
.lb-row.me { outline: 2px solid #ffd23a; }
.lb-medal { height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.lb-medal.gold { background: radial-gradient(circle at 35% 30%, #fff2a0, #e0a100); color: #3a1500; border: 2px solid #3a1500; }
.lb-medal.silver { background: radial-gradient(circle at 35% 30%, #fff, #8a96b0); color: #14161a; border: 2px solid #14161a; }
.lb-medal.bronze { background: radial-gradient(circle at 35% 30%, #ffd0a0, #a8582a); color: #2a0a00; border: 2px solid #2a0a00; }
.lb-avatar { background: #1877d8; font-weight: 900; }
.lb-score { color: #ffe14a; font-weight: 900; }
#lb-list { max-height: 230px; }
#toast { bottom: 18px; padding: 10px 18px; border-radius: 14px; background: rgba(20, 22, 26, .9); border: 2px solid #ffd23a; font-size: 15px; font-weight: 800; }
/* флаги в гараже — карточками по три в ряд: флаг, название, кнопка */
#flag-list { grid-template-columns: repeat(3, 1fr); }
#flag-list .sw { flex-direction: column; gap: 4px; padding: 6px 4px; }
#flag-list .sw b { flex: none; max-width: 100%; text-align: center; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#flag-list .sw .btn, #flag-list .sw .tag { width: 100%; justify-content: center; }
/* краска в гараже — в одну колонку: названия и кнопки помещаются */
#paint-list { grid-template-columns: 1fr; }
#flag-list .sw.top { box-shadow: inset 0 0 0 2px #ffd23a, 0 0 12px rgba(255, 210, 58, .45); background: linear-gradient(rgba(255, 210, 58, .22), rgba(255, 210, 58, .06)); }
/* «Улучшаем игру вместе» */
.idea { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); text-align: left; }
.idea.done { background: rgba(74, 222, 128, .14); box-shadow: inset 0 0 0 2px #4ade80; }
.idea-h { display: flex; align-items: center; gap: 8px; }
.idea-h span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .idea-h b { font-size: 13px; } .idea-h small { font-size: 10px; color: #8fa0b5; }
.idea-ava { position: relative; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(#ff7a3a, #d4280f); border: 2px solid #ffb21a; font-size: 14px; }
.idea-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.idea-ok { font-style: normal; padding: 2px 8px; border-radius: 8px; background: #4ade80; color: #06210f; font-size: 11px; font-weight: 900; }
.idea p { margin: 6px 0; font-size: 14px; line-height: 1.35; word-break: break-word; }
.idea-v, .idea-dv { display: flex; align-items: center; gap: 8px; } .idea-dv { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(74, 222, 128, .5); } .idea-dv small { flex: 1; font-size: 11px; color: #bff5d0; }
.th { display: flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: 15px; border: 2px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .25); color: #c8d4ec; font: inherit; font-size: 13px; font-weight: 800; }
.th * { pointer-events: none; } .th.dn svg { transform: scaleY(-1); }
.th.up.on { background: #16a34a; border-color: #4ade80; color: #fff; } .th.dn.on { background: #b91c1c; border-color: #ff5a5a; color: #fff; }
.idea-form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.idea-rules { margin: 0; font-size: 12px; line-height: 1.4; color: #c8d4ec; } .idea-rules b { color: #ffe14a; }
#idea-text { width: 100%; min-height: 70px; resize: none; padding: 8px 10px; border-radius: 10px; border: 2px solid #3a4252; background: #0f1116; color: #fff; font: inherit; font-size: 14px;
  user-select: text; -webkit-user-select: text; touch-action: auto; }
#idea-text:focus { outline: none; border-color: #2fd6c0; }
.idea-row { display: flex; align-items: center; justify-content: space-between; } #idea-cnt { font-size: 11px; color: #8fa0b5; }
#idea-send.off { filter: grayscale(.8); pointer-events: none; }
.idea-status { min-height: 18px; font-size: 13px; color: #ffe14a; } .idea-status.ok { color: #4ade80; } .idea-status.bad { color: #ff8a8a; }
/* слой «Улучшаем вместе»: вне поворота игры, реальные px (не масштабируется fitUI) */
.is { position: fixed; inset: 0; z-index: 300; display: none; justify-content: center; background: rgba(5, 8, 14, .78); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #fff; }
.is.show { display: flex; }
.is-box { position: relative; width: 100%; max-width: 480px; height: 100%; display: flex; flex-direction: column; background: linear-gradient(#1f2633, #12161e); box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
.is-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 14px; background: linear-gradient(#2fd6c0, #138a7c); box-shadow: 0 3px 0 #0a0b0e; }
.is-head b { flex: 1; font-size: 18px; font-weight: 900; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.is-x { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #0a0b0e; background: #ff3b2f; position: relative; flex-shrink: 0; }
.is-x::before, .is-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 4px; margin: -2px 0 0 -9px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.is-x::after { transform: rotate(-45deg); }
.is-rot { display: none; align-items: center; gap: 10px; margin: 10px 12px 0; padding: 8px 10px; border-radius: 12px; background: rgba(255, 210, 58, .15); border: 2px solid #ffd23a; font-size: 13px; }
.is.land .is-rot { display: flex; } .is-rot span { flex: 1; }
.is-phone { width: 22px; height: 34px; border: 3px solid #ffd23a; border-radius: 5px; flex-shrink: 0; animation: isrot 2s ease-in-out infinite; }
@keyframes isrot { 0%, 30% { transform: rotate(90deg); } 60%, 100% { transform: rotate(0); } }
.is-tabs { display: flex; gap: 6px; padding: 10px 12px 6px; }
.is-tabs button { flex: 1; min-height: 40px; border: 2px solid #0a0b0e; border-radius: 10px; background: #2a3140; color: #c8d4ec; font: inherit; font-size: 14px; font-weight: 800; }
.is-tabs button.on { background: linear-gradient(#ffb21a, #ff7a1a); color: #2a0e00; }
.is-tabs button *, .is-head button * { pointer-events: none; }
.is-tc { display: none; flex: 1; min-height: 0; } .is-tc.on { display: flex; flex-direction: column; }
#ideas-scr .scroller { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 12px 16px; }
.ideas { display: flex; flex-direction: column; gap: 10px; }
#ideas-scr .hint { padding: 24px 10px; text-align: center; color: #8fa0b5; font-size: 14px; }
#ideas-scr .idea p { font-size: 15px; } #ideas-scr .idea-h b { font-size: 14px; } #ideas-scr .idea-h small { font-size: 11px; }
#ideas-scr .idea-form { gap: 10px; display: flex; flex-direction: column; }
#ideas-scr .idea-rules { font-size: 13px; }
#ideas-scr #idea-text { min-height: 110px; font-size: 16px; }   /* 16px — чтобы iPhone не увеличивал страницу при вводе */
#ideas-scr .btn { min-height: 44px; }
@media (min-width: 700px) and (pointer: fine) { .is-box { margin: 20px 0; height: calc(100% - 40px); border-radius: 18px; overflow: hidden; } }
.idea-limit { margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(255, 138, 26, .16); border: 2px solid #ff8a1a; color: #ffd8a8; font-size: 14px; font-weight: 800; text-align: center; }
.idea-gate { padding: 10px; border-radius: 10px; background: rgba(47, 214, 192, .14); border: 2px solid #2fd6c0; font-size: 14px; text-align: center; } .idea-gate b { color: #2fd6c0; }
#idea-text:disabled { opacity: .45; }
/* нитро: круглая кнопка над тормозом, по ободу — шкала бака (--ch 0…1), полный бак мигает */
.pedal.nitro { position: absolute; left: 14px; bottom: 134px; width: 78px; height: 78px; border-radius: 50%; gap: 0; padding: 0;
  background: conic-gradient(#5af2ff calc(var(--ch, 0) * 1turn), rgba(20, 22, 26, .55) 0); }
.pedal.nitro::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #4a8aff, #0a3aa8 75%); box-shadow: inset 0 2px 0 rgba(255,255,255,.35); }
.pedal.nitro > * { position: relative; } .pedal.nitro span { font-size: 10px; }
.pedal.nitro.full { animation: nfull .7s ease-in-out infinite; } .pedal.nitro.on { filter: brightness(1.35); transform: scale(.95); }
@keyframes nfull { 0%, 100% { box-shadow: 0 0 0 0 rgba(90, 242, 255, .0); } 50% { box-shadow: 0 0 18px 4px rgba(90, 242, 255, .85); } }
