html, body { height: 100%; margin: 0; font-family: system-ui, sans-serif; }
#map { position: absolute; inset: 0; z-index: 1; }

#panel {
  position: absolute; top: 12px; right: 12px; z-index: 1000;
  width: 300px; max-height: calc(100% - 24px); overflow-y: auto;
  background: rgba(255,255,255,0.95); border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25); padding: 12px 14px;
}
#panel h1 { font-size: 16px; margin: 0 0 8px; color: #C1502C; letter-spacing: .2px; }
.block { margin: 10px 0; padding-top: 8px; border-top: 1px solid #eee; }
.block:first-of-type { border-top: none; }
#wxday { width: 100%; }
.hint { font-size: 11px; color: #666; margin-top: 4px; }
#layers label { display: flex; align-items: center; gap: 7px; font-size: 13px; margin: 5px 0; cursor: pointer; }
#layers .lay-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid;
  font-size: 14px; flex: none;
}
#layers .lay-txt { flex: 1; }
#layers .lay-cnt { font-size: 11px; color: #888; font-variant-numeric: tabular-nums; }
#layers label.off { opacity: 0.45; }
#layers label.off .lay-ico { filter: grayscale(1); }

/* Piktogramm-Pin auf der Karte: farbiger Tropfen, Emoji aufrecht */
.pin-wrap { background: none; border: none; }
.pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); transform-origin: center;
  border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
}
.pin span { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.leaflet-popup-content { font-size: 13px; line-height: 1.4; }
.leaflet-popup-content .pik { font-size: 16px; }
.wx-line { font-size: 12px; }

/* Popup-Kontaktzeilen (Adresse/Telefon/Webseite) */
.pp-contact { margin-top: 5px; padding-top: 5px; border-top: 1px solid #eee; }
.pp-row { font-size: 12px; color: #444; margin: 2px 0; }
.pp-row a { color: #C1502C; text-decoration: none; }
.pp-row a:hover { text-decoration: underline; }
.pp-src { margin-top: 5px; font-size: 11px; color: #888; }
.pp-src a { color: #C1502C; text-decoration: none; }
.pp-src a:hover { text-decoration: underline; }
#layers .lay-src { font-size: 11px; color: #888; margin: -2px 0 5px 34px; }
#layers .lay-src a { color: #C1502C; text-decoration: none; }
#layers .lay-src a:hover { text-decoration: underline; }

/* Wetter-Modus-Chips (Legende als Filter) */
.chips { display: flex; gap: 6px; margin: 6px 0 4px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 12px; padding: 4px 9px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid #d8b8ac; background: #fff; color: #7a4a37;
}
.chip.on { background: #D0663F; border-color: #D0663F; color: #fff; }
.wx-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 6px; cursor: pointer; }
.wx-legend.hidden { display: none; }

/* gestreute Wetter-Piktogramme auf der Karte */
.wx-emoji { font-size: 15px; line-height: 1; text-align: center;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff; pointer-events: none; }

/* Großwetterlage-Overlay: weiche Verläufe (Blur überdeckt die Rasterkanten) */
.wx-overlay-img { filter: blur(6px); image-rendering: auto; pointer-events: none; }

/* Großwetterlage-Legende */
.wx-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-size: 11px; color: #555; }
.wx-legend span { display: inline-flex; align-items: center; gap: 4px; }
.wx-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

/* Mobile-Drawer-Button (nur Handy sichtbar) */
#panel-toggle {
  position: absolute; z-index: 1001; display: none;
  bottom: 16px; right: 16px; padding: 12px 16px; border: none; border-radius: 24px;
  background: #D0663F; color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35); cursor: pointer;
}

/* Handy: Karte dominiert, Panel als Bottom-Sheet ausklappbar */
@media (max-width: 640px) {
  #panel-toggle { display: block; }
  #panel {
    top: auto; right: 0; left: 0; bottom: 0; width: auto;
    max-height: 62vh; border-radius: 16px 16px 0 0;
    transform: translateY(100%); transition: transform 0.25s ease;
    padding-bottom: 20px;
  }
  body.panel-open #panel { transform: translateY(0); }
  body.panel-open #panel-toggle { background: #8F3A1E; }
  /* Basemap-Umschalter auf dem Handy eingeklappt lassen (Leaflet-eigenes Toggle) */
  .leaflet-control-layers { font-size: 13px; }
}
