:root{--bg:#1b2130;--panel:#232a3b;--panel-2:#2c3449;--line:#ffffff17;--text:#eef1f7;--muted:#9aa3b8;--accent:#ff6b35;--accent-2:#ff8a5c;--good:#5fd68f;--radius:14px;--hud-h:60px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}html,body{overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:100%;margin:0;overflow:hidden}#app{position:fixed;inset:0}#stage{position:absolute;inset:0}#game{touch-action:none;display:block}[hidden]{display:none!important}.btn{border:1px solid var(--line);background:var(--panel-2);min-height:40px;color:var(--text);cursor:pointer;border-radius:10px;justify-content:center;align-items:center;gap:6px;padding:0 14px;font:600 14px/1 inherit;transition:background .15s,transform .1s;display:inline-flex}.btn:hover{background:#36405a}.btn:active{transform:translateY(1px)}.btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.btn.primary{background:var(--accent);color:#1b1208;border-color:#0000}.btn.primary:hover{background:var(--accent-2)}.btn.ghost{background:0 0}.btn.ghost:hover{background:#ffffff0f}.btn span[aria-hidden=true]{font-size:20px;line-height:1}.hud{height:calc(var(--hud-h) + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);z-index:5;background:#141925e0;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;display:grid;position:absolute;top:0;left:0;right:0}.hud-title{align-items:center;gap:10px;min-width:0;display:flex}.hud-name{white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:700;overflow:hidden}.grade-chip{color:#fff;background:var(--chip,var(--accent));text-shadow:0 1px 1px #0000004d;border-radius:999px;flex:none;padding:4px 9px;font:800 12px/1 inherit}.hud-right{align-items:center;gap:12px;display:flex}.stat{flex-direction:column;align-items:flex-end;display:flex}.stat-label{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-size:10px}.stat-value{font-variant-numeric:tabular-nums;font-size:18px;font-weight:800}.stamina-stat{min-width:72px}.stamina-bar{background:#ffffff1f;border-radius:999px;width:72px;height:8px;margin-top:4px;overflow:hidden}.stamina-fill{width:calc(var(--v,1) * 100%);border-radius:inherit;background:var(--good);height:100%;transition:width 80ms linear,background .15s}.stamina-bar.exhausted .stamina-fill{background:#e0483d}.hint{left:50%;bottom:max(18px, env(safe-area-inset-bottom));color:#ffe6a6;text-align:center;z-index:4;pointer-events:none;background:#141925e6;border:1px solid #ffdc7866;border-radius:999px;max-width:min(92vw,420px);padding:10px 16px;font-size:14px;position:absolute;transform:translate(-50%)}.toast{top:calc(env(safe-area-inset-top) + 18px);color:#fff;z-index:40;pointer-events:none;background:#e0483df2;border-radius:12px;padding:10px 18px;font-weight:700;animation:.25s ease-out pop;position:fixed;left:50%;transform:translate(-50%)}.toast.ok{background:#2f8c5af2}@keyframes pop{0%{opacity:0;transform:translate(-50%,-8px)scale(.96)}}.screen{z-index:10;-webkit-overflow-scrolling:touch;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);-webkit-user-select:text;user-select:text;background:linear-gradient(#141925d1,#141925f5);position:absolute;inset:0;overflow-y:auto}.menu-inner{max-width:760px;padding:calc(28px + env(safe-area-inset-top)) 18px calc(36px + env(safe-area-inset-bottom));margin:0 auto}.brand{align-items:center;gap:14px;margin-bottom:26px;display:flex}.logo{background:#dcb887;border-radius:16px;width:56px;height:56px;padding:6px}.brand h1{letter-spacing:-.02em;margin:0;font-size:34px}.tagline{color:var(--muted);margin:2px 0 0}.section-title{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 12px;font-size:13px}.section-head{justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.section-head .section-title{margin:0}.build-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.empty-note{color:var(--muted);margin:-12px 0 28px;font-size:13px}.empty-note[hidden]{display:none!important}.route-list{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:0 0 28px;padding:0;list-style:none;display:grid}.route-item{border-radius:var(--radius);border:1px solid var(--line);background:var(--panel);flex-direction:column;gap:0;transition:transform .12s,border-color .12s,background .12s;display:flex;position:relative;overflow:hidden}.route-item:before{content:"";background:var(--route);z-index:1;width:6px;position:absolute;top:0;bottom:0;left:0}.route-item:hover{background:var(--panel-2);border-color:#fff3;transform:translateY(-2px)}.route-item.is-locked{opacity:.55}.route-item.is-locked:hover{border-color:var(--line);background:var(--panel);transform:none}.route-card:disabled{cursor:not-allowed}.route-card{width:100%;color:var(--text);text-align:left;cursor:pointer;background:0 0;border:none;flex-direction:column;flex:1;gap:8px;padding:14px 14px 10px 18px;font-family:inherit;display:flex}.route-card:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.route-item-actions{border-top:1px solid var(--line);display:flex}.route-item-actions .btn{background:0 0;border:none;border-radius:0;flex:1;min-height:36px;font-size:13px}.route-item-actions .btn:hover{background:#ffffff0f}.route-top{justify-content:space-between;align-items:center;gap:8px;display:flex}.route-name{font-size:17px;font-weight:700}.route-note{color:var(--muted);margin:0;font-size:13px;line-height:1.4}.route-status{color:var(--muted);margin-top:auto;font-size:12px;font-weight:600}.route-status.sent{color:var(--good)}.how ul{border-radius:var(--radius);background:var(--panel);border:1px solid var(--line);color:#cdd3e1;margin:0;padding:16px 18px 16px 34px;font-size:14px;line-height:1.55}.how li+li{margin-top:6px}.how strong{color:var(--text)}.modal-backdrop{z-index:20;background:#0a0d148c;place-items:center;padding:18px;animation:.2s ease-out fade;display:grid;position:absolute;inset:0}@keyframes fade{0%{opacity:0}}.modal{background:var(--panel);border:1px solid var(--line);text-align:center;border-radius:20px;width:min(100%,400px);padding:24px;animation:.3s cubic-bezier(.2,1.4,.4,1) pop-in;box-shadow:0 30px 60px #00000073}@keyframes pop-in{0%{opacity:0;transform:scale(.9)}}.eyebrow{letter-spacing:-.02em;color:var(--accent);margin:0;font-size:40px;font-weight:900}.modal-name{color:var(--muted);margin:4px 0 18px;font-size:17px;font-weight:600}.sent-stats{grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:10px;display:grid}@media (width>=420px){.sent-stats{grid-template-columns:repeat(4,1fr)}}.sent-stats>div{background:var(--panel-2);border-radius:12px;flex-direction:column;gap:4px;padding:10px 6px;display:flex}.sent-note{min-height:20px;color:var(--good);margin:6px 0 16px;font-size:14px;font-weight:600}.modal-actions{gap:8px;display:grid}.modal-actions .btn{min-height:46px;font-size:15px}.editor-bar{z-index:5;padding:calc(8px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left));-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);-webkit-user-select:text;user-select:text;background:#141925eb;flex-direction:column;gap:8px;display:flex;position:absolute;top:0;left:0;right:0}.editor-view-note{letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-size:12px}.editor-bar.view-only .hold-palette,.editor-bar.view-only .tool-group,.editor-bar.view-only #editor-selected,.editor-bar.view-only #btn-save,.editor-bar.view-only #btn-delete-route{display:none}.editor-bar.view-only .color-swatches{pointer-events:none;opacity:.65}.editor-meta{gap:10px}.editor-input,.editor-select{border:1px solid var(--line);background:var(--panel-2);min-height:36px;color:var(--text);border-radius:8px;padding:0 10px;font:600 14px/1 inherit}.editor-input{flex:140px;min-width:120px;max-width:220px}.editor-select.compact{min-height:32px;font-size:13px}.editor-height{color:var(--muted);align-items:center;gap:8px;display:flex}.editor-height input[type=range]{width:100px;accent-color:var(--accent)}.color-swatches{flex-wrap:wrap;gap:6px;display:flex}.color-swatch{cursor:pointer;background:var(--swatch);border:2px solid #0000;border-radius:999px;width:24px;height:24px;padding:0}.color-swatch.active{border-color:#fff;box-shadow:0 0 0 2px #00000059}.tool-group,.hold-palette{flex-wrap:wrap;gap:4px;display:flex}.hold-chip{border:1px solid var(--line);width:52px;color:var(--text);cursor:pointer;font:inherit;background:#2a3144;border-radius:8px;flex-direction:column;align-items:center;gap:2px;padding:4px 2px 3px;display:flex}.hold-chip canvas{width:44px;height:36px;display:block}.hold-chip span{letter-spacing:.01em;font:600 9px/1 inherit}.hold-chip.active,.tool-btn.active{background:var(--accent);color:#1b1208;border-color:#0000}.tool-btn{border:1px solid var(--line);background:var(--panel-2);min-height:34px;color:var(--text);cursor:pointer;text-transform:capitalize;border-radius:8px;padding:0 12px;font:600 13px/1 inherit}.selected-panel{border:1px solid var(--line);background:#ffffff0a;border-radius:8px;align-items:center;gap:8px;padding:4px 8px;display:flex}.editor-actions{flex-wrap:wrap;gap:6px;margin-left:auto;display:flex}.btn.danger{color:#ff8a7a}.btn.danger:hover{background:#e0483d2e}.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}.editor-errors{color:#ffb4a8;flex-wrap:wrap;gap:6px 12px;margin:0;padding:0;font-size:12px;font-weight:600;list-style:none;display:flex}.editor-errors li:before{content:"· "}@media (width<=560px){:root{--hud-h:54px}.hide-sm{display:none}.hud-name{font-size:14px}.btn{padding:0 11px}.brand h1{font-size:28px}.editor-actions{width:100%;margin-left:0}.editor-actions .btn{flex:1}.editor-height input[type=range]{width:72px}}.brand-row{justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:26px;display:flex}.brand-row .brand{margin-bottom:0}.account-wrap{flex:none;position:relative}.account-chip{min-width:96px}.account-menu{z-index:30;border:1px solid var(--line);background:var(--panel);border-radius:12px;flex-direction:column;min-width:160px;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 16px 40px #0006}.account-menu .btn{background:0 0;border:none;justify-content:flex-start;min-height:38px}.eyebrow.small{margin-bottom:8px;font-size:22px}.muted{color:var(--muted);margin:0 0 12px;font-size:14px}.modal-name.left{text-align:left}.auth-form{text-align:left;gap:12px;margin:12px 0;display:grid}.field{gap:6px;display:grid}.field input,.field select{border:1px solid var(--line);background:var(--panel-2);min-height:42px;color:var(--text);border-radius:10px;padding:0 12px;font:600 15px/1 inherit}.form-error{color:#ff8a7a;text-align:left;min-height:18px;margin:0;font-size:13px;font-weight:600}.customize-inner{max-width:720px}.customize-layout{grid-template-columns:220px 1fr;align-items:start;gap:24px;display:grid}@media (width<=640px){.customize-layout{grid-template-columns:1fr;justify-items:center}.customize-controls{width:100%}}.customize-preview{border:1px solid var(--line);background:#1b2130;border-radius:16px;width:220px;height:280px;display:block}.customize-colors{gap:12px;margin-bottom:8px;display:grid}.customize-row{gap:8px;display:grid}.customize-chips{flex-wrap:wrap;gap:6px;margin-bottom:8px;display:flex}.customize-chip.active{border-color:var(--accent);color:#fff;background:#ff6b352e}.subsection-title{margin:8px 0 10px;font-size:15px;font-weight:700}.history-list{gap:8px;margin:0 0 22px;padding:0;list-style:none;display:grid}.history-item{border:1px solid var(--line);background:var(--panel);border-radius:12px;flex-wrap:wrap;justify-content:space-between;gap:6px 12px;padding:12px 14px;display:flex}.history-route{font-weight:700}.history-meta{color:var(--muted);font-size:13px;font-weight:600}.race-lobby-inner{max-width:420px}.race-code-block{background:var(--panel);border:1px solid var(--line);text-align:center;border-radius:16px;margin:16px 0;padding:16px}.race-code{letter-spacing:.28em;font-variant-numeric:tabular-nums;margin:6px 0 0;font-size:40px;font-weight:900}.race-code-input{text-transform:uppercase;letter-spacing:.28em;text-align:center;font-size:22px!important;font-weight:800!important}.race-player-list{gap:8px;margin:0 0 14px;padding:0;list-style:none;display:grid}.race-player-list li{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:12px 14px;font-weight:600}.race-opponent{top:calc(var(--hud-h) + env(safe-area-inset-top) + 10px);right:max(10px, env(safe-area-inset-right));z-index:6;border:1px solid var(--line);pointer-events:none;background:#141925e6;border-radius:12px;flex-direction:column;align-items:flex-end;gap:2px;max-width:min(52vw,220px);padding:10px 12px;display:flex;position:absolute}.race-opp-stats{color:var(--muted);text-align:right;font-size:12px;font-weight:600}.race-countdown{z-index:25;color:#fff;text-shadow:0 8px 40px #0000008c;pointer-events:none;background:#0a0d1473;place-items:center;font-size:clamp(64px,18vw,120px);font-weight:900;display:grid;position:absolute;inset:0}.race-result{background:var(--panel-2);border-radius:12px;margin:8px 0 4px;padding:12px}.race-result-title{margin:0 0 6px;font-size:20px;font-weight:900}.race-result-title.won{color:var(--good)}.race-result-title.lost{color:#ff8a7a}.race-rematch-status{margin:8px 0 0}#btn-race-rematch{width:100%;margin-top:12px}
