:root{font-family:ui-rounded,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;color:#edf5f8;background:#152d39;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{display:grid;place-items:center;background:radial-gradient(ellipse at 10% 20%,#345b6b,transparent 60%),linear-gradient(135deg,#152d39,#152327)}[hidden]{display:none!important}button,input,select{font:inherit}button{border:0;border-radius:14px;padding:14px 19px;background:#ffdc6a;color:#22343d;font-weight:750;cursor:pointer;transition:filter .15s,transform .15s}button:hover{filter:brightness(1.08)}button:active{transform:translateY(1px)}button:disabled{opacity:.5;cursor:wait}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffdc6a;outline-offset:3px}#canvas{position:fixed;width:100%;height:100%;inset:0;object-fit:contain;visibility:hidden;outline:0}.playing #canvas{visibility:visible}.panel{position:relative;width:min(440px,calc(100% - 32px));border:1px solid #ffffff24;border-radius:28px;padding:34px;background:#152d39e8;box-shadow:0 25px 80px #0005}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.22em;color:#adc6d1;margin:0 0 12px}h1{font-size:58px;line-height:.95;letter-spacing:-.065em;margin:0 0 18px}h1 span{font-size:25px;letter-spacing:.04em;color:#ffdc6a;margin-left:12px}#intro{color:#b8ccd4;line-height:1.6;margin:0 0 24px}label{display:block;color:#c9dae1;font-size:13px;font-weight:600;margin:15px 0}input:not([type=checkbox]),select{display:block;width:100%;margin-top:8px;padding:13px 14px;border:1px solid #6c899b66;border-radius:11px;color:#edf5f8;background:#0e2430;outline:0}input[type=range]{padding:0;accent-color:#ffdc6a}input[type=checkbox]{accent-color:#ffdc6a}.check{display:flex;gap:10px;align-items:center}form>button[type=submit],#settings form>button{width:100%;margin-top:9px}.tabs{display:flex;gap:7px;margin:20px 0}.tabs button{flex:1;font-size:12px;padding:12px;background:#ffffff0a;color:#afc5cf;border:1px solid transparent}.tabs button.selected{border-color:#ffdc6a70;background:#ffdc6a12;color:#ffdc6a}#play{display:flex;justify-content:space-between}#status{font-size:13px;color:#b8ccd4;min-height:20px;margin:19px 0 8px}.error{color:#ffb8ac!important}.footnote{font-size:11px;color:#87a8b8;margin:20px 0 0}progress{width:100%;height:6px;accent-color:#ffdc6a}#game-bar{position:fixed;z-index:5;top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:16px;background:#102731c9;backdrop-filter:blur(10px);font-size:12px;max-width:720px;margin:auto}#lobby-title{font-weight:700;flex:1}#save-status{color:#c5dbc8}#game-bar button{font-size:11px;padding:8px 12px;background:#ffffff19;color:white;border-radius:10px}dialog{z-index:20;border:1px solid #ffffff26;border-radius:24px;color:#edf5f8;background:#152d39;padding:26px;width:min(410px,calc(100% - 24px));max-height:90vh;overflow:auto}dialog::backdrop{background:#04101acc}.dialog-title{display:flex;align-items:center;gap:20px}.dialog-title h2{font-size:21px;margin:0;flex:1}.dialog-title button{background:transparent;color:#afc5cf;padding:0;font-size:28px}.controls-help{line-height:1.9;font-size:11px;color:#a6c0cb}#metrics{font-size:11px;color:#adc6d1}.secondary{background:#ffffff0b;color:#adc6d1}#canvas{touch-action:none}#touch-controls{position:fixed;inset:0;z-index:4;touch-action:none;user-select:none;-webkit-user-select:none}#move-stick{position:absolute;width:116px;height:116px;margin:-58px;border:1px solid #ffffff55;border-radius:50%;background:#15344433;pointer-events:none}#stick-knob{position:absolute;left:34px;top:34px;width:48px;height:48px;border:2px solid #ffffff99;background:#ffffff29;border-radius:50%;pointer-events:none}#touch-controls button{position:absolute;width:58px;height:58px;border-radius:50%;border:1px solid #ffffff6b;color:#fff;background:#15344480;touch-action:none;padding:0;text-shadow:0 1px 2px #0005;backdrop-filter:blur(4px)}#touch-crouch{right:max(22px,env(safe-area-inset-right));bottom:calc(30px + env(safe-area-inset-bottom));font-size:22px}#touch-crouch span{display:block;font-size:8px;font-weight:500;line-height:1}#touch-center{left:max(22px,env(safe-area-inset-left));bottom:calc(30px + env(safe-area-inset-bottom));width:44px!important;height:44px!important}#gesture-hint{position:absolute;bottom:calc(26px + env(safe-area-inset-bottom));left:80px;right:90px;text-align:center;font-size:10px;line-height:1.7;color:#ffffffa0;text-shadow:0 1px 4px #000;pointer-events:none;transition:opacity 1s}.native-menu #touch-controls button,.native-menu #gesture-hint{visibility:hidden}.native-menu #canvas{cursor:default}#notice{position:fixed;z-index:30;left:50%;bottom:20px;transform:translateX(-50%);padding:12px 18px;border-radius:12px;background:#102731ed;color:white;font-size:12px;max-width:90%;text-align:center}@media(max-height:520px){.panel{padding:20px 28px;max-height:95vh;overflow:auto}h1{font-size:44px}#intro{margin-bottom:12px}.footnote{display:none}#game-bar{top:6px}#lobby-title{display:none}#touch-center{bottom:165px}}@media(max-width:520px){#save-status{font-size:10px}#game-bar{gap:7px}.panel{padding:28px}.controls-help{font-size:10px}}

@media(orientation:portrait){#game-bar{display:grid;grid-template-columns:1fr auto auto auto;gap:5px 8px}#lobby-title{grid-column:1 / 3;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#players{grid-column:3 / 5;text-align:right}#save-status{grid-column:1}#game-bar button{min-height:36px;padding:6px 9px}#gesture-hint{bottom:calc(35px + env(safe-area-inset-bottom))}.panel{max-height:calc(100dvh - 24px);overflow:auto}#touch-crouch{bottom:calc(42px + env(safe-area-inset-bottom));width:64px;height:64px}#touch-center{bottom:calc(48px + env(safe-area-inset-bottom))}#notice{bottom:calc(135px + env(safe-area-inset-bottom))}}

#portrait-hud{display:none;pointer-events:none}.playing #portrait-hud{position:fixed;z-index:3;left:16px;right:16px;top:calc(94px + env(safe-area-inset-top));gap:7px;flex-wrap:wrap;color:white;text-shadow:0 1px 3px #000;font-size:12px;font-weight:700}#portrait-hud span{padding:6px 9px;background:#1027318c;border-radius:9px}#hud-coins,#hud-stars{color:#ffdc6a}#hud-health{color:#ffc0b8}@media(orientation:portrait){.playing #portrait-hud{display:flex}#canvas{top:calc(88px + env(safe-area-inset-top));height:calc(100% - 88px - env(safe-area-inset-top))}.native-menu #portrait-hud{visibility:hidden}}


#touch-kirby-jump,#touch-kirby-inhale{display:none}body.kirby-controls #touch-kirby-jump,body.kirby-controls #touch-kirby-inhale{display:block}#touch-kirby-inhale{right:max(22px,env(safe-area-inset-right));bottom:calc(116px + env(safe-area-inset-bottom));font-size:22px}#touch-kirby-jump{right:max(22px,env(safe-area-inset-right));bottom:calc(190px + env(safe-area-inset-bottom));font-size:22px}

/* Compact in-game chrome; safe areas apply once, independently of orientation. */
#game-bar{display:flex;flex-wrap:nowrap;justify-content:center;gap:6px;top:env(safe-area-inset-top,0px);left:0;right:0;max-width:none;height:56px;padding:6px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));border-radius:0;background:linear-gradient(#142c3aee,#142c3ac9);border-bottom:1px solid #ffffff1c}
#game-bar button{flex:1;max-width:160px;min-height:44px;font-size:13px;font-weight:750;border-radius:12px;background:#ffffff12;border:1px solid #ffffff15}
#canvas{top:calc(56px + env(safe-area-inset-top));height:calc(100% - 56px - env(safe-area-inset-top))}
.playing #portrait-hud{display:flex;flex-wrap:nowrap;align-items:flex-start;gap:4px;top:calc(66px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));filter:drop-shadow(0 2px 2px #0009)}
#portrait-hud canvas{width:70px;height:25px;flex:none;image-rendering:pixelated}#portrait-hud #hud-health{width:48px;height:48px;margin-left:auto;margin-top:-3px}#portrait-hud span{padding:4px 7px;font-size:11px;background:#142c3a80;border-radius:8px}.native-menu #portrait-hud{visibility:hidden}
#coop-settings{width:min(520px,calc(100% - 24px));max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:0;border-radius:22px;background:#172e3b;overscroll-behavior:contain;box-shadow:0 20px 80px #0008}
#coop-settings::backdrop{background:#08151deb;backdrop-filter:blur(8px)}.sheet-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;background:#172e3bf5;border-bottom:1px solid #ffffff16}.sheet-header h2{margin:0;font-size:21px}.sheet-header button{min-height:44px;padding:10px 17px;border-radius:12px}
#coop-items{padding:8px 16px 20px;display:grid;gap:8px}.coop-action{min-height:52px;padding:14px 16px;text-align:left;border-radius:12px;background:#ffffff0b;color:#f5f8fc;border:1px solid #ffffff16;font-size:15px;white-space:pre-wrap}.coop-action:hover,.coop-action:focus-visible{background:#ffdb6822;border-color:#ffdb68;color:#ffdf7b}.coop-description{font-size:13px;line-height:1.55;color:#bfd0d9;margin:8px 2px;white-space:pre-wrap}.coop-description:first-child{font-size:18px;font-weight:800;color:#fff}.coop-control{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:14px;background:#ffffff08;border-radius:12px;min-height:56px}.coop-control>span{font-size:14px;color:#f2f6f9;line-height:1.4}.coop-control select,.coop-control input:not([type=checkbox]){margin:0;width:100%;min-height:44px}.coop-control input[type=checkbox]{width:25px;height:25px;margin:4px;accent-color:#ffdb68}.coop-control input[type=range]{height:36px;min-height:36px;touch-action:pan-x;accent-color:#ffdb68}.coop-control:has(input[type=checkbox]){flex-wrap:nowrap}
@media(orientation:portrait){#game-bar{display:flex;gap:6px}#game-bar button{padding:8px 12px;min-height:44px}#settings,#coop-settings{margin:auto;width:calc(100% - 20px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}#settings .dialog-title button{min-width:44px;min-height:44px}.playing #portrait-hud{display:flex}}
@media(max-width:350px){#portrait-hud canvas{width:61px;height:22px}#portrait-hud #hud-health{width:43px;height:43px}#game-bar button{font-size:12px}}

.device-options{margin:14px 0;border-top:1px solid #ffffff18;padding-top:12px}.device-options summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:650}.device-options summary::before{content:"＋";margin-right:10px;color:#ffdb68}.device-options[open] summary::before{content:"−"}

.coop-control output{font-size:12px;font-variant-numeric:tabular-nums;color:#ffdf7b;margin-left:auto}

/* Lives doubles as an accessible quick character switch. */
.playing #portrait-hud{z-index:6}#character-switch{position:relative;pointer-events:auto;touch-action:manipulation;background:transparent;border:0;padding:0 10px 0 0;min-width:80px;height:44px;margin-top:-10px;display:flex;align-items:center;color:white;border-radius:10px}#character-switch:hover{background:#142c3a55}#portrait-hud .switch-chevron{position:absolute;right:2px;bottom:8px;padding:0;background:none;font-size:13px}#character-switch canvas{pointer-events:none}
#character-wheel{width:min(370px,calc(100% - 24px));padding:22px 12px 14px;text-align:center;overflow:auto;max-height:calc(100dvh - 24px);background:#172e3bf5}#character-wheel h2{font-size:20px;margin:0 0 6px}#character-wheel>p{font-size:12px;color:#bed0d9;margin:0}#character-wheel::backdrop{background:#071924b8;backdrop-filter:blur(5px)}.wheel-options{position:relative;width:300px;max-width:100%;height:286px;margin:12px auto 0;border-radius:50%;background:radial-gradient(circle at center,#ffdc6a12 0 28%,transparent 29% 50%,#ffffff08 51% 68%,transparent 69%)}.wheel-options>button[data-character]{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;width:98px;height:98px;padding:8px;border-radius:50%;background:#28414e;color:white;border:2px solid #ffffff28;font-size:12px;line-height:1.15}.wheel-options>button[aria-pressed=true]{border-color:#ffdc6a;background:#51462e;box-shadow:0 0 0 4px #ffdc6a22}.wheel-options>button:hover{border-color:#ffdc6a}.wheel-options canvas{width:38px;height:38px;image-rendering:pixelated}.wheel-options [data-character="0"]{left:calc(50% - 49px);top:0}.wheel-options [data-character="1"]{left:0;bottom:10px}.wheel-options [data-character="2"]{right:0;bottom:10px}#wheel-close{position:absolute;left:calc(50% - 24px);top:123px;width:48px;height:48px;padding:0;border-radius:50%;font-size:27px;background:#ffffff12;color:#fff}@media(max-height:450px){#character-wheel{width:430px;padding:12px}#character-wheel .wheel-options{width:390px;height:142px;margin-top:8px}.wheel-options [data-character="0"]{left:0;top:0}.wheel-options [data-character="1"]{left:calc(50% - 49px);top:0}.wheel-options [data-character="2"]{right:0;top:0}#wheel-close{top:104px;width:36px;height:36px;left:calc(50% - 18px)}}

/* Seven-character radial roster; compact grid on short landscape screens. */
#character-wheel .wheel-options{width:320px;height:320px;max-width:100%;--radius:112px}.wheel-options>button[data-character]{width:76px;height:76px;left:calc(50% - 38px + var(--x)*var(--radius));top:calc(50% - 38px + var(--y)*var(--radius));right:auto;bottom:auto}.wheel-options canvas{width:32px;height:32px}
.wheel-options [data-character="0"]{--x:0.0000;--y:-1.0000}.wheel-options [data-character="1"]{--x:0.7818;--y:-0.6235}.wheel-options [data-character="3"]{--x:0.9749;--y:0.2225}.wheel-options [data-character="4"]{--x:0.4339;--y:0.9010}.wheel-options [data-character="5"]{--x:-0.4339;--y:0.9010}.wheel-options [data-character="6"]{--x:-0.9749;--y:0.2225}.wheel-options [data-character="7"]{--x:-0.7818;--y:-0.6235}#wheel-close{left:calc(50% - 24px);top:calc(50% - 24px);width:48px;height:48px}@media(max-height:450px){#character-wheel{width:590px}#character-wheel .wheel-options{width:100%;height:auto;display:grid;grid-template-columns:repeat(var(--choice-count,7),1fr);gap:4px;background:none}.wheel-options>button[data-character]{position:static;width:100%;height:84px;border-radius:16px}.wheel-options #wheel-close{position:static;grid-column:1 / -1;justify-self:center;margin-top:4px}}@media(max-width:350px) and (orientation:portrait){#character-wheel .wheel-options{--radius:104px}}


/* Larger native HUD sprites, with room for all counters on narrow phones. */
#portrait-hud canvas{width:96px;height:34px}
#portrait-hud #hud-health{width:64px;height:64px;margin-top:-2px}
#character-switch{min-width:106px;height:48px;margin-top:-7px}
@media(max-width:420px){#portrait-hud canvas{width:88px;height:31px}#character-switch{min-width:98px}#portrait-hud #hud-health{width:60px;height:60px}}
@media(max-width:350px){.playing #portrait-hud{left:8px;right:8px;gap:2px}#portrait-hud canvas{width:76px;height:27px}#character-switch{min-width:86px}#portrait-hud #hud-health{width:54px;height:54px}}
.wheel-pages{display:flex;gap:8px;justify-content:center;margin-top:12px}.wheel-pages button{min-height:44px;padding:8px 14px;background:#28414e;color:white;font-size:13px;border:1px solid #ffffff28}.wheel-pages button[aria-pressed=true]{background:#51462e;border-color:#ffdc6a}.wheel-options>button[data-character][hidden]{display:none}@media(max-height:450px){.wheel-pages{margin-top:6px}.wheel-pages button{padding:4px 12px}}
/* One shared-room launcher, sized for a phone without scrolling. */
#launcher{width:min(400px,calc(100% - 32px));padding:26px;border-radius:26px;background:linear-gradient(145deg,#213d4bed,#142c39f5)}.launcher-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:26px}.launcher-header h1{font-size:44px;margin:0;line-height:1}.launcher-header h1 span{display:block;font-size:14px;letter-spacing:.2em;margin:8px 0 0 3px}.launcher-header button{min-height:44px;padding:10px 14px;font-size:13px;border:1px solid #ffffff20;color:#edf5f8}#lobby-stats{display:flex;justify-content:space-between;gap:12px;padding:14px 0;border-top:1px solid #ffffff14;border-bottom:1px solid #ffffff14;color:#b9ced8;font-size:13px}#lobby-stats strong{font-weight:650;color:#edf5f8}#lobby-stats i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#91dbab;margin-right:7px}#lobby-form label{margin:24px 0 20px;font-size:14px}#character{min-height:52px;font-size:16px}#play{min-height:54px;align-items:center;font-size:17px;border-radius:14px}#status:empty{display:none}#status{margin-bottom:0}body:not(.playing) #settings-character,body:not(.playing) #settings label:has(#settings-character),body:not(.playing) #kirby-help,body:not(.playing) #pikachu-help,body:not(.playing) #metrics,body:not(.playing) #leave{display:none}#launcher-settings{flex-shrink:0}@media(max-height:500px){#launcher{padding:18px 24px;max-height:calc(100dvh - 20px);overflow:auto}.launcher-header{margin-bottom:14px}.launcher-header h1{font-size:32px}.launcher-header h1 span{font-size:11px}#lobby-stats{padding:10px 0}#lobby-form label{margin:12px 0}#character{min-height:44px;padding:10px 12px}#play{min-height:46px}}
#character,#settings select{-webkit-appearance:none;appearance:none;min-height:48px;padding-right:38px;background-image:linear-gradient(45deg,transparent 50%,#c9dae1 50%),linear-gradient(135deg,#c9dae1 50%,transparent 50%);background-position:calc(100% - 19px) 50%,calc(100% - 14px) 50%;background-size:5px 5px;background-repeat:no-repeat}

/* Native HUD affordances remain large enough for a thumb. */
#portrait-hud .hud-button{pointer-events:auto;touch-action:manipulation;border:0;background:transparent;padding:0;min-height:48px;min-width:44px;display:flex;align-items:center;margin-top:-7px}
#portrait-hud .hud-button:hover{background:#142c3a55}#portrait-hud #power-pause{margin-left:auto;align-self:flex-start}#portrait-hud #hud-health{margin:0}
#portrait-hud #hud-coins{width:108px;height:28px}.playing #portrait-hud{flex-wrap:nowrap;align-items:flex-start;gap:2px}
@media(min-width:351px) and (max-width:420px){#portrait-hud canvas{width:88px;height:31px}#character-switch{min-width:98px}#portrait-hud #hud-coins{width:90px;height:28px}#portrait-hud #hud-health{width:60px;height:60px}}
@media(max-width:350px){#portrait-hud canvas{width:62px;height:23px}#character-switch{min-width:72px}#portrait-hud #hud-coins{width:82px;height:24px}#portrait-hud #hud-health{width:48px;height:48px}}
.wheel-pages{flex-wrap:wrap}.wheel-pages button{flex:1;white-space:nowrap}.wheel-options button:disabled{opacity:.45}
#pause-sheet{width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);text-align:center}#tools-menu{border-block:1px solid #ffffff24;margin:16px 0;padding:4px 0}#tools-menu>button{background:#ffffff0b;color:#edf5f8}#pause-sheet>button,#tools-menu>button{display:block;width:100%;min-height:48px;margin:12px 0}
#character-store{width:min(480px,calc(100vw - 24px));max-height:85dvh;overflow:auto}.store-wallet{color:#ffdc6a;font-size:22px;margin:12px 0}
#store-items{display:grid;gap:10px;margin-top:16px}.store-item{display:flex;align-items:center;gap:12px;padding:12px;background:#ffffff09;border:1px solid #ffffff20;border-radius:14px}.store-item canvas{width:40px;height:40px;image-rendering:pixelated}.store-item strong{flex:1}.store-item button{min-height:48px;min-width:100px;font-size:14px}.store-item button:disabled{opacity:.5}
#store-status,#pause-status{min-height:1.4em}#store-status{color:#ffdc6a}

.wheel-options button[data-locked=true]{opacity:.65}.wheel-options button[data-locked=true]::after{content:"🔒";position:absolute;right:3px;top:1px;font-size:13px}

#touch-kirby-lift{display:none;right:calc(96px + env(safe-area-inset-right));bottom:calc(116px + env(safe-area-inset-bottom));font-size:12px}body.kirby-controls #touch-kirby-lift{display:block}

/* Keep taps and holds in the game; preserve normal editing in text fields. */
html,body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,[contenteditable]:not([contenteditable="false"]),[contenteditable]:not([contenteditable="false"]) *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
button,select{touch-action:manipulation}
#touch-controls,#touch-controls button,#canvas{touch-action:none}

/* Full-screen play; optional menus live behind one quiet corner control. */
#canvas{inset:0;width:100%;height:100%}
.playing #portrait-hud{top:calc(12px + env(safe-area-inset-top))}
.discord-sign-in{display:flex;align-items:center;justify-content:center;min-height:54px;margin:22px 0 16px;padding:14px;border-radius:14px;background:#5865f2;color:white;text-decoration:none;font-size:16px;font-weight:750}
.discord-sign-in:hover{background:#4752c4}
.discord-sign-in:focus-visible{outline:3px solid #ffdc6a;outline-offset:3px}
#account-login{border-top:1px solid #ffffff20;padding-top:15px}
#account-login summary{color:#adc6d1;font-size:13px;cursor:pointer;padding:8px 0}
#account-login button{width:100%;margin-top:8px}

/* Native panels always fit inside the phone safe area, including first-run Language. */
#coop-settings[open]{position:fixed;top:calc(12px + env(safe-area-inset-top));bottom:calc(12px + env(safe-area-inset-bottom));left:env(safe-area-inset-left);right:env(safe-area-inset-right);margin:auto;width:min(520px,calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
.coop-control>span{min-width:0;overflow-wrap:anywhere;flex:1}.native-menu #notice{visibility:hidden}

/* The live game paints every edge; do not tint the iOS status area with launcher chrome. */
html:has(body.playing),body.playing{background:transparent}
.playing #portrait-hud{background:none;backdrop-filter:none;-webkit-backdrop-filter:none}

#touch-mmx-skill,#touch-mmx-special{display:none;font-size:13px}body.megaman-controls #touch-mmx-skill,body.megaman-controls #touch-mmx-special{display:block}#touch-mmx-skill{right:max(22px,env(safe-area-inset-right));bottom:calc(116px + env(safe-area-inset-bottom))}#touch-mmx-special{right:calc(96px + env(safe-area-inset-right));bottom:calc(116px + env(safe-area-inset-bottom))}body.megaman-controls #touch-crouch{font-size:18px}
#costume-label{margin:12px 0}#costume-label select{width:100%}
#touch-mmx-skill span,#touch-mmx-special span{display:block;font-size:10px;margin-top:2px}

#character-wheel .wheel-pages{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;scrollbar-width:none;touch-action:pan-x}#character-wheel .wheel-pages button{flex:0 0 auto}#character-wheel .wheel-pages::-webkit-scrollbar{display:none}

body.shadow-controls #touch-mmx-skill,body.shadow-controls #touch-mmx-special{display:block}

/* Keep the expanded Mario group easy to tap without overlapping wheel choices. */
@media(min-height:451px){.wheel-options[data-dense=true]>button[data-character]{width:68px;height:68px;left:calc(50% - 34px + var(--x)*var(--radius));top:calc(50% - 34px + var(--y)*var(--radius))}}
@media(max-height:450px){#character-wheel .wheel-options[data-dense=true]{grid-template-columns:repeat(5,minmax(0,1fr))}}

/* Minigames use real touch widgets and keep the movement/look surface free. */
#minigame-sheet{width:min(520px,calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:20px;overscroll-behavior:contain;touch-action:pan-y}
#minigame-sheet[open]{position:fixed;inset:calc(12px + env(safe-area-inset-top)) env(safe-area-inset-right) calc(12px + env(safe-area-inset-bottom)) env(safe-area-inset-left);margin:auto;height:fit-content}
#minigame-sheet .sheet-header{position:sticky;top:-20px;padding:14px 0;background:#152d39;z-index:1}
#minigame-status{color:#ffdc6a;font-weight:750;margin:8px 0 14px}.minigame-help{font-size:13px;line-height:1.5;color:#adc6d1}
#minigame-content>button,#minigame-leave{width:100%;min-height:48px;margin:8px 0}.minigame-control{margin:8px 0;min-width:0}.minigame-setup{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.minigame-tabs{display:flex;gap:6px;overflow-x:auto;touch-action:pan-x;padding:4px 0 12px}.minigame-tabs button{flex:0 0 auto;min-height:44px;padding:10px 12px;background:#29414e;color:#edf5f8;font-size:12px}.minigame-tabs button[aria-pressed=true]{background:#ffdc6a;color:#22343d}
#minigame-search{margin:0 0 10px}#minigame-prop-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}#minigame-prop-grid button{min-height:52px;min-width:0;padding:10px;font-size:13px;background:#29414e;color:white;border:2px solid transparent;overflow-wrap:anywhere}#minigame-prop-grid button[aria-pressed=true]{border-color:#ffdc6a;background:#51462e}
.minigame-extra{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.minigame-extra button{flex:1;min-height:48px;padding:10px;font-size:13px}.minigame-extra label{width:100%}#minigame-players{padding:12px 0 0;list-style:none;color:#adc6d1;font-size:12px;line-height:2}#minigame-error{color:#ffb8ac;font-size:12px;min-height:0}
#minigame-actions{position:fixed;z-index:8;bottom:env(safe-area-inset-bottom);left:50%;transform:translateX(-50%);display:flex;gap:4px;max-width:calc(100% - 108px);padding:4px 0}#minigame-actions button{min-height:44px;padding:9px 10px;background:#153444c9;border:1px solid #ffffff6b;color:white;font-size:11px;border-radius:12px;white-space:nowrap;touch-action:manipulation}
.prop-hunt #gesture-hint{bottom:calc(88px + env(safe-area-inset-bottom))}.prop-hunt #touch-mmx-skill,.prop-hunt #touch-mmx-special,.prop-hunt #touch-kirby-lift{display:none!important}
@media(max-width:350px){#minigame-sheet{padding:16px}.minigame-setup{grid-template-columns:1fr}#minigame-actions button{padding:8px 6px;font-size:10px}#minigame-actions{gap:3px}}

#minigame-sheet select,#minigame-sheet input{min-height:48px;font-size:16px}
#minigame-sheet select{-webkit-appearance:none;appearance:none;padding-right:38px;background-image:linear-gradient(45deg,transparent 50%,#c9dae1 50%),linear-gradient(135deg,#c9dae1 50%,transparent 50%);background-position:calc(100% - 19px) 50%,calc(100% - 14px) 50%;background-size:5px 5px;background-repeat:no-repeat}
@media(max-width:480px){.minigame-setup{grid-template-columns:1fr}}
/* Bowling controls stay below the gesture zones, beside the existing gear. */
#bowling-sheet {max-width:480px;width:calc(100vw - 24px);max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);overflow:auto;box-sizing:border-box;}
#bowling-sheet button,#bowling-sheet select {min-height:48px;font-size:16px;}
#bowling-sheet select {-webkit-appearance:none;appearance:none;width:100%;padding:12px;background:#203944;color:#fff;border:1px solid #58717b;border-radius:12px;}
#bowling-sheet .sheet-header {position:sticky;top:0;background:#152e39;z-index:1;}
#bowling-sheet #bowling-start,#bowling-sheet #bowling-leave {width:100%;margin-block:10px;}
.bowling-score {display:flex;justify-content:space-between;gap:16px;padding:10px 4px;border-bottom:1px solid #ffffff22;}
#bowling-actions {position:fixed;z-index:25;bottom:max(8px,env(safe-area-inset-bottom));left:64px;right:64px;display:flex;justify-content:center;align-items:center;gap:8px;pointer-events:none;}
#bowling-actions[hidden] {display:none!important;}
#bowling-actions button {pointer-events:auto;min-height:44px;background:#16323ccc;border:1px solid #ffffff55;border-radius:14px;color:white;padding:6px 12px;}
#bowling-turn {max-width:50%;font-size:12px;color:white;text-shadow:0 1px 3px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body.bowling #touch-mmx-skill,body.bowling #touch-mmx-special,body.bowling #touch-kirby-lift {display:none!important;}

body.bowling #touch-crouch,body.bowling #touch-kirby-jump,body.bowling #touch-kirby-inhale {display:none!important;}

/* Kitchen controls remain explicit held native actions, clear of the left thumb. */
#overcooked-sheet {width:calc(100vw - 24px);max-width:480px;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);overflow:auto;box-sizing:border-box;}
#overcooked-sheet .sheet-header {position:sticky;top:0;background:#152e39;z-index:1;}
#overcooked-sheet button,#overcooked-sheet select {min-height:48px;font-size:16px;}
#overcooked-sheet select {appearance:none;-webkit-appearance:none;width:100%;padding:12px;background:#203944;color:white;border:1px solid #58717b;border-radius:12px;}
#overcooked-sheet>button {width:100%;margin-block:8px;}
#overcooked-actions {position:fixed;bottom:max(8px,env(safe-area-inset-bottom));left:64px;right:64px;z-index:25;display:flex;justify-content:center;pointer-events:none;}
#overcooked-actions button {pointer-events:auto;min-height:44px;background:#16323ccc;border:1px solid #ffffff55;border-radius:14px;color:white;padding:6px 12px;}
#overcooked-hud {position:fixed;z-index:22;top:calc(max(16px,env(safe-area-inset-top)) + 80px);left:12px;right:12px;max-width:420px;margin:auto;background:#16323cc9;padding:8px 12px;border-radius:12px;color:white;pointer-events:none;font-size:13px;}
#overcooked-orders {list-style:none;padding:0;margin:4px 0;display:flex;gap:8px;flex-wrap:wrap;}
#overcooked-orders li {background:#ffffff15;border-radius:6px;padding:4px;}
#touch-oc-grab,#touch-oc-cook,#touch-oc-throw {display:none;}
body.overcooked #touch-oc-grab,body.overcooked #touch-oc-cook,body.overcooked #touch-oc-throw {display:block;position:absolute;right:16px;min-width:64px;min-height:48px;font-size:16px;border-radius:14px;}
body.overcooked #touch-oc-grab {bottom:calc(max(12px,env(safe-area-inset-bottom)) + 176px);}
body.overcooked #touch-oc-cook {bottom:calc(max(12px,env(safe-area-inset-bottom)) + 120px);}
body.overcooked #touch-oc-throw {bottom:calc(max(12px,env(safe-area-inset-bottom)) + 64px);}
body.overcooked #touch-mmx-skill,body.overcooked #touch-mmx-special,body.overcooked #touch-kirby-lift,body.overcooked #touch-kirby-jump,body.overcooked #touch-kirby-inhale,body.overcooked #touch-crouch {display:none!important;}
#overcooked-actions[hidden],#overcooked-hud[hidden] {display:none!important;}
@media (orientation:landscape) and (max-height:500px) {#overcooked-hud {left:110px;right:110px;max-width:340px;}}

#courtroom-sheet {width:calc(100vw - 24px);max-width:480px;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);overflow:auto;box-sizing:border-box;}
#courtroom-sheet .sheet-header {position:sticky;top:0;background:#152e39;z-index:1;}
#courtroom-sheet h2 {font-size:20px;}
#courtroom-sheet button,#courtroom-sheet select {min-height:48px;font-size:16px;}
#courtroom-sheet select {appearance:none;-webkit-appearance:none;width:100%;padding:12px;background:#203944;color:white;border:1px solid #58717b;border-radius:12px;}
#courtroom-reactions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-block:16px;}
#courtroom-leave {width:100%;margin-block:8px;}
#courtroom-spots {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-block:12px 20px;}
#courtroom-spots button {background:#254451;color:white;border:1px solid #ffffff35;}
#courtroom-spots [aria-pressed=true] {background:#ffda68;color:#172e3b;}
#courtroom-sheet h3 {font-size:16px;margin:18px 0 6px;}
#courtroom-sheet p {font-size:14px;line-height:1.45;color:#c7d5dc;}
#courtroom-actions {position:fixed;bottom:calc(12px + env(safe-area-inset-bottom));right:max(12px,env(safe-area-inset-right));width:min(240px,calc(100vw - 132px));z-index:25;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;pointer-events:none;}
#courtroom-actions button {pointer-events:auto;touch-action:manipulation;min-height:48px;padding:8px 5px;background:#16323ce8;border:1px solid #ffffff66;border-radius:13px;color:white;font-size:13px;font-weight:750;box-shadow:0 2px 8px #0004;}
#courtroom-actions #courtroom-objection {background:#b72c35ef;border-color:#ffb0a4;}
#courtroom-actions button:active {transform:scale(.96);background:#526477;}
#courtroom-actions button:disabled {opacity:.65;}
#courtroom-actions[hidden],#courtroom-callout[hidden] {display:none!important;}
#courtroom-callout {position:fixed;top:calc(110px + env(safe-area-inset-top));left:12px;right:12px;z-index:26;pointer-events:none;text-align:center;color:#fff4ca;font-size:clamp(22px,6vw,36px);font-style:italic;font-weight:950;text-shadow:2px 2px 0 #a92328,-2px -2px 0 #a92328,0 4px 12px #000;}
body.courtroom #gesture-hint,body.courtroom #touch-crouch,body.courtroom #touch-mmx-skill,body.courtroom #touch-mmx-special,body.courtroom #touch-kirby-lift,body.courtroom #touch-kirby-jump,body.courtroom #touch-kirby-inhale {display:none!important;}
body.native-menu #courtroom-actions,body:has(dialog[open]) #courtroom-actions {visibility:hidden;}
@media(orientation:landscape) and (max-height:500px){#courtroom-actions {width:236px;bottom:calc(8px + env(safe-area-inset-bottom));gap:5px;}#courtroom-actions button {min-height:44px;}#courtroom-callout {top:calc(70px + env(safe-area-inset-top));left:100px;right:260px;font-size:24px;}}

/* Opt-in Flood menus use native mobile controls, with no controller dashboard. */
#flood-sheet {width:calc(100vw - 24px);max-width:480px;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);overflow:auto;box-sizing:border-box;}
#flood-sheet .sheet-header {position:sticky;top:0;background:#152e39;z-index:1;}
#flood-sheet button,#flood-sheet select {min-height:48px;font-size:16px;}
#flood-sheet select {appearance:none;-webkit-appearance:none;width:100%;padding:12px;background:#203944;color:white;border:1px solid #58717b;border-radius:12px;}
#flood-sheet button:not(#flood-close) {width:100%;margin-block:6px;}
#flood-actions {position:fixed;bottom:max(8px,env(safe-area-inset-bottom));left:64px;right:64px;z-index:25;display:flex;justify-content:center;pointer-events:none;}
#flood-actions button {pointer-events:auto;min-height:44px;background:#16323ccc;border:1px solid #ffffff55;border-radius:14px;color:white;padding:6px 12px;}
#flood-hud {position:fixed;z-index:22;top:calc(max(16px,env(safe-area-inset-top)) + 80px);left:12px;right:12px;margin:auto;width:fit-content;max-width:calc(100vw - 24px);background:#16323cc9;padding:8px 12px;border-radius:12px;color:white;pointer-events:none;font-size:13px;}
#flood-actions[hidden],#flood-hud[hidden],#flood-controls[hidden] {display:none!important;}
body.flood #gesture-hint {bottom:calc(max(8px,env(safe-area-inset-bottom)) + 56px);}

/* Opt-in Tag menus use native mobile controls, with no controller dashboard. */
#tag-sheet {width:calc(100vw - 24px);max-width:480px;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);overflow:auto;box-sizing:border-box;}
#tag-sheet .sheet-header {position:sticky;top:0;background:#152e39;z-index:1;}
#tag-sheet button,#tag-sheet select {min-height:48px;font-size:16px;}
#tag-sheet select {appearance:none;-webkit-appearance:none;width:100%;padding:12px;background:#203944;color:white;border:1px solid #58717b;border-radius:12px;}
#tag-sheet button:not(#tag-close) {width:100%;margin-block:6px;}
#tag-actions {position:fixed;bottom:max(8px,env(safe-area-inset-bottom));left:64px;right:64px;z-index:25;display:flex;justify-content:center;pointer-events:none;}
#tag-actions button {pointer-events:auto;min-height:44px;background:#16323ccc;border:1px solid #ffffff55;border-radius:14px;color:white;padding:6px 12px;}
#tag-hud {position:fixed;z-index:22;top:calc(max(16px,env(safe-area-inset-top)) + 80px);left:12px;right:12px;margin:auto;width:fit-content;max-width:calc(100vw - 24px);background:#16323cc9;padding:8px 12px;border-radius:12px;color:white;pointer-events:none;font-size:13px;}
#tag-actions[hidden],#tag-hud[hidden],#tag-controls[hidden] {display:none!important;}
body.tag #gesture-hint {bottom:calc(max(8px,env(safe-area-inset-bottom)) + 56px);}

#tag-actions {gap:6px;}
#tag-actions button {min-height:48px;min-width:48px;touch-action:none;}
#tag-rules {line-height:1.5;}

/* Avoid continuously filtering the moving game behind touch controls. */
@media(pointer:coarse){#touch-controls button{backdrop-filter:none;-webkit-backdrop-filter:none}}

/* Larger categories remain readable and tappable on phones. */
#character-wheel .wheel-options[data-grid=true]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;height:auto;background:none;width:100%}
#character-wheel .wheel-options[data-grid=true]>button[data-character]{position:relative;inset:auto;width:100%;height:96px;border-radius:16px}
#character-wheel .wheel-options[data-grid=true] #wheel-close{position:static;grid-column:1/-1;justify-self:center}

/* Proximity microphone stays beside the HUD, outside the thumb controls. */
#voice-toggle{position:fixed;z-index:7;right:max(12px,env(safe-area-inset-right));top:calc(104px + env(safe-area-inset-top,0px));display:flex;align-items:center;justify-content:center;gap:5px;min-width:88px;min-height:44px;padding:8px 10px;border:1px solid #ffffff55;border-radius:22px;background:#173543bd;color:white;font-size:12px;touch-action:manipulation;text-shadow:0 1px 2px #0005}#voice-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}#voice-toggle[data-muted=false]{background:#276640e8;border-color:#a1e6b9}#voice-toggle[data-muted=false] .mic-slash{display:none}.native-menu #voice-toggle,body:has(dialog[open]) #voice-toggle{visibility:hidden}@media(orientation:landscape){#voice-toggle{top:calc(76px + env(safe-area-inset-top,0px))}}

/* Deployment warnings stay clear of the HUD and thumb controls. */
#update-banner{position:fixed;z-index:10000;top:calc(env(safe-area-inset-top,0px) + 88px);left:50%;transform:translateX(-50%);width:min(90vw,440px);padding:12px 16px;border:2px solid #ffda56;border-radius:16px;background:#152f3cf2;color:#fff;text-align:center;pointer-events:none;box-sizing:border-box;box-shadow:0 4px 20px #0008;display:grid;gap:4px;font-size:14px}
#update-banner strong,#update-countdown{color:#ffe377;font-size:18px}
#update-screen{position:fixed;z-index:11000;inset:0;display:grid;place-items:center;box-sizing:border-box;padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:#102632;color:#fff;overflow:auto;text-align:center}
#update-screen>div{max-width:440px;margin:auto}#update-screen h1{color:#ffe377;font-size:clamp(28px,7vw,40px)}#update-screen p{font-size:18px;line-height:1.5}.update-hint{opacity:.8;font-size:15px!important}
#update-banner[hidden],#update-screen[hidden]{display:none}

/* A paged wheel keeps every owned character reachable without hidden category tabs. */
#character-wheel,#character-store{width:min(420px,calc(100vw - 20px));max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);padding:0;border-radius:24px;background:#172e3b;overflow:hidden;box-shadow:0 20px 80px #0008}
#character-wheel[open],#character-store[open]{display:flex;flex-direction:column}
#character-wheel::backdrop,#character-store::backdrop{background:#071924bd}
.collection-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid #ffffff18;flex:none;text-align:left}
#character-wheel h2,.collection-header h2{font-size:21px;margin:0}
.collection-header button{min-height:44px;padding:10px 16px;flex:none}
#character-wheel #wheel-close{position:static;width:auto;height:auto;font-size:15px;border-radius:12px;background:#ffdc6a;color:#142d39}
.collection-category{display:block;text-align:left;font-size:12px;color:#b9ced8;margin:0;font-weight:650}
.collection-category select{display:block;width:100%;margin:6px 0 0;min-height:46px;padding:10px 36px 10px 12px;font-size:16px;border-radius:12px;border:1px solid #6a8795;background:#243e4c;color:white;height:48px;appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,#c5d8e0 50%),linear-gradient(135deg,#c5d8e0 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px;background-repeat:no-repeat}
.wheel-content{padding:12px 16px 4px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;min-height:0}
#wheel-help{font-size:12px;color:#b9ced8;margin:12px 0 0;min-height:15px}
#character-wheel .wheel-options{display:block;position:relative;width:320px;max-width:100%;height:auto;aspect-ratio:1;margin:8px auto;--radius:108px;border-radius:50%;background:radial-gradient(circle at center,#ffdc6a0a 0 24%,transparent 25% 46%,#ffffff06 47% 70%,transparent 71%)}
#character-wheel .wheel-options>button[data-character]{position:absolute;left:calc(50% - 42px + var(--x)*var(--radius));top:calc(50% - 42px + var(--y)*var(--radius));inset-inline-end:auto;bottom:auto;width:84px;height:84px;min-height:0;padding:5px;gap:3px;border-radius:50%;font-size:12px;line-height:1.1;background:#294553;border:2px solid #7895a04f}
#character-wheel .wheel-options>button[aria-pressed=true]{background:#55482c;border-color:#ffdc6a;box-shadow:0 0 0 3px #ffdc6a26}
#character-wheel .wheel-options>button:hover{border-color:#ffdc6a}
#character-wheel .wheel-options>button:focus-visible{outline:3px solid #fff;outline-offset:3px}
#character-wheel .wheel-options>button[data-locked=true]{opacity:.65}
#character-wheel .wheel-options>button span{max-width:100%;overflow-wrap:anywhere}
#character-wheel .wheel-options canvas{width:30px;height:30px;image-rendering:pixelated;flex:none}
.wheel-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:96px;display:flex;flex-direction:column;align-items:center;gap:4px;pointer-events:none}
.wheel-center>span{font-size:10px;color:#b9ced8}.wheel-center strong{font-size:12px;line-height:1.2}.wheel-center canvas{width:36px!important;height:36px!important}
.wheel-pagination{display:flex;align-items:center;justify-content:center;gap:24px}.wheel-pagination button{min-width:48px;min-height:44px;padding:4px;font-size:26px;background:#ffffff12;color:white}.wheel-pagination button:disabled{opacity:.3}.wheel-pagination span{font-size:13px;color:#c5d8e0;min-width:44px;font-variant-numeric:tabular-nums}
#costume-label{margin:8px 0;font-size:13px;text-align:left}#costume-label select{font-size:16px;min-height:44px}
.collection-footer{flex:none;padding:10px 16px 14px;border-top:1px solid #ffffff18}
#wheel-store,#store-wheel{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:44px;background:#ffffff0c;border:1px solid #ffffff24;color:#ffdf7a;font-size:14px;padding:10px 14px}

.store-wallet{font-size:14px;margin:4px 0 0;color:#ffdf7a}.store-wallet strong{font-variant-numeric:tabular-nums}
#wheel-browse{width:100%;min-height:44px;background:#ffffff0c;border:1px solid #ffffff24;color:#ffdf7a;font-size:14px;padding:10px 14px}
#wheel-status,#store-status{font-size:13px;min-height:0;margin:8px 0 0;color:#ffdf7a}#wheel-status:empty,#store-status:empty{display:none}
#character-store{width:min(340px,calc(100vw - 32px));text-align:center}#character-store .collection-header{justify-content:center}.purchase-content{padding:22px 18px;overflow:auto}.purchase-content canvas{width:64px;height:64px;image-rendering:pixelated}.purchase-content h3{margin:14px 0 10px;font-size:22px}.purchase-content p{font-size:14px;color:#c5d8e0;line-height:1.5;margin:0}.purchase-actions{display:flex;gap:10px}.purchase-actions button{flex:1;min-height:48px;font-size:15px;padding:10px}#store-cancel{background:#ffffff14;color:white}#store-buy:disabled{opacity:.5}
@media(max-width:359px){#character-wheel .wheel-options{--radius:94px}#character-wheel .wheel-options>button[data-character]{width:76px;height:76px;left:calc(50% - 38px + var(--x)*var(--radius));top:calc(50% - 38px + var(--y)*var(--radius));font-size:11px}.wheel-content{padding-inline:8px}.collection-header{padding:12px}}
@media(max-height:500px) and (orientation:landscape){#character-wheel{width:min(640px,calc(100vw - 20px))}#character-wheel[open]{display:grid;grid-template-columns:270px 1fr;grid-template-rows:auto 1fr}#character-wheel .collection-header{grid-column:2;grid-row:1;align-self:start}#character-wheel .wheel-content{grid-column:1/-1;grid-row:1/3;display:grid;grid-template-columns:250px 1fr;grid-template-rows:84px auto auto auto;gap:6px 16px;padding:10px 16px;pointer-events:none}#character-wheel .wheel-content>*{pointer-events:auto}#character-wheel .collection-category{grid-column:2;grid-row:2}#character-wheel #wheel-help{grid-column:2;grid-row:3;margin:0}#character-wheel .wheel-options{grid-column:1;grid-row:1/5;width:250px;--radius:86px;margin:0;align-self:center}#character-wheel .wheel-options>button[data-character]{width:72px;height:72px;left:calc(50% - 36px + var(--x)*var(--radius));top:calc(50% - 36px + var(--y)*var(--radius));font-size:10px}#character-wheel .wheel-pagination{grid-column:2;grid-row:4;padding-bottom:60px}#character-wheel .collection-footer{grid-column:2;grid-row:2;align-self:end;z-index:1;border:0;background:#172e3b}#character-wheel #costume-label{grid-column:1/-1}}
#world-menu{width:min(500px,calc(100vw - 20px));max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);padding:0;border-radius:24px;background:#172e3b;overflow:hidden}#world-menu[open]{display:flex;flex-direction:column}#world-menu::backdrop{background:#071924bd}
#world-menu-content{padding:12px 16px;display:grid;gap:12px;overflow:auto;overscroll-behavior:contain}.world-card{padding:16px;border:1px solid #ffffff20;background:#ffffff06;border-radius:16px}.world-card h3{font-size:18px;margin:0}.world-card p{font-size:12px;color:#b9ced8;line-height:1.5;margin:6px 0}.world-card .world-roster{font-size:14px;color:#e4f0f5;margin:12px 0;overflow-wrap:anywhere}.world-card button{width:100%;min-height:46px;font-size:15px}.world-card button:disabled{background:#ffffff12;color:#b9ced8}.world-card button:focus-visible{outline:3px solid white;outline-offset:3px}#world-menu-status{margin:0;padding:0 16px 12px;color:#ffdf7a;font-size:14px}#world-menu-status:empty{padding:0}
/* Minigame actions stay beside the text instead of filling another row. */
.world-card.minigame-card{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:6px 16px}
.world-card.minigame-card>:is(h3,p){grid-column:1;min-width:0;margin:0}
.world-card.minigame-card>button{grid-column:2;grid-row:1/4;align-self:center;width:auto;min-width:80px;max-width:112px;min-height:48px;padding:10px 16px}
@media(max-width:359px){
 .world-card.minigame-card{column-gap:12px}
 .world-card.minigame-card>button{min-width:68px;max-width:96px;padding-inline:10px}
}
/* Five native HUD icons stay in one row, below the device's safe area. */
.playing #portrait-hud{gap:4px;align-items:flex-start}
#portrait-hud #camera-menu{flex:none;width:44px;min-height:48px}
#portrait-hud #hud-camera{width:44px;height:44px}
#portrait-hud #power-pause{margin-left:0}
#portrait-hud #character-switch{min-width:0}
@media(max-width:520px){
 .playing #portrait-hud{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));gap:2px}
 #portrait-hud #hud-lives,#portrait-hud #hud-stars{width:65px;height:29px}
 #portrait-hud #hud-coins{width:86px;height:28px}
 #portrait-hud #hud-health{width:54px;height:54px}
 #character-switch .switch-chevron{display:none}
}
@media(max-width:350px){#portrait-hud #hud-lives,#portrait-hud #hud-stars{width:55px;height:25px}#portrait-hud #hud-coins{width:74px;height:26px}#portrait-hud #hud-health{width:48px;height:48px}}
#game-invite{position:fixed;z-index:8;top:calc(env(safe-area-inset-top) + 74px);left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));max-width:620px;margin:auto;display:flex;align-items:center;gap:8px;padding:3px 6px 3px 12px;background:#102731ed;border:1px solid #ffdf6770;border-radius:12px;box-shadow:0 2px 8px #0004;color:#fff;font-size:12px}
#game-invite[hidden]{display:none}#game-invite-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#game-invite button{min-height:44px;padding:5px 12px;font-size:12px}#game-invite-dismiss{background:transparent;color:#bccdd3;font-size:20px!important;padding:4px 10px!important}
#notice{top:calc(env(safe-area-inset-top) + 130px);bottom:auto;max-width:min(480px,calc(100% - 32px));width:max-content;box-sizing:border-box;font-size:13px;line-height:1.4;padding:10px 14px;pointer-events:none}
.native-menu #notice{visibility:visible}

/* Preserve native sprite proportions and align every HUD control on one row. */
.playing #portrait-hud{display:flex;align-items:center;justify-content:space-between;gap:4px}
#portrait-hud #character-switch,#portrait-hud #zone-menu,#portrait-hud #coin-store{flex:0 1 var(--hud-counter-size,70px);width:var(--hud-counter-size,70px);min-width:44px;height:54px;min-height:44px;margin:0;padding:0}
#portrait-hud #hud-lives,#portrait-hud #hud-stars,#portrait-hud #hud-coins{display:block;width:100%;height:auto;max-width:100%;margin:0;padding:0}
#portrait-hud #camera-menu,#portrait-hud #power-pause{flex:0 0 auto;min-width:0;height:54px;margin:0;padding:0;align-items:center}
#portrait-hud #camera-menu{width:44px}#portrait-hud #hud-camera{width:44px;height:44px}
#portrait-hud #power-pause{width:54px}#portrait-hud #hud-health{width:54px;height:54px;margin:0}
#portrait-hud .switch-chevron{display:none}

/* Coop-inspired arcade menus. HUD and gesture controls keep their own styles. */
:root{--menu-ink:#fff8df;--menu-muted:#d2c9b7;--menu-gold:#ffe45e;font-family:'Arial Rounded MT Bold',ui-rounded,system-ui,sans-serif}
body{background:radial-gradient(ellipse at top,#344f78,#141720 75%)}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,.panel){color:var(--menu-ink);background:linear-gradient(145deg,#343434f7,#171717fa);border:3px solid #77736b;border-radius:12px;box-shadow:inset 0 0 0 2px #111,0 6px 0 #080808,0 16px 48px #0008}
dialog::backdrop,#character-wheel::backdrop,#character-store::backdrop,#world-menu::backdrop{background:#080b1299;backdrop-filter:none;-webkit-backdrop-filter:none}
/* Native panels never show behind the app-owned replacement. */
#coop-settings::backdrop,#pause-sheet::backdrop{background:#151923;backdrop-filter:none;-webkit-backdrop-filter:none}
body.native-panel #canvas{visibility:hidden}
:is(dialog,.panel) :is(h1,h2,h3){font-family:'Arial Rounded MT Bold',ui-rounded,system-ui,sans-serif;font-weight:950;letter-spacing:.01em;color:var(--menu-gold);text-shadow:2px 2px 0 #000,-1px -1px 0 #000;line-height:1.2}
:is(dialog,.panel) h2{font-size:25px}
:is(dialog,.panel) button{min-height:48px;border:2px solid #8ea8df;border-bottom-color:#1c3168;border-right-color:#1c3168;border-radius:8px;background:linear-gradient(#467bd1,#2852a0);color:#fffaf0;box-shadow:inset 0 1px 0 #ffffff40,0 3px 0 #101829;font-weight:850;text-shadow:1px 2px 0 #16305a;font-size:16px;transition:background .12s,transform .12s}
:is(dialog,.panel) button:hover:not(:disabled),:is(dialog,.panel) button:focus-visible{filter:none;border-color:var(--menu-gold);background:linear-gradient(#568deb,#3264bf);outline:2px solid var(--menu-gold);outline-offset:2px}
:is(dialog,.panel) button:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 1px 0 #ffffff30,0 1px 0 #101829}
:is(dialog,.panel) button:disabled{opacity:.45;cursor:default}
:is(dialog,.panel) :is(.secondary,#store-cancel,#wheel-browse,.wheel-pagination button){background:linear-gradient(#55524c,#34322f);border-color:#8f897d #24211d #24211d #8f897d;color:var(--menu-ink);text-shadow:1px 2px #171513}
:is(dialog,.panel) :is(label,p,.controls-help,#metrics){color:var(--menu-muted)}
:is(dialog,.panel) :is(input:not([type=checkbox]):not([type=range]),select){border:2px solid #81796a;border-radius:6px;background-color:#171717;color:#fff8df;min-height:48px;font-size:16px}
:is(dialog,.panel) :is(input[type=checkbox],input[type=range]){accent-color:var(--menu-gold)}
:is(dialog,.panel) input[type=checkbox]{width:25px;height:25px;flex:none}
:is(dialog,.panel) :is(input,select):focus-visible{outline:3px solid var(--menu-gold);outline-offset:2px}
:is(.sheet-header,.collection-header){background:#202020;border-bottom:2px solid #615d53;padding:14px 16px;gap:12px}
:is(.sheet-header,.collection-header) h2,#character-wheel h2{font-size:23px}
:is(.sheet-header,.collection-header) button,#character-wheel #wheel-close{background:linear-gradient(#fff08a,#edc747);border-color:#fff4b4 #806624 #806624 #fff4b4;color:#342a13;text-shadow:none;border-radius:8px;font-size:15px;min-height:48px}
.collection-footer,#character-wheel .collection-footer{border-top:2px solid #615d53;background:#202020}
.collection-category,.wheel-center>span,#wheel-help,.wheel-pagination span{color:var(--menu-muted)}
#character-wheel .wheel-options{background:radial-gradient(circle,#ffe45e12 0 24%,transparent 25% 44%,#ffe45e0a 45% 69%,transparent 70%)}
#character-wheel .wheel-options>button[data-character]{background:linear-gradient(145deg,#55534f,#292826);border:2px solid #918b7d;color:#fff8df;text-shadow:1px 2px #000;box-shadow:0 3px 0 #0c0c0c}
#character-wheel .wheel-options>button[aria-pressed=true]{background:linear-gradient(#a17b28,#5a4014);border-color:#ffe45e;box-shadow:0 0 0 3px #ffe45e66,0 3px 0 #0c0c0c}
#character-wheel .wheel-options>button[data-locked=true]{opacity:.85;border-style:dashed}
#character-wheel .wheel-options>button[data-locked=true] canvas{filter:brightness(.65)}
.wheel-center strong{color:var(--menu-gold);text-shadow:1px 2px #000}
#character-wheel .wheel-pagination button{font-size:26px}
#wheel-browse{border:2px solid #8f897d;color:var(--menu-gold);border-radius:8px;background:linear-gradient(#55524c,#34322f)}
.store-wallet,.store-wallet strong,#wheel-status,#store-status{color:var(--menu-gold)!important}
.world-card,.coop-control{background:#12121280;border:1px solid #625d52;border-radius:8px}
.world-card h3,.world-card .world-roster{color:#fff8df}.world-card p{font-size:14px}
.coop-control{padding:12px}.coop-control>span{color:var(--menu-ink);font-size:16px}
#coop-items{padding:16px;gap:12px}.coop-description:first-child{display:none}
#pause-sheet{padding:22px;max-width:420px}#pause-sheet h2{text-align:center;margin:0 0 22px;font-size:30px}
#pause-sheet #tools-menu{gap:12px}#pause-sheet>button,#pause-sheet #tools-menu button{min-height:52px;margin-bottom:4px}
#pause-resume{background:linear-gradient(#65a54c,#34732b);border-color:#a8da88 #20451b #20451b #a8da88;text-shadow:1px 2px #244b20}
#pause-sheet #leave{background:linear-gradient(#9b4540,#6c2928);border-color:#c47c70 #411b19 #411b19 #c47c70;text-shadow:1px 2px #381816}
#settings .dialog-title{margin-bottom:16px}#settings .dialog-title button{min-width:48px;min-height:48px;font-size:26px}
.device-options{border-color:#615d53}.device-options summary{color:var(--menu-ink);font-size:16px}.controls-help{font-size:14px!important;line-height:1.65}
@media(max-width:359px){:is(.sheet-header,.collection-header) h2,#character-wheel h2{font-size:20px}:is(.sheet-header,.collection-header){padding:12px;gap:8px}}
@media(prefers-reduced-motion:reduce){:is(dialog,.panel) button{transition:none}}
:is(dialog,.panel) :is(.sheet-header,.collection-header) button:is(:hover,:focus-visible),#character-wheel #wheel-close:is(:hover,:focus-visible){background:linear-gradient(#fff6ad,#f5d65c);color:#342a13;border-color:#ffe45e;text-shadow:none}

/* Names sit beside native mission stars, with touch targets for exact-area joins. */
.mission-roster{position:fixed;inset:0;z-index:12;pointer-events:none}
.mission-roster[hidden]{display:none}
.mission-occupants{position:absolute;transform:translateX(-50%);display:flex;flex-direction:column;gap:3px;max-height:25vh;overflow:auto;pointer-events:auto;max-width:90px}
.mission-occupants button{min-height:44px;padding:4px;display:flex;align-items:center;gap:3px;background:#18202be8;color:white;border:1px solid #ffe078;border-radius:7px;font-size:11px;max-width:90px}
.mission-occupants canvas{width:22px;height:22px;flex:none;image-rendering:pixelated}
.mission-occupants span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:480px){.mission-occupants,.mission-occupants button{max-width:56px}.mission-occupants button{flex-direction:column;gap:0}.mission-occupants span{max-width:48px}}

body:not(.playing) .mission-roster{display:none}

/* Transparent character wheel with original franchise artwork. */
#character-wheel{background:linear-gradient(145deg,#222b35ba,#111720c2);border-color:#d7dce166;box-shadow:0 12px 40px #0006,inset 0 0 0 1px #ffffff14}
#character-wheel::backdrop{background:#080b1226}
#character-wheel .collection-header,#character-wheel .collection-footer{background:transparent}
#character-wheel .collection-footer:has(#wheel-status:empty){display:none}
#character-wheel #wheel-close{width:44px;height:44px;min-height:44px;padding:0;font-size:30px;line-height:1;background:#ffffff12;color:#fff;border:1px solid #ffffff38;box-shadow:none;text-shadow:none}
.franchise-navigation{display:flex;align-items:center;gap:3px;min-width:0}
#character-wheel .franchise-navigation>button{width:25px;min-width:25px;min-height:48px;padding:0;font-size:25px;background:transparent;border:0;box-shadow:none;color:#ffe45e}
#wheel-groups{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain;min-width:0;flex:1;touch-action:pan-x}
#wheel-groups::-webkit-scrollbar{display:none}
#character-wheel #wheel-groups button{flex:0 0 80px;min-height:54px;max-height:54px;padding:7px;background:#080b124d;border:1px solid #ffffff30;border-radius:8px;box-shadow:none;display:flex;align-items:center;justify-content:center;color:#fff;font-size:26px}
#character-wheel #wheel-groups button[aria-selected=true]{border-color:#ffe45e;background:#ffe45e24;box-shadow:inset 0 -3px #ffe45e}
#character-wheel #wheel-groups button:focus-visible{outline:2px solid white;outline-offset:-3px}
#wheel-groups img{width:100%;height:38px;object-fit:contain;filter:drop-shadow(0 1px 1px #0008)}
#character-wheel .wheel-options>button[data-character]{background:linear-gradient(145deg,#535961bb,#222831b3)}
#character-wheel .wheel-options>button[aria-pressed=true]{background:linear-gradient(#a17b28cf,#5a4014b3)}
#character-wheel .wheel-content{padding-top:8px}
@media(max-height:500px) and (orientation:landscape){#character-wheel .franchise-navigation{grid-column:2;grid-row:2}#character-wheel .wheel-pagination{grid-column:2;grid-row:3;padding-bottom:0}#character-wheel .wheel-content{grid-template-rows:76px 60px 48px auto}#character-wheel .collection-footer{grid-row:4}}

#character-wheel #wheel-groups button[data-group=recent]{flex-basis:44px;font-size:23px}

/* Short, compositor-only feedback keeps the wheel responsive on mobile GPUs. */
#character-wheel{border-width:1px;border-radius:18px;overflow-x:hidden}
#character-wheel[open]{animation:wheel-enter 160ms ease-out}
#character-wheel .collection-header{border-bottom:1px solid #ffffff1c;padding:16px 18px}
#character-wheel .collection-header h2{letter-spacing:-.025em;text-shadow:0 2px 0 #0008}
#character-wheel .franchise-navigation{gap:0;padding-block:3px}
#character-wheel .franchise-navigation>button{width:44px;min-width:44px;min-height:54px;border-radius:10px}
#wheel-groups{scroll-snap-type:x proximity;scroll-padding-inline:3px}
#character-wheel #wheel-groups button{scroll-snap-align:start;border-radius:11px}
#character-wheel :is(#wheel-close,.franchise-navigation>button,.wheel-pagination button,.wheel-options>button[data-character],#wheel-groups button){touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform 110ms ease-out,background-color 110ms ease-out}
#character-wheel :is(#wheel-close,.franchise-navigation>button,.wheel-pagination button,.wheel-options>button[data-character],#wheel-groups button):active:not(:disabled){transform:scale(.95)}
#character-wheel .wheel-options>button[data-character]{border:1px solid #c7d0d06b;box-shadow:0 3px 8px #0003;text-shadow:0 1px 2px #000;font-weight:700}
#character-wheel .wheel-options>button[data-locked=true]{border-style:solid;opacity:.85}
#character-wheel .wheel-options>button[aria-pressed=true]{border:2px solid #ffe45e;box-shadow:0 0 0 3px #ffe45e30,0 3px 8px #0003}
#character-wheel .wheel-pagination{padding-top:6px;padding-bottom:8px}
#character-wheel .wheel-pagination button{min-width:48px;min-height:48px;border-radius:12px;box-shadow:none}
#character-wheel .wheel-pagination button:disabled{opacity:.3}
#character-wheel #wheel-page{font-variant-numeric:tabular-nums;color:#e8e4d9}
body:has(#character-wheel[open]) #touch-controls{visibility:hidden}
@keyframes wheel-enter{from{opacity:0;transform:translateY(6px) scale(.985)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){#character-wheel[open]{animation:none}#character-wheel button{transition:none!important}}

/* Franchise symbols share one square footprint, distinct from roster filters. */
#character-wheel #wheel-groups button{flex:0 0 52px;min-width:52px;height:54px;padding:9px}
#character-wheel #wheel-groups button img{width:34px;height:34px;object-fit:contain;filter:none}
#character-wheel #wheel-groups button[aria-selected=true]{background:#8c7028cc;border-color:#ffe45e;box-shadow:inset 0 -3px #ffe45e}

.graphics-control{margin:20px 0}.graphics-control>label{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.graphics-control #quality-status{font-size:12px;color:#ddd3a7;font-weight:500}.graphics-control #quality{min-height:44px;touch-action:pan-y;margin:0;background:transparent;border:0}.graphics-endpoints{display:flex;justify-content:space-between;font-size:12px;color:#c8c4b7}.graphics-control #quality-recommended{min-height:44px;margin-top:12px;font-size:13px;padding:10px 14px}.graphics-control #quality-recommended:disabled{cursor:default;opacity:.4}

/* Power menu preferences fit phones without exposing native settings pages. */
#pause-sheet,#settings,#coop-settings{width:min(440px,calc(100vw - 24px));padding:0;box-sizing:border-box;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);overflow:hidden}
#pause-sheet[open],#coop-settings[open],#settings[open],#settings form{display:flex;flex-direction:column;min-height:0}
#settings form{margin:0;width:100%;max-height:inherit;overflow:hidden}
#settings .sheet-header,#pause-sheet .sheet-header,#coop-settings .sheet-header{flex:none;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:#202020e8}
#settings .sheet-header h2,#pause-sheet .sheet-header h2,#coop-settings .sheet-header h2{margin:0;font-size:22px}
:is(#settings,#pause-sheet,#coop-settings,#world-menu,#minigame-sheet,#flood-sheet,#tag-sheet,#bowling-sheet,#overcooked-sheet,#courtroom-sheet) :is(.sheet-header,.collection-header) button[aria-label^="Close"]{display:grid;place-items:center;min-width:44px;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#fff8df;text-shadow:none;box-shadow:none;font-size:30px;line-height:1;flex:none}
:is(#settings,#pause-sheet,#coop-settings,#world-menu,#minigame-sheet,#flood-sheet,#tag-sheet,#bowling-sheet,#overcooked-sheet,#courtroom-sheet) :is(.sheet-header,.collection-header) button[aria-label^="Close"]:hover{background:#ffffff0c;color:#ffe45e}
:is(#settings,#pause-sheet,#coop-settings,#world-menu,#minigame-sheet,#flood-sheet,#tag-sheet,#bowling-sheet,#overcooked-sheet,#courtroom-sheet) :is(.sheet-header,.collection-header) button[aria-label^="Close"]:focus-visible{outline:2px solid #ffe45e;outline-offset:-2px}
.pause-content,.settings-content,.camera-content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:16px;scroll-padding-block:12px}
.pause-content{display:grid;gap:12px}
#pause-sheet #pause-resume,#pause-sheet #pause-exit{width:100%;margin:0}
#pause-status{margin:0;font-size:14px}
#pause-status:empty{display:none}
#pause-sheet #leave{background:transparent;border:0;box-shadow:none;text-shadow:none;color:var(--menu-muted);margin:0}
.settings-section{margin:0 0 18px;padding:0 0 18px;border-bottom:1px solid #ffffff25;text-align:left}
.settings-section:last-child{margin-bottom:0;border-bottom:0;padding-bottom:0}
.settings-section h3{font-size:16px;margin:0 0 12px;letter-spacing:.04em}
.settings-section>label{margin:0 0 8px;font-size:15px}
.nickname-input{display:flex;gap:8px;margin:8px 0}
.nickname-input input{min-width:0;flex:1;width:100%;margin:0;box-sizing:border-box}
.nickname-input button{flex:none;padding:8px 14px}
.settings-section .check{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px;min-height:48px;margin:10px 0 0}
.settings-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left}
:is(dialog) .text-action{background:transparent;border:0;border-radius:4px;box-shadow:none;color:var(--menu-muted);text-shadow:none;min-height:44px;padding:8px 12px;font-size:14px}
:is(dialog) .text-action:hover:not(:disabled){background:#ffffff0a;color:var(--menu-gold)}
.settings-footer{padding:12px 16px;display:flex;flex-direction:column;gap:6px;border-top:1px solid #ffffff25;background:#202020e8;flex:none}
#name-status{font-size:13px;margin:6px 0 0;color:var(--menu-gold);overflow-wrap:anywhere}
#name-status:empty{display:none}
#settings details summary{min-height:44px;display:flex;align-items:center;gap:8px;font-weight:750;font-size:16px;cursor:pointer}
#settings details summary::before{content:'›';font-size:22px;color:var(--menu-gold)}
#settings details[open] summary::before{transform:rotate(90deg)}
#settings .controls-help{font-size:14px;line-height:1.75;max-width:100%;margin:12px 0}
.touch-help{display:none}
.camera-content .coop-control{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;min-height:48px;margin:0;padding:10px 0;border-bottom:1px solid #ffffff20}
.camera-content .coop-control>span{font-size:15px;flex:1;min-width:0}
.camera-content input[type=range]{min-height:44px;width:100%;margin:0}
.camera-content #sensitivity-label{border-bottom:0}
@media(pointer:coarse){.touch-help{display:block}.desktop-help{display:none}}
@media(max-height:500px){.pause-content,.settings-content,.camera-content{padding:12px}.pause-content{gap:8px}#tools-menu{gap:8px}#tools-menu button{min-height:48px}.settings-footer{padding:8px 12px;flex-direction:row}.settings-footer>button{flex:1}}

/* Approved Recents reference: translucent charcoal, gold titles and franchise tabs. */
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel){--menu-ink:#fff8df;--menu-muted:#d2c9b7;--menu-gold:#ffe45e;background:linear-gradient(145deg,#222b35ba,#111720c2);border:1px solid #d7dce166;border-radius:18px;box-shadow:0 12px 40px #0006,inset 0 0 0 1px #ffffff14;color:var(--menu-ink)}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel)::backdrop{background:#080b1226;backdrop-filter:none;-webkit-backdrop-filter:none}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(.sheet-header,.collection-header,.collection-footer,.settings-footer){background:transparent;border-color:#ffffff1c;border-width:1px}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(.sheet-header,.collection-header) button[aria-label^="Close"]{width:48px;height:48px;min-height:48px;padding:0;border:1px solid #ffffff38;border-radius:8px;background:#ffe45e;color:#342a13;box-shadow:none;text-shadow:none;font-size:30px;line-height:1}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(.sheet-header,.collection-header) button[aria-label^="Close"]:is(:hover,:focus-visible){background:#fff08a;color:#342a13;outline:2px solid #ffe45e;outline-offset:2px}
#character-wheel #wheel-close{display:grid;place-items:center;width:44px;height:44px;min-height:44px;background:#ffe45e;border:1px solid #806624;border-radius:8px;color:#342a13;box-shadow:none;text-shadow:none;outline:2px solid #ffe45e;outline-offset:2px}
#character-wheel #wheel-close:is(:hover,:focus-visible,:active){background:#fff08a;color:#342a13;box-shadow:none;outline:2px solid #ffe45e;outline-offset:2px}
#pause-sheet .pause-content>button{min-height:48px;width:100%;margin:0;padding:12px 28px;text-align:left}
#pause-sheet .pause-content>button:is(:hover,:focus-visible):not(:disabled)::before{content:'▸';position:absolute;left:10px;color:#fff}
#pause-sheet .pause-content{gap:4px}
#pause-sheet #leave{color:var(--menu-muted)}
body.native-panel:has(#pause-sheet[open]) #canvas{visibility:visible}
@media(prefers-reduced-motion:reduce){:is(dialog,.panel) button{transition:none!important}}

#notice,#game-invite{background:#000c;border:1px solid #ffffff55;border-radius:0;box-shadow:none;text-shadow:none;backdrop-filter:none}

/* Desktop HUD grows with the shorter viewport axis; touch layouts retain their size. */
@media(min-width:900px) and (pointer:fine){
 :root{--desktop-hud-size:clamp(72px,11vmin,120px)}
 .playing #portrait-hud{left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));gap:12px}
 #portrait-hud :is(#character-switch,#zone-menu,#coin-store){flex-basis:calc(var(--hud-counter-ratio,1.3)*var(--desktop-hud-size));width:calc(var(--hud-counter-ratio,1.3)*var(--desktop-hud-size));height:var(--desktop-hud-size)}
 #portrait-hud :is(#camera-menu,#power-pause){height:var(--desktop-hud-size)}
 #portrait-hud #camera-menu,#portrait-hud #hud-camera{width:calc(var(--desktop-hud-size)*.815);height:calc(var(--desktop-hud-size)*.815)}
 #portrait-hud #power-pause,#portrait-hud #hud-health{width:var(--desktop-hud-size);height:var(--desktop-hud-size)}
 #portrait-hud span{font-size:clamp(14px,1.6vmin,20px)}
 .playing #game-invite{top:calc(env(safe-area-inset-top) + var(--desktop-hud-size) + 24px)}
 .playing #notice{top:calc(env(safe-area-inset-top) + var(--desktop-hud-size) + 80px)}
}

#smash-leave {position:fixed;z-index:35;left:max(12px,env(safe-area-inset-left));top:calc(72px + env(safe-area-inset-top));font-size:12px;padding:7px 10px;}
body.smash-arena #touch-controls button {translate:0 calc(var(--smash-hud-rows,1) * -14.583333vh)}
body.smash-arena #hud-lives,body.smash-arena #hud-stars,body.smash-arena #hud-health {opacity:.3}
body.smash-arena #gesture-hint {display:none}

/* Shared destinations: the same three choices appear from every main menu. */
.destination-navigation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px 16px 12px;flex:none;border-bottom:1px solid #ffffff1c}
.destination-navigation button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:52px;padding:8px 5px;background:#ffffff0c;border:1px solid #ffffff25;border-radius:9px;box-shadow:none;color:var(--menu-ink);text-shadow:none;font-size:14px}
.destination-navigation button[aria-current=page]{border-color:var(--menu-gold);background:#80632166;color:var(--menu-gold)}
.navigation-picture{display:flex;align-items:center;justify-content:center;font-size:22px;min-width:24px}
.navigation-picture canvas{width:24px;height:24px;image-rendering:pixelated}
.navigation-picture canvas+canvas{margin-left:-12px;margin-top:8px}
body:has(dialog[open]) #game-invite{display:none!important}

#world-menu.menu-experience{width:min(620px,calc(100vw - 20px))}
#world-menu .destination-section{font-size:13px;letter-spacing:.03em;margin:4px 0 -3px;color:var(--menu-muted)}
#world-menu-content{scroll-padding-block:12px;min-height:0}
.world-card.destination-card{padding:12px;column-gap:12px;align-items:center}
.world-card.destination-card>.destination-info{grid-column:1;grid-row:1;display:flex;gap:12px;align-items:center;min-width:0}
.world-card.destination-card>button{grid-column:2;grid-row:1;align-self:center;min-width:80px;max-width:96px;padding:10px 12px}
.destination-scene{width:100px;height:86px;flex:none;object-fit:cover;object-position:center 52%;border-radius:7px;background:#101419;border:1px solid #ffffff24}
.destination-text{min-width:0;flex:1}
.world-card .destination-text h3{font-size:17px;line-height:1.25;margin:0;overflow-wrap:anywhere}
.world-card .destination-description{font-size:13px;line-height:1.35;margin:5px 0 0}
.world-card .destination-description:empty{display:none}
.world-presence{display:flex;align-items:center;gap:4px;margin-top:8px;min-width:0;color:var(--menu-gold);font-size:12px;line-height:1.3}
.world-presence canvas{width:22px;height:22px;image-rendering:pixelated;flex:none}
.world-presence canvas+canvas{margin-left:-10px}
.world-presence span{min-width:0;margin-left:3px;overflow-wrap:anywhere}
.players-empty{display:flex;align-items:center;gap:16px;justify-content:space-between;padding:12px 0;border-bottom:1px solid #ffffff20}
.players-empty p{font-size:14px;margin:0;line-height:1.4;color:var(--menu-muted)}
.players-empty button{width:auto;min-height:48px;font-size:14px;padding:10px 14px}
@media(max-width:420px){
 .destination-navigation{padding-inline:12px;gap:5px}
 .destination-navigation button{font-size:12px;gap:4px}
 .navigation-picture canvas{width:21px;height:21px}
 #world-menu-content{padding:10px 12px;gap:10px}
 .world-card.destination-card{padding:10px;column-gap:8px}
 .world-card.destination-card>.destination-info{gap:8px}
 .destination-scene{width:62px;height:70px}
 .world-card .destination-text h3{font-size:14px}
 .world-card .destination-description{display:none}
 .world-card.destination-card>button{min-width:68px;max-width:76px;padding-inline:8px;font-size:14px}
 .world-presence canvas{width:18px;height:18px}
 .world-presence{font-size:11px}
}

/* Characters use the same stable picture grid at every collection size. */
#character-wheel.menu-experience{width:min(500px,calc(100vw - 20px))}
#character-wheel.menu-experience[open]{display:flex;flex-direction:column}
#character-wheel.menu-experience .collection-header{padding:12px 16px;align-self:stretch}
#character-wheel.menu-experience .wheel-content{display:block;padding:8px 16px 12px;pointer-events:auto}
#character-wheel.menu-experience .wheel-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;position:static;width:100%;height:auto;aspect-ratio:auto;background:none;border-radius:0;margin:12px 0 8px}
#character-wheel.menu-experience .wheel-options>button[data-character]{position:static;inset:auto;width:100%;height:auto;min-height:112px;padding:10px 5px;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;font-size:13px;line-height:1.15}
#character-wheel.menu-experience .wheel-options canvas{width:42px;height:42px}
#character-wheel.menu-experience .wheel-center{display:none}
#character-wheel.menu-experience .character-state{font-size:11px;color:var(--menu-muted);font-weight:550;text-shadow:none}
#character-wheel.menu-experience [aria-pressed=true] .character-state{color:var(--menu-gold)}
#character-wheel.menu-experience #wheel-groups button:is([data-group=owned],[data-group=recent]){flex-basis:64px;min-width:64px;padding:8px 4px;font-size:12px}
#character-wheel.menu-experience .wheel-pagination{padding:8px 0 0}
#character-wheel.menu-experience .collection-footer:has(#wheel-status:empty){display:none}
@media(max-height:500px) and (orientation:landscape){
 #character-wheel.menu-experience{width:min(600px,calc(100vw - 20px))}
 #character-wheel.menu-experience .collection-header{padding:8px 16px}
 #character-wheel.menu-experience .wheel-content{padding:4px 16px 6px}
 #character-wheel.menu-experience .wheel-options{grid-template-columns:repeat(auto-fit,minmax(75px,1fr));margin:8px 0 4px}
 #character-wheel.menu-experience .wheel-options>button[data-character]{min-height:96px}
 #character-wheel.menu-experience .wheel-options canvas{width:32px;height:32px}
 .destination-navigation{padding-block:6px}
 .destination-navigation button{min-height:48px}
}
/* The Super 64 home cube is the menu shared by every game, not part of the SM64 HUD: it sits under the power meter,
   outside the HUD row and its shadow, and stays when a mode hides the SM64 HUD. */
#portrait-hud~#super64-home{display:none}
.playing #portrait-hud~#super64-home{display:grid;position:fixed;z-index:6;top:calc(72px + env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right))}
.native-menu #portrait-hud~#super64-home{visibility:hidden}
@media(max-width:520px){.playing #portrait-hud~#super64-home{right:max(8px,env(safe-area-inset-right))}}
@media(min-width:900px) and (pointer:fine){.playing #portrait-hud~#super64-home{top:calc(env(safe-area-inset-top) + var(--desktop-hud-size) + 18px);right:max(16px,env(safe-area-inset-right))}}
/* SM64's HUD icons only show their values, as in vanilla; every menu, pause included, lives in the cube menu. */
.playing #portrait-hud :is(#character-switch,#zone-menu,#coin-store,#power-pause){pointer-events:none}
/* Loading a game is the Super 64 launch cube, carried over from the menu: OLED black, the glass cube rolling in firm
   quarter turns over its violet glow, and the phase underneath. The old launcher card never shows while joining or
   loading. */
.cube-loader{display:none}
#launcher:is(:has(#progress:not([hidden])),:has(#play:disabled)){position:fixed;inset:0;z-index:20;width:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#08080f;box-shadow:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:34px;overflow:hidden}
#launcher:is(:has(#progress:not([hidden])),:has(#play:disabled))>:not(.cube-loader,#status){display:none!important}
#launcher:is(:has(#progress:not([hidden])),:has(#play:disabled)) .cube-loader{position:relative;display:grid;place-items:center;width:180px;height:170px;perspective:900px}
.cube-loader::after{content:"";position:absolute;left:50%;bottom:0;width:190px;height:38px;margin-left:-95px;border-radius:50%;background:radial-gradient(closest-side,rgba(139,108,255,.42),rgba(139,108,255,0))}
.cube-loader-cube{position:relative;width:96px;height:96px;transform-style:preserve-3d;transform:rotateX(-18deg) rotateY(28deg);animation:cube-loader-roll 2.6s infinite}
.cube-loader-cube i{position:absolute;inset:0;border-radius:8px;border:1px solid rgba(255,255,255,.28);background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(110,236,255,.12) 40%,rgba(103,79,221,.42));box-shadow:inset 0 0 24px rgba(255,255,255,.1)}
.cube-loader-cube i:nth-child(1){transform:translateZ(48px)}.cube-loader-cube i:nth-child(2){transform:rotateY(180deg) translateZ(48px)}.cube-loader-cube i:nth-child(3){transform:rotateY(90deg) translateZ(48px)}.cube-loader-cube i:nth-child(4){transform:rotateY(-90deg) translateZ(48px)}.cube-loader-cube i:nth-child(5){transform:rotateX(90deg) translateZ(48px)}.cube-loader-cube i:nth-child(6){transform:rotateX(-90deg) translateZ(48px)}
@keyframes cube-loader-roll{0%{transform:rotateX(-18deg) rotateY(28deg);animation-timing-function:cubic-bezier(.65,0,.35,1)}25%,50%{transform:rotateX(-18deg) rotateY(118deg);animation-timing-function:cubic-bezier(.65,0,.35,1)}75%,100%{transform:rotateX(-18deg) rotateY(208deg)}}
#launcher:is(:has(#progress:not([hidden])),:has(#play:disabled)) #status{margin:0;color:#c9cce0;font:600 15px system-ui,-apple-system,sans-serif;letter-spacing:.01em;text-shadow:none}
@media(prefers-reduced-motion:reduce){.cube-loader-cube{animation:none}}
/* The home cube owns the top-right corner; the HUD row ends just left of it, so the power meter never covers it. */
.playing #portrait-hud{right:calc(max(12px,env(safe-area-inset-right)) + 52px)}
.playing #portrait-hud~#super64-home{top:calc(17px + env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right))}
@media(max-width:520px){.playing #portrait-hud{right:calc(max(8px,env(safe-area-inset-right)) + 50px)}.playing #portrait-hud~#super64-home{right:max(8px,env(safe-area-inset-right))}}
@media(min-width:900px) and (pointer:fine){.playing #portrait-hud{right:calc(max(16px,env(safe-area-inset-right)) + 58px)}.playing #portrait-hud~#super64-home{top:calc(env(safe-area-inset-top) + 12px + (var(--desktop-hud-size) - 44px) / 2);right:max(16px,env(safe-area-inset-right))}}

/* Super 64 cube design on every SM64 screen: OLED ink, clear glass, white type, and the cube's cyan as the only accent
   (edges, focus, the one primary action). The original HUD art is untouched; only the chrome around it changes. These
   rules come last so they replace the earlier arcade theme without editing it. */
:root{--menu-ink:#edeff8;--menu-muted:#c9cce0;--menu-gold:#6eecff;--cube-ink:#08080f;--cube-panel:rgba(17,17,42,.95);--cube-text:#edeff8;--cube-soft:#c9cce0;--cube-muted:#9096b2;--cube-cyan:#6eecff;--cube-glass:rgba(255,255,255,.06);--cube-edge:rgba(255,255,255,.14);--cube-body:"Sora",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;--cube-display:"Unbounded","Arial Black",system-ui,-apple-system,sans-serif;font-family:var(--cube-body);color:var(--cube-text);background:var(--cube-ink)}
body{background:var(--cube-ink)}
button{border-radius:999px;background:var(--cube-glass);color:var(--cube-text);border:1px solid var(--cube-edge);font-weight:600}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--cube-cyan);outline-offset:3px}
.s64-cube{--e:26px;position:relative;display:block;width:var(--e);height:var(--e);flex:none;transform-style:preserve-3d;transform:rotateX(-18deg) rotateY(28deg)}
.s64-cube i{position:absolute;inset:0;border-radius:calc(var(--e) * .1);border:1px solid rgba(255,255,255,.28);background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(110,236,255,.12) 40%,rgba(103,79,221,.42));box-shadow:inset 0 0 calc(var(--e) * .25) rgba(255,255,255,.1)}
.s64-cube i:nth-child(1){transform:translateZ(calc(var(--e) / 2))}.s64-cube i:nth-child(2){transform:rotateY(180deg) translateZ(calc(var(--e) / 2))}.s64-cube i:nth-child(3){transform:rotateY(90deg) translateZ(calc(var(--e) / 2))}.s64-cube i:nth-child(4){transform:rotateY(-90deg) translateZ(calc(var(--e) / 2))}.s64-cube i:nth-child(5){transform:rotateX(90deg) translateZ(calc(var(--e) / 2))}.s64-cube i:nth-child(6){transform:rotateX(-90deg) translateZ(calc(var(--e) / 2))}
.s64-cube.roll{animation:cube-loader-roll 2.6s infinite}

/* HUD chrome: timer and cap pills, touch buttons, stick, hint and microphone. */
#portrait-hud :is(#hud-timer,#hud-cap){padding:4px 10px;border:1px solid rgba(255,255,255,.16);border-radius:999px;background:rgba(8,8,15,.5);color:var(--cube-text);font:600 12px/1.3 var(--cube-body);font-variant-numeric:tabular-nums;text-shadow:none}
#portrait-hud #hud-cap{border-color:rgba(110,236,255,.45);color:var(--cube-cyan)}
#touch-controls button{border:1px solid rgba(255,255,255,.22);background:rgba(8,8,15,.34);color:var(--cube-text);font-family:var(--cube-body);font-weight:600;text-shadow:none;box-shadow:inset 0 0 18px rgba(255,255,255,.06);transition:background .12s,border-color .12s}
#touch-controls button:active{border-color:var(--cube-cyan);background:rgba(110,236,255,.2)}
#touch-controls button span{color:var(--cube-soft)}
#move-stick{border:1px solid rgba(255,255,255,.2);background:rgba(8,8,15,.2)}
#stick-knob{border:1px solid rgba(110,236,255,.75);background:rgba(110,236,255,.2)}
#gesture-hint{color:rgba(237,239,248,.7);font-family:var(--cube-body);font-weight:500;text-shadow:0 1px 6px #000c}
#voice-toggle{border:1px solid rgba(255,255,255,.18);background:rgba(17,17,42,.82);color:var(--cube-text);font-family:var(--cube-body);font-weight:600;text-shadow:none;box-shadow:none}
#voice-toggle[data-muted=false]{border-color:var(--cube-cyan);background:rgba(110,236,255,.18);color:var(--cube-cyan)}

/* Update warning and update screen: the cube banner, then OLED black with the rolling cube. */
#update-banner{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:12px;row-gap:2px;padding:12px 16px 12px 14px;border:1px solid rgba(255,255,255,.22);border-radius:18px;background:#11112a;color:var(--cube-text);text-align:left;font-family:var(--cube-body);box-shadow:0 18px 40px -20px #000;perspective:300px}
#update-banner .s64-cube{grid-row:1/4;margin:0 2px}
#update-banner strong{color:var(--cube-text);font:600 15px/1.3 var(--cube-body)}
#update-banner #update-countdown{color:var(--cube-cyan);font:600 13px/1.3 var(--cube-body);font-variant-numeric:tabular-nums}
#update-banner span:last-child{color:var(--cube-muted);font-size:12px;line-height:1.35}
#update-screen{background:var(--cube-ink);color:var(--cube-text);font-family:var(--cube-body)}
#update-screen>div{display:grid;justify-items:center;perspective:900px}
#update-screen .s64-cube{--e:96px;margin:0 0 44px}
#update-screen>div::before{content:"";grid-area:1/1;align-self:end;width:190px;height:38px;margin-bottom:-6px;border-radius:50%;background:radial-gradient(closest-side,rgba(139,108,255,.42),rgba(139,108,255,0))}
#update-screen .s64-cube{grid-area:1/1}
#update-screen h1{margin:0 0 10px;color:var(--cube-text);font:400 26px/1.2 var(--cube-display);letter-spacing:.01em;text-shadow:none}
#update-screen p{margin:0 0 12px;color:var(--cube-soft);font-size:16px;line-height:1.5}
#update-screen .update-hint{color:var(--cube-muted);opacity:1;font-size:14px!important}

/* Notices and invitations use the cube activity banner. */
#notice{padding:10px 16px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:#11112a;color:var(--cube-text);font:500 13px/1.35 var(--cube-body);box-shadow:0 18px 40px -20px #000}
#game-invite{padding:6px 6px 6px 14px;border:1px solid rgba(255,255,255,.22);border-radius:18px;background:#11112a;color:var(--cube-text);font:500 13px/1.3 var(--cube-body);box-shadow:0 18px 40px -20px #000}
#game-invite #game-invite-join{min-height:36px;padding:0 14px;border:0;border-radius:999px;background:var(--cube-cyan);color:#071016;font:600 13px var(--cube-body)}
#game-invite #game-invite-dismiss{min-height:44px;border:0;background:transparent;color:var(--cube-muted)}

/* Launcher, dialogs and sheets: ink glass panels with white titles, glass rows and one cyan action. */
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel){--menu-ink:#edeff8;--menu-muted:#c9cce0;--menu-gold:#6eecff;color:var(--cube-text);background:var(--cube-panel);border:1px solid var(--cube-edge);border-radius:24px;box-shadow:0 30px 80px -24px #000;font-family:var(--cube-body);text-shadow:none}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel)::backdrop{background:rgba(8,8,15,.5)}
:is(#coop-settings,#pause-sheet)::backdrop{background:var(--cube-ink)}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(h1,h2,h3){color:var(--cube-text);font-family:var(--cube-body);font-weight:600;letter-spacing:0;text-shadow:none}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) h2{font-size:20px}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) h3{color:var(--cube-muted);font-size:13px;letter-spacing:.06em;text-transform:uppercase}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(.sheet-header,.collection-header,.collection-footer,.settings-footer){background:transparent;border-color:rgba(255,255,255,.1);border-width:1px}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) button{border:1px solid var(--cube-edge);border-radius:14px;background:var(--cube-glass);color:var(--cube-text);box-shadow:none;text-shadow:none;font:600 15px var(--cube-body);transition:background .12s,border-color .12s,transform .18s cubic-bezier(.2,0,0,1)}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) button:is(:hover,:focus-visible):not(:disabled){border-color:rgba(110,236,255,.55);background:rgba(255,255,255,.1);outline:0}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) button:focus-visible{outline:2px solid var(--cube-cyan);outline-offset:2px}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) button:active:not(:disabled){transform:scale(.97);box-shadow:none}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(.secondary,#store-cancel,#wheel-browse,.wheel-pagination button){border-color:var(--cube-edge);background:var(--cube-glass);color:var(--cube-text);text-shadow:none}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(#play,#pause-resume,#settings-resume,#store-buy){border:0;border-radius:999px;background:var(--cube-cyan);color:#071016}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(#play,#pause-resume,#settings-resume,#store-buy):is(:hover,:focus-visible):not(:disabled){background:#9af3ff;color:#071016}
#pause-sheet #leave{border-color:rgba(255,130,150,.35);background:rgba(255,130,150,.08);color:#ff8296;text-shadow:none}
#pause-sheet .pause-content>button:is(:hover,:focus-visible):not(:disabled)::before{content:none}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(.sheet-header,.collection-header) button[aria-label^="Close"],#character-wheel #wheel-close,#settings .dialog-title button{display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:1px solid var(--cube-edge);border-radius:14px;background:var(--cube-glass);color:var(--cube-text);font:400 24px/1 var(--cube-body);box-shadow:none;text-shadow:none;outline:0}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(.sheet-header,.collection-header) button[aria-label^="Close"]:is(:hover,:focus-visible),#character-wheel #wheel-close:is(:hover,:focus-visible,:active){border-color:rgba(110,236,255,.55);background:rgba(255,255,255,.1);color:var(--cube-text);outline:0}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(input:not([type=checkbox]):not([type=range]),select){border:1px solid var(--cube-edge);border-radius:12px;background-color:rgba(255,255,255,.05);color:var(--cube-text)}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(input[type=checkbox],input[type=range]){accent-color:var(--cube-cyan)}
:is(dialog,#character-wheel,#character-store,#world-menu,#coop-settings,#pause-sheet,#settings,.panel) :is(input,select):focus-visible{outline:2px solid var(--cube-cyan);outline-offset:2px}
#launcher h1{color:var(--cube-text);font:400 30px/1.15 var(--cube-display);letter-spacing:.02em;text-shadow:none}
#launcher #play{justify-content:center;gap:8px}
#lobby-stats{color:var(--cube-muted)}
.device-options{border-color:rgba(255,255,255,.1)}
#settings details summary::before{color:var(--cube-cyan)}
.store-wallet,.store-wallet strong,#wheel-status,#store-status,#minigame-status,#world-menu-status,#name-status{color:var(--cube-cyan)!important}

/* Character wheel and collections. */
#character-wheel .wheel-options{background:radial-gradient(circle,rgba(110,236,255,.06) 0 24%,transparent 25% 44%,rgba(139,108,255,.06) 45% 69%,transparent 70%)}
#character-wheel .wheel-options>button[data-character]{border:1px solid var(--cube-edge);background:var(--cube-glass);color:var(--cube-text);box-shadow:none;text-shadow:none}
#character-wheel .wheel-options>button[aria-pressed=true]{border:1px solid var(--cube-cyan);background:rgba(110,236,255,.14);box-shadow:0 0 0 3px rgba(110,236,255,.16)}
#character-wheel .wheel-options>button:hover{border-color:rgba(110,236,255,.55)}
#character-wheel .franchise-navigation>button{color:var(--cube-cyan)}
#character-wheel #wheel-groups button[aria-selected=true]{border-color:var(--cube-cyan);background:rgba(110,236,255,.14);box-shadow:inset 0 -2px var(--cube-cyan)}
.wheel-center strong{color:var(--cube-text);text-shadow:none}
#wheel-store,#store-wheel,#wheel-browse{border:1px solid var(--cube-edge);border-radius:14px;background:var(--cube-glass);color:var(--cube-text)}
.destination-navigation button[aria-current=page]{border-color:var(--cube-cyan);background:rgba(110,236,255,.14);color:var(--cube-cyan)}
.mission-occupants button{border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(17,17,42,.88);color:var(--cube-text)}

/* Minigame tabs, action bars and status panels. */
.minigame-tabs button[aria-pressed=true],#courtroom-spots [aria-pressed=true]{border-color:var(--cube-cyan);background:var(--cube-cyan);color:#071016}
#minigame-prop-grid button[aria-pressed=true]{border-color:var(--cube-cyan);background:rgba(110,236,255,.16)}
:is(#minigame-actions,#flood-actions,#tag-actions,#bowling-actions,#overcooked-actions,#courtroom-actions,#courtroom-reactions) button{border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(17,17,42,.84);color:var(--cube-text);font-family:var(--cube-body);font-weight:600;text-shadow:none;box-shadow:none}
:is(#minigame-actions,#flood-actions,#tag-actions,#bowling-actions,#overcooked-actions,#courtroom-actions,#courtroom-reactions) button:active{transform:scale(.96);border-color:var(--cube-cyan);background:rgba(110,236,255,.2)}
:is(#minigame-actions,#flood-actions,#tag-actions,#bowling-actions,#overcooked-actions,#courtroom-actions,#courtroom-reactions) button[aria-pressed=true]{border-color:var(--cube-cyan);background:rgba(110,236,255,.2);color:var(--cube-cyan)}
#courtroom-actions #courtroom-objection{border-color:rgba(255,130,150,.6);background:rgba(255,130,150,.2);color:#ffd6dd}
:is(#flood-hud,#tag-hud,#overcooked-hud,#bowling-scoreboard){border:1px solid rgba(255,255,255,.16);border-radius:14px;background:rgba(17,17,42,.86);color:var(--cube-text);font-family:var(--cube-body);text-shadow:none}
/* The Mario Party board and DK64 cover SM64's page; the home cube stays on top of them, below DK64's health. */
body:has(#party64-mode,#dk64-adventure-host:not([hidden]),#dk64-battle-host:not([hidden])) #portrait-hud~#super64-home{z-index:2100}
body:has(#dk64-adventure-host:not([hidden]),#dk64-battle-host:not([hidden])) #portrait-hud~#super64-home{top:calc(env(safe-area-inset-top) + 17% + 8px)}
body:has(#party64-mode) #portrait-hud~#super64-home{top:calc(env(safe-area-inset-top) + 64px)}

#party64-tools{position:fixed;z-index:25;left:max(12px,env(safe-area-inset-left));top:calc(env(safe-area-inset-top) + 12px);display:flex;gap:8px}#party64-tools[hidden]{display:none}#party64-tools button{padding:5px 9px;background:rgba(15,20,29,.3);color:rgba(255,255,255,.65);border:0;font-size:12px;backdrop-filter:blur(5px)}
#party64-picker{position:fixed;z-index:70;bottom:calc(env(safe-area-inset-bottom) + 12px);left:max(12px,env(safe-area-inset-left));width:min(360px,calc(100vw - 24px));max-height:55dvh;background:rgba(14,20,30,.9);color:#f5f5f7;border-radius:14px;padding:12px;box-sizing:border-box;backdrop-filter:blur(16px)}#party64-picker[hidden]{display:none}.party64-picker-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}.party64-picker-heading button{border:0;background:none;color:#ddd;padding:5px;font-size:24px}.party64-picker-rows{max-height:calc(55dvh - 100px);overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:6px}.party64-picker-rows button{font-size:12px;min-height:42px;padding:8px;border:0;background:rgba(255,255,255,.06);text-align:left;color:#f4f4f4}.party64-picker-rows button:disabled{opacity:.4}.party64-note{font-size:11px;color:#aaa;margin:10px 0 0}
#party64-tip{position:fixed;z-index:25;bottom:calc(env(safe-area-inset-bottom) + 20px);left:20px;right:20px;text-align:center;font:500 12px/1.5 system-ui;color:rgba(255,255,255,.72);pointer-events:none;text-shadow:0 1px 4px #000}#party64-tip[hidden]{display:none}.party64 #move-stick{visibility:hidden}.party64 #portrait-hud{display:none}.party64 #gesture-hint{display:none}.party64 #touch-controls button{visibility:hidden}
#party64-puzzle{position:fixed;z-index:26;inset:0;margin:auto;width:min(92vw,70dvh);height:min(92vw,70dvh);touch-action:none;cursor:crosshair;background:transparent}#party64-puzzle[hidden]{display:none}

#party64-status{position:fixed;z-index:25;top:calc(env(safe-area-inset-top) + 52px);left:12px;right:12px;text-align:center;pointer-events:none;font:500 13px/1.4 system-ui;color:rgba(255,255,255,.75);text-shadow:0 1px 4px #000}#party64-status[hidden]{display:none}

#party64-target{position:fixed;z-index:25;top:90px;right:12px;display:grid;grid-template-columns:repeat(3,30px);gap:2px;opacity:.85;pointer-events:none}#party64-target[hidden]{display:none}#party64-target img{width:30px;height:30px}

#party64-scenery{position:fixed;inset:0;z-index:24;pointer-events:none;background-repeat:repeat;background-size:320px 240px}#party64-scenery[hidden]{display:none}

#hub-interaction{position:fixed;z-index:22;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);max-width:80vw;padding:10px 20px;border:1px solid #ffffff70;border-radius:22px;background:#102331db;color:#fff;font:600 15px system-ui;box-shadow:0 3px 18px #0005;touch-action:manipulation}
#hub-interaction[hidden]{display:none}
body:not(.playing) #hub-interaction{display:none}
