/* Minimal independent map and reachable mobile windows. */
#miniMapWindow{position:fixed;z-index:50;left:var(--map-x,8px);top:var(--map-y,100px);width:var(--map-w,200px);height:var(--map-h,200px);min-width:120px;min-height:100px;background:transparent;border:0;border-radius:7px;overflow:hidden;touch-action:none;box-shadow:0 2px 8px #0003}
#miniMapWindow .map-wrap,#miniMapWindow.libera-free-window .map-wrap{position:absolute!important;inset:0;width:100%!important;height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;padding:0!important;background:#13262d}
#miniMapWindow #minimap{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important}
#miniMapWindow .mini-controls{top:4px!important;right:34px!important;gap:0!important;background:#1c353bdc;padding:0!important}
#miniMapWindow .mini-controls #miniScale{display:none}
#miniMapWindow button,#miniMapWindow .mini-controls button{min-width:28px!important;min-height:28px!important;width:28px!important;height:28px!important;padding:0!important;border:0!important;border-radius:5px!important;background:#1e363ce8;color:#e8e2c7;font:18px/1 system-ui;touch-action:none}
#miniMapWindow .map-move{position:absolute;left:3px;top:3px;z-index:4;cursor:move;font-size:18px}
#miniMapWindow .map-expand{position:absolute;right:3px;top:3px;z-index:4}
#miniMapWindow .map-close{position:absolute;right:3px;bottom:3px;z-index:4}
#miniMapWindow .map-center{position:absolute;left:3px;bottom:3px;z-index:4}
#miniMapWindow .map-resize{position:absolute;right:0;bottom:30px;z-index:4;width:24px!important;height:24px!important;background:transparent!important;cursor:nwse-resize}
#miniMapWindow .map-resize::after,.window-resize-grip::after{content:'';position:absolute;right:4px;bottom:4px;width:8px;height:8px;border-right:2px solid #d9dfc5;border-bottom:2px solid #d9dfc5;opacity:.8}
.client-window[data-window=map]{display:none!important}
.window-resize-grip{font-size:0!important;width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important;padding:0!important;border:0!important;background:transparent!important;touch-action:none}
.window-dock{display:none!important}
body.mobile-layout.in-realm{touch-action:pan-y;width:100%;max-width:100%;overflow:hidden!important}
body.mobile-layout.in-realm .mobile-actions button,body.mobile-layout.in-realm .mobile-navigation button{touch-action:none!important}
body.mobile-layout.in-realm .shell{position:fixed;inset:var(--app-top,0px) 0 auto 0!important;width:100%;max-width:none;height:var(--app-height,100dvh)!important;display:flex;flex-direction:column;overflow:hidden;padding:0!important}
body.mobile-layout.in-realm #game{display:flex!important;flex-direction:column!important;flex:1 1 0!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important}
body.mobile-layout.in-realm .viewport-column{flex:1 1 auto!important;min-height:0!important}
body.mobile-layout.in-realm #mobileNavigation{box-sizing:border-box!important;flex:0 0 auto!important;height:calc(48px + var(--safe-bottom))!important;max-height:calc(48px + var(--safe-bottom))!important;min-height:0!important;padding:0 max(3px,env(safe-area-inset-right)) var(--safe-bottom) max(3px,env(safe-area-inset-left))!important;margin:0!important;align-items:start!important;border-radius:0!important;overflow:hidden!important}
body.mobile-layout.in-realm #mobileNavigation button{box-sizing:border-box!important;height:48px!important;max-height:48px!important;min-height:0!important;align-self:start!important;padding:2px 0 0!important}
body.mobile-layout .mobile-sheet-header{flex-wrap:nowrap!important;min-height:32px!important;height:32px!important;padding:0 4px!important}
body.mobile-layout .mobile-sheet-header button{min-height:28px!important;height:28px!important;min-width:28px!important;padding:0 6px!important;font-size:12px}
body.mobile-layout .mobile-sheet-header>div{flex:1 1 auto!important;min-width:0}
body.mobile-layout .mobile-sheet-header h2{font-size:12px!important;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.mobile-layout .mobile-sheet-kicker{display:none!important}
#worldAtlas{padding:0!important;overflow:hidden;border:1px solid #78928e;border-radius:10px;background:#13262d}
#worldAtlas>header{position:absolute!important;top:5px;left:5px;right:5px;z-index:3;display:flex;align-items:center;gap:4px;background:transparent;border:0!important;padding:0!important;min-height:30px}
#worldAtlas>header>strong{display:none}
#worldAtlas>header nav{display:flex;gap:3px;flex:1;justify-content:flex-end}
#worldAtlas>header button{height:30px!important;min-height:30px!important;min-width:30px!important;padding:3px 7px!important;background:#1b343de8;font-size:13px;border:0}
#worldAtlas #atlasClose{order:2;font-size:0!important;width:30px}
#worldAtlas #atlasClose::after{content:'×';font-size:21px}
#worldAtlas #atlasCanvas{display:block;width:100%;height:calc(100% - 34px);min-height:200px;touch-action:none;max-height:none!important}
#worldAtlas>p{margin:0!important;padding:3px 7px;display:flex;align-items:center;gap:6px;font-size:10px;min-height:32px;background:#1b3239}
#worldAtlas #atlasExit{font-size:11px;min-height:25px;padding:3px 6px}
#worldAtlas .atlas-floor-label{display:none}
body.in-realm.page-suspended #world{visibility:hidden}
body.in-realm .chase-glyph::before,body.in-realm .chase-glyph::after{content:none!important;display:none!important}
body.mobile-layout.in-realm .chase-glyph{font-size:0}
#miniMapWindow button:focus-visible{outline:2px solid #f4dea1;outline-offset:-2px}
@media(max-width:900px){#openWorldAtlasMobile{display:none!important}}

/* Place names belong to maps and deliberate inspection, never the play field. */
.world-label{display:none!important}
body.mobile-layout [data-window=menu] #mobileAreaName{display:block;margin:0 0 .55rem;font-weight:600}
#mobileStopAttack{display:none!important}
body.mobile-layout #game{min-height:0!important}
body.mobile-layout .shell{border:0!important}

body.mobile-layout .mobile-actions #mobileChase::before{content:none!important;display:none!important}
body.mobile-layout .mobile-actions #mobileChase{display:flex!important;align-items:center;justify-content:center}
body.mobile-layout .mobile-actions #mobileChase .chase-glyph{width:32px;height:32px;font-size:0!important}
body.mobile-layout .mobile-actions #mobileChase svg{width:30px;height:30px}
body.mobile-layout .mobile-actions #mobileHeal>small,body.mobile-layout .mobile-actions #mobileInteract>small{display:block;font-size:9px!important;line-height:11px}
body.mobile-layout .mobile-actions .custom-hotkey small{display:block;font-size:9px!important;line-height:11px;max-width:62px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

#mobileJoystick{width:var(--joystick-size,136px)!important;height:var(--joystick-size,136px)!important;border:1px solid #c1c8ac55!important;background:#1c343d66!important;box-shadow:inset 0 0 18px #0d1e2780}
#mobileJoystick .joy-axis{display:none}
.compass-rose{position:absolute;inset:0;pointer-events:none;display:block;color:#bdcbb080}
.compass-rose svg{width:100%;height:100%;fill:#9ba99133;stroke:currentColor;stroke-width:1}
.compass-rose .minor{fill:#a1b4a022;stroke-width:.5}
.quest-bearing{position:absolute;inset:0;transform:rotate(var(--quest-heading,0deg));display:none;opacity:var(--quest-heat,.7)}
.quest-bearing:before{content:'';position:absolute;left:43%;top:2%;width:14%;height:27%;background:#f2c56d;clip-path:polygon(50% 0,100% 100%,50% 75%,0 100%);filter:drop-shadow(0 0 3px #f4b750)}
.has-quest-bearing .quest-bearing{display:block}
#questBearingHint{position:fixed;left:max(8px,env(safe-area-inset-left));bottom:calc(var(--joystick-size,136px) + 28px);max-width:min(220px,46vw);padding:5px 8px;min-height:28px;background:#17313ad9;color:#eed29a;border:1px solid #d5bd6d55;border-radius:8px;font:11px/1.3 system-ui;z-index:6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:auto}#questBearingHint.quest-hint-short{max-width:72px}
body[data-joystick-mode=floating] #mobileJoystick:not(.engaged){visibility:hidden;pointer-events:none!important}
.compass-settings label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0}.compass-settings p{font-size:12px;line-height:1.45}
body.mobile-layout .quest-tracker{font-size:11px;max-width:65%;padding:4px 7px;background:#17313abf}

#worldAtlas[open],body.mobile-layout #worldAtlas[open]{display:flex!important;flex-direction:column;gap:0!important}
#worldAtlas>header,body.mobile-layout #worldAtlas>header{display:flex!important;height:30px!important;flex-wrap:nowrap!important;bottom:auto!important;margin:0!important}
#worldAtlas #atlasCanvas,body.mobile-layout #worldAtlas #atlasCanvas{flex:1 1 0!important;min-height:0!important;height:0!important;margin:0!important;width:100%!important}
#worldAtlas>p,body.mobile-layout #worldAtlas>p{flex:0 0 auto!important;min-height:32px!important;max-height:48px;box-sizing:border-box}
#worldAtlas .atlas-grab{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;background:#1b343de8;border-radius:5px;color:#e8dfc4;cursor:move}
#recoveryStatus{position:absolute;z-index:130;top:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:6px;max-width:80%;padding:5px 8px;border-radius:8px;background:#18323de8;color:#eedca9;font:12px/1.3 system-ui;box-shadow:0 2px 6px #0003}#recoveryStatus button{font:inherit;min-height:28px;padding:3px 8px}#recoveryStatus[hidden]{display:none!important}

/* One visual language for inventory, equipment, conversations and journals. */
body.mobile-layout.mobile-sheet-compact .inventory{gap:5px;padding:4px 0}
body.mobile-layout.mobile-sheet-compact .bag-item{min-height:62px;border-radius:9px;padding:5px;background:linear-gradient(145deg,#304b53,#1b313b);border:1px solid #6d888466;box-shadow:inset 0 1px #d6e7c711}
body.mobile-layout.mobile-sheet-compact .bag-item .item-icon{width:32px;height:32px}
body.mobile-layout.mobile-sheet-compact .bag-item small{font:10px/1.15 system-ui;color:#e0e8dc;white-space:normal}
body.mobile-layout.mobile-sheet-compact .paperdoll{display:grid!important;grid-template-columns:76px minmax(0,1fr);align-items:start;padding:5px 0;gap:8px;background:transparent}
body.mobile-layout.mobile-sheet-compact #paperDoll{display:block!important;position:sticky;top:4px;width:76px!important;height:95px!important;border-radius:12px;border:1px solid #86a29455;background:radial-gradient(ellipse at 50% 65%,#45685c66,#172d3644);image-rendering:pixelated}
body.mobile-layout.mobile-sheet-compact #equipment{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
body.mobile-layout.mobile-sheet-compact #equipment .slot{min-height:60px;border-radius:8px;background:#1f3740;border:1px solid #6d888466;padding:4px 2px}
body.mobile-layout.mobile-sheet-compact #equipment .slot .item-icon{width:30px;height:30px}
body.mobile-layout.mobile-sheet-compact #equipment .slot>span{font:9px/1.15 system-ui;text-transform:capitalize;letter-spacing:0;color:#ccdacd}
body.mobile-layout .item-inspector{background:#19333df5;border:1px solid #8caa9166;border-radius:10px;padding:9px;margin-bottom:8px}
body.mobile-layout #questText .quest-row{margin:5px 0;padding:0;border:1px solid #6f8f8260;border-radius:10px;background:#20394266;overflow:hidden}
body.mobile-layout #questText .quest-row[data-status=active]{border-left:2px solid #c4b77c}
body.mobile-layout #questText .quest-row>summary{font:600 12px/1.4 system-ui;padding:9px 10px;min-height:36px;box-sizing:border-box}
body.mobile-layout #questText .quest-row>p,body.mobile-layout #questText .quest-row>div{padding:0 10px;line-height:1.5;font-size:12px}
body.mobile-layout .quest-track{margin:6px 10px 10px;min-height:44px;border-radius:8px;font:600 12px system-ui;background:#3d655e;color:#f0e6c7;border:1px solid #8fa58c66}
body.mobile-layout #dialogueText{font:13px/1.5 system-ui;color:#e5e9d9;max-height:150px;overflow:auto;overscroll-behavior:contain;padding:4px 0}
body.mobile-layout #dialogueActions{gap:5px}
body.mobile-layout #dialogueActions button{min-height:44px;border-radius:8px;font:12px/1.4 system-ui;padding:8px 10px;background:#2e514f;border-color:#79948577}
body.mobile-layout #spells button{min-height:46px;border-radius:10px;background:#294851;font:12px/1.3 system-ui}
body.mobile-layout .mobile-sheet-header{background:linear-gradient(90deg,#2d484e,#203941);border-bottom:1px solid #8b9f8655}
body.mobile-layout .sidebar h3{font:600 12px/1.4 system-ui;color:#d6cba5;margin:9px 0}

/* Quiet circular navigation: clear thumb, fine ticks and a restrained quest arc. */
.mobile-layout #mobileJoystick{border:1px solid #b8d6d642!important;background:radial-gradient(circle at 35% 25%,#3a566073,#122a33b8 72%)!important;box-shadow:0 5px 18px #07131b38,inset 0 1px 0 #d8efed20!important}
#mobileJoystick .joy-axis,#mobileJoystick .joy-label{display:none}
#mobileJoystick .compass-rose{color:#b7cecf88}
#mobileJoystick .compass-rose svg{fill:none;stroke:none}
#mobileJoystick .compass-track{fill:none;stroke:#d6ebe923;stroke-width:.6}
#mobileJoystick .compass-inner{fill:none;stroke:#b6d2d916;stroke-width:.6}
#mobileJoystick .compass-ticks path{fill:none;stroke:currentColor;stroke-width:1;stroke-linecap:round}
#mobileJoystick .compass-ticks .minor{opacity:.44}
#mobileJoystick .compass-ticks .major{stroke-width:1.6;opacity:.85}
#mobileJoystick .compass-north{fill:#d8e8dfad;stroke:none}
#mobileJoystick .joystick-thumb{width:35%;height:35%;border:1px solid #c4e2dc80;background:linear-gradient(145deg,#a0c0b7bd,#4c7078e6 62%,#34545fe6);box-shadow:0 3px 8px #06151a66,inset 0 1px 0 #e1f0d75e;transition:background .14s,border-color .14s}
#mobileJoystick .joystick-thumb:after{content:'';position:absolute;inset:43%;border-radius:50%;background:#e5f1e0a6}
.mobile-layout #mobileJoystick.engaged{border-color:#bce2d38c!important;box-shadow:0 5px 18px #07131b38,inset 0 0 14px #a7d7ca16!important}
#mobileJoystick .quest-bearing:before{left:36%;top:3.5%;width:28%;height:12%;border-radius:50%;background:none;border-top:3px solid #f4d794;clip-path:none;filter:drop-shadow(0 0 2px #e9b75766)}
#mobileJoystick .quest-bearing:after{content:'';position:absolute;left:47%;top:13%;width:6%;height:7%;background:#f4d794;clip-path:polygon(50% 0,100% 100%,50% 74%,0 100%)}
.mobile-layout .touch-pad{grid-template-columns:repeat(3,48px);grid-template-rows:repeat(3,48px);gap:3px;filter:drop-shadow(0 3px 7px #07131b40)}
.mobile-layout .touch-pad button{min-width:44px;min-height:44px;height:48px;padding:0;display:grid;place-items:center;font-size:0;border:1px solid #b8d6d642;border-radius:15px;background:linear-gradient(145deg,#3a5660d9,#142e38e8);color:#d7e8e2;box-shadow:inset 0 1px 0 #d8efed18}
.mobile-layout .touch-pad button:before{content:'';width:8px;height:8px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(-45deg)}
.mobile-layout .touch-pad [data-dir=right]:before{transform:rotate(45deg)}
.mobile-layout .touch-pad [data-dir=down]:before{transform:rotate(135deg)}
.mobile-layout .touch-pad [data-dir=left]:before{transform:rotate(225deg)}
.mobile-layout .touch-pad button:active{background:#497878e6;border-color:#bce2d38c}

body.mobile-layout #mobileJoystick>.joystick-thumb{opacity:.92}
body.mobile-layout #mobileJoystick.engaged>.joystick-thumb{opacity:1}

/* Conversation is one anchored component, not a draggable/resizable window. */
#conversationPanel[hidden]{display:none!important}
#conversationPanel{position:fixed!important;left:var(--conversation-left,50vw)!important;top:var(--conversation-top,100px)!important;right:auto!important;bottom:auto!important;transform:translateX(-50%)!important;width:var(--conversation-width,calc(100vw - 16px))!important;max-width:440px!important;height:auto!important;max-height:var(--conversation-height,360px)!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;contain:layout paint;background:#19313af7;border:1px solid #829d957a;border-radius:12px;box-shadow:0 8px 25px #08151e66;z-index:260;resize:none!important}
#conversationPanel>summary{display:flex!important;flex:none;align-items:center;justify-content:space-between;gap:8px;position:static!important;padding:3px 8px!important;min-height:38px!important;cursor:default;list-style:none;background:#233e45;border-bottom:1px solid #91a99b33}
#conversationPanel>summary:before,#conversationPanel>summary:after,#conversationPanel .window-resize-grip{display:none!important}
#conversationTitle{font:600 14px/1.3 system-ui;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e8dfc2}
#conversationPanel>summary button{width:40px;min-width:40px;height:38px;min-height:38px;padding:0;font:22px/1 system-ui;border:0;background:transparent;color:#e3e8d6}
#conversationPanel>.window-body{position:relative!important;display:block!important;min-height:0!important;max-height:calc(var(--conversation-height,360px) - 45px)!important;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;touch-action:pan-y;padding:10px!important;scrollbar-width:thin}
#conversationPanel #dialogueText{position:static!important;display:block!important;width:auto!important;height:auto!important;max-height:none!important;overflow:visible!important;margin:0 0 10px!important;padding:0!important;transform:none!important;font:14px/1.5 system-ui;color:#e8ebdf;overflow-wrap:anywhere;white-space:pre-wrap}
#conversationPanel #dialogueActions{position:static!important;display:flex!important;flex-wrap:wrap;gap:6px;max-height:none!important;overflow:visible!important;width:auto!important;transform:none!important}
#conversationPanel #dialogueActions button{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere;border-radius:8px;font:13px/1.4 system-ui;padding:8px 10px}
#conversationPanel #npcTrade{position:static!important;width:100%;max-width:100%;min-width:0;overflow:visible!important;transform:none!important}
#conversationPanel input,#conversationPanel select{max-width:100%;min-width:0;font-size:16px}

/* Controlled quest journal and coherent character status. */
#questJournalPanel #questTitle{display:none!important}
#questJournalPanel .quest-row>summary{display:flex;flex-direction:column;gap:3px;white-space:normal;font-size:13px}
#questJournalPanel .quest-row-status{font-size:11px;color:#adbfbe}
#questJournalPanel #pinnedQuest{padding:10px;border:1px solid #a9c7bd55;border-radius:9px;background:#29454b80;margin-bottom:9px}
#questJournalPanel .pinned-label{font:700 10px/1.2 system-ui;letter-spacing:.1em;color:#e6cc91;margin:0 0 5px}
#questJournalPanel h4{font-size:15px;margin:0 0 3px;color:#f0ead9}
#questJournalPanel p{margin:5px 0;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
#questJournalPanel .quest-stage,#questJournalPanel .quest-progress{font-size:11px;color:#b5c9c8}
#questJournalPanel .quest-next{color:#f3d898;font-weight:600}
#questJournalPanel .quest-pin-actions,#questGroups>nav{display:flex;gap:5px;margin-top:7px}
#questJournalPanel button{min-height:34px;padding:5px 9px;font-size:12px}
#questJournalPanel [aria-pressed=true]{border-color:#e3d096;background:#36575b}
#questJournalPanel .pinned-details{margin-top:7px;font-size:12px}
#questJournalPanel details summary{touch-action:manipulation}
body.mobile-layout #questJournalPanel{display:flex!important;position:fixed!important;left:var(--journal-left)!important;top:var(--journal-top)!important;transform:translateX(-50%);width:var(--journal-width)!important;height:var(--journal-height)!important;max-height:none!important;min-height:0!important;box-sizing:border-box;background:#1b323aFA;border:1px solid #779b99;border-radius:12px;z-index:280;flex-direction:column;overflow:hidden;box-shadow:0 8px 25px #07121866;resize:none!important;touch-action:pan-y}
body.mobile-layout #questJournalPanel[hidden]{display:none!important}
body.mobile-layout #questJournalPanel>summary{display:flex!important;flex:0 0 36px;min-height:36px!important;height:36px!important;align-items:center;gap:5px;padding:0 7px!important;cursor:default}
body.mobile-layout #questJournalPanel>summary>strong{flex:1;font:600 13px system-ui}
body.mobile-layout #questJournalPanel>summary button{min-height:32px;height:32px;min-width:36px;font-size:12px;margin:0}
body.mobile-layout #questJournalPanel>.window-body{display:block!important;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;flex:1;min-height:0;padding:7px!important;position:static!important}
body.mobile-layout.in-realm #mobileVitals{grid-template-columns:minmax(86px,1fr) minmax(102px,108px)!important;grid-template-rows:18px 18px!important;gap:2px 4px!important;min-width:194px;box-sizing:border-box;height:40px;flex:1 1 auto}
body.mobile-layout.in-realm #mobileVitals>div:first-child{display:flex!important;flex-direction:column!important;justify-content:center;align-items:flex-start;grid-row:1/3;min-width:0;gap:0!important}
body.mobile-layout.in-realm #mobileVitals strong{font:600 11px/12px system-ui!important;max-width:100%}
body.mobile-layout.in-realm #mobileVitals>div:first-child>span{font:9px/11px ui-monospace,monospace!important;white-space:nowrap}
body.mobile-layout.in-realm #mobileVitals .mobile-meter{height:18px!important;width:100%!important;grid-column:2;min-width:0}
body.mobile-layout.in-realm #mobileVitals .mobile-meter>span{font:600 10px/1 ui-monospace,monospace;white-space:nowrap;font-variant-numeric:tabular-nums}
body.mobile-layout.in-realm #mobileVitals[data-floating-status]{padding:1px 3px;background:#1c343ced;border-radius:5px;flex:none;touch-action:none}

#questJournalPanel .quest-row button{min-height:44px}
body.mobile-layout #questJournalPanel .quest-objective,body.mobile-layout #questJournalPanel .quest-next{font-size:calc(13px * var(--ui-text-scale,1))!important}

/* Fitted HUD, compact sheets, and one safe-area owner for the bottom dock. */
body.mobile-layout.in-realm{--head-height:52px}
body.mobile-layout.in-realm .topbar{display:grid!important;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:44px;align-items:center;gap:6px;box-sizing:border-box;height:calc(52px + var(--safe-top))!important;min-height:0!important;margin:0!important;padding:calc(var(--safe-top) + 4px) 6px 4px!important;overflow:hidden}
body.mobile-layout.in-realm .topbar>:not(#mobileVitals):not(#hudOverflow){display:none!important}
body.mobile-layout.in-realm #mobileVitals{order:1!important;grid-column:1!important;grid-row:1!important;min-width:0!important;width:100%;max-width:100%;grid-template-columns:minmax(0,1fr) minmax(96px,118px)!important}
body.mobile-layout.in-realm #hudOverflow{order:2!important;grid-column:2!important;grid-row:1!important;justify-self:end;align-self:center}
body.mobile-layout.in-realm #mobileHeroName{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
body.mobile-layout.in-realm #mobileHeroCoordinates{font-size:10px!important}
#hudOverflow{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border-radius:12px;border:1px solid #8fb8b6;background:#1c3844cc;color:#f4e7c4;font:22px/1 system-ui;position:relative}
#hudOverflow.connected::after{content:'';position:absolute;top:6px;right:6px;width:7px;height:7px;border-radius:50%;background:#8ee0ae}
/* One native top-layer settings menu; no nested overflow/account windows. */
#accountMenu:not([open]),#accountMenu[hidden]{display:none!important}
#accountMenu[open]{display:flex;flex-direction:column;position:fixed;inset:auto;left:var(--account-left,8px);top:var(--account-top,60px);margin:0;width:min(312px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:var(--account-height,calc(100dvh - 16px));padding:8px;overflow:hidden;box-sizing:border-box;touch-action:pan-y}
#accountMenu::backdrop{background:#07141d45}
#accountMenu>header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:8px}
#accountMenu>header>strong{font:600 16px/1.3 system-ui;padding:8px}
#accountMenu>header>button{width:40px;min-width:40px;min-height:40px;margin:0;padding:0;text-align:center;font-size:22px}
#accountMenu .account-menu-items{min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
#accountMenu .account-menu-items>button{display:block;width:100%;height:auto;min-height:44px;margin:4px 0;padding:10px 12px;text-align:left;white-space:normal;font:500 14px/1.35 system-ui;color:var(--ui-ink,#f2f5f2);background:var(--ui-raised,#29464d);border:1px solid var(--ui-edge,#6f9596);border-radius:9px}
#accountMenu .account-menu-items>button[hidden]{display:none!important}
#accountMenu button::before,#accountMenu button::after{content:none!important}
body.mobile-layout.in-realm.mobile-sheet-open #mobileSheet{position:fixed!important;display:flex!important;flex-direction:column!important;z-index:30!important;top:calc(var(--head-height,52px) + var(--safe-top,0px) + 8px)!important;bottom:auto!important;left:max(8px,env(safe-area-inset-left))!important;right:max(84px,calc(env(safe-area-inset-right) + 76px))!important;width:auto!important;height:min(56dvh,calc((var(--app-height,100dvh) - var(--head-height,52px) - var(--safe-top,0px) - 48px - var(--safe-bottom,0px)) * .56))!important;max-height:calc(var(--app-height,100dvh) - var(--head-height,52px) - var(--safe-top,0px) - var(--joystick-size,136px) - 48px - var(--safe-bottom,0px) - 28px)!important;min-height:0!important;overflow:hidden!important;border-radius:16px!important}
body.mobile-layout.in-realm.mobile-sheet-open #rightSidebar{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain;padding:4px 8px 8px!important}
body.mobile-layout.in-realm .mobile-sheet-tabs{display:none!important}
body.mobile-layout.in-realm .mobile-sheet-header{flex:0 0 auto!important;height:48px!important;min-height:48px!important;align-items:center!important}
body.mobile-layout.in-realm .mobile-sheet-header button{min-width:44px!important;min-height:40px!important;height:40px!important}
body.mobile-layout.in-realm.mobile-sheet-expanded #mobileSheet{right:max(8px,env(safe-area-inset-right))!important;height:min(86dvh,calc(var(--app-height,100dvh) - var(--head-height,52px) - var(--safe-top,0px) - 48px - var(--safe-bottom,0px) - 12px))!important;max-height:none!important}
body.mobile-layout.in-realm.mobile-sheet-minimized #mobileSheet{height:48px!important;max-height:48px!important}
body.mobile-layout.in-realm[data-mobile-panel=menu] #mobileSheet{height:auto!important;max-height:min(62dvh,520px)!important}
body.mobile-layout.in-realm.mobile-sheet-compact .mobile-actions,body.mobile-layout.in-realm.mobile-sheet-compact #mobileJoystick,body.mobile-layout.in-realm.mobile-sheet-compact .joystick{visibility:visible!important}
body.mobile-layout.mobile-keyboard-open #mobileNavigation{display:none!important}
body.mobile-layout.in-realm.mobile-keyboard-open #mobileSheet{top:calc(var(--mobile-top,0px) + 12px)!important;bottom:0!important;right:max(8px,env(safe-area-inset-right))!important;height:auto!important;max-height:calc(var(--mobile-height,100dvh) - 24px)!important}
@media(orientation:landscape) and (max-height:600px){body.mobile-layout.in-realm{--head-height:44px}body.mobile-layout.in-realm .topbar{height:calc(44px + var(--safe-top))!important;padding-top:calc(var(--safe-top) + 2px)!important}body.mobile-layout.in-realm.mobile-sheet-open #mobileSheet{left:auto!important;width:min(420px,46vw)!important;right:max(8px,calc(env(safe-area-inset-right) + 120px))!important;height:min(68dvh,calc(var(--app-height,100dvh) - 72px))!important;max-height:calc(var(--app-height,100dvh) - var(--head-height,44px) - var(--safe-top,0px) - 16px)!important}}
body.mobile-layout.in-realm .mobile-window-menu [data-mobile-panel=bag],body.mobile-layout.in-realm .mobile-window-menu [data-mobile-panel=equipment],body.mobile-layout.in-realm .mobile-window-menu [data-mobile-panel=map],body.mobile-layout.in-realm .mobile-window-menu [data-mobile-panel=quests],body.mobile-layout.in-realm .mobile-window-menu [data-mobile-panel=chat]{display:none!important}
body.mobile-layout .mobile-window-menu{gap:8px!important;padding:2px!important}
body.mobile-layout .more-group h3{margin:6px 0 4px!important}
body.mobile-layout .more-grid{gap:6px!important}
body.mobile-layout .mobile-window-menu .more-grid button,body.mobile-layout .mobile-window-menu .more-grid a,body.mobile-layout .mobile-window-menu>#mobileGodEntry{min-height:44px!important;padding:6px 8px!important;gap:8px!important}
body.mobile-layout .more-copy small{font-size:10px;line-height:1.15}
body.mobile-layout .mobile-menu-tip{display:none}
body.mobile-layout .mobile-sheet-backdrop{background:rgba(4,10,16,.18)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#itemActionMenu{position:fixed;z-index:430;display:flex;flex-direction:column;gap:4px;min-width:168px;padding:6px;background:#102832ee;border:1px solid #e5c27c88;border-radius:12px;box-shadow:0 8px 20px #0006}
#itemActionMenu[hidden]{display:none!important}
#itemActionMenu button{min-height:44px;text-align:left;padding:8px 10px;background:#1d3a44;color:#f2f5f2;border:1px solid #7f9c98;border-radius:10px}
#throwAimBanner{position:fixed;z-index:90;left:50%;top:calc(var(--safe-top,0px) + 60px);transform:translateX(-50%);margin:0;max-width:calc(100vw - 24px);padding:8px 12px;background:#102832e6;color:#f4e2b0;border:1px solid #e5c27c88;border-radius:999px;font:13px/1.3 system-ui;pointer-events:none}
#throwAimBanner[hidden]{display:none!important}
.item-icon,img.item-icon{opacity:1}

/* Floating sheets take their rectangle from the same owner that persists it. */
body.mobile-layout.in-realm.mobile-sheet-open #mobileSheet.libera-free-window {
  left: var(--free-x) !important;
  top: var(--free-y) !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--free-width) !important;
  height: var(--free-height, auto) !important;
  max-height: var(--app-height, 100dvh) !important;
}
body.mobile-layout.in-realm.mobile-sheet-minimized #mobileSheet.libera-free-window {
  height: 34px !important;
}
body.mobile-layout #mobileSheet > .window-resize-grip {
  position: absolute;
  right: 0;
  bottom: 0;
}
body:not([data-layout-editing="true"]) .window-resize-grip { visibility: hidden; }
body[data-layout-editing="true"] .mobile-sheet-header { touch-action: none; }
