/* Give controls their own space so they never cover the usable map canvas. */
.map-app{padding:16px 20px 12px}.map-heading{margin:0 0 12px}.map-heading h1{font-size:25px}.map-heading h1 span,.map-heading .eyebrow,.map-heading-right>a,.map-heading-right #atlas-count,.map-footnote{display:none}.map-heading-right{gap:10px}.map-heading-right button{font-size:12px}
.map-workbench,.map-workbench.show-detail,.map-workbench.filters-collapsed,.map-workbench.filters-collapsed.show-detail{display:grid;grid-template-columns:280px minmax(0,1fr);height:calc(100dvh - 145px);min-height:440px;border:1px solid var(--line);border-radius:6px;background:white;box-shadow:none}
.map-workbench.filters-collapsed,.map-workbench.filters-collapsed.show-detail{grid-template-columns:minmax(0,1fr)}
.map-workbench .map-sidebar{position:static;inset:auto;width:auto;height:100%;min-height:0;z-index:2;border:0;border-right:1px solid var(--line);border-radius:0;background:#fafcfb;box-shadow:none;backdrop-filter:none;overflow:hidden}
.map-workbench.filters-collapsed .map-sidebar{display:none}
.map-center{position:relative;inset:auto;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;min-width:0;min-height:0;height:100%;background:#fff}
.map-toolbar,.map-workbench.filters-collapsed .map-toolbar,.map-workbench.show-detail .map-toolbar{position:static;inset:auto;width:auto;max-width:none;transform:none;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;background:white;padding:10px 12px;display:flex;gap:10px;align-items:center;min-height:60px}
.map-toolbar>div:first-child{flex:1;min-width:0;display:flex;align-items:center;gap:12px}.map-toolbar h2{font-size:20px!important;margin:0;text-align:left!important;max-width:none}.map-toolbar p{font-size:11px;margin:3px 0 0}.map-toolbar .map-quick-nav{display:none!important}.map-label-toggle{display:flex;align-items:center;gap:4px;font-size:12px;white-space:nowrap}.map-label-toggle input{accent-color:#315b70}
.map-lower-tools,.map-workbench.filters-collapsed .map-lower-tools,.map-workbench.show-detail .map-lower-tools{position:static;inset:auto;max-width:none;width:auto;display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:6px 12px;background:#f5f8f9;border-bottom:1px solid var(--line);pointer-events:auto}
.map-lower-tools .map-area-bar,.map-lower-tools .map-filter-status{background:none;border:0;box-shadow:none;min-height:28px;padding:0;max-width:100%;border-radius:0}.map-lower-tools #tile-note{display:none}.map-lower-tools .map-area-bar select{max-width:240px}.map-filter-status{margin-left:auto}.map-filter-status #filter-summary{font-size:11px}.area-story-note{flex-basis:100%;width:100%;max-height:100px;box-shadow:none;margin-bottom:4px}
.map-viewport{position:relative;inset:auto;width:100%;height:100%;min-height:0;background-color:#203b49}.map-compass{top:14px;right:16px}.map-controls{right:12px;bottom:40px;top:auto}.map-controls button{width:34px;height:34px}.map-status{left:12px;bottom:10px}.map-hint{display:none}
.map-bottom{position:static;inset:auto;width:auto;display:flex;justify-content:space-between;align-items:center;padding:7px 12px;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:white;font-size:11px}.map-bottom button{padding:4px 8px;color:var(--accent)}
.map-workbench .map-detail{position:absolute;inset:0 0 0 auto;top:0!important;bottom:0!important;width:330px;max-height:100%;border-radius:0;border:0;border-left:1px solid var(--line);box-shadow:-5px 0 20px #19374720;z-index:8;background:white}
.map-sidebar .sidebar-section:first-child{padding:14px}.map-sidebar .search-tip{display:none}.map-sidebar #map-region,.map-sidebar #map-select{display:block;width:100%;margin-bottom:6px}.map-search{border-radius:4px;background:white}.map-sidebar .sidebar-tabs{background:#edf3f6;gap:20px}.map-sidebar .filter-section{padding:12px 14px;overflow:auto;min-height:0}.filter-type-group{margin-bottom:12px}.filter-group-heading{padding-bottom:5px;margin-bottom:3px}.filter-group-options .map-category{min-height:30px;padding:4px 0}.map-sidebar .sidebar-footer{position:static;margin-top:auto;flex-shrink:0;padding:10px 14px;background:#fafcfb;border-top:1px solid var(--line)}.filter-section>.panel-title{margin-bottom:10px}.filter-section>.panel-title>div{justify-content:flex-start;gap:4px}.filter-section>.panel-title button{border:1px solid var(--line);border-radius:3px;padding:4px 6px;background:white}.filter-section>.panel-title h2{display:none}
.map-workbench.expanded{position:fixed;inset:8px;height:auto;min-height:0;z-index:1100}
@media(max-width:720px){
 .map-app{padding:10px 8px}.map-heading{margin-bottom:9px}.map-heading h1{font-size:23px}.map-workbench,.map-workbench.show-detail,.map-workbench.filters-collapsed,.map-workbench.filters-collapsed.show-detail{display:block;height:calc(100dvh - 125px);min-height:380px}.map-center{height:100%}
 .map-workbench .map-sidebar,.map-workbench.filters-collapsed .map-sidebar{display:none;position:fixed;inset:10px auto 10px 10px;width:min(330px,calc(100vw - 40px));height:auto;z-index:120;border:1px solid var(--line);border-radius:6px;box-shadow:0 8px 32px #17354640}.map-workbench.show-filters .map-sidebar{display:flex}
 .map-toolbar,.map-workbench.filters-collapsed .map-toolbar,.map-workbench.show-detail .map-toolbar{padding:8px;gap:6px;flex-wrap:wrap;min-height:60px}.map-toolbar>div:first-child{gap:8px}.map-toolbar h2{font-size:17px!important;max-width:145px}.map-toolbar p{font-size:10px}.map-toolbar #open-filters{font-size:11px;padding:6px}.map-toolbar #overview-button{font-size:11px;padding:5px}.map-label-toggle{font-size:11px}
 .map-lower-tools,.map-workbench.filters-collapsed .map-lower-tools,.map-workbench.show-detail .map-lower-tools{padding:5px 8px;gap:2px 8px}.map-filter-status{margin-left:0;width:100%;justify-content:space-between}.map-lower-tools .map-area-bar select{max-width:200px}.map-bottom>span{display:none}.map-bottom{justify-content:flex-end;padding:5px 8px}
 .map-workbench.show-detail .map-detail{inset:auto 0 0!important;width:auto;max-height:55%;border-top:1px solid var(--line);border-left:0;border-radius:8px 8px 0 0;z-index:9}.map-workbench .map-detail{display:none}.map-workbench.show-detail .map-detail{display:block}.map-workbench.expanded{height:auto;inset:5px;min-height:0}
}
.map-lower-tools .map-area-bar,.map-lower-tools .map-filter-status{width:auto!important;flex:0 1 auto!important;margin:0!important;justify-content:flex-start}.map-lower-tools .map-filter-status{margin-left:auto!important}.map-lower-tools #area-story-note[hidden]{display:none!important}.map-workbench:not(.expanded){height:calc(100dvh - 165px)}
@media(max-width:720px){.map-workbench:not(.expanded){height:calc(100dvh - 125px)}.map-lower-tools .map-filter-status{flex-basis:100%!important;justify-content:space-between}}
.map-lower-tools{flex-direction:row!important}

/* Atlas navigation, collection notebook and compact map controls. */
.map-app{padding-top:10px}.map-heading{margin-bottom:8px}.map-heading h1{font-size:22px}.map-workbench:not(.expanded){height:calc(100dvh - 142px)}
.map-sidebar .sidebar-section:first-child{padding:12px 14px}.map-sidebar .panel-title h2{font-size:13px}.atlas-current-map{display:flex;align-items:center;justify-content:space-between;width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:4px;background:#edf3f6;color:#21495d;text-align:left;font-size:13px;font-weight:600}.map-sidebar .search-heading{margin-top:10px}.map-sidebar .sidebar-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0 8px;flex-shrink:0}.map-sidebar .sidebar-tabs button{padding:11px 2px;text-align:center;font-size:12px}.map-sidebar .sidebar-tabs button[aria-selected=true]{color:#135c7a;border-bottom:2px solid #39748b;border-radius:0;background:#fff}.map-sidebar .sidebar-tabs span{font-size:10px;margin-left:2px}
.map-sidebar [role=tabpanel][hidden]{display:none!important}.map-sidebar .atlas-panel{flex:1;min-height:0;overflow:auto;padding:12px 14px}.atlas-place-tools{display:grid;gap:8px;margin-bottom:14px}.atlas-place-tools input[type=search],.atlas-place-tools select{width:100%;min-width:0;padding:8px;font:inherit;border:1px solid var(--line);border-radius:4px;background:#fff}.atlas-place-tools #map-select{display:none}.atlas-place-tools #map-region{margin:0}.atlas-check{display:flex;align-items:center;gap:5px;font-size:12px}.atlas-note{font-size:11px;color:#667b84;line-height:1.7;margin:8px 0}.atlas-directory-group{margin:14px 0}.atlas-directory-group h3,.atlas-section-heading{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin:0;padding:6px 0;border-bottom:1px solid var(--line);color:#315466}.atlas-directory-group h3 small,.atlas-section-heading>span{font:11px system-ui;color:#6c838b}.atlas-section-heading h3{margin:0;font:600 13px system-ui;text-align:left}.atlas-place-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;border:0;border-bottom:1px solid #e6ecee;padding:10px 7px;text-align:left;background:transparent;border-radius:0;color:var(--text)}.atlas-place-row:hover,.atlas-place-row[aria-current=page]{background:#e8f1f6}.atlas-place-row[aria-current=page]{box-shadow:inset 3px 0 #377e9c}.atlas-place-row strong,.atlas-favorite-row strong{display:block;font-size:12px;font-weight:600;line-height:1.6}.atlas-place-row small,.atlas-favorite-row small{display:block;font-size:10px;color:#70858d;margin-top:3px}.atlas-place-count{font-size:10px;white-space:nowrap;color:#52707b}.atlas-place-count i{font-size:17px;font-style:normal;margin-left:8px}
.atlas-progress-total{display:flex;justify-content:space-between;align-items:baseline;margin:16px 0 8px}.atlas-progress-total strong{font:600 32px system-ui;color:#24596e}.atlas-progress-total strong small{font-size:15px;color:#80939b}.atlas-progress-total>span{font-size:14px;color:#39748b}#atlas-progress>progress{display:block;width:100%;height:7px;accent-color:#43859a}#atlas-progress>progress::-webkit-progress-bar{background:#e4ecef;border-radius:8px}#atlas-progress>progress::-webkit-progress-value{background:#43859a;border-radius:8px}.atlas-progress-row{display:grid;grid-template-columns:22px 1fr auto;align-items:center;gap:6px 8px;width:100%;padding:10px 0;border:0;border-bottom:1px solid #e5ecef;border-radius:0;background:transparent;font-size:12px;text-align:left}.atlas-progress-row img,.atlas-favorite-row img{width:21px;height:21px;object-fit:contain}.atlas-progress-row strong{font-size:11px;font-weight:500}.atlas-progress-row:disabled{opacity:.45;cursor:default}.atlas-progress-track{grid-column:2/4;height:3px;background:#e5ecef}.atlas-progress-track i{display:block;height:100%;background:#43859a}#atlas-progress{margin-bottom:24px}.atlas-favorite-row{display:flex;gap:8px;align-items:center;padding:11px 0;text-decoration:none;border-bottom:1px solid #e5ecef;color:#315466}.atlas-favorite-row>span:nth-child(2){flex:1;min-width:0}.atlas-favorite-row>span:last-child{color:#af8321}.atlas-empty{padding:14px 0}.map-sidebar .sidebar-footer{display:flex;justify-content:space-between}.map-sidebar .sidebar-footer>a{display:none}.map-sidebar .map-options{gap:10px;font-size:11px}
.map-toolbar .atlas-world-link{display:flex;align-items:center;gap:3px;font-size:11px;white-space:nowrap;text-decoration:none}.atlas-world-link img{width:13px;height:13px}.atlas-gesture-tip{margin-left:auto;margin-right:12px;color:#75878e;font-size:10px}.map-bottom #map-context{display:inline;font-size:10px;color:#75878e}.map-workbench .map-detail{width:320px}.atlas-point-tools{display:flex;gap:6px;align-items:center;border-block:1px solid var(--line);padding:10px 0;margin:10px 0 14px}.atlas-point-tools button{border:1px solid var(--line);padding:5px 8px;min-height:30px;border-radius:4px;background:#f6f9fa;color:#31596b;font-size:12px}.atlas-point-tools #favorite-point[aria-pressed=true]{color:#835e12;background:#fff4d6;border-color:#d8bd75}.atlas-point-tools #point-position{margin-left:auto;font-size:10px;color:#6d818a}.atlas-point-tools #previous-point,.atlas-point-tools #next-point{font-size:18px;width:29px;padding:0}.atlas-point-tools button:disabled{opacity:.35;cursor:default}.map-detail-body .collect-toggle{padding:10px;background:#eef5ec;border-radius:4px}.map-point .point-label{fill:#f8fcff;stroke:none;paint-order:normal;font-family:system-ui,sans-serif;font-weight:500;pointer-events:none}.map-point .point-label-bg{fill:#193c50;fill-opacity:.93;stroke:#9db7c5;stroke-width:.7}.map-point.selected .point-label-bg{fill:#fff1bc;fill-opacity:1;stroke:#f0c64d;stroke-width:1.2}.map-point.selected .point-label{fill:#433716;font-weight:700}
@media(max-width:1000px){.map-workbench,.map-workbench.show-detail{grid-template-columns:260px minmax(0,1fr)}.atlas-gesture-tip{display:none}.map-toolbar .atlas-world-link{display:none}.map-lower-tools .map-area-bar select{max-width:180px}}
@media(max-width:720px){.map-app{padding:6px}.map-heading{margin:0 2px 6px}.map-heading h1{font-size:20px}.map-workbench:not(.expanded){height:calc(100dvh - 115px);min-height:380px}.map-toolbar h2{max-width:150px}.map-toolbar>div:first-child{flex:1 1 60%}.map-label-toggle{margin-left:auto}.map-lower-tools .map-area-bar{display:flex;flex:1 1 100%;min-width:0}.map-area-bar #map-area{min-width:0;max-width:100%;flex:1;min-height:36px;font-size:16px}.map-filter-status{min-height:24px!important}.map-bottom #map-context{display:none}.map-controls button{width:38px;height:38px}.map-workbench.show-detail .map-detail{max-height:48%;display:flex;flex-direction:column}.map-detail .detail-panel-top{flex-shrink:0}.map-detail #map-detail-content{overflow:auto;min-height:0}.map-sidebar .sidebar-tabs button{min-height:44px}.map-sidebar .sidebar-footer button{min-height:36px}.map-search input{font-size:16px}.atlas-place-tools input[type=search]{font-size:16px}}

@media(min-width:1101px){.map-workbench.show-detail{grid-template-columns:280px minmax(0,1fr) 320px}.map-workbench.filters-collapsed.show-detail{grid-template-columns:minmax(0,1fr) 320px}.map-workbench.show-detail .map-detail{position:static;inset:auto!important;width:auto;height:100%;max-height:100%;box-shadow:none}.map-workbench.show-detail .atlas-world-link{display:none}}
.map-point.selected .point-label{stroke:none;stroke-width:0}.map-workbench.show-detail .map-controls{right:12px;bottom:40px}.map-workbench.show-detail .map-filter-status{max-width:100%}
@media(min-width:721px) and (max-width:1100px){.map-workbench.show-detail .map-controls{right:332px}}
@media(max-width:720px){.map-workbench.show-detail .map-controls{right:10px;top:12px;bottom:auto}.map-workbench.show-detail .map-bottom{display:flex}}
.map-center{grid-template-columns:minmax(0,1fr)}.map-center>*{min-width:0}.map-lower-tools{overflow:hidden}.map-workbench .map-viewport{max-width:100%}
.atlas-no-points{position:absolute;left:50%;top:18px;transform:translateX(-50%);max-width:calc(100% - 100px);padding:10px 14px;background:#f8fbf9ef;color:#315365;border:1px solid #c8d8df;border-radius:6px;font-size:12px;text-align:center;box-shadow:0 2px 10px #102d4b20}.atlas-no-points[hidden]{display:none}.atlas-no-points button{display:block;margin:8px auto 0;padding:5px 8px;border:1px solid #bbccd5;background:white;color:#315c71;border-radius:3px;font-size:11px}

/* World entrances stay attached to their marker; interior maps retain a return path. */
.landmark-popup{position:absolute;z-index:6;width:270px;max-height:calc(100% - 16px);overflow:auto;padding:13px;background:#fffef8;border:1px solid #b9cbd1;border-radius:8px;box-shadow:0 6px 24px #10253555;color:#234454}.landmark-popup[hidden],.return-world-map[hidden]{display:none!important}.landmark-popup-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}.landmark-popup-heading small{font-size:10px;color:#74868c}.landmark-popup-heading h3{font-size:17px;text-align:left;margin:3px 0 0}.landmark-popup-heading button{width:27px;height:27px;border:0;background:#edf2ed;border-radius:50%;font-size:18px;color:#52695d}.landmark-destination a{display:flex;align-items:center;justify-content:center;gap:6px;padding:9px 12px;border-radius:4px;background:#eaf2ed;border:1px solid #b6cabb;color:#254d3e;font-size:13px;font-weight:600;text-decoration:none}.landmark-destination+.landmark-destination{margin-top:8px}.landmark-destination small{display:block;font-size:10px;margin-top:4px;color:#77867b}.return-world-map{font-size:11px;padding:7px 10px;border:1px solid #bacdd6;border-radius:4px;background:#edf4f8;color:#2c6076;max-width:240px;text-align:left}.map-toolbar:has(.return-world-map:not([hidden])) .atlas-world-link{display:none}
@media(max-width:720px){.map-toolbar .return-world-map{order:4;flex-basis:100%;max-width:none;padding:6px 9px}.landmark-popup{padding:11px}.landmark-destination a{min-height:40px}}

/* Compact icon buttons must not inherit the global text-button padding. */
.map-controls button,.landmark-popup-heading button,#close-filters,#close-map-detail,#close-map-help,#close-progress-dialog,#clear-search,.atlas-point-tools #previous-point,.atlas-point-tools #next-point{display:inline-flex;align-items:center;justify-content:center;padding:0;line-height:1;flex-shrink:0;text-indent:0}
.map-controls button{display:flex}.landmark-popup-heading button{font-family:system-ui,sans-serif}.landmark-popup .map-detail-body{padding:0}.landmark-popup .atlas-point-tools{margin:8px 0;padding:8px 0}.landmark-popup .map-detail-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.landmark-popup .map-detail-actions button{font-size:11px;padding:6px 9px}.landmark-popup h4{font-size:12px;margin:12px 0 7px}.landmark-popup .landmark-destination a{justify-content:flex-start}.landmark-popup p{font-size:12px}.landmark-popup .map-quest{overflow-wrap:anywhere}

.filter-group-options .map-category em{display:block;font-size:9px;font-style:normal;font-weight:400;color:#75878a;line-height:1.25}.landmark-purpose{padding:7px 9px;background:#edf3df;border-left:2px solid #8c9e5d;color:#50663c;font-size:12px}
@media(max-width:720px){.map-toolbar>div:first-child{min-width:0}.map-toolbar>div:first-child>div{min-width:0;flex:1}.map-toolbar #open-filters{flex-shrink:0;white-space:nowrap}.map-toolbar #map-title,.map-toolbar #map-subtitle{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

.landmark-condition{font-size:11px;margin-top:6px}.landmark-condition code{display:block;white-space:normal;overflow-wrap:anywhere;margin-top:5px}
/* Encounter summaries stay in the point panel; enemy links open the shared card. */
.map-battle-group{margin:8px 0 12px;border:1px solid var(--line,#d7e1df);border-radius:4px;overflow:hidden;min-width:0}
.map-battle-caption{display:flex;justify-content:space-between;gap:8px;padding:5px 9px;background:#f0f4f2;font-size:11px;color:#637775}
.map-battle-caption a{color:inherit;text-decoration:none}
.map-battle-enemy{padding:9px;background:#fffef9}
.map-battle-enemy+.map-battle-enemy{border-top:1px solid #d7e1df}
.map-battle-enemy-head{display:flex;align-items:center;gap:9px;text-decoration:none;color:#243e42;min-width:0}
.map-battle-enemy-head>span:nth-child(2){min-width:0;flex:1}
.map-battle-enemy-head strong{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.map-battle-enemy-head small{display:block;font-size:11px;color:#627575;line-height:1.6}
.map-battle-enemy-head .map-battle-portrait{width:44px;height:44px;flex:0 0 44px;object-fit:contain}
.map-battle-open{margin-left:auto;color:#64818a}
.map-battle-weakness{display:flex;align-items:center;gap:6px;min-height:24px;font-size:11px;color:#627575;margin:3px 0}
.map-battle-weakness img{width:18px;height:18px;object-fit:contain}
.map-battle-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 8px;margin:4px 0 8px;font-size:11px;font-variant-numeric:tabular-nums}
.map-battle-stats>div{display:flex;align-items:baseline;justify-content:space-between;gap:4px;min-width:0}
.map-battle-stats dt{color:#657b7c;font-weight:400;white-space:nowrap}
.map-battle-stats dd{margin:0;font-weight:600;color:#243e42}
.map-battle-loot{display:flex;align-items:baseline;gap:8px;font-size:11px;line-height:1.8;margin-top:3px}
.map-battle-loot-label{flex:0 0 auto;color:#657b7c}
.map-battle-loot>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 9px;min-width:0}
.map-battle-loot-item{display:inline-flex;gap:4px;align-items:baseline;flex-wrap:wrap}
.map-battle-loot-item small{color:#657b7c;font-size:10px}
.map-battle-loot-item a{color:#315b64;text-underline-offset:2px;overflow-wrap:anywhere}
.map-battle-loot-item sup{font-size:10px;line-height:1.4;padding:0 3px;border-radius:3px;background:#f8dc83;color:#65480c;font-weight:700}
.map-battle-steal{flex-basis:100%;font-size:10px;color:#657b7c}
.map-battle-unresolved{margin:8px;font-size:12px;line-height:1.6;color:#657b7c}
.map-battle-enemy-head:hover strong,.map-battle-caption a:hover{text-decoration:underline}
