.weather-page .page-hero {
    align-items: stretch;
}

.weather-hub-hero,
.weather-forecast-hero {
    margin-top: 6px;
}

.weather-hub-shell,
.weather-forecast-shell,
.weather-hub-aside,
.weather-forecast-aside,
.weather-tool-card,
.weather-search-panel,
.weather-overview-card,
.weather-metric-card,
.weather-day-card,
.weather-loading-state,
.weather-empty-state {
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(17, 28, 40, 0.94), rgba(9, 16, 26, 0.97));
    color: #f2f7fb;
    box-shadow: 0 24px 68px rgba(4, 12, 22, 0.28);
}

.weather-hub-shell,
.weather-forecast-shell {
    display: grid;
    gap: 16px;
}

.weather-hub-aside,
.weather-forecast-aside {
    display: grid;
    gap: 14px;
    align-content: start;
}

.weather-page .page-hero-card h1,
.weather-page .page-hero-aside h2,
.weather-page .page-hero-card p,
.weather-page .page-hero-aside p {
    color: inherit;
}

.weather-page .page-hero-card h1 {
    margin: 4px 0 0;
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.weather-page .page-hero-aside h2 {
    margin: 0;
    font-size: clamp(1.3rem, 2.3vw, 1.8rem);
    line-height: 1.12;
}

.weather-page .page-hero-card .hero-text,
.weather-page .page-hero-aside p,
.weather-page .page-hero-card .weather-breadcrumbs,
.weather-empty-copy,
.weather-loading-state p,
.weather-empty-state p,
.weather-metric-card p,
.weather-day-meta,
.weather-overview-summary,
.weather-location-line,
.weather-search-help,
.weather-search-feedback {
    color: rgba(226, 235, 243, 0.78);
}

.weather-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
}

.weather-breadcrumbs a {
    color: #8fd7d0;
}

.weather-hub-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.weather-hub-highlights span,
.weather-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.08);
    color: #eef5fb;
    font-size: 0.9rem;
    font-weight: 700;
}

.weather-meta-chip {
    min-height: 34px;
    color: rgba(235, 242, 247, 0.86);
    font-size: 0.84rem;
    font-weight: 600;
}

.weather-meta-chip.is-warning {
    border-color: rgba(255, 208, 137, 0.18);
    background: rgba(255, 208, 137, 0.12);
    color: #ffe2aa;
}

.weather-aside-intro {
    margin: 0;
}

.weather-guide-list,
.weather-empty-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 10px;
    line-height: 1.65;
    color: rgba(236, 243, 249, 0.88);
}

.weather-guide-list li::marker,
.weather-empty-list li::marker {
    color: #8fd7d0;
}

.weather-hub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.weather-tools-section,
.weather-results-section {
    padding-top: 20px;
    padding-bottom: 24px;
}

.weather-section-heading {
    margin-bottom: 16px;
}

.weather-section-heading-compact {
    align-items: flex-start;
}

.weather-section-heading-compact h2,
.weather-forecast-heading h2 {
    margin: 0;
    font-size: 1.48rem;
    line-height: 1.16;
    color: var(--text);
}

.weather-section-note {
    max-width: 48ch;
    margin: 0;
    color: var(--text-soft);
}

.weather-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.weather-tool-card {
    display: grid;
    gap: 12px;
    padding: 22px;
    align-content: start;
}

.weather-tool-card-primary {
    border-color: rgba(143, 215, 208, 0.24);
}

.weather-tool-card-secondary {
    border-color: rgba(255, 255, 255, 0.1);
}

.weather-tool-card h3,
.weather-empty-state h2,
.weather-loading-state h2,
.weather-overview-card h2 {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.18;
    color: #f7fbff;
}

.weather-tool-card p,
.weather-empty-state p,
.weather-loading-state p,
.weather-search-feedback,
.weather-search-help,
.weather-metric-card p,
.weather-overview-summary,
.weather-day-meta,
.weather-location-line {
    margin: 0;
}

.weather-tool-kicker,
.weather-overview-kicker,
.weather-metric-title,
.weather-day-name,
.weather-search-label,
.weather-day-temp-label {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
    color: #8fd7d0;
}

.weather-search-panel {
    position: relative;
    padding: 20px;
}

.weather-search-form {
    display: grid;
    gap: 12px;
}

.weather-search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.weather-search-input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid rgba(143, 215, 208, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #f4f8fb;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.weather-search-input::placeholder {
    color: rgba(226, 235, 243, 0.5);
}

.weather-search-input:focus {
    border-color: rgba(143, 215, 208, 0.45);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(143, 215, 208, 0.12);
}

.weather-search-feedback {
    min-height: 1.35rem;
    font-size: 0.93rem;
}

.weather-search-feedback[data-state="success"] {
    color: #90f0bd;
}

.weather-search-feedback[data-state="warning"] {
    color: #ffd089;
}

.weather-search-feedback[data-state="error"] {
    color: #ff9a9a;
}

.weather-search-feedback[data-state="loading"] {
    color: #9ec7ff;
}

.weather-suggestions {
    display: grid;
    gap: 8px;
    padding-top: 4px;
}

.weather-suggestion-button {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    color: #f4f8fb;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.weather-suggestion-button strong {
    font-size: 1rem;
}

.weather-suggestion-button span {
    color: rgba(226, 235, 243, 0.72);
    font-size: 0.92rem;
}

.weather-suggestion-button:hover,
.weather-suggestion-button.is-active {
    transform: translateY(-1px);
    border-color: rgba(143, 215, 208, 0.35);
    background: rgba(143, 215, 208, 0.14);
}

.weather-results,
.weather-result-shell,
.weather-forecast-block {
    display: grid;
    gap: 18px;
}

.weather-results-empty {
    min-height: 240px;
}

.weather-overview-card,
.weather-loading-state,
.weather-empty-state {
    padding: 22px;
}

.weather-overview-card {
    display: grid;
    gap: 18px;
}

.weather-overview-card.weather-theme-clear {
    border-color: rgba(126, 216, 255, 0.22);
}

.weather-overview-card.weather-theme-cloudy {
    border-color: rgba(182, 198, 217, 0.18);
}

.weather-overview-card.weather-theme-rain,
.weather-overview-card.weather-theme-storm {
    border-color: rgba(131, 212, 206, 0.22);
}

.weather-overview-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.weather-overview-copy {
    display: grid;
    gap: 8px;
}

.weather-overview-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
    gap: 18px;
    align-items: end;
}

.weather-temperature-block {
    display: grid;
    gap: 8px;
}

.weather-temperature-block strong {
    font-size: clamp(2.5rem, 4.2vw, 3.7rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: #ffffff;
}

.weather-temperature-block span,
.weather-day-date,
.weather-primary-stat span,
.weather-sun-card span {
    color: rgba(226, 235, 243, 0.74);
}

.weather-primary-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.weather-primary-stat,
.weather-sun-card,
.weather-day-temp {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.06);
}

.weather-primary-stat strong,
.weather-sun-card strong {
    font-size: 1.08rem;
    color: #ffffff;
}

.weather-overview-summary {
    font-size: 0.98rem;
    line-height: 1.7;
}

.weather-sun-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.weather-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.weather-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.weather-metric-card {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.weather-metric-card strong {
    font-size: 1.3rem;
    line-height: 1.12;
    color: #ffffff;
}

.weather-metric-card p {
    font-size: 0.92rem;
    line-height: 1.58;
}

.weather-forecast-heading {
    margin-bottom: 0;
    align-items: flex-start;
}

.weather-daily-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.weather-day-card {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.weather-day-card.weather-theme-clear {
    border-color: rgba(126, 216, 255, 0.2);
}

.weather-day-card.weather-theme-rain,
.weather-day-card.weather-theme-storm {
    border-color: rgba(131, 212, 206, 0.2);
}

.weather-day-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.weather-day-header {
    display: grid;
    gap: 4px;
}

.weather-day-temps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.weather-day-temp strong,
.weather-day-temp-min {
    color: #ffffff;
    line-height: 1;
}

.weather-day-temp strong {
    font-size: 1.5rem;
}

.weather-day-temp-min {
    font-size: 1.28rem;
    font-weight: 700;
}

.weather-day-meta {
    display: grid;
    gap: 6px;
    font-size: 0.91rem;
    line-height: 1.55;
}

.weather-condition-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    color: #f4f8fb;
}

.weather-condition-pill.weather-theme-clear {
    background: rgba(126, 216, 255, 0.18);
}

.weather-condition-pill.weather-theme-cloudy {
    background: rgba(182, 198, 217, 0.18);
}

.weather-condition-pill.weather-theme-rain {
    background: rgba(131, 212, 206, 0.18);
}

.weather-condition-pill.weather-theme-snow {
    background: rgba(219, 234, 255, 0.18);
}

.weather-condition-pill.weather-theme-storm {
    background: rgba(247, 199, 106, 0.2);
}

.weather-condition-pill.weather-theme-mist {
    background: rgba(194, 210, 224, 0.18);
}

.weather-condition-pill.weather-theme-neutral {
    background: rgba(159, 184, 198, 0.18);
}

.weather-empty-state-error {
    border-color: rgba(255, 154, 154, 0.22);
}

@media (max-width: 1180px) {
    .weather-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .weather-daily-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .weather-tool-grid,
    .weather-metric-grid,
    .weather-daily-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weather-overview-top,
    .weather-day-heading {
        flex-direction: column;
    }

    .weather-overview-main {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .weather-primary-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .weather-page .page-hero-card h1 {
        font-size: clamp(1.82rem, 8vw, 2.35rem);
    }

    .weather-page .page-hero-aside h2 {
        font-size: 1.34rem;
    }

    .weather-tool-grid,
    .weather-metric-grid,
    .weather-daily-grid,
    .weather-search-controls,
    .weather-primary-stats,
    .weather-sun-grid {
        grid-template-columns: 1fr;
    }

    .weather-tool-card,
    .weather-search-panel,
    .weather-overview-card,
    .weather-metric-card,
    .weather-day-card,
    .weather-loading-state,
    .weather-empty-state,
    .weather-hub-aside,
    .weather-forecast-aside,
    .weather-hub-shell,
    .weather-forecast-shell {
        padding: 18px;
        border-radius: 22px;
    }

    .weather-hub-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .weather-hub-actions .button,
    .weather-search-controls .button {
        width: 100%;
    }

    .weather-search-input {
        min-height: 50px;
    }

    .weather-overview-card h2,
    .weather-tool-card h3,
    .weather-empty-state h2,
    .weather-loading-state h2 {
        font-size: 1.18rem;
    }

    .weather-temperature-block strong {
        font-size: 2.6rem;
    }
}

.weather-alerts-hero {
    margin-top: 6px;
}

.weather-alerts-hero-card {
    gap: 14px;
}

.weather-alerts-aside {
    gap: 12px;
}

.weather-alerts-section {
    display: grid;
    gap: 18px;
    padding-top: 18px;
    padding-bottom: 32px;
}

.weather-alerts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(300px, 0.84fr);
    gap: 18px;
    align-items: start;
}

.weather-alerts-map-panel,
.weather-alerts-detail-card,
.weather-alert-summary-card,
.weather-alert-detail-item,
.weather-alert-empty-box {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(17, 28, 40, 0.94), rgba(9, 16, 26, 0.97));
    color: #f2f7fb;
    box-shadow: 0 24px 68px rgba(4, 12, 22, 0.24);
}

.weather-alerts-map-panel,
.weather-alerts-detail-card {
    padding: 20px;
}

.weather-alerts-map-panel {
    display: grid;
    gap: 14px;
}

.weather-alerts-detail-card {
    display: grid;
    gap: 14px;
    align-content: start;
    position: sticky;
    top: 94px;
}

.weather-alerts-map-panel h2,
.weather-alerts-detail-card h2 {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.16;
    color: #ffffff;
}

.weather-alerts-section .weather-section-note,
.weather-alerts-detail-card .weather-empty-copy,
.weather-alert-detail-copy,
.weather-alert-popup-copy,
.weather-alert-detail-note,
.weather-alert-diagnostics-copy,
.weather-alert-empty-box p,
.weather-alert-empty-reason {
    margin: 0;
    color: rgba(226, 235, 243, 0.82);
    font-size: 0.96rem;
    line-height: 1.62;
}

.weather-alerts-hero .page-hero-card h1 {
    font-size: clamp(1.85rem, 3vw, 2.7rem);
    line-height: 1.05;
    max-width: 11ch;
}

.weather-alerts-hero .hero-text {
    max-width: 56ch;
    font-size: 0.99rem;
    line-height: 1.7;
}

.weather-alerts-aside h2 {
    font-size: clamp(1.12rem, 1.9vw, 1.52rem);
    line-height: 1.18;
}

.weather-alerts-aside .weather-aside-intro,
.weather-alerts-aside .weather-guide-list {
    font-size: 0.96rem;
    line-height: 1.62;
}

.weather-alerts-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.weather-alerts-legend-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.weather-alert-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #eef5fb;
    font-size: 0.88rem;
    font-weight: 700;
}

.weather-alert-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.weather-alerts-map-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: radial-gradient(circle at top, rgba(44, 75, 96, 0.75), rgba(13, 22, 31, 0.92));
}

.weather-alerts-map {
    position: relative;
    width: 100%;
    min-height: 500px;
    overflow: hidden;
    isolation: isolate;
    contain: layout paint;
    background: linear-gradient(180deg, rgba(12, 20, 29, 0.98), rgba(17, 28, 40, 0.95));
}

.weather-alerts-map .leaflet-pane,
.weather-alerts-map .leaflet-map-pane,
.weather-alerts-map .leaflet-overlay-pane,
.weather-alerts-map .leaflet-zoom-animated {
    transform-origin: 0 0;
}

.weather-alerts-map .leaflet-control-container {
    z-index: 410;
}

.leaflet-tooltip.weather-map-tooltip {
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 15, 24, 0.97);
    color: #f4f8fb;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
    pointer-events: none;
}

.leaflet-tooltip-top.weather-map-tooltip:before {
    border-top-color: rgba(8, 15, 24, 0.97);
}

.leaflet-tooltip-bottom.weather-map-tooltip:before {
    border-bottom-color: rgba(8, 15, 24, 0.97);
}

.leaflet-tooltip-left.weather-map-tooltip:before {
    border-left-color: rgba(8, 15, 24, 0.97);
}

.leaflet-tooltip-right.weather-map-tooltip:before {
    border-right-color: rgba(8, 15, 24, 0.97);
}

.weather-alert-tooltip {
    display: grid;
    gap: 4px;
    min-width: 180px;
}

.weather-alert-tooltip strong {
    color: #ffffff;
    font-size: 0.96rem;
    line-height: 1.25;
}

.weather-alert-tooltip span {
    color: #dff3ea;
    font-size: 0.84rem;
    font-weight: 700;
}

.weather-alert-tooltip small {
    color: rgba(229, 237, 244, 0.9);
    font-size: 0.8rem;
    line-height: 1.45;
}

.weather-alerts-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.weather-alert-summary-card {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.weather-alert-summary-card strong {
    font-size: 1.16rem;
    line-height: 1.12;
    color: #ffffff;
}

.weather-alert-summary-card p {
    margin: 0;
    color: rgba(226, 235, 243, 0.78);
    line-height: 1.6;
}

.weather-alert-summary-card.level-3 {
    border-color: rgba(239, 68, 68, 0.26);
}

.weather-alert-summary-card.level-2 {
    border-color: rgba(251, 146, 60, 0.24);
}

.weather-alert-summary-card.level-1 {
    border-color: rgba(250, 204, 21, 0.24);
}

.weather-alert-summary-card.level-clear {
    border-color: rgba(34, 197, 94, 0.24);
}

.weather-alert-summary-card.level-nodata {
    border-color: rgba(148, 163, 184, 0.24);
}

.weather-alert-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.weather-alert-detail-list {
    display: grid;
    gap: 12px;
}

.weather-alert-detail-item {
    display: grid;
    gap: 12px;
    padding: 15px;
}

.weather-alert-detail-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.weather-alert-detail-item.level-1 {
    border-color: rgba(250, 204, 21, 0.24);
}

.weather-alert-detail-item.level-2 {
    border-color: rgba(251, 146, 60, 0.24);
}

.weather-alert-detail-item.level-3 {
    border-color: rgba(239, 68, 68, 0.26);
}

.weather-alert-detail-item.level-clear {
    border-color: rgba(34, 197, 94, 0.24);
}

.weather-alert-detail-item.level-nodata {
    border-color: rgba(148, 163, 184, 0.24);
}

.weather-alert-inline-badges,
.weather-alert-popup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.weather-alert-inline-badges {
    justify-content: flex-end;
}

.weather-alert-level-badge,
.weather-alert-status-pill,
.weather-alert-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    line-height: 1;
}

.weather-alert-status-pill,
.weather-alert-state-badge {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #e9f0f6;
}

.weather-alert-level-badge.level-clear {
    background: rgba(34, 197, 94, 0.18);
    color: #c9fbd9;
}

.weather-alert-level-badge.level-1 {
    background: rgba(250, 204, 21, 0.16);
    color: #fff1a9;
}

.weather-alert-level-badge.level-2 {
    background: rgba(251, 146, 60, 0.16);
    color: #ffc58e;
}

.weather-alert-level-badge.level-3 {
    background: rgba(239, 68, 68, 0.18);
    color: #ffb0b0;
}

.weather-alert-level-badge.level-nodata {
    background: rgba(100, 116, 139, 0.18);
    color: #d4dee8;
}

.weather-alert-detail-copy {
    color: rgba(236, 243, 249, 0.84);
}

.weather-alert-timing-list,
.weather-alert-popup-meta {
    display: grid;
    gap: 10px;
    margin: 0;
}

.weather-alert-timing-list div,
.weather-alert-popup-meta div {
    display: grid;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.weather-alert-timing-list dt,
.weather-alert-timing-list dd,
.weather-alert-popup-meta dt,
.weather-alert-popup-meta dd {
    margin: 0;
}

.weather-alert-timing-list dt,
.weather-alert-popup-meta dt {
    color: rgba(226, 235, 243, 0.66);
    font-size: 0.86rem;
    font-weight: 700;
}

.weather-alert-timing-list dd,
.weather-alert-popup-meta dd {
    color: #f6fbff;
    font-weight: 700;
    line-height: 1.5;
}

.weather-alert-empty-box {
    padding: 16px;
}

.weather-alert-empty-box.is-warning {
    border-color: rgba(255, 193, 122, 0.18);
    background: rgba(255, 193, 122, 0.08);
}

.weather-alert-empty-reason {
    color: rgba(255, 225, 191, 0.88);
    font-size: 0.86rem;
    line-height: 1.55;
}

.weather-alerts-overlay[hidden] {
    display: none !important;
}

.weather-alerts-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 500;
    width: min(390px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    overflow: auto;
    pointer-events: auto;
}

.weather-alert-overlay-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 18px 18px 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(12, 20, 29, 0.98), rgba(10, 17, 27, 0.98));
    color: #f3f7fb;
    box-shadow: 0 26px 70px rgba(2, 8, 18, 0.45);
    backdrop-filter: blur(8px);
}

.weather-alert-overlay-kicker {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 800;
    color: #8fd7d0;
}

.weather-alert-overlay-card h3,
.weather-alert-popup-title {
    color: #ffffff;
}

.weather-alert-overlay-card h3 {
    margin: 0;
    padding-right: 28px;
    font-size: 1.38rem;
    line-height: 1.06;
}

.weather-alert-popup-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.weather-alert-popup-category,
.weather-alert-popup-copy {
    margin: 0;
}

.weather-alert-popup-category {
    color: rgba(236, 243, 249, 0.92);
    font-size: 0.96rem;
    font-weight: 700;
}

.weather-alert-overlay-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(236, 243, 249, 0.82);
    font-size: 1.5rem;
    line-height: 1;
}

.weather-alert-overlay-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.weather-alert-diagnostics {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.weather-alert-diagnostics strong {
    color: #f8fbff;
    font-size: 0.98rem;
}

.weather-alert-diagnostics-source_unavailable {
    border-color: rgba(255, 176, 124, 0.2);
    background: rgba(255, 176, 124, 0.1);
}

.weather-alert-diagnostics-partial_data {
    border-color: rgba(255, 211, 107, 0.18);
    background: rgba(255, 211, 107, 0.1);
}

.weather-alert-diagnostics-clear {
    border-color: rgba(76, 215, 149, 0.16);
    background: rgba(76, 215, 149, 0.08);
}

@media (max-width: 1280px) {
    .weather-alerts-layout {
        grid-template-columns: 1fr;
    }

    .weather-alerts-detail-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .weather-alerts-hero .page-hero-card h1 {
        max-width: 14ch;
    }

    .weather-alert-detail-item-head,
    .weather-alert-inline-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .weather-alerts-overlay {
        left: 14px;
        right: 14px;
        top: auto;
        bottom: 14px;
        width: auto;
        max-height: min(52%, 340px);
    }
}

@media (max-width: 760px) {
    .weather-alerts-map-panel,
    .weather-alerts-detail-card,
    .weather-alert-summary-card,
    .weather-alert-detail-item,
    .weather-alert-empty-box {
        padding: 16px;
        border-radius: 22px;
    }

    .weather-alerts-map {
        min-height: 380px;
    }

    .weather-alert-overlay-card h3 {
        font-size: 1.22rem;
    }
}

.leaflet-container.weather-alerts-static,
.leaflet-container.weather-alerts-static * {
    -webkit-user-select: none;
    user-select: none;
}

.leaflet-container.weather-alerts-static svg,
.leaflet-container.weather-alerts-static path {
    -webkit-user-drag: none;
}

.leaflet-container.weather-alerts-static {
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: default;
    touch-action: pan-y;
}

.leaflet-container.weather-alerts-static .leaflet-interactive {
    cursor: pointer;
}

/* --- Ostrzeżenia: kompaktowy tryb mapy bez prawego panelu --- */
.weather-alerts-layout.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.weather-alerts-map-panel.full-width {
    min-width: 0;
}

.weather-alerts-map-wrap.compact-mode {
    overflow: hidden;
}

.weather-alerts-map {
    min-height: clamp(360px, 62vh, 720px);
}

.weather-alerts-map-wrap.compact-mode .leaflet-container {
    background: linear-gradient(180deg, rgba(12, 20, 29, 0.98), rgba(17, 28, 40, 0.95));
}

.leaflet-tooltip.weather-map-tooltip {
    padding: 8px 10px;
    border-radius: 14px;
    max-width: 180px;
}

.weather-alert-tooltip {
    min-width: 0;
    gap: 3px;
}

.weather-alert-tooltip strong {
    font-size: 0.9rem;
}

.weather-alert-tooltip span {
    font-size: 0.8rem;
}

.leaflet-popup.weather-alert-popup-shell .leaflet-popup-content-wrapper {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(12, 20, 29, 0.98), rgba(10, 17, 27, 0.98));
    color: #f3f7fb;
    box-shadow: 0 22px 56px rgba(2, 8, 18, 0.42);
}

.leaflet-popup.weather-alert-popup-shell .leaflet-popup-content {
    margin: 16px 16px 14px;
    min-width: 0;
}

.leaflet-popup.weather-alert-popup-shell .leaflet-popup-tip {
    background: rgba(10, 17, 27, 0.98);
}

.leaflet-popup.weather-alert-popup-shell .leaflet-popup-close-button {
    color: rgba(239, 246, 252, 0.78);
    padding: 8px 10px 0 0;
}

.weather-alert-popup-card {
    display: grid;
    gap: 8px;
}

.weather-alert-popup-region {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.05;
    font-weight: 800;
    color: #ffffff;
}

.weather-alert-popup-meta.compact {
    gap: 8px;
}

.weather-alert-popup-meta.compact div {
    padding-top: 8px;
}

.weather-alert-popup-meta.compact dt {
    font-size: 0.8rem;
}

.weather-alert-popup-meta.compact dd {
    font-size: 0.92rem;
    line-height: 1.45;
    word-break: break-word;
}

.weather-alert-popup-copy {
    color: rgba(240, 246, 251, 0.92);
    line-height: 1.55;
}

.weather-alerts-summary-grid {
    margin-top: 14px;
}

@media (max-width: 1024px) {
    .weather-alerts-hero {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .weather-alerts-map {
        min-height: 380px;
    }

    .leaflet-popup.weather-alert-popup-shell .leaflet-popup-content {
        margin: 14px 14px 12px;
    }

    .weather-alert-popup-region {
        font-size: 1.18rem;
    }

    .weather-alert-popup-copy,
    .weather-alert-popup-category {
        font-size: 0.92rem;
    }

    .weather-alerts-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .weather-alerts-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .weather-alerts-map {
        min-height: 340px;
    }
}
