#mobileToolbar,#rotateHint,#orientationStatus{display:none}#mobileMenu{width:min(580px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:18px;background:#173c34;color:#fff3cf;border:1px solid #b7bf90;border-radius:16px;overflow:auto}#mobileMenu::backdrop{background:#102b27b3}#mobileMenu>header{display:flex;justify-content:space-between;align-items:center;position:sticky;top:-18px;background:#173c34;z-index:1;padding:8px 0}#mobileMenu h2{font-size:18px;margin:0}#closeMobileMenu{font-size:26px;width:44px;height:44px;border:0;background:transparent;color:#fff3cf}#mobileActions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}#mobileActions button{min-height:48px;padding:10px 6px;border:1px solid #8ea38a;background:#285549;color:#fff3cf;border-radius:10px;font-size:13px}#mobileActions button:disabled{opacity:.45}
body.mobile-play #mobileToolbar{display:flex;position:fixed;right:max(10px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));gap:6px;z-index:100}#mobileToolbar button{min-height:44px;padding:8px 12px;border:1px solid #a1b19b;background:#193f35ed;color:#fff1cc;border-radius:10px;font-size:12px;touch-action:manipulation}body.mobile-play .mmo-top{display:none}body.mobile-play .mmo-bar{left:auto;right:max(12px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));transform:none;width:auto;max-width:44vw;margin:0;padding:0;background:none;border:0;box-shadow:none;z-index:60}body.mobile-play #mmoInteract{min-height:52px;min-width:0;max-width:100%;font-size:13px;padding:10px 16px;background:#e3c58b;color:#1c3f34;touch-action:manipulation}body.mobile-play .mmo-pad{left:max(12px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom));grid-template-columns:repeat(3,48px);gap:5px;z-index:60}body.mobile-play .mmo-pad button{height:48px;font-size:24px}body.mobile-play .mmo-credit{bottom:0;font-size:8px;max-width:100%;pointer-events:none}body.mobile-play .game-window{position:fixed!important;left:50%!important;top:calc(max(8px,env(safe-area-inset-top)) + 50px)!important;right:auto!important;bottom:auto!important;transform:translateX(-50%);width:min(420px,calc(100vw - 28px))!important;max-width:calc(100vw - 28px)!important;max-height:calc(var(--play-visible-height,100dvh) - 78px)!important;overflow:auto;overscroll-behavior:contain;margin:0!important;padding:12px!important;z-index:150!important;box-sizing:border-box;background:#193f35f5}body.mobile-play .game-window .window-handle{position:sticky;top:-12px;background:#193f35;z-index:2;min-height:44px;font-size:13px!important;cursor:default}body.mobile-play .window-handle button{min-width:44px;min-height:44px;font-size:26px}body.mobile-play .window-content{max-height:none;overflow:visible}body.mobile-play #mmoHud{flex-wrap:wrap}body.mobile-play #chatLog{height:clamp(70px,28dvh,190px)}body.mobile-play #chatForm input{font-size:16px;min-height:44px}body.mobile-play #chatForm button{min-height:44px;min-width:54px}body.mobile-play #windowDock{top:62px;right:max(12px,env(safe-area-inset-right));max-height:calc(var(--play-visible-height,100dvh) - 80px);overflow:auto;width:240px;box-sizing:border-box}body.mobile-play #windowDock button{min-height:44px}body.mobile-play dialog{box-sizing:border-box;max-height:calc(var(--play-visible-height,100dvh) - 20px);max-width:calc(100vw - 20px);overflow:auto;overscroll-behavior:contain}body.mobile-play dialog input,body.mobile-play dialog select{font-size:16px}body.mobile-play #modal,body.mobile-play #legacyPanel,body.mobile-play #welcome{padding:18px;width:min(680px,calc(100vw - 20px))}body.mobile-play #modal>.close,body.mobile-play #closeLegacy{position:sticky;top:0;z-index:8;min-height:44px;min-width:44px}body.mobile-play.mobile-panel-open .mmo-pad,body.mobile-play.mobile-panel-open .mmo-bar{visibility:hidden}body.mobile-play #rotateHint:not([hidden]){display:flex;position:fixed;left:12px;right:12px;top:66px;gap:8px;align-items:center;z-index:110;padding:10px 12px;border-radius:12px;background:#fff3d9;color:#27483d;box-shadow:0 5px 20px #183f3440;font-size:12px;line-height:1.5}#rotateHint button{min-width:40px;min-height:40px;border:0;background:transparent;color:inherit;font-size:24px}body.mobile-play #orientationStatus:not(:empty){display:block;position:fixed;left:50%;bottom:20px;transform:translateX(-50%);width:min(380px,85vw);z-index:1200;padding:12px;border-radius:10px;background:#fff3d9;color:#27483d;font-size:13px;box-shadow:0 6px 20px #12352e44}body.mobile-play .mmo-toast{top:65px;z-index:120}
@media(max-width:420px){#mobileToolbar button{padding:8px;font-size:11px}#mobileActions{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(orientation:landscape) and (max-height:500px){body.mobile-play #mobileMenu{width:min(620px,calc(100vw - 30px))}#mobileActions{grid-template-columns:repeat(4,minmax(0,1fr))}body.mobile-play #miniCanvas{max-height:135px}body.mobile-play .mini-keys button{min-height:44px}body.mobile-play #rotateHint{display:none}}
