/* Context-only water controls and one compact camera action; keep the centre free. */
.camera-toggle-mobile{display:none}
#underwater-view{position:fixed;inset:0;pointer-events:none;z-index:1;background:rgb(4 73 103 / .12);box-shadow:inset 0 0 48px rgb(2 30 51 / .24)}
#underwater-view[hidden]{display:none}
.hud[data-underwater=true]{box-shadow:none}
#camera-view{display:block;width:100%;min-height:44px;padding:9px;color:#18283e;background:#fff;border:1px solid #8091a9;border-radius:8px;font:inherit}
.settings-field:has(#camera-view)>p{font-size:14px;color:#42536c;line-height:1.4}
#camera-toggle:focus-visible,.camera-toggle-mobile:focus-visible,#camera-view:focus-visible{outline:3px solid #f7d578;outline-offset:2px}
#sandbox-flight button>span:last-child{font-size:12px;line-height:16px}
.sandbox-survival .dive-depth{justify-content:space-between;font-size:13px}
.hud.sandbox-active .sandbox-survival{top:274px}
.mobile-layout .camera-toggle-mobile{display:block;position:absolute;right:calc(var(--safe-right) + 100px);top:calc(var(--safe-top) + 52px);min-width:66px;height:44px;padding:6px 10px;border:1px solid #91a9c4;border-radius:8px;background:#1c324e;color:#fff;font-size:14px;font-weight:650;pointer-events:auto;touch-action:manipulation}
.camera-toggle-mobile:disabled,#camera-toggle:disabled{opacity:.65;cursor:default}
.mobile-layout .hud.sandbox-active .sandbox-survival{left:calc(var(--safe-left) + 10px);top:calc(var(--safe-top) + 112px);transform:none;width:170px;padding:6px 8px;font-size:12px}
.mobile-layout .sandbox-survival>div{display:flex;width:auto;margin:2px 0}
.mobile-layout .sandbox-survival meter{display:block;min-width:18px;width:40px}
.mobile-layout .sandbox-survival p{display:none}
.mobile-layout .sandbox-survival .dive-depth{font-size:12px}
.mobile-layout .hud[data-swimming=true] .sandbox-flight button{width:66px;min-height:48px;height:48px;border-radius:10px}
.mobile-layout .hud[data-swimming=true] .sandbox-flight button>span:first-child{font-size:20px;line-height:20px}
.mobile-layout .hud[data-swimming=true] .sandbox-survival[data-danger=true]{background:#653526;color:#fff4da;border-color:#efba7f}

/* On short phones the swim readout must not cover the sprint/joystick zone. */
.mobile-layout .hud.sandbox-active .sandbox-survival{left:calc(var(--safe-left) + 190px);right:calc(var(--safe-right) + 88px);top:calc(var(--safe-top) + 102px);width:auto;max-width:270px}
.mobile-layout .hud.sandbox-active .sandbox-survival:not([hidden]){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.mobile-layout .sandbox-survival>div{flex-direction:column;align-items:center;gap:1px;margin:0;font-size:12px}
.mobile-layout .sandbox-survival label,.mobile-layout .sandbox-survival strong{min-width:0}
.mobile-layout .sandbox-survival meter{display:none}
html:not(.mobile-layout) #hud[data-swimming=true] ~ #world-climate{bottom:132px}
@media(max-height:360px){.mobile-layout .hud[data-swimming=true] #open-emotes{display:none}.mobile-layout .hud[data-swimming=true] #open-chat{top:108px}}
