/* Keep the map-style picker in the explorer; preserve room for data layers. */
.basemap-picker{flex-shrink:0;margin:0 12px 10px;border-bottom:1px solid var(--border);padding-bottom:8px}
.basemap-picker>summary{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;list-style:none;font-weight:600}
.basemap-picker>summary::-webkit-details-marker{display:none}
.basemap-picker>summary:after{content:'›';margin-left:auto;font-size:22px;transform:rotate(-90deg)}
.basemap-picker[open]>summary:after{transform:rotate(90deg)}
.basemap-picker fieldset{display:grid;grid-template-columns:1fr 1fr;gap:6px;border:0;padding:4px 0 8px;margin:0;min-width:0}
.basemap-picker label{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 8px;border:1px solid var(--border);border-radius:5px;cursor:pointer;overflow-wrap:anywhere}
.basemap-picker label:has(input:checked){border-color:var(--accent);background:var(--raised)}
.basemap-picker input{accent-color:var(--accent);margin:0;flex-shrink:0}
.layers[data-expanded="false"] .basemap-picker{display:none}
/* The chosen basemap no longer changes when the interface theme changes. */
/* Filter individual tiles: filtering the translated pane can clip large Retina maps. */
html[data-map-background="anthracite"] .leaflet-tile-pane{opacity:.65;filter:none}
html[data-map-background="anthracite"] .leaflet-tile-pane .leaflet-tile{filter:invert(1) grayscale(1) brightness(.58) contrast(1.05)}
html[data-map-background="anthracite"] .map-stage,html[data-map-background="anthracite"] #map{background:#191a1c}
html[data-map-background="anthracite"] .leaflet-fallback-pane .map-land{fill:#111214;stroke:#393c40}
html[data-map-background="anthracite"] .leaflet-fallback-pane .map-portugal{fill:#141517}
html[data-map-background="anthracite"] .country-outline{stroke:#64696e}
html[data-map-background="anthracite"] .city-label{color:#e6e8eb;text-shadow:-1px -1px 0 #101113,1px -1px 0 #101113,-1px 1px 0 #101113,1px 1px 0 #101113}
html[data-map-background="anthracite"] .city-label.major{color:#fff}
html[data-map-background="color"] .leaflet-tile-pane,html[data-map-background="satellite"] .leaflet-tile-pane,html[data-map-background="hybrid"] .leaflet-tile-pane{filter:none;opacity:1}
html[data-map-background="color"] .map-stage,html[data-map-background="color"] #map{background:#aad3df}
html[data-map-background="satellite"] .map-stage,html[data-map-background="satellite"] #map,html[data-map-background="hybrid"] .map-stage,html[data-map-background="hybrid"] #map{background:#14232a}
html[data-map-background="color"] .map-credit{color:#17212b;text-shadow:0 0 3px #fff,0 0 3px #fff}
html[data-map-background="satellite"] .map-credit,html[data-map-background="hybrid"] .map-credit,html[data-map-background="anthracite"] .map-credit{color:#fff;text-shadow:0 0 3px #000,0 0 3px #000}
html[data-map-background="anthracite"] .map-context,html[data-map-background="satellite"] .map-context,html[data-map-background="hybrid"] .map-context,html[data-map-background="anthracite"] .map-key>span,html[data-map-background="satellite"] .map-key>span,html[data-map-background="hybrid"] .map-key>span{color:#fff;text-shadow:0 0 3px #000,0 0 3px #000}
html[data-map-background="anthracite"] .context-note,html[data-map-background="satellite"] .context-note,html[data-map-background="hybrid"] .context-note{color:#d0d4dc}
@media(max-width:640px){
 html[data-map-background="satellite"] .map-key,html[data-map-background="hybrid"] .map-key{bottom:62px}
 html[data-map-background="satellite"] .regions,html[data-map-background="hybrid"] .regions{bottom:110px}
}
html[data-map-background="color"] .map-context,html[data-map-background="color"] .map-key>span{color:#17212b;text-shadow:0 0 3px #fff,0 0 3px #fff}
html[data-map-background="color"] .context-note{color:#374755}
