:root{color:#183631;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;background:#d8e7e7;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}#app{flex-direction:column;height:100svh;min-height:540px;display:flex}.topbar,.statusbar{z-index:1;background:#f3f4eb;justify-content:space-between;align-items:center;gap:24px;padding:14px 26px;display:flex}.topbar{border-bottom:1px solid #18363120}.brand{color:inherit;letter-spacing:.08em;align-items:center;gap:12px;font-weight:850;text-decoration:none;display:flex}.brand-mark{color:#f2f3e8;background:#183631;border-radius:8px;place-items:center;width:32px;height:32px;font-size:25px;display:grid}.stage,.eyebrow{letter-spacing:.14em;font-size:10px;font-weight:700}.stage span{opacity:.4;margin:0 10px}.actions{gap:10px;display:flex}.workspace{flex:1;min-height:0;position:relative;overflow:hidden}#viewport{position:absolute;inset:0}canvas{outline:none;width:100%;height:100%;display:block}.course-panel{background:#f3f4ebe8;border:1px solid #fff7;border-radius:12px;width:250px;padding:20px;position:absolute;top:24px;left:26px;box-shadow:0 6px 28px #18363108}h1{letter-spacing:-.035em;margin:8px 0 10px;font-size:25px;line-height:1.1}.course-panel p{color:#576d63;margin:0 0 20px;font-size:12px;line-height:1.6}.course-panel label{color:#576d63;margin-bottom:6px;font-size:11px;display:block}select{color:#183631;font:inherit;background:#f9faf3;border:1px solid #18363130;border-radius:5px;padding:8px;font-size:12px}.course-panel select{width:100%}.speed-panel{color:#f8faef;background:#183631ed;border-radius:12px;min-width:205px;padding:16px 20px;position:absolute;bottom:24px;right:26px;box-shadow:0 8px 25px #18363115}.speed-value{align-items:baseline;gap:10px;display:flex}#speed{letter-spacing:-.04em;font-variant-numeric:tabular-nums;font-size:58px;font-weight:650;line-height:1}.speed-unit{opacity:.6;font-size:12px}#gear{color:#f3a573;margin-left:auto;font-weight:700}#surface{font-size:11px}.car-name{letter-spacing:.1em;color:#a9bfb1;margin-top:6px;font-size:9px;display:block}.course-panel select+label{margin-top:12px}#driving-message{color:#8a2817;background:#fff0df;border-radius:6px;max-width:55%;padding:10px 15px;font-size:13px;position:absolute;bottom:30px;left:26px}#driving-message:empty{display:none}.statusbar{border-top:1px solid #18363120;min-height:62px;font-size:11px}#status{align-items:center;gap:9px;max-width:420px;line-height:1.5;display:flex}.status-dot{background:#be903c;border-radius:50%;flex-shrink:0;width:7px;height:7px}[data-state=ready] .status-dot{background:#508657}[data-state=error]{color:#a13022}[data-state=error] .status-dot{background:#b63e2c}button{color:#fff;font:inherit;cursor:pointer;white-space:nowrap;background:#183631;border:0;border-radius:6px;justify-content:center;align-items:center;gap:16px;padding:10px 15px;font-size:12px;display:flex}button:hover:enabled{background:#2b5145}button:disabled,select:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible{outline-offset:3px;outline:3px solid #d86535}#pause{color:#183631;background:0 0;border:1px solid #18363130}kbd{min-width:20px;height:21px;font:inherit;border:1px solid #18363130;border-radius:4px;place-items:center;padding:0 4px;display:inline-grid}button kbd{border-color:#ffffff50}.controls{color:#576d63;align-items:center;gap:7px;display:flex}.controls kbd:not(:first-child){margin-left:7px}.render-controls{align-items:center;gap:9px;display:flex}#fps{font-variant-numeric:tabular-nums;min-width:45px}.render-controls label{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.render-controls select{padding:5px;font-size:11px}#pause-overlay{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#18363128;place-items:center;display:grid;position:absolute;inset:0}.pause-card{background:#f7f7ef;border-radius:16px;width:min(430px,100% - 40px);padding:34px;box-shadow:0 15px 65px #18363130}h2{letter-spacing:-.03em;margin:10px 0;font-size:30px}.pause-card p{color:#576d63;font-size:14px;line-height:1.6}.pause-card button{width:100%;margin-top:24px;padding:15px}.pause-card .pause-help{text-align:center;margin-bottom:0;font-size:10px}.race-hud{color:#f8faef;pointer-events:none;background:#183631ed;border-radius:12px;gap:8px;min-width:232px;padding:18px 22px;display:grid;position:absolute;top:24px;right:26px}#race-best{color:#f3b98d;font-variant-numeric:tabular-nums;font-size:11px}#race-time,#result-time{font-variant-numeric:tabular-nums;letter-spacing:-.03em;font-size:36px}#race-progress{color:#c4d6c7;font-size:11px}.race-countdown{pointer-events:none;color:#fff9e9;text-shadow:0 4px 30px #18363199;place-items:center;font-size:110px;font-weight:800;display:grid;position:absolute;inset:0}#race-result{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#18363128;place-items:center;display:grid;position:absolute;inset:0}#result-time{color:#bd5b2d;margin-top:22px;font-size:48px;display:block}@media (width<=650px){.race-hud{min-width:175px;padding:12px;top:12px;right:12px}#race-time{font-size:28px}}noscript{color:#a13022;padding:20px}input{font:inherit;color:inherit}input:focus-visible{outline-offset:2px;outline:3px solid #d86535}.secondary{color:#294b40;background:#f5f6ee;border:1px solid #18363128}.secondary:hover:enabled{background:#e5ebdd}.editor-topbar{gap:28px;min-height:82px}.editor-topbar .actions{gap:6px}.editor-topbar .actions button{padding:10px}.storage-notice{color:#8a2817;background:#fff0df;flex-shrink:0;align-items:center;gap:16px;padding:12px 24px;font-size:12px;line-height:1.6;display:flex}.storage-notice>span{flex:1}.storage-notice button{margin-left:auto}.home-content{background:#e8eddf;flex:1;padding:44px max(28px,50% - 560px);overflow-y:auto}.home-intro{border-bottom:1px solid #18363125;padding-bottom:34px}.home-intro h1{margin:20px 0;font-size:clamp(40px,5vw,64px);line-height:1.04}.home-intro>p{color:#576d63;font-size:15px;line-height:1.7}.home-actions{flex-wrap:wrap;gap:10px;margin-top:24px;display:flex}.home-actions button{padding:13px 20px;font-size:13px}#continue-project{white-space:normal;background:#ba5b30;max-width:100%}.library-heading{flex-wrap:wrap;align-items:baseline;gap:24px;margin:25px 0 16px;display:flex}.library-heading h2{font-size:24px}.library-heading p,.empty-projects{color:#576d63;font-size:13px}#project-list{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;display:grid}.project-card{overflow-wrap:anywhere;background:#f7f7ef;border:1px solid #18363114;border-radius:12px;padding:22px}.project-card h3{margin:0 0 12px;font-size:20px}.project-card p{color:#576d63;font-size:12px;line-height:1.6}.project-card small{color:#6b7c71;font-size:10px;display:block}.project-card .actions{flex-wrap:wrap;margin-top:22px}.secondary.danger{color:#983f34}.secondary.danger:hover:enabled{background:#f6e4df;border-color:#983f3450}.topbar:has(#back-to-editor){flex-wrap:wrap}.topbar:has(#back-to-editor) .actions{flex-wrap:wrap}.home-loading{margin:auto;padding:30px}#app:has(.title-screen){height:100dvh;min-height:0}.title-screen{isolation:isolate;color:#fff8e7;background:#142c26;flex:1;min-height:0;position:relative;overflow-y:auto}.title-backdrop{z-index:-2;object-fit:cover;object-position:65% center;width:100%;height:100%;position:absolute;inset:0}.title-screen:before{content:"";z-index:-1;pointer-events:none;background:linear-gradient(90deg,#071d20d9 0%,#102a268c 30%,#102a2600 65%),linear-gradient(#0000 70%,#071d2066);position:absolute;inset:0}.title-menu{width:min(480px,43%);margin-left:clamp(32px,7vw,130px);padding:clamp(50px,12vh,135px) 0 90px}.title-checkers{background:repeating-conic-gradient(#fff5 0% 25%,#0000 0% 50%) 0/16px 16px;width:64px;height:16px;margin:0 0 25px 5px;transform:skew(-12deg)}.title-menu h1{letter-spacing:-.065em;text-shadow:0 5px #14352c,0 12px 35px #03171260;margin:0 0 18px;font-size:clamp(76px,8.5vw,132px);font-style:italic;font-weight:950;line-height:1.08}.title-menu h1 span{color:#ffba58}.title-slogan{letter-spacing:.025em;color:#eeeede;text-shadow:0 2px 8px #061c20;margin:0;font-size:clamp(13px,1.2vw,17px);font-weight:550}.title-actions{gap:13px;width:min(100%,365px);margin-top:42px;display:grid}.title-button{color:#fff8e7;background:#18372fdb;border:1px solid #faffdf45;border-radius:9px;justify-content:flex-start;gap:20px;width:100%;min-height:64px;padding:17px 23px;font-size:18px;font-weight:750;transition:background .15s,transform .15s;box-shadow:0 4px #071e2580,inset 0 1px #ffffff12}.title-button:hover:enabled{background:#315948;transform:translate(4px)}.title-button>span,.title-button svg{text-align:center;color:#d7e2bd;flex-shrink:0;width:24px;font-size:25px}.title-button svg,#sample-toggle svg{fill:none;stroke:currentColor;stroke-width:1.7px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.sample-split{border-radius:9px;display:flex;box-shadow:0 4px #905222,0 8px 24px #091e2330}.title-primary{color:#302719;background:#ffbd60;border-color:#ffda98}.title-primary:hover:enabled{background:#ffd28b}.sample-split .title-button{min-width:0;box-shadow:none;border-radius:9px 0 0 9px;flex:1;gap:17px;transform:none}.sample-split .title-button>span{color:inherit;font-size:17px}#sample-toggle{border:1px solid #ffda98;border-left-color:#9b652c55;border-radius:0 9px 9px 0;flex-shrink:0;width:55px;padding:12px}#sample-toggle[aria-expanded=true] svg{transform:rotate(180deg)}.sample-options{background:#102c27f5;border:1px solid #fff4;border-radius:9px;gap:3px;margin-top:12px;padding:7px;display:grid;box-shadow:0 10px 30px #071c2350}.sample-options button{color:#fff8e7;background:0 0;justify-content:flex-start;min-height:44px;padding:10px 16px;font-size:14px}.sample-options button:hover:enabled{background:#365746}.title-screen button:focus-visible{outline-offset:4px;outline-color:#fff8d6}.title-menu h1:focus,.home-intro h1:focus{outline:none}.title-caption{color:#fff8e7c9;text-shadow:0 2px 8px #071d20;letter-spacing:.12em;text-transform:uppercase;pointer-events:none;margin:0;font-size:11px;position:absolute;bottom:16px;right:32px}@media (width<=700px){.title-backdrop{object-position:90% center}.title-screen:before{background:linear-gradient(#102a2620,#102a2680 45%,#071d20f0)}.title-menu{width:auto;padding:max(180px, 31dvh) 0 max(40px, env(safe-area-inset-bottom));margin:0 25px}.title-menu h1{font-size:clamp(76px,17vw,110px)}.title-checkers{margin-bottom:16px}.title-slogan{font-size:13px}.title-actions{width:min(100%,365px);margin-top:28px}.title-button{min-height:58px;font-size:17px}.title-caption{display:none}}@media (height<=550px) and (width>=701px){.title-menu{width:365px;margin-left:5vw;padding-top:24px;padding-bottom:28px}.title-checkers{display:none}.title-menu h1{margin-bottom:10px;font-size:76px}.title-actions{gap:10px;margin-top:20px}.title-button{min-height:52px;padding-top:12px;padding-bottom:12px}.title-caption{display:none}}@media (prefers-reduced-motion:reduce){.title-button{transition:none}}@media (width<=380px){.title-menu{margin-left:20px;margin-right:20px}.sample-split .title-button{gap:12px;padding-left:16px;padding-right:12px;font-size:16px}#sample-toggle{width:48px}}@media (width<=1000px){.editor-topbar{flex-wrap:wrap}.editor-topbar .brand{display:none}.editor-topbar .actions,.storage-notice{flex-wrap:wrap}}.track-title{flex:1;grid-template-columns:1fr;min-width:120px;display:grid}.track-title label{letter-spacing:.13em;opacity:.6;font-size:9px;font-weight:700}.track-title input{text-overflow:ellipsis;background:0 0;border:0;width:100%;padding:3px 0;font-size:19px;font-weight:650}.track-title>span{color:#64786c;font-size:10px}#test-drive{background:#d66c39;min-width:115px;font-size:14px;font-weight:650}#test-drive:hover:enabled{background:#ba552a}.editor-workspace{flex:1;min-height:0;display:flex}.editor-palette{background:#f3f4eb;border-right:1px solid #18363120;flex:0 0 202px;padding:25px 16px 18px;overflow-y:auto}.editor-palette h1{margin-top:8px;font-size:20px}.editor-palette p{color:#6b7c71;font-size:11px;line-height:1.5}.tool-list{gap:4px;margin:14px 0 12px;display:grid}.tool{color:#48604e;text-align:left;background:#e9ede1;border:1px solid #0000;justify-content:flex-start;gap:12px;padding:7px 11px}.tool:hover:enabled{background:#dfe7d4}.tool[aria-pressed=true]{color:#f4f4e9;background:#294d40;border-color:#294d40}.tool svg{flex-shrink:0;width:28px;height:28px}.tool span{font-size:12px;font-weight:600}.tool small{opacity:.65;margin-top:4px;font-size:9px;font-weight:400;display:block}.edit-tools{border-top:1px solid #18363118;gap:5px;margin-bottom:14px;padding-top:12px;display:flex}.edit-tools .tool{flex:1;gap:6px;padding:8px}.edit-tools .tool svg{width:20px;height:20px}.edit-tools .tool span{font-size:10px}#rotate,#new-track{width:100%}#orientation{text-align:center;color:#6b7c71;padding:8px;font-size:10px}#new-track{margin-top:18px}.editor-palette .palette-tip{margin-top:12px;font-size:10px}.editor-map{flex:1;min-width:0;position:relative;overflow:hidden}#editor-viewport{position:absolute;inset:0}#editor-viewport canvas{touch-action:none}.map-toolbar{background:#f3f4eb99;border-radius:8px;gap:6px;padding:5px;display:flex;position:absolute;top:18px;left:18px}.map-toolbar button{padding:9px 11px;font-size:11px}#ignore-errors[aria-pressed=true]{color:#f4f4e9;background:#294d40;border-color:#294d40}#toggle-grid[aria-pressed=false]{background:#d5ddcb;text-decoration:line-through}.map-compass{color:#334e36;opacity:.6;font-size:12px;position:absolute;bottom:20px;right:20px}.editor-inspector{background:#f3f4eb;border-left:1px solid #18363120;flex:0 0 250px;overflow-y:auto}.editor-inspector:has(details:not([open])){flex-basis:38px}.editor-inspector summary{cursor:pointer;white-space:nowrap;padding:18px;font-size:11px;font-weight:650}.editor-inspector details:not([open]) summary{writing-mode:vertical-rl;padding:12px}.inspector-content{padding:10px 18px 24px}#selection-info{min-height:44px;margin:12px 0;font-size:12px;line-height:1.8}#delete-selected{width:100%;font-size:11px}.inspector-content hr{border:0;border-top:1px solid #1836311c;margin:26px 0}.inspector-content h2{letter-spacing:-.01em;font-size:16px}.guardrail-control{cursor:pointer;align-items:center;gap:10px;min-height:44px;margin:12px 0;display:flex}.guardrail-control[hidden]{display:none}.guardrail-control input{accent-color:#276b50;width:20px;height:20px;margin:0}#validation-summary{background:#f5e5d2;border-radius:8px;padding:12px;font-size:12px;line-height:1.6}#validation-summary[data-valid=true]{background:#dfebda}#drive-reason{color:#6b7c71;font-size:11px;line-height:1.6}.track-issue{color:#914b32;white-space:normal;text-align:left;background:#fbf3e7;justify-content:flex-start;width:100%;margin-top:8px;padding:10px;font-size:10px;line-height:1.5}.track-issue:hover:enabled{background:#efe0c9}.track-issue:disabled{opacity:1}.track-issue.warning{color:#6b6839;background:#ececd7}.editor-status{gap:18px;min-height:46px;font-size:10px}.editor-status>span{white-space:nowrap}#editor-status{text-overflow:ellipsis;overflow:hidden}.editor-help{color:#6b7c71;margin-left:auto}@media (width<=1150px){.editor-topbar{gap:18px}.editor-palette{flex-basis:176px;padding:20px 12px}.tool{gap:7px;padding:7px}.edit-tools .tool{gap:3px;padding:6px}.edit-tools .tool svg{width:16px;height:16px}.editor-inspector{flex-basis:215px}.editor-help{display:none}}@media (width<=800px){.editor-topbar .brand{display:none}.editor-topbar{gap:10px;padding:10px}.editor-topbar .actions{gap:4px}.editor-topbar .actions button{min-width:0;padding:9px;font-size:10px}.track-title input{font-size:15px}.track-title>span{display:none}.editor-palette{flex-basis:132px;padding:14px 8px}.editor-palette h1,.editor-palette p,.tool small{display:none}.tool{gap:6px;padding:7px}.tool svg{width:24px;height:24px}.tool span{font-size:10px}.edit-tools{flex-direction:column}.map-toolbar{flex-wrap:wrap;max-width:calc(100% - 16px);top:8px;left:8px}.map-toolbar button{padding:7px;font-size:10px}}.button-link{color:#183631;white-space:nowrap;border:1px solid #18363130;border-radius:6px;justify-content:center;align-items:center;padding:10px 15px;font-size:12px;text-decoration:none;display:inline-flex}.button-link:hover{background:#e3e9dc}.track-preview{flex:1;min-height:0;display:flex}.track-summary{background:#f3f4eb;border-right:1px solid #18363120;flex:0 0 280px;padding:28px 24px;overflow-y:auto}.track-summary p{color:#576d63;font-size:13px;line-height:1.6}.track-summary h2{letter-spacing:0;margin-top:28px;font-size:14px}#track-result{background:#dfebda;border-radius:8px;padding:12px;font-size:12px;line-height:1.6}#track-route{padding-left:22px;font-size:12px;line-height:2.2}.track-summary .preview-note{margin-top:28px;font-size:11px}#track-viewport{flex:1;min-width:0;position:relative}@media (width<=700px){.track-preview{flex-direction:column}.track-summary{flex:none;padding:12px 18px}.track-summary p,.track-summary h2,#track-route{display:none}#track-result{padding:6px}}@media (width<=1100px){.controls,.stage{display:none}}@media (width<=650px){.topbar,.statusbar{gap:10px;padding:12px}.brand{font-size:12px}.course-panel{width:180px;padding:12px;top:12px;left:12px}h1{font-size:20px}.course-panel p{display:none}.course-panel label{margin-top:12px}.speed-panel{min-width:150px;bottom:12px;right:12px}#speed{font-size:42px}#driving-message{max-width:90%;bottom:125px;left:12px}.statusbar{font-size:10px}.brand-mark{display:none}}.home-intro h1{margin:14px 0;font-size:clamp(34px,4vw,52px)}.home-intro>p{margin:0}.car-picker{margin-top:26px}.car-picker fieldset{border:0;min-width:0;margin:0;padding:0}.car-picker legend{letter-spacing:-.025em;padding:0;font-size:21px;font-weight:700}.car-picker-help{color:#576d63;margin:8px 0 16px;font-size:13px;line-height:1.5}.car-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;display:grid}.car-option{cursor:pointer;background:#f7f7ef;border:2px solid #18363120;border-radius:12px;min-width:0;display:grid;position:relative;overflow:hidden}.car-option:hover{border-color:#668477}.car-option:has(input:checked){border-color:#bd5b2d;box-shadow:0 0 0 1px #bd5b2d}.car-option:has(input:focus-visible){outline-offset:4px;outline:3px solid #183631}.car-option input{accent-color:#bd5b2d;z-index:1;width:18px;height:18px;margin:0;position:absolute;top:14px;left:14px}.car-option img{aspect-ratio:3/2;object-fit:cover;width:100%;height:auto;display:block}.car-option-copy{gap:5px;padding:14px 16px 16px;display:grid}.car-option-copy strong{font-size:15px}.car-option-copy small{color:#576d63;font-size:11px}.car-selected{color:#fff;background:#bd5b2d;border-radius:5px;padding:5px 8px;font-size:10px;font-weight:700;display:none;position:absolute;top:10px;right:10px}.car-option:has(input:checked) .car-selected{display:block}.car-picker fieldset:disabled{opacity:.65}.car-picker fieldset:disabled .car-option{cursor:wait}.car-picker-status{color:#576d63;margin:8px 0 0;font-size:12px;line-height:1.5}.car-picker-status:empty{display:none}.car-dialog{color:#183631;background:#e8eddf;border:1px solid #18363130;border-radius:16px;width:min(960px,100vw - 40px);max-height:calc(100dvh - 40px);margin:auto;padding:28px;overflow-y:auto;box-shadow:0 18px 70px #102b3550}.car-dialog::backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#102b35a6}.car-dialog .car-picker{margin-top:0}.car-dialog-close{margin:22px 0 0 auto;display:block}@media (width<=650px){.car-options{grid-template-columns:1fr}.car-option{grid-template-columns:42% 1fr;align-items:center}.car-option-copy{padding:30px 12px 14px}.car-option-copy strong{font-size:13px}.car-dialog{padding:20px}}.tool span{white-space:normal;overflow-wrap:anywhere;min-width:0}#build-level{width:100%;margin-top:6px}#jump-controls{margin-top:18px;font-size:12px;line-height:1.5}#jump-controls select,#jump-controls button{white-space:normal;width:100%;margin-top:8px}.tool[aria-pressed=true]:hover{background:#294d40}.layer-switch,.height-switch{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:10px 0 16px;display:grid}.layer-switch button,.height-switch button{color:var(--ink,#29453d);background:#e8ede4;border:1px solid #c3d0c2;flex-direction:column;align-items:center;gap:5px;padding:9px 2px;font-size:11px;display:flex}.layer-switch svg,.height-switch svg{width:32px;height:32px}.layer-switch button[aria-pressed=true],.height-switch button[aria-pressed=true]{color:#fff8e7;background:#234c40;border-color:#234c40;box-shadow:0 2px #b2bd71}.tool-list[hidden],#height-picker[hidden]{display:none}.editor-palette .edit-tools .tool{min-width:0;font-size:11px}#app.driving-app{height:100dvh;min-height:0}#app:has(.home-content){height:100dvh;min-height:0}.driving-app{overscroll-behavior:none;overflow:hidden}.driving-app #viewport{touch-action:none}.driving-app .topbar .actions{align-items:center}.drive-menu{display:block}.drive-menu-items{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.drive-menu>summary,.touch-controls{display:none}.driving-app #pause-overlay,.driving-app #race-result{z-index:4;padding:16px;overflow-y:auto}.driving-app .pause-card{flex-shrink:0;max-height:100%;overflow-y:auto}.mobile-driving .topbar{padding:max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));flex-wrap:nowrap;gap:8px}.mobile-driving .topbar .brand,.mobile-driving .stage,.mobile-driving .topbar kbd{display:none}.mobile-driving .topbar .actions{flex-wrap:nowrap;gap:8px;width:100%}.mobile-driving button,.mobile-driving summary{min-height:44px}.mobile-driving .topbar #pause,.mobile-driving .topbar #reset{flex:1;padding:8px 12px}.mobile-driving .drive-menu{display:block}.mobile-driving .drive-menu>summary{cursor:pointer;border:1px solid #18363130;border-radius:6px;justify-content:center;align-items:center;padding:8px 16px;font-size:12px;list-style:none;display:flex}.mobile-driving .drive-menu>summary::-webkit-details-marker{display:none}.mobile-driving .drive-menu>summary:focus-visible{outline:3px solid #d86535}.mobile-driving .drive-menu-items{display:none}.mobile-driving .drive-menu[open] .drive-menu-items{z-index:6;top:100%;right:max(10px, env(safe-area-inset-right));background:#f3f4eb;border:1px solid #18363130;border-radius:10px;gap:8px;width:210px;padding:12px;display:grid;position:absolute;box-shadow:0 12px 30px #18363130}.mobile-driving .topbar{z-index:6;position:relative}.mobile-driving .course-panel{display:none}.mobile-driving .race-hud{top:10px;left:max(10px, env(safe-area-inset-left));gap:4px;min-width:0;max-width:calc(100% - 134px);padding:10px 12px;right:auto}.mobile-driving #race-time{font-size:27px}.mobile-driving #race-phase{font-size:8px}.mobile-driving #race-progress,.mobile-driving #race-best{font-size:10px}.mobile-driving .speed-panel{top:10px;bottom:auto;right:max(10px, env(safe-area-inset-right));pointer-events:none;min-width:104px;padding:10px 12px}.mobile-driving #speed{font-size:32px}.mobile-driving .speed-value{gap:6px}.mobile-driving .speed-unit{font-size:9px}.mobile-driving .car-name{display:none}.mobile-driving #driving-message{bottom:calc(112px + env(safe-area-inset-bottom));left:max(10px, env(safe-area-inset-left));pointer-events:none;max-width:calc(100% - 20px);padding:6px 10px;font-size:11px}.mobile-driving .touch-controls{padding:10px max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));pointer-events:none;z-index:2;justify-content:space-between;align-items:flex-end;display:flex;position:absolute;inset:0}.touch-steering,.touch-pedals{align-items:flex-end;gap:10px;display:flex}.touch-controls button{color:#fff9e9;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;background:#183631d9;border:1px solid #f8faef99;border-radius:18px;flex-direction:column;gap:2px;width:clamp(58px,10vw,84px);height:clamp(68px,13vh,90px);padding:8px;font-size:28px;display:flex;box-shadow:0 4px 12px #18363125}.touch-controls button[data-drive=throttle]{background:#c15d2de8;height:clamp(80px,16vh,106px)}.touch-controls button small{letter-spacing:.07em;font-size:9px;font-weight:700}.touch-controls button.is-held{color:#183631;background:#f5d293;transform:translateY(3px);box-shadow:inset 0 2px 8px #18363140}.touch-controls button:disabled{opacity:.25;pointer-events:none}.mobile-driving .statusbar{min-height:26px;padding:3px max(10px, env(safe-area-inset-right)) 3px max(10px, env(safe-area-inset-left));gap:8px;font-size:9px}.mobile-driving .statusbar .controls{display:none}.mobile-driving .render-controls select{padding:4px}.mobile-driving .pause-card{width:min(430px,100%);padding:22px}.mobile-driving .pause-card h2{font-size:25px}.mobile-driving .pause-card p{margin:10px 0;font-size:12px}.mobile-driving .pause-card button{margin-top:14px}@media (height<=499px){.mobile-driving .race-hud{gap:2px;padding:7px 10px}.mobile-driving #race-time{font-size:23px}.mobile-driving .pause-card{padding:16px 22px}.mobile-driving .pause-card h2{margin:4px 0;font-size:22px}.mobile-driving .pause-card p{margin:8px 0;line-height:1.4}.mobile-driving .pause-card button{margin-top:8px;padding:10px}.mobile-driving #result-time{margin-top:6px;font-size:32px}}@media (width<=650px){.home-content{padding:24px 16px max(24px, env(safe-area-inset-bottom))}#project-list{grid-template-columns:minmax(0,1fr)}.home-content button{white-space:normal;min-height:44px}.home-actions{grid-template-columns:1fr;display:grid}.home-content .library-heading{gap:0}}.mobile-driving .drive-menu-items .render-controls{flex-wrap:wrap}.mobile-driving .drive-menu-items select{flex:1;min-height:44px}.mobile-editor-only,.editor-menu-items{display:none}#app.editor-app{height:100dvh;min-height:0;overflow:hidden}.mobile-editor{overscroll-behavior:none}.mobile-editor canvas{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.mobile-editor button,.mobile-editor select{touch-action:manipulation;min-height:44px}.mobile-editor .editor-topbar{min-height:0;padding:max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));flex-wrap:nowrap;gap:8px}.mobile-editor .editor-topbar .brand{display:none}.mobile-editor .track-title{flex:1;min-width:0}.mobile-editor .track-title input{width:100%;min-width:0;font-size:16px}.mobile-editor .track-title label{font-size:8px}.mobile-editor .track-title>span{display:none}.mobile-editor .editor-topbar .actions{flex-wrap:nowrap;gap:5px}.mobile-editor .editor-topbar .actions button{padding:8px;font-size:12px}.mobile-editor #test-drive span,.mobile-editor .editor-workspace>.editor-palette,.mobile-editor .editor-workspace>.editor-inspector{display:none}.mobile-editor .editor-map{width:100%}.mobile-editor .map-toolbar{top:8px;left:max(8px, env(safe-area-inset-left));flex-wrap:nowrap}.mobile-editor .map-toolbar button{min-width:44px;padding:8px 12px;font-size:12px}.mobile-editor .mobile-editor-only{display:block}.mobile-editor .editor-touch-bar{padding:6px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));background:#f3f4eb;border-top:1px solid #18363120}#touch-tool-label{text-align:center;white-space:nowrap;text-overflow:ellipsis;color:#576d63;margin-bottom:6px;font-size:10px;overflow:hidden}.editor-touch-actions{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;display:grid}.mobile-editor .editor-touch-actions button{min-width:0;padding:8px 2px;font-size:11px}#editor-pan[aria-pressed=true]{color:#fff8e7;background:#294d40}.mobile-editor .editor-status{min-height:0;padding:3px 10px;font-size:9px}.mobile-editor .editor-status>:not(#editor-status),.mobile-editor kbd{display:none}#editor-sheet{color:#183631;background:#f3f4eb;border:1px solid #18363130;border-radius:18px 18px 0 0;width:100%;max-width:580px;max-height:72dvh;margin:auto auto 0;padding:0;overflow:hidden}#editor-sheet[open]{flex-direction:column;display:flex}#editor-sheet::backdrop{background:#18363150}#editor-sheet>header{border-bottom:1px solid #18363120;flex-shrink:0;justify-content:space-between;align-items:center;gap:10px;padding:12px 16px;display:flex}#editor-sheet h2{margin:0;font-size:17px}#editor-sheet-close{min-width:85px}.editor-sheet-content{overscroll-behavior:contain;padding-bottom:max(12px, env(safe-area-inset-bottom));overflow-y:auto}#editor-sheet .editor-palette,#editor-sheet .editor-inspector{border:0;width:100%;padding:12px 16px;display:block;overflow:visible}#editor-sheet .editor-palette>.eyebrow,#editor-sheet .editor-palette h1,#editor-sheet .editor-palette>p,#editor-sheet .editor-inspector summary{display:none}#editor-sheet .editor-inspector .inspector-content{padding:0}#editor-sheet .tool-list,#editor-sheet .edit-tools{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}#editor-sheet .tool{gap:8px;min-width:0;padding:10px}#editor-sheet .tool span{font-size:13px}#editor-sheet .tool small{font-size:10px;display:block}#editor-sheet .tool svg{flex-shrink:0;width:24px;height:24px}#editor-sheet .layer-switch button,#editor-sheet .height-switch button{flex-direction:row;justify-content:center;padding:8px 2px;font-size:12px}#editor-sheet .layer-switch svg,#editor-sheet .height-switch svg{width:24px;height:24px}#editor-sheet .layer-switch,#editor-sheet .height-switch{margin:0 0 12px}#editor-sheet .tool-list p{grid-column:1/-1;margin:0;display:block}#editor-sheet .editor-menu-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:16px;display:grid}#editor-sheet .editor-menu-items button{white-space:normal;padding:12px;font-size:13px}#editor-sheet input,#editor-sheet select{font-size:16px}@media (height<=499px){#editor-sheet{max-width:600px;max-height:88dvh}.mobile-editor .editor-topbar{padding-top:4px;padding-bottom:4px}.mobile-editor .track-title label,.mobile-editor .editor-status{display:none}.mobile-editor .editor-touch-bar{padding-top:4px;padding-bottom:max(4px, env(safe-area-inset-bottom))}#touch-tool-label{margin-bottom:3px}}.race-destroyed{z-index:12;left:50%;bottom:max(24px, env(safe-area-inset-bottom));color:#482a20;text-align:center;background:#fff6e9f2;border:1px solid #ef8051;border-radius:14px;gap:8px;width:min(390px,100% - 32px);padding:18px 22px;display:grid;position:absolute;transform:translate(-50%);box-shadow:0 8px 32px #371b1730}.race-destroyed[hidden]{display:none}.race-destroyed strong{font-size:23px}.race-destroyed button{min-height:44px}.race-destroyed small{opacity:.7}@media (height<=500px){.race-destroyed{gap:4px;padding:10px 16px;bottom:12px}.race-destroyed small{display:none}}.library-screen{isolation:isolate;color:#fff8e7;background:#122d29;flex-direction:column;flex:1;min-height:0;display:flex;position:relative;overflow:hidden}.library-backdrop{z-index:-2;object-fit:cover;object-position:65% center;filter:blur(7px);pointer-events:none;width:calc(100% + 30px);height:calc(100% + 30px);position:absolute;inset:-15px}.library-screen:before{content:"";z-index:-1;pointer-events:none;background:linear-gradient(120deg,#092620c9,#122b2870 65%,#10282499);position:absolute;inset:0}.library-screen .topbar{background:#102b2840;border-bottom:1px solid #fff8e720;flex-shrink:0;padding:22px max(28px,50% - 560px)}.library-screen .brand{letter-spacing:-.065em;text-shadow:0 3px #102d29;gap:0;font-size:30px;font-style:italic;font-weight:950}.library-screen .brand span{color:#ffbd60}.library-screen .home-content{min-height:0;padding-top:38px;padding-bottom:max(44px, env(safe-area-inset-bottom));background:0 0}.library-screen .home-intro{border-color:#fff8e730;padding-bottom:28px}.library-screen .eyebrow{color:#ffcf88}.library-screen .home-intro h1{text-shadow:0 4px #15362e,0 6px 20px #061d2840;margin:12px 0;font-size:clamp(40px,5vw,64px);font-style:italic;font-weight:900}.library-screen .home-intro>p{color:#e0e8da;font-size:13px}.library-screen button{min-height:44px;font-weight:650}.library-screen .secondary{color:#fff6e5;background:#193b32e6;border-color:#e5edce50;box-shadow:inset 0 1px #ffffff0a}.library-screen .secondary:hover:enabled{background:#365a46;border-color:#f2e7b77a}.library-screen #continue-project,.library-screen #create-project,.library-screen .project-card .actions>button:first-child{color:#322919;background:#ffbd60;border:1px solid #ffda98;box-shadow:0 3px #926036}.library-screen #continue-project:hover:enabled,.library-screen #create-project:hover:enabled,.library-screen .project-card .actions>button:first-child:hover:enabled{background:#ffd18b}.library-screen .home-actions{gap:12px}.library-screen .library-heading{margin:30px 0 18px}.library-screen .library-heading h2{margin:0;font-size:22px}.library-screen #project-list{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:20px}.library-screen .project-card{background:linear-gradient(135deg,#24483cef,#112f29f2);border:1px solid #e4efd444;border-top:3px solid #d2b486;border-radius:14px;flex-direction:column;padding:25px;display:flex;position:relative;box-shadow:0 10px 30px #051a2440,inset 0 1px #ffffff0a}.library-screen .project-card[data-ready=true]{border-top-color:#a7d69c}.library-screen .project-card h3{letter-spacing:-.025em;margin:22px 0 14px;font-size:25px;line-height:1.2}.library-screen .project-card small{color:#b9cbb9;font-size:11px}.project-meta{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;font-size:10px;display:flex}.project-status{color:#f3d2a0;background:#f0bd6c10;border:1px solid #f0d3a440;border-radius:5px;align-items:center;gap:7px;padding:6px 9px;display:inline-flex}.project-status:before{content:"";background:currentColor;border-radius:50%;flex-shrink:0;width:5px;height:5px}.project-card[data-ready=true] .project-status{color:#c0e6b1;background:#b4e4a510;border-color:#b4e4a540}.project-count{color:#d3decc;font-variant-numeric:tabular-nums}.library-screen .project-card .actions{gap:8px;margin-top:auto;padding-top:26px}.library-screen .project-card .actions>button:first-child{flex-basis:100%;margin-bottom:5px;font-size:14px}.library-screen .project-card .secondary{flex:1 0 auto;padding:9px 11px;font-size:11px}.library-screen .secondary.danger{color:#f5b3a3;background:#263b31}.library-screen .secondary.danger:hover:enabled{color:#ffe3d6;background:#693e33;border-color:#e5987b}.library-screen .empty-projects{color:#e0e8da;text-align:center;background:#123228c9;border:1px dashed #e6e9c85c;border-radius:14px;grid-column:1/-1;margin:0;padding:40px 26px;line-height:1.8}.library-screen .storage-notice{border-radius:10px;margin-top:18px}@media (width<=650px){.library-screen .topbar{padding:max(14px, env(safe-area-inset-top)) 16px 14px}.library-screen .brand{font-size:27px}.library-screen .home-content{padding-top:25px}.library-screen .home-intro h1{font-size:44px}.library-screen .project-card{padding:20px}}.car-dialog{color:#fff8e7;background:#15382f;border-color:#fff4;box-shadow:0 20px 80px #061d2880}.car-dialog .car-picker-help,.car-dialog .car-picker-status,.car-dialog .car-option-copy small{color:#c4d2be}.car-dialog .car-option{background:#1c3b32;border-color:#d5e4bc40}.car-dialog .car-option:has(input:checked){border-color:#ffbd60;box-shadow:0 0 0 1px #ffbd60}.car-dialog .car-option:hover{border-color:#e4d9a2}.car-dialog .car-option input{accent-color:#ffbd60}.car-dialog .car-selected{color:#322919;background:#ffbd60}.car-dialog button:focus-visible{outline-offset:4px;outline:3px solid #ffdc97}.car-dialog .car-option:has(input:focus-visible){outline-offset:4px;outline:3px solid #ffdc97}.car-dialog .car-dialog-close{color:#322919;background:#ffbd60;border-color:#ffda98;min-height:44px}.car-dialog .car-dialog-close:hover:enabled{background:#ffd18b}.library-screen button:focus-visible{outline-offset:4px;outline:3px solid #ffdc97}.start-car{background:#e6ebde;border:1px solid #18363120;border-radius:10px;align-items:center;gap:15px;margin-top:20px;padding:12px;display:flex}.start-car img{object-fit:cover;border-radius:7px;flex-shrink:0;width:108px;height:72px}.start-car-copy{gap:5px;min-width:0;display:grid}.start-car-copy small{color:#576d63;font-size:10px}.start-car-copy strong{overflow-wrap:anywhere;font-size:13px;line-height:1.4}.pause-card #start-change-car{justify-content:flex-start;gap:7px;width:auto;min-height:36px;margin:2px 0 0;padding:8px;font-size:11px}#start-change-car svg{fill:none;stroke:currentColor;stroke-width:1.7px;stroke-linecap:round;stroke-linejoin:round;width:18px;height:18px}@media (width<=380px),(height<=499px){.start-car{gap:10px;margin-top:12px;padding:8px}.start-car img{width:84px;height:56px}}#obstacle-controls{margin:16px 0}#obstacle-controls fieldset{border:0;min-width:0;margin:0 0 14px;padding:0}#obstacle-controls legend{margin-bottom:8px;padding:0;font-size:12px;font-weight:650}.obstacle-size>div{gap:4px;display:flex}.obstacle-size button{color:#254339;background:#e3e8db;flex:1;min-width:0;padding:8px 3px;font-size:11px}.obstacle-slots{width:100%;max-width:240px;height:190px;margin:0 auto;position:relative}.obstacle-slots:before{content:"";clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);background:#dce6c6;position:absolute;inset:0}.obstacle-slots button{left:var(--slot-x);top:var(--slot-y);color:#42603a;width:32px;height:32px;box-shadow:none;background:#f3f4eb;border:1px solid #78916c;border-radius:50%;place-items:center;padding:0;font-size:17px;display:grid;position:absolute;transform:translate(-50%,-50%)}#obstacle-controls button[aria-pressed=true]{color:#fff;background:#28543d}#obstacle-controls button:focus-visible{outline-offset:2px;outline:3px solid #c77933}.obstacle-hint{color:#526153;margin:0;font-size:11px;line-height:1.5}@media (pointer:coarse){.obstacle-slots{max-width:270px;height:240px}.obstacle-slots button{width:44px;height:44px}.obstacle-size button{min-height:44px;font-size:13px}}.mobile-editor .obstacle-slots{max-width:270px;height:240px}.mobile-editor .obstacle-slots button{width:44px;height:44px}.mobile-editor .obstacle-size button{min-height:44px;font-size:13px}
