/* Both the corpus landing map and individual text maps use this theme treatment.
   Filter raster tiles only; markers and other imagery retain their original colors. */
[data-bs-theme="dark"] :is(.corpus-map, .corpus-wide-map) .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.95);
}
:is(.corpus-map, .corpus-wide-map).leaflet-container { background: var(--teber-color-surface-subtle); }
:is(.corpus-map, .corpus-wide-map) :is(.leaflet-control-zoom a, .leaflet-control-attribution, .leaflet-popup-content-wrapper, .leaflet-popup-tip) {
    background: var(--teber-color-surface);
    color: var(--teber-color-text);
}
:is(.corpus-map, .corpus-wide-map) .leaflet-control-zoom a:hover { background: var(--teber-color-surface-subtle); }
:is(.corpus-map, .corpus-wide-map) .leaflet-control-attribution a { color: var(--teber-color-primary); }

.corpus-map-label.leaflet-tooltip-top::before { border-top-color: var(--teber-color-surface); }
