/* Interface preferences: keep the renderer and fixed gameplay bars unscaled. */
:root{--interface-scale:1}
body{user-select:none;-webkit-user-select:none;caret-color:transparent}
:is(input,textarea,[contenteditable]):read-write{user-select:text;-webkit-user-select:text;caret-color:auto}
body.results-open #game{filter:none}
body #menu>.window,body #overlay>.window,body #welcome>.window,
body #share-dialog>.window,body #tutorial-dialog>.window,
body #winner-announcement>.window,body .victory-panel,
body #shop,body #scoreboard,body #tutorial-checklist,body #toast{zoom:var(--interface-scale)}
body #menu>.window{width:min(780px,calc((100vw - 32px)/var(--interface-scale)));max-width:none;max-height:calc((100svh - 100px - var(--menu-logo-space))/var(--interface-scale))}
body #menu>.window:has(#setup:not([hidden])),body #menu>.window:has(#preferences:not([hidden])){max-height:calc((100svh - 100px - var(--menu-logo-space))/var(--interface-scale))}
body #overlay>.window,body #welcome>.window,body #share-dialog>.window{max-width:calc((100vw - 24px)/var(--interface-scale));max-height:calc((100svh - 24px)/var(--interface-scale));overflow-y:auto}
body #shop{top:calc((var(--hud-height) + 14px)/var(--interface-scale));bottom:calc((var(--footer-space) + 14px)/var(--interface-scale))}
body #scoreboard{max-height:calc((100svh - var(--hud-height) - var(--footer-space) - 28px)/var(--interface-scale))}
body .victory-panel{max-width:calc((100vw - 24px)/var(--interface-scale));max-height:calc((100svh - 24px)/var(--interface-scale));overflow:auto}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #menu>.window,body.touch-device #menu>.window:has(#setup:not([hidden])),body.touch-device #menu>.window:has(#preferences:not([hidden])){max-height:calc((100svh - 20px - var(--menu-logo-space))/var(--interface-scale))}
}

/* Let the layout reserve the scaled panel's real width. */
body #menu{
 --menu-logo-height:clamp(124.8px,22.4svh,227.2px);
 --menu-logo-gap:24px;
 --menu-logo-space:calc(var(--menu-logo-height) + var(--menu-logo-gap));
 grid-template-columns:minmax(0,calc(540px * var(--interface-scale)));
 row-gap:var(--menu-logo-gap);
 padding-block:24px;
}
.menu-logo{display:block;justify-self:center;height:var(--menu-logo-height);max-width:100%}
.menu-logo img{display:block;width:auto;height:100%;max-width:100%;object-fit:contain}
body #welcome:not([hidden]){display:flex;flex-direction:column;justify-content:center;align-items:center;gap:24px;background:transparent;backdrop-filter:none}
#welcome .welcome-logo{display:block;width:auto;height:clamp(96px,22.4svh,227.2px);max-width:90vw;object-fit:contain}
body #welcome>.window{max-height:calc((100svh - clamp(96px,22.4svh,227.2px) - 56px)/var(--interface-scale))}
body #welcome>.window>p{display:grid;place-items:center;min-height:3em;margin:0 0 14px;line-height:1.55}
#welcome .welcome-actions{display:grid;gap:10px}
#welcome .welcome-actions button{margin:0}
#startup{
 position:fixed;inset:0;z-index:135;display:grid;place-items:center;width:100%;height:100%;
 margin:0;padding:0;border:0;background-color:var(--menu-bg);color:white;cursor:pointer;
 transition:background-color 500ms ease
}
#startup-logo{display:block;width:max-content;max-width:90vw}
#startup-logo img{display:block;width:auto;height:clamp(120px,30svh,285px);max-width:90vw;object-fit:contain}
#startup-prompt{position:absolute;top:calc(50% + clamp(60px,15svh,142.5px) + 18px);font-size:clamp(16px,3vw,23px);text-shadow:0 2px 6px #000}
#startup-status{position:absolute;top:calc(50% + clamp(60px,15svh,142.5px) + 56px);max-width:90vw;font-size:14px}
#startup[data-invite] #startup-logo{display:none}
#startup[data-invite] #startup-prompt{position:static}
#startup[data-invite] #startup-status{top:calc(50% + 24px)}
#startup[data-entering]{background-color:transparent}
#startup[data-entering] #startup-prompt{visibility:hidden}
#startup:disabled{opacity:1;cursor:wait}
#startup:focus-visible #startup-prompt{outline:2px solid white;outline-offset:6px}
body.intro-revealing :is(#menu .menu-logo,#welcome .welcome-logo){visibility:hidden}
body.intro-revealing :is(#menu>.window,#welcome>.window){opacity:0}
@keyframes menu-logo-float{50%{transform:translateY(-6px)}}
@media(prefers-reduced-motion:reduce){#startup{transition:none}}
@media(prefers-reduced-motion:no-preference){
 .menu-logo img,#welcome .welcome-logo,#startup:not([data-entering]) #startup-logo img,#startup-prompt{animation:menu-logo-float 5.5s ease-in-out infinite}
 body.intro-revealing :is(.menu-logo img,#welcome .welcome-logo){animation:none}
}
@media(pointer:coarse) and (orientation:landscape){
 body #welcome:not([hidden]){gap:12px}
}
body #menu>.window{width:min(540px,calc((100vw - 48px)/var(--interface-scale)))}
@media(pointer:coarse){
 body.touch-device #menu{--menu-logo-height:clamp(52px,18svh,84px);--menu-logo-gap:12px}
}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #menu{
  --mobile-menu-width:580px;
  grid-template-columns:minmax(0,calc(var(--mobile-menu-width) * var(--interface-scale)));padding-block:10px;
 }
 body.touch-device #menu>.window{width:min(var(--mobile-menu-width),calc((100vw - 24px)/var(--interface-scale)))}
 body.touch-device #menu>.window>.tabs button{white-space:nowrap}
 body.touch-device #menu>.window:has(#setup:not([hidden])){height:auto}
}
body #minimap{zoom:var(--interface-scale)}
body:not(.touch-device) #minimap{bottom:calc(max(140px,var(--hotkey-space,0px) + 12px) / var(--interface-scale))}
body:not(.touch-device):has(#hotkey-hints[hidden],#bottomhud[hidden]) #minimap{
 left:calc(12px / var(--interface-scale));
 bottom:calc(12px / var(--interface-scale));
}
#hotkey-hints .shortcut-hint[hidden]{display:none}
#preferences #desktop-preferences .row{display:grid;grid-template-columns:repeat(auto-fill,minmax(max(92px,calc((100% - 36px)/4)),1fr));gap:8px 12px}
#desktop-preferences .shortcut-heading{white-space:nowrap}
/* Mobile minimap remains centered over the movement stick at every scale. */
@media(pointer:coarse) and (orientation:landscape){body.touch-device #minimap{zoom:1}}/* Tutorial cues are functional states, with their colors supplied by the skin. */
#itemlist.needs-tutorial-scroll{scrollbar-width:auto;scrollbar-color:var(--skin-cue) transparent;animation:tutorial-scroll-cue 1s ease-in-out infinite}
#itemlist.needs-tutorial-scroll::-webkit-scrollbar{width:13px}
#itemlist.needs-tutorial-scroll::-webkit-scrollbar-thumb{background:var(--skin-cue)}
#itemlist button.tutorial-power-cue{animation:tutorial-power-cue 1s ease-in-out infinite}
@keyframes tutorial-scroll-cue{0%,100%{outline:2px solid var(--skin-cue);outline-offset:-2px;box-shadow:inset 0 0 0 3px var(--skin-cue-soft)}50%{outline:2px solid transparent;outline-offset:-2px;box-shadow:none}}
@keyframes tutorial-power-cue{0%,100%{outline:3px solid var(--skin-cue);outline-offset:-3px}50%{outline:3px solid transparent;outline-offset:-3px}}
@media(prefers-reduced-motion:reduce){#itemlist.needs-tutorial-scroll,#itemlist button.tutorial-power-cue{animation:none;outline:3px solid var(--skin-cue);outline-offset:-3px}}

/* Keep the mobile shop centered on the viewport, including notches and UI zoom. */
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #shop{
  --shop-side-gap:max(5vw,calc(env(safe-area-inset-left,0px) + 12px),calc(env(safe-area-inset-right,0px) + 12px));
  left:calc(var(--shop-side-gap) / var(--interface-scale));
  right:calc(var(--shop-side-gap) / var(--interface-scale));
  top:calc((var(--hud-height) + 14px) / var(--interface-scale));
  bottom:calc((var(--footer-space) + 16px) / var(--interface-scale));
 }
}

/* Empty footers occupy no space. A genuine reappearance starts one fade. */
#bottomhud:not([hidden]){animation:hud-footer-reveal var(--skin-footer-fade-duration) ease-out both}
@keyframes hud-footer-reveal{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){#bottomhud:not([hidden]){animation:none}}

/* Keep the credit on the left and the size on the right of the preview. */
.mapcaption{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px}
:is(#dimensions,#next-maze-size){text-align:right;white-space:nowrap}
:is(#mapAuthor,#next-maze-author){text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.goal-field{flex:1;min-width:0}
.goal-picker{position:relative;margin-top:6px}
:is(#menu,#next-maze-panel) .goal-trigger{width:100%;display:flex;align-items:center;gap:9px;padding:8px 10px;margin:0;min-width:0;border:1px solid #aeac60;border-radius:0;background:#05052a;color:#ffff00;font-size:14px;font-weight:normal;text-align:left}
.goal-selected,.goal-options [role=option]{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.goal-selected{flex:1}
.goal-options{position:absolute;top:100%;left:0;right:0;z-index:10;padding:3px;background:#05052a;color:#ffff00;border:1px solid #aeac60;box-shadow:0 4px 10px #0004}
:is(#menu,#next-maze-panel) .goal-options [role=option]{width:100%;margin:0;padding:9px 8px;border:0;border-radius:0;background:transparent;color:inherit;font-size:12px;font-weight:normal}
:is(#menu,#next-maze-panel) .goal-options [role=option]:is(:hover,:focus-visible,[aria-selected=true]){background:#343458;outline-offset:-2px}
@media(pointer:coarse) and (orientation:landscape){
 .touch-device .goal-label{font-size:11px;line-height:14px}
 .touch-device .goal-picker{margin-top:4px}
 .touch-device :is(#menu,#next-maze-panel) .goal-trigger{padding:6px 8px;font-size:12px}
 .touch-device :is(#menu,#next-maze-panel) .goal-options [role=option]{min-height:34px;padding:7px 8px}
}
.goal-options{overflow-y:auto;overscroll-behavior:contain}
.goal-options.opens-up{top:auto;bottom:100%}

/* Native and split-label selectors share the skin's arrow and placement. */
#menu select,:is(#menu,#next-maze-panel) .goal-trigger{
 appearance:none;-webkit-appearance:none;
 background-image:var(--skin-dropdown-icon);
 background-repeat:no-repeat;background-position:right var(--dropdown-inset) center;background-size:var(--dropdown-icon-size);
 padding-inline-end:var(--dropdown-reserve);
}
:root[data-interface-style] body :is(#menu,#next-maze-panel) .goal-trigger{
 background-image:var(--skin-dropdown-icon);
 background-repeat:no-repeat;background-position:right var(--dropdown-inset) center;background-size:var(--dropdown-icon-size);
}
.map-select-control{position:relative;display:block;min-width:0}
#menu .map-select-control{margin-top:6px}
:root[data-interface-style] body .map-select-control :is(#map,#next-maze-select){margin-top:0;background-image:none}
.map-select-control::after{
 content:'';position:absolute;inset-inline-end:var(--dropdown-inset);top:50%;translate:0 -50%;
 width:20px;height:22px;pointer-events:none;
 background:var(--skin-dropdown-icon) center / contain no-repeat;
}
body :is(#menu,#next-maze-panel) :is(#map,#next-maze-select,.goal-trigger){font-size:var(--setup-control-size,15px);padding:10px 32px 10px 11px;line-height:normal}
@media(forced-colors:active){
 .map-select-control::after{display:none}
 :root[data-interface-style] body .map-select-control :is(#map,#next-maze-select){appearance:auto}
}
#setup .setup-options label,#bots-label,.goal-label{line-height:18px}
@media(pointer:coarse) and (orientation:landscape){
 .touch-device #menu .map-select-control{margin-top:4px}
 body.touch-device :is(#menu,#next-maze-panel) :is(#map,#next-maze-select,.goal-trigger){font-size:12px;padding:6px 32px 6px 8px}
 .touch-device #setup .setup-options label,.touch-device #bots-label,.touch-device .goal-label{line-height:14px}
}

#toast .death-draw{display:block;font:700 .6em/1.4 var(--skin-font, sans-serif);color:inherit;margin-bottom:4px}

body :is(#menu,#next-maze-panel) .map-select-control select{padding-inline-end:36px}

/* Room finder */
#room-browser{
 --room-columns:minmax(0,1.25fr) minmax(0,1.1fr) 83px 40px 43px 56px 38px;
 display:flex;flex-direction:column;min-height:0;flex:1;padding:16px 18px;
}
.room-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;margin-bottom:12px}
body #menu .room-toolbar :is(input,button){min-width:0;margin:0;padding:6px 10px;height:36px;font-size:13px;line-height:1.2}
body #menu .room-toolbar button{width:auto;justify-content:center;text-align:center;white-space:nowrap}
:is(#room-search,#room)::placeholder{color:inherit;opacity:.66}
.room-columns,.room-row{display:grid;grid-template-columns:var(--room-columns);gap:5px;align-items:center;padding:5px 8px;min-width:0}
.room-columns{font-size:11px;font-weight:700;color:var(--skin-muted,#e4dda3);overflow:hidden;scrollbar-gutter:stable;scrollbar-width:thin;border-bottom:1px solid var(--skin-line,#6c6a48)}
.room-columns,.room-row{text-align:left}
#room-list{min-height:0;overflow-y:auto;scrollbar-gutter:stable;scrollbar-width:thin;overscroll-behavior:contain}
#room-list-status{margin:10px 0 0;font-size:13px}
.room-row{min-height:46px;font-size:13px;border-bottom:1px solid var(--skin-line,#6c6a48);background:var(--skin-field,#101035)}
.room-row:nth-child(even){background:var(--skin-table-alt,#0c0c33)}
.room-creator{display:flex;gap:4px;align-items:center;min-width:0;font-weight:700}
.room-creator .room-official{flex:none;padding:2px 4px;border-radius:3px;background:#dadddf;color:#232629;font-size:.85em;line-height:1.1}
.room-creator span,.room-map-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.room-creator svg,.room-enter svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.room-occupancy,.room-time,.room-goal,.room-ping{font-variant-numeric:tabular-nums;white-space:nowrap;text-align:left}
.room-ping{font-size:.9em}
.room-map{min-width:0}
#menu .room-map-button{display:block;width:100%;padding:3px 0;text-align:left;color:inherit;background:transparent;border:0;box-shadow:none;text-decoration:underline;text-underline-offset:3px;font-size:inherit}
body #menu button.room-map-button:is(:hover,:active){background:transparent;box-shadow:none;filter:none}
.room-map-preview{position:fixed;z-index:220;inset:auto auto 12px max(12px,env(safe-area-inset-left,0px));width:min(235px,85vw);padding:6px;background:var(--skin-face,#090a2d);border:1px solid var(--skin-line,#b4ae72);box-shadow:0 8px 24px #0007}
.room-map-preview canvas{display:block;width:100%;height:auto}
body #menu .room-enter{display:grid;place-items:center;justify-self:center;align-self:center;width:34px;height:34px;padding:0;margin:0;line-height:1}
#menu .room-enter:disabled{cursor:default}
.room-browser-actions{display:flex;gap:8px;align-items:center;justify-content:flex-start;margin-top:12px}
#menu .room-browser-actions button{width:auto;margin:0;padding:8px 12px;min-height:36px}
#room-invite{margin-top:10px;align-self:flex-start}
#room-entry{width:min(390px,calc(100vw - 28px));max-height:90svh;padding:18px;color:inherit}
#room-entry h2{margin:0 0 12px;font-size:20px}
#room-entry::backdrop{background:#06091bba}
#room-entry-status{min-height:1em;font-size:13px}
#room::placeholder{font-style:italic}
.ingame #game:focus{outline:none}
#aim-capture{position:fixed;z-index:8;top:calc(var(--hud-height) + 8px);left:50%;transform:translateX(-50%);padding:7px 12px}
@media(max-width:460px){
 #room-browser{--room-columns:minmax(0,1.2fr) minmax(0,1fr) 74px 27px 30px 39px 29px;padding:10px 8px}
 .room-toolbar{gap:4px}
 body #menu .room-toolbar :is(input,button){font-size:11px;padding-inline:5px}
 .room-columns,.room-row{gap:3px;padding-inline:3px;font-size:10px}
 body #menu .room-enter{width:27px;height:34px}
 .room-creator svg{width:12px;height:12px}
}
@media(pointer:coarse) and (orientation:landscape){
 #room-browser{padding-block:6px}
 body.touch-device #menu>.window:has(#room-browser:not([hidden])){max-height:calc((100svh - 36px - var(--menu-logo-space))/var(--interface-scale))}
 body.touch-device #menu:has(#room-browser:not([hidden])){padding-bottom:26px}
 .room-toolbar{margin-bottom:4px}
}

/* Player HUD */
.hud-player-stack{display:contents}
.hud-player-card{--hud-status-size:clamp(16px,2.65vh,26px);display:flex;align-items:center;min-width:0}
.touch-device .hud-player-card{--hud-status-size:18px}
.hud-player-card>.portrait{position:relative;z-index:1;flex:none}
#hud-status-icons{position:absolute;inset:0;pointer-events:none}
#hud-status-icons:empty{display:none}
.hud-status-icon{
 --badge-position:.19;
 position:absolute;inset-block-start:calc(100% * var(--badge-position));
 /* Follow the seam using the same full-height slope as the wallet. */
 inset-inline-end:calc(6px + var(--wallet-slant,0px) * var(--badge-position));
 block-size:min(var(--hud-status-size),28%);inline-size:auto;aspect-ratio:1;
 object-fit:contain;translate:0 -50%;
}
.hud-status-icon:nth-child(2){--badge-position:.5}
.hud-status-icon:nth-child(3){--badge-position:.81}
.hud-wallet{
 display:grid;grid-template-columns:minmax(4ch,max-content);
 align-content:center;justify-items:center;row-gap:.14em;flex:none;
 padding:.3em .55em;border-radius:0 7px 7px 0;
 background:#071425;color:#edf2fb;font-size:clamp(17px,3.1vh,28px);
 font-weight:700;font-variant-numeric:tabular-nums;line-height:1;white-space:nowrap;
}
#hud-money{color:var(--menu-accent,#ffdb36)}
.hud-wallet-divider{width:100%;border-top:1px solid #a6adbc}
.portrait-details{display:none}
:root[data-interface-style=official] body:not(.touch-device) .hud-top{height:0;background:none;border:0;overflow:visible;z-index:2}
:root[data-interface-style=official] body:not(.touch-device) .hud-player-card{
 --wallet-slant:clamp(24px,3.7vh,37px);
 position:absolute;top:clamp(12px,2.5vh,24px);left:clamp(12px,1.75vw,28px);
}
:root[data-interface-style=official] body .hud-wallet{
 align-self:stretch;border-radius:0;
 margin-inline-start:calc(-1 * var(--wallet-slant));
 padding-inline:calc(var(--wallet-slant) * .8 + .4em);
 clip-path:polygon(var(--wallet-slant) 0,100% 0,calc(100% - var(--wallet-slant)) 100%,0 100%);
}
:root[data-interface-style=official] body:not(.touch-device) .portrait{height:clamp(66px,11vh,102px);width:clamp(214px,20vw,310px);flex-direction:row;justify-content:flex-start;gap:15px;padding:4px calc(7px + var(--wallet-slant) * .5 + var(--hud-status-size)) 4px 8px;background:#0c203cdb;border:0;border-radius:12px 0 0 12px;clip-path:polygon(0 0,100% 0,calc(100% - var(--wallet-slant)) 100%,0 100%)}
:root[data-interface-style=official] body:not(.touch-device) .portrait:has(#helmet-health:not([hidden])){min-width:264px}
:root[data-interface-style=official] body:not(.touch-device) .portrait>.portrait-image{width:auto;height:100%;aspect-ratio:1}
:root[data-interface-style=official] body:not(.touch-device) .portrait-details{display:grid;gap:8px;min-width:0;color:white;text-align:left}
#hud-player-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(15px,2.7vh,26px)}
#hud-health{display:flex;gap:clamp(4px,.6vw,8px)}
#hud-health i{display:block;width:clamp(12px,2.2vh,22px);flex:none;aspect-ratio:1;border-radius:50%;background:var(--health-color,#ffcf27)}
#hud-health i.empty{opacity:.22}
#hud-health #helmet-health{
 border-radius:50%;background:var(--helmet-health-texture,none) 7% 34%/235% #73814c;
}
#hud #helmet-health[hidden],.portrait>.portrait-image[hidden]{display:none}
:root[data-interface-style=official] body:not(.touch-device) #feed{position:absolute;top:23px;right:17px;width:min(62vw,690px);height:auto;max-height:clamp(90px,17vh,160px);margin:0;padding:0;background:none;text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:2px}
:root[data-interface-style=official] body:not(.touch-device) #feed>div{max-width:100%;padding:3px 12px 3px 22px;line-height:1.25;background:#081123a8;--feed-start-cut:7px}
:root[data-interface-style=official] body:not(.touch-device) #bottomhud{border:0;background:none}
:root[data-interface-style=official] body:not(.touch-device) .desktop-hints{position:fixed;left:clamp(12px,1.75vw,28px);bottom:14px;align-items:flex-start;flex-direction:column;gap:3px;color:#fff}
:root[data-interface-style=official] body:not(.touch-device) .shortcut-hint{display:flex;justify-content:flex-start;min-width:126px;padding:3px 12px 3px 5px;background:#16151cc9;border-radius:6px}
:root[data-interface-style=official] body:not(.touch-device) .shortcut-hint kbd{border:1px solid #fff000;border-radius:5px;color:#fff000;background:#111019}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device .hud-wallet{font-size:clamp(14px,2.45vw,18px)}
 :root[data-interface-style=official] body.touch-device .hud-top{background:none;border:0;gap:8px}
 :root[data-interface-style=official] body.touch-device .portrait{width:max-content;max-width:min(47vw,192px);height:72px;align-self:center;flex-direction:row;justify-content:flex-start;gap:6px;padding:0 8px 0 4px;background:#0c203cdb;border:0;border-radius:6px}
 :root[data-interface-style=official] body.touch-device .portrait-details{display:grid;gap:3px;min-width:0;color:white;text-align:left}
 :root[data-interface-style=official] body.touch-device #hud-player-name{font-size:12px}
 :root[data-interface-style=official] body.touch-device #hud-health{align-items:center;gap:4px}
 :root[data-interface-style=official] body.touch-device #hud-health i{width:16px}
}


/* Gameplay HUD */
#hud .roominfo{
 position:fixed;right:max(14px,env(safe-area-inset-right,0px));bottom:max(14px,env(safe-area-inset-bottom,0px));
 width:max-content;max-width:34vw;margin:0;padding:5px 9px;border-radius:5px;
 background:#14141cc9;color:#fff;font-size:13px;line-height:1.25;
}
#hud .roominfo :is(span,small){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit}
#hud .roominfo small{font-size:.82em}
#hud .roominfo .perf-divider{display:none}
#hud .roominfo{text-align:right}
#hud .hud-player-card[hidden]{display:none}
.scoreboard-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px 16px;flex-wrap:wrap}
#scoreboard .scoreboard-heading h3{margin:0}
.scoreboard-heading strong{overflow-wrap:anywhere}
#hud #activeitems{
 position:fixed;left:50%;top:auto;bottom:max(14px,env(safe-area-inset-bottom,0px));transform:translateX(-50%);
 width:max-content;max-width:min(48vw,560px);max-height:80px;overflow:auto;
 display:flex;flex-wrap:wrap;justify-content:center;gap:4px 10px;
 padding:6px 12px;text-align:center;background:#14141ca6;color:#fff;border-radius:6px;line-height:1.35;
}
#hud #activeitems:empty,#hud :is(#activeitems,#roominfo)[hidden],#touch-controls[hidden]{display:none}
body #tutorial-dialog>.window{display:flex;flex-direction:column;overflow:hidden}
#tutorial-dialog.tutorial-profile-open :is(#tutorial-banner,.tutorial-lesson-body){display:none}
body #tutorial-dialog.tutorial-profile-open>.window{
 width:min(660px,calc((100vw - 24px)/var(--interface-scale)));
 max-height:calc((100svh - 20px)/var(--interface-scale));
}
#tutorial-profile{container-type:inline-size;min-width:0;padding:clamp(12px,3vw,24px);overflow:auto}
#tutorial-profile #preferences-identity{margin:0;padding:0;border:0;min-width:0}
#tutorial-profile-continue{margin:14px 0 0;width:100%}
#tutorial-text{white-space:pre-line}
@media(pointer:coarse){
 #tutorial-dialog #tutorial-text{font-size:11.5px;margin-bottom:19px}
}
@media(max-height:680px){
 #tutorial-dialog{
  --lesson-pad:calc(clamp(8px,3.15svh,14px) / var(--interface-scale));
  --lesson-gap:calc(clamp(5px,2.4svh,10px) / var(--interface-scale));
 }
 body #tutorial-dialog>.window{width:min(540px,calc((100vw - 32px)/var(--interface-scale)),calc(145svh / var(--interface-scale)))}
 #tutorial-banner{max-height:calc(34svh / var(--interface-scale))}
 #tutorial-dialog .tutorial-lesson-body{padding:var(--lesson-pad)}
 body #tutorial-dialog #tutorial-title{
  font-size:calc(clamp(16px,6.3svh,24px)/var(--interface-scale));margin-bottom:var(--lesson-gap);
 }
 #tutorial-dialog #tutorial-text{
  font-size:calc(clamp(11px,3.65svh,14px)/var(--interface-scale));line-height:1.5;
  margin-bottom:calc(var(--lesson-gap) + 6px/var(--interface-scale));
 }
 #tutorial-dialog #tutorial-ok{
  min-height:calc(clamp(30px,11svh,40px)/var(--interface-scale));padding:0 var(--lesson-pad);
  font-size:calc(clamp(13px,4.4svh,16px)/var(--interface-scale));line-height:1.1;
 }
}
@media(pointer:coarse) and (max-height:680px){
 #tutorial-dialog #tutorial-text{
  font-size:calc(clamp(10.5px,3.45svh,13.25px)/var(--interface-scale));
  margin-bottom:calc(var(--lesson-gap) + 3px/var(--interface-scale));
 }
}
#itemlist [data-buy].map-blocked{opacity:.58}
.hud-preference-options{min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:8px 10px}
#hud-preference-title{grid-column:1/-1}
.hud-preference-options label{display:flex;align-items:center;gap:7px}
#preferences .hud-preference-options input{width:auto;margin:0;accent-color:var(--menu-accent,var(--skin-blue))}
.category-buttons{
 display:flex;flex-wrap:wrap;gap:5px;flex:none;padding-bottom:9px;
 border-bottom:1px solid var(--menu-line,var(--skin-line));
}
body :is(#shop,#preferences) .category-buttons button{width:auto;min-height:32px;margin:0;padding:4px 8px;font-size:12px;text-transform:none}
body :is(#shop,#preferences) .category-buttons :is([aria-pressed=true],[aria-selected=true]){
 border-color:var(--menu-accent,var(--skin-blue));
 color:var(--menu-accent,var(--skin-selection-ink));
 background:var(--skin-selected);
}
:root[data-interface-style=official] body :is(#shop,#preferences) .category-buttons :is([aria-pressed=true],[aria-selected=true]){background:var(--menu-accent-bg)}
.shop-section{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;min-width:0}
.shop-section h3{
 grid-column:1/-1;display:flex;align-items:center;gap:10px;
 margin:0 0 3px;font-size:14px;
}
.shop-section h3::after{content:"";flex:1;border-bottom:1px solid var(--menu-line,var(--skin-line))}
@media(pointer:coarse) and (orientation:landscape){
 .touch-device .category-buttons{padding-bottom:5px}
 body.touch-device :is(#shop,#preferences) .category-buttons button{min-height:28px;padding:3px 6px;font-size:11px}
}
#itemlist .shop-item-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 7px;min-width:0}
#itemlist .shop-recommended{color:var(--menu-accent,var(--skin-blue));font-size:.78em;font-weight:700}
.touch-device{touch-action:manipulation}
.touch-device #touch-controls *{touch-action:none}
body.touch-device.ingame,.touch-device #touch-controls .touch-toolbar{touch-action:auto}
#hud .power-chip:not(:last-child)::after{
 content:'';display:inline-block;width:1px;height:.9em;
 margin:0 0 0 10px;padding:0;background:currentColor;opacity:.45;
}
#hud #crosshair{
 display:grid;place-items:center;width:30px;height:30px;
 translate:-50% -50%;transform:none;transform-origin:50% 50%;
 pointer-events:none;
}
#crosshair svg{
 display:block;width:100%;height:100%;fill:none;stroke:currentColor;
 stroke-width:1.8;stroke-linecap:round;filter:drop-shadow(0 1px 1px #000);
}
#hud #feed>div{
 display:flex;align-items:center;gap:.32em;
 height:auto;min-height:calc(1.25em + 8px);min-width:0;padding-block:4px;
 line-height:1.25;white-space:nowrap;overflow:hidden;flex:none;
}
#hud #feed .feed-announcements{flex:none;display:flex;align-items:center;gap:.24em}
#hud #feed .kill-announcement{display:block;height:1.08em;width:auto;max-width:5.4em;object-fit:contain}
#scoreboard [data-player-ping]{white-space:nowrap;font-variant-numeric:tabular-nums}
:root{--pearl-health:radial-gradient(circle at 26% 22%,#fff9ec 0%,#e7a8d5 24%,#94bcca 48%,#70baa5 70%,#8460a0 92%)}
#hud-health.game-master-health i{background:var(--pearl-health)}
#mood.game-master-health{background:var(--pearl-health);border-radius:50%;object-position:200vw center}
#hud #feed .feed-rival-player{display:inline-flex;align-items:center;gap:.28em;min-width:0}
#hud #feed .feed-rival-icon{display:block;flex:none;width:1.16em;height:1.16em;object-fit:contain}
#hud #feed>.feed-kill{clip-path:polygon(0 0,100% 0,100% 100%,var(--feed-start-cut,0px) 100%)}
#hud #feed .feed-player{flex:0 1 auto;min-width:1em}
@media(max-width:480px){
 #hud #feed .feed-announcements{font-size:.76em}
 #hud #feed>div{gap:.2em}
}
#hud #feed .feed-player{overflow:hidden;text-overflow:ellipsis}
.touch-device{--footer-space:calc(54px + env(safe-area-inset-bottom,0px))}
.touch-device #bottomhud{display:none}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device{
  --mobile-portrait-size:84px;
  --mobile-hud-gap:4px;
  --hud-height:calc(var(--mobile-portrait-size) + env(safe-area-inset-top,0px));
  --hud-left-inset:max(8px,env(safe-area-inset-left,0px));
  --hud-right-inset:max(8px,env(safe-area-inset-right,0px));
  --mobile-feed-row:22px;
  --mobile-checklist-width:min(32vw,240px);
 }
 body.touch-device .hud-top{
  display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr);
  padding-inline:var(--hud-left-inset) var(--hud-right-inset);
  align-items:center;gap:8px;overflow:visible;
 }
 body.touch-device .portrait{width:var(--mobile-portrait-size)}
 body.touch-device .portrait>.portrait-image{width:72px;height:72px;max-height:72px}
 body.touch-device #hud #feed{
  grid-area:1 / 2;justify-self:end;width:min(100%,52vw,440px);height:auto;max-height:calc(3 * var(--mobile-feed-row) + 4px);min-height:0;margin:0;padding:0;
  align-items:flex-end;font-size:clamp(11px,1.6vw,14px);text-align:right;gap:2px;
 }
 body.touch-device #hud #feed>div{max-width:100%;height:var(--mobile-feed-row);min-height:var(--mobile-feed-row);padding-block:2px;background:#081123a8;padding-inline:8px;border-radius:4px;--feed-start-cut:5px}
 body.touch-device.in-tutorial:has(#tutorial-checklist:not([hidden]):not([data-movement])) #hud #feed{
  width:min(100%, calc((100vw - var(--mobile-checklist-width))/2 - var(--hud-right-inset) - 10px));
  justify-self:end;
 }
 body.touch-device #tutorial-checklist{
  left:50%;right:auto;translate:-50% 0;
  top:calc((8px + env(safe-area-inset-top,0px))/var(--interface-scale));
  width:calc(var(--mobile-checklist-width)/var(--interface-scale));max-width:none;
 }
 body.touch-device #tutorial-checklist[data-movement]{
  left:auto;right:calc(var(--side-safe)/var(--interface-scale));translate:none;
 }
 body.touch-device:has(#feed > *) #tutorial-checklist[data-movement]{
  top:calc((var(--hud-height) + 8px)/var(--interface-scale));
 }
 :root[data-interface-style=official] body.touch-device #tutorial-checklist{background:#20232adb}
 body.touch-device .hud-player-stack{display:block;position:relative;grid-area:1 / 1;min-width:0;anchor-name:--mobile-player-hud}
 body.touch-device #hud .roominfo{
  position:absolute;inset:calc(100% + var(--mobile-hud-gap)) auto auto 0;
  display:flex;align-items:center;gap:.45em;max-width:none;padding:3px 7px;font-size:11px;
  white-space:nowrap;text-align:left;
 }
 body.touch-device #hud .roominfo small{margin:0;font-size:inherit;line-height:inherit}
 body.touch-device #hud .roominfo .perf-divider{display:block;opacity:.55}
 body.touch-device #hud #activeitems{
  bottom:calc(8px + env(safe-area-inset-bottom,0px));
  max-width:min(32vw,300px);max-height:36px;font-size:10px;padding:3px 7px;gap:2px 7px;
 }
 body.touch-device #hud .power-chip:not(:last-child)::after{margin-left:7px}
}
@media(pointer:coarse) and (orientation:landscape) and (max-width:800px){
 :root[data-interface-style=official] body.touch-device.in-tutorial:has(#tutorial-checklist:not([hidden]):not([data-movement])) .hud-player-card{
  max-width:calc((100vw - var(--mobile-checklist-width))/2 - var(--hud-left-inset) - 6px);
 }
 :root[data-interface-style=official] body.touch-device.in-tutorial:has(#tutorial-checklist:not([hidden]):not([data-movement])) .portrait{
  flex:0 1 auto;min-width:0;padding-inline-end:4px;
 }
 :root[data-interface-style=official] body.touch-device.in-tutorial:has(#tutorial-checklist:not([hidden]):not([data-movement])) .hud-wallet{font-size:12px}
 :root[data-interface-style=official] body.touch-device.in-tutorial:has(#tutorial-checklist:not([hidden]):not([data-movement])) .portrait>.portrait-image{
  width:50px;height:50px;
 }
 :root[data-interface-style=official] body.touch-device.in-tutorial:has(#tutorial-checklist:not([hidden]):not([data-movement])) #hud-health{gap:3px}
 :root[data-interface-style=official] body.touch-device.in-tutorial:has(#tutorial-checklist:not([hidden]):not([data-movement])) #hud-health i{width:11px}
}

#podium-labels,#podium-fallback{
 display:grid;grid-template-columns:repeat(3,minmax(0,var(--podium-column-width,28.409%)));
 justify-content:center;gap:0;
}
#podium-fallback{
 position:relative;padding:0 0 12px;
}
#podium-fallback::after{
 content:'';position:absolute;inset:auto 4% 0;height:12px;
 border-top:4px solid #788492;background:#334152;border-radius:3px;
}
#podium-fallback .podium-placeholder{
 --step-height:36%;--step-cap:#c9d9e5;--rank-number-size:1.3em;
 width:calc(100% - 4px);height:100%;justify-self:center;justify-content:flex-end;gap:0;
}
#podium-fallback .rank-1{--step-height:50%;--step-cap:#f3c860;--rank-number-size:1.6em}
#podium-fallback .rank-3{--step-height:32%;--step-cap:#d89965;--rank-number-size:1.1em}
#podium-fallback .podium-placeholder img{width:clamp(40px,9vh,74px)}
#podium-fallback .podium-placeholder>div{
 display:grid;place-items:center;height:var(--step-height);padding:0;
 border-top:clamp(4px,1.3vh,10px) solid var(--step-cap);
 font-size:clamp(12px,3vh,24px);
}
#podium-fallback .podium-placeholder b{
 min-width:1.55em;padding:.07em .22em;border:1px solid #a3aeb7;border-radius:2px;
 background:linear-gradient(#505e69,#2d3943);color:#f3f6f8;
 box-shadow:inset 0 -1px 1px #101a22,0 1px 2px #0007;
 font-size:var(--rank-number-size);line-height:1;
}

body #shop #itemlist button.unaffordable{
 background:#3a2028;border-color:#83454f;color:#ffc2c6;
 opacity:1;cursor:default;
}
body #shop #itemlist button.unaffordable small{color:#e2a9ae}

#scoreboard .scoreboard-player{display:inline-flex;align-items:center;gap:6px;vertical-align:middle}
#scoreboard .scoreboard-rival-icon{
 display:block;flex:none;width:clamp(19px,1.72em,27px);height:clamp(19px,1.72em,27px);object-fit:contain
}
#scoreboard .local-player-row > td{background-color:#ffffff12}

#fx-helmet-shade,#victory.helmet-winner-view::before{
 position:fixed;inset:0 0 auto;height:clamp(92px,40.25vh,356.5px);z-index:-1;pointer-events:none;
 background:radial-gradient(ellipse 72% 170% at 50% -82%,
  #060808f5 34%,#060808e9 50%,#060808b8 65%,#06080873 76%,
  #06080838 86%,#0608080d 94%,#06080803 98%,#06080800 100%);
}
#victory.helmet-winner-view::before{content:"";z-index:0}
#victory.helmet-winner-view>:is(.victory-panel,.next-maze-panel){position:relative}
body:not(.ingame) #fx-helmet-shade{display:none}
@media(prefers-reduced-motion:no-preference){
 #fx-helmet-shade:not([hidden]){animation:helmet-shade-in 200ms ease-out both}
}
@keyframes helmet-shade-in{from{opacity:0}to{opacity:1}}
#fx-water{width:100%;height:100%;z-index:1;pointer-events:none}
#fx-water:not([hidden]){opacity:1}
#fx-fall{
 background:#000;
 mask-image:radial-gradient(ellipse farthest-corner at center,
  transparent calc(var(--fall-hole,130%) - 30%),#000 var(--fall-hole,130%));
 z-index:1;
}

body #menu>.window:has(#help:not([hidden])){height:auto}
body #menu>.window:has(#help:not([hidden]) #manual-body:not([hidden])){height:calc(var(--solo-panel-height, 360px) * 1.5)}
#view-manual{display:block;width:100%;margin-top:8px}
body #menu>.window:has(#preferences:not([hidden])) #preferences,
#overlay #preferences:not([hidden]){display:flex;flex-direction:column;gap:10px;overflow:hidden}
body #menu>.window:has(#preferences:not([hidden])) #preferences{flex:1 1 auto}
.preferences-body{
 display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:auto;
 scrollbar-width:thin;overscroll-behavior:contain;padding:4px;
}
#preferences-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,74px),1fr))}
body #preferences #preferences-tabs button{width:100%;padding-inline:2px;overflow-wrap:anywhere}
.preferences-body>[role=tabpanel]{min-width:0}
#preferences :is(#desktop-preferences>fieldset:last-child,#mobile-preferences){margin-bottom:0}
#preferences:has(:is(#preferences-gameplay,#preferences-audio):not([hidden])) .preferences-body{overflow-x:hidden}
#preferences:has(#preferences-you:not([hidden])){gap:6px;padding-block:7px}
#preferences:has(#preferences-you:not([hidden])) .preferences-body{overflow-x:hidden;padding:3px 5px}
:root[data-interface-style] body #preferences #preferences-identity{border:0;padding:0;margin:0;color:inherit}
#preferences-back{flex:none}
#interface-preferences{container-type:inline-size}
.preferences-interface-layout{display:grid;grid-template-columns:minmax(min(100%,12rem),2fr) minmax(0,3fr);align-items:start;gap:clamp(12px,4vw,24px)}
.interface-scale-controls,.preferences-sliders{display:grid;gap:14px}
#game-language-picker{grid-column:1/-1;display:grid;gap:6px}
#preferences #hud-preference-title{margin:0;font-size:inherit;line-height:1.25}
.preferences-sliders{min-width:0;width:100%;max-width:420px;grid-template-columns:minmax(0,1fr);margin-inline:auto;padding-block:6px}
body #preferences .preferences-sliders label{min-width:0}
body #preferences .preferences-sliders input[type=range]{min-width:0;width:100%;max-width:100%;margin-inline:0}
#preferences-gameplay{container-type:inline-size}
.fov-controls{
 display:grid;grid-template-columns:minmax(0,1fr) auto;
 grid-template-areas:"label ." "slider checkbox";
 align-items:center;column-gap:clamp(12px,3vw,24px);row-gap:2px;
}
.fov-controls label[for=fov]{grid-area:label}
#preferences .fov-controls #fov{grid-area:slider;margin-block:0;min-height:24px}
#preferences .fisheye-option{
 grid-area:checkbox;justify-self:end;display:flex;align-items:center;gap:8px;
 min-height:32px;white-space:nowrap;cursor:pointer;
}
#preferences #fisheye-lens{
 width:16px;height:16px;margin:0;padding:0;cursor:pointer;
 accent-color:var(--skin-focus,var(--menu-accent));
}
#preferences #fisheye-lens:focus-visible{outline:2px solid var(--skin-focus,var(--menu-accent));outline-offset:2px}
@media(pointer:coarse){
 #preferences .fisheye-option{min-height:44px}
}
@container(max-width:235px){
 .fov-controls{grid-template-columns:minmax(0,1fr);grid-template-areas:"label" "slider" "checkbox"}
}
@container (max-width:400px){
 .preferences-interface-layout{grid-template-columns:minmax(0,1fr)}
}
@media(max-height:500px) and (orientation:landscape){
 #preferences .preferences-sliders{grid-template-columns:repeat(3,minmax(0,1fr));max-width:none;padding-block:8px}
 #preferences-gameplay .preferences-sliders{grid-template-columns:minmax(0,1fr);max-width:420px}
}
.map-preview-frame{position:relative;overflow:hidden}
.player-identity-layout{display:grid;grid-template-columns:minmax(72px,27%) minmax(0,1fr);gap:clamp(8px,2vw,20px);align-items:center}
.player-identity-fields{display:grid;gap:10px;min-width:0}
.player-identity-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
.player-identity-controls label{min-width:0}
.player-identity-controls label:first-child{grid-column:1/-1}
.player-identity-controls :is(input,select){width:100%;min-width:0}
.player-preview{display:grid;justify-items:center;align-content:center;min-width:0;text-align:center}
#player-preview-name{max-width:100%;white-space:nowrap;font-size:clamp(11px,1.6vw,15px);line-height:1.2}
.player-preview-model{position:relative;width:100%;height:clamp(76px,19vw,144px)}
.player-preview-model canvas{position:absolute;inset:0;width:100%;height:100%;background:transparent}
.player-preview-model canvas[hidden]{display:none}
:root[data-interface-style] body #preferences :is(#voice-type,#eye-style){
 background-image:var(--skin-dropdown-icon);background-repeat:no-repeat;
 background-position:right var(--dropdown-inset) center;padding-inline-end:var(--dropdown-reserve);
}
.map-preview-frame>canvas{
 position:absolute;inset:0;display:block;width:100%;height:100%;
}
.map-preview-frame>.map-preview-orbit{
 touch-action:none;cursor:grab;
}
.map-preview-frame.is-dragging>.map-preview-orbit{cursor:grabbing}
.map-preview-loading{
 position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;
 opacity:0;visibility:hidden;transition:opacity 180ms ease-out,visibility 0s 180ms;
}
.map-preview-loading.is-loading{opacity:1;visibility:visible;transition:none}
.map-preview-loading[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.map-preview-loading{transition:none}}
.map-preview-mode{
 position:absolute;right:7px;bottom:7px;z-index:1;
 display:flex;gap:2px;padding:2px;border-radius:6px;background:#14171ce6;
}
.map-preview-mode button{
 border:0;border-radius:4px;padding:4px 7px;min-width:29px;
 background:transparent;color:#e3edff;
 font-family:var(--menu-display,var(--skin-font,sans-serif));font-size:13px;line-height:1;font-weight:700;
}
body #menu .map-preview-mode button[aria-pressed=true],
body #victory .map-preview-mode button[aria-pressed=true]{
 background:var(--menu-accent,#ffef72);color:#18180e;
}
.map-preview-mode button:focus-visible{outline:2px solid #fff;outline-offset:-2px}
.touch-device .map-preview-mode button{min-width:36px;min-height:29px}
body #menu .tabs button{flex:0 1 auto}
body #menu .tabs button[data-tab=help]{margin-inline-start:auto;margin-inline-end:0}
@media(max-width:600px){
 body #menu .tabs{gap:clamp(6px,2vw,14px)}
}

.victory-actions button{white-space:nowrap;min-width:max-content}
@media(pointer:coarse){
 .touch-device .victory-actions{gap:8px}
 .touch-device .victory-actions button{width:auto;font-size:clamp(11px,1.8vw,13px);flex:1 1 auto}
 :root[data-interface-style=official] body.touch-device .hud-player-card{--wallet-slant:20px;align-items:stretch}
 :root[data-interface-style=official] body.touch-device .portrait{
  align-self:stretch;border-radius:6px 0 0 6px;padding-inline-end:calc(6px + var(--wallet-slant) * .5 + var(--hud-status-size));
  clip-path:polygon(0 0,100% 0,calc(100% - var(--wallet-slant)) 100%,0 100%);
 }
 :root[data-interface-style=official] body.touch-device .hud-wallet{padding-inline:calc(var(--wallet-slant) * .8 + .4em)}
}

:is(#preferences,#tutorial-profile) #colors{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(max(22px,calc((100% - 60px)/11)),1fr));gap:6px;
 height:auto;min-width:0;min-height:0;padding:8px 5px;margin-top:6px;
}
body :is(#preferences,#tutorial-profile) #colors button{
 justify-self:center;flex:none;width:100%;max-width:28px;min-width:0;height:auto;
 aspect-ratio:1;margin:0;padding:0;
}
body #tutorial-profile .player-identity-layout{
 grid-template-columns:clamp(72px,20cqi,104px) minmax(0,1fr);
}
#tutorial-profile .player-identity-controls{
 grid-template-columns:minmax(80px,1.2fr) minmax(120px,1fr) minmax(94px,1fr);
}
:root[data-interface-style] body #tutorial-profile :is(#eye-style,#voice-type){
 white-space:nowrap;
 padding-inline:8px 24px;
 background-position:right 4px center;
 background-size:16px auto;
}
#tutorial-profile .player-identity-controls label:first-child{grid-column:auto}
#tutorial-profile #colors{
 grid-template-columns:repeat(var(--color-columns),minmax(0,1fr));
 column-gap:clamp(3px,1cqi,6px);max-width:none;
}
@media(max-width:400px){
 .player-identity-controls{grid-template-columns:minmax(0,1fr)}
}
@container(max-width:435px){
 body #tutorial-profile .player-identity-layout{grid-template-columns:minmax(0,1fr)}
}
@container(max-width:334px){
 #tutorial-profile .player-identity-controls{grid-template-columns:minmax(120px,1fr) minmax(94px,1fr)}
 #tutorial-profile .player-identity-controls label:first-child{grid-column:1/-1}
}
@container(max-width:225px){
 #tutorial-profile .player-identity-controls{grid-template-columns:minmax(0,1fr)}
}

@media(pointer:coarse){
 :root[data-interface-style] body.touch-device :is(#preferences-you,#tutorial-profile) :is(#eye-style,#voice-type){
  align-items:center;
  align-content:center;
  line-height:normal;
 }
}

@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #menu:has(#preferences:not([hidden]) #preferences-you:not([hidden])){
  --menu-logo-height:clamp(28px,10svh,55px);--menu-logo-gap:6px;
 }
 body.touch-device #menu>.window:has(#preferences:not([hidden]) #preferences-you:not([hidden])){
  height:auto;
 }
 body.touch-device #preferences:has(#preferences-you:not([hidden])){gap:4px;padding-block:6px}
 body.touch-device :is(#preferences-you,#tutorial-profile) .player-identity-controls label{margin:0}
 :root[data-interface-style] body.touch-device :is(#preferences-you,#tutorial-profile) .player-identity-controls :is(input,select){
  min-height:30px;padding-block:4px;margin-block:3px 0;
 }
 body.touch-device .player-identity-layout{
  grid-template-columns:minmax(58px,22%) minmax(0,1fr);gap:8px;
 }
 body.touch-device .player-identity-fields{gap:6px}
 body.touch-device .player-identity-controls{
  grid-template-columns:minmax(0,1.2fr) repeat(2,minmax(0,1fr));column-gap:8px;
 }
 body.touch-device .player-identity-controls label:first-child{grid-column:auto}
 body.touch-device .player-preview-model{height:clamp(54px,22svh,86px)}
 :root[data-interface-style] body.touch-device #preferences :is(#voice-type,#eye-style){
  background-position:right 4px center;background-size:13px;padding-inline-end:19px;
 }
 body.touch-device :is(#preferences,#tutorial-profile) #colors{
  gap:4px;padding:4px;margin-top:3px;
 }
 body.touch-device :is(#preferences,#tutorial-profile) #colors button{max-width:21px}
 body.touch-device #preferences #colors{grid-template-columns:repeat(11,minmax(0,1fr));max-width:18rem}
}


body #menu>.window:has(#room-browser:not([hidden])){
 height:auto;
 min-height:min(var(--solo-panel-height,0px),calc((100svh - 100px - var(--menu-logo-space))/var(--interface-scale)));
}
body #menu .room-columns button{
 display:inline-flex;align-items:center;justify-content:center;gap:3px;
 width:max-content;max-width:100%;min-width:0;margin:0;padding:3px 0;
 color:inherit;background:transparent;border:0;box-shadow:none;
 font:inherit;line-height:1.25;text-transform:none;white-space:nowrap;
}

body #menu .room-columns button[data-direction]:not([data-direction=""])::after{
 content:'';flex:none;width:6px;height:5px;background:currentColor;
 clip-path:polygon(50% 0,100% 100%,0 100%);
}
body #menu .room-columns button[data-direction="descending"]::after{transform:rotate(180deg)}
@media(max-width:460px){
 #room-browser{--room-columns:minmax(76px,1.45fr) minmax(0,1fr) 61px 29px 29px 31px 27px}
 .room-creator .room-official{padding-inline:3px}
 body #menu .room-columns button{gap:2px}
 body #menu .room-columns button[data-direction]:not([data-direction=""])::after{width:5px;height:4px}
}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #menu>.window:has(#room-browser:not([hidden])){
  min-height:min(var(--solo-panel-height,0px),calc((100svh - 36px - var(--menu-logo-space))/var(--interface-scale)));
 }
}

body.release-notice-open>:not(#release-notice,#rotate-device,#game,#shade){display:none!important}
#release-notice:not([hidden]){
 position:fixed;inset:0;z-index:190;display:flex;flex-direction:column;
 align-items:center;justify-content:center;gap:clamp(10px,3vh,24px);padding:12px;
}
.notice-logo{display:block;width:auto;height:clamp(72px,22.4svh,227.2px);max-width:90vw;object-fit:contain}
#release-notice>.window{
 zoom:var(--interface-scale);width:min(500px,calc((100vw - 24px)/var(--interface-scale)));
 max-height:calc((100svh - clamp(72px,22.4svh,227.2px) - 52px)/var(--interface-scale));
 overflow:auto;padding:clamp(14px,3vh,24px);text-align:center;
}
#release-notice h1{margin:0;font:700 clamp(21px,3.6vh,30px)/1.15 var(--menu-display,var(--skin-font,sans-serif))}
#release-notice p{line-height:1.55;margin:.7rem 0 0}
#release-notice p strong{color:var(--menu-accent);font-weight:700}
#release-notice button{margin-top:1rem;padding:.65rem 1.25rem}
body.release-notice-open #rotate-device{background:var(--menu-bg)}

body #menu .bot-counter output{font-size:15px}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #menu .bot-counter output{font-size:12px}
}

:root body #hud #feed>div.game-master-entry{
 color:#fff8e9;
 background:linear-gradient(110deg,#453455,#28655e,#55415f,#6b5547,#453455);
 background-size:300% 100%;
 text-shadow:0 1px 3px #261d32;
 animation:game-master-pearl 4s ease-in-out infinite alternate;
}
@keyframes game-master-pearl{to{background-position:100% 50%}}
@media(prefers-reduced-motion:reduce){:root body #hud #feed>div.game-master-entry{animation:none}}

#menu-version{
 position:fixed;left:max(12px,env(safe-area-inset-left,0px));bottom:max(8px,env(safe-area-inset-bottom,0px));
 z-index:4;color:#b8b8b8;font-size:.8125rem;line-height:1.2;text-shadow:0 1px 3px #000;
 pointer-events:none
}
.intro-revealing #menu-version{visibility:hidden}

body #menu #contact-link{
 position:fixed;right:max(12px,env(safe-area-inset-right,0px));bottom:max(12px,env(safe-area-inset-bottom,0px));
 z-index:4;width:44px;height:44px;min-width:0;
 margin:0;padding:0;border-radius:8px
}
#contact-link>svg{position:absolute;inset:0;margin:auto;display:block;pointer-events:none}
@media(pointer:coarse), (max-width:600px){
 body #menu #contact-link{top:max(12px,env(safe-area-inset-top,0px));bottom:auto}
}

body #menu>.window:has(#contact-panel:not([hidden])){height:auto;overflow-y:auto;overscroll-behavior:contain}
#contact-panel{flex:none;text-align:left;padding:16px 22px 12px}
@media(max-height:820px) and (min-width:601px){
 #contact-panel{padding-inline:18px}
}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #contact-panel{padding-inline:12px}
}
#account-actions,#account-form{margin-block:24px;text-align:left}
#account-actions button{width:100%;margin:0}
#account-form,#account-form label{display:grid}
#account-form{gap:12px}
#account-form label{gap:4px;margin:0}
#account-form input{width:100%;min-width:0;margin:0}
#account-code{font-variant-numeric:tabular-nums;letter-spacing:.16em}
.account-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
#account-form .account-buttons>button{flex:1 0 8rem;margin:0}
#name[readonly]{user-select:text}
#contact-heading{font-size:1.35rem;line-height:1.2;text-align:left;margin:0 0 10px;padding:0}
#contact-panel button{margin:0}
#contact-refresh{display:grid;place-items:center;min-width:40px;min-height:40px;padding:7px}
#contact-form{display:grid;gap:6px}
.contact-field,.contact-actions,.contact-verification{display:contents}
#contact-form label{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:.9rem}
#contact-form :is(input,select,textarea){
 box-sizing:border-box;width:100%;margin:0 0 6px;padding:8px 10px;border:1px solid var(--skin-line,var(--menu-line));
 border-radius:4px;background:var(--skin-field,var(--menu-field));color:inherit;font:inherit
}
#contact-form #contact-topic{
 appearance:none;padding-inline-end:40px;
 background-image:var(--skin-dropdown-icon);background-repeat:no-repeat;
 background-size:20px 22px;background-position:right 12px center
}
@media(forced-colors:active){
 #contact-form #contact-topic{appearance:auto;background-image:none}
}
#contact-form textarea{resize:vertical;min-height:90px}
.contact-captcha-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.contact-captcha-row img{border-radius:4px;background:#292d35}
#contact-form #contact-answer{width:5rem;margin:0}
.contact-honey{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
:is(#contact-error,.field-error){color:#ff9295;font-size:.875rem;line-height:1.35;margin:5px 0}
:is(#contact-error,.field-error):empty{display:none}
@media(pointer:coarse),(max-width:600px){
 #contact-heading{font-size:16px;margin-bottom:6px}
 #contact-form{gap:4px}
 #contact-form label,#contact-error,#contact-delivery-status,#contact-success{font-size:inherit}
 #contact-form :is(input,select,textarea){margin-bottom:3px;padding:6px 8px}
 #contact-form #contact-topic{padding-inline-end:32px;background-size:16px 18px;background-position:right 8px center}
 #contact-form textarea{min-height:52px}
 #contact-panel button{font-size:inherit;padding:6px 8px}
 #contact-refresh{min-width:32px;min-height:32px}
 .contact-captcha-row{gap:6px}
 .contact-captcha-row img{width:112px;height:auto}
}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #contact-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}
 body.touch-device .contact-field{display:grid;min-width:0;gap:3px}
 body.touch-device :is(.contact-wide,.contact-actions){grid-column:1/-1}
 body.touch-device #contact-form .contact-field :is(input,select,textarea){margin:0}
 body.touch-device #contact-form textarea{min-height:60px}
 body.touch-device .contact-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px;align-items:end}
 body.touch-device .contact-verification{display:grid;gap:3px}
 body.touch-device :is(#contact-error,#contact-delivery-status){grid-column:1/-1}
 body.touch-device #contact-submit{grid-area:1/2;min-height:32px;margin:0!important;white-space:nowrap}
}
@media(pointer:coarse) and (orientation:landscape) and (min-width:480px){
 body.touch-device #contact-form{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr)}
 body.touch-device .contact-title-field{grid-column:auto}
}
@media(pointer:coarse) and (orientation:landscape) and (max-width:420px){
 body.touch-device .contact-actions{grid-template-columns:minmax(0,1fr);row-gap:4px}
 body.touch-device #contact-submit{grid-area:auto}
}
#contact-delivery-status{margin:2px 0;font-size:.82rem;color:var(--menu-muted)}
#contact-submit{margin-top:4px!important}
#contact-success{text-align:center;margin:16px 0 0;font-size:1.125rem}
#contact-success span{display:block;font-size:2.5rem}

:root{--pearl-name-gradient:linear-gradient(105deg,#f5badf,#c6e8f1 53%,#a6e3cf)}
body .pearl-player-name{
 background-image:var(--pearl-name-gradient);background-clip:text;color:transparent!important;
 text-shadow:none
}
.game-master-entry .pearl-player-name,#feed .pearl-player-name,#toast .pearl-player-name{
 --pearl-name-gradient:linear-gradient(105deg,#f5badf,#c6e8f1 53%,#a6e3cf)
}
.pearl-podium-avatar{display:block;width:clamp(40px,9vh,74px);aspect-ratio:1;border-radius:50%;background:var(--pearl-health)}

/* Give the GM name the moving bands and highlight of the pearl skin. */
:root[data-interface-style] body #scoreboard .player-name.pearl-player-name{
 background:linear-gradient(108deg,#f5badf 8%,#d0c7ff 25%,#a6e3cf 37%,#fff7e9 46%,#bdd8ff 55%,#f5badf 72%);
 background-size:245% 100%;
 background-clip:text;
 text-shadow:none;
 animation:scoreboard-pearl 4s ease-in-out infinite alternate;
}
@keyframes scoreboard-pearl{from{background-position:0% 50%}to{background-position:100% 50%}}
@media(prefers-reduced-motion:reduce){
 :root[data-interface-style] body #scoreboard .player-name.pearl-player-name{animation:none;background-size:100% 100%}
}


#next-maze-panel{
 --vote-label-size:14px;
 --vote-control-size:14px;
}
#next-maze-panel .goal-trigger{--setup-control-size:var(--vote-control-size)}
#next-maze-panel :is(#next-maze-bots-field,#next-maze-goal-field){text-align:start}
#next-maze-panel :is(.bot-field>span,.goal-label){
 display:block;color:var(--menu-muted);font-size:var(--vote-label-size);
}
body #next-maze-panel :is(.bot-counter output,.goal-options [role=option]){
 font-size:var(--vote-control-size);
}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device #next-maze-panel{--vote-label-size:11px;--vote-control-size:12px}
}
#victory .next-maze-actions{
 display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:clamp(4px,1.5vw,10px);
}
#victory .next-maze-actions button{
 min-width:0;margin:0;padding:8px clamp(4px,1.5vw,12px);font-size:clamp(11px,2.1vw,14px);
 white-space:normal;overflow-wrap:anywhere;
}
#hud button.shortcut-hint{color:inherit;border:0}
#hud button.shortcut-hint[hidden]{display:none}
#hud button.shortcut-hint:disabled{opacity:.48;cursor:default}

#next-maze-goal-field[hidden]{display:none}

/* Keep the title and match details clear of the table. */
.scoreboard-heading{margin-bottom:clamp(10px,1.5vw,18px)}

/* Shop cards share the same artwork and text layout across both skins. */
#shop .shop-section{gap:8px}
#shop .shop-section h3{margin:0 0 2px;text-transform:uppercase}
#shop #itemlist [data-buy]{
 display:grid;grid-template-columns:clamp(52px,8vw,100px) minmax(0,1fr) auto;
 grid-template-rows:auto 1fr;align-items:start;column-gap:14px;row-gap:3px;
 padding:9px 12px;margin:0;min-height:74px;text-align:left;border-radius:5px;
}
#shop #itemlist .shop-art{
 grid-row:1 / 3;align-self:center;display:grid;place-items:center;
 padding-right:11px;border-right:1px solid color-mix(in srgb,currentColor 42%,transparent);
 height:100%;min-height:48px;
}
#shop #itemlist .shop-art img{display:block;width:100%;height:clamp(43px,7vw,76px);object-fit:contain}
#shop #itemlist [data-buy]>small{grid-column:2 / 4;font-size:clamp(11px,1.18vw,14px);line-height:1.3;white-space:pre-line}
#powers-table td:last-child{white-space:pre-line}
#shop #itemlist .shop-item-name{font-size:clamp(12px,1.35vw,18px);line-height:1.12}
#shop #itemlist [data-buy]>b{font-size:clamp(13px,1.55vw,21px);line-height:1.12}
:root[data-interface-style=official] #shop #itemlist [data-buy]{background:#252932;border-color:#505865;color:var(--menu-ink)}
:root[data-interface-style=official] #shop #itemlist [data-buy]:not(:disabled):hover{background:#323846;border-color:var(--menu-accent)}
:root[data-interface-style=official] #shop #itemlist [data-buy]>small{color:#edf0f5}
:root[data-interface-style=official] #shop #itemlist [data-buy].unaffordable{background:#36252a;border-color:#a4666c;color:#ffa9ad;opacity:1}
:root[data-interface-style=official] #shop #itemlist [data-buy].owned{background:var(--menu-accent-bg);border-color:var(--menu-accent);color:var(--menu-accent);opacity:1}
@media(max-width:560px){#shop .shop-section{grid-template-columns:minmax(0,1fr)}}
body.touch-device #scoreboard:not(.results-board){
 position:fixed;width:auto;max-height:none;overflow:auto;
}
@media(pointer:coarse) and (orientation:portrait){
 body.touch-device :is(#shop,#scoreboard:not(.results-board)){
  inset:calc((var(--hud-height) + 14px)/var(--interface-scale)) 9%
   calc((var(--footer-space) + 14px)/var(--interface-scale));
 }
}
@media(pointer:coarse) and (orientation:landscape){
 body.touch-device :is(#shop,#scoreboard:not(.results-board)):not([hidden]){
  inset:calc((var(--hud-height) + var(--mobile-hud-gap))/var(--interface-scale))
   calc(var(--side-safe)/var(--interface-scale))
   calc((var(--touch-toolbar-top) + var(--mobile-hud-gap))/var(--interface-scale));
  top:calc(anchor(--mobile-player-hud bottom, calc(var(--hud-height)/var(--interface-scale))) + var(--mobile-hud-gap)/var(--interface-scale));
  padding:6px 8px;
 }
 body.touch-device #shop{gap:4px}
 body.touch-device #shop .shophead{display:none}
 body.touch-device #shop-filters{gap:4px;padding:0;border:0}
 body.touch-device #shop #itemlist{min-width:0;padding-right:3px;gap:5px}
 body.touch-device #shop .shop-section{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
 body.touch-device #shop .shop-section h3{margin:0;font-size:11px}
 .touch-device #shop #itemlist [data-buy]{min-height:44px;grid-template-columns:38px minmax(0,1fr) auto;gap:1px 6px;padding:4px 6px}
 .touch-device #shop #itemlist .shop-art{padding-right:5px;min-height:32px}
 .touch-device #shop #itemlist .shop-art img{height:32px}
 .touch-device #shop #itemlist [data-buy]>small{font-size:10px;line-height:1.2}
}
@media(pointer:coarse) and (orientation:landscape) and (max-width:490px){
 body.touch-device #shop .shop-section{grid-template-columns:minmax(0,1fr)}
}

/* Keep only room activity visible behind the pre-match controls. */
:root[data-interface-style] body.pre-match #overlay{backdrop-filter:none;background:transparent}
body.pre-match #game{filter:none}
body.pre-match :is(#crosshair,#hud-player-card,#roominfo,#activeitems,#bottomhud,#minimap,#toast,#aim-capture,#touch-controls){display:none!important}
:root[data-interface-style] body.pre-match .hud-top{background:none;border:0;box-shadow:none;overflow:visible}
body.pre-match #feed{position:fixed;top:max(12px,env(safe-area-inset-top,0px));right:max(12px,env(safe-area-inset-right,0px));width:min(65vw,500px);max-height:24vh;text-align:right}
#pre-match-players{margin-bottom:14px;padding:12px;border:1px solid var(--menu-line,var(--skin-line));text-align:center}
#pre-match-players h2{margin:0 0 8px;font-size:16px}
.pre-match-counts{display:grid;justify-content:center;gap:5px}
.pre-match-counts>div{display:grid;grid-template-columns:22px 3ch;align-items:center;gap:8px;text-align:center}
.pre-match-counts svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.pre-match #overlay .pause #resume{margin-top:0}
#touch-controls.scoreboard-open :is(#touch-fire,#touch-helmet,#touch-dash){display:none}

.dash-ring{
 position:absolute;pointer-events:none;overflow:visible;fill:none;stroke:var(--dash-color,currentColor);
 stroke-width:1.2;stroke-linecap:round;filter:drop-shadow(0 1px 1px #0008);
}
.dash-ring[hidden]{display:none}
.dash-track{opacity:.16}
.dash-progress{stroke-dasharray:0 100;transform:rotate(-90deg);transform-origin:center}
.dash-ring.dash-rejected{stroke:#ff4a4a}
#crosshair-dash{top:50%;left:50%;width:62px;height:62px;translate:-50% -50%}


:root[data-interface-style] body.touch-device #touch-controls :is(#touch-jump,#touch-helmet,#touch-dash){
 border-radius:50%;
}
/* Three action buttons occupy three corners of a square around Fire. */
.touch-device #touch-controls{
 --action-spacing:64px;
 --action-near:calc(var(--fire-right) + var(--fire-size) / 2 - var(--action-spacing) - var(--teleport-size) / 2);
 --action-far:calc(var(--action-near) + 2 * var(--action-spacing));
 --fire-right:calc(var(--side-safe,12px) + 36px);
}
.touch-device #touch-controls :is(#touch-jump,#touch-helmet,#touch-dash){
 bottom:calc(var(--control-center) + var(--action-spacing) - var(--teleport-size) / 2 + 8px);
}
.touch-device #touch-controls :is(#touch-jump,#touch-dash){right:var(--action-far)}
.touch-device #touch-controls #touch-helmet{right:var(--action-near)}
.touch-device #touch-controls #touch-dash{
 bottom:calc(var(--control-center) - var(--action-spacing) - var(--teleport-size) / 2 + 8px);
}
.touch-device #touch-controls.stick-right :is(#touch-jump,#touch-dash){left:var(--action-far);right:auto}
.touch-device #touch-controls.stick-right #touch-helmet{left:var(--action-near);right:auto}
@media(pointer:coarse) and (orientation:landscape){
 .touch-device #touch-controls{
  --control-center:calc(var(--move-bottom) + max(var(--move-size) / 2 + 16px,var(--action-spacing) + var(--teleport-size) / 2));
 }
}


.loading-dots{
 --dot-size:clamp(7.2px,1.32vh,13.2px);
 --dot-gap:calc(var(--dot-size) * .44);
 --dot-muted:#858992;
 --dot-accent:var(--skin-focus,var(--menu-accent,#ffcf27));
 position:relative;display:inline-block;box-sizing:content-box;flex:none;
 width:var(--dot-size);height:var(--dot-size);aspect-ratio:1;margin-inline:calc(var(--dot-size) + var(--dot-gap));
 vertical-align:middle;overflow:visible;border-radius:50%;
}
.loading-dots::before,.loading-dots::after{
 content:"";position:absolute;top:0;width:100%;height:100%;border-radius:inherit;
}
.loading-dots,.loading-dots::before,.loading-dots::after{
 background-color:var(--dot-muted);box-shadow:inset 0 0 0 1px rgb(17 17 17 / 40%);
 animation:loading-pulse 1.2s ease-in-out infinite;
}
.loading-dots{animation-delay:.18s}
.loading-dots::before{right:calc(100% + var(--dot-gap))}
.loading-dots::after{left:calc(100% + var(--dot-gap));animation-delay:.36s}
@keyframes loading-pulse{
 0%,65%,100%{background-color:var(--dot-muted)}
 30%{background-color:var(--dot-accent)}
}
#hud #net .loading-dots{--dot-size:.396em;overflow:visible}
@media(prefers-reduced-motion:reduce){
 .loading-dots,.loading-dots::before,.loading-dots::after{animation:none}
 .loading-dots{background-color:var(--dot-accent)}
}

#minimap{border:0;background:transparent}
#tutorial-menu{display:block;margin:7px auto 0;width:100%}
#menu .window{position:relative}
#room-list-status:has(.loading-dots){
 position:absolute;inset:0;display:grid;place-items:center;margin:0;pointer-events:none;
}
button:has(>.loading-button-label){position:relative}
button>.loading-button-label{display:contents;font:inherit;visibility:hidden}
button>.loading-dots{position:absolute;inset:50% auto auto 50%;margin:0;transform:translate(-50%,-50%)}
body.tutorial-celebration :is(#touch-controls,#fx-helmet-shade,#aim-capture){display:none!important}

body.touch-device #hud #minimap{
 width:min(calc(2 * var(--mobile-map-size, 145px)), 54svh);
 height:min(calc(2 * var(--mobile-map-size, 145px)), 54svh);
 pointer-events:none;
 left:calc(var(--hud-left-inset,var(--side-safe,12px)) / var(--interface-scale));
 right:auto;
 top:50%;
 bottom:auto;
 transform:translateY(-50%);
}
#hud .roominfo .perf-divider{display:block;opacity:.55}
body #hud .roominfo[data-local] .performance-network{display:none}
#hud .roominfo small{margin:0;font-size:inherit;line-height:inherit}
body:not(.touch-device) #hud .roominfo{
 position:fixed;inset:auto max(12px,env(safe-area-inset-right,0px)) max(12px,env(safe-area-inset-bottom,0px)) auto;display:flex;align-items:center;
 gap:.45em;max-width:none;padding:3px 7px;font-size:11px;white-space:nowrap;
}
#hud #activeitems,.player-powers{--power-icon-size:32px}
#hud #activeitems{gap:4px;max-height:80px}
#hud #activeitems .power-chip,#scoreboard .player-powers .power-chip,#touch-powers .power-chip{
 display:inline-grid;place-items:center;box-sizing:border-box;
 width:var(--power-icon-size);height:var(--power-icon-size);padding:4px;
 background:var(--menu-raised);border:1px solid var(--menu-line);border-radius:6px;
 overflow:hidden;vertical-align:middle;
}
#hud #activeitems .power-chip::after,#scoreboard .player-powers .power-chip::after,#touch-powers .power-chip::after{content:none}
#scoreboard .player-powers .power-chip{margin:2px}
.power-chip img,#touch-controls .touch-item-icon{display:block;width:100%;height:100%;object-fit:contain}
.power-chip.inactive img{opacity:.4}
body.touch-device #hud #activeitems{display:none}
#touch-powers{
 --power-icon-size:var(--touch-toolbar-height,32px);
 position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
 display:flex;align-items:center;gap:4px;min-width:0;
 max-width:max(0px,calc(100% - 2 * var(--touch-actions-width,0px)));
 overflow-x:auto;scrollbar-width:none;pointer-events:auto;touch-action:pan-x;
}
#touch-powers:empty{display:none}
#touch-powers .power-chip{flex:none}
:root[data-interface-style] body #touch-powers button.power-chip{
 padding:4px;width:var(--power-icon-size);height:var(--power-icon-size);
 background:var(--menu-raised);border:1px solid var(--menu-line);box-shadow:none;
}
:root[data-interface-style] body #touch-powers button.power-chip[aria-pressed=true]{border-color:#ffce00}
#touch-powers button[aria-pressed=false] img{opacity:.4}
.touch-toolbar #touch-shop{margin-inline-start:auto}
body.touch-device #touch-powers,body.touch-device #touch-powers *{touch-action:pan-x}
@media(pointer:coarse) and (orientation:landscape){
 .touch-device .touch-toolbar{--touch-actions-width:calc(2 * (var(--footer-button-width) + 6px))}
}
@media(pointer:coarse) and (orientation:landscape) and (max-width:520px){
 .touch-device .touch-toolbar #touch-powers{top:auto;bottom:calc(100% + 4px);transform:translateX(-50%);max-width:100%}
}
@media(pointer:coarse) and (orientation:portrait){
 .touch-device .touch-toolbar #touch-powers{top:calc(100% + 4px);transform:translateX(-50%);max-width:100%}
}
#touch-controls :is(#touch-jump,#touch-helmet,#touch-dash){
 place-items:center;place-content:stretch;padding:6px;
}

@media(pointer:coarse) and (orientation:portrait){
 .touch-device .touch-toolbar{left:var(--side-safe,8px);right:var(--side-safe,8px);align-items:center}
 .touch-device .touch-toolbar button{flex:none}
}

#scoreboard .kick-cell{padding-inline-start:clamp(9px,1.8vw,18px)}
:root[data-interface-style] #scoreboard button[data-kick]{
 display:grid;place-items:center;width:2.1em;height:2.1em;margin-inline:auto;padding:0;
 background:var(--kick-background,#73353e);border:1px solid #a96167;border-radius:5px;color:#fff;font-weight:700;line-height:1;
}
:root[data-interface-style] #scoreboard button[data-kick]:hover{background:#934750}
#scoreboard .kick-error{margin:6px 0;color:var(--menu-text,#fff)}
#touch-dash.fake-death .dash-icon,#touch-dash .fake-death-icon[hidden]{display:none}

#tutorial-countdown{position:fixed;inset:0;display:grid;place-items:center;z-index:95;pointer-events:none;color:#fff;font:800 clamp(54px,9vw,112px) var(--skin-font,sans-serif);text-shadow:0 3px 14px #000}
