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

/* ===== Weather Icons ===== */
.wi {
  display: inline-block;
  vertical-align: middle;
  width: 1em;
  height: 1em;
}

.hourly-icon .wi {
  width: 28px;
  height: 28px;
}

.daily-icon .wi {
  width: 26px;
  height: 26px;
}

.weekend-icon .wi {
  width: 52px;
  height: 52px;
}

.temp-main-icon .wi {
  width: 64px;
  height: 64px;
}

:root {
  --bg-dark: #0a0e27;
  --bg-card: rgba(30, 36, 72, 0.85);
  --bg-card-hover: rgba(40, 48, 90, 0.9);
  --accent-blue: #4fc3f7;
  --accent-cyan: #00e5ff;
  --accent-green: #69f0ae;
  --accent-orange: #ffab40;
  --accent-red: #ff5252;
  --accent-purple: #b388ff;
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.4);
  --ring-bg: rgba(255,255,255,0.08);
  --ring-track: rgba(255,255,255,0.12);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 20px rgba(79,195,247,0.15);
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(30, 60, 150, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(60, 20, 120, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(10, 30, 80, 0.4) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
}

.app {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(10, 14, 39, 0.9);
  border-bottom: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo span {
  color: var(--accent-cyan);
  font-weight: 300;
}

.location-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.current-location {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.current-location:hover {
  background: var(--bg-card-hover);
}

/* Lange Ortsnamen: Ellipsis statt hartem Abschneiden; Icon + Favoriten-Stern
   dürfen dabei nicht aus der Pille gequetscht werden */
.current-location > svg, .current-location .fav-btn { flex-shrink: 0; }
#locationName { overflow: hidden; text-overflow: ellipsis; }

.search-wrapper {
  position: relative;
}

.search-wrapper input {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 14px;
  width: 220px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

.search-wrapper input::placeholder {
  color: var(--text-muted);
}

.search-wrapper input:focus {
  background: rgba(30, 36, 72, 0.95);
  border-color: var(--accent-cyan);
  width: 280px;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1a2048;
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-card);
  display: none;
  z-index: 200;
  overflow: hidden;
  min-width: 300px;
  border: 1px solid rgba(255,255,255,0.1);
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 11px 14px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(79, 195, 247, 0.1);
  color: var(--text-primary);
}

.btn-add-location {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-add-location:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
}

.location-count {
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-cyan);
  color: var(--bg-dark);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Location Chips ===== */
.location-chips {
  display: flex;
  gap: 8px;
  padding: 0 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.location-chips::-webkit-scrollbar { display: none; }
.location-chips:empty { display: none; }

.location-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.06);
}

.location-chip:hover {
  background: var(--bg-card-hover);
}

.location-chip.active {
  background: rgba(79, 195, 247, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

.location-chip .remove {
  font-size: 14px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.location-chip .remove:hover {
  opacity: 1;
}

.chip-more {
  background: rgba(79, 195, 247, 0.1);
  border-color: rgba(79, 195, 247, 0.2);
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 12px;
}

/* Drag & Drop in modal (Maus + Touch) */
.saved-location-drag {
  cursor: grab;
  color: var(--text-muted);
  padding: 2px 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 8px;
  /* Ziehen am Griff darf die Modal-Liste nicht scrollen */
  touch-action: none;
}

.saved-location-drag:active { cursor: grabbing; }
.saved-location-drag:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 1px;
}

/* Größeres Ziel für Finger */
@media (pointer: coarse) {
  .saved-location-drag {
    min-width: 40px;
    min-height: 40px;
    margin: -10px -6px -10px -8px;
  }
}

/* Lücke, in die die Zeile fällt */
.saved-location-placeholder {
  border: 1px dashed rgba(79, 195, 247, 0.45);
  background: rgba(79, 195, 247, 0.06);
  border-radius: var(--radius-xs);
}

/* Kein Textmarkieren / iOS-Callout während des Verschiebens */
body.reordering, body.reordering .saved-location {
  user-select: none;
  -webkit-user-select: none;
}

.saved-location.saved-active {
  border-color: rgba(79, 195, 247, 0.2);
  background: rgba(79, 195, 247, 0.06);
}

.saved-location.saved-active .saved-location-name {
  color: var(--accent-cyan);
}

/* Angehobene Zeile — liegt in <body>, also über dem Modal-Overlay.
   Muss nach .saved-active stehen, sonst bleibt der Hintergrund durchsichtig. */
.saved-location.dragging {
  position: fixed;
  top: 0;
  z-index: 1200;
  margin: 0;
  background: #262d5c;
  border-color: rgba(79, 195, 247, 0.5);
  box-shadow: 0 14px 32px rgba(0,0,0,0.5);
  transform: translateY(var(--drag-y, 0px)) scale(1.02);
  will-change: transform;
  cursor: grabbing;
  transition: none;
}

[data-theme="light"] .saved-location.dragging {
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(0,0,0,0.18);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  padding: 0 20px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-radius: 0;
  font-family: inherit;
  position: relative;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--accent-cyan);
  font-weight: 600;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* ===== Day Navigation ===== */
.day-nav {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  background: transparent;
  padding: 0 8px;
}

.day-nav::-webkit-scrollbar { display: none; }
.day-nav:empty { display: none; }

.day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 80px;
  border-radius: 10px;
  margin: 4px 0;
}

.day-item:hover {
  background: rgba(255,255,255,0.06);
}

.day-item.active {
  background: rgba(79, 195, 247, 0.12);
  color: var(--accent-cyan);
}

.day-item .day-name {
  font-size: 12px;
  font-weight: 600;
}

.day-item .day-date {
  font-size: 11px;
  opacity: 0.5;
}

/* ===== Main Content ===== */
.main {
  padding: 20px;
  min-height: 60vh;
  transition: opacity 0.15s ease;
}
.main.tab-switching { opacity: 0.5; }

/* ===== Loading ===== */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.loading.hidden { display: none; }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ring-track);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

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

/* ===== Widget Grid ===== */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.widget-grid .widget-full {
  grid-column: 1 / -1;
}

/* ===== Widget Card ===== */
.widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  transition: all 0.3s;
  overflow: hidden;
}

.widget:hover,
.hourly-section:hover,
.daily-section:hover,
.timeline-section:hover,
.tip-bar:hover,
.radar-section:hover,
.pollen-section:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: var(--shadow-glow);
}

.widget-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  font-weight: 500;
}

.widget-label svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.widget-value {
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  color: var(--text-primary);
}

.widget-value sup {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
}

.widget-value .unit {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 2px;
}

.widget-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ===== Main Temperature Widget ===== */
.widget-temp-main {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(30, 40, 100, 0.9), rgba(20, 25, 60, 0.9));
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.widget-temp-main::before {
  display: none;
}

.temp-main-value {
  position: relative;
  z-index: 5;
  font-size: 80px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -4px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.temp-main-value sup {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0;
}

.temp-main-condition {
  position: relative;
  z-index: 5;
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}

.temp-main-range {
  position: relative;
  z-index: 5;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* ===== Circular Gauge ===== */
.gauge-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 8px auto;
}

.gauge-svg {
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: var(--ring-track);
}

.gauge-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.gauge-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-center-value {
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.gauge-center-unit {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.gauge-center-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===== Sunrise Widget ===== */
.widget-sunrise { overflow: visible; }

.sunrise-visual {
  position: relative;
  height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 8px;
  overflow: visible;
}

.sunrise-arc {
  position: relative;
  width: 100%;
  height: 70px;
  overflow: visible;
}

.sunrise-arc svg {
  width: 100%;
  height: 100%;
}

.sun-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #ffe082 30%, #ffab40 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px 4px rgba(255, 171, 64, 0.5), 0 0 24px 8px rgba(255, 171, 64, 0.2);
  z-index: 2;
}

.sunrise-times {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.sunrise-times span:first-child { color: var(--accent-orange); }
.sunrise-times span:last-child { color: var(--accent-purple); }

/* ===== Hourly Scroll ===== */
.hourly-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hourly-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--ring-track) transparent;
}

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 58px;
  padding: 10px 6px;
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}

.hourly-item:hover {
  background: rgba(79, 195, 247, 0.08);
}

.hourly-scroll:not(.has-selection) .hourly-item.now {
  background: rgba(79, 195, 247, 0.12);
  border: 1px solid rgba(79, 195, 247, 0.2);
}

.hourly-scroll.has-selection .hourly-item.now:not(.selected) .hourly-time {
  color: var(--accent-cyan);
  font-weight: 700;
}

.hourly-time {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.hourly-icon {
  font-size: 22px;
}

.hourly-temp {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.hourly-precip {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 500;
}

.hourly-item {
  cursor: pointer;
}

.hourly-item.selected {
  background: rgba(79, 195, 247, 0.15);
  border: 1px solid rgba(79, 195, 247, 0.3);
  border-radius: var(--radius-xs);
}

/* Hourly Detail Panel */
.hourly-detail {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.hourly-detail.active {
  display: block;
}

.hourly-detail-grid {
  animation: detailFadeIn 0.25s ease;
}

@keyframes detailFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hourly-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.hourly-detail-icon .wi {
  width: 32px;
  height: 32px;
}

.hourly-detail-time {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.hourly-detail-temp {
  font-size: 18px;
  font-weight: 300;
}

.hourly-detail-cond {
  font-size: 13px;
  color: var(--text-secondary);
}

.hourly-detail-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hd-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

.hd-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hd-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .hourly-detail-items {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Daily Forecast ===== */
.daily-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

.daily-item {
  display: grid;
  grid-template-columns: 90px 36px 1fr 50px 50px;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}

.daily-item:last-child { border-bottom: none; }

.daily-item:hover {
  background: rgba(79, 195, 247, 0.05);
  border-radius: var(--radius-xs);
}

.daily-day {
  font-weight: 500;
  font-size: 14px;
}

.daily-day small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
}

.daily-icon {
  font-size: 22px;
  text-align: center;
}

.daily-bar-wrapper {
  display: flex;
  align-items: center;
}

.daily-bar {
  flex: 1;
  height: 4px;
  background: var(--ring-track);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.daily-bar-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
}

.daily-low {
  font-size: 14px;
  text-align: right;
  color: var(--accent-blue);
}

.daily-high {
  font-size: 14px;
  text-align: right;
  color: var(--accent-orange);
  font-weight: 600;
}

/* ===== Weekend Grid ===== */
.weekend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.weekend-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s;
}

.weekend-card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: var(--shadow-glow);
}

.weekend-day-name {
  font-size: 18px;
  font-weight: 600;
}

.weekend-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.weekend-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.weekend-temp {
  font-size: 36px;
  font-weight: 200;
}

.weekend-temp span {
  font-size: 18px;
  color: var(--accent-blue);
  margin-left: 8px;
}

.weekend-condition {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.weekend-details {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Radar ===== */
.radar-section {
  position: relative;
  z-index: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

.radar-map {
  width: 100%;
  height: min(500px, 60vh);
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Make satellite tiles show only bright cloud areas */
.radar-map .cloud-circle {
  filter: blur(12px);
}

.radar-map .leaflet-control-zoom a {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.1);
}

.radar-map .leaflet-control-zoom a:hover {
  background: var(--bg-card-hover);
}

.radar-map .leaflet-control-scale-line {
  background: rgba(30, 36, 72, 0.8);
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.2);
  font-size: 11px;
}

[data-theme="light"] .radar-map .leaflet-control-scale-line {
  background: rgba(255,255,255,0.8);
  color: #333;
  border-color: rgba(0,0,0,0.2);
}

.radar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.radar-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radar-legend-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.radar-legend-bar {
  width: 180px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    rgba(0, 150, 255, 0.2),
    rgba(0, 150, 255, 0.5),
    rgba(0, 100, 255, 0.7),
    rgba(0, 50, 255, 0.85),
    rgba(120, 0, 255, 0.9),
    rgba(255, 0, 100, 0.95)
  );
}

.radar-legend-labels {
  display: flex;
  justify-content: space-between;
  width: 180px;
  font-size: 10px;
  color: var(--text-muted);
}

.radar-layer-toggle {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.radar-storm-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.storm-legend {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* display:flex würde sonst das hidden-Attribut aushebeln (UA-Stylesheet verliert gegen Klassen-Selektor) */
.storm-legend[hidden] { display: none; }
.storm-legend-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.storm-legend-bar {
  width: 180px;
  height: 8px;
  border-radius: 4px;
  /* DWD-Blitzdichte-Farbskala: wenig -> viel */
  background: linear-gradient(90deg, #fff176, #aed581, #4dd0e1, #1e88e5, #8e24aa, #e53935, #7f0000);
}
.storm-legend-labels {
  display: flex;
  justify-content: space-between;
  width: 180px;
  font-size: 10px;
  color: var(--text-muted);
}

/* Unwetter-/Gewitter-Popups — Leaflet-Popup folgt dem Theme (dunkel/hell),
   daher themen-abhängige Textfarben statt fester dunkler Werte. */
.warn-popup { color: var(--text-primary); }
.warn-popup strong { font-size: 13px; }
.warn-popup .warn-popup-sev { font-weight: 600; font-size: 12px; margin-top: 2px; }
.warn-popup p { margin: 6px 0 0; font-size: 12px; line-height: 1.4; }
.warn-popup .warn-popup-time { margin-top: 6px; font-size: 11px; color: var(--text-muted); }

/* Klick-auf-Karte-Popup (Ort öffnen) */
.map-place-popup { color: var(--text-primary); min-width: 170px; }
.map-place-popup strong { font-size: 14px; }
.map-place-popup .map-place-region { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.map-place-actions { display: flex; gap: 6px; margin-top: 8px; }
.map-place-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cfd8dc;
  background: #f5f7f8;
  color: #1a1a1a;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.map-place-btn:hover { background: #e8edf0; }
.map-place-btn.primary { background: var(--accent-cyan, #19a7d2); border-color: var(--accent-cyan, #19a7d2); color: #06121c; font-weight: 600; }
[data-theme="light"] .map-place-btn.primary { color: #fff; }
.map-place-btn.primary:hover { filter: brightness(1.05); }

/* ===== Pegelstände (PEGELONLINE) ===== */
/* Kachel im Widget-Raster des Heute-Tabs; Klick öffnet das Verlaufs-Modal */
.pegel-card { display: flex; flex-direction: column; cursor: pointer; }
.pegel-value {
  font-size: 34px;
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-primary);
}
.pegel-unit { font-size: 15px; color: var(--text-muted); font-weight: 400; }
.pegel-trend { font-size: 20px; font-weight: 600; margin-left: 4px; }
.pegel-state { font-size: 12px; font-weight: 600; letter-spacing: 0.3px; margin-top: 2px; }
.pegel-spark { height: 46px; margin-top: 8px; }
.pegel-spark svg { width: 100%; height: 100%; display: block; }
.pegel-meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Popup einer Pegel-Station auf der Karte */
.pegel-popup-value { font-size: 22px; font-weight: 600; line-height: 1; margin-top: 6px; }
.pegel-popup-state { font-size: 11px; font-weight: 600; margin-top: 2px; }
.pegel-popup-spark { height: 36px; margin-top: 6px; }
.pegel-popup-spark:empty { display: none; }
.pegel-popup-spark svg { width: 100%; height: 100%; display: block; }

/* Hover-Tooltip einer Pegel-Station (Verlauf beim Überfahren) */
.leaflet-tooltip.pegel-tip {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 8px 10px;
}
.leaflet-tooltip-top.pegel-tip::before { border-top-color: var(--bg-card); }
[data-theme="light"] .leaflet-tooltip.pegel-tip { background: #fff; color: #333; border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .leaflet-tooltip-top.pegel-tip::before { border-top-color: #fff; }
.pegel-tip-inner { font-size: 12px; }
.pegel-tip-value { font-weight: 600; margin-left: 4px; }
.pegel-tip-spark { width: 190px; height: 40px; margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.pegel-tip-spark svg { width: 100%; height: 100%; display: block; }

/* Farb-Legende des Pegel-Layers (unter Karte/Regenradar, nur bei aktivem Layer) */
.pegel-legend { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.pegel-legend[hidden] { display: none; }
.pegel-legend-items { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--text-secondary); }
.pegel-legend-items span { display: inline-flex; align-items: center; gap: 5px; }
.pegel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
}
[data-theme="light"] .pegel-dot { border-color: rgba(0,0,0,0.25); }

/* Verlaufs-Modal (Klick auf die Kachel) */
.pegel-modal-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pegel-modal-value { font-size: 30px; font-weight: 300; line-height: 1; }
.pegel-modal-state { font-size: 13px; font-weight: 600; }
.pegel-modal-meta { font-size: 12px; color: var(--text-muted); }
.pegel-range-btns { display: flex; gap: 6px; margin-bottom: 12px; }
.pegel-modal-chart svg { width: 100%; height: auto; display: block; }
.pegel-modal-empty { padding: 40px 0; text-align: center; color: var(--text-muted); font-size: 13px; }
.pegel-modal-note { margin-top: 10px; font-size: 11px; color: var(--text-muted); }

.radar-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.radar-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary);
}

.radar-btn.active {
  background: rgba(79, 195, 247, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Radar timeline slider */
.radar-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  margin-top: 6px;
}

.radar-play-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--accent-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.radar-play-btn:hover {
  background: rgba(79, 195, 247, 0.15);
  border-color: var(--accent-cyan);
}

.radar-slider-wrap {
  flex: 1;
  position: relative;
  padding-bottom: 18px;
}

.radar-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  outline: none;
  cursor: pointer;
}
.radar-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}
.radar-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.radar-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
  cursor: pointer;
}

.radar-slider-labels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  font-size: 10px;
  color: var(--text-muted);
  pointer-events: none;
}
.radar-slider-labels span {
  position: absolute;
  white-space: nowrap;
}
.radar-slider-labels span:first-child { left: 0 !important; }
.radar-slider-labels span:last-child { left: auto !important; right: 0; }
.radar-slider-now {
  color: var(--accent-cyan);
  font-weight: 600;
  transform: translateX(-50%);
}

.radar-frame-time {
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.radar-frame-time.radar-frame-forecast {
  color: var(--accent-amber, #ffb74d);
}

.radar-time {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}



@media (max-width: 600px) {
  .radar-section { padding: 12px; }
  .radar-map { height: min(350px, 55vh); }
  .radar-timeline { gap: 8px; padding: 8px 0; }
  .radar-play-btn { width: 32px; height: 32px; }
  .radar-frame-time { font-size: 12px; min-width: 40px; }
  .radar-controls { flex-direction: column; align-items: flex-start; }
  .radar-legend-bar, .radar-legend-labels { width: 140px; }
}

/* ===== Pollen ===== */
.pollen-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

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

.pollen-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.2s;
}

.pollen-card:hover {
  background: rgba(255,255,255,0.06);
}

.pollen-chart {
  display: flex;
  gap: 0;
  padding: 8px 20px;
}

.pollen-chart-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 2px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .pollen-chart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--ring-track) transparent;
  }
  .pollen-chart-bar {
    flex: none;
    min-width: 40px;
  }
}

.pollen-gauge {
  position: relative;
  width: 64px;
  height: 64px;
}

.pollen-gauge > svg {
  transform: rotate(-90deg);
}

.pollen-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pollen-gauge-icon {
  font-size: 20px;
}

.pollen-gauge-val {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.pollen-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.pollen-level {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Air Quality Bar ===== */
.aqi-bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #4caf50, #ffeb3b, #ff9800, #f44336, #9c27b0);
  position: relative;
  margin-top: 12px;
}

.aqi-marker {
  position: absolute;
  top: -3px;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  border: 2px solid var(--bg-dark);
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(255,255,255,0.5);
}

/* ===== No Location ===== */
.no-location {
  text-align: center;
  padding: 80px 20px;
}

.no-location svg {
  width: 80px;
  height: 80px;
  color: var(--accent-cyan);
  opacity: 0.3;
  margin-bottom: 20px;
}

.no-location h2 {
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
}

.no-location p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.modal-overlay.active { display: flex; }

.modal {
  background: #151938;
  border-radius: var(--radius);
  width: 90%;
  max-width: 460px;
  /* dvh: auf iOS/Android schrumpft die Höhe nicht mit der ein-/ausfahrenden
     URL-Leiste weg. vh bleibt als Fallback für ältere Browser. */
  max-height: 80vh;
  max-height: 80dvh;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.modal:focus-visible { outline: none; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(80vh - 70px);
  max-height: calc(80dvh - 70px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.28);
  background-clip: padding-box;
  border: 2px solid transparent;
}

[data-theme="light"] .modal-body {
  scrollbar-color: rgba(0,0,0,0.22) transparent;
}

[data-theme="light"] .modal-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  background-clip: padding-box;
  border: 2px solid transparent;
}

[data-theme="light"] .modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.32);
  background-clip: padding-box;
  border: 2px solid transparent;
}

.modal-search {
  position: relative;
  margin-bottom: 16px;
}

.modal-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xs);
  font-size: 14px;
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.modal-search input::placeholder {
  color: var(--text-muted);
}

.modal-search input:focus {
  border-color: var(--accent-cyan);
}

.modal-search .search-results {
  min-width: 100%;
}

.saved-locations {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-location {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid rgba(255,255,255,0.04);
  -webkit-touch-callout: none;
}

.saved-location:hover {
  background: rgba(79, 195, 247, 0.08);
  border-color: rgba(79, 195, 247, 0.15);
}

.saved-location-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.saved-location-info svg {
  color: var(--accent-cyan);
}

.saved-location-name {
  font-size: 14px;
  font-weight: 500;
}

.saved-location-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 18px;
  border-radius: 6px;
  transition: all 0.15s;
}

.saved-location-delete:hover {
  background: rgba(255, 82, 82, 0.15);
  color: var(--accent-red);
}

.saved-location-delete:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 1px;
}

/* Fingerfreundliche Ziele: 44px ist die Mindestgröße auf Touch-Geräten */
@media (pointer: coarse) {
  .saved-location-delete,
  .modal-close {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .saved-location-delete { margin: -10px -8px -10px 0; }
  .location-chip .remove { padding: 10px 6px; margin: -10px -2px; }
}

/* ===== Horizontal scrollbare Leisten: Verlauf + Pfeile ===== */
.hscroll {
  position: relative;
  min-width: 0;
  --hscroll-fade: 58px;
}

/* Der Verlauf blendet den Inhalt aus statt eine Hintergrundfarbe darüberzulegen
   — dadurch stimmt er in Dark und Light automatisch. */
.hscroll.can-next > .tabs,
.hscroll.can-next > .location-chips,
.hscroll.can-next > .day-nav,
.hscroll.can-next > .hourly-scroll,
.hscroll.can-next > .pollen-chart {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--hscroll-fade)), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - var(--hscroll-fade)), transparent 100%);
}

.hscroll.can-prev > .tabs,
.hscroll.can-prev > .location-chips,
.hscroll.can-prev > .day-nav,
.hscroll.can-prev > .hourly-scroll,
.hscroll.can-prev > .pollen-chart {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--hscroll-fade));
  mask-image: linear-gradient(to right, transparent 0, #000 var(--hscroll-fade));
}

.hscroll.can-prev.can-next > .tabs,
.hscroll.can-prev.can-next > .location-chips,
.hscroll.can-prev.can-next > .day-nav,
.hscroll.can-prev.can-next > .hourly-scroll,
.hscroll.can-prev.can-next > .pollen-chart {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--hscroll-fade), #000 calc(100% - var(--hscroll-fade)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--hscroll-fade), #000 calc(100% - var(--hscroll-fade)), transparent 100%);
}

.hscroll-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 2;
  transition: color 0.15s;
}

.hscroll-arrow.prev { left: 0; justify-content: flex-start; }
.hscroll-arrow.next { right: 0; justify-content: flex-end; }
.hscroll-arrow:hover { color: var(--text-primary); }
.hscroll.can-prev > .hscroll-arrow.prev,
.hscroll.can-next > .hscroll-arrow.next { display: flex; }

/* Die Tagesleiste sitzt bündig am Rand — dort etwas mehr Platz für den Pfeil */
.hscroll > .day-nav ~ .hscroll-arrow { width: 26px; }

@media (pointer: coarse) {
  /* Auf Touch ist der Pfeil vor allem Hinweis, kein Bedienelement — er darf
     die Leiste darunter nicht großflächig blockieren. */
  .hscroll-arrow { width: 26px; }
}

/* ===== Undo-Snackbar ===== */
.undo-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(92vw, 420px);
  padding: 11px 12px 11px 18px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  z-index: 3000;
  animation: undoToastIn 0.25s ease;
}

.undo-toast-msg {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.undo-toast-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}

.undo-toast-btn:hover { background: rgba(79, 195, 247, 0.12); }
.undo-toast-btn:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 1px; }

@media (pointer: coarse) {
  .undo-toast-btn { min-height: 44px; padding: 8px 14px; }
}

@keyframes undoToastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .undo-toast { animation: none; }
}

[data-theme="light"] .undo-toast {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 20px;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: var(--accent-cyan);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.footer-links a:hover { opacity: 1; }

.footer-sep {
  margin: 0 8px;
  opacity: 0.3;
}

/* Embed Generator */
.embed-gen-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 14px 0 6px;
}

.embed-gen-row {
  display: flex;
  gap: 8px;
}

.embed-gen-input {
  flex: 1;
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.embed-gen-input:focus {
  border-color: var(--accent-cyan);
}

.embed-gen-btn {
  padding: 9px 14px;
  background: rgba(79,195,247,0.1);
  border: 1px solid rgba(79,195,247,0.2);
  border-radius: 8px;
  color: var(--accent-cyan);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.embed-gen-btn:hover {
  background: rgba(79,195,247,0.2);
}

.embed-gen-preview {
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 12px;
  min-height: 80px;
  border: 1px solid rgba(255,255,255,0.04);
}

.embed-gen-preview iframe {
  border: none;
  border-radius: 8px;
  display: block;
}

.embed-gen-code-wrap {
  position: relative;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 10px 40px 10px 12px;
  border: 1px solid rgba(255,255,255,0.06);
}

.embed-gen-code {
  display: block;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: var(--accent-cyan);
  word-break: break-all;
  white-space: pre-wrap;
}

.embed-gen-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s;
}

.embed-gen-copy:hover {
  color: var(--accent-cyan);
  background: rgba(79,195,247,0.1);
}

/* ===== RSS Feeds Modal ===== */
.rss-feed-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.rss-feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.rss-feed-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255,152,0,0.12);
  color: #ff9800;
  flex-shrink: 0;
}
.rss-feed-meta { flex: 1; min-width: 0; }
.rss-feed-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.rss-feed-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.rss-feed-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.15s;
  flex-shrink: 0;
}
.rss-feed-open:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(79,195,247,0.08);
}
[data-theme="light"] .rss-feed-item { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .rss-feed-open { border-color: rgba(0,0,0,0.1); }

/* ===== Gefühlte Temperatur ===== */
.temp-main-precip {
  position: relative;
  z-index: 5;
  font-size: 13px;
  color: #4FC3F7;
  margin-top: 2px;
}
.temp-main-feels {
  position: relative;
  z-index: 5;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
  opacity: 0.7;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* ===== Last Update Timestamp ===== */
.last-update {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  padding-right: 4px;
}

/* ===== Precipitation Probability Badge ===== */
.hourly-prob {
  font-size: 10px;
  color: var(--accent-blue);
  font-weight: 500;
  opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-top {
    flex-wrap: wrap;
    gap: 10px;
  }

  .location-bar {
    width: 100%;
    order: 2;
  }

  .search-wrapper { flex: 1; }
  .search-wrapper input { width: 100%; }
  .search-wrapper input:focus { width: 100%; }

  .widget-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .temp-main-value {
    font-size: 60px;
  }

  .widget-value {
    font-size: 32px;
  }

  .daily-item {
    grid-template-columns: 80px 28px 1fr 40px 40px;
    gap: 6px;
    padding: 10px 4px;
  }

  .tab {
    padding: 8px 12px;
    font-size: 12px;
  }

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

@media (max-width: 480px) {
  .widget-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .widget { padding: 14px; border-radius: 18px; }
  .widget-temp-main { padding: 20px; }
  .pollen-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Temperature Graph ===== */
/* Full width of the hourly-scroll container (edge to edge, up to the scroll
   arrows). SVG overflow: visible so min/max labels past the edges stay visible. */
.temp-graph { width: 100%; margin-top: 8px; }
.temp-graph svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ===== Animated Widget Transitions ===== */
.widget-grid { transition: opacity 0.2s; }
#heuteGauges.updating { opacity: 0.6; }

/* ===== Theme Toggle Button ===== */
.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); }
[data-theme="light"] .theme-toggle { border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .theme-toggle:hover { background: rgba(0,0,0,0.05); }
.theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: block; }

/* ===== Light Theme ===== */
[data-theme="light"] {
  --bg-dark: #f0f4f8;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --accent-blue: #1976d2;
  --accent-cyan: #0288d1;
  --accent-green: #2e7d32;
  --accent-orange: #ef6c00;
  --accent-red: #c62828;
  --accent-purple: #7b1fa2;
  --text-primary: #1a1a2e;
  --text-secondary: rgba(26,26,46,0.7);
  --text-muted: rgba(26,26,46,0.4);
  --ring-bg: rgba(0,0,0,0.04);
  --ring-track: rgba(0,0,0,0.08);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 12px rgba(25,118,210,0.1);
}

[data-theme="light"] body {
  background: #f0f4f8;
  background-image: none;
}

[data-theme="light"] .header {
  background: rgba(255,255,255,0.9);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

[data-theme="light"] .tab.active { color: var(--accent-cyan); }
[data-theme="light"] .tab.active::after { background: var(--accent-cyan); box-shadow: none; }
[data-theme="light"] .search-wrapper input { background: rgba(0,0,0,0.05); color: var(--text-primary); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .search-wrapper input::placeholder { color: var(--text-muted); }
[data-theme="light"] .search-results { background: white; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .search-result-item { color: var(--text-secondary); }
[data-theme="light"] .search-result-item:hover { background: #e3f2fd; }
[data-theme="light"] .location-chip { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.08); color: var(--text-primary); }
[data-theme="light"] .location-chip.active { background: rgba(25,118,210,0.1); border-color: var(--accent-cyan); color: var(--accent-cyan); }
[data-theme="light"] .current-location { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.08); color: var(--text-primary); }
[data-theme="light"] .btn-add-location { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.08); color: var(--text-primary); }
[data-theme="light"] .modal { background: white; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .modal-header { border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .modal-search input { background: #f5f5f5; border-color: rgba(0,0,0,0.1); color: var(--text-primary); }
[data-theme="light"] .saved-location { background: #f5f5f5; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .footer { border-color: rgba(0,0,0,0.06); }

/* Light mode: main temp widget — force dark blue background */
[data-theme="light"] .widget.widget-temp-main {
  background: linear-gradient(135deg, #1565c0, #2196f3) !important;
  color: #fff !important;
}
[data-theme="light"] .widget-temp-main .temp-main-value,
[data-theme="light"] .widget-temp-main .temp-main-condition,
[data-theme="light"] .widget-temp-main .temp-main-range,
[data-theme="light"] .widget-temp-main .temp-main-feels {
  color: #fff !important;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}
[data-theme="light"] .widget-temp-main .temp-main-value sup { color: rgba(255,255,255,0.7) !important; }
[data-theme="light"] .weather-scene::after {
  background: linear-gradient(to top, #1565c0, transparent) !important;
}
[data-theme="light"] .widget {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="light"] .widget:hover,
[data-theme="light"] .hourly-section:hover,
[data-theme="light"] .daily-section:hover,
[data-theme="light"] .timeline-section:hover,
[data-theme="light"] .tip-bar:hover,
[data-theme="light"] .radar-section:hover,
[data-theme="light"] .pollen-section:hover {
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
[data-theme="light"] .widget-label { color: var(--text-muted); }
[data-theme="light"] .gauge-center-value { color: var(--text-primary); }
[data-theme="light"] .gauge-center-unit { color: var(--text-secondary); }
[data-theme="light"] .gauge-center-label { color: var(--text-secondary); }
[data-theme="light"] .hourly-section {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .hourly-scroll:not(.has-selection) .hourly-item.now {
  background: rgba(25,118,210,0.1);
  border-color: rgba(25,118,210,0.2);
}
[data-theme="light"] .hourly-item.selected {
  background: rgba(25,118,210,0.12);
  border-color: rgba(25,118,210,0.25);
}
[data-theme="light"] .daily-section {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .daily-item:hover { background: rgba(25,118,210,0.04); }
[data-theme="light"] .daily-item { border-color: rgba(0,0,0,0.04); }
[data-theme="light"] .comp-grid {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .comp-header { border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .comp-card-main { border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .comp-side:first-child { border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .comp-row { border-color: rgba(0,0,0,0.03); }
[data-theme="light"] .comp-select { background: #f5f5f5; color: var(--text-primary); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .alert-banner.minor { background: rgba(255,235,59,0.15); color: #8d6e00; }
[data-theme="light"] .alert-banner.moderate { background: rgba(255,152,0,0.15); color: #bf5600; }
[data-theme="light"] .alert-banner.severe { background: rgba(244,67,54,0.15); color: #b71c1c; }
[data-theme="light"] .pollen-section,
[data-theme="light"] .radar-section {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .pollen-card { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.04); }
[data-theme="light"] .temp-graph svg text { fill: var(--text-primary); }
[data-theme="light"] .hd-item { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.04); }
[data-theme="light"] .weekend-card {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .day-item.active { background: rgba(25,118,210,0.1); color: var(--accent-cyan); }
[data-theme="light"] .radar-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); color: var(--text-secondary); }
[data-theme="light"] .radar-btn.active { background: rgba(25,118,210,0.1); border-color: var(--accent-cyan); color: var(--accent-cyan); }
[data-theme="light"] .radar-map { background: rgba(0,0,0,0.03); }
[data-theme="light"] .radar-map .leaflet-control-zoom a { background: #fff; color: #333; border-color: rgba(0,0,0,0.1); }

/* ===== Alert Banners ===== */
.alert-banner {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid;
}
.alert-banner.severe { background: rgba(244,67,54,0.12); border-color: rgba(244,67,54,0.3); color: #ff8a80; }
.alert-banner.moderate { background: rgba(255,152,0,0.12); border-color: rgba(255,152,0,0.3); color: #ffcc80; }
.alert-banner.minor { background: rgba(255,235,59,0.12); border-color: rgba(255,235,59,0.3); color: #fff9c4; }
.alert-icon { font-size: 20px; flex-shrink: 0; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; font-size: 14px; }
.alert-desc { font-size: 12px; opacity: 0.8; margin-top: 4px; }
.alert-time { font-size: 11px; opacity: 0.5; margin-top: 4px; }
.alert-close { background: none; border: none; color: inherit; opacity: 0.5; cursor: pointer; font-size: 18px; padding: 0 4px; }
.alert-close:hover { opacity: 1; }

/* ===== Air Quality Details ===== */
.aqi-details { display: flex; gap: 8px; justify-content: center; margin-top: 6px; font-size: 11px; color: var(--text-muted); }

/* ===== Yesterday Link ===== */
.yesterday-link {
  font-size: 11px;
  color: var(--accent-cyan);
  text-decoration: none;
  opacity: 0.6;
  margin-left: 8px;
  transition: opacity 0.2s;
}
.yesterday-link:hover { opacity: 1; }

/* ===== Vergleich ===== */
.comp-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.comp-city-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.comp-vs {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.comp-select {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.comp-select:focus { border-color: var(--accent-cyan); }

.comp-grid {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.comp-header {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.comp-card-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.comp-side {
  padding: 24px 20px;
  text-align: center;
}

.comp-side:first-child {
  border-right: 1px solid rgba(255,255,255,0.06);
}

.comp-icon .wi { width: 48px; height: 48px; }

.comp-temp {
  font-size: 42px;
  font-weight: 200;
  margin: 8px 0 4px;
}

.comp-cond {
  font-size: 13px;
  color: var(--text-secondary);
}

.comp-table {
  padding: 8px 0;
}

.comp-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  padding: 10px 20px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.comp-row:last-child { border-bottom: none; }

.comp-label {
  color: var(--text-muted);
  font-size: 13px;
}

.comp-row span:not(.comp-label) {
  text-align: center;
  font-weight: 500;
}

.comp-better { color: var(--accent-green); }
.comp-worse { color: var(--accent-red); opacity: 0.7; }

@media (max-width: 600px) {
  .comp-header, .comp-row {
    grid-template-columns: 100px 1fr 1fr;
    padding: 8px 12px;
  }
  .comp-temp { font-size: 32px; }
}

/* ===== Clothing Recommendation ===== */
.widget-full { grid-column: 1 / -1; }
.tip-card { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.tip-icon { flex-shrink: 0; display: flex; align-items: center; }
.tip-icon .tip-svg { width: 28px; height: 28px; }
.tip-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-top: 10px;
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.04);
}
.tip-content { display: flex; flex-direction: column; gap: 2px; }
.tip-text { font-size: 13px; color: var(--text-secondary); }
.tip-summary { font-size: 12px; color: var(--text-muted); }
[data-theme="light"] .tip-bar { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.04); }

/* ===== Daily Summary ===== */
.daily-summary {
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: 12px;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,0.04);
}
[data-theme="light"] .daily-summary { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.04); }

/* ===== Skeleton Loading ===== */
.skeleton {
  background: var(--bg-card);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skeleton-grid { display: flex; flex-direction: column; gap: 14px; width: 100%; padding: 0; }
.loading:has(.skeleton-grid) { padding: 14px 0; align-items: stretch; }
.skeleton-scene { height: 280px; }
.skeleton-hourly { height: 120px; }
.skeleton-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.skeleton-widget { height: 180px; }
[data-theme="light"] .skeleton { background: rgba(0,0,0,0.06); }
[data-theme="light"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent); }

/* ===== Favorite Button ===== */
.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}
.fav-btn .fav-star { color: var(--text-muted); transition: all 0.2s; }
.fav-btn:hover .fav-star { color: #FFD93D; }
.fav-btn.is-fav .fav-star { color: #FFD93D; fill: #FFD93D; }

/* ===== Timeline ===== */
.timeline-section { background: var(--bg-card); border-radius: var(--radius); padding: 20px; margin-top: 14px; border: 1px solid rgba(255,255,255,0.06); }
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 14px; }
.timeline-dot-col { display: flex; flex-direction: column; align-items: center; width: 20px; flex-shrink: 0; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-cyan); border: 2px solid var(--bg-card); flex-shrink: 0; z-index: 1; }
.timeline-line { width: 2px; flex: 1; background: rgba(79,195,247,0.2); margin: 2px 0; }
.timeline-content { flex: 1; padding-bottom: 16px; }
.timeline-item:last-child .timeline-content { padding-bottom: 0; }
.timeline-time { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.timeline-period { font-weight: 400; color: var(--text-muted); font-size: 12px; margin-left: 6px; }
.timeline-weather { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.timeline-icon .wi { width: 28px; height: 28px; }
.timeline-temp { font-size: 20px; font-weight: 500; }
.timeline-cond { font-size: 13px; color: var(--text-secondary); }
.timeline-details { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
[data-theme="light"] .timeline-section { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .timeline-dot { border-color: rgba(255,255,255,0.85); }

/* ===== Weather Map Markers ===== */
.map-temp-marker { background: none; border: none; }
.map-marker-inner {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: Inter, sans-serif;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  white-space: nowrap;
  /* Das Icon hat keine feste Größe (iconSize: null) — Badge wächst mit dem
     Inhalt und wird hier über dem Ankerpunkt zentriert */
  display: inline-block;
  transform: translate(-50%, -50%);
}
.map-marker-name {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 1px;
  line-height: 1;
  /* Notbremse für extrem lange Namen: Pille wächst bis 160px, danach Ellipsis */
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-marker-inner.fav { border-color: #FFD93D; box-shadow: 0 0 12px rgba(255,217,61,0.4), 0 2px 8px rgba(0,0,0,0.3); font-size: 15px; }
.map-fav-star { color: #FFD93D; font-size: 12px; }
.map-marker-rain { font-size: 11px; opacity: 0.7; color: #4FC3F7; margin-left: 3px; }
.map-dist-tooltip {
  background: rgba(30,36,72,0.9) !important;
  color: #4FC3F7 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  font-family: Inter, sans-serif !important;
  padding: 2px 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(79,195,247,0.2) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
  white-space: nowrap !important;
}
.map-dist-tooltip::before { display: none !important; }
[data-theme="light"] .map-dist-tooltip { background: rgba(255,255,255,0.92) !important; color: #1565c0 !important; border-color: rgba(25,118,210,0.2) !important; box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important; }
.map-marker-inner.cold { background: #1565c0; color: #fff; border-color: #4FC3F7; }
.map-marker-inner.cold .map-marker-rain { color: #90caf9; }
.map-marker-inner.cold.fav { border-color: #FFD93D; }
.map-marker-inner.hot { background: #e65100; color: #fff; border-color: #ff9800; }
.map-marker-inner.mild { background: var(--bg-card); border-color: rgba(79,195,247,0.3); }
[data-theme="light"] .map-marker-inner { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
[data-theme="light"] .map-marker-inner.mild { background: #fff; border-color: rgba(25,118,210,0.2); color: #333; }

/* ===== Leaflet Popup Theme ===== */
.leaflet-popup-content-wrapper { background: var(--bg-card) !important; color: var(--text-primary) !important; border-radius: 12px !important; box-shadow: var(--shadow-card) !important; }
.leaflet-popup-tip { background: var(--bg-card) !important; }
[data-theme="light"] .leaflet-popup-content-wrapper { background: #fff !important; color: #333 !important; }
[data-theme="light"] .leaflet-popup-tip { background: #fff !important; }

/* ===== Notification Bell ===== */
.notif-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s;
}
.notif-btn:hover { background: rgba(255,255,255,0.1); }
.notif-btn.active { color: var(--accent-cyan); border-color: var(--accent-cyan); }
.notif-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  border: 2px solid var(--bg-dark);
}
[data-theme="light"] .notif-btn { border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .notif-btn:hover { background: rgba(0,0,0,0.05); }
