:root {
  --bg-deep: #18132c;
  --bg-card: #241d41;
  --bg-card-light: #2f2654;
  --bg-surface: #3b3068;
  --text-main: #ffffff;
  --text-muted: #d4cce8;
  --pumpkin: #ff7b25;
  --pumpkin-hover: #ff944d;
  --gold: #ffd166;
  --green-ok: #2ec4b6;
  --yellow-low: #f9c74f;
  --red-empty: #ef476f;
  --border-soft: rgba(255, 255, 255, 0.16);
  --shadow-lg: 0 12px 32px rgba(7, 4, 18, 0.45);
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 20% 0%, #2d2258 0%, var(--bg-deep) 70%);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 16px;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* =====================================================================
   KOPFZEILE & HAUPT-TABS (4 KLARE BILDSCHIRME)
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(24, 19, 44, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  font-size: 2.2rem;
}

.brand-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-sub {
  display: block;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-tab {
  background: var(--bg-card-light);
  color: var(--text-main);
  border: 2px solid transparent;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-tab:hover {
  border-color: var(--gold);
  background: var(--bg-surface);
}

.nav-tab.active {
  background: var(--pumpkin);
  color: #fff;
  border-color: var(--pumpkin);
  box-shadow: 0 4px 14px rgba(255, 123, 37, 0.4);
}

.nav-tab-wish {
  border: 2px dashed rgba(255, 209, 102, 0.55);
  color: var(--gold);
}

/* =====================================================================
   ALLGEMEINE BUTTONS & BEDIENELEMENTE (GROSS & GUT LESBAR)
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--pumpkin);
  color: #fff;
}
.btn-primary:hover {
  background: var(--pumpkin-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}
.btn-secondary:hover {
  background: #4a3c82;
}

.btn-gold {
  background: var(--gold);
  color: #18132c;
  font-weight: 700;
}
.btn-gold:hover {
  background: #ffe08a;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.92rem;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 1.08rem;
}

.btn-block {
  width: 100%;
}

.btn-link {
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
}

/* =====================================================================
   BILDSCHIRM-CONTAINER (JEWEILS 1 KLARER BEREICH)
   ===================================================================== */
.screen-view {
  padding: 18px 0 28px;
}

/* Obere kompakte Steuerleiste auf Bildschirm 1 */
.home-email-quickbar {
  background: linear-gradient(135deg, rgba(47, 38, 84, 0.96), rgba(36, 29, 65, 0.96));
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 209, 102, 0.14);
}

.home-email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.home-email-badge,
.home-email-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-email-icon {
  font-size: 1.55rem;
  line-height: 1;
}

.home-email-badge strong,
.home-email-label .home-email-badge {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255, 209, 102, 0.14);
  border: 1px solid rgba(255, 209, 102, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
}

.home-email-badge span,
.home-email-label span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.home-email-input-wrap,
.home-email-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 260px;
  max-width: 520px;
}

.home-email-input-wrap input,
.home-email-input-group input {
  flex: 1;
  padding: 9px 14px;
  font-size: 0.92rem;
  border-color: rgba(255, 209, 102, 0.45);
}

.home-email-options {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 209, 102, 0.38);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.home-email-options-label,
.home-email-options-hint {
  font-size: 0.86rem;
  font-weight: 800;
  color: #72efdd;
}

.home-email-action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.top-control-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.control-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--gold);
  min-width: 210px;
}

.district-tabs,
.preset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.district-tab,
.preset-pill {
  background: var(--bg-card-light);
  color: var(--text-main);
  border: 1.5px solid var(--border-soft);
  padding: 8px 15px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.district-tab:hover,
.preset-pill:hover {
  border-color: var(--gold);
}

.district-tab.active {
  background: var(--pumpkin);
  border-color: var(--pumpkin);
  color: #fff;
}

.district-tab-wish {
  background: transparent;
  border: 1.5px dashed var(--gold);
  color: var(--gold);
}

.preset-pill.active {
  background: rgba(255, 209, 102, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

/* =====================================================================
   BILDSCHIRM 1: KARTE LINKS + LAUFPLAN RECHTS (OHNE LANGES SCROLLEN)
   ===================================================================== */
.map-screen-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.map-card,
.route-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.map-card-Bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.view-mode-switch {
  display: flex;
  background: var(--bg-deep);
  padding: 4px;
  border-radius: 999px;
  gap: 4px;
}

.sub-switch {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  cursor: pointer;
}

.sub-switch.active {
  background: var(--pumpkin);
  color: #fff;
}

.simple-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.simple-filter input {
  width: 18px;
  height: 18px;
  accent-color: var(--pumpkin);
}

/* Moderne Toggle-Pills (Nextdoor & Teal Pumpkin Stil) */
.simple-filter.filter-pill {
  background: var(--bg-deep);
  border: 1.5px solid var(--border-soft);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  gap: 6px;
  transition: all 0.16s ease;
  user-select: none;
}

.simple-filter.filter-pill:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.simple-filter.filter-pill input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 0;
  height: 0;
  margin: 0;
  position: absolute;
  opacity: 0;
}

.simple-filter.filter-pill-fav:has(input:checked) {
  background: rgba(255, 209, 102, 0.22);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.35);
}

.simple-filter.filter-pill-toddler:has(input:checked) {
  background: rgba(255, 123, 37, 0.25);
  border-color: var(--pumpkin);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 123, 37, 0.38);
}

.simple-filter.filter-pill-allergy:has(input:checked) {
  background: rgba(46, 196, 182, 0.25);
  border-color: var(--green-ok);
  color: #72efdd;
  box-shadow: 0 0 12px rgba(46, 196, 182, 0.42);
}

.map-canvas {
  width: 100%;
  height: 490px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* DSGVO-konforme "Cozy Halloween Night"-Straßenkarte auf OpenStreetMap-Basis
   (gilt nur für #halloweenMap & #pickerMap, NICHT für #printLeafletMap im Papierdruck!) */
#halloweenMap,
#pickerMap {
  background: #120e24;
  box-shadow: inset 0 0 26px rgba(10, 7, 22, 0.72);
}

#halloweenMap:not(.map-day-mode):not(.map-treasure-mode) .leaflet-tile-pane,
#pickerMap .leaflet-tile-pane {
  filter: invert(100%) hue-rotate(195deg) brightness(88%) contrast(96%) saturate(130%);
  transition: filter 0.3s ease;
}

/* Warmer Pergament-Schatzkarten-Modus (Idee 3) */
#halloweenMap.map-treasure-mode .leaflet-tile-pane {
  filter: sepia(72%) hue-rotate(348deg) brightness(94%) contrast(106%) saturate(135%);
  transition: filter 0.3s ease;
}

.map-compass-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 56px;
  height: 56px;
  z-index: 500;
  pointer-events: none;
  background: radial-gradient(circle, rgba(24, 19, 44, 0.88) 0%, rgba(24, 19, 44, 0.45) 75%, transparent 100%);
  border-radius: 50%;
  padding: 3px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
}

#halloweenMap .leaflet-bar a,
#pickerMap .leaflet-bar a {
  background-color: rgba(36, 29, 65, 0.94);
  color: var(--gold);
  border-color: var(--border-soft);
}

#halloweenMap .leaflet-bar a:hover,
#pickerMap .leaflet-bar a:hover {
  background-color: var(--pumpkin);
  color: #fff;
}

#halloweenMap .leaflet-control-attribution {
  background: rgba(24, 19, 44, 0.8) !important;
  color: var(--text-muted) !important;
  border-radius: 8px 0 0 0;
  font-size: 0.72rem;
}

#halloweenMap .leaflet-control-attribution a {
  color: var(--gold) !important;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 10px 6px 2px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.legend-hint {
  margin-left: auto;
  color: var(--gold);
  font-weight: 700;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.dot-plenty { background: var(--green-ok); }
.dot-low { background: var(--yellow-low); }
.dot-route { background: var(--pumpkin); border: 2px solid var(--gold); }

/* Umschaltbare Häuser-Liste im Karten-Fenster */
.houses-scroll-container {
  height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.house-card {
  background: var(--bg-card-light);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.house-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.house-title-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.house-emoji {
  font-size: 1.8rem;
}

.house-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--gold);
}

.house-address {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.status-pill {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pill.plenty { background: rgba(46, 196, 182, 0.22); color: #72efdd; }
.status-pill.low { background: rgba(249, 199, 79, 0.22); color: var(--gold); }
.status-pill.empty { background: rgba(239, 71, 111, 0.22); color: #ff8fa3; }

.house-note {
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 10px;
}

.house-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-chip {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--text-muted);
}

.house-card-actions {
  display: flex;
  gap: 8px;
}

/* Rechte Seite: Aktiver Laufplan */
.route-box-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.route-badge {
  display: inline-block;
  background: rgba(255, 123, 37, 0.22);
  color: var(--pumpkin);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
}

.route-box-header h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin-top: 2px;
}

.route-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-card-light);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  text-align: center;
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.metric strong {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--gold);
}

.route-stops-list {
  flex: 1;
  max-height: 290px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding-right: 4px;
}

.route-stop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-light);
  border: 1px solid var(--border-soft);
  padding: 10px 12px;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.route-stop-item:hover {
  border-color: var(--gold);
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.route-stop-item:not(:last-child) .stop-number::after {
  content: '';
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 22px;
  border-left: 2px dashed rgba(255, 209, 102, 0.55);
  pointer-events: none;
}

.stop-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff944d, #e85d04);
  border: 2px solid var(--gold);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 10px rgba(255, 123, 37, 0.45);
}

.stop-details {
  flex: 1;
  min-width: 0;
}

.stop-details strong {
  display: block;
  font-size: 0.96rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-details span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.stop-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 4px 6px;
}
.stop-remove-btn:hover {
  color: var(--red-empty);
}

.route-export-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.quick-save-route-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.quick-save-route-bar input {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.fav-star-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--border-soft);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.fav-star-btn.is-fav {
  background: rgba(255, 209, 102, 0.22);
  border-color: var(--gold);
  color: var(--gold);
}

.family-section-box {
  background: var(--bg-card-light);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px;
}

.family-section-box h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.route-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Custom Leaflet Marker, Zoom-Cluster & Popup */
.halloween-cluster-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff9248, #e85d04);
  border: 3.5px solid #ffd166;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 0 4px rgba(255, 123, 37, 0.25);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  cursor: pointer;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  user-select: none;
}

.halloween-cluster-marker:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.75), 0 0 0 6px rgba(255, 209, 102, 0.38);
}

.halloween-cluster-marker.cluster-lg {
  width: 56px;
  height: 56px;
}

.halloween-cluster-marker.cluster-sm {
  width: 46px;
  height: 46px;
}

.halloween-cluster-marker.cluster-in-route {
  border-color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 0 5px rgba(255, 209, 102, 0.65);
}

.cluster-emoji {
  font-size: 1.05rem;
  line-height: 1;
}

.cluster-count {
  font-size: 1.18rem;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.cluster-route-badge {
  position: absolute;
  bottom: -7px;
  right: -7px;
  background: var(--gold);
  color: #161229;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  border: 2px solid #161229;
  white-space: nowrap;
}

@keyframes routeStopPulse {
  0%, 100% {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7), 0 0 0 4px rgba(255, 209, 102, 0.35), 0 0 18px rgba(255, 123, 37, 0.75);
  }
  50% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 0 8px rgba(255, 209, 102, 0.16), 0 0 26px rgba(255, 209, 102, 0.95);
  }
}

@keyframes routeDashFlow {
  to {
    stroke-dashoffset: -36;
  }
}

.route-glow-outer {
  filter: blur(2.5px);
}

.route-line-animated {
  animation: routeDashFlow 1.8s linear infinite;
  filter: drop-shadow(0 0 5px rgba(255, 209, 102, 0.8));
}

.halloween-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #322756, #1a1430);
  border: 3px solid var(--green-ok);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.7), 0 0 14px rgba(46, 196, 182, 0.45);
  font-size: 1.45rem;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.halloween-marker:hover {
  transform: scale(1.14) translateY(-2px);
}

.halloween-marker.has-allergy-safe {
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.7), 0 0 0 3px rgba(46, 196, 182, 0.32), 0 0 16px rgba(46, 196, 182, 0.65);
}

.halloween-marker.status-low {
  border-color: var(--yellow-low);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.7), 0 0 14px rgba(249, 199, 79, 0.45);
}
.halloween-marker.status-empty {
  border-color: var(--red-empty);
  box-shadow: none;
  opacity: 0.55;
}
.halloween-marker.in-route {
  border-color: var(--gold);
  background: radial-gradient(circle at 30% 30%, #ff944d, #e85d04);
  transform: scale(1.12);
  animation: routeStopPulse 2.4s infinite ease-in-out;
  z-index: 600 !important;
}

.marker-fav-star {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #161229;
  border: 1.5px solid var(--gold);
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.route-step-bubble {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: #161229;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #161229;
}

.leaflet-popup-content-wrapper {
  background: #231b3f;
  color: var(--text-main);
  border: 2px solid var(--pumpkin);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65);
}
.leaflet-popup-tip { background: var(--pumpkin); }
.leaflet-container a.leaflet-popup-close-button {
  color: var(--gold) !important;
  font-size: 1.2rem !important;
  padding: 6px 8px 0 0 !important;
}
.popup-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.popup-spook-badge {
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 999px;
}
.popup-card h4 {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  color: var(--gold);
  margin-bottom: 4px;
}
.popup-meta {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.popup-note-box {
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.26);
  border-left: 3px solid var(--gold);
  padding: 7px 10px;
  border-radius: 6px 10px 10px 6px;
  margin-bottom: 8px;
  font-style: italic;
}
.popup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.popup-tag {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
}
.popup-tag-teal,
.tag-chip-teal {
  background: rgba(46, 196, 182, 0.22) !important;
  border: 1px solid rgba(46, 196, 182, 0.55);
  color: #72efdd !important;
  font-weight: 700;
}
.hof-zauber-chip {
  background: rgba(255, 209, 102, 0.18) !important;
  border: 1px solid rgba(255, 209, 102, 0.55);
  color: var(--gold) !important;
  font-weight: 700;
}

/* Neutraler Startpunkt-Wähler, Rundkurs & Endziel-Pin (🚩 / 🔄 / 🏁) */
.start-point-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(46, 196, 182, 0.11);
  border: 1.5px dashed rgba(46, 196, 182, 0.55);
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 10px;
}
.start-point-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.start-point-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.start-point-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.start-point-info strong {
  display: block;
  font-size: 0.83rem;
  color: #72efdd;
}
.start-point-info span {
  display: block;
  font-size: 0.73rem;
  color: var(--text-muted);
}
.start-point-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.route-end-mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.end-mode-pill {
  background: var(--bg-deep);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 5px 6px;
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.end-mode-pill:hover {
  border-color: var(--gold);
  color: #fff;
}
.end-mode-pill.active {
  background: rgba(255, 209, 102, 0.22);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.28);
}
#halloweenMap.picking-start-mode {
  cursor: crosshair !important;
  outline: 3px dashed var(--green-ok);
}
.neutral-start-marker {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2ec4b6, #0f766e);
  border: 3px solid #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7), 0 0 16px rgba(46, 196, 182, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  position: relative;
  cursor: grab;
}
.neutral-start-marker.neutral-end-marker {
  background: radial-gradient(circle at 30% 30%, #ffd166, #d97706);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7), 0 0 16px rgba(255, 209, 102, 0.85);
}
.neutral-start-marker:active {
  cursor: grabbing;
}
.neutral-start-badge {
  position: absolute;
  bottom: -8px;
  background: #18132c;
  color: #72efdd;
  border: 1.5px solid #2ec4b6;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.neutral-start-badge.neutral-end-badge {
  color: var(--gold);
  border-color: var(--gold);
}

/* Sammel-Beutel-Fortschritt & Abhak-Buttons (Idee 1) */
.candy-bag-box {
  background: linear-gradient(135deg, rgba(47, 38, 84, 0.92), rgba(24, 19, 44, 0.92));
  border: 1.5px solid rgba(255, 209, 102, 0.45);
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 10px;
}
.candy-bag-top,
.candy-bag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  margin-bottom: 6px;
}
.candy-bag-subhint {
  margin-top: 5px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.candy-bag-rank {
  background: rgba(255, 123, 37, 0.22);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.76rem;
  padding: 2px 8px;
  border-radius: 999px;
}
.candy-bag-bar-track {
  height: 9px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.candy-bag-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pumpkin), var(--gold), var(--green-ok));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.stop-check-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}
.stop-check-btn:hover {
  border-color: var(--gold);
  transform: scale(1.08);
}
.stop-check-btn.is-checked {
  background: rgba(46, 196, 182, 0.25);
  border-color: var(--green-ok);
}
.route-stop-visited {
  border-color: rgba(46, 196, 182, 0.65) !important;
  background: rgba(46, 196, 182, 0.12) !important;
}
.route-stop-visited .stop-number {
  background: var(--green-ok);
  border-color: #fff;
  color: #161229;
}
.marker-visited-check {
  position: absolute;
  bottom: -7px;
  left: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-ok);
  color: #161229;
  font-weight: 900;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #161229;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.halloween-marker.is-visited-stop {
  border-color: var(--green-ok) !important;
}
.house-card {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.house-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 209, 102, 0.45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.house-card-in-route {
  border-left: 4px solid var(--gold);
}
.popup-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  background: var(--pumpkin);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* =====================================================================
   BILDSCHIRME 2, 3, 4: ZWEI-SPALTEN-LAYOUT AUF EINEM BILDSCHIRM
   ===================================================================== */
.dual-screen-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 820px;
  margin: 0 auto;
  gap: 22px;
  align-items: start;
}

.page-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.section-tag {
  display: inline-block;
  color: var(--gold);
  font-weight: 800;
  font-size: 0.84rem;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.page-card h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.card-sub {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  gap: 12px;
}
.two-cols { grid-template-columns: 1fr 1fr; }
.three-cols { grid-template-columns: 1fr 1fr 1.3fr; }

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="time"],
select {
  width: 100%;
  background: var(--bg-deep);
  border: 1.5px solid var(--border-soft);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.98rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--gold);
}

.address-lookup-row,
.manage-input-row {
  display: flex;
  gap: 8px;
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.picker-map-wrap {
  margin-bottom: 12px;
}

.picker-map {
  height: 155px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-grid label,
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-light);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-grid input,
.checkbox-inline input {
  width: 18px;
  height: 18px;
  accent-color: var(--pumpkin);
}

.result-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(46, 196, 182, 0.18);
  border: 1.5px solid var(--green-ok);
  font-size: 0.94rem;
}

/* Rechte Seite auf Bildschirm 2: Haus-Verwaltung */
.manage-lookup-box {
  background: var(--bg-card-light);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.manage-lookup-box label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.manage-panel {
  margin-bottom: 16px;
}

.host-info-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px;
}

.host-info-box h4 {
  font-family: var(--font-heading);
  color: var(--gold);
  margin-bottom: 8px;
}

.host-info-box ul {
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Bildschirm 3: E-Mail-Vorschau */
.nl-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.nl-preview-header select {
  width: auto;
}

.email-mock {
  background: #fffdf9;
  color: #231942;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

.email-mock-header {
  border-bottom: 2px solid #f3e8ee;
  padding-bottom: 8px;
  margin-bottom: 10px;
  font-size: 0.86rem;
  color: #5e548e;
}

.email-mock-body h4 {
  font-family: var(--font-heading);
  color: #d94e0f;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.email-mock-list {
  margin: 10px 0;
  padding-left: 18px;
  font-size: 0.9rem;
}

.nl-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Bildschirm 4: Stadtteil-Wunsch-Liste */
.wish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wish-item {
  background: var(--bg-card-light);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.wish-info {
  flex: 1;
}

.wish-title-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 6px;
}

.wish-bar-bg {
  height: 10px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
}

.wish-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pumpkin), var(--gold));
  border-radius: 999px;
}

/* =====================================================================
   PDF-SCHATZKARTE MODAL & DRUCK-STYLESHEET
   ===================================================================== */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px;
}

.pdf-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 6, 18, 0.85);
  backdrop-filter: blur(5px);
}

.pdf-modal-content {
  position: relative;
  z-index: 2001;
  width: 100%;
  max-width: 920px;
}

.pdf-modal-toolbar {
  background: var(--bg-card);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.pdf-modal-toolbar span {
  display: block;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.pdf-toolbar-buttons {
  display: flex;
  gap: 10px;
}

.printable-sheet {
  background: transparent;
  color: #1a162b;
  padding: 0;
  border: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Jede A4-Seite der Schatzkarte hat ihren EIGENEN, rundum geschlossenen Rahmen! */
.print-page-frame {
  background: #ffffff;
  color: #1a162b;
  border: 3px solid #ff7b25;
  border-radius: 16px;
  padding: 18px 22px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.print-page-continuation {
  margin-top: 18px;
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2.5px solid #ff7b25;
  padding-bottom: 12px;
  margin-bottom: 14px;
  gap: 16px;
}

.print-kicker {
  font-weight: 800;
  font-size: 0.76rem;
  color: #d94e0f;
  letter-spacing: 0.5px;
}

.print-title-block h1 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  color: #1a162b;
  line-height: 1.15;
}

.print-title-block p {
  font-size: 0.9rem;
  color: #554b73;
  font-weight: 700;
}

.print-summary-box {
  display: flex;
  gap: 18px;
  background: #fff6e8;
  border: 2px solid #ffb703;
  padding: 8px 16px;
  border-radius: 12px;
  text-align: center;
}

.print-summary-box strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: #d94e0f;
}

.print-summary-box span {
  font-size: 0.75rem;
  color: #4a3f6b;
  font-weight: 700;
}

/* Echte Straßenkarte im PDF-Schatzkarten-Blatt (quer über die volle Breite & abgestimmt auf Seite 1) */
#printRouteSheetView {
  display: flex;
  flex-direction: column;
}

.print-map-wrapper {
  margin-bottom: 10px;
  border: 2px solid #ff7b25;
  border-radius: 12px;
  overflow: hidden;
  background: #f4f6f9;
  flex-shrink: 0;
}

.print-leaflet-map {
  width: 100%;
  height: 410px;
  z-index: 1;
}

.print-leaflet-map img.leaflet-tile {
  filter: none !important;
  image-rendering: -webkit-optimize-contrast;
}

.print-map-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8f5ff;
  border-top: 1.5px solid #e2dcf0;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: #2b224b;
}

/* Nummerierte Marker + Straßenschilder auf der Druck-Karte */
.print-map-pin-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.print-map-pin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ff7b25;
  color: #ffffff;
  border: 2.5px solid #1a162b;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.print-pin-label {
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.94);
  color: #1a162b;
  border: 1.5px solid #1a162b;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Kompakte Stationen-Checkliste (passt unter die große Karte und läuft bei vielen Stationen auf Seite 2 weiter) */
.print-checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.print-checklist-header h3 {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  color: #1a162b;
}

.print-checklist-header span {
  font-size: 0.76rem;
  color: #d94e0f;
  font-weight: 700;
}

.print-stops-checklist {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.print-check-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  border: 1.5px solid #d8d0e8;
  border-radius: 9px;
  background: #fffdf9;
  page-break-inside: avoid;
  break-inside: avoid;
}

.print-check-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ff7b25;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.print-check-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.print-check-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.print-check-street {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: #1a162b;
}

.print-check-house {
  font-size: 0.82rem;
  color: #d94e0f;
  font-weight: 700;
}

.print-check-time {
  margin-left: auto;
  background: #f3ecff;
  color: #2b224b;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.print-check-sub {
  font-size: 0.75rem;
  color: #554b73;
  line-height: 1.3;
}

.print-check-box {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1.5px dashed #ff7b25;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #554b73;
  background: #fff9f2;
}

.print-check-square {
  width: 16px;
  height: 16px;
  border: 2px solid #1a162b;
  border-radius: 4px;
  background: #ffffff;
  display: inline-block;
}

.print-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.76rem;
  color: #6c638b;
  border-top: 1px solid #e2dcf0;
  padding-top: 8px;
}

/* Großformatiges DIN-A4-Haustür-Willkommensplakat im QUERFORMAT (exakt 1 Seite A4 Querformat voll ausgenutzt!) */
body.print-mode-landscape .pdf-modal-content {
  max-width: 1080px;
}

.printable-sheet.is-door-sign-sheet {
  padding: 0;
  border: none;
}

.print-door-sign-view {
  padding: 0;
}

.door-sign-poster {
  border: 4px double #ff7b25;
  border-radius: 20px;
  background: #fffdf9;
  padding: 18px 24px 14px;
  text-align: center;
  color: #18132c;
  min-height: 610px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  page-break-inside: avoid;
  break-inside: avoid;
}

.door-sign-landscape-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 0.92fr 1.38fr;
  gap: 20px;
  align-items: stretch;
  text-align: left;
  margin: 10px 0;
}

.door-sign-left-col {
  background: linear-gradient(160deg, #fff3e0 0%, #ffe3b8 100%);
  border: 2.5px solid #ff7b25;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.door-sign-right-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.door-sign-kicker {
  display: inline-block;
  align-self: center;
  background: #18132c;
  color: #ffd166;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.94rem;
  letter-spacing: 1px;
  padding: 6px 22px;
  border-radius: 999px;
}

.door-sign-hero-icon {
  font-size: 5rem;
  line-height: 1.05;
  margin: 2px 0 6px;
}

.door-sign-headline {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  line-height: 1.05;
  color: #d94e0f;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.door-sign-subbanner {
  font-size: 1.08rem;
  font-weight: 800;
  color: #2b224b;
  margin-bottom: 12px;
}

.door-sign-station-box {
  background: #f8f5ff;
  border: 2px solid #d0c7e6;
  border-left: 7px solid #ff7b25;
  border-radius: 14px;
  padding: 12px 16px;
}

.door-sign-station-box h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  line-height: 1.15;
  color: #18132c;
  margin-bottom: 4px;
}

.door-sign-address {
  font-size: 1.05rem;
  font-weight: 800;
  color: #4a3f6b;
  margin: 0;
}

.door-sign-time-badge {
  display: inline-block;
  background: #18132c;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 1.04rem;
  margin-bottom: 8px;
}

.door-sign-spook {
  font-size: 0.98rem;
  font-weight: 800;
  color: #d94e0f;
}

.door-sign-section-label {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: #2b224b;
  margin-bottom: -2px;
}

.door-sign-pills-wrap {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
}

.door-sign-pill {
  background: #f3ecff;
  border: 1.5px solid #8b5cf6;
  color: #2b224b;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 5px 12px;
  border-radius: 999px;
}

.door-sign-pill-teal {
  background: #e6fcf5;
  border-color: #2ec4b6;
  color: #0b7285;
}

.door-sign-pill-gold {
  background: #fff3bf;
  border-color: #f59f00;
  color: #7c2d12;
}

.door-sign-quote {
  font-size: 1rem;
  line-height: 1.38;
  font-style: italic;
  color: #3d345b;
  background: #f8f5ff;
  border-left: 5px solid #ff7b25;
  padding: 10px 14px;
  border-radius: 8px 12px 12px 8px;
  margin: 0;
}

.door-sign-bell-box {
  padding: 10px 14px;
  border: 2px dashed #18132c;
  border-radius: 12px;
  background: #fff9f2;
  color: #18132c;
  font-size: 0.98rem;
}

.door-sign-bell-line {
  margin-top: 4px;
  font-size: 1.04rem;
  font-weight: 800;
  color: #d94e0f;
}

.door-sign-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1.5px solid #f3e8ee;
  padding-top: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #554b73;
}

@page {
  size: A4 portrait;
  margin: 8mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .no-print,
  .site-header,
  .site-footer,
  .screen-view,
  #gdprModal,
  #adminModal,
  .leaflet-control-Zoom,
  .leaflet-control-zoom {
    display: none !important;
  }
  .pdf-modal {
    position: static !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .pdf-modal-content {
    max-width: 100% !important;
    width: 100% !important;
  }
  .printable-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  .print-page-frame {
    border: 2.5px solid #ff7b25 !important;
    border-radius: 14px !important;
    padding: 8mm 9mm 6mm !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-box-decoration-break: clone !important;
    box-decoration-break: clone !important;
  }
  .print-page-continuation {
    margin-top: 0 !important;
    page-break-before: always !important;
    break-before: page !important;
  }
  .print-leaflet-map {
    height: 410px !important;
  }
  .printable-sheet.is-door-sign-sheet {
    border: none !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  .door-sign-poster.door-sign-landscape {
    border: 4px double #ff7b25 !important;
    padding: 7mm 10mm 6mm !important;
    width: 100% !important;
    height: 175mm !important;
    min-height: 175mm !important;
    max-height: 175mm !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: avoid !important;
  }
}

/* =====================================================================
   KOMPAKTE FILTER, ADMIN-COCKPIT & SMARTPHONE-SCHNELLUMSCHALTER
   ===================================================================== */
.map-compact-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-only-switch,
.mobile-glance-bar {
  display: none;
}

/* Aufgeräumter 1-Klick-Ansichtsumschalter auf allen Unterseiten (auch auf Desktop, damit immer nur 1 fokussierte Karte sichtbar ist!) */
.mobile-card-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 820px;
  margin: 0 auto 14px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 999px;
  border: 1.5px solid var(--border-soft);
}

.mobile-card-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 42px;
  transition: all 0.16s ease;
}

.mobile-card-btn:hover {
  color: #ffffff;
}

.mobile-card-btn.active {
  background: var(--pumpkin);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(255, 123, 37, 0.35);
}

.mobile-card-hidden {
  display: none !important;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-stat-box {
  background: var(--bg-card-light);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
}

.admin-stat-box strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--gold);
}

.admin-stat-box span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-houses-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding-right: 4px;
}

@media (max-width: 980px) {
  .map-screen-grid,
  .dual-screen-grid,
  .print-map-section {
    grid-template-columns: 1fr;
  }
  .map-canvas {
    height: 320px;
  }
  .two-cols,
  .three-cols {
    grid-template-columns: 1fr;
  }
  .control-label {
    min-width: auto;
    font-size: 0.88rem;
  }

  /* Auf Tablet & Smartphone: 1-Tap-Umschalter oben statt endloser Scroll-Stapel! */
  .mobile-card-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--bg-card);
    padding: 5px;
    border-radius: 999px;
    border: 1.5px solid var(--border-soft);
    margin-bottom: 12px;
  }

  .mobile-card-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 999px;
    padding: 9px 10px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
  }

  .mobile-card-btn.active {
    background: var(--pumpkin);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(255, 123, 37, 0.35);
  }

  .mobile-card-hidden {
    display: none !important;
  }

  .mobile-only-switch {
    display: inline-block;
  }

  .mobile-glance-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--bg-card-light);
    border: 1.5px solid var(--gold);
    border-radius: 12px;
  }

  .mobile-glance-info strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.94rem;
    color: var(--gold);
  }

  .mobile-glance-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  .mobile-glance-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }
}

/* =====================================================================
   SPEZIELLE SMARTPHONE-OPTIMIERUNG: ALLES AUF EINEN BLICK & KAUM SCROLLEN
   ===================================================================== */
@media (max-width: 680px) {
  html, body {
    overflow-x: hidden;
  }

  .container {
    padding: 0 10px;
  }

  .screen-view {
    padding: 8px 0 16px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 6px 10px;
    gap: 6px;
  }

  .brand {
    justify-content: space-between;
    gap: 8px;
  }

  .brand-icon {
    font-size: 1.5rem;
  }

  .brand-title {
    font-size: 1.05rem;
    display: inline;
  }

  .brand-sub {
    font-size: 0.74rem;
  }

  /* Kompakte 5-Tab-Leiste (2 Zeilen, extrem platzsparend, große Touch-Fläche) */
  .main-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
  }

  .nav-tab {
    width: 100%;
    min-height: 36px;
    padding: 5px 6px;
    font-size: 0.78rem;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    line-height: 1.15;
  }

  .nav-tab:nth-child(4),
  .nav-tab:nth-child(5) {
    grid-column: span 1;
  }

  /* Kompaktes Top-Panel auf Bildschirm 1: Alles auf einen Blick ohne Scrollen */
  .top-control-panel {
    padding: 8px 10px;
    gap: 6px;
    margin-bottom: 8px;
    border-radius: 14px;
  }

  .control-block {
    gap: 4px;
  }

  .control-label {
    font-size: 0.8rem;
    width: 100%;
  }

  .district-tabs,
  .preset-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 100%;
  }

  .district-tab,
  .preset-pill {
    width: 100%;
    min-height: 34px;
    padding: 4px 8px;
    font-size: 0.78rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .district-tab-wish {
    grid-column: 1 / -1;
  }

  .map-card,
  .route-box,
  .page-card {
    padding: 10px;
    border-radius: 14px;
  }

  .page-card h2 {
    font-size: 1.25rem;
  }

  .card-sub {
    font-size: 0.85rem;
    margin-bottom: 10px;
  }

  .map-card-Bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 6px;
  }

  .view-mode-switch {
    width: 100%;
  }

  .sub-switch {
    flex: 1;
    text-align: center;
    min-height: 36px;
    padding: 5px 8px;
    font-size: 0.82rem;
  }

  .map-compact-filters {
    justify-content: space-between;
    gap: 6px;
  }

  .simple-filter {
    font-size: 0.8rem;
    gap: 4px;
  }

  /* Kompakte Kartenhöhe auf dem Smartphone, damit Stadtteile + Karte + Sofort-Route zusammen auf 1 Bildschirm passen */
  .map-canvas {
    height: 235px;
  }

  .houses-scroll-container {
    height: 265px;
  }

  .map-legend {
    gap: 8px;
    padding: 6px 2px 0;
    font-size: 0.76rem;
  }

  .legend-hint {
    display: none;
  }

  /* Auf dem Smartphone wird die große Routen-Box nur eingeblendet, wenn "🧭 Route & PDF" gewählt ist – sonst reicht die kompakte Sofortleiste! */
  .route-box.mobile-route-collapsed {
    display: none !important;
  }

  /* Verhindert iOS Auto-Zoom beim Tippen in Formularfelder (mind. 16px) */
  input[type="text"],
  input[type="email"],
  input[type="time"],
  select {
    font-size: 16px;
    min-height: 40px;
    padding: 7px 10px;
  }

  .form-group {
    margin-bottom: 8px;
  }

  .picker-map {
    height: 120px;
  }

  .address-lookup-row,
  .manage-input-row,
  .quick-save-route-bar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .address-lookup-row input,
  .manage-input-row input,
  .quick-save-route-bar input {
    flex: 1;
    min-width: 160px;
  }

  .wish-item {
    flex-direction: column;
    align-items: stretch;
    padding: 9px 10px;
    gap: 8px;
  }

  .wish-item .btn {
    width: 100%;
  }

  /* Druckvorschau auf schmalen Smartphone-Displays */
  .printable-sheet {
    padding: 12px;
    overflow-x: auto;
  }

  .print-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .print-summary-box {
    width: 100%;
    justify-content: space-around;
  }
}

@media (max-width: 390px) {
  .main-nav {
    grid-template-columns: 1fr 1fr;
  }
  .nav-tab:last-child {
    grid-column: 1 / -1;
  }
}

/* Interaktive freie Leckereien-Liste (verhindert überlange Fließtexte ohne Trennzeichen) */
.treats-list-builder {
  background: rgba(19, 13, 35, 0.55);
  border: 1.5px solid rgba(255, 209, 102, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
}

.treats-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
  align-items: center;
  margin-bottom: 9px;
}

.treats-empty-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.treat-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 123, 37, 0.18);
  border: 1.5px solid var(--pumpkin);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.treat-item-remove {
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: #ffd166;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
}

.treat-item-remove:hover {
  background: #ef476f;
  color: #fff;
  transform: scale(1.08);
}

.treats-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.treats-add-row input {
  flex: 1;
}

.treats-quick-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
}

.treats-quick-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-right: 4px;
}

.treat-quick-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 209, 102, 0.45);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.treat-quick-pill:hover {
  border-color: var(--gold);
  color: #fff;
  background: rgba(255, 123, 37, 0.18);
}

.treat-quick-pill.active {
  background: rgba(46, 196, 182, 0.22);
  border: 1px solid #2ec4b6;
  color: #72efdd;
}

