/* Map/sidebar geometry is independent of text sizing. Controls never cover the map hit area. */
body:not(.compact-ui).sidebar-collapsed{--sidebar-width:0px}
body:not(.compact-ui).sidebar-collapsed main>aside{display:none}
#sidebar-layout-tools{display:flex;justify-content:space-between;gap:8px;padding:7px 12px;flex-shrink:0;border-bottom:1px solid #35483b}
#sidebar-layout-tools button,#sidebar-show,.minimap-tools button{border:1px solid #73845e;border-radius:3px;background:#253b2e;color:#ebddbd;padding:4px 8px;font:11px/1.4 Georgia,serif;min-height:28px}
#sidebar-show{position:absolute;right:12px;top:12px;z-index:14}
body:not(.compact-ui).sidebar-collapsed .quest-tracker{top:52px}
#sidebar-resize{position:absolute;right:calc(var(--sidebar-width) - 5px);top:0;bottom:0;width:10px;z-index:19;padding:0;border:0;background:transparent;cursor:ew-resize;touch-action:none}
#sidebar-resize:hover,#sidebar-resize:focus-visible{background:#b9ae7066}
/* These handles sit outside the scrolling sidebar, so they remain reachable
   even when the panel is shortened or the inventory grows. */
body:not(.compact-ui) main>aside{height:var(--sidebar-panel-height,100vh);max-height:calc(100dvh / var(--interface-sidebar,1));align-self:start;box-sizing:border-box;border-bottom:1px solid var(--game-border,#73845e);padding-bottom:6px}
body:not(.compact-ui) #sidebar-resize{top:calc(0px - var(--header-height));bottom:auto;height:calc(var(--sidebar-panel-height,100vh) * var(--interface-sidebar,1))}
#sidebar-resize::after{content:'';position:absolute;left:3px;top:45%;height:44px;width:3px;border-left:1px solid var(--game-gold,#d8c187);border-right:1px solid var(--game-border,#73845e);opacity:.8}
#sidebar-height-resize{position:absolute;right:0;top:calc(var(--sidebar-panel-height,100vh) * var(--interface-sidebar,1) - var(--header-height) - 12px);width:var(--sidebar-width);height:12px;min-height:0;padding:0;border:0;background:transparent;z-index:19;cursor:ns-resize;touch-action:none}
#sidebar-height-resize::after{content:'';position:absolute;left:calc(50% - 24px);top:4px;width:48px;height:3px;border-top:1px solid var(--game-gold,#d8c187);border-bottom:1px solid var(--game-border,#73845e);opacity:.8}
#sidebar-height-resize:hover,#sidebar-height-resize:focus-visible{background:#b9ae7044}
.local-navigation{gap:10px;flex-wrap:nowrap;min-width:0}
.minimap-frame{position:relative;flex:none;width:var(--minimap-size,130px);height:var(--minimap-size,130px)}
.local-navigation .minimap-frame #map{width:100%;height:100%;touch-action:none}
#minimap-resize{position:absolute;right:-4px;bottom:-4px;width:24px;height:24px;min-width:24px;padding:0;border:1px solid #7f8d64;border-radius:4px;background:#23382b;color:#e4d5ab;cursor:nwse-resize;touch-action:none;font:17px/1 Arial}
.minimap-tools{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px}
.minimap-tools output{font:11px/1.4 Arial,sans-serif;min-width:35px;text-align:center;color:#d6d2ad}
.minimap-tools button{min-width:30px}
.map-layout-settings{border-top:1px solid #58664d;border-bottom:1px solid #58664d;margin:20px 0;padding:8px 0 16px}
.map-layout-settings h4{margin:8px 0;font-size:17px}
.compact-ui main>aside{width:min(var(--compact-sidebar-width,390px),100%)}
.compact-ui #sidebar-layout-tools,.compact-ui #sidebar-show,.compact-ui #sidebar-resize,.compact-ui #sidebar-height-resize{display:none}
.compact-ui[data-compact-panel=map] main>aside{display:flex;height:auto;max-height:calc(var(--compact-height,100dvh) - var(--header-height) - var(--compact-bar));overflow:auto}
.compact-ui[data-compact-panel=map] main>aside>:not(.map-panel):not(.compact-heading){display:none!important}
.compact-ui[data-compact-panel=map] main>aside>.map-panel{display:block;padding:12px}
.compact-ui[data-compact-panel=map] .compact-heading #compact-bank-back{display:none}
.compact-ui .minimap-tools button,.compact-ui .compass-control .minimap-icons-open{min-height:44px;min-width:44px;font-size:12px}
.compact-ui #minimap-resize{width:32px;height:32px;right:-8px;bottom:-8px}
