.slsp-map, .slsp-map-home, .slsp-pin-editor {
    --map-ink: #12354a;
    --map-blue: #075c83;
    --map-muted: #435f71;
    --map-pale: #eef7fb;
    --map-line: #cbdee8;
    color: var(--map-ink);
}

.slsp-map [hidden], .slsp-pin-editor [hidden] { display: none !important; }

.slsp-map {
    --map-height: clamp(31rem, 62vh, 39rem);
    margin-block: 0 2.4rem;
}

.slsp-map__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .4rem 1rem;
    margin-bottom: .8rem;
}
.slsp-map__top p { margin: 0; color: var(--map-muted); }
.slsp-map__top a { font-weight: 750; }

.slsp-map__filters {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
    gap: .65rem;
    border: 1px solid var(--map-line);
    background: var(--map-pale);
    border-radius: .75rem;
    padding: .8rem;
    margin-bottom: .8rem;
}
.slsp-map__filters label { display: grid; gap: .3rem; font-size: .88rem; font-weight: 750; min-width: 0; }
.slsp-map__filters :is(input, select), .slsp-map button {
    box-sizing: border-box;
    border: 1px solid #9cbcca;
    border-radius: .5rem;
    background: #fff;
    color: var(--map-ink);
    font: inherit;
}
.slsp-map__filters :is(input, select) { min-width: 0; width: 100%; min-height: 2.75rem; padding: .45rem .6rem; }
.slsp-map button { cursor: pointer; }
.slsp-map .slsp-map__clear { min-height: 2.75rem; padding: .4rem .75rem; font-size: .88rem; font-weight: 750; }
.slsp-map button:hover { border-color: var(--map-blue); background: var(--map-pale); }
.slsp-map :is(a, input, select, button, [tabindex]):focus-visible { outline: 3px solid #1c82ad; outline-offset: 2px; }

.slsp-map__view-switch { display: none; }
.slsp-map__status { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .85rem; margin-block: 0 .65rem; }
.slsp-map__status span { color: var(--map-muted); font-size: .86rem; font-weight: 700; }
.slsp-map__layout { display: grid; gap: .8rem; align-items: start; }
.slsp-map.has-map .slsp-map__layout { grid-template-columns: minmax(0, 1.8fr) minmax(17rem, 1fr); }

.slsp-map__surface, .slsp-map__results {
    position: relative;
    min-width: 0;
    border: 1px solid var(--map-line);
    border-radius: .8rem;
    overflow: hidden;
    background: #fff;
}
.slsp-map__canvas, .slsp-pin-editor__canvas {
    background: #e2eff3;
    isolation: isolate;
    z-index: 0;
    font-family: inherit;
}
.slsp-map__canvas { height: var(--map-height); }
.slsp-map .leaflet-container { font-family: inherit; }
.slsp-map .leaflet-control-zoom a { color: var(--map-ink); text-decoration: none; }
.slsp-map .leaflet-control-attribution { padding-inline: .45rem; font-size: .71rem; }
.slsp-map .leaflet-control-attribution a { color: #15506b; }
.slsp-map .slsp-map__fit {
    position: absolute;
    z-index: 1;
    top: .7rem;
    right: .7rem;
    max-width: calc(100% - 4.5rem);
    min-height: 2.5rem;
    padding: .45rem .7rem;
    font-size: .83rem;
    font-weight: 750;
}
.slsp-map__error, .slsp-pin-editor [data-map-error] { color: #654320; background: #fff6e9; padding: .6rem .75rem; margin: 0; }
.slsp-map__error { position: absolute; z-index: 2; bottom: 1.6rem; right: .6rem; left: .6rem; font-size: .82rem; border-radius: .4rem; }

.slsp-map__results { display: flex; flex-direction: column; }
.slsp-map.has-map .slsp-map__results { height: calc(var(--map-height) + 2px); }
.slsp-map__results-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: .35rem .7rem;
    padding: .75rem .85rem;
    border-bottom: 1px solid var(--map-line);
    background: #f8fbfd;
}
.slsp-map .slsp-map__results-head h2 { font-size: 1.13rem; line-height: 1.3; margin: 0; }
.slsp-map__list { position: relative; min-height: 0; overflow-y: auto; }
.slsp-map__list:focus-visible { outline-offset: -3px; }
.slsp-map__place { padding: .82rem .92rem; border-left: 3px solid transparent; border-bottom: 1px solid #e4edf2; }
.slsp-map__place:last-child { border-bottom: 0; }
.slsp-map__place.is-selected { background: var(--map-pale); border-left-color: var(--map-blue); }
.slsp-map .slsp-map__place h3 { font-size: 1.14rem; line-height: 1.3; margin: .16rem 0 .3rem; overflow-wrap: anywhere; }
.slsp-map .slsp-map__place h3 a { color: var(--map-ink); text-underline-offset: .15em; }
.slsp-map .slsp-map__place-label { margin: 0; font-size: .79rem; color: var(--map-blue); font-weight: 750; }
.slsp-map .slsp-map__place-label:empty { display: none; }
.slsp-map .slsp-map__address { margin: 0; color: var(--map-muted); font-size: .86rem; overflow-wrap: anywhere; }
.slsp-map .slsp-map__empty { padding: .85rem; color: var(--map-muted); margin: 0; }
.slsp-map__actions { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; margin-top: .48rem; font-size: .83rem; font-weight: 750; }
.slsp-map__actions button { min-height: 2.4rem; padding: .32rem .55rem; }
.slsp-map__actions a { display: inline-flex; gap: .24rem; align-items: center; min-height: 2.4rem; color: var(--map-blue); text-underline-offset: .15em; }

.slsp-map__marker span {
    display: block;
    width: 26px;
    height: 26px;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--map-blue);
    box-shadow: 1px 2px 5px #0b293b70;
}
.slsp-map__marker span::after {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    margin: 7px auto;
    border-radius: 50%;
    background: #fff;
}
.slsp-map__marker:where(:hover, :focus-visible) span { background: #123952; }
.slsp-map__popup { display: flex; flex-wrap: wrap; gap: .4rem .7rem; }
.slsp-map__popup strong { flex-basis: 100%; font-size: .94rem; line-height: 1.3; color: var(--map-ink); }
.slsp-map__popup a { color: var(--map-blue); font-weight: 750; }

.slsp-map-home {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: stretch;
    border: 1px solid var(--map-line);
    border-radius: 1rem;
    overflow: hidden;
    margin-block: 0 clamp(1.7rem, 5vw, 4rem);
    background: var(--map-pale);
}
.slsp-map-home__copy { align-self: center; padding: clamp(1.25rem, 4vw, 3.2rem); }
.slsp-map-home h2 { font-size: clamp(1.6rem, 3.4vw, 2.65rem); line-height: 1.12; margin: 0; }
.slsp-map-home p { margin: .7rem 0 1rem; max-width: 35ch; }
.slsp-map-home img { display: block; width: 100%; height: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

.slsp-pin-editor__canvas { width: 100%; height: clamp(15rem, 43vh, 26rem); border: 1px solid #b9d0db; border-radius: .5rem; }
.slsp-pin-editor__legacy { padding: .25rem .7rem .65rem; margin-top: .6rem; background: #f0f6fa; border-radius: .4rem; }

@media (min-width: 60em) {
    .sls-entry-content > .slsp-map {
        --map-width: min(calc(100vw - 3rem), 80rem);
        width: var(--map-width);
        margin-inline: calc((100% - var(--map-width)) / 2);
    }
}
@media (max-width: 54em) {
    .slsp-map { --map-height: clamp(21rem, 58vh, 33rem); }
    .slsp-map.has-map .slsp-map__layout { grid-template-columns: minmax(0, 1fr); }
    .slsp-map.has-map .slsp-map__results { height: auto; }
    .slsp-map__view-switch { display: flex; gap: .4rem; }
    .slsp-map__view-switch button { min-height: 2.75rem; min-width: 4.3rem; font-weight: 750; }
    .slsp-map__view-switch [aria-pressed="true"] { border-color: var(--map-blue); background: var(--map-blue); color: #fff; }
    .slsp-map[data-map-mode="list"] .slsp-map__surface, .slsp-map[data-map-mode="map"] .slsp-map__results { display: none; }
    .slsp-map__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 36em) {
    .slsp-map__filters label:first-child { grid-column: 1 / -1; }
    .slsp-map .slsp-map__clear { grid-column: 1 / -1; justify-self: start; min-height: 2.4rem; }
    .slsp-map-home { grid-template-columns: minmax(0, 1fr); }
}
