.national-forecast-page {
    display: grid;
    gap: 24px;
}

.national-forecast-card {
    overflow: hidden;
}

.national-forecast-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.national-forecast-head h2 {
    margin-bottom: 4px;
}

.national-forecast-date-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.national-forecast-date-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.national-forecast-date-nav-link:hover {
    border-color: var(--border);
    background: var(--panel-soft);
    color: var(--text);
}

.national-forecast-date-nav-link span {
    font-size: 18px;
    line-height: 1;
}

.national-forecast-date-nav-link.is-disabled {
    opacity: 0.35;
    cursor: default;
}

.national-forecast-date-nav-link.is-disabled:hover {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.national-forecast-date {
    position: relative;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.national-forecast-date-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.national-forecast-date-button:hover {
    border-color: var(--border);
    background: var(--panel-soft);
}

.national-forecast-date-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--gold);
}

.national-forecast-date-picker {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.national-forecast-region-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.national-forecast-region-tab {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.national-forecast-region-tab:hover {
    color: var(--text);
}

.national-forecast-region-tab.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.national-forecast-run-control {
    margin-bottom: 16px;
    padding: 12px 16px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-soft);
}

.national-forecast-run-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.national-forecast-run-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.national-forecast-run-head strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.national-forecast-run-slider {
    width: 100%;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.national-forecast-run-slider:disabled {
    opacity: 0.55;
    cursor: default;
}

.national-forecast-run-times {
    display: grid;
    grid-template-columns:
        repeat(
            var(--forecast-run-count),
            minmax(0, 1fr)
        );
    gap: 6px;
    margin-top: 6px;
}

.national-forecast-run-time {
    min-width: 0;
    padding: 4px 3px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.national-forecast-run-time:hover,
.national-forecast-run-time.is-active {
    color: var(--text);
}

.national-forecast-run-time.is-active {
    font-weight: 900;
}

.national-forecast-map-wrap {
    position: relative;
    width: 100%;
    height: 680px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-soft);
}

.national-forecast-map {
    position: absolute;
    inset: 0;
}

.national-forecast-legend {
    position: absolute;
    z-index: 4;
    left: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(8, 14, 26, 0.92);
    color: #fff;
    font-size: 11px;
    backdrop-filter: blur(8px);
}

.national-forecast-legend strong {
    margin-right: 3px;
    font-size: 11px;
}

.national-forecast-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.national-forecast-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.national-forecast-legend .score-excellent,
.national-city-marker.score-excellent {
    background: #27c778;
}

.national-forecast-legend .score-good,
.national-city-marker.score-good {
    background: #85c84a;
}

.national-forecast-legend .score-fair,
.national-city-marker.score-fair {
    background: #e1bd3f;
}

.national-forecast-legend .score-poor,
.national-city-marker.score-poor {
    background: #e68135;
}

.national-city-marker {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    color: #fff;
    font: inherit;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.national-city-marker:hover {
    z-index: 5;
    transform: scale(1.12);
}

.national-city-marker.is-hidden,
.national-forecast-best-region.is-hidden {
    display: none;
}

.national-city-marker strong {
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.maplibregl-popup-content {
    padding: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.maplibregl-popup-tip {
    border-top-color: #111827 !important;
}

.national-forecast-popup {
    display: grid;
    gap: 5px;
    min-width: 170px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
}

.national-forecast-popup strong {
    font-size: 14px;
}

.national-forecast-popup span {
    font-size: 13px;
    font-weight: 800;
}

.national-forecast-popup small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
}

.national-forecast-popup .score-excellent {
    color: #27c778;
}

.national-forecast-popup .score-good {
    color: #85c84a;
}

.national-forecast-popup .score-fair {
    color: #e1bd3f;
}

.national-forecast-popup .score-poor {
    color: #e68135;
}

.maplibregl-ctrl-attrib {
    font-size: 10px;
}

.national-forecast-brand {
    position: absolute;
    z-index: 4;
    right: 18px;
    bottom: 18px;
    padding: 7px 11px;
    border-radius: 8px;
    background: rgba(8, 14, 26, 0.88);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
}

.national-forecast-best-region {
    display: grid;
    gap: 5px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 10px;
    background: var(--panel-soft);
}

.national-forecast-best-region span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.national-forecast-best-region strong {
    font-size: 20px;
}

.national-forecast-best-region em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.national-forecast-best-region p {
    margin: 12px 0 0;
    line-height: 1.65;
}

.national-forecast-page .weather-intelligence-grid .weather-section-note {
    margin-top: 10px;
    line-height: 1.7;
}

.national-forecast-best-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.national-forecast-best-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--panel-soft);
}

.national-forecast-best-row span {
    font-weight: 800;
}

.national-forecast-best-row strong {
    font-size: 16px;
}

.national-forecast-best-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

@media (max-width: 800px) {
    .national-forecast-head {
        display: block;
    }

    .national-forecast-date-nav {
        justify-content: flex-start;
        margin-top: 10px;
    }

    .national-forecast-run-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .national-forecast-run-times {
        overflow-x: auto;
    }

    .national-forecast-run-time {
        min-width: 72px;
    }

    .national-forecast-map-wrap {
        height: 570px;
    }

    .national-forecast-legend {
        right: 10px;
        bottom: 10px;
        left: 10px;
        flex-wrap: wrap;
        gap: 7px 12px;
    }

    .national-city-marker {
        width: 38px;
        height: 38px;
    }
}