@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-dark:   #0f2540;
  --brand-mid:    #1e3a5f;
  --brand-light:  #2d5a9e;
  --brand-accent: #e8a020;
  --bg:           #f4f6f9;
  --surface:      #ffffff;
  --text:         #1a1a2e;
  --text-muted:   #6b7280;
  --radius:       14px;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.08);
  --shadow-md:    0 4px 20px rgba(0,0,0,.13);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.22);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(8,16,30,.82), rgba(8,16,30,.82)),
    url('logo.jpg') center center / cover no-repeat fixed;
}

@supports not (height: 100dvh) { body { height: 100vh; } }

body > * { position: relative; z-index: 1; flex-shrink: 0; }

/* main darf wachsen, alle anderen nicht */
main { flex: 1 1 0 !important; min-height: 0 !important; flex-shrink: 1 !important; }

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
header {
  background: #0f1f35;
  color: #fff;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 0 rgba(232,160,32,.6), 0 4px 20px rgba(0,0,0,.5);
  position: relative;
  flex-shrink: 0;
  z-index: 10;
}

/* Dezente Muster-Überlagerung */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,.02) 40px,
    rgba(255,255,255,.02) 80px
  );
  pointer-events: none;
}

/* Goldener Akzentstreifen unten */
header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}

.header-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.25);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  flex-shrink: 0;
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.header-slogan {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

#install-btn {
  background: var(--brand-accent);
  border: none;
  color: #1a1a1a;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
#install-btn:hover { opacity: .85; transform: scale(1.03); }
#install-btn.hidden { display: none; }

#lang-switcher {
  display: flex;
  gap: 3px;
  background: rgba(0,0,0,.2);
  border-radius: 20px;
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 16px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  letter-spacing: .05em;
  transition: background .15s, color .15s;
}
.lang-btn:hover  { color: #fff; }
.lang-btn.active { background: rgba(255,255,255,.2); color: #fff; }

#admin-toggle {
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
#admin-toggle:hover  { background: rgba(0,0,0,.35); transform: scale(1.03); }
#admin-toggle.active { background: var(--brand-accent); border-color: var(--brand-accent); color: #1a1a1a; font-weight: 600; }

#admin-log-link {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.35);
  padding: 6px 12px;
  border-radius: 20px;
  transition: background .15s;
  white-space: nowrap;
}
#admin-log-link:hover { background: rgba(0,0,0,.2); color: #fff; }

/* ══════════════════════════════
   FILTER BAR
══════════════════════════════ */
#filter-bar {
  background: rgba(255,255,255,.93);
  border-bottom: 1px solid rgba(0,0,0,.1);
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;   /* kein Umbruch auf Zeilen-Ebene */
  flex-shrink: 0;
  overflow-x: auto;    /* horizontal scrollen statt umbrechen */
  -webkit-overflow-scrolling: touch;
}

/* Scrollbar verstecken */
#filter-bar::-webkit-scrollbar { display: none; }
#filter-bar { scrollbar-width: none; }

.filter-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#bin-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bin-filter-btn {
  padding: 5px 13px;
  border-radius: 20px;
  border: 2px solid var(--bc);
  background: #fff;
  color: #333;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s, box-shadow .15s;
  font-family: 'Inter', sans-serif;
}
.bin-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,.12);
}
.bin-filter-btn.active {
  background: var(--bc);
  color: var(--tc);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ══════════════════════════════
   ADMIN BAR
══════════════════════════════ */
#admin-bar {
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border-bottom: 1px solid #fcd34d;
  font-size: .82rem;
  color: #92400e;
  flex-shrink: 0;
  z-index: 5;
}
#admin-bar.hidden { display: none; }

.admin-bar-main {
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-hint { font-weight: 500; font-size: .78rem; }

#admin-config-open-btn {
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid #d97706;
  background: #fff;
  color: #92400e;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .15s;
}
#admin-config-open-btn:hover  { background: #fef9c3; }
#admin-config-open-btn.active { background: #d97706; color: #fff; }

.admin-reset-group { display: flex; align-items: center; gap: 6px; }

#admin-reset-select {
  padding: 3px 7px;
  border-radius: 8px;
  border: 1px solid #d97706;
  background: #fff;
  color: #92400e;
  font-size: .78rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

#admin-reset-btn {
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid #dc2626;
  background: #fff;
  color: #dc2626;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  transition: background .15s;
}
#admin-reset-btn:hover { background: #fee2e2; }

#admin-save-indicator {
  margin-left: auto;
  font-weight: 600;
  color: #15803d;
  opacity: 0;
  transition: opacity .3s;
  font-size: .82rem;
}
#admin-save-indicator.visible { opacity: 1; }

/* ── Admin Split-Layout: Karte + Konfig nebeneinander ── */
#admin-config-panel {
  display: none;
  border-top: 1px solid #fcd34d;
}
#admin-config-panel:not(.hidden) { display: flex; }
#admin-config-panel.hidden { display: none; }

/* Wenn Panel offen: main wird zum Split */
body.admin-panel-open main {
  flex-direction: row;
}

body.admin-panel-open #map-container {
  flex: 1;
  min-width: 0;
}

.config-panel-inner {
  width: 280px;
  min-width: 240px;
  max-width: 320px;
  background: #fffdf5;
  border-left: 1px solid #fcd34d;
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.config-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

#config-panel-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--brand-mid);
}

#config-panel-close {
  background: #f3f4f6; border: none;
  width: 24px; height: 24px; border-radius: 50%;
  cursor: pointer; font-size: .8rem; color: #666;
  display: flex; align-items: center; justify-content: center;
}

.config-panel-hint {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

#config-bins {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: #f8f9fb;
  border-radius: 8px;
  border: 1px solid #e8eaed;
}

.config-bin-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 500;
}

.config-color-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.config-counter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.counter-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--brand-mid);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.counter-btn:hover       { background: var(--brand-light); }
.counter-btn.minus       { background: #9ca3af; }
.counter-btn.minus:hover { background: #6b7280; }

.counter-val {
  font-size: 1rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: var(--brand-mid);
}

#config-save {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  margin-top: 4px;
}
#config-save:hover { opacity: .9; }
#config-save.hidden { display: none; }

@media (max-width: 600px) {
  body.admin-panel-open main { flex-direction: column; }
  .config-panel-inner { width: 100%; max-width: 100%; border-left: none; border-top: 1px solid #fcd34d; max-height: 200px; }
}

/* ══════════════════════════════
   MAP
══════════════════════════════ */
main {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 20px 20px 52px; /* unten Platz für fixed Footer */
  overflow: hidden;
  min-height: 0;
  position: relative;
  gap: 0;
}

#map-container {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: 1400px;
  overflow: visible;
  min-height: 0;
  background: transparent;
}

#site-map {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

/* Rahmen exakt um das Bild (wird per JS positioniert) */
#map-frame {
  position: absolute;
  pointer-events: none;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.18),
    0 8px 40px rgba(0,0,0,.7),
    0 2px 8px rgba(0,0,0,.5);
  z-index: 2;
}

#markers-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ── Marker ── */
.map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: all;
  cursor: pointer;
  transition: transform .15s;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.45));
}
.map-marker:hover    { transform: translate(-50%, -100%) scale(1.22); }
.map-marker.dragging { transform: translate(-50%, -100%) scale(1.18); filter: drop-shadow(0 5px 10px rgba(0,0,0,.5)); z-index: 999; cursor: grabbing !important; }
.map-marker svg      { display: block; }

/* ══════════════════════════════
   MODALS – gemeinsame Basis
══════════════════════════════ */
#modal-overlay,
#config-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end; /* auf Mobile von unten */
  justify-content: center;
  z-index: 10000;
  padding: 16px;
}

@media (min-width: 601px) {
  #modal-overlay,
  #config-overlay {
    align-items: center;
  }
}
#modal-overlay.hidden,
#config-overlay.hidden { display: none; }

/* ── Detail Modal ── */
#modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--brand-accent);
}

#modal-close {
  position: absolute;
  top: 16px; right: 18px;
  background: #f3f4f6;
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: #666;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
#modal-close:hover { background: #e5e7eb; color: #111; }

#modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--brand-mid);
  padding-right: 36px;
}

/* ── Bin Cards ── */
#modal-bins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.bin-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
  border: 1px solid rgba(0,0,0,.06);
}
.bin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bin-card.highlighted {
  box-shadow: 0 0 0 3px var(--brand-mid), var(--shadow-sm);
}

.bin-header {
  padding: 9px 12px;
  font-weight: 600;
  font-size: .8rem;
  text-align: center;
  letter-spacing: .03em;
}

.bin-body {
  padding: 12px 10px;
  background: #fafafa;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.current-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.12);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,.8);
}

.status-label {
  font-size: .76rem;
  color: #444;
  font-weight: 600;
}

.status-time {
  font-size: .68rem;
  color: #aaa;
  text-align: center;
  min-height: .9em;
}

.fill-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.fill-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: #f0f0f0;
  cursor: pointer;
  font-size: .74rem;
  transition: border-color .15s, background .15s;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.fill-btn:hover  { background: #e5e7eb; }
.fill-btn.active {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, white);
  font-weight: 600;
}

.btn-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.btn-label { font-size: .74rem; }

/* ── Config Modal ── */
#config-modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--brand-accent);
}

#config-close {
  position: absolute;
  top: 16px; right: 18px;
  background: #f3f4f6;
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: #666;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
#config-close:hover { background: #e5e7eb; color: #111; }

#config-modal h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-mid);
  margin-bottom: 4px;
  padding-right: 36px;
}

.config-hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

#config-bins {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #f8f9fb;
  border-radius: 10px;
  border: 1px solid #e8eaed;
  transition: background .15s;
}
.config-row:hover { background: #f0f4ff; }

.config-bin-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .86rem;
  font-weight: 500;
}

.config-color-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.config-counter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.counter-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--brand-mid);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .1s;
}
.counter-btn:hover       { background: var(--brand-light); transform: scale(1.1); }
.counter-btn.minus       { background: #9ca3af; }
.counter-btn.minus:hover { background: #6b7280; }

.counter-val {
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 26px;
  text-align: center;
  color: var(--brand-mid);
}

#config-save {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  font-family: 'Inter', sans-serif;
  letter-spacing: .03em;
}
#config-save:hover { opacity: .9; transform: translateY(-1px); }

/* Scrollbar */
#modal::-webkit-scrollbar,
#config-modal::-webkit-scrollbar { width: 5px; }
#modal::-webkit-scrollbar-thumb,
#config-modal::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* ── Mobile ── */
@media (max-width: 600px) {
  header { height: auto; padding: 10px 16px; }
  .header-title  { font-size: 1rem; }
  .header-slogan { font-size: .6rem; }

  #filter-bar { padding: 6px 10px; gap: 5px; }
  .bin-filter-btn { font-size: .7rem; padding: 4px 8px; }

  main { padding: 8px; }

  #modal {
    padding: 14px 12px;
    border-radius: 14px;
    max-height: 88vh;
    width: 100%;
  }

  #modal-title { font-size: 1rem; margin-bottom: 12px; }

  #modal-bins {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .bin-header { font-size: .72rem; padding: 7px 8px; }
  .bin-body { padding: 8px 6px; gap: 7px; }
  .fill-btn { padding: 4px 6px; font-size: .68rem; gap: 5px; }
  .btn-dot  { width: 8px; height: 8px; }
  .btn-label { font-size: .68rem; }
  .status-dot   { width: 11px; height: 11px; }
  .status-label { font-size: .7rem; }

  #site-footer { padding: 6px 12px; font-size: .7rem; min-height: 30px; }
}

/* ── Footer ── */
#site-footer {
  text-align: center;
  padding: 8px 16px;
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #0f1f35;
  width: 100%;
  z-index: 10;
  box-shadow: 0 -2px 0 rgba(232,160,32,.3);
  min-height: 36px;
  /* Fest am unteren Rand */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}
#site-footer a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-weight: 500;
}
#site-footer a:hover { color: var(--brand-accent); }

/* ── Zurück-Link (Impressum / Log) ── */
.header-back-link {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.35);
  padding: 6px 12px;
  border-radius: 20px;
  transition: background .15s;
  white-space: nowrap;
}
.header-back-link:hover { background: rgba(0,0,0,.2); color: #fff; }

/* ══════════════════════════════
   ONBOARDING
══════════════════════════════ */
#onboarding-overlay {
  position: fixed; inset: 0;
  background: rgba(8,16,30,.75);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 20000; padding: 16px;
}
#onboarding-overlay.hidden { display: none; }

#onboarding {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 420px; width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--brand-accent);
  text-align: center;
}

#onboarding-close {
  position: absolute; top: 14px; right: 16px;
  background: #f3f4f6; border: none;
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-size: .9rem; color: #666;
}

.onboarding-logo {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, #1e3a5f, #2d5a9e);
  color: #fff; font-size: 2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(30,58,95,.4);
}

#onboarding h2 {
  font-size: 1.2rem; font-weight: 700;
  color: var(--brand-mid); margin-bottom: 4px;
}

.onboarding-sub {
  font-size: .85rem; color: var(--text-muted);
  margin-bottom: 20px; font-style: italic;
}

.onboarding-steps {
  display: flex; flex-direction: column; gap: 12px;
  text-align: left; margin-bottom: 24px;
}

.onboarding-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; background: #f8f9fb;
  border-radius: 10px; border: 1px solid #e8eaed;
}

.step-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }

.onboarding-step strong { font-size: .88rem; color: var(--brand-mid); display: block; }
.onboarding-step p { font-size: .78rem; color: #555; margin: 2px 0 0; line-height: 1.4; }

#onboarding-start {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  color: #fff; border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity .15s;
  margin-bottom: 12px;
}
#onboarding-start:hover { opacity: .9; }

.onboarding-skip {
  font-size: .78rem; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer;
}

/* ══════════════════════════════
   FEEDBACK & RATING MODALS
══════════════════════════════ */
#feedback-overlay, #rating-overlay {
  position: fixed; inset: 0;
  background: rgba(8,16,30,.65);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 20000; padding: 16px;
}
#feedback-overlay.hidden, #rating-overlay.hidden { display: none; }

#feedback-modal, #rating-modal {
  background: #fff; border-radius: 20px;
  padding: 28px; width: 100%; max-width: 400px;
  position: relative; box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--brand-accent);
}

#feedback-modal h2, #rating-modal h2 {
  font-size: 1.1rem; font-weight: 700;
  color: var(--brand-mid); margin-bottom: 4px;
}

.feedback-sub {
  font-size: .8rem; color: var(--text-muted); margin-bottom: 14px;
}

#feedback-close, #rating-close {
  position: absolute; top: 14px; right: 16px;
  background: #f3f4f6; border: none;
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-size: .9rem; color: #666;
}

#feedback-text {
  width: 100%; padding: 10px 12px;
  border: 1px solid #d1d5db; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: .88rem;
  resize: vertical; margin-bottom: 12px;
  transition: border-color .15s;
}
#feedback-text:focus { outline: none; border-color: var(--brand-mid); }

.captcha-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
#captcha-question {
  font-size: .9rem; font-weight: 600; color: var(--brand-mid);
  white-space: nowrap;
}
#captcha-answer {
  width: 70px; padding: 6px 10px;
  border: 1px solid #d1d5db; border-radius: 8px;
  font-size: .88rem; font-family: 'Inter', sans-serif;
}

#feedback-send {
  width: 100%; padding: 11px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  color: #fff; border: none; border-radius: 10px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif; margin-bottom: 10px;
}

#feedback-status {
  font-size: .82rem; text-align: center; min-height: 1.2em;
  color: var(--brand-mid);
}

/* Rating Stars */
#rating-stars {
  display: flex; justify-content: center; gap: 8px;
  margin: 16px 0 8px;
}

.star-btn {
  font-size: 2rem; background: none; border: none;
  cursor: pointer; transition: transform .1s;
  line-height: 1;
}
.star-btn:hover, .star-btn.active { transform: scale(1.2); }

#rating-label {
  text-align: center; font-size: .88rem;
  color: var(--text-muted); margin-bottom: 16px; min-height: 1.4em;
}

#rating-send {
  width: 100%; padding: 11px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  color: #fff; border: none; border-radius: 10px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
#rating-send.hidden { display: none; }

/* Footer Buttons */
.footer-link-btn {
  background: none; border: none;
  color: rgba(255,255,255,.5); font-size: .75rem;
  cursor: pointer; font-family: 'Inter', sans-serif;
  padding: 0; transition: color .15s;
}
.footer-link-btn:hover { color: var(--brand-accent); }

/* ── Toast (zentriert, ersetzt alert) ── */
#toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(15, 31, 53, 0.95);
  color: #fff;
  padding: 16px 28px;
  border-radius: 14px;
  font-size: .95rem;
  font-weight: 500;
  text-align: center;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  border: 1px solid rgba(232,160,32,.4);
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Abholtermin-Badges auf Filterbuttons ── */
.bin-filter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.btn-type-label { line-height: 1; }

.btn-pickup-badge {
  font-size: .6rem;
  font-weight: 600;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 6px;
  white-space: nowrap;
}

.pickup-today    { background: #dc2626; color: #fff; }
.pickup-tomorrow { background: #d97706; color: #fff; }
.pickup-future   { background: rgba(0,0,0,.12); color: inherit; }

/* ══════════════════════════════
   EINKAUFSWAGEN MODAL
══════════════════════════════ */
#cart-overlay {
  position: fixed; inset: 0;
  background: rgba(8,16,30,.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 20000; padding: 16px;
}
#cart-overlay.hidden { display: none; }

#cart-modal {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid #e8a020;
}

#cart-close {
  position: absolute; top: 14px; right: 16px;
  background: #f3f4f6; border: none;
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-size: .9rem; color: #666;
}

#cart-modal h2 { font-size: 1.1rem; font-weight: 700; color: var(--brand-mid); margin-bottom: 4px; }

.cart-step-hint {
  font-size: .82rem; color: var(--text-muted);
  margin-bottom: 12px; font-weight: 500;
}

/* Mini-Karte im Modal */
#cart-map-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  cursor: crosshair;
  touch-action: none;
  margin-bottom: 14px;
}

#cart-map-img {
  display: block; width: 100%; height: auto;
  pointer-events: none; user-select: none;
}

#cart-pin {
  position: absolute;
  font-size: 1.8rem;
  transform: translate(-50%, -100%);
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
  transition: left .1s, top .1s;
  z-index: 2;
}

/* Markt-Buttons */
#cart-market-btns {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}

.cart-market-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid #d1d5db;
  background: #fff;
  font-size: .88rem; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: border-color .15s, background .15s;
}
.cart-market-btn:hover  { border-color: var(--brand-mid); }
.cart-market-btn.active { border-color: var(--brand-mid); background: #eef3fb; color: var(--brand-mid); }

/* Aktions-Buttons */
.cart-btn-row {
  display: flex; gap: 10px; justify-content: flex-end;
}

.cart-btn-primary {
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  color: #fff; border: none; border-radius: 10px;
  font-size: .9rem; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.cart-btn-primary:disabled { opacity: .4; cursor: default; }
.cart-btn-secondary {
  padding: 9px 16px;
  background: #f3f4f6; color: #555;
  border: none; border-radius: 10px;
  font-size: .9rem; cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* Einkaufswagen-Marker auf der Hauptkarte */
.cart-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: all;
  cursor: pointer;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.5));
  transition: transform .15s;
  z-index: 3;
}
.cart-marker:hover { transform: translate(-50%, -100%) scale(1.2); }
.cart-marker svg   { display: block; }

/* Platzierungs-Pin (folgt dem Cursor) */
#cart-place-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.5));
}
#cart-place-pin.hidden { display: none; }

/* Karte im Platzierungsmodus: Cursor als Fadenkreuz */
#map-container.cart-placing { cursor: crosshair; }

/* Platzierungs-Hinweis auf der Karte */
#cart-placing-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15,31,53,.88);
  color: #fff;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  border: 2px solid #f97316;
  text-align: center;
}
#cart-placing-hint.hidden { display: none; }

/* ── Karten-Reload-Button ── */
#map-reload-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(15,31,53,.82);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: background .15s, transform .3s;
  backdrop-filter: blur(4px);
}
#map-reload-btn:hover { background: rgba(15,31,53,1); }
#map-reload-btn.spinning { animation: spin .6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Einkaufswagen in Filter-Bar ── */
.filter-separator {
  width: 1px;
  height: 24px;
  background: rgba(0,0,0,.15);
  margin: 0 4px;
  flex-shrink: 0;
}

.cart-filter-btn {
  padding: 5px 10px;
  border-radius: 20px;
  border: 2px solid #f97316;
  background: #fff;
  color: #f97316;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
  white-space: nowrap;
  flex-shrink: 0;
}
.cart-filter-btn:hover {
  background: #f97316;
  color: #fff;
  transform: translateY(-1px);
}

/* ── Einkaufswagen Info-Modal ── */
#cart-info-overlay {
  position: fixed; inset: 0;
  background: rgba(8,16,30,.6);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 20000; padding: 16px;
}
#cart-info-overlay.hidden { display: none; }

#cart-info-modal {
  background: #fff; border-radius: 16px; padding: 24px 28px;
  max-width: 320px; width: 100%; position: relative;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid #f97316;
  text-align: center;
}
#cart-info-modal h2 { font-size: 1.1rem; color: var(--brand-mid); margin-bottom: 6px; }
#cart-info-close {
  position: absolute; top: 12px; right: 14px;
  background: #f3f4f6; border: none;
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; font-size: .85rem; color: #666;
}

/* ── Abbrechen-Button im Platzierungsmodus ── */
#cart-placing-cancel {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 8px 20px;
  border-radius: 20px;
  border: none;
  background: rgba(15,31,53,.88);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 3px 12px rgba(0,0,0,.4);
  transition: background .15s;
}
#cart-placing-cancel:hover { background: rgba(15,31,53,1); }
#cart-placing-cancel.hidden { display: none; }

/* ── Status-Captcha Modal ── */
#status-captcha-overlay {
  position: fixed; inset: 0;
  background: rgba(8,16,30,.7);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 30000; padding: 16px;
}
#status-captcha-overlay.hidden { display: none; }

#status-captcha-modal {
  background: #fff; border-radius: 16px; padding: 24px;
  max-width: 320px; width: 100%;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--brand-accent);
  text-align: center;
}
#status-captcha-modal h3 {
  font-size: .95rem; color: var(--brand-mid);
  margin-bottom: 14px;
}
#status-captcha-answer {
  width: 80px; padding: 8px; text-align: center;
  border: 2px solid #d1d5db; border-radius: 10px;
  font-size: 1.2rem; font-family: 'Inter', sans-serif;
}
#status-captcha-answer:focus { outline: none; border-color: var(--brand-mid); }

/* Honeypot: unsichtbar für Menschen, Bots füllen es aus */
.visually-hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
