/* Infin8 EcoSphere — one world-first HUD across desktop / portrait / landscape.
   Keep only compass, camera/menu, contextual action and four optional side tools. */
html[data-game-state="playing"] .sled-stage{--ride-top:max(8px,env(safe-area-inset-top,0px));--ride-glass:rgba(6,14,30,.87)}
html[data-game-state="playing"] .sled-world-hud{pointer-events:none;--i8-safe-l:max(10px,env(safe-area-inset-left,0px));--i8-safe-r:max(10px,env(safe-area-inset-right,0px))}
html[data-game-state="playing"] .sled-world-hud>.i8-hud__tl{display:none!important}
/* An absolute compass uses the full HUD, not the empty auto-sized grid track. */
html[data-game-state="playing"] .sled-world-hud>.world-nav-top{position:absolute;grid-area:auto;top:var(--ride-top);left:50%;width:min(400px,calc(100% - 310px));transform:translateX(-50%);margin:0;gap:0;z-index:8;pointer-events:none}
html[data-game-state="playing"] .world-nav-top>.world-nav{width:100%;height:30px;background:var(--ride-glass);border-radius:10px}
html[data-game-state="playing"] .world-nav-top>:not(.world-nav):not(.world-nav__sr){display:none!important}
html[data-game-state="playing"] .sled-world-hud>.i8-hud__tr{position:absolute;top:var(--ride-top);right:var(--i8-safe-r);max-width:none;pointer-events:auto;z-index:9}
html[data-game-state="playing"] .sled-world-hud .i8-hud__tr .i8-toolbar{display:flex;flex-wrap:nowrap;gap:4px}
html[data-game-state="playing"] .sled-music-slot{display:none!important}
/* The shared player may move out of a hidden slot into its fallback dock. */
html[data-game-state="playing"] #infin8-music-widget-host{display:none!important}
html:not([data-game-state="playing"]) #ecosphere-quickbar,html:not([data-game-state="playing"]) #ecosphere-quick-info{display:none!important}
#ecosphere-quickbar{position:absolute;top:calc(var(--ride-top) + 52px);left:max(10px,env(safe-area-inset-left,0px));z-index:18;display:flex;flex-direction:column;gap:6px;pointer-events:auto}
.ecosphere-quick-action{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #42e0ff88;border-radius:12px;color:var(--i8-cyan,#42e0ff);background:var(--ride-glass,#071426);box-shadow:0 0 10px #9b6dff33;font:800 22px/1 system-ui;touch-action:manipulation}
.ecosphere-quick-action[aria-expanded=true],.ecosphere-quick-action:active{border-color:var(--i8-magenta,#ff4fd8);color:white}
#ecosphere-quick-info{box-sizing:border-box;position:absolute;top:calc(var(--ride-top) + 52px);left:max(64px,env(safe-area-inset-left,0px) + 64px);z-index:22;width:min(630px,calc(100% - 80px));max-height:calc(100% - 74px);overflow:auto;padding:10px 14px;border:1px solid #42e0ff99;border-radius:15px;background:var(--ride-glass,#06162b);color:#eafbff;box-shadow:0 12px 30px #0009;touch-action:pan-y;pointer-events:auto}
#ecosphere-quick-info[hidden]{display:none!important}
#ecosphere-quick-info header{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#42e0ff;font:800 14px system-ui}
#ecosphere-quick-info header button{min-width:44px;min-height:44px;color:white;background:#192a44;border:1px solid #42e0ff;border-radius:9px}
#ecosphere-quick-info p{display:flex;justify-content:space-between;gap:12px;margin:8px 0;overflow-wrap:anywhere;font:600 13px/1.5 system-ui}
#ecosphere-quick-info p b{color:#9fdcf1;font-size:11px;white-space:nowrap}
#ecosphere-quick-info p span{text-align:right}
html[data-game-state="playing"] .sleddin-community .community-dock{left:auto;right:max(10px,env(safe-area-inset-right,0px));top:calc(var(--ride-top) + 54px);display:flex;flex-direction:column;align-items:flex-end;gap:5px;max-width:min(235px,65vw)}
html[data-game-state="playing"] .sleddin-community .community-dock-toggle{display:none!important}
html[data-game-state="playing"] .sleddin-community .community-dock[data-collapsed=true]>:not(.community-dock-toggle){display:none!important}
html[data-game-state="playing"] .sleddin-community .community-chat,html[data-game-state="playing"] .sleddin-community .community-board{top:max(8px,env(safe-area-inset-top,0px));right:max(8px,env(safe-area-inset-right,0px));left:auto;transform:none;width:min(760px,calc(100% - 16px));height:min(88%,750px);max-height:calc(100% - 16px);z-index:30}
html[data-game-state="playing"] .sled-world-hud>#winter-dock{position:absolute;bottom:calc(var(--i8-safe-b) + 8px);right:var(--i8-safe-r);left:auto;max-width:min(52vw,280px);flex-direction:column;align-items:flex-end;pointer-events:auto}
html[data-game-state="playing"] .sled-world-hud>#winter-dock>.i8-stat{display:none!important}
html[data-game-state="playing"] #winter-dock .i8-btn{min-height:44px;max-width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
@media(max-width:900px){html[data-game-state="playing"] .sled-world-hud>.world-nav-top{width:min(42vw,300px)}}
/* Touch mode only (input-mode.js), never pointer capability: an Xbox browser reports a coarse pointer. */
html[data-input-mode="touch"][data-game-state="playing"] .sled-stage .steer-zone{--ctl-stick:96px;width:112px;height:112px}
html[data-input-mode="touch"][data-game-state="playing"] .sled-stage .steer-track{width:var(--ctl-stick);height:var(--ctl-stick)}
html[data-input-mode="touch"][data-game-state="playing"] .sled-stage .action-pad{grid-template-columns:52px 60px;gap:5px}
html[data-input-mode="touch"][data-game-state="playing"] .sled-stage .action-pad .i8-icon-btn{--ctl-size:52px}
html[data-input-mode="touch"][data-game-state="playing"] .sled-stage .action-pad .boost-control{--ctl-size:60px}
html[data-input-mode="touch"][data-game-state="playing"] .sled-world-hud>#winter-dock{bottom:calc(max(8px,env(safe-area-inset-bottom,0px)) + 128px);max-width:min(53vw,220px)}
@media(max-width:600px){
 html[data-game-state="playing"] .sled-world-hud>.world-nav-top{left:calc((100% - 120px)/2);width:min(200px,calc(100% - 154px))}
 html[data-game-state="playing"] .sled-world-hud .i8-toolbar .i8-icon-btn--hud{--ctl-size:40px;--ctl-art:40px;--i8-touch-hud:40px}
 html[data-game-state="playing"] .sled-world-hud .i8-hud__tr .i8-toolbar{gap:0}
 html[data-game-state="playing"] .sleddin-community .community-chat,html[data-game-state="playing"] .sleddin-community .community-board{height:calc(100% - 16px)}
 #ecosphere-quick-info{top:max(8px,env(safe-area-inset-top,0px));left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));width:auto;max-height:calc(100% - 16px);min-height:min(64%,420px)}
}
@media(orientation:landscape) and (max-height:550px){
 html[data-game-state="playing"] .sled-world-hud>.world-nav-top{width:min(280px,35vw)}
 #ecosphere-quickbar{flex-direction:row;top:calc(var(--ride-top) + 48px);gap:4px}
 #ecosphere-quick-info{top:calc(var(--ride-top) + 96px)}
 html[data-game-state="playing"] .sled-world-hud>#winter-dock{left:175px;right:175px;width:calc(100% - 350px);max-width:none;bottom:var(--i8-safe-b);flex-direction:row;flex-wrap:nowrap;overflow-x:auto}
}
