/* Application shell. Desktop docking and the pixel renderer retain their existing contracts. */
.input-pressed{filter:brightness(1.3)!important;box-shadow:inset 0 0 0 2px #d8bf83!important}#appStatus{position:absolute;top:6px;left:50%;transform:translateX(-50%);z-index:30;background:#142932ed;color:#e3d6b2;border:1px solid #71836a;padding:4px 8px;font:12px monospace;pointer-events:none}#appScreen{position:fixed;inset:0;z-index:70;background:#101e28;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}#appScreen[hidden]{display:none}#appScreen header{display:flex;gap:15px;align-items:center;padding:6px 10px}#appScreen h2{font-size:16px;margin:0;color:#d4ba80}#appScreen button{min-height:44px;min-width:72px;background:#203c40;color:#ece0bb;border:1px solid #788b75;border-radius:4px}#appScreen iframe{flex:1;width:100%;border:0;min-height:0}.app-screen-open .shell{visibility:hidden}#touchDragPreview{position:fixed;top:0;left:0;z-index:100;pointer-events:none;background:#14352ae8;border:2px solid #a7d3a0;border-radius:4px;padding:4px}#touchDragPreview[data-valid=false]{border-color:#d9846c}#touchDragPreview img{width:36px;height:36px;image-rendering:pixelated}.offline-screen{background:#031426;color:#e7dab9;font:17px/1.5 system-ui;display:grid;place-content:center;min-height:100dvh;margin:0}.offline-screen main{max-width:340px;padding:30px}.offline-screen a{color:#a3d2c1;display:block;padding:12px;border:1px solid #829474;text-align:center}
@media(max-width:900px),(hover:none) and (pointer:coarse) and (max-width:1200px){
 html:has(body.mobile-layout.in-realm){height:var(--app-height,100dvh);overflow:hidden;overscroll-behavior:none}body.mobile-layout.in-realm{position:relative;inset:auto;height:var(--app-height,100dvh);min-height:0;max-height:var(--app-height,100dvh);overflow:hidden;overscroll-behavior:none}body.mobile-layout.in-realm.app-keyboard{position:fixed;left:0;right:0;top:var(--app-top,0px);width:100%}.mobile-layout.in-realm .shell{height:100%;min-height:0;overflow:hidden}.mobile-layout.in-realm #game{min-height:0;height:calc(var(--app-height,100dvh) - var(--head-height) - var(--safe-top) - var(--nav-height) - var(--safe-bottom));overflow:hidden}.mobile-layout .viewport-column{min-height:0}.mobile-layout .world-wrap{min-height:0}.mobile-layout .mobile-navigation{bottom:0;padding-bottom:env(safe-area-inset-bottom)}
 .mobile-layout #world,.mobile-layout .joystick,.mobile-layout #inventory [data-item],.mobile-layout #equipment [data-item]{touch-action:none}.mobile-layout #game img,.mobile-layout #game canvas,.mobile-layout #inventory,.mobile-layout #equipment,.mobile-layout .mobile-actions,.mobile-layout .mobile-navigation{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mobile-layout #game img{-webkit-user-drag:none}.mobile-layout input,.mobile-layout textarea{font-size:16px;user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}.mobile-layout .sidebar{overscroll-behavior:contain;touch-action:pan-y}.mobile-layout button{touch-action:manipulation}.mobile-layout .topbar{padding-top:env(safe-area-inset-top);min-height:calc(44px + env(safe-area-inset-top))}.mobile-layout.installed-app .eyebrow,.mobile-layout.installed-app .libera-brand{display:none}.mobile-layout.installed-app .top-actions{width:100%;justify-content:flex-end}.mobile-layout.app-keyboard .mobile-sheet{max-height:calc(var(--app-height) - var(--head-height) - var(--safe-top) - var(--nav-height) - 8px)}
}

@media(prefers-reduced-motion:reduce){.input-pressed{transition:none!important}}
/* Checkpoint B: thumb controls below the scene; compact panels dock above them. */
body.mobile-layout .mobile-actions{top:auto!important;bottom:8px!important;right:max(7px,env(safe-area-inset-right))!important;width:104px!important;max-height:calc(100% - 12px)!important;display:flex!important;flex-direction:column;overflow:auto;gap:5px!important}
#primaryHotkeys{display:contents}
body.mobile-layout #primaryHotkeys{display:grid;grid-template-columns:repeat(2,46px);gap:5px;flex:none;order:2}
body.mobile-layout .mobile-actions #primaryHotkeys button,body.mobile-layout .mobile-actions .custom-hotkey{width:46px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:2px!important;border-radius:4px;position:relative!important;inset:auto!important;margin:0!important}
body.mobile-layout #primaryHotkeys #editHotkeys{grid-column:1 / -1;width:97px!important;font-size:12px}
body.mobile-layout .mobile-actions #mobileAttack>small,body.mobile-layout .mobile-actions #mobileHeal>small,body.mobile-layout .mobile-actions #mobileInteract>small{display:none}body.mobile-layout .mobile-actions #mobileChase{font-size:0!important}body.mobile-layout .mobile-actions #mobileChase::before{content:'↝';font-size:25px}body.mobile-layout .mobile-actions button>span{font-size:24px!important}
body.mobile-layout #customHotkeys{display:grid;grid-template-columns:repeat(2,46px);gap:5px;order:1;max-height:28dvh;overflow:auto;overscroll-behavior:contain;flex:1 1 auto;min-height:0;touch-action:pan-y}body.mobile-layout #customHotkeys .custom-hotkey>span{font-size:23px!important}body.mobile-layout #customHotkeys small{font-size:10px}body.mobile-layout #customHotkeys img{width:28px;height:28px}
body.mobile-layout .world-label{display:none}body.mobile-layout .joy-label{background:none;border:0;box-shadow:none;font:10px/1.2 monospace;text-transform:none;letter-spacing:0;max-width:134px;text-align:center;bottom:-14px;color:#c1c6b3;white-space:normal}
body.mobile-layout.mobile-sheet-compact .mobile-sheet{left:max(8px,env(safe-area-inset-left));right:120px;bottom:calc(var(--nav-height) + var(--safe-bottom) + 148px);height:clamp(96px,calc((var(--app-height,100dvh) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-top) - var(--safe-bottom))*.5 - 165px),190px);max-height:none;transition:none;min-height:0}
body.mobile-layout.mobile-sheet-compact .mobile-sheet-header{flex-wrap:nowrap;min-height:44px}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header>div{flex:1 1 auto;min-width:0}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header h2{font-size:11px}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header button{min-width:44px!important;padding:2px!important}body.mobile-layout.mobile-sheet-compact #expandMobileSheet{font-size:0!important;min-width:44px!important}body.mobile-layout.mobile-sheet-compact #expandMobileSheet::before{content:'↗';font-size:22px}
body.mobile-layout .equipped-name{display:block;font-size:10px}body.mobile-layout.mobile-sheet-compact .equipped-name{display:none}body.mobile-layout.mobile-sheet-compact #equipment{gap:4px}body.mobile-layout.mobile-sheet-compact .slot{min-height:60px;position:relative;padding:3px}body.mobile-layout.mobile-sheet-compact .slot .item-icon{width:36px;height:36px}body.mobile-layout.mobile-sheet-compact .slot>span{font-size:9px}body.mobile-layout.mobile-sheet-compact .slot .item-stat{font-size:9px;max-width:100%}body.mobile-layout.mobile-sheet-compact .slot .empty-slot-symbol{font-size:25px}
body.mobile-layout.mobile-sheet-compact[data-mobile-panel=party] .party-member{display:grid;grid-template-columns:1fr auto;gap:2px;min-height:58px;margin:3px 0}body.mobile-layout.mobile-sheet-compact[data-mobile-panel=party] .party-member strong{font-size:12px}body.mobile-layout.mobile-sheet-compact[data-mobile-panel=party] .party-meter{grid-column:1/-1;height:5px}body.mobile-layout.mobile-sheet-compact[data-mobile-panel=party] .party-member small{font-size:10px}body.mobile-layout.mobile-sheet-compact[data-mobile-panel=party] .party-member>small:last-child{grid-column:1/-1}
@media(orientation:landscape) and (max-height:600px){body.mobile-layout{--hud-height:30px;--nav-height:46px}body.mobile-layout .mobile-vitals{padding:2px 10px}body.mobile-layout .mobile-vitals>div:first-child{display:flex;gap:8px;align-items:center}body.mobile-layout .mobile-vitals>div:first-child>span{font-size:10px}body.mobile-layout .mobile-meter{height:24px}body.mobile-layout .mobile-navigation button{min-height:44px;flex-direction:row;gap:5px}body.mobile-layout .mobile-actions{width:154px!important;bottom:6px!important}body.mobile-layout #primaryHotkeys,body.mobile-layout #customHotkeys{grid-template-columns:repeat(3,46px)}body.mobile-layout #primaryHotkeys #editHotkeys{grid-column:auto;width:46px!important;font-size:11px}body.mobile-layout #customHotkeys{max-height:calc(var(--app-height) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-top) - var(--safe-bottom) - 112px)}body.mobile-layout.mobile-sheet-compact .mobile-sheet{left:140px;right:auto;width:240px;bottom:calc(var(--nav-height) + var(--safe-bottom) + 6px);height:calc(var(--app-height) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-top) - var(--safe-bottom) - 12px);max-height:230px}body.mobile-layout .joystick{width:96px;height:96px;bottom:20px}body.mobile-layout .party-hud{left:8px;top:6px;max-width:128px}body.mobile-layout #hotkeyEditor,body.mobile-layout #mobileHealMenu{right:170px;bottom:6px}body.mobile-layout .zoom-controls{right:170px}}

body.mobile-layout .mobile-actions{width:108px!important;overflow-x:hidden!important;scrollbar-width:none}body.mobile-layout #customHotkeys{scrollbar-width:none}@media(orientation:landscape) and (max-height:600px){body.mobile-layout .mobile-actions{width:154px!important}}

#fillAmmoSlot{display:block;min-height:44px;width:100%;margin-top:5px;border:1px solid #798d72;border-radius:3px;background:#26423e;color:#e5d8b4;font:12px monospace}.mobile-layout .paperdoll{display:block}.mobile-layout #equipment{width:100%}

#accountMenu{position:fixed;z-index:80;top:calc(env(safe-area-inset-top) + 48px);right:max(8px,env(safe-area-inset-right));width:240px;max-width:calc(100% - 16px);max-height:calc(var(--app-height,100dvh) - env(safe-area-inset-top) - 65px);overflow:auto;padding:8px;background:#172f35;border:1px solid #9a9d78;border-radius:5px;box-shadow:0 4px 12px #09151b88;color:#e9dcb9}#accountMenu strong{display:block;padding:5px;font:13px monospace;overflow-wrap:anywhere}#accountMenu button,#accountMenu a{display:block;min-height:44px;width:100%;margin:4px 0;padding:10px;text-align:left;background:#29463f;border:1px solid #6f856c;border-radius:3px;color:#f0dfb8;text-decoration:none;font:13px monospace}#accountMenu button:disabled{opacity:.5}
body.mobile-layout #logout{display:none}body.mobile-layout #accountOptions{min-height:44px;min-width:58px;font-size:11px}body.mobile-layout #changeOutfit{font-size:0;min-width:52px}body.mobile-layout #changeOutfit::after{content:'Outfit';font-size:11px}
/* Read-only all-floor atlas. Touches never reach the world beneath it. */
#worldAtlas{width:min(960px,96vw);height:min(720px,90dvh);padding:12px;color:#e4dac4;background:#101b23;border:1px solid #9d8550;border-radius:8px;box-sizing:border-box;overflow:hidden}#worldAtlas[open]{display:flex;flex-direction:column;gap:8px}#worldAtlas::backdrop{background:#020609c9}#worldAtlas header,#worldAtlas nav{display:flex;gap:6px;align-items:center;flex-wrap:wrap}#atlasClose{margin-left:auto}#worldAtlas button{min-height:44px;min-width:44px}#atlasFloor{min-width:80px;text-align:center;color:#e5c87f}#atlasCanvas{width:100%;flex:1;min-height:120px;touch-action:none;image-rendering:pixelated}#worldAtlas p{font-size:11px;margin:0;color:#9eafae}.atlas-open #gameCanvas{pointer-events:none}
@media(max-height:480px){#worldAtlas{height:94dvh;padding:6px;gap:4px}#worldAtlas header{position:absolute;right:10px;top:6px}#worldAtlas header strong{display:none}#worldAtlas nav{padding-right:60px}#worldAtlas button{min-height:38px}#worldAtlas p{font-size:10px}}

body.mobile-layout.in-realm #changeOutfit{font-size:0!important}body.mobile-layout.in-realm #changeOutfit::after{font-size:11px!important}
#worldAtlas button{background:#1a2b34;color:#dfd4bb;border:1px solid #526063;border-radius:5px;font:inherit;font-size:13px;padding:7px 10px}#worldAtlas button:disabled{opacity:.4}#worldAtlas button:active{background:#344a50}
@media(orientation:landscape) and (max-height:600px){body.mobile-layout .party-open{left:8px;top:6px}}
/* Screen/combat polish: one viewport source, one reservation for the dock. */
#appViewportProbe{position:fixed;left:0;top:0;width:0;height:100vh;height:100dvh;visibility:hidden;pointer-events:none;z-index:-1}
#connection[data-state=connecting],#connection[data-state=reconnecting]{color:#e2bd75}#connection[data-state=disconnected]{color:#e09b8b}
@media(max-width:900px),(hover:none) and (pointer:coarse) and (max-width:1200px){
 body.mobile-layout{--nav-height:56px;--hud-height:36px}
 body.mobile-layout.in-realm .shell{display:flex;flex-direction:column;height:100%;padding:0!important}
 body.mobile-layout.in-realm .topbar{flex:none}
 body.mobile-layout.in-realm #game{height:auto;flex:1 1 0;min-height:0;margin-bottom:calc(var(--nav-height) + var(--safe-bottom));align-items:stretch}
 body.mobile-layout .mobile-navigation{padding:4px max(4px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left))}
 body.mobile-layout .mobile-navigation button{min-height:44px}
 body.mobile-layout .mobile-vitals{padding-top:4px;padding-bottom:4px}
 body.mobile-layout #connection{font:10px/1.1 monospace;max-width:90px;min-width:0;padding:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.mobile-layout #connection::before{content:'●';font-size:8px;margin-right:4px}
 body.mobile-layout .mobile-actions{width:120px!important}
 body.mobile-layout #primaryHotkeys{grid-template-columns:46px 58px;grid-template-rows:44px 44px 55px;justify-content:end;align-items:end}
 body.mobile-layout #primaryHotkeys #mobileInteract{grid-column:1;grid-row:1}
 body.mobile-layout #primaryHotkeys #mobileChase{grid-column:2;grid-row:1;justify-self:end}
 body.mobile-layout #primaryHotkeys #mobileHeal{grid-column:1;grid-row:2}
 body.mobile-layout #primaryHotkeys #editHotkeys{grid-column:1;grid-row:3;width:46px!important;font-size:10px}
 body.mobile-layout .mobile-actions #primaryHotkeys #mobileAttack{grid-column:2;grid-row:2 / 4;align-self:end;justify-self:end;width:58px!important;height:55px!important;border-color:#d5ae73;border-radius:7px;background:linear-gradient(145deg,#755239,#332f2b);box-shadow:inset 0 1px #f6db9b44,0 2px 4px #07131b80}
 body.mobile-layout #mobileAttack>span{font-family:Georgia,serif;font-size:32px!important;line-height:1;color:#f5d8a0}
 body.mobile-layout #mobileAttack::after{content:'';position:absolute;left:3px;bottom:3px;height:3px;width:calc(var(--cooldown-ready,100%)*.88);max-width:calc(100% - 6px);background:#e6c185;pointer-events:none}
 body.mobile-layout #mobileAttack[data-state=attacking],body.mobile-layout #mobileAttack[data-state=approaching]{border-color:#e69367;background:linear-gradient(145deg,#8c563b,#422f2c)}
 body.mobile-layout #mobileAttack[data-state=approaching]::before{content:'↝';position:absolute;right:2px;top:0;font:11px monospace;color:#e4d0a4}
 body.mobile-layout #mobileAttack[data-state=unavailable]{filter:saturate(.4);opacity:.6}
 body.mobile-layout #mobileAttack.input-pressed{transform:translateY(1px) scale(.96)}
 body.mobile-layout.mobile-sheet-compact .mobile-sheet{right:134px}
 body.mobile-layout .party-hud.party-collapsed{width:auto;max-width:100px;min-height:0;background:transparent;border:0;overflow:visible}
 body.mobile-layout .party-hud.party-collapsed #partyHudHeading{width:auto;min-width:44px;min-height:44px;padding:0 7px;font:12px monospace;line-height:1;border-radius:5px;background:#14272ca8;box-shadow:none}
 body.mobile-layout .party-hud.party-collapsed #partyHudMembers,body.mobile-layout .party-hud.party-collapsed #partyBoss{display:none}
 body.mobile-layout .party-hud.party-warning #partyHudHeading::after{content:'•';color:#f39178;margin-left:3px}
 body.mobile-layout .party-hud:not(.party-collapsed){width:156px;max-width:156px;max-height:34%;overflow:auto}
 body.mobile-layout .party-hud .party-member{padding:3px;gap:2px;min-height:44px}
}
@media(orientation:landscape) and (max-height:600px){
 body.mobile-layout{--nav-height:46px;--hud-height:30px}
 body.mobile-layout .mobile-navigation{padding-top:1px;padding-bottom:env(safe-area-inset-bottom)}
 body.mobile-layout .mobile-vitals{padding-top:2px;padding-bottom:2px}
 body.mobile-layout .mobile-actions{width:170px!important}
 body.mobile-layout #primaryHotkeys{grid-template-columns:46px 46px 58px;grid-template-rows:44px 55px}
 body.mobile-layout #primaryHotkeys #mobileInteract{grid-column:1;grid-row:1}
 body.mobile-layout #primaryHotkeys #mobileChase{grid-column:2;grid-row:1}
 body.mobile-layout #primaryHotkeys #editHotkeys{grid-column:3;grid-row:1;justify-self:end}
 body.mobile-layout #primaryHotkeys #mobileHeal{grid-column:2;grid-row:2}
 body.mobile-layout .mobile-actions #primaryHotkeys #mobileAttack{grid-column:3;grid-row:2}
 body.mobile-layout #customHotkeys{grid-template-columns:repeat(3,46px)}
 body.mobile-layout .zoom-controls{right:184px}
 body.mobile-layout #hotkeyEditor,body.mobile-layout #mobileHealMenu{right:184px}
 body.mobile-layout.mobile-sheet-compact .mobile-sheet{right:auto}
 body.mobile-layout .party-hud:not(.party-collapsed){max-width:128px}
}
/* Small-phone HUD: the dock participates in layout rather than reserving an
   independent fixed-bottom rectangle. The safe-area is paid exactly once. */
@media(max-width:900px),(hover:none) and (pointer:coarse) and (max-width:1200px){
 body.mobile-layout{--head-height:44px;--hud-height:0px;--nav-height:48px}
 body.mobile-layout.in-realm #game{margin-bottom:0;gap:0}
 body.mobile-layout.in-realm #mobileNavigation{position:relative;inset:auto;flex:0 0 auto;width:100%;height:calc(48px + var(--safe-bottom));padding:2px max(4px,env(safe-area-inset-right)) calc(2px + var(--safe-bottom)) max(4px,env(safe-area-inset-left));margin:0;border-radius:0;background:#172a30}
 body.mobile-layout.in-realm .topbar{height:calc(44px + var(--safe-top));min-height:calc(44px + var(--safe-top));padding:var(--safe-top) max(4px,env(safe-area-inset-right)) 0 max(4px,env(safe-area-inset-left));gap:4px}
 body.mobile-layout.in-realm .topbar .libera-brand,body.mobile-layout.in-realm .topbar .highscores-link{display:none}
 body.mobile-layout.in-realm .topbar .top-actions{order:2;flex:0 0 auto;width:auto;gap:0}
 body.mobile-layout.in-realm #mobileVitals{order:1;flex:1;min-width:0;display:grid;grid-template-columns:minmax(45px,1fr) minmax(55px,84px);grid-template-rows:18px 18px;gap:2px 5px;height:40px;padding:1px 3px;background:none;border:0}
 body.mobile-layout.in-realm #mobileVitals>div:first-child{grid-row:1/3;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:1px;min-width:0;width:auto}
 body.mobile-layout.in-realm #mobileVitals strong{max-width:100%;font:11px/1.1 monospace}
 body.mobile-layout.in-realm #mobileVitals>div:first-child>span{font:9px/1.1 monospace;white-space:nowrap}
 body.mobile-layout.in-realm #mobileVitals .mobile-meter{grid-column:2;width:100%;min-width:0;height:18px;border-radius:2px}
 body.mobile-layout.in-realm #connection{font-size:0;width:16px;max-width:16px;padding:0;overflow:visible}
 body.mobile-layout.in-realm #connection::before{font-size:9px;margin:0}
 body.mobile-layout.in-realm #connection:not(.connected)::before{content:'◌'}
 body.mobile-layout.in-realm #changeOutfit,body.mobile-layout.in-realm #accountOptions{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;background:none;font-size:0!important}
 body.mobile-layout.in-realm #changeOutfit::after{content:'♙';font:24px Georgia!important}
 body.mobile-layout.in-realm #accountOptions::after{content:'☰';font:22px monospace}
 body.mobile-layout .mobile-actions{width:60px!important;max-height:calc(100% - 38px)!important;padding:2px!important;align-items:center;gap:4px!important}
 body.mobile-layout #primaryHotkeys{display:flex;flex-direction:column;align-items:center;gap:4px;order:1}
 body.mobile-layout .mobile-actions #primaryHotkeys button{grid-area:auto!important;width:44px!important;height:44px!important}
 body.mobile-layout .mobile-actions #primaryHotkeys #mobileAttack{width:56px!important;height:56px!important;align-self:center}
 body.mobile-layout #primaryHotkeys #editHotkeys{width:44px!important;height:44px!important;border:0;background:none;font:22px/1 monospace!important;color:#b1c2b7;box-shadow:none}
 body.mobile-layout #customHotkeys{grid-template-columns:46px;order:2;max-height:22dvh;flex:0 1 auto}
 body.mobile-layout #customHotkeys:empty{display:none}
 body.mobile-layout #mobileHeal>span{color:#eca2a3}
 body.mobile-layout #mobileHealMenu,body.mobile-layout #hotkeyEditor{right:72px}
 body.mobile-layout .zoom-controls{right:76px;top:26px;padding:0;gap:2px;border:0;background:none;box-shadow:none}
 body.mobile-layout .zoom-controls #zoomLevel{display:none}
 body.mobile-layout .zoom-controls button{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;background:#13272c70;border:0;opacity:.8}
 /* Do not hide the hitbox, its pointer capture, or the area caption. */
 body.mobile-layout .joystick{background:transparent;border-color:transparent;box-shadow:none;transition:background .16s,border-color .16s}
 body.mobile-layout .joystick>.joy-axis,body.mobile-layout .joystick>.joystick-thumb{opacity:0;transition:opacity .16s;pointer-events:none}
 body.mobile-layout .joystick.engaged,body.mobile-layout .joystick:focus-visible{background:#223d4280;border-color:#a6b89970}
 body.mobile-layout .joystick.engaged>.joy-axis,body.mobile-layout .joystick.engaged>.joystick-thumb,body.mobile-layout .joystick:focus-visible>.joy-axis,body.mobile-layout .joystick:focus-visible>.joystick-thumb{opacity:.7}
 body.mobile-layout #questTracker{top:5px;left:7px;right:72px;max-width:calc(100% - 80px);margin:0;padding:2px 3px;border:0;border-radius:0;background:#10202780;box-shadow:none;font:10px/1.25 monospace;pointer-events:none;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:16px}
 body.mobile-layout #questTracker>span{display:inline;font:inherit}
 body.mobile-layout #questTracker .quest-tracker-next{display:none}
 body.mobile-layout .party-hud,body.mobile-layout .party-open{top:28px;left:7px}
 body.mobile-layout .party-hud:not(.party-collapsed){width:128px;max-width:128px;border:0;background:#12272cbb}
 body.mobile-layout .party-hud #partyHudHeading{min-height:44px;font:10px monospace;padding:2px}
 body.mobile-layout .party-hud .party-member{margin:2px 0;border:0;border-radius:2px;min-height:44px}
 body.mobile-layout .party-hud .party-member>small:last-child{display:none}
 body.mobile-layout .party-hud .party-member strong{font-size:10px}
 body.mobile-layout.mobile-sheet-compact .mobile-sheet{right:76px;bottom:calc(var(--nav-height) + var(--safe-bottom) + 4px);height:clamp(132px,30dvh,230px)}
 body.mobile-layout.mobile-sheet-compact .mobile-sheet-header{padding:0 2px;gap:0}
 body.mobile-layout.mobile-sheet-compact .mobile-sheet-header>div{flex-basis:0}
 body.mobile-layout.mobile-sheet-compact #minimizeMobileSheet{display:none}
 body.mobile-layout #worldAtlas{padding:5px;gap:4px;display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:44px minmax(120px,1fr) auto}
 body.mobile-layout #worldAtlas:not([open]){display:none}
 body.mobile-layout #worldAtlas header{display:contents}
 body.mobile-layout #worldAtlas header strong{display:none}
 body.mobile-layout #atlasClose{grid-column:2;grid-row:1;min-width:44px;width:44px;padding:0;font-size:0}
 body.mobile-layout #atlasClose::after{content:'×';font:23px monospace}
 body.mobile-layout #worldAtlas nav{grid-column:1;grid-row:1;display:flex;flex-wrap:nowrap;gap:2px;overflow-x:auto;padding:0;touch-action:pan-x}
 body.mobile-layout #worldAtlas nav>*{flex:0 0 auto;font:11px monospace}
 body.mobile-layout #worldAtlas button{padding:2px 5px;min-height:44px}
 body.mobile-layout #atlasFloor{min-width:0}
 body.mobile-layout #worldAtlas .atlas-floor-label{display:none}
 body.mobile-layout #worldAtlas nav button{min-width:44px}
 body.mobile-layout #atlasCanvas{grid-column:1/3;min-height:0;height:100%}
 body.mobile-layout #worldAtlas p{grid-column:1/3;font:9px/1.2 monospace}
}
@media(orientation:landscape) and (max-height:600px){
 body.mobile-layout .mobile-actions{max-height:calc(100% - 8px)!important;bottom:3px!important;overflow:auto!important}
 body.mobile-layout.mobile-sheet-compact .mobile-sheet{left:140px;right:auto;width:240px;max-height:calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 100px)}
 body.mobile-layout #customHotkeys{max-height:80px;flex-shrink:0}
}

/* The dock is in normal flow at the bottom of the layout viewport. Its
   background fills the home-indicator inset; the tab buttons stay above it. */
@media(max-width:900px),(hover:none) and (pointer:coarse) and (max-width:1200px){
 body.mobile-layout.in-realm{--dock-content:48px;--dock-height:calc(var(--dock-content) + var(--safe-bottom))}
 body.mobile-layout.in-realm #mobileNavigation{height:var(--dock-height);padding:0 max(3px,env(safe-area-inset-right)) var(--safe-bottom) max(3px,env(safe-area-inset-left));align-items:stretch;box-shadow:none;background:#172a30}
 body.mobile-layout.in-realm #mobileNavigation button{height:100%;align-self:stretch;min-height:44px;margin:0;padding:1px 0 0;border-radius:6px 6px 0 0;gap:2px;background:#20383b}
 body.mobile-layout.in-realm #mobileNavigation button.selected{background:#344b49}
 body.mobile-layout.in-realm .mobile-sheet{bottom:var(--dock-height)}
 body.mobile-layout.in-realm.mobile-sheet-compact .mobile-sheet{bottom:calc(var(--dock-height) + 4px)}
}
@media(orientation:landscape) and (max-height:600px){
 body.mobile-layout.in-realm{--dock-content:44px}
}
#dockDiagPanel{position:fixed;z-index:95;left:8px;right:8px;top:calc(env(safe-area-inset-top) + 52px);bottom:calc(var(--dock-height,80px) + 8px);margin:0;padding:8px;overflow:auto;background:#07141ae6;color:#e7f2d8;border:1px solid #9bb48a;font:11px/1.35 ui-monospace,monospace;white-space:pre-wrap}
#dockDiagCopy{position:fixed;z-index:96;top:calc(env(safe-area-inset-top) + 56px);right:12px;min-height:44px}

/* Explicit flex shell: injected title-bar dock controls remain in the toolbar,
   never become implicit grid rows. Canvas owns all remaining height on WebKit. */
#worldAtlas[open],body.mobile-layout #worldAtlas[open]{display:flex;flex-direction:column;gap:5px;max-height:calc(var(--app-height,100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px)}
#worldAtlas>header,body.mobile-layout #worldAtlas>header{display:flex;position:static;flex:0 0 auto;align-items:center;flex-wrap:nowrap;gap:4px;min-height:40px;max-height:44px;width:100%;touch-action:none}
#worldAtlas>header>nav,body.mobile-layout #worldAtlas>header>nav{display:flex;flex:1;flex-wrap:nowrap;min-width:0;gap:3px;overflow-x:auto;padding:0;align-items:center;touch-action:pan-x}
#worldAtlas #atlasClose,body.mobile-layout #worldAtlas #atlasClose{order:3;flex:0 0 38px;width:38px;min-width:38px;min-height:38px;height:38px;margin:0;padding:0}
#worldAtlas .window-dock,body.mobile-layout #worldAtlas .window-dock{order:4;flex:0 0 32px;width:32px;min-width:32px;height:38px;max-height:38px;min-height:38px;padding:0;align-self:center}
#worldAtlas #atlasCanvas,body.mobile-layout #worldAtlas #atlasCanvas{display:block;flex:1 1 0;min-height:0;height:0;width:100%;min-width:0;max-width:100%;touch-action:none}
#worldAtlas>p,body.mobile-layout #worldAtlas>p{flex:0 0 auto;margin:0;font:10px/1.25 monospace}
body.mobile-layout #worldAtlas>header>strong{display:none}
body.mobile-layout #worldAtlas nav button{flex:0 0 auto;height:38px;min-height:38px;min-width:34px;padding:0 5px}
body.mobile-layout #worldAtlas #atlasCenter{min-width:62px}

#worldAtlas p{display:flex;align-items:center;gap:6px}#worldAtlas #atlasExit{flex:none;min-height:28px;height:28px;min-width:68px;padding:3px 5px;font-size:11px}#atlasHelp{min-width:0;white-space:normal;font-size:10px;line-height:1.2}

#godMenu{display:flex;flex-direction:column;gap:7px}#godMenu p{font-size:11px;margin:0}#godMenu select,#godMenu input{width:100%;min-height:38px;box-sizing:border-box}#godMenu .god-command-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}#godMenu .god-command-grid button{min-height:44px;white-space:normal;font-size:12px;padding:6px;touch-action:manipulation}#godMenuResult{white-space:pre-wrap;overflow-wrap:anywhere;max-height:130px;overflow:auto;font-size:11px;margin:0}#godMenu .god-command-fields label{font-size:11px;display:block}#godMenu fieldset{display:flex;gap:5px;border:1px solid #52615c;margin:0;padding:5px}#godMenu fieldset[hidden],#godMenu label[hidden]{display:none}#godMenu fieldset label{min-width:0;flex:1}#openGodMenu{min-width:36px;min-height:34px;padding:4px;font-size:20px}#openGodMenu[hidden]{display:none}

#openGodMenu,#godMenu select{background:#243c43;color:#e7dbb3;border:1px solid #8a986f;border-radius:6px}#godMenu select{padding:6px;font-size:16px}

#outfitChoices{grid-template-columns:repeat(3,minmax(0,1fr));max-height:230px;overflow-y:auto;touch-action:pan-y}#outfitChoices button{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;min-width:0;padding:4px}#outfitChoices .outfit-choice-icon{width:40px;height:50px;image-rendering:pixelated;pointer-events:none}.outfit-view-controls{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0}.outfit-view-controls button{min-height:34px;padding:4px 7px;font-size:11px}

.outfit-view-controls button{background:#263c43;color:#e0d4ae;border:1px solid #8c9b73;border-radius:6px}.outfit-view-controls button[aria-pressed=true]{background:#4b5c50;border-color:#d7c185}
