body:is(.modern-playing,.modern-loading){margin:0;overflow:hidden;background:#edf0dc}body:is(.modern-playing,.modern-loading) .shell{max-width:none;margin:0;padding:0}body:is(.modern-playing,.modern-loading) #gameRoot{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;border:0;border-radius:0;transform:none!important;overflow:hidden;background:#edf0dc}body:is(.modern-playing,.modern-loading) #gameRoot>canvas#world,body:is(.modern-playing,.modern-loading) #gameRoot>.player-status,body:is(.modern-playing,.modern-loading) #beginnerTracker,body:is(.modern-playing,.modern-loading) #bottomControls,body:is(.modern-playing,.modern-loading) .martial-skills,body:is(.modern-playing,.modern-loading) #floatingLog,body:is(.modern-playing,.modern-loading) #publicChat,body:is(.modern-playing,.modern-loading) #dialog,body:is(.modern-playing,.modern-loading) #gameWindows,body:is(.modern-playing,.modern-loading) #materialHelpPanel,body:is(.modern-playing,.modern-loading) #clientAssistDialog,body:is(.modern-playing,.modern-loading) .journal,body:is(.modern-playing,.modern-loading) .topbar,body:is(.modern-playing,.modern-loading) .prompt,body:is(.modern-playing,.modern-loading) .minimap{display:none!important}body:is(.modern-playing,.modern-loading) #modal{display:none!important}#game{touch-action:none;outline:none;display:block}#accessibleControls{position:fixed;inset:0;pointer-events:none;z-index:4}#accessibleControls button{position:absolute;pointer-events:auto;opacity:0;border:0;margin:0;padding:0}#accessibleControls button:focus-visible{opacity:1;background:#e9d69a22;outline:2px solid #f8e3a7;color:transparent;border-radius:6px}.modern-sr{position:fixed;left:-10000px}#modernLoading{position:absolute;inset:0;display:grid;place-items:center;background:#edf0dc;color:#355a47;font:20px serif;z-index:10}body:is(.modern-playing,.modern-loading) #networkStatus{z-index:30;inset:auto;top:10px;left:50%;right:auto;bottom:auto;width:max-content;max-width:min(360px,calc(100% - 32px));height:auto;min-height:0;transform:translateX(-50%)}body:is(.modern-playing,.modern-loading) #teamRoster,body:is(.modern-playing,.modern-loading) #teamInvitePanel{z-index:20}body.modern-account-modal #modal:not([hidden]){display:grid!important;z-index:50}body:is(.modern-playing,.modern-loading) #guildWarHUD{z-index:10}

body.modern-playing #clientAssistBossDialog,body.modern-playing #journeyHistoryDialog{display:none!important}

body:is(.modern-playing,.modern-loading) #expeditionMapButton,body:is(.modern-playing,.modern-loading) #expeditionUI{display:none!important}

#modernLoading section{width:min(320px,calc(100vw - 40px));height:auto;max-height:190px;padding:18px 22px;background:#f8f3e5;border:1px solid #bdb28d;border-radius:9px;box-shadow:0 5px 18px #354e301a;text-align:center}#modernLoading progress{width:100%;height:18px;accent-color:#557b54}#modernLoading h2{font-size:18px;margin:0 0 12px}#modernLoading p{font-size:13px;margin:10px 0 0;color:#647d63}

/* Keep canvas ownership through server UI refreshes and asynchronous map swaps. */
#gameRoot[data-modern-renderer="1"]>canvas#world,#gameRoot[data-modern-renderer="1"]>.player-status,#gameRoot[data-modern-renderer="1"] #bottomControls,#gameRoot[data-modern-renderer="1"] #beginnerTracker,#gameRoot[data-modern-renderer="1"] .martial-skills{display:none!important}
#modernSceneLoading{position:fixed;inset:0;z-index:30000;display:grid;place-items:center;background:#edf0dc;color:#486651;font:600 22px "Songti SC",serif;pointer-events:all}

body.modern-loading:not(:has(#modernLoading))::after{content:"载入中…";position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:30001;max-width:calc(100vw - 40px);padding:18px 34px;border:1px solid #bdb28d;border-radius:9px;background:#f8f3e5;color:#486651;box-shadow:0 5px 18px #354e301a}

body:is(.modern-playing,.modern-loading) #guildWarNotice{display:none!important}

/* Visible canvas controls keep normal selection cursors in menus. */
#accessibleControls button{cursor:pointer;touch-action:manipulation;user-select:none}
