/* Readable arcade menus and controls; gameplay rendering stays independent. */
@font-face{font-family:'Budwee Arcade';src:url('assets/fonts/VT323-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
:root{--arcade-type:'Budwee Arcade','Courier New',monospace;--ui-type:system-ui,-apple-system,'Segoe UI',sans-serif;--arcade-panel:#141a2b;--arcade-cream:#fff4ce;--arcade-gold:#ffd267;--arcade-cyan:#71e5ed}

/* Menus use the whole viewport, so short screens retain readable text. */
#gameScreen{position:fixed;inset:0;padding:20px;z-index:50;background:#080d1bd9;display:grid;place-items:center;backdrop-filter:blur(5px)}
.game-viewport:has(>#gameScreen:not(.hidden)){z-index:10}
#gameScreen .screen-card,:is(#howDialog,#levelsDialog){font:500 18px/1.5 var(--ui-type);color:var(--arcade-cream);background:linear-gradient(145deg,#222b43,#111728);border:3px solid var(--arcade-gold);border-radius:6px;box-shadow:0 0 0 3px #080e1e,0 0 0 5px #50607d,8px 8px 0 #05091499,inset 0 0 0 3px #39405a;scrollbar-color:var(--arcade-gold) #182136;max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain;scroll-padding:20px;overflow-wrap:anywhere}
#gameScreen .screen-card{width:min(100%,540px);min-width:0;max-width:540px;padding:28px 30px 22px;text-align:center}
#gameScreen .screen-badge,:is(#howDialog,#levelsDialog) .eyebrow{font:700 14px/1.4 var(--ui-type);color:var(--arcade-cyan);letter-spacing:.7px;text-transform:uppercase}
#gameScreen .screen-card h2,:is(#howDialog,#levelsDialog) h2{font:400 44px/1.1 var(--arcade-type);letter-spacing:.5px;text-transform:uppercase;color:var(--arcade-gold);margin:14px 0;text-shadow:2px 3px #090f20}
#gameScreen .screen-card>p,:is(#howDialog,#levelsDialog)>p{font:500 19px/1.5 var(--ui-type);color:#f3efdf;margin:0 0 20px;max-width:46ch}
#gameScreen .screen-illustration{display:none}
#gameScreen .screen-results{display:flex;justify-content:center;flex-wrap:wrap;gap:18px 28px;font:500 17px/1.4 var(--ui-type);color:#d0dced;padding:5px 0 20px}
#gameScreen .screen-results b{display:block;font:400 36px/1.1 var(--arcade-type);color:var(--arcade-cyan)}
#gameScreen .primary-button,:is(#howDialog,#levelsDialog) .primary-button,#startOverlay .primary-button{font:750 18px/1.3 var(--ui-type);letter-spacing:.3px;text-transform:uppercase;min-height:56px;padding:12px 18px;border:2px solid #fff0a4;border-bottom:5px solid #a74f23;border-radius:4px;background:linear-gradient(#ffd66f,#efad3c);color:#18182a;box-shadow:0 3px 0 #050b19;text-shadow:none;white-space:normal;max-width:100%;overflow-wrap:anywhere}
#gameScreen .primary-button:hover,:is(#howDialog,#levelsDialog) .primary-button:hover,#startOverlay .primary-button:hover{background:#ffe89a}
#gameScreen .text-button,:is(#howDialog,#levelsDialog) .text-button{font:650 17px/1.4 var(--ui-type);color:var(--arcade-cyan);min-height:48px;padding:12px 8px;letter-spacing:0;text-decoration:underline;text-underline-offset:4px;white-space:normal;max-width:100%}
:is(#howDialog,#levelsDialog){width:min(600px,calc(100vw - 32px));padding:28px;max-height:calc(100dvh - 32px)}
:is(#howDialog,#levelsDialog)::backdrop{background:#070b19d9;backdrop-filter:blur(5px)}
:is(#howDialog,#levelsDialog) .modal-close{width:44px;height:44px;background:#303c57;color:#fff2c7;border:2px solid #7184a2}
#howDialog .instruction-row{border-top:1px solid #3f4d68;padding-top:17px;gap:15px}
#howDialog .instruction-row>span{font:700 18px/1.5 var(--ui-type);color:var(--arcade-cyan);flex:0 0 24px;white-space:nowrap}
#howDialog .instruction-row strong{font:750 19px/1.4 var(--ui-type);color:var(--arcade-gold)}
#howDialog .instruction-row p,#howDialog .modal-note{font:500 18px/1.5 var(--ui-type);color:#e2e9f3;margin-top:7px}
#howDialog .modal-note{background:#253149;border:1px solid #4d617c;padding:14px;margin:20px 0}
#levelsDialog .level-picker{gap:12px}
#levelsDialog .level-pick{background:#202b43;border:2px solid #4d6380;border-bottom:4px solid #080e1a;min-height:76px;padding:12px 14px;border-radius:3px;color:#fff4ce}
#levelsDialog .level-pick.current,#levelsDialog .level-pick:hover:enabled{background:#34435d;border-color:var(--arcade-gold)}
#levelsDialog .level-pick strong{font:750 19px/1.3 var(--ui-type);color:#fff4ce}
#levelsDialog .level-pick small{font:600 15px/1.4 var(--ui-type);color:var(--arcade-cyan);letter-spacing:0}
#levelsDialog .level-pick-number{font:400 30px/1 var(--arcade-type);color:var(--arcade-gold);min-width:30px}
#levelsDialog .level-pick svg{color:var(--arcade-cyan)}

/* Checkpoint, growth and finish notices remain readable during play. */
:is(#checkpointToast,#powerupToast){font:700 17px/1.4 var(--ui-type);color:var(--arcade-cream);background:#18233af5;border:2px solid var(--arcade-gold);border-bottom:4px solid #9b632f;border-radius:3px;max-width:calc(100% - 24px);padding:12px 14px;box-shadow:3px 3px 0 #070d1c99;white-space:normal;text-align:center;min-width:0;overflow-wrap:anywhere}
#powerupToast{top:76px;border-color:#f18aca;border-bottom-color:#803d79}
#burgerParty{background:#111a30f2;border:2px solid var(--arcade-gold);box-shadow:4px 4px 0 #090c1d;color:var(--arcade-cream);padding:10px 13px;max-width:80%;text-shadow:1px 2px #080d1b}
#burgerParty>span{font:700 13px/1.4 var(--ui-type);color:var(--arcade-cyan);letter-spacing:.3px}
#burgerParty>strong{font:400 36px/1.1 var(--arcade-type);letter-spacing:.5px;margin:3px 0;color:#ff98c5}
#burgerParty>small{font:600 16px/1.4 var(--ui-type)}

/* Cabinet skin only: retro.css owns the enlarged thumb targets and layout. */
body.console-only #gameShell{background:linear-gradient(135deg,#30364d,#1b2236 55%,#12192b);border-color:#65718a;box-shadow:0 4px 0 #0a1020,inset 1px 1px 0 #7c8498}
.console-branding .console-wordmark{color:#fff0bf;text-shadow:0 2px #080d18}
.console-branding .console-wordmark span,.console-branding .console-power b{color:#b9cbe2}
#touchControls.controller-deck{background:linear-gradient(150deg,#212b41,#11182a);border-top:3px solid #ffcc5b;border-radius:10px 10px 20px 20px;box-shadow:inset 0 1px #ffe69555}
#touchControls .control-caption,#touchControls .pad-hint{font:750 13px/1.3 var(--ui-type);letter-spacing:.3px;color:var(--arcade-cream);text-shadow:1px 2px #080d1b}
#touchControls .pad-hint{font-size:12px;color:var(--arcade-cyan)}
#touchControls .dpad{filter:drop-shadow(0 4px 0 #080e1a)}
#touchControls .dpad::before{background:#72839f}
#touchControls .dpad button,#touchControls .pad-center{background:linear-gradient(145deg,#35425a,#141c2d);color:#dfeeff;font-size:18px;text-shadow:0 2px #060a13}
#touchControls .pad-center{background:#233047}
#touchControls .dpad button:is(:active,.pressed,.is-pressing,.tap-feedback){background:#111a2a;color:var(--arcade-gold);box-shadow:inset 0 4px 8px #050910,inset 0 0 0 2px #f5d67d;text-shadow:0 0 8px #f5d67d}
#touchControls .action-controls{background:#0c1325;border:1px solid #435772;box-shadow:inset 2px 2px 4px #050b18,0 1px #8190a6}
#touchControls .action-controls .button-cap{font:400 32px/1 var(--arcade-type);color:#071421;border:2px solid #affcff;border-bottom:5px solid #197b9b;background:radial-gradient(circle at 35% 25%,#b5fdff,#3acbe4 60%,#178bab);box-shadow:0 3px 0 #060b17,0 0 0 4px #34435a,0 0 0 5px #71849e;text-shadow:0 1px #d5ffff}
#touchControls .burp-control .button-cap{background:radial-gradient(circle at 35% 25%,#fff3a8,#ffd05d 60%,#d18c25);border-color:#fff7c8;border-bottom-color:#9a5b20;text-shadow:0 1px #fff6bc}
#touchControls .jump-control .button-cap{background:radial-gradient(circle at 35% 25%,#ffb4bb,#ef4c6d 60%,#b3254d);color:#fff4e8;border-color:#ffd1d4;border-bottom-color:#8c1b3d;text-shadow:0 2px #8c1839}
#touchControls .action-controls button small{font:750 14px/1.3 var(--ui-type);letter-spacing:.2px;color:var(--arcade-cream)}
#touchControls .action-controls button:is(:active,.pressed,.is-pressing,.tap-feedback) .button-cap{transform:translateY(4px) scale(.96);filter:brightness(1.28);border-bottom-width:2px;box-shadow:inset 0 3px 8px #2b123b77,0 0 0 4px #ffe49b,0 0 15px #fff0bbaa}
#touchControls .mini-buttons button{color:var(--arcade-cream)}
#touchControls .mini-buttons button>span{border:1px solid #c8f7ff;border-bottom:4px solid #1d6b88;border-radius:4px;background:linear-gradient(#83e9f2,#32a8c0);box-shadow:0 2px 0 #070d1b,0 0 0 3px #3a4a62}
#touchControls #startToggleButton>span{background:linear-gradient(#ffe69b,#eeb744);border-color:#fff4cc;border-bottom-color:#926225}
#touchControls .mini-buttons button>small{font:750 13px/1.3 var(--ui-type);letter-spacing:.2px;color:var(--arcade-cream)}
#touchControls .controller-model{font:600 12px/1.3 var(--ui-type);letter-spacing:.2px;color:#c7d4e5}
#touchControls .speaker-grille i{background:#080f20;box-shadow:1px 1px #52617b}

@media(max-width:760px) and (orientation:portrait){
  #gameScreen{padding:16px}
  #gameScreen .screen-card{padding:22px 20px 18px}
  #gameScreen .screen-card h2,:is(#howDialog,#levelsDialog) h2{font-size:40px}
  #gameScreen .screen-card>p,:is(#howDialog,#levelsDialog)>p{font-size:19px}
  :is(#howDialog,#levelsDialog){padding:24px 20px}
  #touchControls .control-caption{font-size:13px}
  #touchControls .pad-hint{font-size:12px;letter-spacing:.2px}
  #touchControls .mini-buttons button>small{font-size:13px;letter-spacing:0}
  #touchControls .controller-model,#touchControls .speaker-grille{display:none}
  #touchControls .action-controls button small{font-size:14px;letter-spacing:.2px}
  #touchControls .action-controls .button-cap{font-size:28px}
  #burgerParty>span{font-size:13px}#burgerParty>strong{font-size:32px}#burgerParty>small{font-size:16px}
}

/* The newer fullscreen invitation shares the same readable arcade menus. */
#fullscreenDialog{font:500 18px/1.5 var(--ui-type);color:var(--arcade-cream);background:linear-gradient(145deg,#222b43,#111728);border:3px solid var(--arcade-gold);border-radius:6px;box-shadow:0 0 0 3px #080e1e,0 0 0 5px #50607d;max-height:calc(100dvh - 32px);overflow-y:auto}
#fullscreenDialog::backdrop{background:#070b19d9;backdrop-filter:blur(5px)}
#fullscreenDialog .eyebrow{font:700 14px/1.4 var(--ui-type);color:var(--arcade-cyan);letter-spacing:.7px}
#fullscreenDialog h2{font:400 40px/1.1 var(--arcade-type);color:var(--arcade-gold);letter-spacing:.5px;text-shadow:2px 3px #090f20}
#fullscreenDialog p{font:500 19px/1.5 var(--ui-type);color:#f3efdf}
#fullscreenDialog .primary-button{font:750 18px/1.3 var(--ui-type);min-height:56px;border:2px solid #fff0a4;border-bottom:5px solid #a74f23;border-radius:4px;background:linear-gradient(#ffd66f,#efad3c);color:#18182a;text-shadow:none;white-space:normal}
#fullscreenDialog .text-button{font:650 17px/1.4 var(--ui-type);color:var(--arcade-cyan);min-height:48px;letter-spacing:0;text-decoration:underline;text-underline-offset:4px}
@media(max-height:600px) and (orientation:landscape){
  #touchControls.controller-deck{display:contents}
  #touchControls .control-caption{font-size:13px;letter-spacing:.2px}
  #touchControls .pad-hint{font-size:12px;letter-spacing:0}
  #touchControls .mini-buttons button>small{font-size:13px}
  #touchControls .controller-model{font-size:12px}
  #touchControls .action-controls button small{font-size:14px}
  #gameScreen{padding:14px}
  #gameScreen .screen-card{padding:18px 24px}
  #gameScreen .screen-card h2{font-size:40px}
  #gameScreen .screen-card>p{font-size:19px;line-height:1.5}
  #gameScreen .screen-badge{font-size:14px}
  #gameScreen .screen-results{font-size:17px;padding-bottom:14px}
  #gameScreen .screen-results b{font-size:30px}
}

/* Keep functional text at readable sizes instead of scaling it with the console. */
#gameShell .world-info div>span,#gameShell .score-stat>span{font:650 12px/1.3 var(--ui-type);letter-spacing:.3px;color:#c6d6df}
#gameShell .world-info strong{font:750 15px/1.3 var(--ui-type);letter-spacing:0;max-width:none;color:#fff4ce}
#gameShell .score-stat strong,#gameShell .burger-stat,#gameShell .size-stat strong{font:750 18px/1.2 var(--ui-type);letter-spacing:0;font-variant-numeric:tabular-nums;color:#fff4ce}
#gameShell .size-stat>span{font:650 12px/1.3 var(--ui-type);color:#c6d6df}
#gameShell .game-footer{min-height:36px;height:auto;gap:10px}
#gameShell .desktop-hint,#gameShell .footer-tip,#gameShell .level-progress{font:600 13px/1.4 var(--ui-type);letter-spacing:0;color:#d4e1ec}
#gameShell .key{font:700 13px/1 var(--ui-type);min-width:24px;height:25px}
#gameShell .space-key{width:48px}
#gameShell .console-wordmark span,#gameShell .console-power b{font:650 12px/1.3 var(--ui-type);letter-spacing:.4px;color:#cfdaeb}
#gameShell .scene-label{font:650 13px/1.4 var(--ui-type);letter-spacing:0;color:#fff4ce;background:#111a2ee6;padding:8px 10px;border-radius:4px;max-width:calc(100% - 24px);white-space:normal}
#levelsDialog .level-pick>span:nth-child(2),#howDialog .instruction-row>div{min-width:0}
#levelsDialog .level-pick:disabled{opacity:1;background:#1a2338;border-color:#45536d}
#levelsDialog .level-pick:disabled strong{color:#dce4ef}
#levelsDialog .level-pick:disabled small{color:#b7c5d6}
#gameScreen .screen-card,:is(#howDialog,#levelsDialog){max-height:calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
#gameScreen{padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
:is(#howDialog,#levelsDialog) .eyebrow{display:block;padding-right:44px}

/* The start panel has the same readable viewport space as pause and results. */
#startOverlay{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:45;width:min(600px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;justify-content:flex-start;align-items:center;padding:28px 24px;text-align:center;color:#fff4ce;background:linear-gradient(145deg,#222b43,#111728);border:3px solid var(--arcade-gold);border-radius:6px;box-shadow:0 0 0 100vmax #080d1bc9,0 0 0 5px #50607d}
.game-viewport:has(>#startOverlay:not(.hidden)){z-index:10}
#startOverlay .adventure-tag{font:700 13px/1.4 var(--ui-type);letter-spacing:.4px;color:var(--arcade-cyan)}
#startOverlay h2{font:400 clamp(42px,8vw,62px)/1.05 var(--arcade-type);letter-spacing:.5px;color:#fff4ce;text-shadow:2px 3px #090f20;margin:16px 0}
#startOverlay h2 em{color:#ff98c5;font-style:normal}
#startOverlay>p{font:650 18px/1.5 var(--ui-type);max-width:30ch;color:#f3efdf;margin:0 0 20px}
#startOverlay .start-note{display:block;font:650 14px/1.5 var(--ui-type);color:#d8e6f4;max-width:100%;margin:16px 0 0;letter-spacing:0}
#startOverlay :is(.adventure-tag,p,.start-note){text-shadow:none}
/* The viewport-sized start card must receive swipes when it needs to scroll. */
#startOverlay{pointer-events:auto}
:is(#checkpointToast,#powerupToast){position:fixed;top:max(16px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:40;width:max-content;max-width:calc(100vw - 32px);text-shadow:none}
#gameShell #powerupToast{top:max(16px,env(safe-area-inset-top))}
#gameShell:has(#checkpointToast.visible) #powerupToast{top:calc(max(16px,env(safe-area-inset-top)) + 100px)}
#burgerParty{position:fixed;top:max(16px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));z-index:40;max-width:calc(100vw - 32px)}
.game-viewport:has(>.checkpoint-toast.visible),.game-viewport:has(>#burgerParty:not(.hidden)){z-index:10}

@media(max-width:760px),(max-height:600px) and (orientation:landscape){
  #gameShell .game-hud{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:4px 8px;height:auto;min-height:76px;padding:4px 8px;overflow:visible}
  #gameShell .world-info{grid-area:1/1;min-width:0;gap:6px}
  #gameShell .world-info strong{white-space:normal;margin-top:2px;overflow-wrap:normal}
  #gameShell .game-tools{grid-area:1/2;margin:0;gap:4px;min-width:0}
  #gameShell .game-tools .icon-button{width:44px;height:44px;min-width:44px;padding:10px}
  #gameShell .game-tools .icon-button svg{width:20px;height:20px}
  #gameShell .game-stats{grid-area:2/1/3/3;width:100%;margin:0;gap:4px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}
  #gameShell .score-stat{display:flex;align-items:center;gap:4px}
  #gameShell .score-stat strong{margin:0;font-size:16px}
  #gameShell .burger-stat{gap:4px}
  #gameShell .burger-icon{width:22px;height:22px}
  #gameShell .size-stat{padding:2px 5px;gap:4px}
  #gameShell .size-stat>span{display:inline}
  #gameShell .size-stat strong{font-size:16px}
  #gameShell .lives{padding:0;gap:3px}
  #gameShell .lives svg{width:13px;height:13px}
  #gameShell .game-footer{height:auto;min-height:36px;padding:6px 8px;gap:8px}
  #gameShell .mobile-hint{font:650 13px/1.4 var(--ui-type);max-width:none;color:#dce7f3;letter-spacing:0}
  #gameShell .mobile-hint>span{display:none}
  #gameShell .controller-model{display:none}
  #startOverlay{padding:24px 18px}
}

/* Separate channel volumes stay thumb-friendly inside the fullscreen console. */
#gameShell .game-tools #audioSettingsButton{min-width:44px;width:44px;min-height:44px;height:44px;padding:10px}
#audioSettingsButton svg{width:20px;height:20px}
#audioDialog{width:min(540px,calc(100vw - 32px));max-width:calc(100vw - 32px);padding:26px 28px 22px;font:500 17px/1.5 var(--ui-type);color:var(--arcade-cream);background:linear-gradient(145deg,#222b43,#111728);border:3px solid var(--arcade-gold);border-radius:6px;box-shadow:0 0 0 3px #080e1e,0 0 0 5px #50607d,8px 8px 0 #05091499,inset 0 0 0 3px #39405a;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;scrollbar-color:var(--arcade-gold) #182136;scroll-padding:16px;overflow-wrap:anywhere}
#audioDialog::backdrop{background:#070b19d9;backdrop-filter:blur(5px)}
#audioDialog .eyebrow{display:block;margin:0;padding-right:44px;font:700 13px/1.4 var(--ui-type);color:var(--arcade-cyan);letter-spacing:.7px}
#audioDialog h2{font:400 40px/1.1 var(--arcade-type);letter-spacing:.5px;color:var(--arcade-gold);margin:10px 0 18px;text-shadow:2px 3px #090f20}
#audioDialog .modal-close{width:44px;height:44px;min-width:44px;padding:10px;background:#303c57;color:#fff2c7;border:2px solid #7184a2}
#audioDialog .modal-close svg{width:20px;height:20px}
#audioDialog .audio-channel{margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid #43516a}
#audioDialog .audio-channel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
#audioDialog label{font:750 18px/1.4 var(--ui-type);color:#fff4ce}
#audioDialog output{font:400 28px/1 var(--arcade-type);color:var(--arcade-cyan);min-width:52px;text-align:right;font-variant-numeric:tabular-nums}
#audioDialog .audio-channel p{font:500 14px/1.4 var(--ui-type);color:#d0ddeb;margin:5px 0 4px}
#audioDialog .audio-volume{display:block;-webkit-appearance:none;appearance:none;width:100%;min-width:0;height:44px;margin:0;background:transparent;cursor:pointer;touch-action:pan-y;accent-color:var(--arcade-cyan);border-radius:4px}
#audioDialog .audio-volume:focus-visible{outline:3px solid var(--arcade-gold);outline-offset:3px}
#audioDialog .audio-volume::-webkit-slider-runnable-track{height:8px;border-radius:4px;background:linear-gradient(to right,var(--arcade-cyan) 0 var(--volume,100%),#52617d var(--volume,100%) 100%);box-shadow:0 0 0 1px #8192ad}
#audioDialog .audio-volume::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:30px;height:30px;margin-top:-11px;border:3px solid #fff0a4;border-bottom:5px solid #a76d2b;border-radius:6px;background:var(--arcade-gold);box-shadow:0 2px 0 #080d1b}
#audioDialog .audio-volume::-moz-range-track{height:8px;border-radius:4px;background:#52617d;box-shadow:0 0 0 1px #8192ad}
#audioDialog .audio-volume::-moz-range-progress{height:8px;border-radius:4px;background:var(--arcade-cyan)}
#audioDialog .audio-volume::-moz-range-thumb{width:24px;height:24px;border:3px solid #fff0a4;border-bottom:5px solid #a76d2b;border-radius:6px;background:var(--arcade-gold);box-shadow:0 2px 0 #080d1b}
#audioDialog .audio-test-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 13px;margin-top:5px;font:700 15px/1.3 var(--ui-type);color:#e6fdff;background:#263e59;border:2px solid #71aab9;border-bottom:4px solid #101b2e;border-radius:4px}
#audioDialog .audio-test-button svg{width:18px;height:18px}
#audioDialog .audio-test-button:disabled{opacity:.6;cursor:default}
#audioDialog .audio-mute-note{font:500 14px/1.5 var(--ui-type);color:#d0ddeb;margin:0 0 16px;max-width:none}
#audioDialog .primary-button{font:750 17px/1.3 var(--ui-type);letter-spacing:.3px;text-transform:uppercase;width:100%;min-height:48px;padding:10px 18px;border:2px solid #fff0a4;border-bottom:5px solid #a74f23;border-radius:4px;background:linear-gradient(#ffd66f,#efad3c);color:#18182a;box-shadow:0 3px 0 #050b19;text-shadow:none;white-space:normal}
#audioDialog button:enabled:is(:active,.is-pressing,.tap-feedback){filter:brightness(1.2);transform:translateY(1px)}
@media(max-width:480px){#audioDialog{padding:22px 20px 18px}#audioDialog h2{font-size:36px}#audioDialog label{font-size:17px}}
@media(max-height:450px) and (orientation:landscape){#audioDialog{width:min(640px,calc(100vw - 32px));padding:18px 24px 16px}#audioDialog h2{font-size:32px;margin:7px 0 12px}#audioDialog .audio-channels{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}#audioDialog .audio-channel{margin-bottom:10px;padding-bottom:8px}#audioDialog .audio-mute-note{margin-bottom:10px}}

/* Equipped weapons use the existing B button and stay inside the console. */
.weapon-hud{--weapon-color:#7bf2ef;position:absolute;z-index:7;right:12px;top:12px;display:flex;align-items:center;gap:8px;max-width:48%;padding:7px 10px;color:#fff5d0;background:#0b152ce8;border:2px solid var(--weapon-color);box-shadow:3px 3px 0 #080f21;border-radius:4px;pointer-events:none}
.weapon-hud[hidden]{display:none}
.weapon-hud svg{flex:0 0 28px;width:28px;height:23px;color:var(--weapon-color)}
.weapon-hud strong{display:block;font:400 23px/1 var(--arcade-type);letter-spacing:.4px;color:var(--weapon-color);overflow-wrap:normal}
.weapon-hud small{display:block;margin-top:4px;font:700 10px/1.2 var(--ui-type);letter-spacing:.6px}
#touchControls .burp-control.is-armed .button-cap{background:radial-gradient(circle at 32% 24%,#eaffff,#5ce6d5 60%,#268e90);border-color:#e4ffff;border-bottom-color:#1d686b;color:#0a2333;text-shadow:0 1px #ddffff}
#touchControls .burp-control.is-armed small{color:#b7fff0}
@media(max-width:480px){.weapon-hud{right:8px;top:8px;gap:5px;padding:5px 7px;max-width:62%}.weapon-hud strong{font-size:20px}.weapon-hud small{font-size:9px}.weapon-hud svg{width:23px;flex-basis:23px}}

/* Nearby machinery explains itself above the soil, inside the game screen. */
.challenge-hud{position:absolute;z-index:6;bottom:8px;left:10px;right:10px;display:flex;gap:10px;align-items:center;padding:5px 9px;border-left:3px solid #ffcd67;background:#0c172be8;box-shadow:2px 2px 0 #080e1c;pointer-events:none;color:#fff4cf;border-radius:2px}
.challenge-hud[hidden]{display:none}
.challenge-hud strong{flex:0 0 auto;max-width:40%;font:400 22px/1 var(--arcade-type);color:#ffd76f;text-transform:uppercase}
.challenge-hud span{font:650 12px/1.3 var(--ui-type);color:#e7f2f2}
@media(max-width:480px){.challenge-hud{left:6px;right:6px;bottom:6px;gap:5px;padding:5px 7px;align-items:flex-start;flex-direction:column}.challenge-hud strong{max-width:100%;font-size:18px}.challenge-hud span{font-size:10px;line-height:1.3}}

/* The final win screen frames the native dancing Budwee and particle show.
   Its center stays open, and its geometry follows the canvas rather than the
   window so the console, audio controls and thumb targets remain usable. */
#gameScreen.is-victory{position:absolute;inset:0;padding:0;display:block;z-index:12;background:transparent;backdrop-filter:none;container:victory-screen / size;pointer-events:none}
#gameScreen.is-victory .screen-card{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;max-width:none;max-height:none;padding:0;overflow:visible;background:transparent;border:0;border-radius:0;box-shadow:none;color:var(--arcade-cream);pointer-events:none}
#gameScreen.is-victory .screen-badge{position:absolute;top:4%;left:3%;right:3%;font:750 clamp(9px,3.1cqh,12px)/1.2 var(--ui-type);letter-spacing:1px;color:#c0fcff;text-shadow:1px 2px #070c20,0 0 12px #1b99c5;text-wrap:balance}
#gameScreen.is-victory .screen-card h2{position:absolute;top:9%;left:3%;right:3%;margin:0;font:400 clamp(40px,15.8cqh,76px)/.98 var(--arcade-type);letter-spacing:2px;color:#fff3b9;text-shadow:0 3px #a25730,3px 0 #a25730,-3px 0 #a25730,0 -2px #a25730,0 6px #100e25,0 0 22px #ffbb5d80}
#gameScreen.is-victory .screen-card>p{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#gameScreen.is-victory .screen-results{position:absolute;left:50%;bottom:calc(50px + 2cqh);transform:translateX(-50%);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;width:min(88%,440px);gap:8px;padding:0;margin:0;font:750 clamp(10px,3cqh,12px)/1.2 var(--ui-type);letter-spacing:.5px;text-transform:uppercase;color:#daedff;text-shadow:1px 2px #070d20}
#gameScreen.is-victory .screen-results span{min-width:0;white-space:nowrap}
#gameScreen.is-victory .screen-results b{display:block;margin:0 0 2px;font:400 clamp(20px,7.2cqh,30px)/.95 var(--arcade-type);letter-spacing:.5px;font-variant-numeric:tabular-nums;color:#fff3bd;text-shadow:1px 2px #4a2f33,0 0 10px #ffbd5555}
#gameScreen.is-victory .primary-button,#gameScreen.is-victory .text-button{position:absolute;bottom:5px;display:inline-flex;align-items:center;justify-content:center;gap:8px;width:calc(44% - 5px);max-width:210px;min-height:44px;height:44px;margin:0;padding:6px 10px;border:2px solid #fff0a4;border-bottom:4px solid #a74f23;border-radius:4px;font:800 14px/1.15 var(--ui-type);letter-spacing:.25px;text-decoration:none;white-space:normal;overflow-wrap:normal;text-transform:uppercase;box-shadow:0 3px 0 #060a18;pointer-events:auto;touch-action:manipulation}
#gameScreen.is-victory .primary-button{right:calc(50% + 5px);background:linear-gradient(#ffe490,#f8b94e);color:#161a2b}
#gameScreen.is-victory .text-button{left:calc(50% + 5px);background:linear-gradient(#263f5b,#17253e);border-color:#a7f9ff;border-bottom-color:#237b9a;color:#d6feff}
#gameScreen.is-victory .primary-button svg{width:17px;height:17px;flex:0 0 17px}
#gameScreen.is-victory .primary-button:hover{background:#fff0ac;transform:none}
#gameScreen.is-victory .text-button:hover{background:#2b4964;text-decoration:none}
#gameScreen.is-victory button:is(:active,.is-pressing,.tap-feedback){transform:translateY(2px);filter:brightness(1.2);border-bottom-width:2px;box-shadow:0 1px 0 #060a18,inset 0 0 0 2px #ffffff55}
#gameScreen.is-victory button:focus-visible{outline:3px solid #fffbd4;outline-offset:3px}
/* Compact landscape cabinets keep the results beside the actions, below the
   dancer's feet, instead of stacking a tall card over the celebration. */
@container victory-screen (max-height:250px){
  #gameScreen.is-victory .screen-badge{font-size:9px;letter-spacing:.4px}
  #gameScreen.is-victory .screen-card h2{top:10%;font-size:clamp(32px,18cqh,44px)}
  #gameScreen.is-victory .screen-results{left:2%;bottom:9px;transform:none;width:38%;gap:4px;font-size:9px;letter-spacing:0}
  #gameScreen.is-victory .screen-results b{font-size:22px}
  #gameScreen.is-victory .primary-button,#gameScreen.is-victory .text-button{bottom:5px;width:27%;max-width:none;font-size:12px;padding:5px 6px;gap:5px}
  #gameScreen.is-victory .primary-button{left:42%;right:auto}
  #gameScreen.is-victory .text-button{left:71%}
  #gameScreen.is-victory .primary-button svg{width:15px;height:15px;flex-basis:15px}
}
