.weather-dashboard { display: grid; gap: 22px; }
.weather-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; padding: 24px; color: #fff; background: #253746; border-left: 6px solid #f37021; border-radius: 8px; }
.weather-head h1 { margin: 0; font-size: 32px; }
.weather-head .section-label { color: #ffb27d; }
.weather-head-detail { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 7px 0 0; color: #dce8ee; }
.weather-head-detail span + span::before { content: "•"; margin-right: 18px; color: #1f9bd1; }
.weather-head-actions { display: flex; align-items: end; gap: 10px; }
.weather-location-select { min-width: 210px; color: #dce8ee; font-size: 12px; }
.weather-location-select select { min-height: 42px; color: #253746; background: #fff; }
.weather-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; white-space: nowrap; }
.weather-refresh svg { width: 18px; height: 18px; }
.weather-refresh.is-loading svg { animation: weather-spin .9s linear infinite; }
.weather-source-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 9px 20px; padding-top: 14px; color: #dce8ee; border-top: 1px solid rgba(255,255,255,.18); font-size: 12px; }
.weather-source-row a { color: #8ed9f5; }
.api-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.api-status i { width: 9px; height: 9px; background: #94a3b8; border-radius: 50%; }
.api-status.is-live i { background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.14); }
.api-status.is-stale i { background: #facc15; }
.api-status.is-error i { background: #f87171; }
.api-status.is-loading i { animation: weather-pulse 1s ease-in-out infinite; }
.weather-message { padding: 12px 14px; color: #854d0e; background: #fefce8; border: 1px solid #fde68a; border-left: 4px solid #eab308; border-radius: 6px; }
.weather-message.is-error { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #991b1b; background: #fff1f2; border-color: #fecdd3; border-left-color: #dc2626; }
.weather-message button { flex: 0 0 auto; padding: 7px 12px; }
.weather-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.weather-kpi { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; min-height: 132px; padding: 18px; background: #fff; border: 1px solid #d9e2ea; border-top: 4px solid #1f9bd1; border-radius: 8px; }
.weather-kpi:nth-child(2) { border-top-color: #29a87d; }
.weather-kpi:nth-child(3) { border-top-color: #f37021; }
.weather-kpi:nth-child(4) { border-top-color: #eab308; }
.weather-kpi > svg { width: 32px; height: 32px; padding: 6px; color: #1f9bd1; background: #e8f6fc; border-radius: 6px; }
.weather-kpi div { min-width: 0; }
.weather-kpi span { display: block; min-height: 38px; color: #607080; font-size: 12px; line-height: 1.45; }
.weather-kpi strong { color: #253746; font-size: 30px; line-height: 1.2; }
.weather-kpi strong.is-date { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 19px; }
.weather-kpi small { margin-left: 3px; color: #71808d; }
.weather-kpi.is-loading strong, .weather-kpi.is-loading small { color: transparent; background: #e8eef2; border-radius: 4px; animation: weather-pulse 1.2s ease-in-out infinite; }
.weather-panel { min-width: 0; padding: 20px; background: #fff; border: 1px solid #d9e2ea; border-radius: 8px; }
.weather-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.weather-panel-head h2 { margin: 0; font-size: 22px; }
.weather-panel-head > span { color: #71808d; font-size: 12px; }
.forecast-range { display: flex; overflow: hidden; border: 1px solid #d9e2ea; border-radius: 7px; }
.forecast-range button { min-height: 38px; padding: 7px 11px; color: #526473; background: #fff; border-right: 1px solid #d9e2ea; border-radius: 0; font-size: 12px; }
.forecast-range button:last-child { border-right: 0; }
.forecast-range button.is-active { color: #fff; background: #1f9bd1; }
.weather-chart-scroll { margin-top: 16px; overflow-x: auto; overscroll-behavior-inline: contain; }
.weather-chart-frame { position: relative; min-width: 680px; height: 330px; }
.weather-chart-frame canvas { width: 100% !important; height: 100% !important; }
.weather-chart-note { margin: 10px 0 0; color: #71808d; font-size: 12px; }
.weather-section { min-width: 0; }
.daily-forecast-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.daily-forecast-card { display: grid; gap: 9px; min-width: 0; padding: 14px; color: #253746; background: #fff; border: 1px solid #d9e2ea; border-top: 4px solid #1f9bd1; border-radius: 8px; text-align: left; }
.daily-forecast-card:hover, .daily-forecast-card:focus-visible { border-color: #1f9bd1; background: #f5fbfe; }
.daily-forecast-card.is-selected { box-shadow: 0 0 0 2px rgba(31,155,209,.2); }
.daily-card-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.daily-card-head strong { font-size: 14px; }
.daily-card-head small { display: block; color: #71808d; font-weight: 400; }
.daily-card-head svg { width: 25px; height: 25px; color: #1f9bd1; }
.daily-rain { display: flex; align-items: baseline; gap: 4px; }
.daily-rain strong { color: #1f9bd1; font-size: 25px; }
.daily-rain span, .daily-details { color: #607080; font-size: 11px; }
.daily-rain-bar { height: 6px; overflow: hidden; background: #e8eef2; border-radius: 3px; }
.daily-rain-bar i { display: block; width: 0; height: 100%; background: #1f9bd1; border-radius: inherit; }
.daily-details { display: flex; justify-content: space-between; gap: 6px; }
.watch-periods { display: grid; gap: 8px; margin-top: 16px; }
.watch-row { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(100px, .6fr) minmax(150px, 1fr); align-items: center; gap: 12px; padding: 10px 12px; background: #f7fafc; border-left: 4px solid #1f9bd1; }
.watch-row strong { font-size: 14px; }
.watch-row span { color: #607080; font-size: 12px; }
.watch-row .rain-amount { color: #253746; font-size: 16px; font-weight: 700; }
.watch-row.is-moderate { border-left-color: #eab308; }
.watch-row.is-heavy { border-left-color: #f97316; }
.watch-row.is-very-heavy { border-left-color: #dc2626; }
.rain-level { justify-self: end; padding: 4px 8px; border-radius: 4px; background: #e8f6fc; font-weight: 600; }
.is-moderate .rain-level { color: #854d0e; background: #fef9c3; }
.is-heavy .rain-level { color: #9a3412; background: #ffedd5; }
.is-very-heavy .rain-level { color: #991b1b; background: #fee2e2; }
.forecast-disclaimer { display: flex; align-items: start; gap: 9px; margin: 16px 0 0; padding-top: 14px; color: #607080; border-top: 1px solid #d9e2ea; font-size: 12px; line-height: 1.6; }
.forecast-disclaimer svg { flex: 0 0 auto; width: 18px; height: 18px; color: #f37021; }
.weather-empty { padding: 26px; color: #71808d; background: #f7fafc; text-align: center; }
@keyframes weather-pulse { 50% { opacity: .45; } }
@keyframes weather-spin { to { transform: rotate(360deg); } }
@media (max-width: 980px) {
    .weather-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .daily-forecast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .weather-head { grid-template-columns: 1fr; padding: 20px 16px; }
    .weather-head h1 { font-size: 27px; }
    .weather-head-actions { align-items: stretch; flex-direction: column; }
    .weather-source-row { grid-column: auto; align-items: start; flex-direction: column; }
    .weather-head-detail { display: grid; }
    .weather-head-detail span + span::before { content: none; }
    .weather-kpis { grid-template-columns: 1fr; }
    .weather-kpi { min-height: 112px; }
    .weather-panel { padding: 16px; }
    .weather-panel-head { align-items: stretch; flex-direction: column; }
    .forecast-range { display: grid; grid-template-columns: repeat(2, 1fr); }
    .forecast-range button { border-bottom: 1px solid #d9e2ea; }
    .daily-forecast-grid { grid-template-columns: 1fr; }
    .watch-row { grid-template-columns: 1fr auto; }
    .watch-row .rain-level { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
    .weather-kpi.is-loading strong, .weather-kpi.is-loading small, .api-status.is-loading i, .weather-refresh.is-loading svg { animation: none; }
}
