:root{--ink:#f7f3e8;--muted:#c3c0b4;--panel:#151812d1;--panel-strong:#0e100deb;--line:#f7f3e82e;--gold:#f0c766;--danger:#ef5a48;--success:#80dd91;--teal:#47c2b2;--shadow:0 16px 48px #00000057;color:var(--ink);background:#151812;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#app{width:100%;height:100%;margin:0;overflow:hidden}body{touch-action:none;min-width:320px}button,input,select{font:inherit}button{color:var(--ink);border:1px solid var(--line);cursor:pointer;background:#ffffff17;border-radius:6px}button:disabled{cursor:not-allowed;opacity:.48}#game-root{position:fixed;inset:0}#game-root canvas{width:100%;height:100%;display:block}.loading{color:var(--ink);z-index:20;background:#151812;place-items:center;display:grid;position:fixed;inset:0}.feedback-button{top:max(14px, env(safe-area-inset-top));left:max(14px, env(safe-area-inset-left));min-width:54px;min-height:40px;color:var(--ink);border-color:var(--line);z-index:8;touch-action:manipulation;background:#151812e0;padding:8px 11px;font-size:13px;font-weight:900;position:fixed;box-shadow:0 12px 32px #0000003d}.hud{top:max(14px, env(safe-area-inset-top));left:calc(max(14px, env(safe-area-inset-left)) + 68px);right:max(14px, env(safe-area-inset-right));pointer-events:none;z-index:5;justify-content:space-between;align-items:flex-start;gap:6px;display:flex;position:fixed}.hud__actions{pointer-events:auto;gap:8px;display:flex}.hud__actions button{color:#16180f;background:var(--gold);touch-action:manipulation;border-color:#0000002e;min-width:54px;min-height:40px;padding:8px 11px;font-size:13px;font-weight:900;box-shadow:0 12px 32px #0000003d}.hud__actions button:first-child{color:var(--ink);border-color:var(--line);background:#151812db}.hud__actions button[data-ui=new-run]{color:#ffc4bd;background:#ef5a482e;border-color:#ef5a486b}.hud__objective,.hud__stats,.prompt,.panel{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.hud__objective{border-radius:8px;max-width:min(420px,40vw);padding:10px 12px}.hud__objective strong{margin-top:3px;font-size:15px;line-height:1.25;display:block}.hud__kicker{color:var(--gold);letter-spacing:0;text-transform:uppercase;font-size:11px;font-weight:800;display:block}.hud__stats{border-radius:8px;flex-wrap:wrap;justify-content:flex-end;gap:8px;min-width:0;max-width:50vw;padding:8px;display:flex;overflow:hidden}.hud__stats span{min-width:0;min-height:28px;color:var(--muted);white-space:nowrap;background:#00000040;border:1px solid #ffffff14;border-radius:6px;align-items:center;gap:5px;padding:5px 8px;font-size:13px;display:inline-flex}.hud__stats strong{color:var(--ink)}.stars{color:var(--muted);justify-content:center;min-width:90px}.stars.is-hot{color:var(--danger);text-shadow:0 0 16px #ef5a48bf}.prompt{left:50%;bottom:max(22px, env(safe-area-inset-bottom));max-width:min(620px,100vw - 28px);color:var(--ink);text-align:center;z-index:6;pointer-events:none;border-radius:8px;padding:9px 12px;font-size:14px;line-height:1.3;position:fixed;transform:translate(-50%)}.prompt[data-tone=success]{color:var(--success);border-color:#80dd916b}.prompt[data-tone=danger]{color:#ffc4bd;border-color:#ef5a487a}.desktop-controls{right:max(14px, env(safe-area-inset-right));bottom:max(18px, env(safe-area-inset-bottom));z-index:7;pointer-events:auto;gap:8px;display:none;position:fixed}.desktop-controls button{min-width:76px;min-height:40px;color:var(--ink);border-color:var(--line);background:#151812d6;padding:8px 10px;font-size:13px;font-weight:800;box-shadow:0 12px 32px #0000003d}.desktop-controls button:first-child{color:#16180f;background:var(--gold);border-color:#0000002e}.desktop-controls span{color:var(--muted);font-size:11px;font-weight:900}.desktop-controls button:first-child span{color:#16180fb3}.panel{top:86px;right:max(14px, env(safe-area-inset-right));z-index:10;touch-action:auto;border-radius:8px;width:min(380px,100vw - 28px);max-height:calc(100vh - 122px);padding:14px;position:fixed;overflow:auto}.pause{left:50%;right:auto;transform:translate(-50%)}.panel__header{justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:12px;display:flex}.panel h2{margin:2px 0 0;font-size:20px;line-height:1.1}.panel__message{color:var(--muted);margin:0 0 12px;font-size:13px;line-height:1.35}.icon-button{width:34px;height:34px;font-size:22px;line-height:1}.button{min-height:34px;padding:7px 10px}.shop__items{gap:9px;display:grid}.shop-item{background:#ffffff12;border:1px solid #ffffff1a;border-radius:8px;padding:10px}.shop-item__title{font-weight:800}.shop-item p{color:var(--muted);margin:5px 0 9px;font-size:13px;line-height:1.35}.shop-item button{color:#16180f;background:var(--gold);border-color:#0000001f;width:100%;min-height:34px;font-weight:800}.shop-item button:disabled{color:var(--ink);background:#ffffff1a}.pause label{color:var(--muted);gap:6px;margin-bottom:10px;font-size:13px;display:grid}.pause input,.pause select,.feedback select,.feedback textarea{width:100%;min-height:36px;color:var(--ink);border:1px solid var(--line);background:#0000003d;border-radius:6px;padding:7px 9px}.feedback label{color:var(--muted);gap:6px;margin-bottom:10px;font-size:13px;display:grid}.feedback textarea{resize:vertical;min-height:116px;line-height:1.35}.touch{inset:auto max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));z-index:7;pointer-events:none;-webkit-user-select:none;user-select:none;grid-template-rows:auto auto;grid-template-columns:minmax(108px,31vw) 1fr minmax(116px,34vw);align-items:end;gap:10px;display:grid;position:fixed}.touch__pad{pointer-events:auto;touch-action:none;background:radial-gradient(circle,#f0c76629,#00000047);border:1px solid #ffffff2e;border-radius:28px;place-items:center;width:min(132px,34vw);min-width:104px;height:min(132px,34vw);min-height:104px;transition:border-color .16s,background .16s,transform .16s;display:grid;position:relative;box-shadow:0 16px 42px #00000047}.touch__pad[data-active=true]{background:radial-gradient(circle,#f0c76642,#00000057);border-color:#f0c766b8;transform:scale(1.02)}.touch__pad--move{border-radius:50%;grid-area:1/1/span 2;justify-self:start}.touch__pad--drive{grid-area:1/3/span 2;justify-self:end}.touch__pad-label{color:var(--muted);letter-spacing:0;text-transform:uppercase;font-size:11px;font-weight:800;position:absolute;top:12px;left:12px}.touch__stick{pointer-events:none;background:#f0c766c7;border-radius:50%;width:44px;height:44px;transition:background .14s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 8px 22px #00000042}.touch__drive-indicator{pointer-events:none;background:linear-gradient(#80dd91eb,#47c2b2b8);border-radius:20px;width:38px;height:64px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 10px 26px #0000004d}.touch__pause{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);pointer-events:auto;touch-action:manipulation;background:#0e100db8;border-radius:22px;grid-area:1/2;justify-self:center;min-width:62px;min-height:44px;padding:8px 12px}.touch__buttons{pointer-events:auto;grid-area:2/2;grid-template-columns:repeat(2,minmax(76px,1fr));justify-self:center;gap:8px;display:grid}.touch__button{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);touch-action:manipulation;background:#151812b3;min-width:76px;min-height:48px;padding:8px 10px;transition:background .14s,border-color .14s,transform .14s}.touch__button[data-active=true],.touch__pause[data-active=true]{background:#f0c76638;border-color:#f0c766a8;transform:scale(.96)}.touch__button--action{color:#16180f;background:var(--gold);border-color:#00000029;font-weight:800}.touch__button--brake{border-color:#ef5a4875}[hidden]{display:none!important}@media (hover:hover) and (pointer:fine){.touch{display:none}}@media (width<=720px){.hud{left:calc(max(14px, env(safe-area-inset-left)) + 58px);align-items:flex-start;gap:8px}.feedback-button{min-width:48px;min-height:34px;padding:6px 8px;font-size:12px}.hud__actions{flex-direction:column;gap:6px}.hud__actions button{min-width:48px;min-height:34px;padding:6px 8px;font-size:12px}.hud__objective{max-width:48vw;padding:8px 10px}.hud__stats{gap:5px;max-width:44vw;padding:6px}.hud__stats span{min-height:25px;padding:4px 6px;font-size:12px}.stars{min-width:76px}.panel{max-height:calc(100dvh - 224px);top:78px}.prompt{bottom:calc(160px + env(safe-area-inset-bottom));font-size:13px}}@media (width<=460px){.hud{gap:8px}.hud__objective{max-width:58vw;padding:8px}.hud__objective strong{font-size:13px}.hud__stats span{font-size:11px}.touch{grid-template-columns:minmax(96px,30vw) 1fr minmax(104px,32vw);gap:7px}.touch__pad{width:min(116px,33vw);min-width:92px;height:min(116px,33vw);min-height:92px}.touch__buttons{grid-template-columns:repeat(2,minmax(62px,1fr));gap:6px}.touch__button{min-width:62px;min-height:44px;padding:6px;font-size:12px}.touch__pause{min-height:44px;padding:7px 10px;font-size:12px}}@media (orientation:landscape) and (height<=520px){.touch{inset:auto max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));grid-template-columns:minmax(96px,20vw) 1fr minmax(104px,22vw)}.touch__pad{width:min(112px,22vw);height:min(112px,22vw)}.touch__buttons{grid-template-columns:repeat(4,minmax(64px,1fr))}.prompt{bottom:calc(142px + env(safe-area-inset-bottom))}}.button--primary{color:#16180f;background:var(--gold);border-color:#0000002e;width:100%;min-height:46px;font-weight:900}.store{top:auto;right:max(14px, env(safe-area-inset-right));bottom:calc(164px + env(safe-area-inset-bottom));width:min(280px,100vw - 28px)}.game-over{text-align:center;width:min(360px,100vw - 28px);top:50%;left:50%;right:auto;transform:translate(-50%,-50%)}#camera-chip.is-hot{color:#16180f;background:var(--gold)}.touch{height:154px;display:none}.touch__pad--steer{border-radius:50%;width:min(132px,34vw);height:min(132px,34vw);position:absolute;bottom:0;left:0}.touch__pedals{pointer-events:auto;grid-template-rows:repeat(2,minmax(58px,1fr));grid-template-columns:1fr;gap:8px;display:grid;position:absolute;bottom:0;right:66px}.touch__pedal{color:#16180f;touch-action:manipulation;border-radius:8px;width:min(82px,20vw);min-width:58px;height:min(74px,18vw);min-height:58px;padding:8px 6px;font-weight:900;transition:transform .14s,filter .14s,border-color .14s}.touch__pedal[data-active=true]{filter:brightness(1.15);transform:scale(.96)}.touch__pedal--gas{background:linear-gradient(#80dd91,#47c2b2);border-color:#0000003d}.touch__pedal--brake{background:linear-gradient(#f0c766,#ef5a48);border-color:#0000003d}.touch__buttons{grid-template-columns:repeat(2,minmax(68px,1fr));max-width:176px;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.touch__button--fpv{border-color:#47c2b280}.touch__button--pause{background:#0e100db8}@media (width<=460px){.hud__objective{max-width:50vw}.hud__stats{max-width:38vw}.touch__pedals{grid-template-rows:repeat(2,minmax(52px,1fr));grid-template-columns:1fr;gap:6px;right:66px}.touch__pedal{width:min(72px,18vw);min-width:52px;height:min(66px,17vw);min-height:52px;font-size:12px}.touch__buttons{max-width:144px}.store{bottom:calc(154px + env(safe-area-inset-bottom))}}@media (pointer:coarse),(any-pointer:coarse){.touch{display:block}.desktop-controls{display:none}.prompt{bottom:calc(174px + env(safe-area-inset-bottom))}}@media (orientation:landscape) and (height<=520px){.hud__objective{max-width:38vw}.hud__objective strong{font-size:12px}.touch{height:116px}.touch__pad--steer{width:min(108px,18vw);height:min(108px,18vw)}.touch__pedals{grid-template-rows:1fr;grid-template-columns:repeat(2,minmax(58px,1fr));right:0}.touch__pedal{width:min(78px,11vw);height:min(112px,28vh);min-height:82px}.touch__buttons{grid-template-columns:repeat(4,minmax(56px,1fr));max-width:330px}.store{left:50%;right:auto;bottom:max(10px, env(safe-area-inset-bottom));width:min(300px,40vw);transform:translate(-50%)}}@media (pointer:coarse) and (orientation:landscape) and (height<=520px),(any-pointer:coarse) and (orientation:landscape) and (height<=520px){.prompt{bottom:calc(132px + env(safe-area-inset-bottom));max-width:min(430px,100vw - 330px);padding:7px 10px;font-size:12px}}@media (pointer:fine){.touch{display:none}.desktop-controls{display:flex}.prompt{bottom:max(22px, env(safe-area-inset-bottom))}}
