/* Layout: Vollbild-Karte, schwebende Kopfleiste, Detail-Panel unten (Handy) bzw. links (Desktop) */
:root {
  /* Design 3a „Klar & vertraut“: weiß, Blau für Aktionen, Gelb nur zum Markieren */
  --crust: #141414;      /* Haupttext */
  --ink-2: #444444;      /* Nebentext */
  --primary: #224db8;    /* Aktionen: Buttons, Links, aktive Filter */
  --primary-ink: #ffffff;
  --primary-hover: #1b3f99;
  --wheat: #f4c133;      /* Gelb zum Markieren (Karte, Hervorhebungen) */
  --wheat-ink: #141414;
  --flour: #f5f6f8;      /* Seitenhintergrund */
  --surface: #ffffff;
  --muted: #555555;
  --line: #c9ccd2;       /* Rahmen von Feldern und Knöpfen */
  --line-soft: #e4e6ea;  /* Trennlinien */
  --toggle-off: #d6d8dc;
  --open: #1f7a45;
  --closed: #b3261e;
  --fav: #c62853;
  --shadow: 0 6px 20px rgba(20, 20, 20, .12);
  --font-display: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Dunkles Design */
:root[data-theme="dark"] {
    --crust: #eef0f3; --ink-2: #c9ced6; --primary: #3f6fe0; --primary-ink: #ffffff; --primary-hover: #5a85ea;
    --wheat: #f4c133; --wheat-ink: #141414;
    --flour: #0f1115; --surface: #1a1d23; --muted: #a9b0bb; --line: #3a3f48; --line-soft: #2a2e35; --toggle-off: #3a3f48;
    --open: #5cc48a; --closed: #f08a80; --fav: #ff7a9a; --shadow: 0 6px 20px rgba(0,0,0,.5);
    color-scheme: dark;
  }


* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font: 15px/1.5 var(--font-body);
  color: var(--crust);
  background: var(--flour);
  overflow: hidden;
}

#map { position: fixed; inset: 0; background: var(--flour); }
.leaflet-container { font-family: var(--font-body); }

/* Kopfleiste */
.topbar {
  position: fixed; z-index: 1000;
  top: calc(env(safe-area-inset-top, 0px) + 12px); left: 12px; right: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); padding: 6px 14px 6px 6px; border-radius: 14px;
  box-shadow: var(--shadow);
  font: 800 18px/1 var(--font-display); letter-spacing: -.01em;
}
.brand img { border-radius: 9px; display: block; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; cursor: pointer;
  background: var(--surface); color: var(--crust);
  padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow);
  font: 600 14px/1 var(--font-body);
}
.chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.chip[aria-pressed="true"] { background: var(--wheat); color: var(--wheat-ink); }
.chip[aria-pressed="true"] .chip-dot { background: var(--open); }
.chip-icon { display: block; flex: none; }
.chip[aria-pressed="true"] .chip-icon { fill: currentColor; }
.filters { display: flex; align-items: center; gap: 8px; }

/* Standort-Knopf */
.fab {
  position: fixed; z-index: 1000;
  right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--surface); color: var(--crust); box-shadow: var(--shadow);
  transition: bottom .25s ease;
}
.fab.is-busy svg { animation: pulse 1s ease-in-out infinite; }
body.sheet-open .fab { bottom: calc(env(safe-area-inset-bottom, 0px) + 24px + var(--sheet-h, 0px)); }

button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Hinweis-Toast */
.toast {
  position: fixed; z-index: 1001;
  left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--crust); color: var(--flour);
  padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow);
  font-size: 14px;
}
.toast button {
  border: 0; cursor: pointer; border-radius: 8px;
  background: var(--wheat); color: var(--wheat-ink);
  font: 600 13px/1 var(--font-body); padding: 8px 10px;
}

/* Bäckerei-Symbole (Brot, Brötchen, Kaffee, Kuchen) */
.bs-marker { background: none; border: 0; }
.bs-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--wheat); color: #3b2a1e; border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transition: transform .15s ease;
  display: grid; place-items: center;
}
.bs-dot svg { display: block; }
.bs-dot.is-closed { background: #d8cfc5; color: #7a6e63; }
.bs-marker:hover .bs-dot { transform: scale(1.15); }
.bs-dot.is-active { transform: scale(1.3); box-shadow: 0 0 0 5px rgba(240,177,60,.45), 0 2px 6px rgba(0,0,0,.35); }

/* Eigener Standort */
.me-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #2b7de9; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(43,125,233,.25);
}

/* Detail-Panel */
.sheet {
  position: fixed; z-index: 1002;
  left: 0; right: 0; bottom: 0;
  max-height: 72%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--crust);
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow);
  padding: 8px 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
  animation: slideUp .22s ease-out;
}
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-close {
  position: absolute; top: 10px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--flour); color: var(--crust); font-size: 22px; line-height: 1;
}

@media (min-width: 760px) {
  .sheet {
    left: 16px; right: auto; top: 76px; bottom: 16px;
    width: 380px; max-height: none; border-radius: 18px;
    animation: slideIn .22s ease-out;
  }
  .sheet-handle { display: none; }
  body.sheet-open .fab { bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
}

.b-demo {
  display: inline-block; font: 600 11px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px;
}
.b-name { font: 800 26px/1.1 var(--font-display); letter-spacing: -.02em; margin: 10px 40px 4px 0; text-wrap: balance; }
.b-addr { color: var(--muted); margin: 0 0 12px; }
.b-status { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 14px; }
.b-status .dot { width: 10px; height: 10px; border-radius: 50%; }
.b-status.open { color: var(--open); }  .b-status.open .dot { background: var(--open); }
.b-status.closed { color: var(--closed); } .b-status.closed .dot { background: var(--closed); }
.b-status small { color: var(--muted); font-weight: 400; font-size: 14px; }

.b-route {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border-radius: 12px;
  background: var(--wheat); color: var(--wheat-ink); text-decoration: none;
  font: 700 16px/1 var(--font-body);
}
.b-route:hover { filter: brightness(1.05); }
.b-route:focus-visible { outline: 3px solid var(--crust); outline-offset: 2px; }

.b-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.b-tags span { background: var(--flour); border-radius: 999px; padding: 4px 10px; font-size: 13px; }

.b-section { margin-top: 20px; }
.b-section h3 {
  font: 600 12px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.b-desc { margin: 12px 0 0; }

.b-offers { display: grid; gap: 8px; }
.b-offer {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  border: 1px dashed var(--wheat); border-radius: 12px; padding: 10px 12px;
}
.b-offer strong { font-weight: 600; }
.b-offer .price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-offer p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 14px; }

.b-hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.b-hours td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.b-hours td:last-child { text-align: right; }
.b-hours tr.today td { font-weight: 700; }
.b-hours .closed-txt { color: var(--muted); }

.b-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.b-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.b-empty { color: var(--muted); font-size: 14px; margin: 0; }

.b-phone { color: var(--crust); font-weight: 600; }

.leaflet-control-attribution { font-size: 10px; }
.leaflet-control-zoom { display: none; } /* Pinch-Zoom auf dem Handy, Mausrad am Desktop */
@media (min-width: 760px) { .leaflet-control-zoom { display: block; } .leaflet-top.leaflet-right { top: 64px; } }

@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideIn { from { transform: translateX(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Schritt 2: Profil, Favoriten, Kontakt ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; }
.round-btn {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--surface); color: var(--crust); box-shadow: var(--shadow);
}
.round-btn.is-in::after {
  content: ""; position: absolute; right: 4px; bottom: 4px;
  width: 11px; height: 11px; border-radius: 50%; background: var(--open); border: 2px solid var(--surface);
}
@media (max-width: 374px) { .brand span { display: none; } .brand { padding-right: 6px; } }

.bs-dot.is-fav { border-color: var(--fav); }

.b-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.b-fav {
  width: 52px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); color: var(--crust);
  display: grid; place-items: center;
}
.b-fav svg { fill: none; }
.b-fav[aria-pressed="true"] { border-color: var(--fav); color: var(--fav); }
.b-fav[aria-pressed="true"] svg { fill: currentColor; }

.b-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.b-contact a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 10px;
  background: var(--flour); color: var(--crust); text-decoration: none; font-weight: 600; font-size: 14px;
}
.b-contact a:hover { background: var(--line); }
.b-contact a:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.b-contact-plain { margin: 10px 0 0; color: var(--muted); font-size: 14px; user-select: all; overflow-wrap: anywhere; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--flour); border-radius: 12px; padding: 4px; margin: 8px 0 16px; }
.tabs button {
  border: 0; cursor: pointer; border-radius: 9px; padding: 9px; background: none; color: var(--muted);
  font: 600 14px/1 var(--font-body);
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--crust); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.auth-form { display: grid; gap: 6px; }
.auth-form label { font-weight: 600; font-size: 14px; margin-top: 6px; }
.auth-form input, .field input, .field textarea, .field select {
  width: 100%; font: 16px/1.3 var(--font-body); color: var(--crust);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px;
}
.auth-form input:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(34,77,184,.25); }
.auth-error { color: var(--closed); min-height: 1.2em; margin: 4px 0; font-size: 14px; }
.auth-error:empty { min-height: 0; margin: 0; }
.auth-note { background: var(--flour); border-radius: 10px; padding: 10px 12px; margin: 8px 0 0; font-size: 14px; }

.btn-primary, .btn-secondary {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  border: 0; cursor: pointer; border-radius: 12px; padding: 13px 16px;
  font: 700 15px/1 var(--font-body); text-decoration: none;
}
.btn-primary { background: var(--wheat); color: var(--wheat-ink); margin-top: 8px; }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-secondary { background: var(--crust); color: var(--flour); width: 100%; margin-top: 4px; }
.btn-link { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 10px 0; font: 600 14px/1 var(--font-body); text-decoration: underline; justify-self: start; }

.fav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fav-list button {
  width: 100%; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--crust);
  border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px;
}
.fav-list button:hover { border-color: var(--wheat); }
.fav-name { font-weight: 700; }
.fav-meta { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.fav-meta .dot { width: 8px; height: 8px; border-radius: 50%; }
.fav-meta .dot.open { background: var(--open); } .fav-meta .dot.closed { background: var(--closed); }
code { font-size: 13px; background: var(--flour); padding: 1px 5px; border-radius: 4px; }

/* ---------- Suche ---------- */
.topbar { z-index: 1003; flex-wrap: wrap; }
.search { position: relative; order: 3; flex: 1 1 100%; }
.search-icon { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 14px 0 40px;
  border: 0; border-radius: 14px; box-shadow: var(--shadow);
  background: var(--surface); color: var(--crust);
  font: 500 16px/1 var(--font-body);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(34,77,184,.3); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  list-style: none; margin: 0; padding: 6px;
  max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
}
.search-results li { border-radius: 10px; padding: 9px 10px; cursor: pointer; display: grid; gap: 2px; }
.search-results li[aria-selected="true"], .search-results li:hover { background: var(--flour); }
.search-results .sr-name { font-weight: 700; }
.search-results mark { background: rgba(244,193,51,.5); color: inherit; border-radius: 3px; }
.search-results .sr-empty { cursor: default; color: var(--muted); font-size: 14px; }
.search-results .sr-empty:hover { background: none; }
.toast { top: calc(env(safe-area-inset-top, 0px) + 124px); }
@media (min-width: 760px) {
  .search { order: 0; flex: 0 1 420px; margin-right: auto; }
  .toast { top: calc(env(safe-area-inset-top, 0px) + 72px); }
}

/* ---------- Ausstattung (Ladesäulen, Sitzplätze) ---------- */
.b-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.b-feature {
  display: flex; align-items: center; gap: 10px;
  background: var(--flour); border-radius: 12px; padding: 10px 12px; min-width: 0;
}
.b-feature svg { flex: none; color: var(--crust); }
.b-feature div { display: grid; min-width: 0; }
.b-feature strong { font-weight: 700; font-size: 14px; }
.b-feature span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- Filterleiste: auf dem Handy eigene Zeile unter der Suche ---------- */
@media (max-width: 759px) {
  .filters {
    order: 4; flex: 1 1 100%;
    overflow-x: auto; scrollbar-width: none;
    padding: 2px 2px 10px; margin: -2px -2px -10px; /* Platz für den Schatten */
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters .chip { flex: none; }
  .toast { top: calc(env(safe-area-inset-top, 0px) + 172px); }
}

/* ---------- Bäckerei vorschlagen ---------- */
.btn-block { width: 100%; }
.back-link { padding: 0 0 6px; }
.sub-head { margin-top: 18px !important; }
.sub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sub-card, .photo-items li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 3px; background: var(--surface); }
.sub-card.is-aktion { border-color: var(--wheat); box-shadow: inset 4px 0 0 var(--wheat); }
.sub-card.is-abgelehnt { opacity: .9; }
.sub-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sub-tag { flex: none; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.sub-tag.wait { background: var(--flour); color: var(--crust); border: 1px solid var(--line); }
.sub-tag.act  { background: var(--wheat); color: var(--wheat-ink); }
.sub-tag.live { background: var(--open); color: #fff; }
.sub-tag.no   { background: var(--closed); color: #fff; }
.sub-msg { margin: 4px 0 0; font-size: 14px; line-height: 1.4; }
.sub-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.sub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.sub-btn { padding: 8px 14px; font-size: 14px; }
.sub-alert { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--wheat) 25%, transparent); font-size: 14px; font-weight: 600; }
.sub-request { margin: 4px 0 8px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--wheat) 25%, transparent); border-left: 4px solid var(--wheat); font-size: 14px; line-height: 1.4; }
.photo-list { margin-top: 16px; }
.photo-list summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.sub-head-inline { font-weight: 700; margin-right: 4px; }
.photo-items { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
#profile-btn { position: relative; }
#profile-btn.has-alert::before { content: ""; position: absolute; top: 2px; right: 2px; z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: var(--closed); border: 2px solid var(--surface); }
.suggest-form { gap: 6px; }
.suggest-form small { font-weight: 400; color: var(--muted); }
.suggest-form textarea { width: 100%; font: 16px/1.4 var(--font-body); color: var(--crust); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.suggest-form .btn-secondary { margin-top: 6px; }
.s-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.s-row > div { display: grid; gap: 6px; }
.s-hint { margin: 2px 0; font-size: 13px; color: var(--muted); }
.s-map { height: 220px; border-radius: 12px; border: 1px solid var(--line); background: var(--flour); margin: 4px 0 8px; }
.s-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 10px 0 4px; display: grid; gap: 6px; }
.s-fieldset legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.s-hours { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.s-hours label { margin: 0 !important; }
.s-hours input { padding: 8px 10px !important; }
.s-check { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; margin: 2px 0 !important; cursor: pointer; }
.auth-form .s-check input { width: 20px; height: 20px; padding: 0; flex: none; accent-color: var(--open); }

/* ---------- Logo im Bäckerei-Panel ---------- */
.b-head { display: flex; align-items: center; gap: 14px; margin: 4px 44px 6px 0; }
.b-head-text { min-width: 0; }
.b-head .b-name { margin: 2px 0 4px; }
.b-head .b-addr { margin-bottom: 0; }
.b-logo {
  flex: none; width: 72px; height: 72px; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center; background: var(--flour); border: 1px solid var(--line);
}
.b-logo.has-logo { background: #fff; }
.b-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.b-logo-ph { color: var(--muted); opacity: .7; display: grid; place-items: center; }
.b-status { margin-top: 12px; }

/* ---------- Foto vorschlagen ---------- */
.photo-suggest-btn { margin-top: 10px; }
.photo-pick { position: relative; display: grid !important; gap: 2px; justify-items: center; text-align: center; cursor: pointer;
  padding: 16px; border: 1.5px dashed var(--muted); border-radius: 12px; margin: 6px 0 !important; }
.photo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-pick span { font-weight: 700; }
.photo-pick small { color: var(--muted); font-weight: 400; }
.photo-pick:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; }
.photo-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.photo-preview:empty { display: none; }
.photo-preview figure { margin: 0; }
.photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.photo-preview figcaption { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-preview .too-many img { opacity: .35; }
.photo-preview .too-many figcaption { color: var(--closed); }
.photo-summary { margin: 12px 0 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sub-status-inline { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.sub-status-inline.wait { background: var(--wheat); color: var(--wheat-ink); }
.sub-status-inline.live { background: var(--open); color: #fff; }
.sub-status-inline.no { background: var(--line); color: var(--crust); }

/* ---------- Rechtliches, Konto & Daten, Melden ---------- */
.legal-links { position: fixed; z-index: 900; left: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 6px); display: flex; gap: 2px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: 8px; padding: 2px 4px; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.legal-links a { color: var(--crust); padding: 4px 6px; text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }
body.sheet-open .legal-links { display: none; }
.legal-mini { margin: 18px 0 4px; font-size: 13px; color: var(--muted); }
.legal-mini a { color: var(--muted); }
.agb-check span, .rights-check span { font-size: 13.5px; line-height: 1.4; }
.agb-check a, .rights-check a, .auth-note a, .agb-banner a { color: inherit; }
.agb-check, .rights-check { align-items: flex-start; }
.agb-check input, .rights-check input { margin-top: 2px; flex: none; }
.agb-banner { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--wheat) 22%, transparent); border-left: 4px solid var(--wheat); font-size: 14px; }
.agb-banner p { margin: 0 0 4px; }
.konto-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.konto-actions .btn-secondary { margin: 0; padding: 11px 10px; font-size: 14px; background: var(--flour); color: var(--crust); border: 1px solid var(--line); }
.konto-actions .btn-secondary[aria-expanded="true"] { border-color: var(--crust); }
.konto-actions .btn-secondary.danger { color: var(--closed); }
.konto-form { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.konto-delete { border-color: var(--closed); }
.konto-delete p { margin: 0 0 8px; font-size: 14px; }
.btn-danger { display: inline-flex; justify-content: center; border: 0; cursor: pointer; border-radius: 12px; padding: 13px 16px; margin-top: 8px; font: 700 15px/1 var(--font-body); background: var(--closed); color: #fff; }
.btn-danger:disabled { opacity: .6; }
.report-row { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.report-link { padding: 6px 0; }
.report-reasons .s-check { align-items: flex-start; }
.report-reasons .s-check input { margin-top: 3px; }
@media (max-width: 359px) { .konto-actions { grid-template-columns: 1fr; } }
.s-hint a, .b-empty a { color: inherit; }

/* ---------- Zwei-Faktor-Anmeldung ---------- */
.code-input { font: 700 24px/1 var(--font-body); letter-spacing: .25em; text-align: center; max-width: 220px; }
.mfa-setup p { margin: 6px 0; font-size: 14px; }
.mfa-qr { display: block; width: 180px; height: 180px; margin: 6px 0 4px; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.mfa-secret { display: inline-block; margin-top: 4px; font-size: 13px; word-break: break-all; user-select: all; }

/* =====================================================================
   Design 3a „Klar & vertraut“ – Komponenten
   (überschreibt die älteren Regeln oben; Reihenfolge ist Absicht)
   ===================================================================== */
body { font-size: 16px; }
#map { background: #eef0f3; }
/* Dunkles Design */
:root[data-theme="dark"] #map { background: #1b1e24; }

a { color: var(--primary); }

/* Kopfbereich: weiße Leiste über die ganze Breite */
.topbar {
  top: 0; left: 0; right: 0;
  display: block;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  pointer-events: auto;
}
.topbar-row { display: flex; align-items: center; gap: 10px; }
.brand {
  flex: none; display: flex; align-items: center; gap: 10px;
  background: none; box-shadow: none; padding: 0; border-radius: 0;
  color: var(--crust); text-decoration: none;
  font: 700 19px/1 var(--font-display); letter-spacing: -.01em;
}
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand span { display: none; }
.search { order: 0; flex: 1 1 auto; min-width: 0; position: relative; }
.search-icon { left: 13px; top: 13px; color: var(--muted); }
.search input {
  height: 46px; padding: 0 12px 0 42px;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: none;
  font: 400 16px/1 var(--font-body);
}
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(34,77,184,.2); }
.search-results { border-radius: 10px; border: 1px solid var(--line-soft); box-shadow: 0 8px 24px rgba(20,20,20,.14); }
.search-results li { border-radius: 6px; }
.search-results mark { background: rgba(244,193,51,.55); }

.round-btn {
  flex: none; width: 46px; height: 46px; border-radius: 8px;
  border: 1px solid var(--line); box-shadow: none; background: var(--surface); color: var(--crust);
}
.round-btn:hover { border-color: var(--crust); }

.filters {
  display: flex; gap: 8px; margin: 10px 0 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 12px; gap: 6px;
  border: 1px solid var(--line); border-radius: 6px; box-shadow: none;
  background: var(--surface); color: var(--crust);
  font: 500 14px/1 var(--font-body); white-space: nowrap;
}
.chip:hover { border-color: var(--crust); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip-check { display: none; font-weight: 700; }
.chip[aria-pressed="true"] .chip-check { display: inline; }
.chip-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--primary-ink); color: var(--primary); font-size: 12px; font-weight: 700;
}
.chip[aria-pressed="false"] .chip-count { background: var(--primary); color: var(--primary-ink); }

@media (min-width: 760px) {
  .topbar {
    display: grid; align-items: center; column-gap: 16px;
    grid-template-columns: auto minmax(220px, 440px) minmax(0, 1fr) auto;
    padding: 12px 20px;
  }
  .topbar-row { display: contents; }
  .brand { grid-column: 1; }
  .brand span { display: inline; }
  .search { grid-column: 2; grid-row: 1; }
  .filters { grid-column: 3; grid-row: 1; margin: 0; }
  #profile-btn { grid-column: 4; grid-row: 1; }
}

/* Leaflet-Bedienelemente unter die Kopfleiste */
.leaflet-top { top: var(--top-h, 120px); }
@media (min-width: 760px) { .leaflet-top.leaflet-right { top: var(--top-h, 72px); } }
.leaflet-bar a { border-radius: 0; }
.leaflet-touch .leaflet-bar { border: 1px solid var(--line); box-shadow: none; border-radius: 8px; overflow: hidden; }

/* Standort-Knopf */
.fab { border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(20,20,20,.12); width: 48px; height: 48px; }
.fab:hover { border-color: var(--crust); }

/* Toast */
.toast { top: calc(var(--top-h, 120px) + 10px); border-radius: 8px; background: #141414; color: #fff; font-size: 15px; }
.toast button { background: var(--wheat); color: #141414; border-radius: 6px; font-weight: 600; }
@media (min-width: 760px) { .toast { top: calc(var(--top-h, 72px) + 12px); } }

/* Marker: Gelb = geöffnet, Grau = geschlossen */
.bs-dot { background: var(--wheat); color: #141414; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.bs-dot.is-closed { background: #c9ccd2; color: #555; }
.bs-dot.is-active { transform: scale(1.3); box-shadow: 0 0 0 3px #141414, 0 0 0 8px rgba(244,193,51,.45); }
.bs-dot.is-fav { border-color: var(--fav); }
.me-dot { background: var(--primary); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(34,77,184,.22); }

/* ---------- Panel ---------- */
.sheet {
  z-index: 1004;
  inset: 0; max-height: none;
  background: var(--flour); border-radius: 0; box-shadow: none;
  padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
  animation: slideUp .2s ease-out;
}
.sheet-close {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  width: calc(100% + 32px); height: auto; margin: 0 -16px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 14px;
  border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0;
  background: var(--surface); color: var(--primary);
  font: 500 16px/1.2 var(--font-body); text-align: left; cursor: pointer;
}
.sheet-close span { font-size: 22px; line-height: 16px; margin-top: -2px; }
.sheet-close:hover { text-decoration: underline; }
.sheet-close:focus-visible { outline-offset: -3px; }
.sheet-handle { display: none; }
#sheet-body { padding-top: 12px; }

/* Ansichten ohne Karten (Profil, Formulare): ein weißer Block */
#sheet-body:not(:has(> .b-card)):not(:has(> .f-head)) { background: var(--surface); border-radius: 10px; padding: 16px; margin-top: 12px; }

@media (min-width: 760px) {
  .sheet {
    z-index: 1002;
    top: var(--top-h, 72px); left: 0; right: auto; bottom: 0;
    width: 420px; border-radius: 0;
    border-right: 1px solid var(--line-soft);
    animation: slideIn .2s ease-out;
  }
  .sheet-close { padding-top: 14px; }
  body.sheet-open .legal-links { display: flex; left: 432px; }
}

/* Vorschau-Karte unten (nur Handy, Bäckerei angetippt) */
@media (max-width: 759px) {
  .sheet.is-peek {
    z-index: 1002; top: auto;
    max-height: 70%;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(20,20,20,.16);
    padding: 8px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  }
  .sheet.is-peek .sheet-handle { display: block; width: 40px; height: 5px; margin: 0 auto 4px; padding: 0; cursor: pointer; background: var(--line); border-radius: 3px; }
  .sheet.is-peek .sheet-close { display: none; }
  .sheet.is-peek #sheet-body { padding-top: 0; }
  .sheet.is-peek #sheet-body > :not(.b-main) { display: none; }
  .sheet.is-peek .b-main { padding: 8px 0 0; margin: 0; border: 0; }
  .sheet.is-peek .b-logo, .sheet.is-peek .b-tags, .sheet.is-peek .b-desc, .sheet.is-peek .b-demo { display: none; }
  .sheet.is-peek .b-head { margin: 0; }
  .sheet.is-peek .b-name { font-size: 22px; }
  .sheet.is-peek .b-actions { grid-template-columns: 1fr auto auto; }
}
.b-more { display: none; }
@media (max-width: 759px) { .sheet.is-peek .b-more { display: inline-flex; } }

/* Karten im Panel */
.b-card {
  background: var(--surface); border-radius: 10px; padding: 16px;
  margin: 12px 0 0;
}
.b-card:first-child { margin-top: 0; }
.b-section { margin-top: 12px; }
.b-section h3, .b-card h3, .f-title {
  font: 600 13px/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px;
}
.b-head { margin: 0 0 6px; gap: 14px; }
.b-logo { width: 60px; height: 60px; border-radius: 10px; border: 1px solid var(--line-soft); }
.b-name { font: 700 24px/1.2 var(--font-display); letter-spacing: -.01em; margin: 0 0 6px; }
.b-head .b-name { margin: 0 0 4px; }
.b-addr { font-size: 15px; color: var(--ink-2); margin: 0 0 10px; }
.b-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 8px 0 14px; }
.b-status { margin: 0; font-size: 15px; font-weight: 600; gap: 7px; }
.b-status .dot { width: 9px; height: 9px; }
.b-dist { font-size: 15px; color: var(--ink-2); }
.b-demo { border-radius: 4px; color: var(--ink-2); margin-bottom: 6px; }

.b-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.b-route {
  min-height: 54px; padding: 0 16px; border-radius: 8px;
  background: var(--primary); color: var(--primary-ink);
  font: 600 17px/1.2 var(--font-body); gap: 10px;
}
.b-route:hover { background: var(--primary-hover); filter: none; }
.b-route:focus-visible { outline: 3px solid var(--crust); outline-offset: 2px; }
.b-more {
  align-items: center; justify-content: center;
  min-height: 54px; padding: 0 18px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--crust);
  font: 600 17px/1 var(--font-body);
}
.b-more:hover { border-color: var(--crust); }
.b-fav { width: 54px; min-height: 54px; border-radius: 8px; border: 1px solid var(--line); }
.b-fav:hover { border-color: var(--crust); }
.b-tags { margin: 14px 0 0; }
.b-tags span { border-radius: 4px; background: var(--flour); color: var(--ink-2); font-size: 13px; padding: 4px 8px; }
.b-desc { color: var(--ink-2); font-size: 15px; }

.b-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; }
.b-checklist li { display: flex; align-items: flex-start; gap: 8px; }
.b-checklist .b-check { flex: none; color: var(--primary); margin-top: 3px; }
.b-checklist span { display: grid; }
.b-checklist strong { font-weight: 500; font-size: 16px; }
.b-checklist small { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.b-hours td { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 16px; }
.b-hours tr:first-child td { padding-top: 0; }
.b-hours tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.b-hours tr.today td { font-weight: 600; }
.b-hours tr.today td:first-child::after { content: " · heute"; font-weight: 400; color: var(--muted); font-size: 14px; }

.b-offers { list-style: none; margin: 0; padding: 0; gap: 0; }
.b-offer { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 10px 0; align-items: baseline; }
.b-offer:first-child { padding-top: 0; }
.b-offer:last-child { border-bottom: 0; padding-bottom: 0; }
.b-offer > span:first-child { display: grid; }
.b-offer strong { font-weight: 400; font-size: 16px; }
.b-offer small { color: var(--muted); font-size: 14px; }
.b-offer .price { font-weight: 700; font-size: 16px; }

.b-contact a { border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--crust); font-weight: 500; }
.b-contact a:hover { background: var(--surface); border-color: var(--crust); }
.b-photos img { border-radius: 6px; }
.report-row { margin: 16px 0 0; padding: 0 4px; }

/* Knöpfe & Links */
.btn-primary, .btn-secondary, .btn-danger { min-height: 48px; border-radius: 8px; font: 600 16px/1.2 var(--font-body); padding: 12px 16px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--crust); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--crust); }
.btn-link { color: var(--primary); font: 500 15px/1.2 var(--font-body); text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.legal-mini a, .s-hint a, .b-empty a { color: var(--primary); }
.tabs { background: var(--surface); border: 1.5px solid var(--primary); border-radius: 8px; padding: 0; overflow: hidden; gap: 0; }
.tabs button { border-radius: 0; color: var(--primary); font: 500 15px/1 var(--font-body); padding: 11px; }
.tabs button[aria-selected="true"] { background: var(--primary); color: var(--primary-ink); box-shadow: none; }
.auth-form input, .field input, .field textarea, .field select, .suggest-form textarea { border: 1px solid var(--line); border-radius: 8px; }
.auth-form label { font-weight: 500; font-size: 15px; }
.auth-form .s-check input { accent-color: var(--primary); }
.auth-note { border-radius: 8px; }
.fav-list button { border-radius: 8px; border-color: var(--line); }
.fav-list button:hover { border-color: var(--primary); }
.sub-card, .photo-items li, .konto-form, .s-fieldset, .s-map { border-radius: 8px; }
.konto-actions .btn-secondary { background: var(--surface); border-radius: 8px; min-height: 44px; }
.konto-actions .btn-secondary[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.photo-pick { border-radius: 8px; border-color: var(--line); }

/* ---------- Filter-Ansicht ---------- */
.f-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.f-head .b-name { margin: 0; }
.f-reset { padding: 6px 0; font-size: 16px; }
.f-card { padding: 0 16px; }
.f-list { list-style: none; margin: 0; padding: 0; }
.f-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line-soft); }
.f-row:last-child { border-bottom: 0; }
.f-row label { flex: 1; display: grid; padding: 12px 0; cursor: pointer; }
.f-label { font-size: 16px; }
.f-hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.f-card + .b-card .f-title { text-transform: none; letter-spacing: 0; font: 400 16px/1.3 var(--font-body); color: var(--crust); }

.switch {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  position: relative; width: 46px; height: 28px; border-radius: 14px;
  background: var(--toggle-off); transition: background .15s ease;
}
.switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease;
}
.switch:checked { background: var(--primary); }
.switch:checked::before { transform: translateX(18px); }
.switch:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.segmented { display: grid; grid-template-columns: repeat(4, 1fr); border: 1.5px solid var(--primary); border-radius: 8px; overflow: hidden; }
.segmented button {
  border: 0; border-left: 1.5px solid var(--primary); background: var(--surface); color: var(--primary);
  min-height: 42px; font: 500 15px/1 var(--font-body); cursor: pointer;
}
.segmented button:first-child { border-left: 0; }
.segmented button[aria-checked="true"] { background: var(--primary); color: var(--primary-ink); }
.segmented button:focus-visible { outline: 3px solid var(--crust); outline-offset: -3px; }
#f-show { min-height: 54px; font-size: 17px; margin-top: 16px; }
.sheet .btn-block + .btn-block { margin-top: 8px; }

/* App installieren & Zwei-Faktor */
.mfa-qr { border-radius: 8px; }
.b-route { white-space: nowrap; }
@media (max-width: 759px) {
  .sheet.is-peek .b-fav { display: none; }
  .sheet.is-peek .b-actions { grid-template-columns: 1fr auto; }
}
@media (max-width: 359px) { .b-route { font-size: 16px; padding: 0 10px; } .b-more { padding: 0 12px; } }
/* Dunkles Design */
:root[data-theme="dark"] a, :root[data-theme="dark"] .btn-link, :root[data-theme="dark"] .sheet-close, :root[data-theme="dark"] .legal-mini a, :root[data-theme="dark"] .s-hint a, :root[data-theme="dark"] .b-empty a, :root[data-theme="dark"] .f-reset { color: #8fb0ff; }:root[data-theme="dark"] .tabs button:not([aria-selected="true"]), :root[data-theme="dark"] .segmented button:not([aria-checked="true"]) { color: #8fb0ff; }:root[data-theme="dark"] .chip-count { color: var(--primary); }


/* =====================================================================
   Kopfbereich ohne Leiste: Suche, Filter und Knöpfe schweben über der Karte
   ===================================================================== */
.admin-bar .brand span { display: inline; }
.topbar {
  background: transparent; border-bottom: 0;
  pointer-events: none;
}
.topbar-row > *, .filters > * { pointer-events: auto; }
.topbar-row, .filters { pointer-events: none; }
.topbar .brand img { box-shadow: 0 2px 8px rgba(20,20,20,.22); border-radius: 10px; width: 46px; height: 46px; }
.search input { border-color: transparent; box-shadow: 0 2px 10px rgba(20,20,20,.16); }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(34,77,184,.25), 0 2px 10px rgba(20,20,20,.16); }
.round-btn { border-color: transparent; box-shadow: 0 2px 10px rgba(20,20,20,.16); }
.round-btn:hover { border-color: var(--line); }
.filters { padding: 4px 4px 8px; margin: 4px -4px -8px; }
.chip { height: 34px; border-color: transparent; box-shadow: 0 1px 6px rgba(20,20,20,.18); }
.chip:hover { border-color: var(--line); }
.chip[aria-pressed="true"] { border-color: var(--primary); }
@media (min-width: 760px) {
  .topbar .brand {
    background: var(--surface); padding: 5px 16px 5px 5px; border-radius: 10px;
    box-shadow: 0 2px 10px rgba(20,20,20,.16);
  }
  .topbar .brand img { width: 36px; height: 36px; box-shadow: none; border-radius: 8px; }
  .topbar .filters { padding: 6px 4px; margin: 0; }
  /* Panel als schwebende Karte links */
  .sheet {
    top: var(--top-h, 72px); left: 16px; bottom: 16px; width: 400px;
    border: 0; border-radius: 12px;
    box-shadow: 0 6px 24px rgba(20,20,20,.18);
  }
  .sheet-close { border-radius: 12px 12px 0 0; }
  body.sheet-open .legal-links { left: 428px; }
}
:root[data-theme="dark"] .search input, :root[data-theme="dark"] .round-btn,
:root[data-theme="dark"] .chip, :root[data-theme="dark"] .fab,
:root[data-theme="dark"] .topbar .brand img { box-shadow: 0 2px 10px rgba(0,0,0,.55); }
:root[data-theme="dark"] .chip { border-color: var(--line); }

/* Knopf helles / dunkles Design */
.fab-theme { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
body.sheet-open .fab-theme { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px + var(--sheet-h, 0px)); }
@media (min-width: 760px) { body.sheet-open .fab-theme { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); } }
[data-theme-toggle] .ic-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .ic-sun { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .ic-moon { display: none; }
.theme-btn {
  flex: none; width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--crust);
}
.theme-btn:hover { border-color: var(--crust); }
.theme-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.theme-btn svg { width: 20px; height: 20px; }
:root[data-theme="dark"] a.b-route, :root[data-theme="dark"] a.btn-primary { color: var(--primary-ink); }
:root[data-theme="dark"] a.btn-secondary, :root[data-theme="dark"] .b-contact a { color: var(--crust); }
:root[data-theme="dark"] .brand, :root[data-theme="dark"] .legal-links a { color: var(--crust); }
:root[data-theme="dark"] .leaflet-bar a { background: var(--surface); color: var(--crust); border-bottom-color: var(--line); }
:root[data-theme="dark"] .leaflet-touch .leaflet-bar { border-color: var(--line); }
:root[data-theme="dark"] .leaflet-control-attribution { background: rgba(26,29,35,.85); color: var(--muted); }
:root[data-theme="dark"] .leaflet-control-attribution a { color: #8fb0ff; }

/* Logo 1c „Ausfahrtsschild" */
.brand-sign { display: inline-flex; background: #224db8; border-radius: 9px; padding: 3px; flex: none; }
.brand-frame { display: inline-flex; align-items: center; gap: 9px; border: 2.5px solid #fff; border-radius: 6.5px; padding: 4px 12px 4px 8px; color: #fff; }
.brand-brezel { width: 30px; height: 30px; flex: none; display: block; }
.brand-text { display: grid; line-height: 1; }
.brand-name { font: 800 18px/1.05 "Archivo", var(--font-display, sans-serif); letter-spacing: -.005em; color: #fff; white-space: nowrap; }
.brand-exit { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font: 700 11px/1 "Archivo", var(--font-body, sans-serif); color: #ffcf3d; white-space: nowrap; }
.brand-exit svg { width: 11px; height: 11px; }
/* Karte: am Handy nur das Schild-Symbol, am Computer das ganze Schild */
.topbar .brand { background: none !important; padding: 0 !important; box-shadow: none !important; border-radius: 0; }
.topbar .brand .brand-icon { display: block; width: 46px; height: 46px; border-radius: 10px; box-shadow: 0 2px 8px rgba(20,20,20,.22); }
.topbar .brand .brand-sign { display: none; }
@media (min-width: 760px) {
  .topbar .brand .brand-icon { display: none; }
  .topbar .brand .brand-sign { display: inline-flex; box-shadow: 0 2px 10px rgba(20,20,20,.22); }
}
.brand .brand-sign span { display: inline-flex; }
.brand .brand-text { display: grid !important; }
.admin-bar .brand { display: inline-flex; align-items: center; gap: 10px; }
.admin-bar .brand .brand-admin { font: 700 16px/1 var(--font-body); color: var(--muted); }
:root[data-theme="dark"] .brand-sign { box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.admin-bar .brand .brand-sign, .admin-bar .brand .brand-frame, .admin-bar .brand .brand-exit, .admin-bar .brand .brand-name { display: inline-flex; }
.admin-bar .brand .brand-admin { display: inline; }
@media (max-width: 420px) { .admin-bar .brand .brand-exit { display: none; } }

/* Panel mit dem Finger schieben (Handy) */
@media (max-width: 759px) {
  .sheet { transition: transform .22s ease, height .22s ease; touch-action: pan-y; }
  .sheet.is-dragging { transition: none; }
  .sheet.is-peek .sheet-handle { width: 44px; height: 5px; margin: 2px auto 8px; }
  /* Griff auch in der ganzen Ansicht anzeigen: nach unten ziehen schließt */
  .sheet:not(.is-peek) .sheet-close::before {
    content: ""; position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 5px); transform: translateX(-50%);
    width: 36px; height: 4px; border-radius: 2px; background: var(--line);
  }
}
@media (max-width: 759px) {
  /* Beim Hochziehen schon den Rest der Bäckerei zeigen */
  .sheet.is-peek.is-dragging #sheet-body > :not(.b-main) { display: revert; }
  .sheet.is-peek.is-dragging .b-tags { display: flex; }
  .sheet.is-peek.is-dragging .b-desc { display: block; }
}

/* Änderungen an eigenen Vorschlägen */
.sub-change .sub-tag { margin-right: 4px; }
.sub-actions .btn-secondary.sub-btn { width: auto; margin: 0; min-height: 40px; }
