:root {
  --bg-top: #1a3a5c;
  --bg-mid: #28567f;
  --bg-bottom: #112438;
  --accent-primary: #38bdf8;
  --accent-warm: #fbbf24;
  --accent-hot: #fb7185;
  --glow-color: rgba(56, 189, 248, 0.3);
  --glass-bg: rgba(15, 28, 46, 0.52);
  --glass-bg-hover: rgba(25, 45, 72, 0.68);
  --glass-border: rgba(255, 255, 255, 0.16);
  --text-main: #f8fafc;
  --text-muted: rgba(226, 232, 240, 0.78);
  --text-soft: rgba(203, 213, 225, 0.62);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-lg: 0 20px 50px rgba(4, 10, 22, 0.42);
}

/* Theme Palettes */
body[data-theme="sunny"] {
  --bg-top: #0f5298;
  --bg-mid: #2c7fb8;
  --bg-bottom: #1b365d;
  --accent-primary: #fcd34d;
  --glow-color: rgba(251, 191, 36, 0.36);
}

body[data-theme="partly-cloudy"] {
  --bg-top: #1d4e7a;
  --bg-mid: #3b6f9c;
  --bg-bottom: #142a43;
  --accent-primary: #7dd3fc;
  --glow-color: rgba(125, 211, 252, 0.3);
}

body[data-theme="sun-showers"] {
  --bg-top: #1f4d6e;
  --bg-mid: #3a6484;
  --bg-bottom: #13283c;
  --accent-primary: #38bdf8;
  --glow-color: rgba(56, 189, 248, 0.3);
}

body[data-theme="cloudy"] {
  --bg-top: #2c3e55;
  --bg-mid: #475b75;
  --bg-bottom: #1b2738;
  --accent-primary: #cbd5e1;
  --glow-color: rgba(148, 163, 184, 0.25);
}

body[data-theme="rainy"] {
  --bg-top: #122b45;
  --bg-mid: #1f4062;
  --bg-bottom: #0b1829;
  --accent-primary: #38bdf8;
  --glow-color: rgba(56, 189, 248, 0.34);
}

body[data-theme="storm"] {
  --bg-top: #14192d;
  --bg-mid: #282449;
  --bg-bottom: #090c17;
  --accent-primary: #a78bfa;
  --glow-color: rgba(167, 139, 250, 0.38);
}

body[data-theme="windy"] {
  --bg-top: #12485c;
  --bg-mid: #21687d;
  --bg-bottom: #0c2c3a;
  --accent-primary: #2dd4bf;
  --glow-color: rgba(45, 212, 191, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Inter", "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background: var(--bg-bottom);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Backdrop */
#weather-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.backdrop-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
  transition: background 700ms ease, filter 700ms ease;
}

.backdrop-glow {
  position: absolute;
  top: -18%;
  right: -10%;
  width: 65vw;
  height: 65vw;
  max-width: 780px;
  max-height: 780px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  filter: blur(42px);
  transition: background 700ms ease, transform 700ms ease;
}

.lightning-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 15%, rgba(224, 231, 255, 0.55), rgba(165, 180, 252, 0.08) 65%);
  opacity: 0;
  pointer-events: none;
}

.lightning-flash.flash-active {
  animation: screenFlash 650ms ease-out;
}

@keyframes screenFlash {
  0% { opacity: 0; }
  14% { opacity: 0.72; }
  30% { opacity: 0.12; }
  48% { opacity: 0.45; }
  100% { opacity: 0; }
}

#ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

/* Top Utility Bar */
.top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.brand-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.brand-subtitle {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dot-sep {
  opacity: 0.55;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-main);
}

.controls-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.unit-toggle,
.lang-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(10, 20, 35, 0.45);
  border: 1px solid var(--glass-border);
}

.unit-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.unit-btn.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.action-btn,
.icon-btn {
  border: 1px solid var(--glass-border);
  background: rgba(15, 28, 46, 0.52);
  color: var(--text-main);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  transition: background 200ms ease, transform 180ms ease, border-color 200ms ease;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
}

.action-btn .btn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.action-btn[aria-pressed="true"] {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.55);
}

.action-btn[aria-pressed="true"] .btn-dot {
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.action-btn:hover,
.icon-btn:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
}

.icon-btn.spinning svg {
  animation: spin360 750ms linear infinite;
}

@keyframes spin360 {
  to { transform: rotate(360deg); }
}

/* Today + 5-Day Top Navigation Bar */
.day-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.day-tab {
  position: relative;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-md);
  padding: 12px 12px;
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
              background 240ms ease,
              border-color 240ms ease,
              box-shadow 240ms ease;
}

.day-tab:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
}

.day-tab:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.day-tab.active {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.09));
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32), 0 0 22px var(--glow-color);
}

.day-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  border-radius: 999px;
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary);
}

.tab-day-name {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  display: inline-block;
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.hidden {
  display: none !important;
}

.tab-date {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.tab-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 2px 0;
}

.tab-temps {
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-hi {
  color: #fde68a;
}

.tab-lo {
  color: #bae6fd;
  font-weight: 600;
}

/* Main Content Panel & Transition */
.forecast-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.forecast-panel.panel-entering .hero-card,
.forecast-panel.panel-entering .telemetry-card {
  animation: panelFadeSlide 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.forecast-panel.panel-entering .telemetry-card {
  animation-delay: calc(var(--stagger, 0) * 55ms + 70ms);
}

@keyframes panelFadeSlide {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hero Card */
.hero-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 28px 30px;
  align-items: center;
}

.hero-visual-col {
  display: grid;
  place-items: center;
}

.hero-svg-stage {
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.28));
}

.hero-svg-stage svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.day-pill,
.condition-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.day-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.condition-pill {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e0f2fe;
}

.hero-date {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-description {
  margin: 8px 0 20px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 62ch;
}

/* Hi / Low Temperature Module */
.temp-module {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(8, 17, 32, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.temp-readouts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.temp-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.temp-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.temp-stat.current .temp-label {
  color: #6ee7b7;
}

.temp-stat.high .temp-label {
  color: #fcd34d;
}

.temp-stat.low .temp-label {
  color: #7dd3fc;
}

.temp-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.temp-number {
  font-size: clamp(2.2rem, 3.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.temp-stat.current .temp-number {
  background: linear-gradient(180deg, #ffffff 0%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.temp-stat.high .temp-number {
  background: linear-gradient(180deg, #fffbeb 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.temp-stat.low .temp-number {
  background: linear-gradient(180deg, #f0f9ff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.temp-unit-symbol {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.temp-divider {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.14);
}

.temp-spread-note {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.spread-label {
  font-size: 0.72rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.spread-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Thermal Range Bar */
.thermal-bar-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.thermal-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.thermal-scale-labels strong {
  color: var(--text-main);
}

.thermal-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  overflow: visible;
}

.thermal-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10%;
  width: 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #fbbf24 60%, #fb7185 100%);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
  transition: left 560ms cubic-bezier(0.22, 1, 0.36, 1), width 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.thermal-marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #ffffff;
  animation: markerPulse 2.4s ease-in-out infinite;
}

.min-marker {
  left: 0%;
  background: #38bdf8;
}

.max-marker {
  left: 100%;
  background: #fb7185;
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
}

/* Rest of Today Forecast & Live Observations Card */
.today-forecast-card {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: panelFadeSlide 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.today-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.today-title-group {
  display: flex;
  align-items: center;
  gap: 9px;
}

.today-title-group h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.period-badge {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e0f2fe;
}

.today-forecast-desc {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-main);
}

.today-outlook {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(8, 17, 32, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.outlook-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.outlook-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.today-live-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.live-badge strong {
  color: var(--text-main);
  font-weight: 600;
}

.warnings-box {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(251, 113, 133, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #ffe4e6;
  font-size: 0.86rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.telemetry-card {
  padding: 18px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-head h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
}

.humidity-icon { color: #38bdf8; }
.psr-icon { color: #60a5fa; }
.wind-icon { color: #2dd4bf; }
.tip-icon { color: #fcd34d; }

.wind-icon svg {
  animation: breezeSway 3.4s ease-in-out infinite;
}

@keyframes breezeSway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.metric-primary {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric-wind {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 700;
}

.metric-tip {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-main);
}

.metric-sub {
  margin: auto 0 0;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.gauge-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  overflow: hidden;
  position: relative;
}

.gauge-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1), margin-left 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.humidity-fill {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.psr-fill {
  background: linear-gradient(90deg, #34d399, #fbbf24, #f87171);
}

/* Trend Chart Card */
.trend-card {
  padding: 20px 24px;
}

.trend-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.trend-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.trend-subtitle {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.trend-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.high-swatch { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.7); }
.low-swatch { background: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.7); }

.trend-chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.trend-svg {
  width: 100%;
  min-width: 480px;
  height: 190px;
  display: block;
}

.trend-point-group {
  cursor: pointer;
}

.trend-point-group:hover .trend-dot {
  transform: scale(1.25);
}

.trend-dot {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 200ms ease;
}

.trend-active-ring {
  animation: ringPulse 2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.32); }
}

/* Footer */
.situation-footer {
  padding: 18px 22px;
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.situation-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.situation-text p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 72ch;
}

.situation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.76rem;
  color: var(--text-soft);
}

/* ===================================================
   Hero SVG Weather Animations
   =================================================== */
.svg-sun-core {
  animation: sunPulse 3.6s ease-in-out infinite;
  transform-origin: 100px 100px;
}

.svg-sun-rays {
  animation: sunSpin 24s linear infinite;
  transform-origin: 100px 100px;
}

.svg-sun-peek {
  animation: sunPulse 3.8s ease-in-out infinite;
  transform-origin: 72px 72px;
}

.svg-sun-peek-rays {
  animation: sunSpin 22s linear infinite;
  transform-origin: 72px 72px;
}

@keyframes sunSpin {
  to { transform: rotate(360deg); }
}

@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: 0.96; }
  50% { transform: scale(1.06); opacity: 1; }
}

.svg-cloud-front {
  animation: cloudDriftFront 5.2s ease-in-out infinite;
}

.svg-cloud-back {
  animation: cloudDriftBack 7.4s ease-in-out infinite;
}

@keyframes cloudDriftFront {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -3px); }
}

@keyframes cloudDriftBack {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-7px, 2px); }
}

.svg-raindrop {
  animation: rainFall 1.05s linear infinite;
  animation-delay: var(--d, 0s);
}

.svg-raindrop-heavy {
  animation: rainFall 0.72s linear infinite;
  animation-delay: var(--d, 0s);
}

@keyframes rainFall {
  0% {
    transform: translate(0, -10px);
    opacity: 0;
  }
  20% {
    opacity: 0.95;
  }
  85% {
    opacity: 0.9;
  }
  100% {
    transform: translate(-10px, 44px);
    opacity: 0;
  }
}

.svg-splash {
  animation: splashPop 1.05s ease-out infinite;
  animation-delay: var(--d, 0s);
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes splashPop {
  0%, 70% { opacity: 0; transform: scale(0.4); }
  85% { opacity: 0.75; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.5); }
}

.svg-lightning-bolt {
  animation: boltFlash 3.2s ease-in-out infinite;
}

@keyframes boltFlash {
  0%, 62%, 100% { opacity: 0.12; filter: drop-shadow(0 0 0 rgba(253, 224, 71, 0)); }
  66% { opacity: 1; filter: drop-shadow(0 0 16px rgba(253, 224, 71, 0.95)); }
  71% { opacity: 0.25; }
  75% { opacity: 0.95; filter: drop-shadow(0 0 14px rgba(253, 224, 71, 0.9)); }
  82% { opacity: 0.15; }
}

.svg-wind-line {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: windSweep 2.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes windSweep {
  0% { stroke-dashoffset: 120; opacity: 0; }
  25% { opacity: 1; }
  75% { stroke-dashoffset: 0; opacity: 0.95; }
  100% { stroke-dashoffset: -120; opacity: 0; }
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .day-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
    padding: 22px;
  }

  .hero-meta-row,
  .temp-readouts {
    justify-content: center;
  }

  .temp-spread-note {
    margin-left: 0;
    align-items: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

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

@media (max-width: 640px) {
  .app-shell {
    padding: 14px 14px 28px;
  }

  .day-nav {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }

  .day-tab {
    flex: 0 0 calc(33.333% - 7px);
    min-width: 104px;
    scroll-snap-align: start;
    padding: 10px 8px;
  }

  .telemetry-grid {
    grid-template-columns: 1fr;
  }

  .situation-meta {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
