/* Render-only integration: all existing panels and event handlers retain their IDs. */
#godotCanvas {position:absolute!important;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;background:#071d29;}
#gameCanvas {position:relative;z-index:1;background:transparent!important;}
.godot-ready #bg-3d,.godot-ready #world-branding {visibility:hidden;}
.godot-ready #game-container::before,.godot-ready #game-container::after {opacity:0.15;}
#godot-loading {position:absolute;left:50%;bottom:22px;transform:translateX(-50%);z-index:2000;background:#092332ed;color:#b9ffdf;padding:12px 22px;border:1px solid #5da8a266;border-radius:12px;font:600 13px system-ui;pointer-events:none;}
#nd-3d-controls {position:absolute;right:14px;bottom:12px;z-index:9;display:flex;gap:8px;}
#nd-3d-controls button {border:1px solid #85d6ce66;background:#0b2633e8;color:#baffdf;border-radius:8px;padding:9px 12px;font:600 10px system-ui;cursor:pointer;}
#nd-3d-controls button:focus-visible {outline:2px solid #baffdf;outline-offset:3px;}
.godot-ready .panel {background-color:#071b2be8;backdrop-filter:blur(12px);}
.godot-ready .premium-button {box-shadow:0 5px 20px #03151d80;}
@media(max-width:600px){#nd-3d-controls{bottom:6px;right:6px;gap:4px;}#nd-3d-controls button{font-size:8px;padding:7px;}}
#preview-badge {position:fixed;bottom:0;left:0;right:0;z-index:3000;text-align:center;padding:5px;background:#09242f;color:#aad8d0;font:10px system-ui;pointer-events:none;}

.godot-ready #pixi-background-canvas {visibility:hidden!important;}

/* Shared shell: one scrolling surface, responsive navigation, consistent cards. */
:root {--shell-bg:#070812;--shell-panel:#101321;--shell-line:#7479ab35;--shell-muted:#a9afcb;--shell-cyan:#74efff;}
#start-overlay,#menu-overlay {background:radial-gradient(ellipse at 80% 0%,#44216b45,transparent 55%),linear-gradient(145deg,#080914f5,#0c1220f2);}
#update-banner {display:none;}
#menu-ambient {display:none;}
#menu-overlay {align-items:flex-start;padding:24px clamp(12px,3vw,40px) 32px;box-sizing:border-box;}
.menu-content-wrapper {display:grid;grid-template-columns:180px minmax(0,1fr);grid-template-rows:auto auto 1fr;align-items:start;gap:18px 28px;width:min(1180px,100%);max-height:none;overflow:visible;margin:0 auto;}
.menu-logo {grid-column:1;grid-row:1;width:180px!important;height:100px!important;object-fit:cover;filter:none!important;margin:0!important;}
.unlock-note {grid-column:2;grid-row:1;align-self:center;margin:0!important;color:var(--shell-muted);font:600 12px system-ui;letter-spacing:2px;text-align:left;}
.menu-account {grid-column:1;grid-row:3;min-width:0;border-top:1px solid var(--shell-line);padding-top:16px;color:var(--shell-muted);font:13px/1.5 system-ui;}
.menu-account summary {cursor:pointer;padding:12px 0;min-height:24px;color:#e1e8ff;}
.menu-account #auth-card {width:100%;margin:8px 0;padding:12px;box-sizing:border-box;border:1px solid var(--shell-line);background:#111524;box-shadow:none;}
.menu-account .auth-row {flex-wrap:wrap;gap:8px;}
.menu-account .auth-email-input {width:100%;min-width:0;box-sizing:border-box;}
.menu-account .auth-status {font:12px/1.5 system-ui;}
.menu-tabs {grid-column:1;grid-row:2;display:flex;flex-direction:column;width:100%;gap:10px;margin:0;}
.menu-tabs .main-btn {width:100%;min-height:52px;justify-content:flex-start;gap:14px;padding:14px 16px;border-radius:12px;font-size:12px;background:#14182a;border:1px solid var(--shell-line);box-shadow:none;}
.menu-tabs .main-btn.active {background:linear-gradient(110deg,#392760,#1c3a4a);border-color:#a68afc88;box-shadow:inset 3px 0 #9cecff;}
.menu-content-wrapper > .panel {grid-column:2;grid-row:2 / 4;width:100%;height:auto;max-height:none;overflow:visible;box-sizing:border-box;margin:0;padding:24px;border:1px solid var(--shell-line);border-radius:20px;background:#0d1120e8!important;box-shadow:0 16px 60px #0004;}
.panel-helper-text {font:14px/1.6 system-ui!important;color:var(--shell-muted)!important;margin:0 0 22px!important;}
.premium-button,.boost-action {border-radius:10px;min-height:44px;letter-spacing:0.5px;}
.store-subtabs {display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 24px;padding:0;border:0;background:none;}
.store-subtabs .store-tab {flex:1 1 110px;min-height:44px;padding:10px;font-size:10px;background:#181c30;box-shadow:none;}
.store-subtabs .store-tab.active {background:#34265b;border-color:#b995ff;}
.skin-grid,.boost-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;}
.skin-card,.boost-card {border-radius:16px;padding:18px;box-sizing:border-box;border:1px solid var(--shell-line);background:linear-gradient(145deg,#181b30,#0c101d);box-shadow:none;min-width:0;}
.boost-card {display:flex;flex-direction:column;align-items:stretch;gap:10px;}
.boost-card.locked {opacity:1;}
.boost-card .boost-preview {height:146px;width:100%;overflow:hidden;border-radius:12px;background:#060710;display:grid;place-items:center;box-shadow:none;}
.boost-preview:has(.shop-item-art)::before,.boost-preview:has(.shop-item-art)::after {display:none;}
.shop-item-art {width:100%;height:100%;object-fit:cover;display:block;}
.boost-name {font:700 14px/1.4 Orbitron,system-ui;}
.boost-description,.boost-checkout-status {font:13px/1.5 system-ui;color:var(--shell-muted);}
.boost-action {margin-top:auto;}
.boost-meta-row {flex-wrap:wrap;gap:8px;}
.start-screen-content {gap:18px;width:min(720px,92%);}
.start-logo {width:100%;height:clamp(170px,28vw,300px);object-fit:cover;filter:none;}
.start-tagline {font:16px/1.6 system-ui;color:#c5cbe5;}
.tap-to-start {padding:18px 34px;border:1px solid #be91fa88;border-radius:14px;background:linear-gradient(115deg,#3b235e,#193c50);font:700 13px Orbitron;}
.start-best-score {font:12px system-ui;color:var(--shell-muted);}
.overlay .prompt-box {background:linear-gradient(145deg,#18182bed,#0c1424fa);border:1px solid #8e8ab64d;border-radius:22px;box-shadow:0 20px 100px #0009;max-width:min(520px,90vw);box-sizing:border-box;padding:28px;}
.prompt-box p {font:14px/1.6 system-ui;color:#bec6e0;}
.prompt-box h2 {font-size:clamp(18px,4vw,26px);line-height:1.35;}
.prompt-btns {flex-wrap:wrap;gap:12px;}
#godot-loading {width:min(320px,80vw);box-sizing:border-box;text-align:center;padding:20px;border-radius:16px;background:#111324f5;color:#c4f7ff;border:1px solid #a88cfd55;box-shadow:0 10px 45px #0006;}
#godot-loading::before {content:'';display:block;width:56px;height:56px;margin:0 auto 10px;background:url('assets/brand/icon.png') center/cover;border-radius:12px;}
#nd-3d-controls {display:none;}
body:has(#hud:not(.hidden)) #nd-3d-controls {display:flex;}
.level-grid {grid-template-columns:repeat(auto-fill,minmax(66px,1fr));gap:10px;}
#panel-records pre {font:12px/1.5 monospace;overflow:auto;}
@media(max-width:760px) {
 #menu-overlay {padding:12px 12px 30px;}
 .menu-content-wrapper {grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto;gap:14px;}
 .menu-logo {grid-column:1;grid-row:1;width:210px!important;height:90px!important;justify-self:center;}
 .unlock-note {display:none;}
 .menu-tabs {grid-column:1;grid-row:2;flex-direction:row;position:sticky;top:0;z-index:10;padding:8px 0;background:#090d19f5;}
 .menu-tabs .main-btn {justify-content:center;flex:1;min-width:0;padding:12px 6px;gap:7px;font-size:10px;}
 .menu-tabs .button-icon {font-size:16px;}
 .menu-account {grid-column:1;grid-row:3;padding:0;border:1px solid var(--shell-line);border-radius:12px;}
 .menu-account summary {padding:12px 16px;}
 .menu-account #auth-card {margin:0;border:0;}
 .menu-content-wrapper > .panel {grid-column:1;grid-row:4;padding:16px;border-radius:16px;}
 .skin-grid,.boost-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
 .skin-card,.boost-card {padding:12px;}
 .boost-card .boost-preview {height:120px;}
 .boost-name {font-size:11px;overflow-wrap:anywhere;}
 .boost-description {font-size:12px;}
 .store-subtabs .store-tab {flex:1 1 85px;font-size:9px;}
 .custom-levels-open-actions,.levels-boost-loadout {flex-wrap:wrap;}
 .infinity-zone-cards {grid-template-columns:1fr;}
 .overlay .prompt-box {padding:22px;}
 #preview-badge {font-size:9px;}
}
@media(max-width:360px) {.skin-grid,.boost-grid{grid-template-columns:1fr;}}
@media(prefers-reduced-motion:reduce) {#menu-overlay *,#start-overlay *{animation:none!important;transition:none!important;}}

.menu-logo,.start-logo{object-fit:contain;}
.edition-choices{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;}
.edition-choices a{padding:12px 18px;border:1px solid #8c8cab55;border-radius:12px;color:#c4c9df;background:#11182b;text-decoration:none;font:600 12px system-ui;min-height:44px;box-sizing:border-box;display:flex;align-items:center;}
.edition-choices a[aria-current="true"]{border-color:#ac8aff;background:linear-gradient(110deg,#392760,#1c3a4a);color:white;}
.menu-editions{grid-column:2;grid-row:1;align-self:center;justify-content:flex-end;}
@media(max-width:760px){.menu-editions{grid-column:1;grid-row:1;justify-self:end;align-self:start;}.menu-editions a{padding:6px 9px;font-size:10px;min-height:32px;}.menu-logo{justify-self:start;width:150px!important;}}

@media(max-width:480px){.menu-logo{width:110px!important;}.menu-editions{gap:6px;}}
