:root {
  --ink: #0c1a2c;
  --ink-2: #0e2138;
  --card-rgb: 74, 116, 196;
  --panel: rgba(var(--card-rgb), 0.5);
  --panel-2: rgba(var(--card-rgb), 0.4);
  --panel-border: rgba(255, 255, 255, 0.10);
  --panel-filter: blur(22px) saturate(150%) brightness(0.75);
  --tile-filter: blur(20px) saturate(150%) brightness(0.75);
  --row-bg: rgba(255,255,255,0.04);
  --row-hover-bg: rgba(255,255,255,0.09);
  --row-active-bg: rgba(var(--card-rgb), 0.74);
  --row-active-border: rgba(255,255,255,0.5);
  --card-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
  --tile-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.40);
  --accent: #5b9ef0;
  --accent-soft: #a8d0ff;
  --accent-warm: #ffb13c;
  --accent-cloud: #b4bfcb;
  --side-bg: #ffffff;
  --side-ink: #8a93a3;
  --side-active-bg: #e9f1fe;
  --side-active: #2f6fed;
  --photo-base-rgb: 10, 19, 34;
  --radius: 22px;
  --radius-sm: 16px;
  --card-text-shadow: none;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============ Meteori Weather PWA V1 home ============ */
body.show-home .shell { display: none; }
body:not(.show-home) .home-view { display: none; }

.home-view {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--text);
  background: var(--ink);
}

.home-bg {
  position: fixed;
  inset: 0;
  background: #1a2740 url("assets/background/sunny.png") center / cover no-repeat;
}

.home-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 24, 0.3);
}

.home-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: min(560px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(34px, 7vh, 84px) 22px 44px;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

.home-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin: clamp(4px, 4vh, 36px) 0 6px;
}

.home-logo {
  width: clamp(94px, 26vw, 132px);
  height: auto;
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.34);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(46px, 13vw, 74px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0,0,0,0.42), 0 12px 40px rgba(0,0,0,0.30);
}

.home-sub {
  margin: 0;
  max-width: 30ch;
  color: rgba(255,255,255,0.88);
  font-size: clamp(15px, 4.2vw, 18px);
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,0.34);
}

.home-search {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  z-index: 30;
}

.home-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home-search .search {
  width: 100%;
  max-width: none;
  min-height: 58px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 14px 40px rgba(0,0,0,0.22);
}

.home-search #searchInput {
  font-size: 17px;
  font-weight: 600;
}

.city-section {
  display: grid;
  gap: 14px;
  width: 100%;
  /* extra room so the focused "Use current location" dropdown doesn't overlap */
  margin-top: 74px;
}

.city-section h2 {
  margin: 0;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.30);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 32px rgba(0,0,0,0.20);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.city-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.32);
}

.city-card .city-ic {
  display: block;
  width: 34px;
  height: 34px;
}

.city-card .city-ic svg {
  display: block;
  width: 100%;
  height: 100%;
}

.city-card .city-name {
  font-size: 15px;
  font-weight: 760;
  line-height: 1.2;
}

.home-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 20px;
  background: rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 32px rgba(0,0,0,0.20);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
}

.primary-action:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.32);
}

.primary-action svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.home-hint {
  margin: 0;
  max-width: 36ch;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.30);
}

.home-status {
  min-height: 16px;
  margin: 0;
  color: #ffb3b3;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

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

.weather-actions .install-entry-btn {
  white-space: nowrap;
}

.home-view .search-results {
  top: calc(100% + 8px);
  padding: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}
.home-view .search-result { border-radius: 14px; }
.home-view .search-result:hover,
.home-view .search-result.active { background: rgba(255, 255, 255, 0.18); }

@media (max-width: 760px) {
  .home-panel {
    width: min(100% - 24px, 920px);
    min-height: 100svh;
    padding: 28px 0;
  }

  .home-brand {
    align-items: flex-start;
  }

  .home-brand h1 {
    font-size: 44px;
    letter-spacing: -1px;
  }

  .home-search .search {
    width: 100%;
    max-width: none;
    height: auto;
  }

  .home-search #searchInput {
    font-size: 15px;
  }

  .primary-action {
    width: 100%;
  }

  .city-chip {
    flex: 1 1 calc(50% - 10px);
  }
}

body[data-theme="solid"] {
  --panel: rgba(14, 24, 40, 0.88);
  --panel-2: rgba(14, 24, 40, 0.82);
  --panel-border: rgba(255, 255, 255, 0.16);
  --panel-filter: blur(6px) saturate(120%);
  --tile-filter: blur(5px) saturate(115%);
  --row-bg: rgba(255,255,255,0.075);
  --row-hover-bg: rgba(255,255,255,0.12);
  --row-active-bg: rgba(255,255,255,0.14);
  --row-active-border: rgba(255,255,255,0.58);
  --card-shadow: 0 18px 45px rgba(2, 8, 18, 0.26), inset 0 1px 0 rgba(255,255,255,0.10);
  --tile-shadow: 0 14px 32px rgba(2, 8, 18, 0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  --card-text-shadow: none;
}

body[data-theme="light"] {
  --panel: rgba(255, 255, 255, 0.78);
  --panel-2: rgba(255, 255, 255, 0.72);
  --panel-border: rgba(38, 38, 40, 0.18);
  --panel-filter: blur(16px) saturate(125%);
  --tile-filter: blur(14px) saturate(120%);
  --row-bg: rgba(255,255,255,0.70);
  --row-hover-bg: linear-gradient(160deg, #FEFCF0 0%, #F8F1E2 100%);
  --row-active-bg: linear-gradient(160deg, #FFFAEE 0%, #F7EDD4 100%);
  --row-active-border: rgba(200, 165, 90, 0.38);
  --card-shadow: 0 10px 24px rgba(38, 38, 40, 0.11), inset 0 1px 0 rgba(255,255,255,0.90);
  --tile-shadow: 0 10px 22px rgba(38, 38, 40, 0.10), inset 0 1px 0 rgba(255,255,255,0.88);
  --text: #262628;
  --text-dim: rgba(38, 38, 40, 0.68);
  --text-faint: rgba(38, 38, 40, 0.52);
  --accent: #2e80e0;
  --accent-soft: #2e80e0;
  --card-text-shadow: none;
}

body[data-theme="light"] .card-head,
body[data-theme="light"] .tile-value,
body[data-theme="light"] .drow .d-day {
  color: var(--text);
}
/* deeper sun-orange + the logo's cloud grey for the light theme (legible on white) */
body[data-theme="light"] { --accent-warm: #e07a0a; --accent-cloud: #8399b8; }

body[data-theme="light"] .hourly-view-switch {
  border-color: rgba(47, 111, 237, 0.16);
  background: rgba(20, 40, 74, 0.08);
  box-shadow: inset 0 1px 2px rgba(18,28,44,0.10);
}

body[data-theme="light"] .hourly-view-thumb {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(18,28,44,0.14), inset 0 1px 0 rgba(255,255,255,0.9);
}

body[data-theme="light"] .hourly-view-option {
  color: rgba(18, 28, 44, 0.56);
}

body[data-theme="light"] .hourly-view-option:hover {
  color: rgba(18, 28, 44, 0.82);
}

body[data-theme="light"] .hourly-view-option[aria-pressed="true"] {
  color: #10243c;
}

body[data-theme="light"] .tile-icon {
  color: rgba(38, 38, 40,0.62);
}

body[data-theme="light"] .tile-icon.eye {
  color: rgba(38, 38, 40,0.48);
}
/* meaningful colors for the detail-tile glyphs on the light theme */
body[data-theme="light"] .tile-icon.drop { color: var(--accent-soft); }   /* humidity → drop blue */
body[data-theme="light"] .tile-icon.uv   { color: var(--accent-warm); }   /* UV → sun orange */
body[data-theme="light"] .tile-icon.cloud { color: var(--accent-cloud); } /* cloud cover → logo slate */
/* precipitation legend drop → same drop blue */
body[data-theme="light"] .hcol.legend .h-pop.leg-ic,
body[data-theme="light"] .hcol.legend .h-pop.leg-ic svg { color: var(--accent-soft); }

body[data-theme="light"] .drow .d-ic {
  filter:
    drop-shadow(0 1px 1px rgba(38, 38, 40,0.18))
    drop-shadow(0 0 3px rgba(38, 38, 40,0.12));
}

body[data-theme="light"] .now-temp,
body[data-theme="light"] .now-cond,
body[data-theme="light"] .now-feels,
body[data-theme="light"] .now-range {
  color: #ffffff;
  text-shadow:
    0 2px 8px rgba(0,0,0,0.58),
    0 8px 28px rgba(0,0,0,0.46),
    0 16px 56px rgba(0,0,0,0.32);
}

body[data-theme="light"] .now-range .down {
  color: rgba(255,255,255,0.78);
}

body[data-theme="light"] .hcol .h-time,
body[data-theme="light"] .hcol .h-time.now,
body[data-theme="light"] .hcol.event .h-time,
body[data-theme="light"] .hcol .h-temp {
  color: var(--text);
}

body[data-theme="light"] .hcol.event .ev-time {
  color: #b77819;
}

body[data-theme="light"] .hcol .h-ic {
  filter:
    drop-shadow(0 1px 1px rgba(38, 38, 40,0.18))
    drop-shadow(0 0 3px rgba(38, 38, 40,0.12));
}

body[data-theme="light"] .hcol.legend .leg-ic svg {
  color: rgba(38, 38, 40,0.32);
}

/* Sonderfall KACHELN (unten): Hintergrund sehr hell/weißlich → weiße Schrift
   auf den fast transparenten Kacheln verschwindet. Per JS (setBackgroundBrightness)
   gesetzt. Normal bleibt alles wie es ist – hier nur die Panel-Töne abgedunkelt. */
body.bg-bright:not([data-theme="light"]) {
  --panel: rgba(14, 26, 42, 0.52);
  --panel-2: rgba(14, 26, 42, 0.60);
  --panel-border: rgba(255, 255, 255, 0.18);
}
body.bg-bright .card {
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.10);
}

/* Sonderfall HERO (oben): Bildbereich hinter Stadt/Grad-Anzeige ist hell. Statt
   eines unschönen Glow-Schattens wird die freistehende Schrift auf dunkle Tinte
   umgestellt – sauberer Kontrast wie bei Apples adaptivem Weiß/Schwarz. Per JS
   (setHeroBrightness) gesetzt. */
body.hero-light:not([data-theme="light"]) .brand-name,
body.hero-light:not([data-theme="light"]) .now-temp,
body.hero-light:not([data-theme="light"]) .now-cond { color: var(--ink); }
body.hero-light:not([data-theme="light"]) .now-feels,
body.hero-light:not([data-theme="light"]) .brand-tagline,
body.hero-light:not([data-theme="light"]) .now-range { color: rgba(12, 26, 44, 0.72); }
body.hero-light:not([data-theme="light"]) .now-range .down { color: rgba(12, 26, 44, 0.6); }
/* Heller Schein hinter dem dunklen Text: hebt die Schrift vom hellen Hintergrund
   (Schnee, Nebel) ab ohne künstlich zu wirken. Mehrere überlagerte Lagen für
   weiche, großflächige Leuchtkraft. */
body.hero-light:not([data-theme="light"]) .now-temp,
body.hero-light:not([data-theme="light"]) .now-cond,
body.hero-light:not([data-theme="light"]) .now-feels,
body.hero-light:not([data-theme="light"]) .now-range,
body.hero-light:not([data-theme="light"]) .brand-mark {
  text-shadow:
    0 0 18px rgba(255,255,255,0.95),
    0 0 36px rgba(255,255,255,0.75),
    0 0 60px rgba(255,255,255,0.50);
}
/* Suchfeld + Icon-Buttons sitzen ebenfalls oben: dunkler Sockel statt
   weiß-auf-transparent, damit Rahmen, Icons und Platzhalter sichtbar bleiben. */
body.hero-light:not([data-theme="light"]) .search,
body.hero-light:not([data-theme="light"]) .icon-btn,
body.hero-light:not([data-theme="light"]) .install-entry-btn {
  background: rgba(14, 26, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.22);
}
body.hero-light:not([data-theme="light"]) .icon-btn[aria-expanded="true"] { background: rgba(14, 26, 42, 0.72); }
body.hero-light:not([data-theme="light"]) #searchInput::placeholder { color: rgba(255, 255, 255, 0.78); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--ink) url("assets/background/sunny.png") center / cover no-repeat;
  overflow: hidden;
}
/* ============ Shell ============ */
.shell {
  display: flex;
  height: 100vh;
  background: var(--side-bg);
}


/* ============ Dashboard ============ */
.dash {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: #0a1322 url("assets/background/sunny.png") center / cover no-repeat;
  overflow: hidden;
}

/* Foto als feststehender Hintergrund – bleibt beim Scrollen sichtbar, randlos */
.dash-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
}
.dash-photo,
.dash-scrim,
.dash-card-fade { position: absolute; inset: 0; }
.dash-photo {
  background: #0a1322 var(--initial-weather-bg, url("assets/background/sunny.png")) center / cover no-repeat;
  transform: scale(1.01);
  transition: filter .45s ease, transform .45s ease;
}
.dash-scrim {
  background: none;
}
.dash-card-fade {
  background: none;
}
/* Mittelhelles Bild (weder dunkel genug für sicher lesbaren weißen Text noch
   hell genug für den bg-bright-Modus): das FOTO wird abgedunkelt – aber nicht
   per schwarzer Fläche (die wäscht Farbe + Kontrast aus und wirkt flau/kalt),
   sondern wie eine Belichtungskorrektur: Helligkeit runter, dafür Sättigung und
   Kontrast leicht hoch, damit die Leuchtkraft erhalten bleibt.
   Stellschrauben: brightness = wie dunkel · saturate/contrast = Brillanz. */
body.bg-dim .dash-photo {
  filter: brightness(0.82) contrast(1.14) saturate(1.22);
}

body.weather-loading .dash-photo {
  filter: none;
  transform: scale(1.01);
}

body.weather-loading .dash-scroll {
  filter: none;
  opacity: 1;
  transform: none;
  pointer-events: none;
}

.weather-loading-panel {
  position: absolute;
  top: 104px;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  width: max-content;
  max-width: min(300px, calc(100vw - 48px));
  padding: 8px 12px 9px 9px;
  border: 1px solid rgba(255,255,255,0.52);
  border-radius: 999px;
  background: rgba(255,255,255,0.34);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(18, 28, 44, 0.10), inset 0 1px 0 rgba(255,255,255,0.48);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity .18s ease, transform .18s ease;
  text-align: left;
}

body.weather-loading .weather-loading-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.weather-loading-panel > div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
  width: 156px;
}

.weather-loader {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.weather-loader svg {
  width: 32px;
  height: 32px;
  transform: rotate(-90deg);
}

.loader-track,
.loader-progress {
  fill: none;
  stroke-width: 4;
}

.loader-track {
  stroke: rgba(12,26,44,0.14);
}

.loader-progress {
  stroke: #22c55e;
  stroke-linecap: round;
  stroke-dasharray: 113;
  stroke-dashoffset: calc(113 - (113 * var(--weather-loading-progress, 0) / 100));
  transition: stroke-dashoffset .18s cubic-bezier(.2,.75,.2,1);
}

.weather-loading-title {
  font-size: 12px;
  line-height: 1.15;
  font-weight: 850;
  white-space: nowrap;
}

.weather-loading-sub {
  color: rgba(12,26,44,0.62);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 650;
  white-space: nowrap;
}

body[data-theme="dark"] .weather-loading-panel {
  border-color: var(--panel-border);
  background: rgba(24,24,26,0.52);
  color: #fff;
  box-shadow: var(--card-shadow);
}

body[data-theme="dark"] .loader-track {
  stroke: rgba(255,255,255,0.14);
}

body[data-theme="dark"] .loader-progress {
  stroke: #4ade80;
}

body[data-theme="dark"] .weather-loading-sub {
  color: rgba(255,255,255,0.62);
}

body.weather-loading .hero-now,
body.weather-loading .hero-compact,
body.weather-loading .content,
body.weather-loading .legal-note {
  opacity: 0;
}

body.weather-ready .hero-now,
body.weather-ready .hourly-card,
body.weather-ready .tiles,
body.weather-ready .daily-card,
body.weather-ready .legal-note {
  animation: weatherReveal .44s cubic-bezier(.2,.85,.25,1) both;
}

body.weather-ready .dash-photo {
  animation: weatherPhotoReveal .44s cubic-bezier(.2,.85,.25,1) both;
}

/* Scrollender Inhalt über dem Foto */
.dash-scroll {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}
.dash-scroll::-webkit-scrollbar { width: 10px; }
.dash-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 8px; }
.dash-scroll::-webkit-scrollbar-track { background: transparent; }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 440px;
  flex: 0 0 auto;
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* Hero – obere Leiste */
.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.loc {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: max-content;
  max-width: min(420px, 52vw);
  color: rgba(255,255,255,0.92);
}

.brand-mark:hover {
  color: #fff;
}

.brand-mark:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 4px;
  border-radius: 16px;
}
.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}
.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.brand-name {
  font-size: 18px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: .1px;
}
.brand-tagline {
  font-size: 11.5px;
  line-height: 1.15;
  font-weight: 650;
  color: rgba(255,255,255,0.64);
  white-space: nowrap;
}
.brand-tagline[hidden] {
  display: none;
}
.hero-actions { display: flex; align-items: center; gap: 12px; }
.install-entry-btn {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
  white-space: nowrap;
}
.icon-btn {
  width: 46px; height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-expanded="true"] {
  border-color: rgba(255,255,255,0.46);
  background: rgba(255,255,255,0.18);
  outline: none;
}
body[data-theme="light"] .icon-btn[aria-expanded="true"] {
  border-color: rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.06);
  outline: none;
}

/* Suche */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 300px;
  max-width: 42vw;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.search-icon { width: 18px; height: 18px; color: rgba(255,255,255,0.8); flex: 0 0 auto; }
.search input[type="search"] {
  flex: 1 1 auto; min-width: 0;
  border: none; background: transparent; outline: none;
  color: #fff; font-family: inherit; font-size: 16px; font-weight: 500;
}
.search input[type="search"]::placeholder { color: rgba(255,255,255,0.6); }
.search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-spinner {
  width: 16px; height: 16px; flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes weatherReveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes weatherPhotoReveal {
  from {
    opacity: 0.72;
  }
  to {
    opacity: 1;
  }
}
.search-results {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  list-style: none; margin: 0; padding: 6px;
  border-radius: var(--radius-sm);
  background: rgba(18, 30, 48, 0.82);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  max-height: 320px; overflow-y: auto;
  display: none; z-index: 40;
}
.search-results.open { display: block; }
.search-result { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border-radius: 11px; cursor: pointer; }
.search-result:hover, .search-result.active { background: rgba(255,255,255,0.12); }
.search-result-location {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.search-result-location .r-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--accent-soft);
}
.search-result-location .r-icon svg {
  width: 21px;
  height: 21px;
}
.search-result-location .r-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.search-result .r-name { font-size: 15px; font-weight: 600; }
.search-result .r-region { font-size: 12px; line-height: 1.35; color: var(--text-dim); }
.search-empty { padding: 12px; font-size: 14px; color: var(--text-dim); text-align: center; }

#weatherSearchResults {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 40px rgba(18, 28, 44, 0.16);
  color: var(--ink);
}

#weatherSearchResults .search-result:hover,
#weatherSearchResults .search-result.active {
  background: rgba(18, 28, 44, 0.06);
}

#weatherSearchResults .r-region,
#weatherSearchResults .search-empty {
  color: rgba(18, 28, 44, 0.56);
}

/* Hero – aktuelle Werte */
.hero-now { margin-top: auto; }
.now-temp {
  font-size: clamp(96px, 12vw, 150px);
  font-weight: 200;
  line-height: .92;
  letter-spacing: -4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.55), 0 8px 32px rgba(0,0,0,0.45), 0 16px 60px rgba(0,0,0,0.30);
}
.now-cond {
  font-size: 30px; font-weight: 600; margin-top: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.55), 0 6px 24px rgba(0,0,0,0.40);
}
.now-feels {
  font-size: 17px; color: rgba(255,255,255,0.82); margin-top: 6px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.35);
}
.now-range { display: flex; gap: 18px; margin-top: 12px; font-size: 19px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.35); }
.now-range .up, .now-range .down { display: inline-flex; align-items: center; gap: 4px; }
.now-range svg { width: 17px; height: 17px; }
.now-range .down { color: rgba(255,255,255,0.7); }

/* ============ Glas-Karten ============ */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: var(--panel-filter);
  backdrop-filter: var(--panel-filter);
  box-shadow: var(--card-shadow);
}
.card-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85); text-shadow: var(--card-text-shadow); }
.card-head {
  font-size: 16px; font-weight: 700;
  padding: 18px 22px 14px;
  text-shadow: var(--card-text-shadow);
}
.hourly-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.hourly-title-text {
  display: inline-flex;
  gap: 0.25em;
  align-items: baseline;
  min-width: 0;
}
.hourly-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.hourly-view-switch {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  background: rgba(10,23,42,0.30);
  box-shadow: inset 0 1px 1px rgba(8,18,32,0.28), inset 0 -1px 0 rgba(255,255,255,0.06);
}
.hourly-view-switch[hidden] {
  display: none !important;
}
/* sliding active pill */
.hourly-view-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 4px 12px rgba(8,18,32,0.22), inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translateX(0);
  transition: transform .26s cubic-bezier(.4,1.1,.4,1);
  pointer-events: none;
}
.hourly-view-switch:has(.hourly-view-option:last-of-type[aria-pressed="true"]) .hourly-view-thumb {
  transform: translateX(100%);
}
.hourly-view-option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 60px;
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  color: rgba(255,255,255,0.64);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  text-shadow: none;
  transition: color .2s ease;
}
.hourly-view-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  opacity: 0.85;
  transition: opacity .2s ease;
}
.hourly-view-option:hover { color: rgba(255,255,255,0.9); }
.hourly-view-option[aria-pressed="true"] {
  color: #0f1f36;
}
.hourly-view-option[aria-pressed="true"] .hourly-view-icon {
  opacity: 1;
}
.hourly-view-option:focus-visible {
  outline: 2px solid rgba(143,192,255,0.78);
  outline-offset: 3px;
}
/* Radar entry — action card below the tiles */
.radar-entry {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(91,158,240,0.28);
  border-radius: 16px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--tile-filter);
  backdrop-filter: var(--tile-filter);
  box-shadow: var(--tile-shadow);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.radar-entry[hidden] { display: none !important; }
.radar-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(91,158,240,0.72);
  box-shadow: 0 12px 30px rgba(8,18,32,0.22), var(--tile-shadow);
}
.radar-entry:active { transform: translateY(0); }
.radar-entry:focus-visible { outline: 2px solid rgba(143,192,255,0.8); outline-offset: 3px; }
.radar-entry-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.radar-entry-label { font-size: 16px; line-height: 1.15; font-weight: 700; text-shadow: var(--card-text-shadow); }
.radar-entry-sub { font-size: 13px; line-height: 1.25; color: var(--text-faint); text-shadow: var(--card-text-shadow); }
.radar-entry-icon {
  justify-self: start;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(180deg, #5b9ef0, #2f6fed);
  box-shadow: 0 6px 16px rgba(47,111,237,0.35);
}
.radar-entry-icon svg { width: 32px; height: 32px; }
.radar-entry-arrow {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: rgba(25,33,43,0.62);
  transition: transform .15s ease, color .15s ease;
}
.radar-entry:hover .radar-entry-arrow {
  transform: translateX(2px);
  color: var(--accent);
}
.radar-entry-arrow svg { width: 20px; height: 20px; }
.radar-entry-nowcast[hidden] { display: none !important; }

/* Radar modal / fullscreen overlay */
.radar-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .2s ease;
}
.radar-modal[hidden] { display: none; }
.radar-modal.is-open { opacity: 1; }
.radar-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,14,26,0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.radar-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--panel-filter);
  backdrop-filter: var(--panel-filter);
  box-shadow: 0 30px 80px rgba(4,10,20,0.5);
  transform: translateY(10px) scale(.99);
  transition: transform .24s cubic-bezier(.4,1.1,.4,1);
}
.radar-modal.is-open .radar-modal-panel { transform: none; }
.radar-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 13px 20px;
}
.radar-modal-title { font-size: 16px; font-weight: 700; text-shadow: var(--card-text-shadow); }
.radar-modal-heading { display: grid; gap: 2px; min-width: 0; }
.radar-updated { color: var(--text-faint); font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.radar-modal-actions { display: flex; align-items: center; gap: 8px; }
.radar-modal-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: rgba(127,127,127,0.12);
  color: inherit;
  cursor: pointer;
  transition: background .15s ease;
}
.radar-modal-close svg { width: 20px; height: 20px; }
.radar-modal-close:hover { background: rgba(127,127,127,0.24); }
.radar-modal-close:focus-visible { outline: 2px solid rgba(143,192,255,0.8); outline-offset: 2px; }
.radar-modal-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.radar-modal-body .radar-view { min-height: 0; }
body.radar-modal-open { overflow: hidden; }

@media (max-width: 600px) {
  .radar-modal { padding: 0; }
  .radar-modal-panel {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .radar-modal-body { display: flex; }
  .radar-modal-body .radar-view {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
  }
  .radar-modal-body .radar-map-shell {
    height: 100%;
    min-height: 0;
  }
  .radar-modal-body .radar-map {
    height: 100%;
    min-height: 0;
  }
  .radar-modal-body .radar-controls { margin-top: 10px; }
}

.radar-view {
  position: relative;
  min-height: 388px;
  padding: 0 14px 14px;
}

.radar-map-shell {
  position: relative;
  height: clamp(430px, 54vh, 620px);
  min-height: 430px;
}

.radar-map {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.12);
  transition: filter .18s ease, opacity .18s ease;
}

.radar-map .maplibregl-map {
  font-family: inherit;
}

.radar-map .maplibregl-ctrl-attrib {
  font-size: 10px;
}
.radar-map .maplibregl-ctrl-attrib.maplibregl-compact {
  background: rgba(255,255,255,0.84);
  color: rgba(18, 28, 44, 0.78);
}

.radar-map .maplibregl-ctrl-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(18,28,44,0.18);
}

.radar-legend {
  position: absolute;
  z-index: 500;
  top: 14px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 11px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 4px 14px rgba(18,28,44,0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #1c2c44;
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}
.radar-legend-title { font-size: 12px; font-weight: 800; }
.radar-legend-scale { display: flex; gap: 8px; }
.radar-legend-bar {
  width: 10px;
  height: 92px;
  border-radius: 5px;
  background: linear-gradient(to top,
    rgba(255,255,255,0.18) 0%, rgb(158,232,255) 16%,
    rgb(117,179,250) 34%, rgb(41,115,232) 58%,
    rgb(15,56,158) 79%, rgb(5,23,77) 92%, rgb(26,5,56) 100%);
}
.radar-legend-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 700;
  color: rgba(28,44,68,0.78);
}

body[data-theme="dark"] .radar-legend {
  background: rgba(18,22,30,0.82);
  color: #e8eef7;
}
body[data-theme="dark"] .radar-legend-labels { color: rgba(232,238,247,0.82); }

.radar-controls {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding: 13px 18px 14px 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 8px 24px rgba(18,28,44,0.08), inset 0 1px 0 rgba(255,255,255,0.86);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}

.radar-play {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(47,111,237,0.16);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #5b9ef0, #2f6fed);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(47,111,237,0.22);
}

.radar-play:hover { background: linear-gradient(180deg, #6eabf5, #2f6fed); }
.radar-play:disabled {
  cursor: progress;
  opacity: 0.45;
}
.radar-play:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.radar-play svg { width: 18px; height: 18px; fill: currentColor; }
.radar-play-icon { margin-left: 2px; }
.radar-pause-icon { display: none; }
.radar-play.is-playing .radar-play-icon { display: none; }
.radar-play.is-playing .radar-pause-icon { display: block; }

.radar-timeline-wrap {
  min-width: 0;
  padding: 0 22px;
  overflow: hidden;
}
.radar-timeline-shell {
  --radar-progress: 0%;
  position: relative;
  height: 78px;
}
.radar-timeline-shell::before,
.radar-timeline-shell::after {
  position: absolute;
  left: 0;
  top: 32px;
  height: 5px;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}
.radar-timeline-shell::before {
  right: 0;
  background: rgba(143,157,179,0.24);
  box-shadow: inset 0 0 0 1px rgba(143,157,179,0.10);
}
.radar-timeline-shell::after {
  display: none;
}
.radar-time-bubble {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.radar-timeline-ticks {
  position: absolute;
  inset: 26px 0 0;
  pointer-events: none;
}
@property --tick-heat {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
.radar-tick {
  --tick-heat: 0;
  position: absolute;
  top: 2px;
  color: rgba(72,84,105,0.82);
  color: color-mix(in srgb, rgba(72,84,105,0.82), #1763ea calc(var(--tick-heat) * 100%));
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  transition: --tick-heat 260ms ease;
}
.radar-tick i {
  display: block;
  width: 1px;
  height: 12px;
  margin: 0 auto 13px;
  border-radius: 1px;
  background: rgba(92,103,121,0.34);
}
.radar-tick.has-label i {
  height: 16px;
  margin-bottom: 9px;
  background: rgba(92,103,121,0.46);
}
.radar-tick b {
  display: none;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  opacity: calc(0.78 + var(--tick-heat) * 0.22);
  transition: color 120ms linear, opacity 120ms linear;
}
.radar-tick.has-label b,
.radar-tick.is-now b {
  display: block;
}
.radar-tick.is-now {
  z-index: 2;
}
.radar-now-tag {
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-bottom: 14px;
  transform: translateX(-50%);
  color: #2f6fed;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-decoration: none;
}
.radar-now-marker {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  color: #2f6fed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.radar-timeline {
  position: absolute;
  left: 0;
  top: 20px;
  z-index: 3;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.radar-timeline:focus-visible { outline: 2px solid rgba(255,255,255,0.9); outline-offset: 3px; border-radius: 8px; }
.radar-timeline::-webkit-slider-runnable-track {
  height: 30px;
  background: transparent;
}
.radar-timeline::-moz-range-track {
  height: 30px;
  background: transparent;
}
.radar-timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 26px;
  margin-top: 2px;
  border: 0;
  border-radius: 6px;
  background: #2f6fed;
  box-shadow: 0 2px 5px rgba(47,111,237,0.22);
}
.radar-timeline::-moz-range-thumb {
  width: 13px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: #2f6fed;
  box-shadow: 0 2px 5px rgba(47,111,237,0.22);
}
.radar-time-range {
  display: flex;
  justify-content: space-between;
  margin-top: -6px;
  color: rgba(255,255,255,0.64);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.radar-now-label {
  color: rgba(255,255,255,0.92);
  font-weight: 800;
}
.radar-time {
  color: #1c2c44;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.radar-frame-type {
  color: rgba(92,103,121,0.74);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.radar-view.is-forecast .radar-time { color: #2f6fed; }
.radar-view.is-forecast .radar-frame-type { color: rgba(47,111,237,0.70); }

.radar-status {
  position: absolute;
  inset: 0;
  z-index: 620;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(234,238,244,0.46);
  -webkit-backdrop-filter: grayscale(1) blur(1px);
  backdrop-filter: grayscale(1) blur(1px);
  color: var(--ink);
  text-align: left;
  pointer-events: none;
}

.radar-view.has-error .radar-status {
  display: flex;
}

.radar-view.is-loading .radar-status {
  display: flex;
}

.radar-view.is-loading .radar-map {
  filter: grayscale(0.78) saturate(0.72);
  opacity: 0.66;
}

.radar-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(320px, calc(100% - 48px));
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.64);
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 14px 32px rgba(18,28,44,0.18);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.radar-status-spinner {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(20,99,190,0.25);
  border-top-color: rgb(20,99,190);
  border-radius: 50%;
  animation: radar-spin 0.75s linear infinite;
}

.radar-status-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.radar-status-title {
  font-size: 14px;
  font-weight: 850;
  line-height: 1.1;
}

.radar-status-detail {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.radar-view.has-error .radar-status-spinner {
  animation: none;
  border-color: rgba(190,68,68,0.28);
  border-top-color: rgb(190,68,68);
}

@keyframes radar-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .radar-status-spinner { animation-duration: 1.5s; }
}

body[data-theme="dark"] .radar-map {
  border-color: var(--panel-border);
  background: rgba(24,24,26,0.38);
}
body[data-theme="dark"] .radar-status {
  background: rgba(10,14,22,0.46);
}
body[data-theme="dark"] .radar-status-card {
  border-color: rgba(255,255,255,0.14);
  background: rgba(20,25,34,0.88);
}

body[data-theme="dark"] .radar-controls {
  border-color: rgba(255,255,255,0.16);
  background: rgba(12,27,48,0.44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

body[data-theme="dark"] .radar-play {
  border-color: rgba(143,192,255,0.22);
  background: linear-gradient(180deg, #5b9ef0, #2f6fed);
  box-shadow: 0 8px 18px rgba(47,111,237,0.20);
}

body[data-theme="dark"] .radar-timeline-shell::before {
  background: rgba(255,255,255,0.78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

body[data-theme="dark"] .radar-timeline-shell::after {
  background: linear-gradient(90deg,
    rgba(47,111,237,0) 0%,
    rgba(47,111,237,0.06) 22%,
    rgba(96,165,250,0.30) 40%,
    rgba(96,165,250,0.48) 50%,
    rgba(96,165,250,0.30) 60%,
    rgba(47,111,237,0.06) 78%,
    rgba(47,111,237,0) 100%);
  box-shadow: none;
}

body[data-theme="dark"] .radar-time-bubble {
  background: transparent;
  box-shadow: none;
}

body[data-theme="dark"] .radar-time-bubble::after {
  border-right-color: rgba(255,255,255,0.24);
  border-bottom-color: rgba(255,255,255,0.24);
}

body[data-theme="dark"] .radar-tick {
  color: rgba(255,255,255,0.58);
  color: color-mix(in srgb, rgba(255,255,255,0.58), #6fb2ff calc(var(--tick-heat) * 100%));
}

body[data-theme="dark"] .radar-tick i {
  background: rgba(255,255,255,0.56);
}

body[data-theme="dark"] .radar-tick.has-label i {
  background: rgba(255,255,255,0.75);
}

body[data-theme="dark"] .radar-now-tag {
  color: #93c5fd;
}
body[data-theme="dark"] .radar-now-marker { color: #93c5fd; }

body[data-theme="dark"] .radar-time {
  color: #fff;
}

body[data-theme="dark"] .radar-frame-type {
  color: rgba(255,255,255,0.62);
}

body[data-theme="dark"] .radar-view.is-forecast .radar-time,
body[data-theme="dark"] .radar-view.is-forecast .radar-frame-type {
  color: #93c5fd;
}

@media (max-width: 520px) {
  .hourly-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .hourly-title {
    gap: 12px;
  }
  .hourly-actions {
    width: 100%;
    justify-content: space-between;
  }
  .hourly-view-switch {
    flex: 1 1 auto;
  }
  .hourly-view-option {
    flex: 1 1 0;
    min-width: 0;
  }
  .hourly-toggle {
    padding-inline: 10px;
  }
  .radar-entry {
    grid-template-columns: 46px minmax(0, 1fr) 22px;
    gap: 11px;
    padding: 14px;
  }
  .radar-entry-icon { width: 46px; height: 46px; border-radius: 13px; }
  .radar-entry-icon svg { width: 31px; height: 31px; }
  .radar-entry-arrow { width: 22px; height: 22px; }
  .radar-entry-arrow svg { width: 19px; height: 19px; }
  .radar-map { min-height: 0; }
  .radar-controls { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding-inline: 9px; }
  .radar-play { width: 40px; height: 40px; }
  .radar-time-range { font-size: 8px; }
  .radar-frame-type { display: none; }
}

/* Narrow timeline: thin the labels to ~20-min steps so they don't overlap */
@media (max-width: 600px) {
  .radar-tick.has-label b { display: none; }
  .radar-tick.m-label b { display: block; }
}

/* ============ Inhalt unten ============ */
.content {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.col-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* 7-Tage links, restliche Karten rechts */
.daily-card { order: -1; }

/* ---- Stündlich (horizontal scrollbar) ---- */
.hourly { padding: 4px 14px 40px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.hourly::-webkit-scrollbar { height: 8px; }
.hourly::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 8px; }
.hourly::-webkit-scrollbar-track { background: transparent; }
.hourly-track { width: max-content; }
.hours-row { display: flex; position: relative; z-index: 5; }
.hcol {
  flex: 0 0 66px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
}
.hcol .h-time { font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap; text-shadow: var(--card-text-shadow); }
.hcol .h-time.now { color: var(--text); }
.hcol .h-ic { width: 30px; height: 30px; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.25)); }
.hcol .h-temp { font-size: 17px; font-weight: 700; text-shadow: var(--card-text-shadow); }
.hcol .h-mm { font-size: 11px; font-weight: 600; color: var(--text-faint); min-height: 14px; text-shadow: var(--card-text-shadow); }
.hcol .h-pop {
  position: relative;
  top: 54px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-soft);
  white-space: nowrap;
}
/* Sonnenauf-/untergang als eingeschobene Marker-Spalte */
.hcol.event {
  position: relative;
  flex-basis: 72px;
}
/* Auf-/Untergangs-Symbol etwas größer, da die Grafik nur den mittleren Bereich
   der 64×64-Fläche füllt – sonst wirkt es kleiner als die Wetter-Icons. */
.hcol.event .h-ic { width: 44px; height: 44px; margin: -7px 0; }
.hcol.event .h-time { color: var(--text); }
.hcol.event .ev-time { font-size: 14px; font-weight: 600; color: #ffd884; }
/* Erklärende Symbol-Spalte (Tropfen = %, Regenmesser = mm) */
.hcol.legend { flex-basis: 30px; padding: 0 2px 0 0; }
.hcol.legend .leg-ic { display: flex; align-items: center; justify-content: center; }
.hcol.legend .leg-ic svg { width: 15px; height: 15px; color: var(--text-faint); }
.hcol.legend .h-pop.leg-ic { color: var(--accent-soft); }
.hcol.legend .h-pop.leg-ic svg { color: var(--accent-soft); }

/* Niederschlags-Chart – die %-Werte sitzen unter der unsichtbaren Grundlinie. */
.h-chart {
  margin-top: -52px;   /* zieht das 88px hohe Band über die %-Zeile */
  position: relative;
  z-index: 0;
  pointer-events: none;
}
.h-chart svg { height: 88px; display: block; overflow: visible; }

/* ---- Kacheln ---- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  -webkit-backdrop-filter: var(--tile-filter);
  backdrop-filter: var(--tile-filter);
  box-shadow: var(--tile-shadow);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.tile-icon { flex: 0 0 auto; color: rgba(255,255,255,0.85); }
.tile-icon svg { width: 26px; height: 26px; }
.tile-icon.drop { color: var(--accent); }
.tile-icon.cloud { color: #cdd8e6; }
.tile-icon.eye { color: #bcd0e8; }
.tile-icon.uv { color: #ffd884; }
.tile-label { font-size: 13px; color: var(--text-dim); font-weight: 600; text-shadow: var(--card-text-shadow); }
.tile-value { font-size: 24px; font-weight: 700; line-height: 1.1; margin-top: 2px; text-shadow: var(--card-text-shadow); }
.tile-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; text-shadow: var(--card-text-shadow); }

/* ---- 7-Tage – klickbare Tab-Kacheln ---- */
.daily-card { align-self: stretch; }
.daily { padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.drow {
  display: grid;
  grid-template-columns: 1fr 44px 34px 40px 40px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--row-bg);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .12s;
}
.drow:hover { background: var(--row-hover-bg); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.drow:active { transform: scale(0.99); }
.drow.active {
  background: var(--row-active-bg);
  border-color: var(--row-active-border);
  box-shadow: 0 1px 2px rgba(18, 28, 44, 0.04);
}

.drow .d-daywrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drow .d-day { font-size: 15px; font-weight: 600; text-shadow: var(--card-text-shadow); }
.drow .d-date { font-size: 12px; font-weight: 500; color: var(--text-faint); text-shadow: var(--card-text-shadow); }
.drow .d-ic { width: 38px; height: 38px; justify-self: center; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }
.drow .d-pop { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; font-weight: 600; color: var(--accent-soft); }
.drow .d-pop .pop-drop { width: 12px; height: 12px; }
.drow .d-hi { font-size: 15px; font-weight: 600; text-align: right; color: var(--accent-warm); text-shadow: var(--card-text-shadow); }
.drow .d-lo { font-size: 15px; font-weight: 600; text-align: right; color: var(--accent-cloud); text-shadow: var(--card-text-shadow); }

.source { padding: 12px 10px 4px; font-size: 10.5px; color: var(--text-faint); }
.legal-note {
  padding: 0 10px 24px;
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.45;
}

.legal-note a {
  color: currentColor;
  font-weight: 700;
  text-underline-offset: 2px;
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .content { grid-template-columns: 1fr; gap: 6px; }   /* Tabs näher an die stündliche Karte */
  .daily-card { order: -1; }   /* einspaltig: Tab-Kacheln über der stündlichen Vorhersage */
  .hero { min-height: 380px; }

  /* 7-Tage als horizontal scrollbare, einzeln schwebende Glas-Kacheln –
     KEIN gemeinsamer Karten-Rahmen drumherum (wie im Screenshot). */
  .daily-card {
    background: none;
    border: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .daily-card .card-head { display: none; }   /* Überschrift weg */
  .daily {
    flex-direction: row;
    gap: 9px;
    /* Luft fuer Anhebung + Schatten, ohne die Reihe breiter als den
       Viewport zu machen. Sonst schneidet .dash-scroll die Kacheln mobil ab. */
    padding: 16px 2px 30px;
    margin-inline: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 2px;
    scrollbar-width: none;            /* Firefox: Scrollleiste ausblenden */
    -ms-overflow-style: none;          /* alte Edge/IE */
  }
  .daily::-webkit-scrollbar { display: none; }   /* WebKit: Scrollleiste ausblenden */
  .drow {
    flex: 0 0 96px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "dwrap dwrap"
      "ic    ic"
      "hi    lo";
    align-items: center;
    justify-items: center;
    row-gap: 5px;
    column-gap: 4px;
    width: auto;
    padding: 12px 10px 14px;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    -webkit-backdrop-filter: var(--tile-filter);
    backdrop-filter: var(--tile-filter);
    box-shadow: var(--tile-shadow);
    text-align: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
  .drow .d-daywrap { grid-area: dwrap; flex-direction: column; align-items: center; gap: 3px; }
  .drow .d-day { font-size: 15px; font-weight: 700; line-height: 1.1; }
  .drow .d-date { font-size: 11px; font-weight: 600; line-height: 1.1; color: var(--text-faint); }
  .drow .d-date::before { content: ""; }
  .drow .d-ic { grid-area: ic; width: 42px; height: 42px; margin: 6px 0 8px; }
  .drow .d-pop { display: none; }   /* keine Prozent-Zeile in der Tab-Ansicht */
  .drow .d-hi { grid-area: hi; justify-self: start; padding-left: 4px; font-size: 16px; font-weight: 500; line-height: 1.1; }
  .drow .d-lo { grid-area: lo; justify-self: end; padding-right: 4px; font-size: 16px; font-weight: 500; line-height: 1.1; color: var(--accent-cloud); }
  /* aktiver Tag: gleicher Rand wie inaktiv (kein anderer Umriss, kein Einfärben),
     nur angehoben mit einem etwas tieferen, neutralen Schlagschatten – dadurch
     wirkt die Kachel natürlich „schwebend“ statt umrandet. */
  .drow.active {
    transform: translateY(-4px);
    background: var(--row-active-bg);
    border-color: var(--row-active-border);
    box-shadow: 0 1px 2px rgba(18, 28, 44, 0.04);
  }
  .source { padding: 12px 2px 4px; }
}

@media (max-width: 720px) {
  .dash-scroll {
    padding: 16px;
  }
  .hero {
    padding-inline: 0;
  }
  .content,
  .col-main,
  .card,
  .tiles,
  .daily-card {
    min-width: 0;
  }
  .hourly {
    padding-inline: 12px;
  }
  .hero-top { flex-direction: column; }
  .brand-mark { max-width: 100%; }
  .brand-icon { width: 38px; height: 38px; }
  .brand-name { font-size: 16px; }
  .brand-tagline { font-size: 11px; white-space: normal; }
  .hero-actions { width: 100%; }
  .hero-actions {
    flex-wrap: wrap;
  }
  .hero-actions .search { flex: 1 1 auto; max-width: none; }
  .install-entry-btn {
    order: 3;
    width: 100%;
  }
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .tile {
    min-width: 0;
    padding: 14px;
    gap: 10px;
  }
  .tile-body {
    min-width: 0;
  }
  .tile-label,
  .tile-value,
  .tile-sub {
    overflow-wrap: anywhere;
  }
  .now-temp { font-size: 92px; }
}

/* ============ Meteori Weather PWA V1 final overrides ============ */
body.show-home .shell { display: none; }
body:not(.show-home) .home-view { display: none; }

.home-view {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--text);
  background: var(--ink);
}

.home-bg {
  position: fixed;
  inset: 0;
  background: #1a2740 url("assets/background/sunny.png") center / cover no-repeat;
}

.home-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 24, 0.3);
}

.home-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: min(560px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(34px, 7vh, 84px) 22px 44px;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

.home-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin: clamp(4px, 4vh, 36px) 0 6px;
}

.home-logo {
  width: clamp(94px, 26vw, 132px);
  height: auto;
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.34);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(46px, 13vw, 74px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0,0,0,0.42), 0 12px 40px rgba(0,0,0,0.30);
}

.home-sub {
  margin: 0;
  max-width: 30ch;
  color: rgba(255,255,255,0.88);
  font-size: clamp(15px, 4.2vw, 18px);
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,0.34);
}

.home-search {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  z-index: 30;
}

.home-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home-search .search {
  width: 100%;
  max-width: none;
  min-height: 58px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 14px 40px rgba(0,0,0,0.22);
}

.home-search #searchInput {
  font-size: 17px;
  font-weight: 600;
}

.city-section {
  display: grid;
  gap: 14px;
  width: 100%;
  /* extra room so the focused "Use current location" dropdown doesn't overlap */
  margin-top: 74px;
}

.city-section h2 {
  margin: 0;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.30);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 32px rgba(0,0,0,0.20);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.city-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.32);
}

.city-card .city-ic {
  display: block;
  width: 34px;
  height: 34px;
}

.city-card .city-ic svg {
  display: block;
  width: 100%;
  height: 100%;
}

.city-card .city-name {
  font-size: 15px;
  font-weight: 760;
  line-height: 1.2;
}

.home-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 20px;
  background: rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 32px rgba(0,0,0,0.20);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
}

.primary-action:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.32);
}

.primary-action svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.home-hint {
  margin: 0;
  max-width: 36ch;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.30);
}

.home-status {
  min-height: 16px;
  margin: 0;
  color: #ffb3b3;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

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

.weather-search {
  margin: 0;
}

.weather-actions .install-entry-btn {
  width: auto;
  white-space: nowrap;
}

.h-chart svg {
  width: 100%;
}

@media (max-width: 760px) {
  .home-panel {
    min-height: 100svh;
    padding: 14px;
  }

  .home-top {
    align-items: flex-start;
  }

  .home-mark {
    max-width: 100%;
  }

  .home-hero {
    width: 100%;
    min-height: calc(100svh - 86px);
    align-content: end;
    gap: 18px;
    padding: 18px 0 10px;
  }

  .home-hero h1 {
    font-size: clamp(48px, 16vw, 72px);
    line-height: 0.96;
  }

  .home-card {
    grid-template-columns: 1fr;
    width: 100%;
    border-radius: 22px;
  }

  .home-search .search {
    min-height: 58px;
  }

  .primary-action {
    width: 100%;
    min-height: 52px;
  }

  .city-chip {
    flex: 1 1 calc(50% - 10px);
    padding-inline: 12px;
  }
}

/* ============ Home refresh: align with weather cards ============ */
.home-view {
  color: var(--ink);
  background: #dbe7f6;
}

.home-bg {
  background: #8fbce7 url("assets/background/sunny.png") center / cover no-repeat;
}

.home-bg::after {
  content: none;
}

.home-panel {
  width: min(1120px, calc(100% - 32px));
  justify-content: center;
  align-items: stretch;
  padding: clamp(18px, 4vh, 34px) 0;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(340px, 1fr);
  align-items: end;
  gap: 14px;
  min-height: calc(100svh - clamp(36px, 8vh, 68px));
}

.home-search .search {
  border: 1px solid rgba(255,255,255,0.58);
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 18px 40px rgba(18, 28, 44, 0.14);
}

.home-brand {
  grid-row: 1 / span 3;
  flex-direction: column;
  align-self: stretch;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 20px;
  border-radius: 24px;
  text-align: center;
}

.home-brand,
.city-section,
.home-actions {
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.home-logo {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 20px;
  box-shadow: none;
}

.home-brand-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  justify-items: center;
}

.home-hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: none;
  color: var(--ink);
}

.home-sub {
  max-width: none;
  color: rgba(18, 28, 44, 0.58);
  font-size: 15px;
  font-weight: 700;
  text-shadow: none;
}

.home-search {
  grid-column: 2;
  justify-self: center;
  width: min(100%, 620px);
}

.home-search .search {
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 17px;
}

.home-search .search-icon {
  width: 17px;
  height: 17px;
}

.home-search .search-icon,
.home-search #searchInput {
  color: var(--ink);
}

.home-search #searchInput {
  font-size: 15px;
  font-weight: 650;
}

.home-search #searchInput::placeholder {
  color: rgba(18, 28, 44, 0.48);
}

.home-view .search-results {
  border-color: rgba(255,255,255,0.58);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 40px rgba(18, 28, 44, 0.16);
  color: var(--ink);
}

.home-view .search-result:hover,
.home-view .search-result.active {
  background: rgba(18, 28, 44, 0.06);
}

.home-view .search-result .r-region,
.home-view .search-empty {
  color: rgba(18, 28, 44, 0.56);
}

.city-section {
  grid-column: 2;
  gap: 12px;
  margin-top: 0;
  padding: 8px 0;
  border-radius: 0;
}

.city-section h2 {
  color: rgba(18, 28, 44, 0.72);
  font-size: 13px;
  letter-spacing: 0;
  text-shadow: none;
}

.city-grid {
  gap: 18px;
}

.city-card {
  min-height: 78px;
  padding: 9px 9px;
  border-color: rgba(18, 28, 44, 0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 18px 40px rgba(18, 28, 44, 0.14);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.city-card:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.68);
  transform: translateY(-1px);
}

.city-card .city-name {
  font-size: 14px;
  font-weight: 760;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-card-main {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.city-card .city-ic {
  width: 38px;
  height: 38px;
  display: inline-flex;
  flex: 0 0 auto;
  filter: none;
}

.city-card .city-ic svg {
  width: 100%;
  height: 100%;
}

.home-actions {
  grid-column: 2;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  border-radius: 0;
}

.primary-action {
  min-height: 48px;
  border-color: transparent;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  justify-content: flex-start;
  padding: 0 4px;
}

.primary-action:hover {
  background: rgba(255,255,255,0.46);
  border-color: transparent;
}

.home-hint {
  color: rgba(18, 28, 44, 0.52);
  text-shadow: none;
}

.home-status {
  color: #b42318;
}

@media (max-width: 760px) {
  .home-panel {
    width: min(100% - 28px, 560px);
    padding: 18px 0;
  }

  .home-hero {
    display: flex;
    min-height: calc(100svh - 36px);
    justify-content: flex-start;
    gap: 18px;
    padding: clamp(18px, 6svh, 54px) 0 0;
  }

  .home-brand {
    align-self: auto;
    width: 100%;
    padding: 14px;
    border-radius: 22px;
    justify-content: center;
    align-items: center;
  }

  .home-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .home-hero h1 {
    font-size: 32px;
  }

  .home-sub {
    font-size: 13px;
  }

  .home-search,
  .city-section,
  .home-actions {
    grid-column: auto;
  }

  .home-search {
    width: min(100% - 44px, 560px);
    margin-inline: auto;
    margin-bottom: clamp(72px, 14svh, 132px);
  }

  .home-search .search {
    min-height: 46px;
    padding: 7px 13px;
    border-radius: 16px;
  }

  .home-search #searchInput {
    font-size: 14px;
  }

  .city-section {
    margin-top: 0;
  }

  .city-grid {
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .city-card {
    min-height: 76px;
    padding: 9px 8px;
    gap: 6px;
  }

  .city-card .city-ic {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 520px) {
  .weather-loading-panel {
    top: 92px;
    max-width: calc(100vw - 40px);
  }

  .weather-loading-title {
    font-size: 12px;
  }

  .city-grid {
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============ Install instruction sheet (Safari / non-Chromium) ============ */
.install-sheet[hidden] { display: none; }
.install-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.install-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 22, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.install-sheet-card {
  position: relative;
  width: min(440px, 100%);
  margin: 0 12px 12px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(20, 30, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(30px) saturate(140%);
  backdrop-filter: blur(30px) saturate(140%);
  color: #fff;
  animation: install-sheet-in 0.22s ease;
}
@keyframes install-sheet-in {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.install-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.install-sheet-head img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
}
.install-sheet-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}
.install-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 13px;
}
.install-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}
.install-steps b { font-weight: 800; color: #fff; }
.install-steps .step-num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 800;
}
.install-steps .ios-share {
  display: inline-block;
  width: 17px;
  height: 17px;
  vertical-align: -3px;
}
.install-sheet-btn {
  margin-top: 20px;
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: 16px;
  background: #2f6fed;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}
.install-sheet-btn:hover { background: #2a63d6; }
@media (min-width: 600px) {
  .install-sheet { align-items: center; }
  .install-sheet-card { margin: 0; }
}

/* ============ Collapsing weather hero (sticky bar on scroll) ============ */
.hero-top {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-inline: 12px;
  background: #0d1824;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
  transition: padding .2s ease;
}
.hero-compact { display: none; }

/* big hero readout fades + glides up into the bar as you scroll (scroll-linked) */
.hero-now {
  opacity: calc(1 - var(--collapse, 0) * 1.15);
  transform: translateY(calc(var(--collapse, 0) * -22px));
  transform-origin: left center;
  will-change: opacity, transform;
}
.weather-search-btn { display: none; }
.install-entry-btn { display: inline-flex; align-items: center; gap: 8px; }
.install-ic { display: none; }

body.hero-collapsed .hero-top {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 8px;
}
body.hero-collapsed .loc { flex: 0 0 auto; }
body.hero-collapsed .brand-mark {
  padding: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  gap: 0;
}
body.hero-collapsed .brand-tagline { display: none; }
body.hero-collapsed .brand-name { display: none; }
body.hero-collapsed .brand-icon { width: 32px; height: 32px; border-radius: 8px; }

body.hero-collapsed .hero-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  opacity: var(--collapse, 0);
  transform: translateY(calc((1 - var(--collapse, 0)) * 7px));
}
.hero-compact-temp { font-size: 18px; font-weight: 700; line-height: 1; }
.hero-compact-cond {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.hero-compact-temp,
.hero-compact-cond {
  flex: 0 1 auto;
}
body[data-theme="light"] .hero-compact-temp { color: var(--ink); }
body[data-theme="light"] .hero-compact-cond { color: rgba(38, 38, 40, 0.6); }

body.hero-collapsed:not(.menu-open) .hero-actions { width: auto; flex: 0 0 auto; gap: 8px; flex-wrap: nowrap; }
/* loupe / install-icon swap is a DESKTOP collapse affordance; on mobile the
   hamburger menu owns the actions instead */
@media (min-width: 761px) {
  body.hero-collapsed .weather-search { display: none; }
  body.hero-collapsed .weather-search-btn { display: grid; }
  body.hero-collapsed.menu-open .weather-search { display: block; }
  body.hero-collapsed.menu-open .weather-search-btn { display: none; }
  body.hero-collapsed .install-entry-btn { width: 46px; padding: 0; justify-content: center; }
  body.hero-collapsed .install-label { display: none; }
  body.hero-collapsed .install-ic { display: block; width: 20px; height: 20px; }
}


@media (max-width: 480px) {
  body.hero-collapsed .brand-name { display: none; }
  body.hero-collapsed .hero-top { gap: 9px; }
}

/* ============ Theme system: tint (default) · light · dark ============ */
/* DARK — dark glass cards, white text. Inherits the default frosted blur. */
body[data-theme="dark"] {
  --panel: rgba(24, 24, 26, 0.64);
  --panel-2: rgba(24, 24, 26, 0.52);
  --panel-border: rgba(255, 255, 255, 0.12);
  --header-glass-bg: var(--panel);
  --header-glass-border: var(--panel-border);
  --header-shadow-opacity: 0.42;
  --row-bg: rgba(255, 255, 255, 0.05);
  --row-hover-bg: linear-gradient(160deg, #192d48 0%, #111f38 100%);
  --row-active-bg: linear-gradient(160deg, #1e3252 0%, #152540 100%);
  --row-active-border: rgba(100, 160, 230, 0.45);
  --accent-soft: #6ab0f5;
  --card-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --tile-shadow: 0 14px 32px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* LIGHT — white frosted cards with dark text (the existing data-theme="light"
   variables/text rules above stay; here we keep the SAME frosted blur as the
   other themes and ensure icons + the one hard-coded label stay legible). */
body[data-theme="light"] {
  --panel: rgba(255, 255, 255, 0.9);
  --panel-2: rgba(255, 255, 255, 0.84);
  --panel-filter: blur(22px) saturate(130%);
  --tile-filter: blur(20px) saturate(125%);
}
body[data-theme="light"] .card-label { color: rgba(38, 38, 40, 0.7); }
/* keep the weather glyphs readable on near-white cards: a soft dark edge so the
   light cloud shapes don't disappear (adaptive iconography). */
body[data-theme="light"] .drow .d-ic,
body[data-theme="light"] .hcol .h-ic {
  filter: none;
}

/* precipitation line: stronger, darker stroke so the curve is visible on white.
   Only the line path (fill:none) — NOT the filled area path, otherwise its
   baseline gets stroked too and shows up as a second line. */
body[data-theme="light"] .h-chart svg path[fill="none"] {
  stroke: #2e80e0;
  stroke-width: 2.4;
}
body[data-theme="dark"] .h-chart svg path[fill="none"] {
  stroke: #6ab0f5;
  stroke-width: 2.4;
}

/* Theme toggle button — shows the glyph of the CURRENT theme */
.theme-toggle .ic-theme-light,
.theme-toggle .ic-theme-dark { display: none; }
body[data-theme="light"] .theme-toggle .ic-theme-light { display: block; }
body[data-theme="dark"] .theme-toggle .ic-theme-dark { display: block; }

/* Light theme: solid white nav bar, no glass */
body[data-theme="light"] .hero-top {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body[data-theme="light"] .brand-mark {
  color: var(--ink);
}
body[data-theme="light"] .hero-compact-temp,
body[data-theme="light"] .hero-compact-cond,
body[data-theme="light"] .brand-name,
body[data-theme="light"] .brand-tagline { color: var(--ink); }
body[data-theme="light"] .icon-btn,
body[data-theme="light"] .menu-btn { color: var(--ink); }

/* Light theme: mobile dropdown also white */

/* keep the collapsed pill minimal — hide theme toggle when scrolled */
body.hero-collapsed:not(.menu-open) .theme-toggle { display: none; }


/* ============ Mobile hamburger menu (color · search · install) ============ */
.menu-btn { display: none; }

@media (max-width: 760px) {
  /* bar: brand left, hamburger right — expands downward when open */
  .hero-top { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
  .menu-btn { display: grid; flex: 0 0 auto; }

  /* actions are hidden by default; they expand inside the bar when open */
  #heroActions {
    display: none;
    flex: 0 0 100%;
    width: 100%;
    flex-flow: row wrap;
    align-items: center;
    gap: 10px;
    padding: 4px 0 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
  }
  body.menu-open #heroActions {
    display: flex;
  }
  /* inside the menu: full search + full install */
  #heroActions .weather-search { display: block; flex: 1 1 100%; margin: 0; }
  #heroActions .weather-search .search { width: 100%; max-width: none; }
  #heroActions .weather-search-btn { display: none; }
  #heroActions .install-entry-btn { flex: 1 1 100%; width: 100%; padding: 0 16px; justify-content: center; }
  #heroActions .install-label { display: inline; }
  #heroActions .install-ic { display: none; }
  #heroActions .theme-toggle { flex: 0 0 auto; }

  /* light theme: dark border-top */
  body[data-theme="light"] #heroActions {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    color: var(--ink);
  }
  body[data-theme="light"] #heroActions .search,
  body[data-theme="light"] #heroActions .icon-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--ink);
  }
  body[data-theme="light"] #heroActions .install-entry-btn {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--ink);
  }
  body[data-theme="light"] #heroActions input[type="search"] { color: var(--ink); }
  body[data-theme="light"] #heroActions input[type="search"]::placeholder {
    color: rgba(38, 38, 40, 0.45);
  }
}

/* ============ Polished weather header ============ */
.hero-top {
  position: sticky;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
  --header-glass-bg: rgba(255, 255, 255, 0.30);
  --header-glass-border: rgba(255, 255, 255, 0.38);
  --header-glass-shadow: rgba(0, 0, 0, 0.14);
  --header-shadow-opacity: calc(0.08 + var(--collapse, 0) * 0.10);
  align-items: center;
  gap: 12px;
  width: min(100%, calc(100vw - 28px));
  min-height: 72px;
  margin: 0 auto;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  overflow: visible;
  transition: none;
}

.hero-top::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--header-glass-border);
  border-radius: inherit;
  background: var(--header-glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, var(--header-shadow-opacity));
  opacity: var(--collapse, 0);
  transition: opacity 0.18s ease;
}

body.hero-collapsed .hero-top::before {
  opacity: 1;
}

body[data-theme="dark"] .hero-top {
  --header-glass-bg: var(--panel);
  --header-glass-border: var(--panel-border);
  --header-shadow-opacity: 0.42;
}

body[data-theme="dark"] .hero-top::before {
  -webkit-backdrop-filter: var(--panel-filter);
  backdrop-filter: var(--panel-filter);
}

body[data-theme="light"] .hero-top {
  --header-glass-bg: rgba(255, 255, 255, 0.34);
  --header-glass-border: rgba(255, 255, 255, 0.48);
  --header-glass-shadow: rgba(18, 28, 44, 0.10);
  --header-shadow-opacity: calc(0.06 + var(--collapse, 0) * 0.08);
  border-color: transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

body[data-theme="light"] .hero-top::before {
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.loc { min-width: 0; }
.brand-mark {
  position: relative;
  z-index: 0;
  justify-self: start;
  width: max-content;
  max-width: min(100%, 320px);
  min-width: 0;
  padding: 6px 12px 6px 6px;
  gap: 10px;
  color: #fff;
  text-shadow: none;
}

.brand-mark::before {
  content: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: none;
  filter: none;
}

.brand-name,
.brand-tagline,
.hero-compact-temp,
.hero-compact-cond {
  text-shadow: none;
}

.brand-name {
  color: #fff;
  letter-spacing: 0;
}

.brand-tagline {
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.68);
}

body[data-theme="light"] .brand-mark,
body[data-theme="light"] .brand-name {
  color: var(--ink);
}

body[data-theme="light"] .brand-mark::before {
  content: none;
}

body[data-theme="light"] .brand-tagline {
  color: rgba(18, 28, 44, 0.56);
}

.hero-compact {
  justify-content: center;
  min-width: 0;
  padding-inline: 8px;
}

body.hero-collapsed .hero-compact {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  justify-content: center;
  max-width: calc(100% - 300px);
  padding-inline: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

body.hero-collapsed .hero-compact::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hero-actions {
  justify-content: flex-end;
  min-width: 0;
  flex-wrap: nowrap;
}

.icon-btn,
.install-entry-btn,
.search {
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
}

.icon-btn:hover,
.install-entry-btn:hover,
.search:focus-within {
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .icon-btn,
body[data-theme="light"] .menu-btn,
body[data-theme="light"] .install-entry-btn,
body[data-theme="light"] .search {
  border-color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

body[data-theme="light"] .icon-btn:hover,
body[data-theme="light"] .install-entry-btn:hover,
body[data-theme="light"] .search:focus-within {
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .search-icon,
body[data-theme="light"] .search input[type="search"] {
  color: var(--ink);
}

body[data-theme="light"] .search input[type="search"]::placeholder {
  color: rgba(18, 28, 44, 0.48);
}

body[data-theme="dark"] .icon-btn,
body[data-theme="dark"] .menu-btn,
body[data-theme="dark"] .install-entry-btn,
body[data-theme="dark"] .search {
  border-color: var(--panel-border);
  background: var(--panel);
  color: #fff;
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: var(--panel-filter);
  backdrop-filter: var(--panel-filter);
}

body[data-theme="dark"] .icon-btn:hover,
body[data-theme="dark"] .install-entry-btn:hover,
body[data-theme="dark"] .search:focus-within {
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(24, 24, 26, 0.78);
}

.weather-search .search-icon,
.weather-search input[type="search"] {
  color: var(--ink);
}

.weather-search input[type="search"]::placeholder {
  color: rgba(18, 28, 44, 0.48);
}

body[data-theme="dark"] .weather-search .search-icon,
body[data-theme="dark"] .weather-search input[type="search"] {
  color: #fff;
}

body[data-theme="dark"] .weather-search input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

body.hero-collapsed .hero-top {
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
}

body.hero-collapsed .brand-mark {
  gap: 10px;
  padding: 6px 12px 6px 6px;
}

body.hero-collapsed .brand-mark::before,
body.menu-open .brand-mark::before {
  opacity: 0;
}

body.hero-collapsed .brand-name {
  display: block;
}

body.hero-collapsed .brand-tagline {
  display: block;
}

body.hero-collapsed .brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

body.hero-collapsed:not(.menu-open) .theme-toggle {
  display: grid;
}

@media (min-width: 761px) {
  body.hero-collapsed .install-entry-btn {
    width: 46px;
  }
}

@media (max-width: 900px) {
  .weather-actions .search {
    width: 240px;
    max-width: 34vw;
  }
}

@media (max-width: 760px) {
  .hero-top,
  body.hero-collapsed .hero-top {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 10px;
    align-items: center;
    padding: 8px;
  }

  .brand-mark {
    justify-self: start;
    width: max-content;
    max-width: calc(100vw - 104px);
  }

  .menu-btn {
    display: grid;
    grid-column: 2;
  }

  body:not(.hero-collapsed) .hero-compact {
    display: none;
  }

  body.hero-collapsed .hero-top {
    grid-template-columns: max-content minmax(0, 1fr) 46px;
  }

  body.hero-collapsed .hero-compact {
    display: flex;
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    justify-content: center;
    max-width: 100%;
    padding-inline: 0;
    overflow: hidden;
  }

  body.hero-collapsed .hero-compact-cond {
    display: block;
    min-width: 0;
    max-width: 12ch;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.hero-collapsed .menu-btn {
    grid-column: 3;
    grid-row: 1;
  }

  body.hero-collapsed .brand-name {
    display: none;
  }

  body.hero-collapsed .brand-mark {
    padding-right: 6px;
  }

  .hero-actions,
  #heroActions {
    display: none;
    flex-flow: row wrap;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
    width: calc(100% + 16px);
    min-width: 0;
    height: auto;
    position: relative;
    margin-inline: -8px;
    padding: 12px 24px 18px;
    border-top: 0;
  }

  body.menu-open #heroActions {
    display: flex;
    margin-top: 10px;
  }

  body.menu-open #heroActions::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 1px solid var(--header-glass-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.20);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    backdrop-filter: blur(18px) saturate(130%);
    box-shadow: 0 14px 34px rgba(18, 28, 44, 0.10);
  }

  body[data-theme="dark"].menu-open #heroActions::before {
    border-color: var(--panel-border);
    background: var(--panel);
    -webkit-backdrop-filter: var(--panel-filter);
    backdrop-filter: var(--panel-filter);
    box-shadow: var(--card-shadow);
  }

  body.menu-open .hero-top,
  body.menu-open.hero-collapsed .hero-top {
    min-height: 72px;
    height: auto;
    padding-bottom: 0;
  }

  body.menu-open .hero-top::before,
  body.menu-open.hero-collapsed .hero-top::before {
    bottom: auto;
    height: 72px;
  }

  body[data-theme="light"] #heroActions {
    border-top-color: transparent;
  }

  body.menu-open #heroActions {
    border-top: 0;
  }

  #heroActions .theme-toggle {
    order: 1;
    width: 40px;
    height: 40px;
  }

  #heroActions .install-entry-btn {
    order: 2;
    flex: 1 1 calc(100% - 50px);
    height: 40px;
    border: 1px solid rgba(18, 28, 44, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    backdrop-filter: blur(16px) saturate(130%);
    color: inherit;
  }

  body.menu-open[data-theme="dark"] #heroActions .install-entry-btn {
    border-color: rgba(255,255,255,0.18);
    background: rgba(24, 24, 26, 0.64);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
  }

  body.menu-open[data-theme="light"] #heroActions .theme-toggle,
  body.menu-open[data-theme="light"] #heroActions .install-entry-btn,
  body.menu-open[data-theme="light"] #heroActions #weatherSearchBox {
    border-color: rgba(255,255,255,0.58);
    background: rgba(255,255,255,0.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    backdrop-filter: blur(16px) saturate(130%);
    color: var(--ink);
  }

  #heroActions .weather-search {
    order: 3;
    flex: 1 1 100%;
  }

  #heroActions .weather-search .search {
    width: 100%;
    max-width: none;
  }

  body.menu-open #weatherSearchBox {
    flex-wrap: wrap;
    height: auto;
    min-height: 42px;
    overflow: visible;
    background: rgba(255, 255, 255, 0.82);
  }

  body.menu-open[data-theme="light"] #heroActions #weatherSearchBox {
    background: rgba(255, 255, 255, 0.82);
  }

  body.menu-open[data-theme="dark"] #heroActions #weatherSearchBox {
    background: rgba(24, 24, 26, 0.64);
  }

  body.menu-open #weatherSearchResults {
    position: static;
    flex: 1 1 100%;
    margin: 8px 0 0;
    padding: 4px 0 0;
    border: 0;
    border-top: 1px solid rgba(18, 28, 44, 0.10);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    max-height: 260px;
    overflow-y: auto;
    color: var(--ink);
  }

  body.menu-open #weatherSearchResults.open {
    display: block;
  }

  body.menu-open #weatherSearchResults .search-result {
    color: var(--ink);
  }

  body.menu-open #weatherSearchResults .search-result:hover,
  body.menu-open #weatherSearchResults .search-result.active {
    background: rgba(255, 255, 255, 0.42);
  }

  body.menu-open #weatherSearchResults .r-region {
    color: rgba(18, 28, 44, 0.56);
  }
}

@media (max-width: 420px) {
  .brand-tagline {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.weather-ready .hero-now,
  body.weather-ready .hourly-card,
  body.weather-ready .tiles,
  body.weather-ready .daily-card,
  body.weather-ready .dash-photo,
  body.weather-ready .legal-note {
    animation: none;
  }
}

/* ============ Home: scrollable SEO section (light Meteori look) ============ */
.home-view { scroll-behavior: smooth; }

.home-scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  gap: 2px;
  margin-top: auto;
  padding: 9px 20px 7px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: rgba(10, 19, 34, 0.30);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.home-scroll-cue:hover {
  background: rgba(10, 19, 34, 0.44);
  border-color: rgba(255, 255, 255, 0.32);
}

.home-scroll-cue svg {
  width: 18px;
  height: 18px;
  animation: hb-cue-bob 2.4s ease-in-out infinite;
}

.home-scroll-cue:hover { color: #ffffff; }

@keyframes hb-cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .home-view { scroll-behavior: auto; }
  .home-scroll-cue svg { animation: none; }
}

.home-below {
  position: relative;
  z-index: 20;
  margin-top: -26px;
  border-radius: 34px 34px 0 0;
  background: linear-gradient(180deg, #fdfbf3 0%, #f8f2e4 46%, #f3ecdb 100%);
  color: #262628;
  box-shadow: 0 -18px 50px rgba(8, 14, 24, 0.28);
  overflow: hidden;
}

/* soft colour orbs — the "premium" glow behind the content */
.home-below::before,
.home-below::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.home-below::before {
  top: -140px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 177, 60, 0.20) 0%, rgba(255, 177, 60, 0) 68%);
}

.home-below::after {
  top: 620px;
  left: -160px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(46, 128, 224, 0.14) 0%, rgba(46, 128, 224, 0) 70%);
}

.home-below-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(56px, 9vw, 96px);
  width: min(880px, 100% - 44px);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 80px) 0 34px;
}

.hb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: rgba(38, 38, 40, 0.62);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.hb-eyebrow-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffb13c, #e07a0a);
  box-shadow: 0 0 0 4px rgba(224, 122, 10, 0.14);
}

.hb-eyebrow-dot.hb-dot-blue {
  background: linear-gradient(140deg, #6db1f7, #2e80e0);
  box-shadow: 0 0 0 4px rgba(46, 128, 224, 0.14);
}

.hb-intro { text-align: center; }
.hb-intro .hb-eyebrow { justify-content: center; }

.hb-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -1.2px;
  text-wrap: balance;
}

.hb-title em {
  font-style: italic;
  background: linear-gradient(115deg, #d96f06 0%, #ef9c2c 55%, #f6bd62 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hb-lead {
  max-width: 60ch;
  margin: 0 auto;
  color: rgba(38, 38, 40, 0.72);
  font-size: clamp(15.5px, 2.6vw, 17.5px);
  line-height: 1.65;
  font-weight: 500;
}

.hb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 620px;
  margin: 34px auto 0;
}

.hb-stat {
  display: grid;
  gap: 2px;
  padding: 20px 12px 17px;
  border: 1px solid rgba(200, 165, 90, 0.28);
  border-radius: 22px;
  background: linear-gradient(160deg, #fffdf6 0%, #f9f1de 100%);
  box-shadow: 0 10px 24px rgba(38, 38, 40, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hb-stat-value {
  font-size: clamp(24px, 4.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.6px;
  background: linear-gradient(150deg, #e07a0a, #c8620a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hb-stat:nth-child(2) .hb-stat-value { background-image: linear-gradient(150deg, #2e80e0, #1f5cb0); }
.hb-stat:nth-child(3) .hb-stat-value { background-image: linear-gradient(150deg, #8399b8, #5f7695); }

.hb-stat-label {
  color: rgba(38, 38, 40, 0.62);
  font-size: 13px;
  font-weight: 700;
}

.hb-section-title {
  margin: 0 0 16px;
  font-size: clamp(24px, 4.6vw, 32px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.7px;
  text-wrap: balance;
}

.hb-features { text-align: center; }

.hb-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(236px, 1fr));
  gap: 16px;
  margin-top: 26px;
  text-align: left;
}

.hb-feature {
  padding: 24px 22px;
  border: 1px solid rgba(38, 38, 40, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(38, 38, 40, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hb-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(38, 38, 40, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hb-feature-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 15px;
}

.hb-feature-ic svg { width: 24px; height: 24px; }

.hb-ic-blue { color: #2e80e0; background: rgba(46, 128, 224, 0.12); }
.hb-ic-orange { color: #e07a0a; background: rgba(224, 122, 10, 0.12); }
.hb-ic-slate { color: #5f7695; background: rgba(131, 153, 184, 0.16); }

.hb-feature h3 {
  margin: 0 0 7px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.hb-feature p {
  margin: 0;
  color: rgba(38, 38, 40, 0.66);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

.hb-radar {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(26px, 5vw, 48px);
  align-items: center;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(46, 128, 224, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(46, 128, 224, 0.10) 0%, rgba(46, 128, 224, 0) 55%),
    linear-gradient(160deg, #ffffff 0%, #f2f6fd 100%);
  box-shadow: 0 14px 34px rgba(24, 55, 96, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hb-radar-copy > p {
  margin: 0;
  color: rgba(38, 38, 40, 0.70);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 500;
}

.hb-ticks {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.hb-ticks li {
  position: relative;
  padding-left: 30px;
  color: rgba(38, 38, 40, 0.78);
  font-size: 14.5px;
  font-weight: 650;
}

.hb-ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m6.5 12.5 3.6 3.6 7.4-8"/></svg>') center / 12px no-repeat,
    linear-gradient(150deg, #4a94e8, #2e80e0);
  box-shadow: 0 3px 8px rgba(46, 128, 224, 0.35);
}

.hb-radar-art {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2e80e0;
}

.hb-radar-art svg {
  width: min(230px, 100%);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(46, 128, 224, 0.18));
}

.hb-cities {
  padding: clamp(26px, 5vw, 40px);
  border: 1px solid rgba(200, 165, 90, 0.26);
  border-radius: 28px;
  background:
    radial-gradient(130% 170% at 0% 0%, rgba(255, 177, 60, 0.12) 0%, rgba(255, 177, 60, 0) 55%),
    linear-gradient(160deg, #fffdf6 0%, #f8f0dc 100%);
  box-shadow: 0 12px 30px rgba(120, 90, 30, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hb-cities p {
  margin: 0;
  color: rgba(38, 38, 40, 0.72);
  font-size: 15.5px;
  line-height: 1.7;
  font-weight: 500;
}

.hb-cities strong { color: #262628; font-weight: 800; }

.hb-faq { display: grid; gap: 12px; }
.hb-faq .hb-section-title { margin-bottom: 6px; }

.hb-faq-item {
  border: 1px solid rgba(38, 38, 40, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(38, 38, 40, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.hb-faq-item summary {
  position: relative;
  padding: 18px 52px 18px 22px;
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.1px;
  cursor: pointer;
  list-style: none;
}

.hb-faq-item summary::-webkit-details-marker { display: none; }

.hb-faq-item summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23806020" stroke-width="2.4" stroke-linecap="round"><path d="M12 6v12M6 12h12"/></svg>') center / 14px no-repeat,
    rgba(224, 122, 10, 0.12);
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.hb-faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.hb-faq-item summary:hover { background: rgba(255, 250, 238, 0.85); }

.hb-faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: rgba(38, 38, 40, 0.68);
  font-size: 14.5px;
  line-height: 1.65;
  font-weight: 500;
}

.hb-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  border-top: 1px solid rgba(38, 38, 40, 0.10);
}

.hb-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.hb-footer-brand img {
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(38, 38, 40, 0.16);
}

.hb-footer-brand span { display: grid; line-height: 1.25; }
.hb-footer-brand strong { font-size: 15.5px; font-weight: 800; letter-spacing: -0.2px; }
.hb-footer-brand small { color: rgba(38, 38, 40, 0.58); font-size: 12.5px; font-weight: 650; }

.hb-footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(38, 38, 40, 0.55);
  font-size: 13px;
  font-weight: 600;
}

.hb-footer-links a {
  color: rgba(38, 38, 40, 0.78);
  font-weight: 750;
  text-decoration: none;
}

.hb-footer-links a:hover { color: #e07a0a; }

@media (max-width: 760px) {
  .home-below { margin-top: -20px; border-radius: 26px 26px 0 0; }
  .home-below-inner { width: min(100% - 32px, 880px); }
  .hb-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hb-stat { padding: 15px 8px 13px; border-radius: 18px; }
  .hb-radar { grid-template-columns: 1fr; padding: 26px 20px; }
  .hb-radar-art { order: -1; }
  .hb-radar-art svg { width: 150px; }
  .hb-footer { flex-direction: column; align-items: flex-start; }
}
