.areas-map-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(21rem, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.areas-map-main-card,
.areas-map-list-card {
    min-height: 0;
}

.areas-map-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.areas-map-surface {
    min-height: calc(100vh - 18rem);
    position: relative;
    z-index: 1;
}

#areas-map {
    min-height: calc(100vh - 18rem);
    width: 100%;
    border-radius: 0.9rem;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.areas-map-grid .leaflet-container,
.areas-map-grid .leaflet-pane,
.areas-map-grid .leaflet-top,
.areas-map-grid .leaflet-bottom,
.areas-map-grid .leaflet-control-container {
    z-index: 1 !important;
}

.areas-map-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.areas-map-search {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    background: rgb(241 245 249);
}

.areas-map-filter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.areas-map-filter-btn {
    border: 1px solid transparent;
    border-radius: 0.75rem;
    padding: 0.65rem 0.5rem;
    font-weight: 600;
    background: rgb(241 245 249);
    cursor: pointer;
    color: rgb(51 65 85);
}

.areas-map-filter-btn.active[data-filter="all"] {
    background: rgb(6 78 59);
    border-color: rgb(6 78 59);
    color: white;
}

.areas-map-filter-btn.active[data-filter="spring"] {
    background: rgb(22 163 74);
    border-color: rgb(22 163 74);
    color: white;
}

.areas-map-filter-btn.active[data-filter="autumn"] {
    background: rgb(234 88 12);
    border-color: rgb(234 88 12);
    color: white;
}

.areas-map-counters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.areas-map-counter {
    border-radius: 1rem;
    padding: 0.8rem;
    text-align: center;
    border: 1px solid rgb(226 232 240);
}

.areas-map-counter.neutral {
    background: rgb(6 78 59);
    color: white;
}

.areas-map-counter.spring {
    background: rgb(22 163 74);
    color: white;
}

.areas-map-counter.autumn {
    background: rgb(234 88 12);
    color: white;
}

.areas-map-counter-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.areas-map-counter-label {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: inherit;
    opacity: 0.9;
}

.areas-map-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: visible;
}

.areas-map-item {
    border: 1px solid rgb(226 232 240);
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: 0.15s ease;
    background: transparent;
}

.areas-map-item:hover,
.areas-map-item.active {
    border-color: rgb(34 197 94);
    background: rgb(240 253 244);
}

.areas-map-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.areas-map-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.areas-map-item-location,
.areas-map-item-meta {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: rgb(100 116 139);
}

.areas-map-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.areas-map-badge.spring {
    background: rgb(220 252 231);
    color: rgb(21 128 61);
}

.areas-map-badge.autumn {
    background: rgb(255 237 213);
    color: rgb(194 65 12);
}

.areas-map-badge.none {
    background: rgb(226 232 240);
    color: rgb(71 85 105);
}

.areas-map-detail {
    border-top: 1px solid rgb(226 232 240);
    margin-top: 1rem;
    padding-top: 1rem;
}

.areas-map-detail.hidden {
    display: none;
}

.areas-map-detail-name {
    font-size: 1rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.areas-map-detail-location {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: rgb(100 116 139);
}

.areas-map-legend {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(226 232 240);
    display: grid;
    gap: 0.75rem;
}

.areas-map-legend-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.areas-map-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.9rem;
}

.areas-map-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgb(71 85 105);
}

.areas-map-legend-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 9999px;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1);
}

.areas-map-seasons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.areas-map-season {
    border: 1px solid rgb(226 232 240);
    border-radius: 0.9rem;
    background: transparent;
    padding: 0.85rem;
}

.areas-map-season-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.areas-map-season-title {
    font-weight: 700;
    color: rgb(15 23 42);
}

.areas-map-season-line {
    margin-top: 0.4rem;
    font-size: 0.88rem;
    color: rgb(71 85 105);
}

.areas-map-season-reasons {
    margin-top: 0.55rem;
    font-size: 0.78rem;
    color: rgb(100 116 139);
}

.areas-map-detail-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
}

.areas-map-empty {
    font-size: 0.9rem;
    color: rgb(100 116 139);
}

@media (max-width: 1024px) {
    .areas-map-grid {
        grid-template-columns: 1fr;
    }

    .areas-map-surface,
    #areas-map {
        min-height: 22rem;
    }
}
