.map-page {
    min-height: calc(100vh - 9rem);
}

.map-panel {
    position: sticky;
    top: 5.2rem;
}

.map-canvas {
    width: 100%;
    min-height: 80vh;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.layer-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.45rem 0.3rem;
}

.layer-item input,
.layer-color {
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

.layer-color {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 0.2rem;
    border: 1px solid rgba(16, 24, 40, 0.2);
}

.layer-text {
    line-height: 1.25;
}

.layer-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 0.25rem;
}

.layer-group-label {
    flex: 1;
    font-weight: 600;
    font-size: 0.875rem;
}

.layer-group-toggle {
    background: none;
    border: none;
    padding: 0 0.1rem;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1;
}

.layer-group-toggle:hover {
    color: #000;
}

.layer-group-content {
    padding-left: 0.75rem;
}

.sidebar-open-btn {
    position: fixed;
    top: 7rem;
    left: 0;
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    transition: background-color 0.15s;
}

.sidebar-open-btn:hover {
    background-color: #f8f9fa;
}

.leaflet-control-layers:not(.leaflet-control-layers-expanded) {
    display: none;
}

.map-layer-toggle {
    font-size: 1rem;
    font-weight: bold;
}

@media (max-width: 991px) {
    .map-panel {
        position: static;
    }

    .map-canvas {
        min-height: 60vh;
    }
}
