html.game-immersive{overflow:hidden;background:#ccdedb}html.game-immersive body{overflow:hidden!important;padding:0!important}html.game-immersive #header{display:none!important}html.game-immersive #game{max-width:none!important;width:100%!important}html.game-immersive .nw-world.nw-immersive,html[data-client].hs-immersive #game{height:var(--game-height,100dvh)!important}html.game-immersive .nw-top{top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}html.game-immersive .nw-stick,html.hs-immersive .voxel-joystick{left:max(20px,env(safe-area-inset-left))!important;bottom:calc(24px + env(safe-area-inset-bottom))!important}html.game-immersive .nw-jump,html.hs-immersive .voxel-jump{right:max(20px,env(safe-area-inset-right))!important;bottom:calc(24px + env(safe-area-inset-bottom))!important}.gd-help{display:grid;gap:12px}.gd-help p{margin:0;line-height:1.7}.game-immersive button{min-height:48px}.nw-peer-label{position:absolute;transform:translate(-50%,-100%);padding:4px 8px;border-radius:10px;background:#fff8dfd9;color:#365542;max-width:140px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.nw-live{position:absolute;top:128px;left:12px;font-size:12px;background:#fff8dfde;padding:6px 10px;border-radius:10px;pointer-events:none}.nw-world:not(.nw-walking) .nw-live{top:72px}.nw-walking .nw-bottom{gap:8px;top:72px}.nw-walking .nw-bottom button{min-height:48px}html.hs-immersive .hs-top-actions{order:-1}html.hs-immersive .hs-audio{display:none!important}html.hs-immersive .nw-gateway{display:none}.nw-world.nw-walking .nw-view-tools{display:none}@media(max-height:500px){.nw-walking .nw-bottom{top:68px}.nw-live{top:126px;max-width:55%}.nw-status{font-size:12px;padding:6px 10px}.nw-walking .nw-stick{width:84px;height:84px}}

html[data-client].hs-immersive .hs-top button,html.game-immersive .nw-world button{min-height:48px!important}html.game-immersive:has(input:focus) .nw-stick,html.game-immersive:has(input:focus) .nw-jump,html.hs-immersive:has(input:focus) .voxel-joystick,html.hs-immersive:has(input:focus) .voxel-jump{visibility:hidden}

/* Lock only the game surface; help and forms keep their normal gestures. */
html.game-immersive body{position:fixed!important;top:var(--game-scroll-top,0px);left:0;right:0;overscroll-behavior:none}
.voxel-stage.is-walking,.nw-world.nw-walking{touch-action:none;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.voxel-jump,.nw-jump{ -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.forest-camera{display:none;position:absolute;right:max(20px,env(safe-area-inset-right));bottom:calc(200px + env(safe-area-inset-bottom));z-index:6;min-height:48px;padding:8px 12px;font-size:13px;background:#fff9e8ed;border:1px solid #bca46d;touch-action:manipulation}
.is-walking .forest-camera,.nw-walking .forest-camera{display:block}
.is-simple .forest-camera,.cabin-fallback .forest-camera{display:none!important}
html.hs-immersive:has(.hs-drawer:not([hidden])) .forest-camera{visibility:hidden}

.forest-guide{display:none;position:absolute;left:max(12px,env(safe-area-inset-left));top:76px;z-index:6;font-size:12px;min-height:48px;padding:8px 12px;background:#fff9e8e8;max-width:calc(100% - 24px)}
.is-walking .forest-guide{display:block}
.is-simple .forest-guide,.cabin-fallback .forest-guide{display:none!important}
html.hs-immersive:has(.hs-drawer:not([hidden])) .forest-guide{visibility:hidden}

/* HUD rows are anchored from the top, never pushed into the menu by short height. */
html.game-immersive .nw-top button{height:48px;width:48px;padding:0;line-height:1}
html.game-immersive .forest-camera{top:calc(max(12px,env(safe-area-inset-top)) + 60px);bottom:auto;right:max(12px,env(safe-area-inset-right));margin:0}
html.game-immersive .forest-guide{top:calc(max(12px,env(safe-area-inset-top)) + 60px)}
.gd-screen-button{display:none;position:fixed;z-index:170;left:50%;top:max(12px,env(safe-area-inset-top));transform:translateX(-50%);font-size:12px;min-height:48px;max-width:100px;padding:8px 12px;margin:0;background:#fff9e8ed}
.gd-screen-button:hover:not(:disabled){transform:translateX(-50%)}
html.game-immersive[data-game-display=browser] .gd-screen-button{display:block}
html.game-immersive[data-game-display=browser] .hs-top h1{visibility:hidden}
html.game-immersive:has(dialog[open]) .gd-screen-button,html.game-immersive:has(.hs-drawer:not([hidden])) .gd-screen-button{visibility:hidden}
html.game-immersive .nw-top .nw-status{max-width:calc(50% - 65px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.game-immersive .nw-walking .nw-bottom{top:calc(max(12px,env(safe-area-inset-top)) + 60px);max-width:calc(100% - 160px);flex-wrap:nowrap;gap:8px;right:auto}
html.game-immersive .nw-bottom button{padding:8px 4px;font-size:12px;min-width:44px;white-space:nowrap}
html[data-client].hs-immersive .cabin-interact,html.game-immersive .nw-interact{left:50%;right:auto;transform:translateX(-50%);bottom:calc(24px + env(safe-area-inset-bottom));max-width:calc(100% - 252px);padding:8px;white-space:normal;font-size:13px}
html[data-client].hs-immersive .cabin-interact:hover:not(:disabled),html.game-immersive .nw-interact:hover:not(:disabled){transform:translateX(-50%)}
@media(max-height:360px){
 html.game-immersive .nw-live{display:none}
 html[data-client].hs-immersive .voxel-joystick,html.game-immersive .nw-stick{width:76px;height:76px}
 html[data-client].hs-immersive .voxel-joystick i{left:17px;top:17px}
 html[data-client].hs-immersive .cabin-interact,html.game-immersive .nw-interact{max-width:calc(100% - 216px)}
}

/* The scene reaches the screen edges. Safe areas belong to HUD controls only. */
html[data-client].hs-immersive #game{margin:0!important;top:0!important;left:0!important;right:0!important;bottom:auto!important}
html.game-immersive .nw-world.nw-immersive{padding:0!important;margin:0!important}
