:root{color-scheme:dark;--bg:#14161a;--fg:#fff;--accent:#18d6ff}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:var(--bg);color:var(--fg);font-family:system-ui,sans-serif}#game-section,#game-root{position:relative;width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none}#game-root canvas{display:block;width:100%;height:100%}.fallback{padding:2rem;text-align:center}[hidden]{display:none!important}#hud{position:absolute;z-index:2;top:8px;left:10px;display:flex;gap:18px;font-weight:700;font-size:1.1rem;text-shadow:0 1px 4px #000;pointer-events:none}#hud b{color:var(--accent);font-size:1.4em}#levels{position:absolute;z-index:3;top:8px;right:10px;display:flex;gap:6px}#levels button{width:40px;height:40px;border-radius:10px;border:2px solid var(--accent);background:#0009;color:#fff;font-weight:800;cursor:pointer}#levels button.cur{background:var(--accent);color:#001}#levels button:disabled{opacity:.45;border-color:#888;cursor:not-allowed}#energy{position:absolute;z-index:2;top:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:8px;font-size:1.3rem;pointer-events:none}#energy .bar{width:160px;height:14px;border:2px solid #fff;border-radius:8px;background:#0008;overflow:hidden}#energy i{display:block;height:100%;width:30%;background:linear-gradient(90deg,#39ff88,#18d6ff);transition:width .1s}#energy.low i{background:#ff4d4d}.hint{position:absolute;z-index:2;bottom:12px;display:flex;gap:16px;align-items:flex-end;opacity:.8;pointer-events:none}#hint-l{left:12px}#hint-r{right:12px}.kg{display:flex;flex-direction:column;align-items:center;gap:4px;text-shadow:0 1px 4px #000}.kg i{font-style:normal;font-size:.75rem;opacity:.9;max-width:130px;text-align:center}.key{display:inline-block;min-width:42px;height:42px;line-height:38px;text-align:center;border:2px solid #fff;border-bottom-width:5px;border-radius:8px;background:#0007;font-weight:800;margin:0 2px}.key.wide{min-width:110px}.mouse{display:inline-block;width:30px;height:44px;border:2px solid #fff;border-radius:15px;background:linear-gradient(#fff 0 18px,transparent 0) 50% 6px/3px 12px no-repeat,#0007}#count{position:absolute;z-index:3;inset:0;display:flex;align-items:center;justify-content:center;font-size:clamp(4rem,18vw,10rem);font-weight:900;text-shadow:0 4px 12px #000;pointer-events:none}#result{position:absolute;z-index:4;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#0007;text-shadow:0 2px 6px #000}#res-icon{font-size:5rem;line-height:1}#stars{font-size:3.2rem;letter-spacing:.2em;color:#ffc400}#stars .off{color:#fff3}.chips{display:flex;gap:12px;font-size:1.3rem}.chips span{background:#0009;border:2px solid var(--accent);border-radius:999px;padding:.3rem 1rem}#res-note{font-size:.95rem;opacity:.85}.btns{display:flex;gap:14px}.btns button{width:76px;height:76px;border:0;border-radius:50%;background:var(--accent);color:#001;font-size:2rem;font-weight:800;cursor:pointer}#touch{position:absolute;z-index:2;left:0;right:0;bottom:10px;padding:0 12px;display:none;justify-content:space-between}#touch button{width:78px;height:78px;margin:0 5px;border-radius:18px;border:2px solid var(--accent);background:#0008;color:#fff;font-size:1.6rem;font-weight:700;touch-action:none}#touch button.on{background:var(--accent);color:#001}@media (pointer:coarse){#touch{display:flex}.hint{display:none}}#levels .garage{width:auto;padding:0 12px}#garage{position:absolute;z-index:6;inset:0;background:#0d1016ee;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:16px}.gh{display:flex;justify-content:space-between;align-items:center;font-size:1.6rem}.gh button{width:44px;height:44px;border-radius:50%;border:2px solid #fff;background:transparent;color:#fff;font-size:1.2rem;cursor:pointer}.cars{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}.card{width:170px;background:#1b2028;border:2px solid #333b47;border-radius:14px;padding:10px;display:flex;flex-direction:column;align-items:center;gap:6px}.card.sel{border-color:var(--accent)}.sb{display:flex;align-items:center;gap:6px;width:100%;font-size:.85rem}.sb div{flex:1;height:8px;background:#0008;border-radius:4px;overflow:hidden}.sb i{display:block;height:100%;background:var(--accent)}.card button,.up button{min-width:90px;height:38px;border:0;border-radius:10px;background:var(--accent);color:#001;font-weight:800;cursor:pointer}.card button:disabled,.up button:disabled{background:#444;color:#999;cursor:not-allowed}.ups{display:flex;flex-direction:column;gap:10px;align-items:center}.up{display:flex;align-items:center;gap:12px;width:min(420px,100%);background:#1b2028;border-radius:12px;padding:8px 12px}.up .ic{font-size:1.6rem}.pips{flex:1;display:flex;gap:6px}.pips i{flex:1;height:12px;border-radius:6px;background:#0008;border:1px solid #fff4}.pips i.on{background:linear-gradient(90deg,#39ff88,#18d6ff);border-color:transparent}#settings{position:absolute;z-index:7;top:56px;right:10px;background:#1b2028f2;border:2px solid #333b47;border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:12px;min-width:170px}#settings .row{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:1.3rem}#settings .sw{width:52px;height:28px;border-radius:14px;border:2px solid #fff6;background:#0008;position:relative;cursor:pointer;padding:0}#settings .sw i{position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;transition:left .12s}#settings .sw.on{background:var(--accent)}#settings .sw.on i{left:26px;background:#001}.seg{display:flex;gap:4px}.seg button{height:30px;padding:0 8px;border-radius:8px;border:2px solid #fff6;background:#0008;color:#fff;font-size:.7rem;font-weight:800;cursor:pointer}.seg button.on{background:var(--accent);color:#001;border-color:transparent}#settings .x{align-self:flex-end;width:32px;height:32px;border-radius:50%;border:2px solid #fff6;background:transparent;color:#fff;cursor:pointer}
