.site-map-page {
    display: grid;
    gap: 1.5rem;
}

.site-map-summary {
    font-size: 0.95rem;
    line-height: 1.5;
}

.site-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.site-map-frame,
.site-map-sidebar {
    background: #f7f4ec;
    border: 1px solid #d3cab7;
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 1.5rem rgb(45 41 31 / 0.08);
    height: min(72vh, 640px);
}

.site-map-frame {
    padding: 1rem;
}

.site-map-canvas {
    height: 100%;
    min-height: 420px;
    position: relative;
    border-radius: 0.35rem;
    overflow: hidden;
}

.site-map-canvas svg {
    display: block;
    width: 100%;
    height: 100%;
}

.site-map-sidebar {
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
}

.site-map-sidebar h3 {
    margin-top: 0;
}

.site-map-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.site-map-list-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.site-map-list-item a {
    font-weight: 600;
}

.site-map-list-meta {
    color: #5a5345;
    font-size: 0.9rem;
}

.site-map-list-item.out-of-bounds {
    opacity: 0.72;
}

.site-map-legend {
    display: flex;
    padding-top: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.legend-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    display: inline-block;
}

.legend-dot.sm {
    background-color: #d4a570;
}

.legend-dot.md {
    background-color: #a86428;
}

.legend-dot.lg {
    background-color: #6b3310;
}

.legend-dot.xl {
    background-color: #352208;
}

.site-map-background {
    fill: #e7efe9;
}

.site-map-frame-rect {
    fill: none;
    stroke: #8da5a0;
    stroke-width: 1.5;
}

.site-map-grid-line {
    stroke: rgb(67 91 85 / 0.2);
    stroke-width: 1;
}

.site-map-grid-label {
    fill: #56615d;
    font-size: 0.75rem;
    text-anchor: middle;
}

.site-map-marker circle {
    stroke: rgb(255 255 255 / 0.9);
    stroke-width: 1.2;
    transition: transform 120ms ease, r 120ms ease;
}

.site-map-marker:hover circle,
.site-map-marker:focus circle {
    r: 6.5;
}

.ol-popup {
    position: absolute;
    background: rgb(255 255 255 / 0.96);
    border: 1px solid #c7bca8;
    border-radius: 0.35rem;
    padding: 0.45rem 0.6rem;
    box-shadow: 0 0.35rem 1rem rgb(32 25 15 / 0.25);
    transform: translate(-50%, -110%);
    white-space: nowrap;
}

.ol-popup a {
    font-weight: 700;
    text-decoration: none;
    color: #2f2a20;
}

.ol-popup .popup-meta {
    display: inline;
    margin-left: 0.35rem;
    color: #5a5345;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .site-map-layout {
        grid-template-columns: 1fr;
    }

    .site-map-frame,
    .site-map-sidebar {
        height: min(64vh, 520px);
    }

    .site-map-canvas {
        height: 100%;
        min-height: 340px;
    }
}