/* ============================================================
   EkhoniJanao — Modern Location-Aware Weather System (v2)
   Glass surfaces, aurora atmosphere, animated SVG scenes,
   15-minute nowcast, hourly + 7-day forecasts, precise GPS UI.
   ============================================================ */

@property --wx-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.wx-host {
  position: relative;
  min-width: 0;
}
.tab-panel:has(> .rf-card).active > .wx-host {
  margin-top: 4px;
}

/* ---- Theme tokens ---------------------------------------------------- */
.weather-widget.wx-card {
  --wx-ink: #0f2942;
  --wx-sub: #47617d;
  --wx-accent: #1d4ed8;
  --wx-accent-soft: rgba(37, 99, 235, 0.12);
  --wx-chip-bg: rgba(255, 255, 255, 0.62);
  --wx-chip-border: rgba(15, 41, 66, 0.1);
  --wx-panel: rgba(255, 255, 255, 0.42);
  --wx-glow: rgba(255, 255, 255, 0.85);
  --wx-temp-grad: linear-gradient(135deg, #0f2942 0%, #1d4ed8 100%);
  --wx-bg: linear-gradient(135deg, #eef7ff 0%, #dceeff 52%, #e6f2ff 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(96, 165, 250, 0.5), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(251, 191, 36, 0.38), transparent 66%);
  --wx-shadow: 0 22px 50px -28px rgba(15, 45, 92, 0.45);
}

.wx-card[data-wx-theme="clear-day"] {
  --wx-ink: #3b2a06;
  --wx-sub: #6b5620;
  --wx-accent: #d97706;
  --wx-accent-soft: rgba(245, 158, 11, 0.16);
  --wx-chip-bg: rgba(255, 255, 255, 0.58);
  --wx-chip-border: rgba(180, 120, 10, 0.16);
  --wx-panel: rgba(255, 255, 255, 0.4);
  --wx-glow: rgba(253, 224, 71, 0.9);
  --wx-temp-grad: linear-gradient(135deg, #7c3a06 0%, #ea8c00 55%, #f59e0b 100%);
  --wx-bg: linear-gradient(135deg, #fff8e1 0%, #ffefc2 38%, #dff0ff 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(253, 224, 71, 0.6), transparent 64%);
  --wx-aurora-b: radial-gradient(circle, rgba(125, 211, 252, 0.42), transparent 66%);
  --wx-shadow: 0 24px 54px -26px rgba(180, 120, 10, 0.4);
}
.wx-card[data-wx-theme="partly-day"] {
  --wx-ink: #102b47;
  --wx-sub: #44607e;
  --wx-accent: #2563eb;
  --wx-accent-soft: rgba(37, 99, 235, 0.13);
  --wx-bg: linear-gradient(135deg, #f0f8ff 0%, #dbeaff 50%, #e9f4ff 100%);
  --wx-temp-grad: linear-gradient(135deg, #0f2942 0%, #1e40af 60%, #0ea5e9 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(96, 165, 250, 0.48), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(253, 224, 71, 0.34), transparent 64%);
  --wx-shadow: 0 22px 50px -28px rgba(15, 45, 92, 0.42);
}
.wx-card[data-wx-theme="clear-night"],
.wx-card[data-wx-theme="partly-night"] {
  --wx-ink: #f1f5f9;
  --wx-sub: #b7cbe8;
  --wx-accent: #93c5fd;
  --wx-accent-soft: rgba(147, 197, 253, 0.16);
  --wx-chip-bg: rgba(15, 23, 42, 0.42);
  --wx-chip-border: rgba(147, 197, 253, 0.18);
  --wx-panel: rgba(15, 23, 42, 0.32);
  --wx-glow: rgba(147, 197, 253, 0.55);
  --wx-temp-grad: linear-gradient(135deg, #ffffff 0%, #bfdbfe 55%, #818cf8 100%);
  --wx-bg: linear-gradient(135deg, #0c1630 0%, #16264d 52%, #1d2f5c 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(99, 102, 241, 0.5), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 66%);
  --wx-shadow: 0 24px 56px -26px rgba(2, 8, 26, 0.75);
}
.wx-card[data-wx-theme="cloudy"],
.wx-card[data-wx-theme="fog"] {
  --wx-ink: #1e293b;
  --wx-sub: #4b5c70;
  --wx-accent: #475569;
  --wx-accent-soft: rgba(71, 85, 105, 0.12);
  --wx-bg: linear-gradient(135deg, #f2f6fa 0%, #e1e8f1 55%, #d6e0ea 100%);
  --wx-temp-grad: linear-gradient(135deg, #1e293b 0%, #475569 70%, #64748b 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(148, 163, 184, 0.4), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(226, 232, 240, 0.55), transparent 66%);
  --wx-shadow: 0 20px 46px -28px rgba(30, 41, 59, 0.38);
}
.wx-card[data-wx-theme="rain"] {
  --wx-ink: #0d2747;
  --wx-sub: #3a5878;
  --wx-accent: #1d4ed8;
  --wx-accent-soft: rgba(29, 78, 216, 0.14);
  --wx-chip-bg: rgba(255, 255, 255, 0.52);
  --wx-panel: rgba(255, 255, 255, 0.32);
  --wx-glow: rgba(147, 197, 253, 0.75);
  --wx-temp-grad: linear-gradient(135deg, #0b2544 0%, #1d4ed8 60%, #38bdf8 100%);
  --wx-bg: linear-gradient(135deg, #dceafe 0%, #c6dcfb 48%, #b9d3f6 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(14, 165, 233, 0.4), transparent 66%);
  --wx-shadow: 0 24px 52px -26px rgba(13, 39, 71, 0.48);
}
.wx-card[data-wx-theme="storm"] {
  --wx-ink: #f8fafc;
  --wx-sub: #c3d2e6;
  --wx-accent: #fbbf24;
  --wx-accent-soft: rgba(251, 191, 36, 0.16);
  --wx-chip-bg: rgba(15, 23, 42, 0.46);
  --wx-chip-border: rgba(165, 180, 252, 0.22);
  --wx-panel: rgba(15, 23, 42, 0.34);
  --wx-glow: rgba(165, 180, 252, 0.55);
  --wx-temp-grad: linear-gradient(135deg, #ffffff 0%, #c7d2fe 55%, #fbbf24 100%);
  --wx-bg: linear-gradient(135deg, #161b2e 0%, #232c4c 48%, #151b31 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(99, 102, 241, 0.55), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(251, 191, 36, 0.28), transparent 66%);
  --wx-shadow: 0 26px 60px -24px rgba(2, 6, 23, 0.8);
}
.wx-card[data-wx-theme="snow"] {
  --wx-ink: #0c2b44;
  --wx-sub: #3f6280;
  --wx-accent: #0284c7;
  --wx-accent-soft: rgba(2, 132, 199, 0.13);
  --wx-bg: linear-gradient(135deg, #f4fbff 0%, #e0f2fe 52%, #dceafe 100%);
  --wx-temp-grad: linear-gradient(135deg, #0c2b44 0%, #0284c7 65%, #7dd3fc 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(125, 211, 252, 0.5), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(255, 255, 255, 0.7), transparent 66%);
  --wx-shadow: 0 22px 48px -28px rgba(12, 43, 68, 0.35);
}

/* ---- Dark mode overrides -------------------------------------------- */
[data-theme="dark"] .wx-card[data-wx-theme="clear-day"] {
  --wx-ink: #fef3c7;
  --wx-sub: #e7d3a1;
  --wx-accent: #fbbf24;
  --wx-accent-soft: rgba(251, 191, 36, 0.16);
  --wx-chip-bg: rgba(15, 23, 42, 0.5);
  --wx-chip-border: rgba(251, 191, 36, 0.2);
  --wx-panel: rgba(15, 23, 42, 0.34);
  --wx-glow: rgba(251, 191, 36, 0.45);
  --wx-temp-grad: linear-gradient(135deg, #fff7cc 0%, #fbbf24 65%, #f59e0b 100%);
  --wx-bg: linear-gradient(135deg, #2a2313 0%, #1b2a3f 55%, #101d2e 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(251, 191, 36, 0.4), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(56, 189, 248, 0.25), transparent 66%);
  --wx-shadow: 0 24px 54px -26px rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .wx-card[data-wx-theme="partly-day"] {
  --wx-ink: #f1f5f9;
  --wx-sub: #b8cae0;
  --wx-accent: #60a5fa;
  --wx-accent-soft: rgba(96, 165, 250, 0.16);
  --wx-chip-bg: rgba(15, 23, 42, 0.5);
  --wx-chip-border: rgba(96, 165, 250, 0.2);
  --wx-panel: rgba(15, 23, 42, 0.34);
  --wx-glow: rgba(96, 165, 250, 0.45);
  --wx-temp-grad: linear-gradient(135deg, #ffffff 0%, #bfdbfe 60%, #60a5fa 100%);
  --wx-bg: linear-gradient(135deg, #122137 0%, #172c49 55%, #101f34 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(96, 165, 250, 0.42), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(253, 224, 71, 0.22), transparent 66%);
  --wx-shadow: 0 24px 54px -26px rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .wx-card[data-wx-theme="cloudy"],
[data-theme="dark"] .wx-card[data-wx-theme="fog"] {
  --wx-ink: #f1f5f9;
  --wx-sub: #b6c2d2;
  --wx-accent: #94a3b8;
  --wx-accent-soft: rgba(148, 163, 184, 0.16);
  --wx-chip-bg: rgba(15, 23, 42, 0.5);
  --wx-chip-border: rgba(148, 163, 184, 0.2);
  --wx-panel: rgba(15, 23, 42, 0.34);
  --wx-glow: rgba(148, 163, 184, 0.4);
  --wx-temp-grad: linear-gradient(135deg, #ffffff 0%, #cbd5e1 70%, #94a3b8 100%);
  --wx-bg: linear-gradient(135deg, #1a202c 0%, #232b38 55%, #181e29 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(148, 163, 184, 0.32), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(96, 165, 250, 0.18), transparent 66%);
  --wx-shadow: 0 24px 54px -26px rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .wx-card[data-wx-theme="rain"] {
  --wx-ink: #f1f5f9;
  --wx-sub: #bad0ea;
  --wx-accent: #60a5fa;
  --wx-accent-soft: rgba(96, 165, 250, 0.16);
  --wx-chip-bg: rgba(10, 20, 38, 0.5);
  --wx-chip-border: rgba(96, 165, 250, 0.22);
  --wx-panel: rgba(10, 20, 38, 0.34);
  --wx-glow: rgba(96, 165, 250, 0.45);
  --wx-temp-grad: linear-gradient(135deg, #ffffff 0%, #bfdbfe 55%, #38bdf8 100%);
  --wx-bg: linear-gradient(135deg, #0e1c31 0%, #122a49 55%, #0b1a2e 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(59, 130, 246, 0.45), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(14, 165, 233, 0.32), transparent 66%);
  --wx-shadow: 0 24px 54px -26px rgba(0, 0, 0, 0.72);
}
[data-theme="dark"] .wx-card[data-wx-theme="snow"] {
  --wx-ink: #f0f9ff;
  --wx-sub: #bae6fd;
  --wx-accent: #7dd3fc;
  --wx-accent-soft: rgba(125, 211, 252, 0.16);
  --wx-chip-bg: rgba(15, 23, 42, 0.48);
  --wx-chip-border: rgba(125, 211, 252, 0.2);
  --wx-panel: rgba(15, 23, 42, 0.32);
  --wx-glow: rgba(125, 211, 252, 0.45);
  --wx-temp-grad: linear-gradient(135deg, #ffffff 0%, #bae6fd 60%, #7dd3fc 100%);
  --wx-bg: linear-gradient(135deg, #112334 0%, #173048 55%, #0e1e30 100%);
  --wx-aurora-a: radial-gradient(circle, rgba(125, 211, 252, 0.36), transparent 66%);
  --wx-aurora-b: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 66%);
  --wx-shadow: 0 24px 54px -26px rgba(0, 0, 0, 0.7);
}

/* ---- Card shell ------------------------------------------------------ */
.weather-widget.wx-card {
  position: relative;
  overflow: hidden;
  display: block;
  padding: 18px 20px 16px;
  margin-bottom: 16px;
  border-radius: 22px;
  border: 1px solid var(--wx-chip-border, rgba(255, 255, 255, 0.4));
  background: var(--wx-bg);
  box-shadow: var(--wx-shadow), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  color: var(--wx-ink);
  isolation: isolate;
  transition: box-shadow 0.35s ease, transform 0.35s ease, background 0.6s ease;
}
.weather-widget.wx-card:hover {
  box-shadow: var(--wx-shadow), 0 28px 60px -32px rgba(15, 45, 92, 0.5);
}
.weather-widget.wx-card.wx-compact {
  padding: 14px 16px 13px;
  border-radius: 20px;
}

/* Slow rotating gradient hairline border */
.weather-widget.wx-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--wx-angle),
    transparent 0deg 130deg,
    var(--wx-glow) 168deg,
    rgba(255, 255, 255, 0.15) 205deg,
    transparent 250deg 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.7;
  pointer-events: none;
  z-index: 3;
  animation: wxBorderSpin 16s linear infinite;
}
/* Glass sheen */
.weather-widget.wx-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 85%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Atmosphere FX --------------------------------------------------- */
.wx-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.wx-aurora {
  position: absolute;
  width: 62%;
  height: 78%;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.55;
  animation: wxAurora 18s ease-in-out infinite alternate;
  will-change: transform;
}
.wx-aurora-a { top: -34%; left: -12%; background: var(--wx-aurora-a); }
.wx-aurora-b { bottom: -44%; right: -16%; background: var(--wx-aurora-b); animation-delay: -7s; animation-duration: 23s; }

.wx-fx-glow {
  position: absolute;
  top: -44%;
  right: -12%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--wx-glow, rgba(251, 191, 36, 0.28)) 0%, transparent 66%);
  opacity: 0.55;
  animation: wxGlowPulse 8s ease-in-out infinite;
}
.wx-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 110% at 50% -10%, transparent 52%, rgba(15, 23, 42, 0.1) 100%);
}
.wx-card[data-wx-theme="clear-night"] .wx-vignette,
.wx-card[data-wx-theme="partly-night"] .wx-vignette,
.wx-card[data-wx-theme="storm"] .wx-vignette {
  background: radial-gradient(130% 110% at 50% -10%, transparent 45%, rgba(2, 6, 23, 0.45) 100%);
}
.wx-sun-flare {
  position: absolute;
  top: -70px;
  right: -50px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.55), transparent 62%);
  animation: wxFlare 7s ease-in-out infinite;
}

.wx-drop {
  position: absolute;
  top: -20px;
  width: 1.5px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(to bottom, transparent, rgba(37, 99, 235, 0.5));
  transform: rotate(12deg);
  animation: wxRainFall var(--d, 1.3s) linear infinite;
  animation-delay: var(--dl, 0s);
}
.wx-card[data-wx-theme="storm"] .wx-drop,
[data-theme="dark"] .wx-drop {
  background: linear-gradient(to bottom, transparent, rgba(147, 197, 253, 0.6));
}

.wx-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 7px rgba(191, 219, 254, 0.9);
  animation: wxTwinkle var(--d, 3s) ease-in-out infinite;
  animation-delay: var(--dl, 0s);
}
.wx-shooting-star {
  position: absolute;
  top: 18%;
  left: 64%;
  width: 84px;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), transparent);
  transform: rotate(18deg);
  opacity: 0;
  animation: wxShootingStar 11s ease-in infinite;
}

.wx-flake {
  position: absolute;
  top: -14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 6px rgba(186, 230, 253, 0.8);
  animation: wxSnowFall var(--d, 4.2s) linear infinite;
  animation-delay: var(--dl, 0s);
}

.wx-lightning-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 18%, rgba(254, 240, 138, 0.3), transparent 58%);
  opacity: 0;
  animation: wxFlash 6.5s ease-in-out infinite;
}

.wx-mist-band {
  position: absolute;
  left: -20%;
  width: 140%;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  filter: blur(9px);
  animation: wxMistDrift 12s ease-in-out infinite alternate;
}
[data-theme="dark"] .wx-mist-band {
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.18), transparent);
}

/* ---- Inner content --------------------------------------------------- */
.wx-body {
  position: relative;
  z-index: 1;
}

.wx-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wx-loc-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.wx-loc-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  border: 1px solid var(--wx-chip-border);
  background: var(--wx-chip-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--wx-ink);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 100%;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.wx-loc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px rgba(15, 23, 42, 0.5);
}
.wx-loc-pin {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wx-accent-soft);
  color: var(--wx-accent);
  font-size: 0.68rem;
}
.wx-loc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 230px;
}

.wx-src-tag {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #059669;
}
.wx-src-tag.is-ip,
.wx-src-tag.is-default {
  background: rgba(59, 130, 246, 0.16);
  color: #2563eb;
}
.wx-src-tag.is-search {
  background: rgba(139, 92, 246, 0.16);
  color: #7c3aed;
}
.wx-card[data-wx-theme="clear-night"] .wx-src-tag,
.wx-card[data-wx-theme="partly-night"] .wx-src-tag,
.wx-card[data-wx-theme="storm"] .wx-src-tag,
[data-theme="dark"] .wx-src-tag {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.2);
}
.wx-card[data-wx-theme="clear-night"] .wx-src-tag.is-ip,
.wx-card[data-wx-theme="partly-night"] .wx-src-tag.is-ip,
.wx-card[data-wx-theme="storm"] .wx-src-tag.is-ip,
[data-theme="dark"] .wx-src-tag.is-ip,
[data-theme="dark"] .wx-src-tag.is-default {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.22);
}
.wx-card[data-wx-theme="clear-night"] .wx-src-tag.is-search,
.wx-card[data-wx-theme="partly-night"] .wx-src-tag.is-search,
.wx-card[data-wx-theme="storm"] .wx-src-tag.is-search,
[data-theme="dark"] .wx-src-tag.is-search {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.22);
}

.wx-loc-road {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 130px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--wx-sub);
}
.wx-loc-road i { color: var(--wx-accent); font-size: 0.55rem; }

/* Precision chip */
.wx-acc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--wx-chip-border);
  background: var(--wx-chip-bg);
  color: var(--wx-sub);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, color 0.2s ease;
}
.wx-acc:hover { transform: translateY(-1px); }
.wx-acc i { font-size: 0.62rem; }
.wx-acc.is-precise {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.13);
}
.wx-acc.is-gps {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.1);
}
.wx-acc.is-approx {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.13);
}
.wx-acc.is-search {
  color: #6d28d9;
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.12);
}
.wx-acc.is-scanning i {
  animation: wxPulseSoft 1.2s ease-in-out infinite;
}
/* Primary call-to-action when the area is only approximate */
.wx-acc.wx-loc-update {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--wx-accent), #0ea5a4);
  box-shadow: 0 6px 16px -8px var(--wx-accent);
  font-weight: 800;
}
.wx-acc.wx-loc-update:hover { filter: brightness(1.07); }
.wx-acc.wx-loc-update i { font-size: 0.68rem; }
[data-theme="dark"] .wx-acc.wx-loc-update,
.wx-card[data-wx-theme="clear-night"] .wx-acc.wx-loc-update,
.wx-card[data-wx-theme="partly-night"] .wx-acc.wx-loc-update,
.wx-card[data-wx-theme="storm"] .wx-acc.wx-loc-update {
  color: #04121a;
  background: linear-gradient(135deg, #5eead4, #7dd3fc);
}
.wx-card[data-wx-theme="clear-night"] .wx-acc,
.wx-card[data-wx-theme="partly-night"] .wx-acc,
.wx-card[data-wx-theme="storm"] .wx-acc,
[data-theme="dark"] .wx-acc {
  color: var(--wx-sub);
}
.wx-card[data-wx-theme="clear-night"] .wx-acc.is-precise,
.wx-card[data-wx-theme="partly-night"] .wx-acc.is-precise,
.wx-card[data-wx-theme="storm"] .wx-acc.is-precise,
[data-theme="dark"] .wx-acc.is-precise {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.2);
}
.wx-card[data-wx-theme="clear-night"] .wx-acc.is-gps,
.wx-card[data-wx-theme="partly-night"] .wx-acc.is-gps,
.wx-card[data-wx-theme="storm"] .wx-acc.is-gps,
[data-theme="dark"] .wx-acc.is-gps {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.2);
}
.wx-card[data-wx-theme="clear-night"] .wx-acc.is-approx,
.wx-card[data-wx-theme="partly-night"] .wx-acc.is-approx,
.wx-card[data-wx-theme="storm"] .wx-acc.is-approx,
[data-theme="dark"] .wx-acc.is-approx {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.18);
}

.wx-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.wx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  min-width: 30px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--wx-chip-border);
  background: var(--wx-chip-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--wx-ink);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.wx-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px rgba(15, 23, 42, 0.5);
}
.wx-icon-btn:disabled { opacity: 0.6; cursor: wait; }
.wx-icon-btn.is-gps { color: var(--wx-accent); }

/* ---- Hero ------------------------------------------------------------ */
.wx-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 0;
  padding: 4px 0 2px;
}
.wx-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.wx-svg-wrap {
  width: 86px;
  height: 86px;
  flex: none;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 12px 22px rgba(15, 23, 42, 0.18));
  animation: wxSceneFloat 6.5s ease-in-out infinite;
}
.wx-compact .wx-svg-wrap { width: 66px; height: 66px; }
.wx-compact .wx-hero-side { display: none; }
.wx-compact .wx-geo-banner { gap: 8px; padding: 8px 10px; }
.wx-compact .wx-geo-copy small { display: none; }
.wx-compact .wx-geo-radar { width: 30px; height: 30px; font-size: 0.78rem; }
.wx-compact .wx-geo-enable { padding: 7px 10px; font-size: 0.68rem; }
.wx-svg { width: 100%; height: 100%; overflow: visible; }

.wx-temp-block { min-width: 0; }
.wx-temp-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.wx-temp {
  font-family: var(--font-display, inherit);
  font-size: 3.35rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  background: var(--wx-temp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 16px rgba(15, 23, 42, 0.12));
  animation: wxTempPop 0.55s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.wx-compact .wx-temp { font-size: 2.55rem; }
.wx-cond {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--wx-ink);
}
.wx-feels {
  font-size: 0.74rem;
  color: var(--wx-sub);
  margin-top: 3px;
  font-weight: 500;
}
.wx-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--wx-sub);
  letter-spacing: 0.01em;
}
.wx-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: wxLivePulse 2.2s ease-out infinite;
}

/* Wind dial */
.wx-hero-side { display: flex; align-items: center; flex: none; }
.wx-wind-dial {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wx-chip-bg);
  border: 1px solid var(--wx-chip-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 4px var(--wx-accent-soft), 0 10px 24px -16px rgba(15, 23, 42, 0.6);
}
.wx-wind-dial::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px dashed var(--wx-chip-border);
  animation: wxSpinSlow 34s linear infinite;
}
.wx-wind-dial::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 2px;
  height: 7px;
  border-radius: 2px;
  background: var(--wx-accent);
  opacity: 0.7;
}
.wx-wind-arrow {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--wx-accent);
  font-size: 1.05rem;
  transform: rotate(var(--dir, 0deg));
  transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.2, 1);
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.2));
}
.wx-wind-val {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--wx-ink);
  text-align: center;
  line-height: 1;
}
.wx-wind-val small {
  display: block;
  margin-top: 2px;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--wx-sub);
}

/* ---- Metric tiles ---------------------------------------------------- */
.wx-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}
.wx-compact:not(.wx-expanded) .wx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wx-metric {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 14px;
  background: var(--wx-chip-bg);
  border: 1px solid var(--wx-chip-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.71rem;
  color: var(--wx-sub);
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: wxItemIn 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.wx-metric:hover {
  transform: translateY(-2px);
  border-color: var(--wx-accent);
  box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.6);
}
.wx-metric i {
  color: var(--wx-accent);
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
}
.wx-metric b {
  color: var(--wx-ink);
  font-weight: 800;
}
.wx-metric small {
  width: 100%;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--wx-sub);
  opacity: 0.82;
}
.wx-compact:not(.wx-expanded) .wx-metric.is-extra { display: none; }
.wx-aqi-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

/* ---- Civic advisory -------------------------------------------------- */
.wx-advisory {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 13px;
  padding: 10px 13px;
  border-radius: 14px;
  background: var(--wx-chip-bg);
  border: 1px solid var(--wx-chip-border);
  border-left: 3.5px solid var(--wx-adv-color, #3b82f6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--wx-ink);
  animation: wxItemIn 0.55s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.wx-advisory.risk-high { --wx-adv-color: #ef4444; }
.wx-advisory.risk-moderate { --wx-adv-color: #f59e0b; }
.wx-advisory.risk-low { --wx-adv-color: #10b981; }
.wx-advisory.risk-high {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12), var(--wx-chip-bg) 60%);
}
.wx-advisory i {
  color: var(--wx-adv-color, #3b82f6);
  margin-top: 2px;
  flex: none;
}
.wx-advisory.risk-high i { animation: wxPulseSoft 2s ease-in-out infinite; }

/* ---- 90-minute nowcast ---------------------------------------------- */
.wx-nowcast {
  margin-top: 14px;
  padding: 12px 14px 10px;
  border-radius: 16px;
  background: var(--wx-panel);
  border: 1px solid var(--wx-chip-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: wxItemIn 0.55s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.wx-nowcast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--wx-sub);
}
.wx-nowcast-head span { display: inline-flex; align-items: center; gap: 6px; }
.wx-nowcast-head i { color: var(--wx-accent); }
.wx-nowcast-head b {
  font-size: 0.72rem;
  color: var(--wx-accent);
  letter-spacing: 0.01em;
}
.wx-nowcast.is-dry .wx-nowcast-head b { color: #059669; }
.wx-nowcast.is-wet .wx-nowcast-head b { color: #2563eb; }
[data-theme="dark"] .wx-nowcast.is-dry .wx-nowcast-head b { color: #6ee7b7; }
[data-theme="dark"] .wx-nowcast.is-wet .wx-nowcast-head b { color: #93c5fd; }

.wx-nowcast-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 7px;
  height: 78px;
  margin-top: 9px;
}
.wx-nc-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 100%;
  min-width: 0;
}
.wx-nc-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.06), rgba(148, 163, 184, 0.14));
  overflow: hidden;
}
.wx-nc-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, #93c5fd, #2563eb);
  opacity: calc(0.35 + var(--pop, 0.5) * 0.65);
  transform-origin: bottom;
  animation: wxBarGrow 0.75s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.wx-nowcast.is-dry .wx-nc-bar { background: linear-gradient(180deg, #6ee7b7, #10b981); }
.wx-nowcast.is-wet .wx-nc-bar { background: linear-gradient(180deg, #93c5fd, #1d4ed8); }
.wx-nc-lab {
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--wx-sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- Daylight arc ---------------------------------------------------- */
.wx-sun-arc {
  margin-top: 14px;
  padding: 11px 12px 10px;
  border-radius: 14px;
  background: var(--wx-panel);
  border: 1px solid var(--wx-chip-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: wxItemIn 0.6s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.wx-sun-arc-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.2), rgba(99, 102, 241, 0.22));
  overflow: visible;
}
.wx-sun-arc-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #fde047, #f59e0b);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
  transition: width 0.8s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.wx-sun-arc-dot {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fffbeb;
  border: 2px solid #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18), 0 0 18px rgba(245, 158, 11, 0.75);
  animation: wxSunDot 3.2s ease-in-out infinite;
  transition: left 0.8s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.wx-sun-arc-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--wx-sub);
  font-variant-numeric: tabular-nums;
}
.wx-sun-arc-labels i { color: var(--wx-accent); margin-right: 2px; }

/* ---- Forecast tabs --------------------------------------------------- */
.wx-forecast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px dashed var(--wx-chip-border);
}
.wx-tabs {
  position: relative;
  display: inline-flex;
  gap: 3px;
  background: var(--wx-chip-bg);
  border: 1px solid var(--wx-chip-border);
  padding: 3px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.wx-tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: var(--wx-sub);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.22s ease, background 0.22s ease, transform 0.18s ease;
}
.wx-tab:hover { color: var(--wx-ink); }
.wx-tab.active {
  background: var(--wx-ink);
  color: #ffffff;
  box-shadow: 0 6px 14px -10px rgba(15, 23, 42, 0.8);
}
[data-theme="dark"] .wx-tab.active,
.wx-card[data-wx-theme="clear-night"] .wx-tab.active,
.wx-card[data-wx-theme="partly-night"] .wx-tab.active,
.wx-card[data-wx-theme="storm"] .wx-tab.active {
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

.wx-updated {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--wx-sub);
  font-variant-numeric: tabular-nums;
}
.wx-toggle-forecast {
  border: none;
  background: transparent;
  color: var(--wx-accent);
  font-size: 0.71rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 9px;
  transition: background 0.2s ease;
}
.wx-toggle-forecast:hover { background: var(--wx-chip-bg); }

/* ---- Hourly strip ---------------------------------------------------- */
.wx-hourly-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(60px, 1fr);
  gap: 8px;
  margin-top: 11px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.wx-hourly-strip::-webkit-scrollbar { display: none; }
.wx-hour-item {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 6px 8px;
  border-radius: 13px;
  background: var(--wx-chip-bg);
  border: 1px solid var(--wx-chip-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.69rem;
  color: var(--wx-ink);
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: wxItemIn 0.45s cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 24ms);
}
.wx-hour-item:hover {
  transform: translateY(-3px);
  border-color: var(--wx-accent);
  box-shadow: 0 12px 22px -18px rgba(15, 23, 42, 0.6);
}
.wx-hour-item.is-now {
  background: linear-gradient(180deg, var(--wx-accent-soft), var(--wx-chip-bg));
  border-color: var(--wx-accent);
  box-shadow: 0 10px 20px -16px var(--wx-accent);
}
.wx-hour-time {
  color: var(--wx-sub);
  font-weight: 700;
  font-size: 0.65rem;
}
.wx-hour-item.is-now .wx-hour-time { color: var(--wx-accent); }
.wx-hour-ico { width: 26px; height: 26px; }
.wx-hour-temp { font-weight: 800; font-size: 0.8rem; }
.wx-hour-pop {
  font-size: 0.6rem;
  font-weight: 800;
  color: #2563eb;
}
[data-theme="dark"] .wx-hour-pop,
.wx-card[data-wx-theme="clear-night"] .wx-hour-pop,
.wx-card[data-wx-theme="partly-night"] .wx-hour-pop,
.wx-card[data-wx-theme="storm"] .wx-hour-pop {
  color: #93c5fd;
}

/* ---- 7-day list ------------------------------------------------------ */
.wx-daily-list {
  display: grid;
  gap: 6px;
  margin-top: 11px;
}
.wx-day-row {
  display: grid;
  grid-template-columns: 76px 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--wx-chip-bg);
  border: 1px solid var(--wx-chip-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.73rem;
  color: var(--wx-ink);
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: wxItemIn 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.wx-day-row:hover {
  transform: translateX(3px);
  border-color: var(--wx-accent);
  box-shadow: 0 10px 22px -18px rgba(15, 23, 42, 0.6);
}
.wx-day-name { font-weight: 800; }
.wx-day-pop {
  color: var(--wx-sub);
  font-size: 0.68rem;
  font-weight: 600;
}
.wx-day-temps {
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wx-day-min { color: var(--wx-sub); font-weight: 600; }

/* ---- Inline location search ----------------------------------------- */
.wx-picker {
  margin-top: 11px;
  padding: 11px;
  border-radius: 14px;
  background: var(--wx-panel);
  border: 1px solid var(--wx-chip-border);
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--wx-ink);
  animation: wxFadeSlide 0.24s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.wx-picker-row { display: flex; gap: 6px; }
.wx-picker-input {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1.5px solid var(--wx-chip-border);
  background: var(--wx-chip-bg);
  color: var(--wx-ink);
  font-size: 0.8rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wx-picker-input::placeholder { color: var(--wx-sub); opacity: 0.75; }
.wx-picker-input:focus {
  outline: none;
  border-color: var(--wx-accent);
  box-shadow: 0 0 0 3px var(--wx-accent-soft);
}
.wx-picker-gps {
  border: none;
  border-radius: 10px;
  padding: 0 12px;
  background: var(--wx-accent);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.18s ease, filter 0.2s ease;
}
.wx-picker-gps:hover { transform: translateY(-1px); filter: brightness(1.08); }
.wx-picker-results {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}
.wx-picker-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: var(--wx-chip-bg);
  color: var(--wx-ink);
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.77rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease;
}
.wx-picker-item:hover {
  border-color: var(--wx-accent);
  background: var(--wx-accent-soft);
  transform: translateX(2px);
}
.wx-picker-sub { font-size: 0.68rem; color: var(--wx-sub); }
.wx-picker-quick { margin-top: 9px; }
.wx-picker-quick-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--wx-sub); margin-bottom: 6px;
}
.wx-picker-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wx-div-chip {
  border: 1px solid var(--wx-chip-border);
  background: var(--wx-chip-bg);
  color: var(--wx-ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease;
}
.wx-div-chip i { font-size: 0.62rem; color: var(--wx-accent); }
.wx-div-chip:hover {
  border-color: var(--wx-accent);
  background: var(--wx-accent-soft);
  transform: translateY(-1px);
}

/* ---- Geo permission banner ------------------------------------------ */
.wx-geo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 3px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--wx-accent-soft), var(--wx-chip-bg) 70%);
  border: 1px dashed var(--wx-chip-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: wxBannerIn 0.45s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.wx-geo-banner.is-blocked {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), var(--wx-chip-bg) 70%);
  border-color: rgba(245, 158, 11, 0.4);
}
.wx-geo-radar {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wx-accent-soft);
  color: var(--wx-accent);
  font-size: 0.9rem;
}
.wx-geo-radar::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--wx-accent);
  opacity: 0.45;
  animation: wxRadarPing 2.6s ease-out infinite;
}
.wx-geo-radar.is-scanning::after { animation-duration: 1.2s; }
.wx-geo-radar.is-off { color: #b45309; background: rgba(245, 158, 11, 0.18); }
.wx-geo-radar.is-off::after { display: none; }
.wx-geo-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wx-geo-copy b { font-size: 0.76rem; font-weight: 800; color: var(--wx-ink); }
.wx-geo-copy small {
  font-size: 0.67rem;
  line-height: 1.35;
  color: var(--wx-sub);
}
.wx-geo-enable {
  flex: none;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--wx-accent);
  color: #fff;
  font-size: 0.71rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 10px 20px -14px var(--wx-accent);
  transition: transform 0.18s ease, filter 0.2s ease;
}
.wx-geo-enable:hover { transform: translateY(-1px); filter: brightness(1.08); }
.wx-geo-enable:disabled { opacity: 0.7; cursor: wait; }
.wx-geo-map {
  flex: none;
  border: 1px solid var(--wx-chip-border);
  border-radius: 10px;
  padding: 8px 11px;
  background: var(--wx-chip-bg);
  color: var(--wx-ink);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}
.wx-geo-map:hover { transform: translateY(-1px); border-color: var(--wx-accent); background: var(--wx-accent-soft); }
.wx-loc-hint { border-style: solid; }
.wx-loc-hint .wx-geo-copy small { opacity: 0.85; }
.wx-geo-dismiss {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--wx-chip-border);
  background: transparent;
  color: var(--wx-sub);
  cursor: pointer;
  font-size: 0.68rem;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.wx-geo-dismiss:hover { background: var(--wx-chip-bg); color: var(--wx-ink); }
.wx-geo-help {
  margin-top: 8px;
  padding: 11px 13px;
  border-radius: 14px;
  background: var(--wx-panel);
  border: 1px solid var(--wx-chip-border);
  font-size: 0.71rem;
  line-height: 1.5;
  color: var(--wx-sub);
  animation: wxFadeSlide 0.24s ease both;
}
.wx-geo-help b { color: var(--wx-ink); display: inline-flex; align-items: center; gap: 6px; }
.wx-geo-help ol { margin: 7px 0 9px; padding-left: 18px; }
.wx-geo-help li { margin-bottom: 3px; }
.wx-geo-help .wx-geo-enable { margin-top: 2px; }

/* ---- Compact dengue strip ------------------------------------------- */
.wx-mini-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 0.76rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wx-mini-strip:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -20px rgba(15, 23, 42, 0.5); }
.wx-mini-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wx-mini-ico { width: 32px; height: 32px; flex: none; }
.wx-mini-acc { color: var(--text-muted); }
.wx-mini-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}
.wx-mini-badge.risk-high { background: var(--danger-light); color: var(--danger); }
.wx-mini-badge.risk-moderate { background: var(--warning-light); color: #b45309; }
.wx-mini-badge.risk-low { background: var(--success-light); color: var(--success); }
[data-theme="dark"] .wx-mini-badge.risk-moderate { color: #fbbf24; }

/* ---- Loading skeleton ------------------------------------------------ */
.wx-skeleton-stack {
  flex: 1;
  display: grid;
  gap: 9px;
  min-width: 0;
}
.wx-skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18) 25%, rgba(148, 163, 184, 0.38) 50%, rgba(148, 163, 184, 0.18) 75%);
  background-size: 200% 100%;
  animation: wxShimmer 1.4s ease-in-out infinite;
}
.wx-skeleton-stack .wx-skeleton-line:nth-child(2) { animation-delay: 0.15s; }
.wx-skeleton-stack .wx-skeleton-line:nth-child(3) { animation-delay: 0.3s; }

/* ---- SVG micro-animations ------------------------------------------- */
.wx-sun-rays { transform-origin: 32px 32px; animation: wxSpinSlow 26s linear infinite; }
.wx-sun-core { transform-origin: 32px 32px; animation: wxSunPulse 4s ease-in-out infinite; }
.wx-sun-halo { transform-origin: 32px 32px; animation: wxHaloPulse 5s ease-in-out infinite; }
.wx-cloud-float { animation: wxCloudDrift 5.5s ease-in-out infinite; }
.wx-cloud-float-slow { animation: wxCloudDrift 7.8s ease-in-out infinite reverse; }
.wx-svg-drop { animation: wxSvgDrop 1.25s ease-in infinite; }
.wx-svg-drop.d2 { animation-delay: 0.25s; }
.wx-svg-drop.d3 { animation-delay: 0.5s; }
.wx-svg-drop.d4 { animation-delay: 0.72s; }
.wx-svg-drop.d5 { animation-delay: 0.94s; }
.wx-svg-bolt { animation: wxBoltFlash 3.8s ease-in-out infinite; transform-origin: center; }
.wx-moon-bob { transform-origin: 32px 32px; animation: wxMoonBob 5.5s ease-in-out infinite; }
.wx-svg-star { transform-origin: center; animation: wxTwinkle 2.8s ease-in-out infinite; }
.wx-svg-star.s2 { animation-delay: 0.9s; }
.wx-svg-star.s3 { animation-delay: 1.7s; }
.wx-svg-star.s4 { animation-delay: 2.3s; }

/* ---- Keyframes ------------------------------------------------------- */
@keyframes wxBorderSpin { to { --wx-angle: 360deg; } }
@keyframes wxAurora {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6%, 5%, 0) scale(1.12); }
  100% { transform: translate3d(-4%, -3%, 0) scale(1.04); }
}
@keyframes wxGlowPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.14); opacity: 0.8; }
}
@keyframes wxFlare {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.75; }
  50% { transform: scale(1.12) translateY(6px); opacity: 1; }
}
@keyframes wxSpinSlow { to { transform: rotate(360deg); } }
@keyframes wxSunPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes wxHaloPulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes wxCloudDrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3.5px); } }
@keyframes wxMoonBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-2px) rotate(3deg); } }
@keyframes wxSvgDrop {
  0% { opacity: 0; transform: translateY(-3px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(11px); }
}
@keyframes wxBoltFlash {
  0%, 72%, 100% { opacity: 0.25; transform: scale(0.96); }
  76%, 82% { opacity: 1; transform: scale(1.06); }
  79% { opacity: 0.45; }
}
@keyframes wxRainFall {
  0% { transform: translate3d(0, -12px, 0) rotate(12deg); opacity: 0; }
  18% { opacity: 0.85; }
  100% { transform: translate3d(-18px, 260px, 0) rotate(12deg); opacity: 0; }
}
@keyframes wxSnowFall {
  0% { transform: translate3d(0, -12px, 0); opacity: 0; }
  20% { opacity: 0.9; }
  100% { transform: translate3d(20px, 260px, 0); opacity: 0; }
}
@keyframes wxTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes wxShootingStar {
  0%, 82% { opacity: 0; transform: translate3d(0, 0, 0) rotate(18deg); }
  84% { opacity: 1; }
  90% { opacity: 0.8; transform: translate3d(-120px, 40px, 0) rotate(18deg); }
  92%, 100% { opacity: 0; transform: translate3d(-150px, 50px, 0) rotate(18deg); }
}
@keyframes wxFlash {
  0%, 88%, 100% { opacity: 0; }
  90% { opacity: 0.9; }
  92% { opacity: 0.15; }
  94% { opacity: 0.7; }
}
@keyframes wxMistDrift { 0% { transform: translateX(-6%); } 100% { transform: translateX(6%); } }
@keyframes wxShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes wxFadeSlide {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes wxBannerIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wxItemIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes wxTempPop {
  0% { opacity: 0; transform: translateY(6px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wxSceneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes wxLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes wxPulseSoft { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes wxRadarPing {
  0% { transform: scale(0.85); opacity: 0.6; }
  80% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes wxBarGrow {
  from { transform: scaleY(0.05); opacity: 0; }
  to { transform: scaleY(1); }
}
@keyframes wxSunDot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16), 0 0 16px rgba(245, 158, 11, 0.65); }
  50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0.1), 0 0 24px rgba(245, 158, 11, 0.9); }
}

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 720px) {
  .wx-hero-side { display: none; }
}
@media (max-width: 640px) {
  .weather-widget.wx-card { padding: 13px 14px 12px !important; border-radius: 18px !important; }
  .wx-svg-wrap { width: 58px; height: 58px; }
  .wx-compact .wx-svg-wrap { width: 54px; height: 54px; }
  .wx-temp { font-size: 2.5rem; }
  .wx-compact .wx-temp { font-size: 2.1rem; }
  .wx-loc-name { max-width: 150px; }
  .wx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wx-day-row { grid-template-columns: 56px 26px 1fr auto; gap: 7px; padding: 7px 9px; }
  .wx-geo-banner { flex-wrap: wrap; }
  .wx-geo-copy { flex-basis: calc(100% - 50px); }
  .wx-geo-enable { margin-left: 46px; }
  .wx-nowcast-bars { height: 68px; gap: 5px; }
  .wx-sun-arc-labels { font-size: 0.58rem; }
}

/* ---- Reduced motion -------------------------------------------------- */
html.reduce-motion .wx-aurora,
html.reduce-motion .wx-fx-glow,
html.reduce-motion .wx-sun-flare,
html.reduce-motion .wx-shooting-star,
html.reduce-motion .wx-sun-rays,
html.reduce-motion .wx-sun-core,
html.reduce-motion .wx-sun-halo,
html.reduce-motion .wx-cloud-float,
html.reduce-motion .wx-cloud-float-slow,
html.reduce-motion .wx-svg-drop,
html.reduce-motion .wx-svg-bolt,
html.reduce-motion .wx-moon-bob,
html.reduce-motion .wx-svg-star,
html.reduce-motion .wx-drop,
html.reduce-motion .wx-star,
html.reduce-motion .wx-flake,
html.reduce-motion .wx-lightning-flash,
html.reduce-motion .wx-mist-band,
html.reduce-motion .wx-skeleton-line,
html.reduce-motion .wx-picker,
html.reduce-motion .wx-metric,
html.reduce-motion .wx-advisory,
html.reduce-motion .wx-nowcast,
html.reduce-motion .wx-sun-arc,
html.reduce-motion .wx-hour-item,
html.reduce-motion .wx-day-row,
html.reduce-motion .wx-geo-banner,
html.reduce-motion .wx-geo-radar::after,
html.reduce-motion .wx-live-dot,
html.reduce-motion .wx-temp,
html.reduce-motion .wx-svg-wrap,
html.reduce-motion .wx-wind-dial::before,
html.reduce-motion .weather-widget.wx-card::before,
html.reduce-motion .wx-nc-bar,
html.reduce-motion .wx-sun-arc-dot,
html.reduce-motion .wx-acc.is-scanning i,
html.reduce-motion .wx-advisory.risk-high i {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .wx-aurora,
  .wx-fx-glow,
  .wx-sun-flare,
  .wx-shooting-star,
  .wx-sun-rays,
  .wx-sun-core,
  .wx-sun-halo,
  .wx-cloud-float,
  .wx-cloud-float-slow,
  .wx-svg-drop,
  .wx-svg-bolt,
  .wx-moon-bob,
  .wx-svg-star,
  .wx-drop,
  .wx-star,
  .wx-flake,
  .wx-lightning-flash,
  .wx-mist-band,
  .wx-skeleton-line,
  .wx-picker,
  .wx-metric,
  .wx-advisory,
  .wx-nowcast,
  .wx-sun-arc,
  .wx-hour-item,
  .wx-day-row,
  .wx-geo-banner,
  .wx-geo-radar::after,
  .wx-live-dot,
  .wx-temp,
  .wx-svg-wrap,
  .wx-wind-dial::before,
  .weather-widget.wx-card::before,
  .wx-nc-bar,
  .wx-sun-arc-dot,
  .wx-acc.is-scanning i,
  .wx-advisory.risk-high i {
    animation: none !important;
    transition: none !important;
  }
}
