.ug-page {
    max-width: 1400px;
}

.ug-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1rem;
}

.ug-panel {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.ug-map-frame {
    position: relative;
}

#ultimate-map {
    width: 100%;
    height: calc(100vh - 240px);
    min-height: 640px;
}

.ug-status {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 650;
    background: rgba(17, 46, 81, 0.9);
    color: #fff;
    padding: 0.45rem 0.65rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    line-height: 1rem;
    max-width: 88%;
}

.ug-section + .ug-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #d1d5db;
}

.ug-heading {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ug-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.ug-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}

.ug-button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.ug-tight-grid {
    margin-bottom: 0.55rem;
}

.ug-btn {
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
}

.ug-tree {
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    padding: 0.35rem 0.55rem;
    margin-top: 0.45rem;
    background: #f9fafb;
}

.ug-tree > summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.ug-count {
    margin-left: auto;
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 600;
}

.ug-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 9999px;
    display: inline-block;
    margin-right: 0.45rem;
    vertical-align: middle;
}

.ug-legend-row {
    font-size: 0.82rem;
    color: #374151;
    margin-bottom: 0.35rem;
}

.ug-toast {
    background: rgba(5, 94, 162, 0.92);
}

.ug-toast-error {
    background: rgba(175, 40, 30, 0.92);
}

.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
}

body.theme-dark .ug-section + .ug-section {
    border-top-color: #334155;
}

body.theme-dark .ug-heading,
body.theme-dark .ug-check,
body.theme-dark .ug-legend-row {
    color: #e2e8f0;
}

body.theme-dark .ug-tree {
    background: #0b1220;
    border-color: #334155;
}

body.theme-dark .ug-count {
    color: #93c5fd;
}

body.theme-dark .ug-status {
    background: rgba(15, 23, 42, 0.94);
}

@media (max-width: 1200px) {
    .ug-layout {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 960px) {
    .ug-layout {
        grid-template-columns: 1fr;
    }

    .ug-panel {
        max-height: none;
    }

    #ultimate-map {
        height: 68vh;
        min-height: 480px;
    }
}
