/* Leaflet puts its panes at z-index 400 and its controls at 1000, on the page's own
   stacking context, so a map slides over a sticky header that sits at 40. Giving the map
   container its own stacking context keeps all of that inside the map, where it belongs.

   Loaded wherever Leaflet is. Base rules first, media queries last (check_cascade.py). */

.leaflet-container {
    position: relative;
    z-index: 0;            /* positioned + z-index = a stacking context of its own */
    isolation: isolate;
}

/* The exact-spot picker layers a crosshair and a cover over its map; same treatment. */
[data-spot] > div:has(> [data-spot-map]) {
    position: relative;
    z-index: 0;
    isolation: isolate;
}

/* Belt and braces for browsers without :has() */
.map-layer { position: relative; z-index: 0; isolation: isolate; }
