/* ============================================================
   Wetter-Pollenried.de – Morgenlicht (vollständig)
   ============================================================ */

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

:root {
  --brand-navy: #112E4C;
  --brand-navy-dark: #0A192F;
  --brand-gold: #F2A900;
  --brand-sky: #74A9D8;
  --sky-top: #B9D9EB;
  --sky-mid: #D0E7F2;
  --horizon: #F2F7FB;
  --surface: #ffffff;
  --surface-soft: #F8FBFD;
  --surface-muted: #EEF4F8;
  --border: rgba(17, 46, 76, 0.1);
  --border-strong: rgba(17, 46, 76, 0.18);
  --text-primary: #112E4C;
  --text-secondary: #3D5A73;
  --text-muted: #6B8499;
  --sky: #3B6FA0;
  --sun: #D4880F;
  --sun-warm: #F2A900;
  --grass: #5E723C;
  --wind: #4d8f52;
  --wind-needle: #3d7a42;
  --wind-needle-tail: #8b6f52;
  --rain: #3d7fa8;
  --uv-high: #d4880f;
  --tip-bg: rgba(45, 127, 170, 0.08);
  --pollen-green: #4d8f52;
  --pollen-yellow: #c9a227;
  --pollen-orange: #d4880f;
  --pollen-red: #c45c4a;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(17, 46, 76, 0.08), 0 1px 3px rgba(17, 46, 76, 0.04);
  --shadow-sm: 0 2px 8px rgba(17, 46, 76, 0.06);
  --font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition: 0.22s ease;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--horizon);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg-gradient {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 38%, var(--horizon) 72%, #E8F0F5 100%);
  z-index: -2;
}

.bg-glow {
  position: fixed; border-radius: 50%; filter: blur(90px); opacity: 0.45; z-index: -1; pointer-events: none;
}

.bg-glow--1 { width: 420px; height: 420px; background: rgba(116, 169, 216, 0.28); top: -120px; right: -80px; }
.bg-glow--2 { width: 320px; height: 320px; background: rgba(242, 169, 0, 0.14); bottom: 8%; left: -60px; }

.app { max-width: 720px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; }

/* Header */
.header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.header__brand {
  display: flex; align-items: center; gap: 1rem;
  min-width: 0; text-decoration: none; color: inherit;
}

.header__brand:hover .header__title { color: var(--sky); }

.header__logo {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  padding: 2px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid rgba(17, 46, 76, 0.08);
  box-shadow: 0 3px 12px rgba(17, 46, 76, 0.14);
}

.header__text {
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0; min-height: 4.5rem;
}

.header__title {
  display: block;
  font-size: 1.28rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--brand-navy);
  line-height: 1.15;
  transition: color var(--transition);
}

.header__subtitle {
  display: block;
  font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  line-height: 1.3;
}

.header__accent {
  display: block; margin-top: 0.45rem; height: 2px; width: min(9rem, 100%);
  background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-gold) 38%, var(--brand-sky) 38%, var(--brand-sky) 100%);
  border-radius: 2px;
}

.header__clock { text-align: right; flex-shrink: 0; }
.header__clock-time { display: block; font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--brand-navy); }
.header__clock-date { display: block; font-size: 0.75rem; color: var(--text-muted); }

/* Navigation */
.nav {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1.25rem; padding: 0.35rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.nav__btn {
  flex: 1 1 auto; min-width: fit-content;
  padding: 0.45rem 0.75rem;
  border: none; border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font); font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.nav__btn:hover { background: var(--surface); color: var(--text-secondary); }

.nav__btn--active {
  background: var(--surface);
  color: var(--brand-navy);
  box-shadow: var(--shadow-sm);
  border-bottom: 2px solid var(--brand-gold);
}

/* Views */
.view { display: none; }
.view--active { display: block; }

.section-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.35rem; }
.section-sub { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.card--hero { padding: 1.5rem 1.4rem 1.35rem; }

/* DWD Wetterwarnung */
.dwd-alert {
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.dwd-alert__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  padding: 1rem 1.1rem;
  align-items: start;
}
.dwd-alert__icon {
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 700; line-height: 1;
  background: rgba(255, 255, 255, 0.55);
}
.dwd-alert__main { min-width: 0; }
.dwd-alert__top {
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.65rem;
  align-items: center; margin-bottom: 0.35rem;
}
.dwd-alert__badge {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}
.dwd-alert__level {
  font-size: 0.78rem; font-weight: 700;
}
.dwd-alert__headline {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 700; line-height: 1.3; color: inherit;
}
.dwd-alert__text {
  margin-top: 0.45rem;
  font-size: 0.9rem; line-height: 1.45;
}
.dwd-alert__instruction {
  margin-top: 0.45rem;
  font-size: 0.86rem; line-height: 1.45;
  font-weight: 600;
}
.dwd-alert__meta {
  margin-top: 0.55rem;
  font-size: 0.76rem; opacity: 0.9;
}
.dwd-alert__more {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(17, 46, 76, 0.12);
}
.dwd-alert__more-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 0.4rem; opacity: 0.85;
}
.dwd-alert__more-item + .dwd-alert__more-item { margin-top: 0.45rem; }
.dwd-alert__more-headline { font-size: 0.86rem; font-weight: 700; line-height: 1.35; }
.dwd-alert__footer {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  justify-content: space-between; align-items: center;
  margin-top: 0.15rem;
  font-size: 0.76rem;
}
.dwd-alert__footer a {
  color: inherit; font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px;
}
.dwd-alert--level-1 {
  background: linear-gradient(135deg, #fff8c8 0%, #fff3a6 100%);
  border-color: #d4b400; color: #4a3d00;
}
.dwd-alert--level-2 {
  background: linear-gradient(135deg, #ffe2bf 0%, #ffc98a 100%);
  border-color: #d97706; color: #5c2e00;
}
.dwd-alert--level-3 {
  background: linear-gradient(135deg, #ffc9c9 0%, #ff9f9f 100%);
  border-color: #c62828; color: #5c1010;
}
.dwd-alert--level-4 {
  background: linear-gradient(135deg, #e7c9f5 0%, #d39cf0 100%);
  border-color: #7b1fa2; color: #3b0d52;
}

.card--chart { padding: 1rem 1.1rem; }
.card--chart h3 { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.65rem; }
.card--chart-wide { grid-column: 1 / -1; }
.card--placeholder .placeholder { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1rem; }

/* Hero */
.hero {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1rem;
}

.hero__main { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.hero__icon {
  width: 72px; height: 72px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
}

.hero__icon svg { width: 100%; height: 100%; overflow: visible; }

/* Hero-Wettericon: dezente Animation je Zustand */
.hero__icon .w-sun-core { transform-origin: center; animation: heroSunPulse 4.5s ease-in-out infinite; }
.hero__icon .w-sun-rays { transform-origin: 32px 32px; animation: heroSunRays 24s linear infinite; }
.hero__icon--partly .w-sun-core { transform-origin: 24px 24px; }
.hero__icon--default .w-sun-core { transform-origin: 26px 26px; }

.hero__icon .w-cloud { transform-origin: center; animation: heroCloudFloat 5s ease-in-out infinite; }
.hero__icon .w-rain-drop { opacity: 0.45; animation: heroRainDrop 1.4s ease-in infinite; }
.hero__icon .w-rain-drop--2 { animation-delay: 0.2s; }
.hero__icon .w-rain-drop--3 { animation-delay: 0.45s; }

.hero__icon .w-wind-line { animation: heroWindSway 2.8s ease-in-out infinite; }
.hero__icon .w-wind-line--2 { animation-delay: 0.35s; }
.hero__icon .w-wind-line--3 { animation-delay: 0.7s; }

.hero__icon .w-fog-line { animation: heroFogDrift 4s ease-in-out infinite; }
.hero__icon .w-fog-line--2 { animation-delay: 0.5s; }
.hero__icon .w-fog-line--3 { animation-delay: 1s; }
.hero__icon .w-fog-line--4 { animation-delay: 1.5s; }

.hero__icon .w-snowflake { transform-origin: 32px 36px; animation: heroSnowFloat 3.5s ease-in-out infinite; }
.hero__icon .w-moon { transform-origin: center; animation: heroMoonGlow 5s ease-in-out infinite; }
.hero__icon .w-star { animation: heroStarTwinkle 3s ease-in-out infinite; }
.hero__icon .w-star--2 { animation-delay: 0.6s; }
.hero__icon .w-star--3 { animation-delay: 1.2s; }

@keyframes heroSunPulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes heroSunRays {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes heroCloudFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes heroRainDrop {
  0% { transform: translateY(-2px); opacity: 0.2; }
  40% { opacity: 0.95; }
  100% { transform: translateY(5px); opacity: 0.2; }
}

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

@keyframes heroFogDrift {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes heroSnowFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(8deg); }
}

@keyframes heroMoonGlow {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}

@keyframes heroStarTwinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero__temp-wrap { display: flex; align-items: flex-start; gap: 0.1rem; }

.hero__temp {
  font-size: clamp(3rem, 11vw, 4.5rem);
  font-weight: 700; line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-navy);
}

.hero__temp-unit { font-size: 1.55rem; font-weight: 500; color: var(--text-secondary); margin-top: 0.5rem; }
.hero__condition { font-size: 1.05rem; font-weight: 500; color: var(--text-secondary); width: 100%; }

.hero__meta { text-align: right; flex-shrink: 0; }
.hero__updated { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.35rem; }

.hero__badge {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(122, 145, 156, 0.15); color: var(--text-muted);
  border: 1px solid rgba(122, 145, 156, 0.25);
}

.hero__badge--live {
  background: rgba(77, 143, 82, 0.12); color: var(--grass);
  border-color: rgba(77, 143, 82, 0.3);
}

.hero__badge--stale {
  background: rgba(212, 136, 15, 0.15); color: #9a5f08;
  border-color: rgba(212, 136, 15, 0.35);
}

/* Sponsor */
.sponsor {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 1.1rem; margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background: rgba(139, 115, 85, 0.08);
  border: 1px solid rgba(139, 115, 85, 0.18);
  text-decoration: none; color: inherit;
  transition: background var(--transition), border-color var(--transition);
}

.sponsor:hover { background: rgba(139, 115, 85, 0.14); border-color: rgba(139, 115, 85, 0.28); }

.sponsor__logo { height: 38px; width: auto; max-width: 76px; object-fit: contain; flex-shrink: 0; }
.sponsor__headline { font-size: 0.9rem; font-weight: 600; line-height: 1.35; }
.sponsor__subline { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.15rem; }

/* Wetter-Tipps */
.tips-card {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-bottom: 1rem; padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--tip-bg);
  border: 1px solid rgba(45, 127, 170, 0.15);
}

.tips-card__title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--sky);
}

.tip-item {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.4;
}

.tip-item__emoji { font-size: 1.15rem; flex-shrink: 0; line-height: 1.3; }
.tip-item__text strong { color: var(--text-primary); font-weight: 600; }

.tip-item--fun {
  font-style: italic; color: var(--text-muted); font-size: 0.82rem;
  padding-top: 0.15rem; border-top: 1px dashed rgba(42, 72, 88, 0.12);
}

/* Schnellkacheln */
.quick-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.quick-tile {
  padding: 0.65rem 0.55rem; text-align: center;
  border-radius: var(--radius-sm);
  background: var(--surface-soft); border: 1px solid var(--border);
}

.quick-tile__label {
  display: block; font-size: 0.62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); margin-bottom: 0.2rem;
}

.quick-tile__value {
  font-size: 1.35rem; font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}

.quick-tile__unit { font-size: 0.65rem; color: var(--text-muted); }

.quick-tile--high .quick-tile__value { color: #c45c4a; }
.quick-tile--low .quick-tile__value { color: var(--sky); }

/* Metrics */
.metrics-area { display: flex; flex-direction: column; gap: 0.75rem; }

.m-card {
  padding: 1rem 1.25rem; border-radius: var(--radius-md);
  background: var(--surface-soft); border: 1px solid var(--border);
}

.m-card__title {
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.65rem; text-align: center;
}

.m-card__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.m-card--primary .m-card__cols { gap: 1rem; }
.m-card--primary .m-col:first-child {
  padding-right: 0.4rem;
  border-right: 1px dashed rgba(42, 72, 88, 0.15);
}
.m-card--primary .m-col:last-child { padding-left: 0.2rem; }
.m-label--section { font-size: 0.74rem; letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.m-card--primary .m-value { font-size: 2.05rem; }

.m-card__moon {
  display: flex; align-items: center; justify-content: center; gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.m-card__moon-text { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }

.m-label {
  display: block; font-size: 0.68rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 0.2rem;
}

.m-primary { margin-bottom: 0.35rem; }
.m-primary--sm .m-value { font-size: 1.45rem; }
.m-value { font-size: 1.85rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.m-unit { font-size: 0.72rem; color: var(--text-muted); margin-left: 0.1rem; }
.m-detail { font-size: 0.75rem; margin-top: 0.35rem; color: var(--text-secondary); }
.m-detail__val { font-weight: 600; color: var(--grass); }

.m-extreme {
  font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem;
  display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap;
}

.m-extreme--high span:first-child { color: #c45c4a; }
.m-extreme--low span:first-child { color: var(--sky); }
.m-extreme small { opacity: 0.75; }

.m-trend {
  font-size: 0.72rem; font-weight: 600; margin-bottom: 0.25rem;
  padding: 0.15rem 0.4rem; border-radius: 4px; display: inline-block;
}

.m-trend--up { color: #c45c4a; background: rgba(196, 92, 74, 0.1); }
.m-trend--down { color: var(--sky); background: rgba(45, 127, 170, 0.1); }
.m-trend--flat { color: var(--text-muted); background: rgba(122, 145, 156, 0.1); }

/* Mond */
.moon-visual {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f5f0e6, #c8c0b0);
  box-shadow: inset -4px -4px 8px rgba(0,0,0,0.15), 0 2px 6px rgba(28,51,64,0.12);
  position: relative; overflow: hidden;
}

.moon-visual--sm { width: 36px; height: 36px; }

.moon-visual__shadow {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--surface-soft);
}

/* Wind */
.wind-panel {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1rem 1.25rem; border-radius: var(--radius-md);
  background: var(--surface-soft); border: 1px solid var(--border);
}

.wind-compass { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.wind-compass__dial { width: 100%; height: 100%; color: var(--text-muted); }
.wind-compass__label { font-size: 11px; font-weight: 700; fill: currentColor; opacity: 0.55; }
.wind-compass__label--n { fill: var(--sky); opacity: 0.85; }

.wind-compass__needle {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(var(--wind-deg, 0deg));
  animation: windSway var(--wind-duration, 4s) ease-in-out infinite;
  transform-origin: center;
}

.wind-compass__needle svg { width: 22px; height: 72px; }

@keyframes windSway {
  0%, 100% { transform: rotate(calc(var(--wind-deg, 0deg) - var(--wind-sway, 3deg))); }
  50% { transform: rotate(calc(var(--wind-deg, 0deg) + var(--wind-sway, 3deg))); }
}

.wind-panel__content { flex: 1; min-width: 0; }
.wind-panel__title {
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.65rem;
}

.wind-panel__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.wind-stat { text-align: center; }
.wind-stat__label { display: block; font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; margin-bottom: 0.3rem; }
.wind-stat__value { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wind-stat__value--dir { font-size: 1.5rem; color: var(--wind); }
.wind-stat__unit { display: block; font-size: 0.68rem; color: var(--text-muted); }
.wind-stat__sub { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.wind-stat__ext { justify-content: center; margin-top: 0.25rem; }

/* Rain */
.rain-panel {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1rem 1.25rem; border-radius: var(--radius-md);
  background: var(--surface-soft); border: 1px solid var(--border);
}

.rain-panel__icon {
  flex-shrink: 0;
  width: 52px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.rain-panel__icon svg { width: 44px; height: 52px; overflow: visible; }
.rain-panel__content { flex: 1; min-width: 0; }
.rain-panel__title { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.65rem; }
.rain-panel__main { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rain-panel__primary { display: flex; flex-direction: column; gap: 0.5rem; }
.rain-panel__list { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.rain-panel__list li { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-secondary); }

.rain-icon__drop { opacity: 0; }
.rain-panel--raining .rain-icon__drop { animation: rainDrop 0.9s ease-in infinite; }
.rain-panel--raining .rain-icon__drop--1 { animation-delay: 0s; }
.rain-panel--raining .rain-icon__drop--2 { animation-delay: 0.25s; }
.rain-panel--raining .rain-icon__drop--3 { animation-delay: 0.5s; }

@keyframes rainDrop {
  0% { transform: translateY(-4px); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translateY(6px); opacity: 0; }
}

/* Pollen Teaser */
.pollen-teaser, .webcam-teaser {
  display: flex; align-items: center; gap: 1rem;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.pollen-teaser:hover, .webcam-teaser:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.pollen-teaser:focus-visible, .webcam-teaser:focus-visible {
  outline: 2px solid var(--sky); outline-offset: 2px;
}

.pollen-teaser__body, .webcam-teaser__body { flex: 1; min-width: 0; }
.pollen-teaser__title, .webcam-teaser__title { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.pollen-teaser__summary, .webcam-teaser__text { font-size: 0.85rem; color: var(--text-secondary); }
.pollen-teaser__highlights { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.pollen-teaser__arrow, .webcam-teaser__arrow { font-size: 1.2rem; color: var(--text-muted); flex-shrink: 0; }

/* Pollen Ampel */
.pollen-ampel {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.45rem; border-radius: var(--radius-sm);
  background: #3d4549; border: 1px solid var(--border); flex-shrink: 0;
  width: fit-content;
}

.pollen-ampel--lg { gap: 0.4rem; padding: 0.55rem 0.65rem; margin: 0 auto 1rem; }

.pollen-ampel__light {
  width: 18px; height: 18px; border-radius: 50%;
  opacity: 0.35; transition: opacity var(--transition), box-shadow var(--transition), transform var(--transition);
}

.pollen-ampel--lg .pollen-ampel__light { width: 24px; height: 24px; }

.pollen-ampel__light--red { background: var(--pollen-red); }
.pollen-ampel__light--orange { background: var(--pollen-orange); }
.pollen-ampel__light--yellow { background: var(--pollen-yellow); }
.pollen-ampel__light--green { background: var(--pollen-green); }

.pollen-ampel__light--active { opacity: 1; animation: pollen-ampel-pulse 2.2s ease-in-out infinite; }
.pollen-ampel__light--active.pollen-ampel__light--green { box-shadow: 0 0 10px var(--pollen-green); }
.pollen-ampel__light--active.pollen-ampel__light--yellow { box-shadow: 0 0 10px var(--pollen-yellow); }
.pollen-ampel__light--active.pollen-ampel__light--orange { box-shadow: 0 0 10px var(--pollen-orange); }
.pollen-ampel__light--active.pollen-ampel__light--red { box-shadow: 0 0 10px var(--pollen-red); }

@keyframes pollen-ampel-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.pollen-badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600;
}

.pollen-badge--0, .pollen-badge--na { background: rgba(77, 143, 82, 0.12); color: var(--pollen-green); }
.pollen-badge--1 { background: rgba(201, 162, 39, 0.15); color: #8a6f10; }
.pollen-badge--2 { background: rgba(212, 136, 15, 0.15); color: #9a5f08; }
.pollen-badge--3 { background: rgba(196, 92, 74, 0.15); color: var(--pollen-red); }

/* Pollen Detail */
.pollen-detail { text-align: center; }
.pollen-detail__summary { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1rem; }

.pollen-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem;
  font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1rem;
}

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.25rem; vertical-align: middle; }
.dot--green { background: var(--pollen-green); }
.dot--yellow { background: var(--pollen-yellow); }
.dot--orange { background: var(--pollen-orange); }
.dot--red { background: var(--pollen-red); }

.pollen-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; text-align: left; }
.pollen-table th { padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; }
.pollen-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); }
.pollen-table__name { font-weight: 600; }
.pollen-source { font-size: 0.72rem; color: var(--text-muted); margin-top: 1rem; }
.pollen-source a { color: var(--sky); }

/* Webcam Teaser */
.webcam-teaser__preview {
  position: relative; flex-shrink: 0;
  width: 112px; height: 63px; border-radius: var(--radius-sm);
  overflow: hidden; background: #1c3340; border: 1px solid var(--border);
}

.webcam-teaser__image { width: 100%; height: 100%; object-fit: cover; }
.webcam-teaser__badge {
  position: absolute; top: 4px; left: 4px;
  padding: 0.1rem 0.35rem; border-radius: 3px;
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  background: rgba(196, 92, 74, 0.9); color: #fff;
}

/* Webcam Panel */
.webcam-panel__header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1rem;
}

.webcam-panel__title { font-size: 1rem; font-weight: 600; }
.webcam-panel__subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }
.webcam-panel__meta { text-align: right; flex-shrink: 0; }

.webcam-panel__badge {
  display: inline-block; padding: 0.15rem 0.45rem; border-radius: 4px;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  background: rgba(122, 145, 156, 0.15); color: var(--text-muted);
}

.webcam-panel__badge--live { background: rgba(196, 92, 74, 0.12); color: #c45c4a; }
.webcam-panel__updated { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.25rem; }

.webcam-panel__frame {
  border-radius: var(--radius-md); overflow: hidden;
  background: #1c3340; border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}

.webcam-panel__image { width: 100%; height: 100%; object-fit: cover; display: block; }
.webcam-panel__hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.65rem; }

/* Timelapse */
.timelapse-filters {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem;
}

.timelapse-filter {
  padding: 0.35rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-soft);
  font-family: var(--font); font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.timelapse-filter:hover { border-color: var(--border-strong); color: var(--text-secondary); }
.timelapse-filter--active { background: var(--sky); color: #fff; border-color: var(--sky); }

.timelapse-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem;
}

.timelapse-card {
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-soft);
  transition: border-color var(--transition), transform var(--transition);
}

.timelapse-card--available:hover { border-color: var(--sky); transform: translateY(-2px); }
.timelapse-card--planned { opacity: 0.75; }

.timelapse-card__thumb {
  position: relative; aspect-ratio: 16/9;
  background: #1c3340; overflow: hidden;
}

.timelapse-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.timelapse-card__thumb--empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted);
}

.timelapse-card__thumb--empty svg { width: 28px; height: 28px; opacity: 0.4; }

.timelapse-card__badge {
  position: absolute; top: 6px; right: 6px;
  padding: 0.1rem 0.35rem; border-radius: 3px;
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  background: rgba(0,0,0,0.55); color: #fff;
}

.timelapse-card__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25); color: #fff;
}

.timelapse-card__play svg { width: 32px; height: 32px; opacity: 0.9; }

.timelapse-card__body { padding: 0.55rem 0.65rem; }
.timelapse-card__category { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; color: var(--sky); }
.timelapse-card__title { font-size: 0.82rem; font-weight: 600; margin: 0.15rem 0; }
.timelapse-card__meta { font-size: 0.72rem; color: var(--text-muted); }
.timelapse-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.85rem; font-style: italic; }

/* Charts */
.charts-section { margin-top: 0.5rem; }
.charts-section .section-title { margin-bottom: 0.75rem; }

.charts-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}

.charts-grid canvas { width: 100%; display: block; height: 240px; }

.stats-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem;
}
.stats-period {
  padding: 0.42rem 0.85rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-muted); color: var(--text-muted);
  font-family: var(--font); font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.stats-period:hover { background: var(--surface); color: var(--text-secondary); }
.stats-period--active {
  background: var(--surface); color: var(--brand-navy);
  border-color: var(--brand-sky); box-shadow: var(--shadow-sm);
}

.stats-range-wrap {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.stats-range-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.stats-range {
  flex: 1; min-width: 10rem; max-width: 20rem;
  padding: 0.45rem 0.65rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font); font-size: 0.82rem; color: var(--text-primary);
}

/* Forecast */
.forecast-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.6rem;
}

.forecast-day {
  padding: 0.75rem 0.5rem; text-align: center;
  border-radius: var(--radius-sm);
  background: var(--surface-soft); border: 1px solid var(--border);
}

.forecast-day__name { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.35rem; }
.forecast-day__icon { font-size: 1.5rem; margin-bottom: 0.25rem; }
.forecast-day__high { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.forecast-day__low { font-size: 0.82rem; color: var(--text-muted); }
.forecast-day__rain { font-size: 0.68rem; color: var(--rain); margin-top: 0.2rem; }

/* Radar */
.radar-frame {
  display: block; width: 100%; max-height: 480px; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-muted); object-fit: contain;
}
.radar-source {
  margin-top: 0.5rem; font-size: 0.78rem; color: var(--text-muted); line-height: 1.45;
}
.radar-source a { color: var(--brand-sky); text-decoration: none; }
.radar-source a:hover { text-decoration: underline; }
.radar-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: flex-end;
  margin-top: 0.35rem; font-size: 0.72rem; color: var(--text-muted);
}

/* Footer */
.footer { margin-top: 1.5rem; text-align: center; }
.footer p { font-size: 0.78rem; color: var(--text-muted); }
.footer__links { margin-top: 0.35rem; }
.footer__links a {
  color: var(--sky); text-decoration: none; font-size: 0.78rem;
}
.footer__links a:hover { text-decoration: underline; }
.footer__links a[aria-current="page"] { color: var(--text-secondary); font-weight: 600; }

/* Legal pages */
.app--legal { max-width: 720px; }
.legal-header { margin-bottom: 1rem; }
.legal-header__back {
  font-size: 0.85rem; color: var(--sky); text-decoration: none; font-weight: 500;
}
.legal-header__back:hover { text-decoration: underline; }
.legal-card { padding: 1.5rem 1.35rem; text-align: left; }
.legal-card__title {
  font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.75rem;
}
.legal-card__intro { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 1.25rem; }
.legal-card__updated { margin-top: 1.5rem; font-size: 0.78rem; color: var(--text-muted); }
.legal-section { margin-bottom: 1.15rem; }
.legal-section h2 {
  font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem;
}
.legal-section p, .legal-section li {
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55;
}
.legal-section p + p { margin-top: 0.55rem; }
.legal-section ul { margin: 0.45rem 0 0 1.1rem; }
.legal-section li + li { margin-top: 0.35rem; }
.legal-section a { color: var(--sky); }

/* Responsive */
@media (max-width: 600px) {
  .app { padding: 1rem 1rem 2.25rem; }

  .header { padding: 0.85rem 0.95rem; align-items: center; }
  .header__brand { gap: 0.75rem; }
  .header__logo { width: 3.75rem; height: 3.75rem; }
  .header__text { min-height: 3.75rem; }
  .header__title { font-size: 1.12rem; }
  .header__subtitle { font-size: 0.68rem; letter-spacing: 0.08em; }
  .header__accent { width: min(7rem, 100%); margin-top: 0.35rem; }
  .header__clock-time { font-size: 1rem; }

  /* Hero: Temperatur zentriert als Blickfang */
  .hero { flex-direction: column; align-items: stretch; }
  .hero__main {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .hero__condition { text-align: center; }
  .hero__meta { width: 100%; text-align: center; }

  /* Text-Karten: linksbündig für Lesbarkeit */
  .section-title,
  .section-sub,
  .tips-card__title,
  .tip-item,
  .sponsor__text,
  .m-card__title,
  .m-col,
  .wind-panel__content,
  .rain-panel__content,
  .pollen-teaser__body,
  .webcam-teaser__body,
  .card--chart h3 {
    text-align: left;
  }

  .m-card__title { letter-spacing: 0.05em; }
  .quick-tiles { grid-template-columns: repeat(2, 1fr); }

  /* Kompakte Kennzahlen-Kacheln bleiben zentriert */
  .quick-tile { text-align: center; }

  .wind-panel,
  .rain-panel {
    flex-direction: column;
    align-items: stretch;
  }

  /* Kompass/Icon als visuelles Zentrum */
  .wind-panel__compass,
  .rain-panel__icon {
    align-self: center;
  }

  .wind-panel__stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .wind-stat { text-align: left; }
  .wind-stat__ext { justify-content: flex-start; }

  .rain-panel__main,
  .m-card__cols { grid-template-columns: 1fr; }

  .m-card--primary .m-col:first-child {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px dashed rgba(42, 72, 88, 0.15);
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
  }

  .m-card--primary .m-col:last-child { padding-left: 0; }

  .dwd-alert__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .nav__btn { font-size: 0.72rem; padding: 0.4rem 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wind-compass__needle { animation: none; transform: rotate(var(--wind-deg, 0deg)); }
  .rain-panel--raining .rain-icon__drop { animation: none; opacity: 0.7; }
  .hero__icon .w-sun-core,
  .hero__icon .w-sun-rays,
  .hero__icon .w-cloud,
  .hero__icon .w-rain-drop,
  .hero__icon .w-wind-line,
  .hero__icon .w-fog-line,
  .hero__icon .w-snowflake,
  .hero__icon .w-moon,
  .hero__icon .w-star { animation: none; }
  .hero__icon .w-rain-drop { opacity: 0.75; }
}
