/* Landscape mobile layout. Coordinates leave the centre of the world clear. */
.mobile-toolbar,.mobile-heading,#mobile-sprint,#mobile-look-hint{display:none}
.lobby-header-actions{display:flex;align-items:center;gap:10px}
.lobby-fullscreen{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 15px;border:1px solid #94afff;border-radius:10px;background:#3d63e5;color:#fff;font-size:13px;font-weight:800;cursor:pointer;white-space:nowrap}
.lobby-fullscreen>[data-fullscreen-icon]{font-size:22px;line-height:1}
[data-fullscreen-toggle][aria-pressed=true]{border-color:#9fe0b8;background:#2c6248;color:#f0fff5}
[data-fullscreen-toggle]:disabled{cursor:default;opacity:.7}
#fullscreen-help{width:min(540px,calc(100% - 28px));max-height:calc(100dvh - 24px)}
#fullscreen-help .dialog-heading{gap:12px}#fullscreen-help h2{font-size:24px;line-height:1.2}
#fullscreen-help-description,#fullscreen-ios-steps,#fullscreen-desktop-tip{font-size:14px;line-height:1.65;color:#4e6382}
#fullscreen-ios-steps{padding-left:22px}#fullscreen-ios-steps li{padding:4px 0 4px 5px}
#orientation-fullscreen-note{font-size:12px;line-height:1.6;color:#c9d8ef;background:#24364c;border:1px solid #476187;border-radius:10px;padding:12px;margin:18px 0 0}
#fullscreen-ios-steps[hidden],#fullscreen-desktop-tip[hidden],#orientation-fullscreen-note[hidden]{display:none}
html:fullscreen,html:-webkit-full-screen{background:#111827}
#jump svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.gyro-settings{display:grid;gap:14px;padding:16px;border:1px solid #d1dcec;border-radius:14px;background:#edf3fc;color:#293b58}
.gyro-settings>.settings-label{font-size:14px}.gyro-settings>.settings-label>span{font-size:25px;color:#4868c4}
#gyro-status{font-size:12px;line-height:1.5;margin:0;color:#586d8b;min-height:36px}
.gyro-buttons{display:flex;gap:8px}.gyro-buttons .button{flex:1;font-size:12px;min-height:44px;padding:8px}
.gyro-buttons [aria-pressed=true]{background:#d8ecdf;color:#25593d;border-color:#90b89d}
#orientation-gate{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;margin:0;padding:24px;border:0;border-radius:0;background:#111827;color:#eff5ff;overflow:auto}
#orientation-gate[open]{display:grid;place-items:center}
#orientation-gate::backdrop{background:#111827}
.orientation-content{width:min(330px,100%);text-align:center;margin:auto}
.orientation-content .eyebrow{margin:32px 0 12px;color:#97adc9;font-size:10px;letter-spacing:.14em}
#orientation-title{font-size:32px;line-height:1.1;letter-spacing:-.04em;margin:0}
#orientation-description{font-size:15px;line-height:1.6;color:#b7c6dc;margin:18px 0 24px}
.orientation-content .button{padding:0 24px;background:#537ae8;border:1px solid #9bb4ff}
.orientation-content small{display:block;max-width:270px;font-size:12px;line-height:1.6;color:#879ab7;margin:20px auto 0}
.rotate-phone{position:relative;width:98px;height:54px;border:3px solid #b6cafd;border-radius:12px;margin:18px auto;box-shadow:0 0 0 12px #537ae815}
.rotate-phone::before{content:'';position:absolute;left:5px;top:19px;width:3px;height:10px;border-radius:3px;background:#b6cafd}
.rotate-phone span{display:grid;height:100%;place-items:center;color:#a5c0ff;font-size:34px}
.portrait-blocked dialog:not(#orientation-gate){visibility:hidden!important}
.portrait-blocked #hud,.portrait-blocked #lobby{visibility:hidden;pointer-events:none}
#mobile-menu{width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 24px);padding:22px}
.mobile-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mobile-menu-grid button{display:flex;align-items:center;gap:12px;min-height:60px;padding:12px;border:1px solid #cedaec;border-radius:12px;background:#edf3fc;color:#273f65;font-size:13px;font-weight:750;text-align:left}
.mobile-menu-grid button span{width:24px;text-align:center;font-size:25px;color:#5274b8}
.mobile-menu-grid button:last-child{color:#984442;background:#fff0eb;border-color:#ebcdc6}
.mobile-layout{--safe-left:max(12px,env(safe-area-inset-left));--safe-right:max(12px,env(safe-area-inset-right));--safe-top:max(10px,env(safe-area-inset-top));--safe-bottom:max(12px,env(safe-area-inset-bottom));--hud-glass:#182a42b8}
.mobile-layout body{overscroll-behavior:none;-webkit-text-size-adjust:100%}
.mobile-layout #world,.mobile-layout #hud{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.mobile-layout .hud{padding:0}
.mobile-layout .hud .room-hud,.mobile-layout .hud .adventure-bar,.mobile-layout .hud #open-chat,.mobile-layout .hud .controls-hint,.mobile-layout .sandbox-keyboard-hint{display:none!important}
.mobile-layout .hud kbd{display:none}
.mobile-layout .hud .mission-hud{position:absolute;left:var(--safe-left);top:var(--safe-top);width:190px;padding:9px 12px}
.mobile-layout .mobile-toolbar{position:absolute;z-index:4;top:var(--safe-top);right:calc(var(--safe-right) + 100px);display:flex;align-items:center;gap:6px;pointer-events:auto}
.mobile-layout .mobile-toolbar button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:44px;height:44px;padding:0 8px;border:1px solid #dce8ff65;border-radius:12px;background:var(--hud-glass);color:#fff;font-size:23px;font-weight:750;touch-action:manipulation}
.mobile-layout .mobile-toolbar button[hidden]{display:none}
.mobile-layout .mobile-toolbar #mobile-gyro{font-size:12px;min-width:72px}
.mobile-layout .mobile-toolbar #mobile-fullscreen{min-width:84px;font-size:22px;gap:5px}
.mobile-layout #mobile-fullscreen [data-fullscreen-label]{font-size:10px}
.mobile-layout #mobile-gyro>span:first-child{font-size:22px}
.mobile-layout .mobile-toolbar button[aria-pressed=true]{background:#276248ce;border-color:#a2eac5}
.mobile-layout .mobile-heading{position:absolute;top:calc(var(--safe-top) + 50px);left:50%;transform:translateX(-50%);display:block;padding:7px 14px;min-width:86px;border-radius:8px;background:#182a427a;color:#fff;font-size:12px;letter-spacing:.08em;font-weight:750;text-align:center;font-variant-numeric:tabular-nums}
.mobile-layout .hud #minimap{position:absolute;top:var(--safe-top);right:var(--safe-right);left:auto;width:88px;height:88px;border-radius:14px;border:2px solid #dae7fa9e;box-shadow:none;opacity:.93}
.mobile-layout .sandbox-vitals{top:var(--safe-top);left:var(--safe-left);width:190px;padding:8px 10px;border-color:#dae7fa70;border-radius:10px;background:var(--hud-glass);box-shadow:none}
.mobile-layout .sandbox-health-heading{color:#e2eafa;font-size:10px}
.mobile-layout #sandbox-health-value{font-size:15px;color:#c9f5d9}
.mobile-layout .sandbox-health{height:5px;margin-top:5px;background:#ffffff28}
.mobile-layout .sandbox-health>span{background:#83dbb0}
.mobile-layout .sandbox-shield{font-size:9px;color:#b5d6ff;margin-top:5px}
.mobile-layout .sandbox-pvp-badge{font-size:8px;background:#f6ce8233;color:#ffe2a8}
.mobile-layout .sandbox-materials{left:var(--safe-left);top:calc(var(--safe-top) + 77px);gap:4px}
.mobile-layout .sandbox-materials>span{padding:4px 6px;min-height:24px;min-width:0;background:var(--hud-glass);border:1px solid #dae7fa30;color:#d1ddef;font-size:9px;border-radius:6px}
.mobile-layout .sandbox-materials strong{font-size:11px;color:#fff}
.mobile-layout .sandbox-vitals[data-low-health=true] #sandbox-health-value{color:#ff9c91}
.mobile-layout .hud .performance-status{top:calc(var(--safe-top) + 92px);right:var(--safe-right);bottom:auto;max-width:110px;text-align:right;font-size:9px;padding:3px 5px;background:#182a4275}
.mobile-layout .mobile-controls{position:absolute;inset:0;display:block;pointer-events:none;user-select:none;-webkit-user-select:none}
.mobile-layout .move-zone{position:absolute;left:0;bottom:0;width:40%;height:68%;pointer-events:auto;touch-action:none}
.mobile-layout .joystick{position:absolute;left:calc(var(--safe-left) + 34px);bottom:calc(var(--safe-bottom) + 26px);width:120px;height:120px;border:1.5px solid #ffffff6b;border-radius:50%;background:#14253c30;backdrop-filter:none;pointer-events:none;box-shadow:inset 0 0 0 16px #ffffff0c}
.mobile-layout .joystick span{position:absolute;left:50%;top:50%;width:49px;height:49px;border:2px solid #ffffffaa;border-radius:50%;background:#e1ecfa8f;box-shadow:none;transform:translate(-50%,-50%)}
.mobile-layout .joystick b{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);color:#ffffffbc;font-size:8px;letter-spacing:.13em;font-weight:700}
.mobile-layout .joystick.engaged{border-color:#c6dcffcc;background:#14253c50}
.mobile-layout .joystick.engaged b{display:none}.mobile-layout .joystick.engaged span{background:#d8e9ffce}
.mobile-layout #mobile-sprint{display:grid;justify-items:center;align-content:center;gap:0;position:absolute;z-index:2;left:calc(var(--safe-left) + 80px);bottom:calc(var(--safe-bottom) + 161px);width:54px;height:49px;pointer-events:auto;border:1px solid #dce8ff70;border-radius:14px;background:var(--hud-glass);color:#fff;font-size:10px;font-weight:750}
.mobile-layout #mobile-sprint span{font-size:25px;line-height:1}
.mobile-layout #mobile-sprint.active,.mobile-layout #mobile-sprint.auto-sprint{color:#ffdfa0;border-color:#ffdda1;background:#605235bf}
.mobile-layout .mobile-actions{position:absolute;right:var(--safe-right);bottom:calc(var(--safe-bottom) + 10px);display:grid;gap:10px;pointer-events:none}
.mobile-layout .mobile-actions button{width:64px;height:50px;border:1.5px solid #dce8ff9c;border-radius:50%;background:var(--hud-glass);backdrop-filter:none}
.mobile-layout .mobile-actions #jump{display:grid;place-content:center;justify-items:center;gap:2px;width:68px;height:68px;background:var(--hud-glass);border:1.5px solid #dce8ff9c}
.mobile-layout #jump strong{font-size:9px}
.mobile-layout .sandbox-fire{z-index:3;right:calc(var(--safe-right) + 86px);bottom:calc(var(--safe-bottom) + 66px);width:82px;height:82px;min-height:82px;padding:8px;border:2px solid #f5e6becc;border-radius:50%;background:#78623e80;color:#fff2d4;box-shadow:inset 0 0 0 5px #ffe7ba0d;touch-action:none}
.mobile-layout .sandbox-fire>span{font-size:33px}.mobile-layout .sandbox-fire>strong{font-size:10px}
.mobile-layout .sandbox-fire.held{background:#c89645c9;border-color:#fff3d5;box-shadow:0 0 0 5px #f6d18835}
.mobile-layout .sandbox-toolbelt{z-index:2;bottom:var(--safe-bottom);gap:5px;padding:4px;border-radius:11px;background:#17283fc9;border-color:#d6e5ff52;box-shadow:none}
.mobile-layout .sandbox-toolbelt button{min-width:48px;width:48px;min-height:46px;padding:4px;gap:2px;border-radius:7px}
.mobile-layout .sandbox-toolbelt button>span{font-size:19px}.mobile-layout .sandbox-toolbelt button strong{font-size:8px}
.mobile-layout .sandbox-toolbelt button[aria-pressed=true]{background:#e0eafd;color:#244366}
.mobile-layout .sandbox-context{z-index:3;left:auto;right:calc(var(--safe-right) + 84px);bottom:calc(var(--safe-bottom) + 163px);transform:none;max-width:180px;padding:6px;background:#1c2e48b8;border-color:#d3e2f965;border-radius:10px;box-shadow:none}
.mobile-layout #sandbox-context-label{font-size:9px;line-height:1.3;margin:0 1px 5px}
.mobile-layout .sandbox-context-actions{gap:5px;flex-wrap:wrap}
.mobile-layout .sandbox-action{min-height:44px;min-width:68px;flex:1;padding:6px 9px;font-size:11px;border-radius:8px}
.mobile-layout .sandbox-flight{right:var(--safe-right);bottom:calc(var(--safe-bottom) + 12px);gap:10px}
.mobile-layout .sandbox-flight button{display:grid;gap:0;align-content:center;justify-items:center;width:62px;height:62px;padding:5px;border-radius:50%;font-size:10px;background:var(--hud-glass)}
.mobile-layout .sandbox-flight button>span{font-size:24px}
.mobile-layout .sandbox-vehicle-status{left:50%;bottom:var(--safe-bottom);max-width:calc(100% - 330px);font-size:10px;padding:6px 10px}
.mobile-layout .sandbox-feedback{left:50%;top:calc(var(--safe-top) + 47px);max-width:calc(100% - 410px);font-size:11px;padding:7px 10px}
.mobile-layout #mobile-look-hint{position:absolute;left:50%;bottom:calc(var(--safe-bottom) + 61px);transform:translateX(-50%);display:block;max-width:260px;margin:0;text-align:center;color:#fff;font-size:10px;line-height:1.5;padding:5px 9px;background:#182a4280;border-radius:7px}
.mobile-layout #mobile-look-hint[hidden]{display:none}
.mobile-layout .toast{top:calc(var(--safe-top) + 58px);bottom:auto;max-width:min(340px,calc(100% - 210px));padding:8px 12px;font-size:12px;text-align:center;background:#17283fec}
.mobile-layout .connection.offline{display:flex;top:calc(var(--safe-top) + 46px);bottom:auto;left:50%;right:auto;transform:translateX(-50%);font-size:11px;max-width:280px}
.mobile-layout dialog{max-height:calc(100dvh - 20px);overscroll-behavior:contain}
.mobile-layout #settings-dialog{width:min(700px,calc(100% - 28px));padding:18px}
.mobile-layout .settings-options{grid-template-columns:1fr 1fr;gap:18px 26px;align-items:start}
.mobile-layout .gyro-settings{grid-column:2;grid-row:1/4}
.mobile-layout #settings-dialog .dialog-heading{margin-bottom:12px}
.mobile-layout .settings-check{min-height:44px}.mobile-layout .controls-guide{grid-column:1/-1}
.mobile-layout .settings-field input[type=range]{height:36px}
.mobile-layout #mobile-menu .dialog-heading{margin-bottom:12px}
.mobile-layout .lobby{width:100%;height:100dvh;min-height:0;overflow:auto;padding:0 var(--safe-right) 18px var(--safe-left);overscroll-behavior:contain}
.mobile-layout .lobby-header{height:52px;padding-top:env(safe-area-inset-top);max-width:1040px}
.mobile-layout .lobby .brand{font-size:19px}.mobile-layout .lobby .brand-mark{width:30px;height:30px;font-size:18px}
.mobile-layout .lobby-settings{min-height:44px}
.mobile-layout .lobby-header-actions{gap:8px}
.mobile-layout .lobby-fullscreen{padding:0 10px;font-size:12px;gap:6px}
.mobile-layout .lobby-content{max-width:1040px;padding:16px 0 0}
.mobile-layout .lobby-intro{width:calc(53% - 16px);margin:0 0 13px}
.mobile-layout .lobby .lobby-copy{font-size:12px;line-height:1.45;margin:8px 0 0;max-width:32ch}
.mobile-layout .lobby .eyebrow,.mobile-layout .lobby-footer{display:none}
.mobile-layout .lobby h1{font-size:27px;line-height:1.1}
.mobile-layout .lobby-grid{display:grid;grid-template-columns:minmax(0,1.06fr) minmax(0,1fr);gap:22px;align-items:start}
.mobile-layout .worlds-panel{display:block}
.mobile-layout .lobby .play-panel{width:100%;margin:-84px 0 0;padding:14px 16px;border-radius:14px}
.mobile-layout .section-heading{margin-bottom:10px}.mobile-layout .section-heading h2{font-size:14px}.mobile-layout .section-heading>span{font-size:8px}
.mobile-layout .lobby #map-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.mobile-layout .lobby #map-options .map-choice{display:flex;min-height:123px;padding:0 0 10px;border-radius:10px;align-items:stretch}
.mobile-layout .map-image{width:100%;height:78px;min-height:78px;margin:0 0 8px}
.mobile-layout .map-title{padding:0 7px;font-size:11px;line-height:1.4;align-self:auto}.mobile-layout .map-description{display:none}
.mobile-layout .map-check{left:auto;right:5px;top:5px;width:21px;height:21px;min-height:21px;padding:0;font-size:12px}
.mobile-layout .public-rooms{margin-top:11px}.mobile-layout .public-rooms summary{min-height:44px;font-size:12px;padding:0 12px}
.mobile-layout .worlds-note,.mobile-layout .play-footnote{display:none}
.mobile-layout .lobby #lobby-form{gap:9px}
.mobile-layout .lobby .field input{height:44px;font-size:16px}.mobile-layout .lobby .field label{font-size:12px}
.mobile-layout .lobby #customize-lobby{min-height:44px;height:44px;padding:4px 9px;gap:9px}
.mobile-layout .avatar-shortcut strong{font-size:12px}.mobile-layout .avatar-shortcut small{font-size:10px;margin-top:2px}
.mobile-layout #avatar-swatch{width:32px;height:34px}
.mobile-layout .lobby .play-now{min-height:48px;font-size:16px}.mobile-layout .lobby .play-hint{font-size:10px;line-height:1.3}
.mobile-layout .join-options summary{min-height:44px;font-size:12px}
.mobile-layout .lobby .sandbox-mode-note{font-size:9px;padding:6px 8px}.mobile-layout .sandbox-mode-note strong{font-size:10px}
.mobile-layout .lobby .private-option{font-size:12px;min-height:48px}
@media(max-width:780px){
  .mobile-layout .mobile-heading{display:none}
  .mobile-layout .sandbox-vitals{width:174px}
  .mobile-layout .sandbox-materials>span>span{display:none}
  .mobile-layout .sandbox-materials>span{min-width:42px;font-size:11px;gap:5px}
  .mobile-layout .lobby-grid{gap:16px}
  .mobile-layout .lobby .play-panel{padding:12px}
  .mobile-layout .lobby-intro{width:calc(51% - 12px)}
  .mobile-layout .lobby h1{font-size:24px}
  .mobile-layout .sandbox-feedback{max-width:calc(100% - 330px)}
}
@media(max-width:680px){
  .mobile-layout .sandbox-toolbelt{gap:3px}.mobile-layout .sandbox-toolbelt button{min-width:44px;width:44px;min-height:44px}
  .mobile-layout .sandbox-context{max-width:156px}
  .mobile-layout .mobile-toolbar{right:calc(var(--safe-right) + 82px);gap:4px}
  .mobile-layout .hud #minimap{width:72px;height:72px}
  .mobile-layout .hud .performance-status{top:calc(var(--safe-top) + 77px)}
  .mobile-layout .lobby #map-options{grid-template-columns:1fr;gap:6px}
  .mobile-layout .lobby #map-options .map-choice{display:grid;grid-template-columns:65px 1fr;min-height:48px;height:48px;align-items:center;padding:0 4px 0 0;border-radius:8px}
  .mobile-layout .map-image{grid-row:1;grid-column:1;width:65px;height:46px;min-height:46px;margin:0}
  .mobile-layout .map-title{grid-row:1;grid-column:2;padding:0 9px;font-size:11px}
  .mobile-layout .map-check{left:5px;right:auto;top:5px;width:18px;height:18px;min-height:18px;font-size:11px}
  .mobile-layout #mobile-look-hint{max-width:210px;font-size:9px}
}
@media(max-height:360px) and (orientation:landscape){
  .mobile-layout .joystick{width:102px;height:102px;left:calc(var(--safe-left) + 30px);bottom:calc(var(--safe-bottom) + 19px)}
  .mobile-layout .joystick span{width:42px;height:42px}
  .mobile-layout #mobile-sprint{bottom:calc(var(--safe-bottom) + 134px);left:calc(var(--safe-left) + 62px);height:44px}
  .mobile-layout .sandbox-context{bottom:calc(var(--safe-bottom) + 147px)}
  .mobile-layout .lobby-header{height:48px}.mobile-layout .lobby-content{padding-top:12px}
  .mobile-layout .lobby .play-panel{margin-top:-80px}
  .mobile-layout .lobby #lobby-form{gap:7px}
  .mobile-layout .mobile-menu-grid button{min-height:52px}
}

/* Swim controls occupy the jump slot without covering fire or interaction. */
.mobile-layout .hud[data-swimming=true] #jump{visibility:hidden}
.mobile-layout .hud[data-swimming=true] .sandbox-flight{right:var(--safe-right);bottom:calc(var(--safe-bottom) + 12px);gap:8px}
.mobile-layout .hud[data-swimming=true] .sandbox-flight button{width:56px;height:50px;min-height:50px;border-radius:16px}
