/* ==========================================================================
   Mittavia – Design-System & Layout
   Ruhige neutrale Flaeche, EIN Markenblau. Gruen/Gelb/Rot sind ausschliesslich
   der eigenen Markierung vorbehalten und werden nirgends dekorativ benutzt.
   ========================================================================== */

:root {
  --brand:        #2E6FCB;
  --brand-dark:   #245BA8;
  --brand-soft:   #EDF3FC;
  --brand-line:   #CFE0F8;

  /* Logofarben. Bewusst eigene Tokens neben den Oberflaechenfarben: Die Marke
     soll sich nicht mitverschieben, wenn die App einmal andere Blautoene
     bekommt. */
  --logo-navy:    #0C2C5A;
  --logo-coral:   #FA5A47;
  --logo-cyan:    #12C0D4;

  --ink:          #1A1F26;
  --ink-2:        #39414A;
  --ink-3:        #5F6872;
  --ink-4:        #939BA4;
  --line:         #E6E9ED;
  --line-strong:  #D3D9E0;
  --bg:           #F4F6F8;
  --surface:      #FFFFFF;
  --surface-2:    #FAFBFC;

  /* Markierung – nur hierfuer */
  --m-green:      #2F8F4E;
  --m-yellow:     #C08A16;
  --m-red:        #C43D34;
  --m-rejected:   #A3231A;

  /* Kategorien: nur als zarte Tinte in Chips, nie als Markerfarbe */
  --c-hotel:      #2E6FCB;
  --c-restaurant: #7C5CD6;
  --c-realestate: #0E7C86;

  --radius:      13px;
  --radius-sm:   9px;
  --radius-pill: 999px;

  --sh-1: 0 1px 2px rgba(20,30,45,.05);
  --sh-2: 0 3px 10px rgba(20,30,45,.08);
  --sh-3: 0 14px 36px rgba(20,30,45,.16), 0 2px 8px rgba(20,30,45,.06);

  --header-h: 56px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Klassen mit display:flex wuerden das hidden-Attribut sonst aushebeln. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--brand); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ============================ Bedienelemente ============================ */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 36px; padding: 0 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2);
  border-radius: var(--radius-sm);
  font-weight: 550; font-size: 14px; cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-4); color: var(--ink); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: rgba(20,30,45,.055); border-color: transparent; }
.btn--quiet { background: transparent; border-color: var(--line); color: var(--ink-3); font-weight: 500; }
.btn--quiet:hover { background: var(--surface); color: var(--ink); }
.btn--sm { min-height: 31px; padding: 0 10px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }
.btn--icon { padding: 0; width: 36px; justify-content: center; }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 0; background: transparent;
  color: var(--ink-3); border-radius: 8px; cursor: pointer; font-size: 19px; line-height: 1;
}
.iconbtn:hover { background: rgba(20,30,45,.07); color: var(--ink); }
.iconbtn svg { width: 17px; height: 17px; }
.ico { width: 17px; height: 17px; flex: none; }

.input, .select {
  width: 100%; min-height: 36px; padding: 6px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  transition: border-color .14s, box-shadow .14s;
}
.input:focus, .select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,111,203,.13);
}
.input--area { resize: vertical; min-height: 66px; line-height: 1.45; }

.select {
  appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235F6872' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px;
}
.select--sm { min-height: 31px; font-size: 13px; padding: 3px 26px 3px 9px; width: auto; }

.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.blocktitle {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-4);
}

/* ============================ Kopfzeile ============================ */

.app-header {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h); padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
/* line-height: 0 – sonst ist die Box um das SVG durch die Zeilenhoehe hoeher
   als das SVG selbst, und die Wortmarke sitzt sichtbar tiefer als das Logo. */
.brand__mark { display: block; flex: none; }
/*
 * Wortmarke in drei Farben: Mitt | a | via. Der rote Buchstabe sitzt in der
 * optischen Mitte des Worts – das ist der Name. Getrennt wird nach "Mitt",
 * nicht nach "Mit": Letzteres ist ein deutsches Wort, an dem das Auge
 * haengenbleibt, und "Mitt" fuehrt zum Namenssinn (Mitte).
 */
.brand__name {
  font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1;
  color: var(--logo-navy);
}
.brand__a { color: var(--logo-coral); }
.brand__via { color: var(--logo-cyan); }

/* White-Label-Schaufenster: Partnername neben der Mittavia-Wortmarke
   („Mittavia › Makler Mueller · 12 Objekte“). Mittavia bleibt sichtbar als
   Lage-Lieferant, der Partner ist der Absender der Objekte. */
.cobrand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cobrand__sep { color: var(--ink-4); font-size: 16px; flex: none; }
.cobrand__name {
  font-size: 15px; font-weight: 700; color: var(--ink-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw;
}
.cobrand__count {
  font-size: 12px; color: var(--ink-4); flex: none;
  padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px;
}
.cobrand__site { font-size: 12px; color: var(--brand, var(--logo-cyan)); text-decoration: none; flex: none; }
.cobrand__site:hover { text-decoration: underline; }
/* Im Schaufenster ist die Kategorie fix (nur Immobilien) und der Besucher
   richtet nichts ein – Assistent-Knopf und der frei benennbare Projekttitel
   waeren verwirrend. */
body.is-partner .project-title,
body.is-partner [data-action="wizard"] { display: none; }

/* Dezenter „Für Makler"-Einstieg oben rechts: fuehrt zur Partner-Landingpage.
   Zurueckhaltend (Ghost, kleine Schrift); im Schaufenster ausgeblendet. */
.head-partner {
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  gap: 6px; padding: 6px 11px;
}
.head-partner .ico { width: 16px; height: 16px; }
.head-partner:hover { color: var(--brand); }
body.is-partner .head-partner { display: none; }
@media (max-width: 720px) {
  .head-partner__t { display: none; }         /* schmal: nur das Icon */
  .head-partner { padding: 6px 8px; }
}
@media (max-width: 640px) {
  .cobrand__count, .cobrand__site { display: none; }
  .cobrand__name { max-width: 46vw; font-size: 14px; }
}

.project-title { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.project-title__pen { width: 15px; height: 15px; color: var(--ink-4); flex: none; }
.project-title__input {
  width: min(360px, 100%); padding: 5px 10px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; border-bottom-color: var(--line-strong);
  font-size: 15.5px; font-weight: 700; color: var(--ink); letter-spacing: -.01em;
}
.project-title__input:hover { background: var(--surface-2); border-color: var(--line); }
.project-title__input:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,111,203,.13); }
.project-title__hint { font-size: 12px; color: var(--ink-4); white-space: nowrap; }
.project-title__hint.is-flash { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 2px; flex: none; }

/* ============================ Toolbar ============================ */

.toolbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 9px 16px; }
.toolbar__row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.toolbar__row--filters {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); gap: 20px;
}

.searchfield { position: relative; display: flex; align-items: center; gap: 6px; flex: 0 1 330px; }
.searchfield__box { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.searchmode { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); padding: 2px; flex: none; }
.searchmode__btn { border: 0; background: transparent; color: var(--ink-3); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-pill); cursor: pointer; line-height: 1; }
.searchmode__btn.is-on { background: var(--brand); color: #fff; }
/* IMMER eine einzige Zeile – nie umbrechen (sonst landet z. B. „Geöffnet“
   allein in einer neuen Zeile). Passt nicht alles, wird horizontal gescrollt. */
.qfilter { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.qfilter::-webkit-scrollbar { display: none; }

/* Optionale „Urlaub"-Leiste (Hotel/Camping). */
.travel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.travel__toggle { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  padding: 4px 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; white-space: nowrap; }
.travel__toggle[aria-expanded="true"] { display: none; }
.travel__fields { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.travel__f { display: inline-flex; flex-direction: column; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.travel__in { min-width: 140px; }
.travel__num { width: 84px; }
.travel__pets { flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.travel__ages { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.travel__hide { border: 0; background: none; font: inherit; font-size: 20px; line-height: 1;
  color: var(--ink-4); cursor: pointer; padding: 0 6px; align-self: center; }
.travel__hide:hover { color: var(--ink-2); }
.qfilter__lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-3); flex: 0 0 auto; }
.qfilter__grp { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex: 0 0 auto; }
.qfilter__lbl--sub { margin-left: 2px; flex: 0 0 auto; }
.qfilter__hint { font-size: 11px; color: var(--ink-4); flex: 0 0 auto; white-space: nowrap; }
.qfilter__hint a { color: inherit; text-decoration: underline; }
.openst { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.openst--open { background: rgba(31,157,85,.13); color: var(--m-green, #1f9d55); }
.openst--soon { background: rgba(198,124,0,.14); color: #c67c00; }
.openst--closed { background: rgba(210,63,63,.12); color: #d23f3f; }
.hstars { color: #C79200; font-size: 12px; letter-spacing: .5px; white-space: nowrap; }
.hstars__off { color: var(--ink-4, #c8ccd4); }

/* Zwei-Reiter-Karte (CSS-only: versteckte Radios steuern die Panels). */
.bubtabs { margin-top: 8px; border-bottom: 1px solid var(--line, #e6e8ee); }
.bubtab__in { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bubtab { display: inline-block; padding: 6px 12px; font-size: 13px; font-weight: 700;
  color: var(--ink-3, #6b7280); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.bubtab__in:checked + .bubtab { color: #2563EB; border-bottom-color: #2563EB; }
.bubpanel { display: none; padding-top: 10px; }
.bubtab__in:nth-of-type(1):checked ~ .bubpanel--ov { display: block; }
.bubtab__in:nth-of-type(2):checked ~ .bubpanel--det { display: block; }
.bub__desc { font-size: 13px; line-height: 1.45; color: var(--ink-2, #374151); margin: 2px 0 10px; }
/* Kurzbeschreibung im Ueberblick: hoechstens drei Zeilen, damit die Bubble
   nicht auseinanderlaeuft. */
.bub__desc--ov {
  margin: 6px 0 4px; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
/* Leaflet setzt `.leaflet-container a { color:#0078A8 }` (mit Unterstrich) und
   ueberschreibt damit in der Karten-Bubble unsere Button-Farbe. Hier gezielt
   zuruecknehmen, sonst steht der Angebots-Button blau auf blau. */
.leaflet-container .bub a.btn { color: var(--ink-2); text-decoration: none; }
.leaflet-container .bub a.btn--primary { color: #fff; text-decoration: none; }
.leaflet-container .bub a.btn--primary:hover { color: #fff; }

/* Quellenbeschriftete Info-Bloecke (Anbieter / Google / Tripadvisor). */
.srcinfo { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 6px; }
.srcinfo__block { border-left: 3px solid var(--line-strong); padding: 1px 0 1px 10px; }
.srcinfo__block--provider { border-left-color: var(--brand); }
.srcinfo__block--google { border-left-color: #C08A16; }
.srcinfo__block--ta { border-left-color: #2F8F4E; }
.srcinfo__block--booking { border-left-color: #003580; }
.srcinfo__title { margin: 0 0 3px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.srcinfo__desc { font-size: 13px; line-height: 1.45; color: var(--ink-2); margin: 4px 0; }
.srcinfo__meta { font-size: 12px; color: var(--ink-3); margin: 3px 0; }
.srcinfo__empty { font-size: 12px; color: var(--ink-4); margin: 2px 0; }
.srcinfo__photo { display: block; width: 100%; max-height: 150px; object-fit: cover;
  border-radius: 8px; margin: 2px 0 8px; }
.srcinfo__review { font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
  margin: 6px 0 2px; font-style: italic; }
.srcinfo__review strong { font-style: normal; }
.srcinfo__link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  margin-top: 4px; color: var(--brand-dark); text-decoration: none; }
.srcinfo__link:hover { text-decoration: underline; }
.srcinfo__link svg { width: 14px; height: 14px; flex: none; }
/* Leaflet faerbt Links in der Bubble sonst teal – hier auf Markenfarbe halten. */
.leaflet-container .bub a.srcinfo__link { color: var(--brand-dark); }
.bub__src { font-size: 11px; color: var(--ink-4, #9aa0aa); margin-top: 10px; }
.hours { margin: 4px 0 10px; }
.hrow { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 2px 0; }
.hrow > span { color: var(--ink-3, #6b7280); }
.hrow > b { font-weight: 600; }
.hrow--today > span, .hrow--today > b { color: #2563EB; font-weight: 700; }

/* Zeile 2: Suchform (Wolke/Route) + Umkreis direkt nebeneinander. */
.refbar__analyze { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Zeile 3: Analysieren – Hauptaktion, volle Breite. */
.refbar__actions { display: flex; align-items: center; gap: 8px; }
.refbar__actions .btn--primary { white-space: nowrap; }
.refbar__go { flex: 1; justify-content: center; font-size: 14px; padding-top: 9px; padding-bottom: 9px; }

/* Einklapp-Pfeil der Suchleiste – hervorgehoben (nicht wie die stillen Icons). */
.head__collapse {
  background: var(--brand-soft, #eef3ff); color: var(--brand-dark, #1d4ed8);
  border: 1px solid var(--brand, #2563EB); border-radius: var(--radius-pill, 999px);
}
.head__collapse:hover { background: var(--brand, #2563EB); color: #fff; }
.head__collapse .ico--chev { transition: transform .2s ease; }
/* Kopf-Bookmark „Meine Auswahl" mit Zähler-Badge – wie in der App. */
.head__sel { position: relative; }
.head__badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--brand, #2563EB); color: #fff;
  border: 1.5px solid var(--surface, #fff);
  font-size: 9.5px; font-weight: 800; font-style: normal; line-height: 1;
}
/* Eingeklappt: Pfeil zeigt nach unten (aufklappen). */
.head__collapse[aria-pressed="true"] .ico--chev { transform: rotate(180deg); }
/* Suchform-Umschalter Wolke/Route – wie ein kleiner Segment-Schalter. */
.searchshape { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-2, #eef1f6);
  border-radius: var(--radius-pill, 999px); }
.searchshape__btn { border: 0; background: transparent; border-radius: 999px; padding: 4px 11px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-3, #6b7280); cursor: pointer; white-space: nowrap; }
.searchshape__btn.is-on { background: #2563EB; color: #fff; box-shadow: var(--sh-1); }
.searchshape__btn:disabled { opacity: .45; cursor: not-allowed; }
.umkreis { display: flex; align-items: center; gap: 4px; }
.umkreis__lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-3, #6b7280); margin-right: 2px; }
.umkreis__btn { border: 1px solid var(--line, #e6e8ee); background: var(--surface, #fff);
  color: var(--ink-2, #374151); border-radius: var(--radius-pill, 999px); padding: 4px 10px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.umkreis__btn:hover { border-color: #93b4f5; }
.umkreis__btn.is-on { background: #2563EB; border-color: #2563EB; color: #fff; }
.refbar__analyze .btn--primary { white-space: nowrap; }

/* Live-Fortschritt bei grossen Suchen – oben mittig ueber der Karte. */
.loadbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 645; width: min(340px, calc(100% - 24px)); background: var(--surface, #fff);
  border: 1px solid var(--line, #e6e8ee); border-radius: 12px; box-shadow: var(--sh-2, 0 6px 20px rgba(15,23,42,.14));
  padding: 9px 12px; }
.loadbar__row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2, #374151); margin-bottom: 7px; }
.loadbar__spin { width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid #c7d2fe; border-top-color: #2563EB; animation: loadbar-spin .8s linear infinite; }
@keyframes loadbar-spin { to { transform: rotate(360deg); } }
.loadbar__track { height: 6px; border-radius: 999px; background: var(--surface-2, #eef1f6); overflow: hidden; }
.loadbar__fill { height: 100%; background: #2563EB; border-radius: 999px; transition: width .25s ease; }
/* Generischer Ladezustand (jede Suche): nur Spinner + Text, kein %-Balken. */
.loadbar--indet .loadbar__track { display: none; }

/* Grosse, bleibende Karten-Einblendung „naeher heranzoomen" (POI zu weit raus). */
.poi-zoomhint {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 1200; pointer-events: none;
  background: rgba(37, 99, 235, .96); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 1.25;
  padding: 12px 20px; border-radius: 999px; text-align: center;
  max-width: 88%; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  animation: poihint-in .18s ease-out;
}
@keyframes poihint-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 560px) { .poi-zoomhint { font-size: 13.5px; padding: 10px 16px; } }

/* Szenario-Landingpages + Presse. */
.lp__eyebrow { text-transform: uppercase; letter-spacing: 1.2px; font-size: 12.5px;
  font-weight: 800; color: #2563EB; margin: 0 0 6px; }
.lp__hero { display: block; width: 100%; height: auto; max-width: 760px;
  border-radius: 16px; margin: 22px 0 8px; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
.pr { border-left: 3px solid #2563EB; padding: 4px 0 4px 18px; margin: 8px 0 4px; }
.pr__kicker { font-size: 12.5px; font-weight: 700; color: var(--ink-3, #6b7280);
  text-transform: uppercase; letter-spacing: .6px; margin: 0 0 6px; }
.pr__boiler { font-size: 13.5px; color: var(--ink-3, #6b7280); margin-top: 14px; }
.lp__usecases { max-width: 900px; margin: 24px auto 0; padding: 14px 22px; font-size: 13.5px;
  color: var(--ink-2, #374151); line-height: 1.9; }
.lp__usecases a { color: #2563EB; text-decoration: none; }
.lp__usecases a:hover { text-decoration: underline; }
.qfilter__sel { font: inherit; font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); background: #fff; color: var(--ink-2); cursor: pointer; }
.restkind { display: inline-flex; gap: 6px; flex-wrap: nowrap; flex: 0 0 auto; margin-left: 0; }
.restkind__btn { white-space: nowrap; }
.restkind__btn { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2);
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: var(--radius-pill); cursor: pointer; }
.restkind__btn.is-on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-dark); }
.searchfield__suggest { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sh-3);
  max-height: 320px; overflow-y: auto; padding: 5px; margin: 0; }
.searchfield__ico { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--ink-4); pointer-events: none; }
.searchfield__input {
  width: 100%; min-height: 36px; padding: 7px 32px 7px 34px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface-2);
}
.searchfield__input:focus { outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,111,203,.13); }
.searchfield__input::-webkit-search-cancel-button { display: none; }
.searchfield__clear {
  position: absolute; right: 7px; width: 22px; height: 22px; border: 0;
  background: rgba(20,30,45,.08); color: var(--ink-3); border-radius: 50%; cursor: pointer; line-height: 1;
}

/* Sucheinstieg: eine Auswahl, ein Bedienelement – nicht drei Schalter. */
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); flex: none;
}
.seg {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 12px; border: 0; background: transparent;
  border-radius: var(--radius-pill); cursor: pointer;
  font-size: 13.5px; font-weight: 550; color: var(--ink-3); white-space: nowrap;
  transition: background .14s, color .14s;
}
.seg__ico { width: 16px; height: 16px; flex: none; opacity: .7; display: inline-flex; }
.seg__ico svg { width: 100%; height: 100%; }
/* Kategorie-Leiste wie in der App: die AKTIVE Kategorie voll (Icon + Name,
   farbig gefüllt), die übrigen nur als Icon zusammengeschoben. Der Name klappt
   weich ein/aus. */
.seg { gap: 0; padding: 0 9px; }
.seg__txt {
  max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap;
  transition: max-width .2s ease, opacity .14s ease, margin-left .2s ease;
}
/* Inaktive Icons in Kategoriefarbe (Wiedererkennung), aktiv dann weiß. */
.seg[data-category="hotel"]      { color: #2E6FCB; }
.seg[data-category="restaurant"] { color: #7C5CD6; }
.seg[data-category="realestate"] { color: #0E7C86; }
.seg[data-category="fuel"]       { color: #E8892B; }
.seg[data-category="camping"]    { color: #2F8F4E; }
.seg:hover { filter: brightness(.9); }
.seg[aria-checked="true"] {
  color: #fff; box-shadow: var(--sh-1); font-weight: 650; padding: 0 13px;
}
.seg[aria-checked="true"] .seg__ico { opacity: 1; }
.seg[aria-checked="true"] .seg__txt { max-width: 160px; opacity: 1; margin-left: 6px; }
.seg[data-category="hotel"][aria-checked="true"]      { background: #2E6FCB; }
.seg[data-category="restaurant"][aria-checked="true"] { background: #7C5CD6; }
.seg[data-category="realestate"][aria-checked="true"] { background: #0E7C86; }
.seg[data-category="fuel"][aria-checked="true"]       { background: #E8892B; }
.seg[data-category="camping"][aria-checked="true"]    { background: #2F8F4E; }

.field--wide { min-width: 260px; }
.field__hint { margin: 3px 0 0; font-size: 11px; color: var(--ink-4); line-height: 1.4; max-width: 300px; }
.field--sources { min-width: 100%; border-top: 1px dashed var(--line); padding-top: 10px; }
.field--sources > label { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }

.catgroup { display: flex; gap: 5px; }
.cat {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 11px;
  border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 550; color: var(--ink-3); cursor: pointer;
  transition: all .14s;
}
.cat__ico { width: 15px; height: 15px; flex: none; opacity: .6; }
.cat__count { font-size: 11px; font-weight: 700; color: var(--ink-4); }
.cat:hover { border-color: var(--ink-4); color: var(--ink); }
/* Aktiv = zarte Tinte statt Volltonfarbe: ruhiger und laesst die Ampel wirken */
.cat[aria-pressed="true"] { color: var(--ink); }
.cat[aria-pressed="true"] .cat__ico { opacity: 1; }
.cat[data-category="hotel"][aria-pressed="true"]      { background: #EDF3FC; border-color: #C3D8F5; color: #1E5299; }
.cat[data-category="restaurant"][aria-pressed="true"] { background: #F2EEFC; border-color: #D6C9F3; color: #5A3EAF; }
.cat[data-category="realestate"][aria-pressed="true"] { background: #E7F4F5; border-color: #B6DEE1; color: #0A5B62; }
.cat[aria-pressed="false"] { opacity: .62; }
.cat[aria-pressed="false"] .cat__count { text-decoration: line-through; }

.btn--optimal { border-color: var(--brand-line); color: var(--brand-dark); background: var(--brand-soft); }
.btn--optimal:hover { background: #E3EDFB; border-color: var(--brand); color: var(--brand-dark); }
.btn--optimal[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.toolbar__results { margin-left: auto; color: var(--ink-3); font-weight: 500; }
.toolbar__results strong { color: var(--ink); font-weight: 700; }

.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 1px; }
/* Saubere Ansicht (?clean=1) für Screenshots/Einbettung: Demo-Marker aus. */
body.is-clean .demochip { display: none; }

.field { display: flex; flex-direction: column; gap: 2px; min-width: 168px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.field__inline { display: flex; align-items: center; gap: 10px; }
.field__inline output { font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 74px; text-align: right; }
.field input[type=range] { flex: 1; accent-color: var(--brand); height: 20px; cursor: pointer; }

/* ============================ Bezugspunkte ============================ */

.refbar {
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
/* Zeile 1: Bezugspunkte-Liste (waechst) + „+"-Knopf direkt daneben. */
.refbar__points { display: flex; align-items: flex-start; gap: 10px; width: 100%; }
.refbar__points .refbar__add { flex: none; margin-top: 1px; }
.refbar__chips { display: flex; gap: 7px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
/* Eigener Stacking-Context ueber der Karte: sonst malt die (spaeter im DOM
   stehende) Karte samt Leaflet-Attribution ueber das geoeffnete Popover. */
.refbar__add { position: relative; flex: none; z-index: 1100; }
.plus { font-size: 16px; line-height: 1; margin-top: -1px; }

.refchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 4px 3px 9px; min-height: 32px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); max-width: 340px;
}
.refchip__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.refchip__name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  border: 0; background: transparent; padding: 2px 3px; border-radius: 5px;
  width: 13ch; min-width: 0; max-width: 190px; flex: 0 1 auto; text-overflow: ellipsis;
}
.refchip__name:hover { background: #fff; }
.refchip__name:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px var(--brand); }
.refchip__weight {
  font-size: 10.5px; font-weight: 700; color: var(--ink-3);
  background: rgba(20,30,45,.06); border: 0; border-radius: var(--radius-pill);
  padding: 2px 7px; cursor: pointer; white-space: nowrap;
}
.refchip__weight:hover { background: rgba(20,30,45,.12); color: var(--ink); }
.refchip__time {
  font-size: 10.5px; font-weight: 700; color: var(--brand-dark);
  background: var(--brand-soft); border-radius: var(--radius-pill);
  padding: 2px 7px; white-space: nowrap;
}
.refchip__act {
  width: 24px; height: 24px; border: 0; background: transparent; color: var(--ink-4);
  border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.refchip__act:hover { background: rgba(20,30,45,.08); color: var(--ink); }
.refchip__act svg { width: 14px; height: 14px; }
.refchip__act--del:hover { background: #FCEBE9; color: var(--m-red); }
.refbar__empty { font-size: 13px; color: var(--ink-3); font-style: italic; display: flex; align-items: center; min-height: 32px; }

/* Sortierbare, einklappbare Bezugspunkte-Liste (ab 4 Punkten). Haelt die Leiste
   auf dem Handy klein: eingeklappt scrollt sie in gedeckelter Hoehe. */
.refbar__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; margin-bottom: 6px; }
.refbar__count { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.refsort { display: inline-flex; gap: 3px; background: rgba(20,30,45,.05); border-radius: var(--radius-pill); padding: 2px; }
.refsort__btn {
  font-size: 11px; font-weight: 700; color: var(--ink-3); border: 0; background: transparent;
  border-radius: var(--radius-pill); padding: 3px 9px; cursor: pointer;
}
.refsort__btn.is-on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(20,30,45,.12); }
.refbar__toggle {
  margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--brand-dark);
  border: 0; background: transparent; cursor: pointer; padding: 3px 6px; border-radius: 6px;
}
.refbar__toggle:hover { background: var(--brand-soft); }
.refbar__list { display: flex; gap: 7px; flex-wrap: wrap; width: 100%; }
.refbar__list.is-collapsed { max-height: 84px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.refchip__dist { font-size: 10.5px; font-weight: 700; color: var(--ink-4); white-space: nowrap; }

/* Anker-Menue am Punkt (Leaflet-Popup): Umbenennen / Farbe / Prio / Löschen. */
.refpop { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.refpop__name {
  font-size: 13px; font-weight: 600; color: var(--ink); width: 100%; box-sizing: border-box;
  border: 1px solid var(--line-strong, #d7dbe4); background: var(--surface, #fff);
  padding: 6px 8px; border-radius: 8px;
}
.refpop__name:focus { outline: none; border-color: var(--brand, #2563EB); box-shadow: 0 0 0 2px var(--brand-soft, #dbe6ff); }
.refpop__row { display: flex; align-items: center; gap: 6px; }
.refpop__color {
  position: relative; width: 30px; height: 30px; flex: none; border-radius: 8px;
  border: 1px solid rgba(20,30,45,.18); cursor: pointer; overflow: hidden;
}
.refpop__color input[type="color"] { position: absolute; inset: -4px; width: 140%; height: 140%; border: 0; padding: 0; cursor: pointer; opacity: 0; }
.refpop__prio {
  flex: 1; font-size: 11.5px; font-weight: 700; color: var(--ink-2, #374151);
  background: rgba(20,30,45,.06); border: 0; border-radius: var(--radius-pill, 999px);
  padding: 6px 8px; cursor: pointer; white-space: nowrap;
}
.refpop__prio:hover { background: rgba(20,30,45,.12); }
.refpop__del {
  font-size: 11.5px; font-weight: 700; color: var(--m-red, #dc2626);
  background: #FCEBE9; border: 0; border-radius: var(--radius-pill, 999px);
  padding: 6px 10px; cursor: pointer; white-space: nowrap;
}
.refpop__del:hover { background: #f8d7d3; }
/* Nachfrage beim Rechtsklick: „Hier setzen?" */
.refpop--confirm { min-width: 180px; }
.refpop__q { font-size: 13px; font-weight: 600; color: var(--ink); }
.refpop__set {
  flex: 1; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--brand, #2563EB);
  border: 0; border-radius: var(--radius-pill, 999px); padding: 7px 10px; cursor: pointer;
}
.refpop__set:hover { background: var(--brand-dark, #1d4ed8); }
.refpop__cancel {
  font-size: 12.5px; font-weight: 700; color: var(--ink-2, #374151); background: rgba(20,30,45,.06);
  border: 0; border-radius: var(--radius-pill, 999px); padding: 7px 12px; cursor: pointer;
}
.refpop__cancel:hover { background: rgba(20,30,45,.12); }

/* Popover */
.popover {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 700;
  width: 318px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--sh-3);
}
.popover__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.popover__note { margin: 8px 0 0; font-size: 12px; color: var(--ink-4); line-height: 1.45; }
.popover__note.is-error { color: var(--m-red); }

.tabs { display: flex; gap: 3px; padding: 3px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 11px; }
.tab { flex: 1; padding: 6px 8px; border: 0; background: transparent; border-radius: 6px; font-size: 13px; font-weight: 550; color: var(--ink-3); cursor: pointer; }
.tab.is-on { background: var(--surface); color: var(--brand-dark); box-shadow: var(--sh-1); }
.tabpane { display: none; }
.tabpane.is-on { display: block; }

.suggest {
  list-style: none; margin: 6px 0 0; padding: 4px; max-height: 208px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.suggest button { display: block; width: 100%; text-align: left; padding: 7px 9px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1.35; }
.suggest button:hover, .suggest button:focus { background: var(--brand-soft); outline: none; }
.suggest strong { display: block; font-weight: 600; color: var(--ink); }
.suggest span { font-size: 11.5px; color: var(--ink-4); }
.refsug__empty { padding: 8px 9px; font-size: 12px; color: var(--ink-4); }
.refsug__hint { padding: 8px 9px; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.refsug__eg { display: block; color: var(--ink-4); font-size: 11.5px; }
.refsug__region { padding: 6px 9px; font-size: 11px; font-weight: 700; color: var(--ink-4);
  background: var(--surface-2, #eef1f6); border-bottom: 1px solid var(--line); letter-spacing: .01em; }

/* ============================ Karte ============================ */

.mapwrap {
  position: relative;
  /* Hoehe kommt aus JS (--map-h): sie misst, wie viel Platz oberhalb wirklich
     belegt ist. Damit waechst die Karte automatisch, sobald die Suchleiste
     eingeklappt wird – in jedem Layout, ohne Magic Numbers je Breakpoint. */
  height: var(--map-h, clamp(420px, calc(100vh - 320px), 820px));
  min-height: 360px;
  background: #E9EDF0;
  border-bottom: 1px solid var(--line);
}
.map { position: absolute; inset: 0; }

.map-banner {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 620;
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
  width: min(320px, calc(100% - 24px)); padding: 11px 13px;
  background: rgba(17, 24, 39, .94); color: #fff; border-radius: 14px;
  box-shadow: var(--sh-3); font-size: 13px; font-weight: 500; line-height: 1.35;
}
.map-banner__txt { text-align: center; }
.map-banner__btns { display: flex; gap: 8px; justify-content: center; }
.map-banner__btns .btn { flex: 1; }
.map-banner .btn--quiet { background: rgba(255, 255, 255, .16); border-color: transparent; color: #fff; }
.map-banner .btn--primary { background: #2563EB; color: #fff; }

/* Ziel-Fadenkreuz beim Setzen eines Bezugspunkts (mittig über der Karte). */
.pick-target {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 615; pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.35));
  animation: picktarget-in .16s ease-out;
}
@keyframes picktarget-in { from { opacity: 0; transform: translate(-50%,-50%) scale(.7); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }

/* Schwebender „Analysieren"-Knopf über der Karte – auffällig, immer erreichbar. */
.map-fab {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 640;
  display: inline-flex; align-items: center; gap: 8px;
  background: #2563EB; color: #fff; border: none; cursor: pointer;
  font-size: 15px; font-weight: 700; padding: 12px 22px; border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(37,99,235,.4);
}
.map-fab:hover { background: #1d4fd7; }
.map-fab span { font-size: 17px; }
@media (max-width: 560px) { .map-fab { bottom: 14px; font-size: 14px; padding: 11px 20px; } }

/* Zwei Sichten: Optimal (kuratiert) | Alle – Segment auf der Karte, mobil sichtbar. */
.viewseg { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 632;
  display: inline-flex; gap: 2px; background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line, #e6e8ee); border-radius: var(--radius-pill, 999px);
  padding: 3px; box-shadow: var(--sh-2, 0 4px 14px rgba(0,0,0,.12)); }
.viewseg__btn { border: none; background: transparent; cursor: pointer; color: var(--ink-2, #374151);
  font-size: 13px; font-weight: 700; padding: 6px 15px; border-radius: var(--radius-pill, 999px);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.viewseg__btn b { font-weight: 600; opacity: .65; font-size: 12px; }
.viewseg__btn.is-on { background: #2563EB; color: #fff; }
.viewseg__btn.is-on b { opacity: .9; color: #fff; }

/* Lage 1–5 (blaue Punkte – NICHT die Ampelfarben der Markierung). */
.lage { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700;
  color: #2563EB; white-space: nowrap; }
.lage b { letter-spacing: 1px; }
.lage__off { color: var(--ink-4, #c8ccd4); }
.lage--weak { color: var(--ink-4, #9aa0aa); font-weight: 600; }
/* Umweg im Route-Modus: rot, damit die Zusatzzeit sofort auffaellt. */
.detour { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800;
  color: #fff; background: var(--m-red, #C43D34); border-radius: 999px; padding: 2px 8px; white-space: nowrap; flex: none; }
/* In der kompakten Mini-/Vorschau-Zeile kleiner, damit nichts breit wird. */
.bub--mini .detour, .pv .detour { font-size: 10.5px; padding: 1px 6px; }
.rcard__badges { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lagechips { display: flex; gap: 6px; flex-wrap: wrap; }
.lagechip { border: 1px solid var(--line, #e6e8ee); background: var(--surface, #fff);
  color: var(--ink-2, #374151); border-radius: var(--radius-pill, 999px); padding: 5px 11px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; letter-spacing: .5px; }
.lagechip:hover { border-color: #93b4f5; }
.lagechip.is-on { background: #2563EB; border-color: #2563EB; color: #fff; }
.field__hintinline { font-weight: 400; font-size: 12px; color: var(--ink-3, #6b7280); }

/* Erstnutzer-Tour (Onboarding). */
.onbo { position: fixed; inset: 0; z-index: 3000; background: rgba(15, 23, 42, .55);
  animation: onbo-fade .2s ease-out; }
@keyframes onbo-fade { from { opacity: 0; } to { opacity: 1; } }
.onbo__ring { position: fixed; z-index: 3001; border: 3px solid #2563EB; border-radius: 14px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .3), 0 0 26px rgba(37, 99, 235, .55);
  pointer-events: none; transition: left .2s, top .2s, width .2s, height .2s; }
.onbo__pop { position: fixed; z-index: 3002; width: min(340px, 92vw);
  background: #fff; color: var(--ink, #0f172a); border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .32); }
.onbo__pop:not(.onbo__pop--anchored) { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.onbo__step { font-size: 11.5px; font-weight: 800; color: #2563EB; text-transform: uppercase; letter-spacing: .6px; }
.onbo__title { margin: 5px 0 7px; font-size: 17px; font-weight: 800; }
.onbo__text { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2, #374151); }
.onbo__btns { display: flex; justify-content: space-between; gap: 10px; }
.onbo__pop--anchored::before { content: ""; position: absolute; left: 26px; width: 0; height: 0;
  border-left: 9px solid transparent; border-right: 9px solid transparent; }
.onbo__pop--anchored[data-arrow="up"]::before { top: -9px; border-bottom: 9px solid #fff; }
.onbo__pop--anchored[data-arrow="down"]::before { bottom: -9px; border-top: 9px solid #fff; }

.map-note {
  position: absolute; top: 12px; left: 12px; z-index: 620;
  display: flex; align-items: center; gap: 9px; padding: 7px 7px 7px 13px;
  background: var(--brand); color: #fff; border-radius: var(--radius-pill);
  box-shadow: var(--sh-2); font-size: 13px;
}
.map-note strong { font-weight: 700; }
.map-note span { opacity: .9; }
.map-note .iconbtn { color: #fff; }
.map-note .iconbtn:hover { background: rgba(255,255,255,.2); color: #fff; }

/* „Diesen Bereich durchsuchen" – erscheint, wenn die Karte den geladenen
   Bereich verlaesst. Bewusst auffaellig (weiss, Marken-Text), mittig oben. */
.area-search {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 630;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  background: var(--surface); color: var(--brand-dark); border: 1px solid var(--brand-line);
  border-radius: var(--radius-pill); box-shadow: var(--sh-3);
  font-size: 13.5px; font-weight: 650; cursor: pointer;
  animation: area-pop .16s ease-out;
}
.area-search:hover { background: var(--brand-soft); }
.area-search svg { width: 16px; height: 16px; }
@keyframes area-pop { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }

.map-tools { position: absolute; right: 12px; top: 12px; z-index: 610; display: flex; flex-direction: column; gap: 6px; }
.maptool {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.96); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); box-shadow: var(--sh-1); color: var(--ink-2); cursor: pointer;
}
.maptool:hover { color: var(--brand); border-color: var(--brand); }
.maptool--accent { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.maptool--accent:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.maptool[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.maptool svg { width: 17px; height: 17px; }

.map-legend {
  position: absolute; left: 12px; bottom: 22px; z-index: 610;
  background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--sh-1); padding: 8px 10px; font-size: 11.5px;
}
.map-legend__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.map-legend__list li { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.map-legend__foot { margin: 7px 0 0; padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink-4); font-size: 10.5px; max-width: 190px; }
.map-legend__foot:empty { display: none; }
.lg { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(20,30,45,.18); }
.lg--ref { background: #3B5BDB; border-radius: 3px; }
.lg--offer { background: var(--brand); }
.lg--green { background: var(--m-green); }
.lg--yellow { background: var(--m-yellow); }
.lg--red { background: var(--m-red); }
.lg--rejected {
  background: #fff; color: var(--m-rejected); border-color: var(--m-rejected);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; line-height: 1;
}

/* ---- Marker: kleiner blauer Punkt ---- */

.nm-marker { background: none !important; border: 0 !important; }

.nm-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand); border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(15,25,40,.4);
  transition: transform .12s, box-shadow .12s;
  display: flex; align-items: center; justify-content: center;
}
.nm-marker:hover .nm-dot { transform: scale(1.35); z-index: 5; }
.nm-dot--green    { background: var(--m-green); }
.nm-dot--yellow   { background: var(--m-yellow); }
.nm-dot--red      { background: var(--m-red); }
.nm-dot--rejected {
  background: #fff; border-color: var(--m-rejected);
  box-shadow: 0 1px 3px rgba(15,25,40,.25);
}
.nm-dot__x { color: var(--m-rejected); font-size: 13px; font-weight: 900; line-height: 1; margin-top: -1px; }
.nm-dot.is-selected {
  transform: scale(1.5);
  box-shadow: 0 0 0 5px rgba(46,111,203,.28), 0 2px 8px rgba(15,25,40,.45);
  z-index: 10;
}
.nm-marker:hover .nm-dot.is-selected { transform: scale(1.55); }

/* Bezugspunkt: eckiges Schild in VOLLER Farbe mit Buchstabe – bewusst voellig
   andere Form UND Fuellung als die (runden, nummernlosen) Angebots-Punkte. */
.nm-refpin {
  position: relative; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--rc, #3B5BDB); color: #fff;
  border: 2px solid #fff; border-radius: 8px;
  box-shadow: 0 3px 9px rgba(15,25,40,.4);
  font-size: 17px; font-weight: 800; line-height: 1; cursor: grab;
  /* Schatten hebt den Buchstaben auch auf helleren Farben klar ab. */
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  font-family: var(--font);
}
.nm-refpin:active { cursor: grabbing; }
.nm-refpin::after {
  content: ""; position: absolute; left: 50%; bottom: -6px;
  width: 10px; height: 10px; margin-left: -5px;
  background: var(--rc, #3B5BDB); transform: rotate(45deg); border-radius: 2px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
}
.leaflet-tooltip.nm-reflabel {
  background: rgba(26,31,38,.86); color: #fff; border: 0; border-radius: 6px;
  padding: 2px 7px; font-size: 11.5px; font-weight: 650; box-shadow: none; white-space: nowrap;
}
.leaflet-tooltip.nm-reflabel::before { display: none; }

/* Eigener Standort – bewusst anders als Bezugspunkt und Angebot */
/* Live-Standort – bewusst ANDERS als die (blauen) Angebots-Punkte: kräftiges
   Blau mit weißem Ring UND pulsierendem Kranz („hier bin ich"). */
.nm-me {
  position: relative;
  width: 18px; height: 18px; border-radius: 50%;
  background: #1d4ed8; border: 3px solid #fff;
  box-shadow: 0 0 0 2px #1d4ed8, 0 2px 7px rgba(15,25,40,.45);
}
.nm-me::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px;
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 2px solid rgba(29,78,216,.7); animation: me-pulse 1.8s ease-out infinite;
}
@keyframes me-pulse {
  0% { width: 18px; height: 18px; opacity: .8; }
  100% { width: 46px; height: 46px; opacity: 0; }
}

/* Stunden-Marker entlang der Route (1 h · 14:30 …). */
.hour-marker { position: relative; }
.hour-marker__dot {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2.5px solid #2563EB; box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.hour-marker__lbl {
  position: absolute; left: 9px; top: -10px; white-space: nowrap;
  background: #2563EB; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1.5;
  padding: 1px 6px; border-radius: 7px; box-shadow: 0 1px 3px rgba(0,0,0,.35);
}

.nm-cluster {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700; font-size: 12px; color: var(--brand-dark);
  background: rgba(255,255,255,.94); border: 2px solid var(--brand);
  box-shadow: 0 2px 7px rgba(15,25,40,.22);
}
.nm-marker:hover .nm-cluster { background: var(--brand); color: #fff; }

/* Entfernungsringe: Orientierung, keine Information – bewusst blass. */
.nm-ring {
  display: inline-block; white-space: nowrap;
  font-size: 10px; font-weight: 650; color: var(--ink-4);
  background: rgba(255,255,255,.72); border-radius: var(--radius-pill);
  padding: 0 5px; line-height: 14px;
}

.leaflet-tooltip.nm-routelabel {
  background: rgba(255,255,255,.96); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 4px 9px; font-size: 11.5px; line-height: 1.4;
  color: var(--ink-2); box-shadow: var(--sh-1); text-align: center;
}
.leaflet-tooltip.nm-routelabel::before { display: none; }

/* ---- Hover-Vorschau ---- */

.leaflet-tooltip.nm-preview {
  padding: 0; border: 0; border-radius: var(--radius); background: transparent;
  box-shadow: var(--sh-3); font-family: var(--font); white-space: normal;
}
.leaflet-tooltip.nm-preview::before { display: none; }
.pv {
  width: 282px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-strong); overflow: hidden;
}
.pv__list { font-size: 12px; color: var(--ink-3); line-height: 1.5; padding: 9px 11px; }

/* ---- Mini-Uebersicht: zwei knappe Zeilen, mehr nicht ----
   Genau so viel, wie man zum Weiterklicken oder Aussortieren braucht:
   Zeile 1 Name und Preis, Zeile 2 die Eckdaten. Alles Weitere per
   "Vergroessern". Wird von Hover-Tooltip UND Klick-Bubble genutzt. */

.pv, .bub--mini { padding: 7px 9px 8px; display: grid; gap: 1px; }
.pv { padding: 8px 11px 9px; }

.mini__line1 { display: flex; align-items: center; gap: 7px; min-width: 0; }
/* Leaflets Schliessen-Kreuz sitzt absolut oben rechts – Platz freihalten,
   sonst verschwindet die Lupe darunter. */
.bub--mini .mini__line1 { padding-right: 20px; }
.mini__dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--brand); box-shadow: 0 0 0 1px rgba(20,30,45,.12);
}
.mini__dot--green { background: var(--m-green); }
.mini__dot--yellow { background: var(--m-yellow); }
.mini__dot--red { background: var(--m-red); }
.mini__dot--rejected { background: #fff; box-shadow: 0 0 0 1.8px var(--m-rejected); }

.mini__name {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; line-height: 1.25;
  color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini__price { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; flex: none; }
.mini__zoom {
  flex: none; width: 22px; height: 22px; margin: -3px -3px -3px 1px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-4);
  border-radius: 6px; cursor: pointer;
}
.mini__zoom:hover { background: var(--brand-soft); color: var(--brand-dark); }
.mini__zoom svg { width: 13px; height: 13px; }

.mini__line2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini__facts {
  flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.35; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini__facts b { color: var(--ink-2); font-weight: 700; }
/* Dezenter Booking-Link im Mini-Bubble. */
.mini__book { display: inline-flex; align-items: center; gap: 3px; flex: none;
  font-size: 11.5px; font-weight: 600; color: var(--brand-dark); text-decoration: none;
  white-space: nowrap; }
.mini__book svg { width: 12px; height: 12px; }
.leaflet-container .bub .mini__book { color: var(--brand-dark); }

/* ---- Bubble (Popup) ---- */

.leaflet-popup.nm-popup .leaflet-popup-content-wrapper {
  border-radius: var(--radius); padding: 0; box-shadow: var(--sh-3);
  border: 1px solid var(--line-strong); overflow: hidden;
}
.leaflet-popup.nm-popup .leaflet-popup-content {
  margin: 0; width: 310px !important; font-family: var(--font);
  /* Die Detailansicht darf nie hoeher werden als die Karte – sonst ragt sie
     oben heraus und kein Nachschieben rettet sie. Dann lieber scrollen. */
  max-height: min(56vh, 460px); overflow-y: auto; overscroll-behavior: contain;
}
/* Die Mini-Uebersicht ist schmaler und braucht weder Deckel noch Scrollen. */
.leaflet-popup.nm-popup--mini .leaflet-popup-content {
  width: 312px !important; max-height: none; overflow: visible;
}
.leaflet-popup.nm-popup a.leaflet-popup-close-button {
  color: var(--ink-3); top: 7px; right: 7px; width: 24px; height: 24px;
  background: rgba(255,255,255,.85); border-radius: 50%; font-size: 17px; line-height: 22px;
}
.leaflet-popup.nm-popup--mini a.leaflet-popup-close-button {
  top: 4px; right: 3px; width: 20px; height: 20px; font-size: 15px; line-height: 18px;
  background: transparent;
}
.leaflet-popup.nm-popup a.leaflet-popup-close-button:hover { background: rgba(20,30,45,.1); color: var(--ink); }

.bub { padding: 11px; display: grid; gap: 7px; }
.bub__head { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 9px; align-items: start; }
.bub__img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; display: block; }
.bub__headtext { min-width: 0; display: grid; gap: 1px; padding-right: 20px; }
.bub__name { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.bub__addr { font-size: 11.5px; color: var(--ink-3); }
.bub__block { display: grid; gap: 5px; padding-top: 7px; border-top: 1px solid var(--line); }
/* Kompakte Aktionszeile: Buttons nur so breit wie ihr Inhalt (nicht mehr ein
   riesiger 1fr-„Website"-Button), kleinere Höhe und kleines Icon. */
.bub__acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.bub__acts .btn { flex: 0 1 auto; justify-content: center; min-height: 32px;
  padding: 0 11px; font-size: 13px; }
.bub__acts .btn svg { width: 15px; height: 15px; flex: none; }
/* Die Bubble soll nicht die halbe Karte verdecken – Notizfeld bleibt klein
   und waechst nur, wenn der Nutzer es aufzieht. */
.bub .comment-input { min-height: 38px; }
.bub .dist__bar { margin: -1px 0 1px; }

/* ============================ Gemeinsame Bausteine ============================ */

.metaline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.metaline--tight { gap: 6px; }
.metaline .sep { color: var(--line-strong); }

.price { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.price small { font-weight: 500; color: var(--ink-4); font-size: 11px; }
.stars { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); font-weight: 600; }
.stars svg { width: 12px; height: 12px; color: #E0A63B; }
.stars .cnt { color: var(--ink-4); font-weight: 400; font-size: 11px; }

/* ---- Bewertungen aus mehreren Quellen ---- */

.stars__warn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--m-yellow); color: #fff; font-size: 9px; font-weight: 800;
  margin-left: 1px;
}
.ratings { display: grid; gap: 3px; }
.ratings__row { display: grid; grid-template-columns: 78px 1fr auto auto; align-items: center; gap: 7px; font-size: 11.5px; }
.ratings__src { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ratings__bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ratings__bar i { display: block; height: 100%; border-radius: 3px; background: #E0A63B; }
.ratings__val { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ratings__cnt { color: var(--ink-4); font-size: 10.5px; min-width: 32px; text-align: right; }
.ratings__note { margin: 4px 0 0; font-size: 11px; color: #96690E; }

/* ---- Ausstattung ---- */

.amens { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.amen { display: inline-flex; color: var(--ink-4); }
.amen svg { width: 13px; height: 13px; }

.amenlist { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.amenrow {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 2px 9px 2px 7px;
}
.amenrow svg { width: 12px; height: 12px; color: var(--ink-4); flex: none; }

.field--amen { min-width: 100%; border-top: 1px dashed var(--line); padding-top: 10px; }
.field__count { font-size: 11px; font-weight: 600; color: var(--brand-dark); }
.amenfilter { display: flex; flex-wrap: wrap; gap: 5px; }
.amenchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-pill); cursor: pointer;
  font-size: 12px; color: var(--ink-2); transition: all .14s;
}
.amenchip svg { width: 13px; height: 13px; color: var(--ink-4); flex: none; }
.amenchip em { font-style: normal; font-size: 10.5px; color: var(--ink-4); }
.amenchip:hover { border-color: var(--ink-4); }
.amenchip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.amenchip.is-on svg, .amenchip.is-on em { color: rgba(255,255,255,.85); }

.catchip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 650; padding: 1.5px 7px; border-radius: var(--radius-pill);
}
.catchip svg { width: 11px; height: 11px; }
.catchip--hotel      { background: #EDF3FC; color: #1E5299; }
.catchip--restaurant { background: #F2EEFC; color: #5A3EAF; }
.catchip--realestate { background: #E7F4F5; color: #0A5B62; }

.srcbadge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 1.5px 7px; border-radius: var(--radius-pill); white-space: nowrap;
}
.srcbadge svg { width: 10px; height: 10px; opacity: .7; }
.srcbadge--aff { color: var(--brand-dark); background: var(--brand-soft); border-color: var(--brand-line); }

.metric {
  display: inline-flex; align-items: baseline; gap: 3px;
  padding: 1.5px 8px; border-radius: var(--radius-pill);
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 11.5px; font-weight: 650; white-space: nowrap; border: 1px solid var(--brand-line);
}
.metric b { font-size: 13px; font-weight: 800; }
.metric--quiet { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); }
.metric--weak { background: var(--surface-2); color: var(--ink-4); border-color: var(--line); }

/* Entfernungen */
.dists { display: grid; gap: 3px; }
.dist { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 7px; font-size: 12px; }
.dist__dot { width: 9px; height: 9px; border-radius: 50%; }
.dist__name { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist__val { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist__val small { font-weight: 500; color: var(--ink-4); margin-left: 3px; }
.dist__bar { grid-column: 1/-1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin: -1px 0 2px; }
.dist__bar i { display: block; height: 100%; border-radius: 2px; }
.dists--empty { font-size: 12px; color: var(--ink-4); font-style: italic; }
.dists__note { font-size: 10.5px; color: var(--ink-4); margin-top: 2px; }

/* Markierung */
.markselect {
  width: 100%; min-height: 34px; padding: 5px 28px 5px 11px;
  border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 13.5px;
  appearance: none; border: 1.5px solid var(--line-strong); background-color: var(--surface); color: var(--ink-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235F6872' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px;
}
.markselect:focus { outline: none; box-shadow: 0 0 0 3px rgba(46,111,203,.14); }
.markselect--sm { min-height: 31px; font-size: 13px; padding: 4px 26px 4px 9px; width: auto; flex: 1 1 auto; }
.markselect--green    { border-color: var(--m-green);    color: var(--m-green);    background-color: #EDF7F0; }
.markselect--yellow   { border-color: var(--m-yellow);   color: #96690E;           background-color: #FDF6E4; }
.markselect--red      { border-color: var(--m-red);      color: var(--m-red);      background-color: #FCEDEB; }
.markselect--rejected { border-color: var(--m-rejected); color: var(--m-rejected); background-color: #F7EAE9; }

.mbtns { display: inline-flex; gap: 3px; padding: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill); }
.mbtn {
  width: 25px; height: 25px; border: 0; border-radius: 50%; background: transparent;
  cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; line-height: 1; transition: transform .12s, background .12s;
}
.mbtn:hover { transform: scale(1.12); }
.mbtn i { width: 13px; height: 13px; border-radius: 50%; display: block; border: 1.5px solid currentColor; }
.mbtn--green { color: var(--m-green); }
.mbtn--yellow { color: var(--m-yellow); }
.mbtn--red { color: var(--m-red); }
.mbtn--rejected { color: var(--m-rejected); }
.mbtn[aria-pressed="true"] { background: color-mix(in srgb, currentColor 14%, transparent); }
.mbtn[aria-pressed="true"] i { background: currentColor; }

/* Winzige Variante fuer die Mini-Uebersicht */
.mbtns--xs { padding: 1px; gap: 1px; flex: none; }
.mbtns--xs .mbtn { width: 19px; height: 19px; font-size: 12px; }
.mbtns--xs .mbtn i { width: 10px; height: 10px; border-width: 1.4px; }

.comment-input {
  width: 100%; min-height: 52px; resize: vertical; padding: 6px 9px;
  font-size: 12.5px; line-height: 1.4; border: 1px dashed var(--line-strong);
  border-radius: 8px; background: var(--surface-2); color: var(--ink-2);
}
.comment-input::placeholder { color: var(--ink-4); font-style: italic; }
.comment-input:focus { outline: none; background: #fff; border-style: solid; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,111,203,.13); }
.comment-meta { font-size: 11px; color: var(--ink-4); }

.empty {
  padding: 30px 20px; text-align: center;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink-3);
}
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0; font-size: 13.5px; }

.skeleton {
  height: 84px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface-2) 30%, #F0F3F6 50%, var(--surface-2) 70%);
  background-size: 220% 100%; animation: shimmer 1.1s infinite linear; border: 1px solid var(--line);
}
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -40% 0; } }

/* ============================ Treffer-Panel ============================ */

.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 650;
  width: min(390px, 100%);
  display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line-strong);
  box-shadow: -8px 0 26px rgba(20,30,45,.1);
}
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 13px; border-bottom: 1px solid var(--line); flex: none; }
.drawer__title { font-size: 15px; }
.drawer__sub { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.drawer__actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 10px; display: grid; gap: 8px; align-content: start; }

.rcard {
  padding: 10px 11px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: border-color .14s, box-shadow .14s;
}
.rcard:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.rcard.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,111,203,.14); }
.rcard__main { display: grid; gap: 6px; }
.rcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rcard__name { font-size: 14px; font-weight: 650; line-height: 1.3; }
/* Adresse einzeilig, mit „…" abgeschnitten (Vollansicht im title-Tooltip). */
.rcard__addr { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 7px; border-top: 1px dashed var(--line); }
.rcard__tools { display: inline-flex; gap: 4px; margin-left: auto; }
/* Kleiner Icon-Button: Adresse kopieren / in Maps öffnen. */
.iconbtn--xs { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--ink-3);
  cursor: pointer; text-decoration: none; flex: none; }
.iconbtn--xs:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft, rgba(46,111,203,.08)); }
.rcard[data-rating=green]    { border-left: 3px solid var(--m-green); }
.rcard[data-rating=yellow]   { border-left: 3px solid var(--m-yellow); }
.rcard[data-rating=red]      { border-left: 3px solid var(--m-red); }
.rcard[data-rating=rejected] { opacity: .58; border-left: 3px solid var(--m-rejected); }

/* ============================ Auswahlliste ============================ */

.selection { padding: 18px 16px 22px; background: var(--bg); }
.selection__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.selection__title h2 { font-size: 17px; }
.selection__title p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.selection__tools { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }

.ampel-tabs { display: flex; gap: 3px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); flex-wrap: wrap; }
.atab {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border: 0; background: transparent; border-radius: var(--radius-pill); cursor: pointer;
  font-size: 13px; font-weight: 550; color: var(--ink-3);
}
.atab span { font-size: 11px; font-weight: 700; padding: 0 5px; background: rgba(20,30,45,.07); border-radius: var(--radius-pill); }
.atab:hover { color: var(--ink); background: rgba(20,30,45,.04); }
.atab.is-on { color: #fff; background: var(--ink-2); }
.atab.is-on span { background: rgba(255,255,255,.22); }
.atab--green.is-on  { background: var(--m-green); }
.atab--yellow.is-on { background: var(--m-yellow); }
.atab--red.is-on    { background: var(--m-red); }

.selection__body { display: grid; gap: 9px; }

/* Kompakte Zeile als Standard, Details auf Klick – bei vielen markierten
   Orten zaehlt Ueberblick mehr als Vollstaendigkeit. */
.srow {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--sh-1);
  transition: box-shadow .14s, border-color .14s;
}
.srow:hover { box-shadow: var(--sh-2); }
.srow.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,111,203,.12); }
.srow[data-rating=green]  { border-left: 4px solid var(--m-green); }
.srow[data-rating=yellow] { border-left: 4px solid var(--m-yellow); }
.srow[data-rating=red]    { border-left: 4px solid var(--m-red); }
.srow[data-rating=none]   { border-left: 4px solid var(--line-strong); }

.srow__summary {
  display: grid;
  grid-template-columns: auto minmax(0,1.4fr) minmax(150px,auto) minmax(170px,auto) 30px;
  gap: 14px; align-items: center; padding: 9px 12px;
}
.srow__lead { display: flex; align-items: center; gap: 10px; }
/* Kleines Kartenbild des Orts – klickbar, springt zur Karte. */
.srow__thumb { position: relative; flex: none; width: 60px; height: 44px; padding: 0; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.srow__thumb:hover { border-color: var(--brand); }
.srow__thumbimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.srow__thumbpin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--brand-dark); pointer-events: none; }
.srow__thumbpin svg { width: 16px; height: 16px; filter: drop-shadow(0 1px 1px rgba(255,255,255,.9)); }
.srow__mark { display: grid; gap: 3px; justify-items: center; }
.srow__marklabel { font-size: 10px; font-weight: 650; color: var(--ink-4); }
.srow:not(.is-open) .srow__marklabel { display: none; }

.srow__head {
  min-width: 0; display: grid; gap: 1px; text-align: left;
  border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit;
}
.srow__name {
  font-size: 14.5px; font-weight: 650; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.srow__head:hover .srow__name { color: var(--brand); }
/* display:contents laesst die beiden Bloecke auf dem Desktop eigene
   Rasterspalten belegen; schmal werden sie zu einer Zeile zusammengefasst. */
.srow__quicks { display: contents; }
.srow__quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.noteflag { display: inline-flex; color: #B08B2E; }
.noteflag svg { width: 13px; height: 13px; }

.drange { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.drange b { font-weight: 700; font-variant-numeric: tabular-nums; }
.drange small { color: var(--ink-4); font-weight: 500; }

.srow__toggle {
  width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink-4);
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .16s, background .14s, color .14s;
}
.srow__toggle:hover { background: rgba(20,30,45,.07); color: var(--ink); }
.srow__toggle svg { width: 17px; height: 17px; }
.srow.is-open .srow__toggle { transform: rotate(180deg); }

.srow__detail {
  display: grid;
  grid-template-columns: minmax(200px,1.3fr) minmax(190px,1fr) minmax(190px,1fr) auto;
  gap: 14px; align-items: start;
  padding: 11px 12px 12px; margin: 0 0 0 0;
  border-top: 1px dashed var(--line);
}
.srow__info { min-width: 0; display: grid; gap: 5px; }
.srow__desc { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.srow__contact { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; }
.srow__contact a { color: var(--brand-dark); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.srow__contact a:hover { text-decoration: underline; }
.srow__contact svg { width: 12px; height: 12px; }
.srow__dists { display: grid; gap: 6px; }
.srow__comment { display: grid; gap: 4px; align-content: start; }
.srow__acts { display: flex; flex-direction: column; gap: 5px; }
.srow__acts .btn { justify-content: center; }

/* ---- Quellen-Menue ---- */

.srcmenu { position: relative; }
.srcmenu__count {
  font-size: 11px; font-weight: 700; color: var(--ink-4);
  background: rgba(20,30,45,.06); padding: 1px 6px; border-radius: var(--radius-pill);
}
.popover--sources { width: 288px; }
.popover__foot { display: flex; gap: 6px; margin-top: 10px; }
.srcgroup { margin-bottom: 12px; }
.srcgroup .blocktitle {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  color: var(--ink-2); font-weight: 700;
}
.srcgroup .blocktitle svg { width: 15px; height: 15px; }
/* Mehrere Quellen nebeneinander, sobald Platz ist – auf schmalen Leisten
   eine Spalte, auf breiten zwei. */
.srcgrid { display: grid; grid-template-columns: 1fr; gap: 2px; }
@media (min-width: 560px) { .srcgrid { grid-template-columns: 1fr 1fr; gap: 2px 14px; } }
.srcrow {
  display: grid; grid-template-columns: 16px minmax(0,1fr) auto auto;
  align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 7px; cursor: pointer; font-size: 13px;
}
.srcrow:hover { background: var(--surface-2); }
.srcrow input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.srcrow__name { font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.srcrow__tag {
  font-size: 9.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--brand-dark); background: var(--brand-soft); border: 1px solid var(--brand-line);
  padding: 1px 5px; border-radius: var(--radius-pill);
}
.srcrow__tag--free { color: var(--ink-3); background: var(--surface-2); border-color: var(--line); }
.srcrow__count { font-size: 11px; font-weight: 700; color: var(--ink-4); min-width: 18px; text-align: right; }
.srcrow input:not(:checked) ~ .srcrow__name { color: var(--ink-4); }

/* ---- Mini-Bubble ---- */

.bub--mini { gap: 6px; }
.bub__minifoot {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.bub__minifoot .markselect { min-height: 31px; font-size: 12.5px; }
.bub__shrink {
  border: 0; background: transparent; color: var(--ink-4); cursor: pointer;
  font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center;
  gap: 5px; justify-self: start; padding: 2px 0;
}
.bub__shrink:hover { color: var(--ink-2); }
.bub__shrink svg { width: 12px; height: 12px; }

/* ============================ Toast / Fuss / Tabs ============================ */

.toast-stack { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1300; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; max-width: min(92vw, 520px);
  background: var(--ink); color: #fff; border-radius: var(--radius-pill); box-shadow: var(--sh-3);
  font-size: 13.5px; animation: toastin .2s ease-out; pointer-events: auto;
}
.toast input { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 6px; padding: 3px 7px; font-size: 12px; min-width: 190px; }
@keyframes toastin { from { opacity: 0; transform: translateY(12px); } }

.app-footer { padding: 16px; text-align: center; color: var(--ink-4); font-size: 11.5px; }
.app-footer p { margin: 0; }

.tabbar { display: none; }

/* ============================ Konto & Listen ============================ */

.accmenu { position: relative; }
.accbtn { position: relative; max-width: 220px; }
.accbtn span[data-acc-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accbtn.is-in { color: var(--brand-dark); background: var(--brand-soft); }
.accbtn__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none;
  animation: pulse 1s infinite alternate;
}
@keyframes pulse { to { opacity: .25; } }

.popover--account { width: 340px; max-height: min(78vh, 660px); overflow-y: auto; }

.acc__note { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.acc__note--warn {
  background: #FFFCF2; border: 1px solid #F0E4C4; border-radius: 6px;
  padding: 7px 9px; color: var(--ink-2);
}
.acc__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.acc__mail { font-size: 12.5px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }

.acc__benefits { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 7px; }
.acc__benefits li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.acc__benefits svg { width: 14px; height: 14px; color: var(--brand); flex: none; }

.acc__sent strong { display: block; font-size: 14px; margin-bottom: 4px; }

.acc__adopt {
  margin: 10px 0; padding: 11px; border-radius: var(--radius-sm);
  background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.acc__adopt strong { font-size: 13px; }

.acc__lists { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 4px; }
.acc__list { display: flex; align-items: center; gap: 2px; border-radius: var(--radius-sm); }
.acc__list.is-active { background: var(--brand-soft); }
.acc__open {
  flex: 1; min-width: 0; text-align: left; border: 0; background: transparent;
  padding: 7px 9px; border-radius: var(--radius-sm); cursor: pointer;
}
.acc__open:hover { background: rgba(20,30,45,.05); }
.acc__name { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc__meta { display: block; font-size: 11px; color: var(--ink-4); }
.acc__empty { font-size: 12.5px; color: var(--ink-4); font-style: italic; padding: 6px 2px; }

.acc__invite { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.acc__inviterow { display: grid; grid-template-columns: 1fr auto auto; gap: 5px; }
.acc__inviterow .input { min-width: 0; }

.acc__toggle {
  display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; font-size: 12.5px; color: var(--ink-2); text-align: left;
}
.acc__switch {
  width: 30px; height: 17px; border-radius: 999px; background: var(--line-strong);
  position: relative; flex: none; transition: background .15s;
}
.acc__switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #fff; transition: transform .15s;
}
.acc__toggle[aria-pressed="true"] .acc__switch { background: var(--brand); }
.acc__toggle[aria-pressed="true"] .acc__switch::after { transform: translateX(13px); }

/* ============================ Leiste einklappen ============================ */

/* Mehr Karte auf Knopfdruck: Such- und Bezugspunktleiste verschwinden,
   die Karte waechst um genau deren Hoehe. */
body.is-head-collapsed .toolbar,
body.is-head-collapsed .refbar { display: none; }
.ico--chev { transition: transform .18s; }
[data-action="toggle-head"][aria-pressed="true"] .ico--chev { transform: rotate(180deg); }

/* ================== Eigenständige Hilfeseite (info.mittavia.app) ================== */

.infopage { background: var(--bg); }
.infopage .app-header { position: sticky; top: 0; z-index: 10; }
.infopage .brand { text-decoration: none; color: inherit; }
.infopage__label {
  font-size: 12px; font-weight: 650; color: var(--ink-4);
  border-left: 1px solid var(--line); padding-left: 14px; margin-left: 4px;
}
.infopage__cta { margin-left: auto; }

.infopage__main {
  max-width: 760px; margin: 0 auto; padding: 28px 20px 40px;
}
.infopage__title { font-size: 26px; margin-bottom: 18px; letter-spacing: -.02em; }
/* Der Hilfeinhalt ist derselbe wie im Overlay – hier ohne Dialograhmen. */
.help__body--page { padding: 0; overflow: visible; }
.infopage__foot { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.infopage .app-footer a { color: var(--brand-dark); }

@media (max-width: 620px) {
  .infopage__label { display: none; }
  .infopage__title { font-size: 21px; }
}

/* ============================ Suchassistent ============================ */

.wiz {
  position: relative; z-index: 1;
  width: min(560px, 100%); max-height: min(88vh, 780px);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--sh-3);
  animation: helpin .18s ease-out;
}
.wiz__steps {
  display: flex; gap: 6px; list-style: none; margin: 0; padding: 12px 18px 0;
  font-size: 11.5px; font-weight: 650; color: var(--ink-4);
}
.wiz__steps li {
  flex: 1; padding-top: 8px; border-top: 3px solid var(--line);
  transition: color .15s, border-color .15s;
}
.wiz__steps li.is-on { color: var(--brand-dark); border-color: var(--brand); }
.wiz__steps li.is-done { color: var(--ink-3); border-color: var(--brand-line); }

.wiz__body { padding: 14px 18px 18px; overflow-y: auto; flex: 1; }
.wiz__pane { display: none; }
.wiz__pane.is-on { display: block; }
.wiz__pane h3 { font-size: 16px; margin-bottom: 4px; }
.wiz__note { margin: 0 0 14px; font-size: 13px; color: var(--ink-3); line-height: 1.5; }

.wiz__choices { display: grid; gap: 8px; }
.wizchoice {
  display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; align-items: center;
  padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color .14s, background .14s;
}
.wizchoice:hover { border-color: var(--brand); background: var(--brand-soft); }
.wizchoice.is-on { border-color: var(--brand); background: var(--brand-soft); }
.wizchoice__ico { grid-row: 1 / 3; width: 26px; height: 26px; color: var(--brand); }
.wizchoice strong { font-size: 14.5px; }
.wizchoice span:last-child { font-size: 11.5px; color: var(--ink-4); }
/* Modell-Auswahl (Wolke/Route) im Schritt „Suche" – volle Breite, ohne Icon-Spalte. */
.wiz__models { display: grid; gap: 8px; margin-bottom: 16px; }
.wizchoice--model { grid-template-columns: 1fr; }
.wizchoice--model:disabled { opacity: .5; cursor: not-allowed; }
.wizchoice--model:disabled:hover { border-color: var(--line-strong); background: var(--surface); }

.wiz__addrow { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.wiz__refs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
.wiz__refs li {
  display: flex; align-items: center; gap: 9px; padding: 7px 8px 7px 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.wiz__refnum {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.wiz__refname { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz__empty { font-size: 12.5px; color: var(--ink-4); font-style: italic; padding: 8px 2px; }

.wiz__times { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.wiz__times > summary {
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
}
.wiz__times > summary span {
  font-size: 10.5px; font-weight: 700; color: var(--ink-4);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 1px 7px;
}
.wiztime {
  display: grid; grid-template-columns: 20px minmax(0,1fr) auto auto auto;
  align-items: center; gap: 6px; margin-bottom: 5px;
}
.wiztime__name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.input--time { width: auto; min-height: 31px; padding: 3px 8px; font-size: 13px; }

.wiz__preview {
  margin: 14px 0 0; padding: 11px 13px; font-size: 13px; line-height: 1.5;
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm); color: var(--ink-2);
}
.wiz__preview strong { font-size: 15px; color: var(--brand-dark); }

.wiz__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 18px; border-top: 1px solid var(--line); flex: none;
}
.wiz__navi { display: flex; gap: 7px; }

/* ============================ Hilfe ============================ */

/* Muss ueber Leaflets Controls liegen – die sitzen auf z-index 1000. */
.helpwrap { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.helpwrap__backdrop { position: absolute; inset: 0; background: rgba(15,22,32,.55); backdrop-filter: blur(2px); }
.help {
  position: relative; z-index: 1;
  width: min(760px, 100%); max-height: min(86vh, 900px);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--sh-3);
  animation: helpin .18s ease-out;
}
@keyframes helpin { from { opacity: 0; transform: translateY(10px); } }
.help__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); flex: none;
}
.help__head h2 { font-size: 18px; }
.help__body { padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
.help__lead {
  margin: 0 0 18px; padding: 12px 14px; font-size: 14px; line-height: 1.55;
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm); color: var(--ink-2);
}
.help__lead em { font-style: italic; }

.help__step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; margin-bottom: 20px; }
.help__num {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.help__step h3 { font-size: 15px; margin-bottom: 5px; }
.help__step p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.help__step ul { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.help__step li { margin-bottom: 3px; }
.help__legend { list-style: none; padding: 0; display: grid; gap: 6px; }
.help__legend li { display: flex; align-items: flex-start; gap: 9px; }
.help__legend .lg { margin-top: 4px; }

.help__defs { margin: 0; font-size: 13.5px; line-height: 1.55; }
.help__defs dt { font-weight: 700; color: var(--ink); margin-top: 8px; }
.help__defs dd { margin: 2px 0 0; color: var(--ink-2); }

.help__note {
  margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-4); line-height: 1.5;
}

.nm-maperror {
  position: absolute; inset: 0; z-index: 500;
  display: grid; place-content: center; gap: 6px; text-align: center; padding: 24px;
  background: repeating-linear-gradient(45deg, #EEF1F4, #EEF1F4 12px, #E9EDF0 12px, #E9EDF0 24px);
  color: var(--ink-3); font-size: 13.5px;
}
.leaflet-container { font-family: var(--font); background: #E9EDF0; }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.8) !important; }
/* Attribution unter die App-Menues in der Karte (Umgebung, Optimal|Alle …) –
   sonst schwebt die Fusszeile ueber geoeffneten Menuepopovers. */
.leaflet-bottom { z-index: 400 !important; }

/* ============================ Responsiv ============================ */

@media (max-width: 1180px) {
  .srow__summary { grid-template-columns: auto minmax(0,1fr) 30px; row-gap: 6px; }
  .srow__quicks { display: flex; gap: 8px 14px; flex-wrap: wrap; grid-column: 2 / 3; }
  .srow__detail { grid-template-columns: minmax(200px,1.3fr) minmax(180px,1fr); }
  .srow__comment, .srow__acts { grid-column: 1 / -1; }
  .srow__acts { flex-direction: row; flex-wrap: wrap; }
  .srow__acts .btn { flex: 1 1 130px; }
}

@media (max-width: 900px) {
  .app-header { gap: 10px; padding: 0 12px; }
  .project-title__hint { display: none; }
  .toolbar { padding: 9px 12px; }
  .refbar { padding: 9px 12px; flex-direction: column; align-items: stretch; gap: 8px; }
  .refbar__chips { width: 100%; }
  .refchip { max-width: 100%; }
  .refchip__name { width: auto; flex: 1 1 60px; max-width: none; }
  /* Analysieren nimmt die ganze Zeile ein. */
  .refbar__actions { width: 100%; }
  .refbar__actions > .btn--primary { flex: 1 1 0; }
  /* „+ Bezugspunkt" bleibt kompakt neben der Liste. */
  .refbar__add { flex: none; }
  .refbar__add > .btn { width: auto; justify-content: center; }
  /* Wolke/Route + Umkreis nebeneinander (der Umkreis darf bei Bedarf umbrechen). */
  .searchshape { flex: 0 1 auto; justify-content: flex-start; }
  .umkreis { flex: 1 1 auto; justify-content: flex-start; flex-wrap: wrap; }
  .toolbar__results { margin-left: 0; }
  .selection { padding: 14px 12px 90px; }

  /* Kleiner Sicherheitsabstand des Kartenhinweises zum unteren Rand. Die
     eigentliche Ueberlappung mit der Tabbar loest die Kartenhoehe unten. */
  .leaflet-bottom { bottom: 4px !important; }

  /* Hoehe steuert JS ueber --map-h. Der Notnagel-min-height war zu gross:
     Bei wenig Platz erzwang er eine Karte, die unter die Tabbar reicht (und
     die Attribution dorthin schiebt). Klein genug, um nie zu ueberlaufen. */
  .mapwrap { min-height: 240px; }
  body[data-tab="selection"] .mapwrap,
  body[data-tab="selection"] .toolbar,
  body[data-tab="selection"] .refbar { display: none; }
  body:not([data-tab="selection"]) .selection { display: none; }
  body:not([data-tab="selection"]) .app-footer { display: none; }
  .drawer { width: 100%; }

  .srow__summary { grid-template-columns: auto minmax(0,1fr) 30px; gap: 6px 10px; padding: 8px 10px; }
  .srow__detail { grid-template-columns: minmax(0,1fr); gap: 11px; padding: 10px; }
  .srow__acts { flex-direction: row; flex-wrap: wrap; }
  .srow__acts .btn { flex: 1 1 120px; }
  .srcmenu .popover { left: auto; right: 0; }

  .tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 800;
    display: grid; grid-template-columns: repeat(2, 1fr);
    background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar__btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px 9px; border: 0; background: transparent;
    color: var(--ink-4); font-size: 11px; font-weight: 600; cursor: pointer;
  }
  .tabbar__btn svg { width: 21px; height: 21px; }
  .tabbar__btn em { font-style: normal; font-weight: 800; }
  .tabbar__btn.is-on { color: var(--brand); }
  .app-footer { padding-bottom: 76px; }
  .toast-stack { bottom: 74px; }
  .helpwrap { padding: 0; align-items: stretch; }
  .help { width: 100%; max-height: 100%; border-radius: 0; }
  .popover { right: auto; left: 0; width: min(318px, calc(100vw - 24px)); }
  /* „Bezugspunkt hinzufügen“ als fixiertes Panel oben – so klemmt es nicht
     zwischen Leisten und Tastatur ein und die Ortliste bleibt scrollbar. */
  #add-ref-pop:not([hidden]) {
    position: fixed; top: 56px; left: 8px; right: 8px; width: auto;
    max-height: min(70vh, calc(100dvh - 72px)); overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #add-ref-pop .suggest { max-height: 46vh; }
  .map-legend { display: none; }
}

@media (max-width: 620px) {
  .searchfield { flex: 1 1 100%; }
  /* Kategorie-Umschalter nimmt die volle Breite und teilt sie – sonst ist er
     mit ausgeschriebenen Labels auf schmalen Handys breiter als die Seite.
     (Die alte Regel zielte auf .cat__txt – diese Klasse gibt es gar nicht.) */
  /* Aktive Kategorie voll, übrige nur Icon (kein Gleich-Stretch mehr). */
  .segmented { display: flex; width: 100%; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .seg { flex: 0 0 auto; justify-content: center; padding: 0 9px; font-size: 13px; }
  .seg[aria-checked="true"] { padding: 0 13px; }
  .seg__txt { text-overflow: ellipsis; }
  .btn--optimal span { display: none; }
  .btn--optimal { padding: 0 10px; }
  .selection__tools { width: 100%; margin-left: 0; }
  .ampel-tabs { width: 100%; }
  .atab { flex: 1; justify-content: center; padding: 6px 4px; font-size: 12px; }
  /* Das GROSSE Detail-Popup nutzt auf dem Handy die volle Breite (kleine Ränder)
     und mehr Höhe. Das Mini-Popup bleibt bewusst KOMPAKT – nicht über die halbe
     Karte ziehen. */
  .leaflet-popup.nm-popup .leaflet-popup-content { width: calc(100vw - 20px) !important; max-height: 68vh; }
  .leaflet-popup.nm-popup .leaflet-popup-content-wrapper { max-width: calc(100vw - 20px); }
  .leaflet-popup.nm-popup--mini .leaflet-popup-content { width: min(320px, calc(100vw - 40px)) !important; }
  .pv { width: min(300px, calc(100vw - 40px)); }
  /* Größere Tap-Ziele in der Bubble auf dem Handy. */
  .mini__zoom { width: 30px; height: 30px; }
  .bub__head { grid-template-columns: 52px minmax(0,1fr); }
  .bub__img { width: 52px; height: 52px; }

  /* Schnellfilter kompakt: EINE Zeile, die bei Bedarf horizontal scrollt –
     statt Platz durch Umbrueche zu verschwenden. Rechte Kante fadet aus als
     Hinweis „hier geht's weiter". */
  .qfilter { gap: 8px; padding: 5px 10px;
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
    mask-image: linear-gradient(to right, #000 92%, transparent);
    -webkit-overflow-scrolling: touch; }
  .qfilter > .qfilter__lbl { display: none; }           /* „Filter:" weg */
  .qfilter__lbl--sub { font-size: 11px; color: var(--ink-4); flex: 0 0 auto; }
  .restkind__btn { padding: 4px 9px; font-size: 12px; }
  .qfilter__sel { padding: 4px 8px; font-size: 12px; max-width: 128px; flex: 0 0 auto; }
}

/* Schmale Handys: Die Kopfleiste hat zu viele Schaltflaechen fuer die Breite.
   Logo ohne Wortmarke, Konto nur als Symbol, engere Abstaende – sonst wird die
   Symbolleiste breiter als die Seite. Steht bewusst NACH den 900/620er-Bloecken,
   damit die kompakteren Werte gewinnen. */
@media (max-width: 560px) {
  .app-header { gap: 6px; padding: 0 8px; height: 50px; }
  .brand__name { display: none; }
  .brand { gap: 0; }
  .accbtn { max-width: none; }
  .accbtn span[data-acc-label] { display: none; }
  .header-actions { gap: 0; }
  .btn--icon { width: 33px; }
  .project-title__pen { display: none; }
  .project-title__input { font-size: 14.5px; padding: 4px 6px; }
}

/* ============================ Export-Menü ============================ */

.exportmenu { position: relative; display: inline-flex; }
.exportmenu .btn--primary { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.exportmenu__more { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; padding: 0 7px; }
.popover--export { width: 268px; top: calc(100% + 7px); right: 0; padding: 6px; }
.exportopt {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer;
}
.exportopt:hover { background: var(--brand-soft); }
.exportopt strong { display: block; font-size: 13.5px; color: var(--ink); }
.exportopt span { display: block; font-size: 11.5px; color: var(--ink-4); line-height: 1.4; }

/* ============================ Druckfassung ============================ */

/* Am Bildschirm unsichtbar – der Inhalt entsteht erst beim Export. */
.printdoc { display: none; }

@media print {
  /* Alles Interaktive raus; nur das Dokument bleibt. */
  body > *:not(.printdoc) { display: none !important; }
  .printdoc { display: block !important; }

  @page { size: A4 portrait; margin: 14mm 13mm 12mm; }

  html, body {
    background: #fff !important; color: #000;
    font-size: 10.5pt; line-height: 1.42;
  }

  .pd__head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 6pt; border-bottom: 1.5pt solid #2E6FCB; margin-bottom: 10pt;
  }
  .pd__brand { display: flex; align-items: center; gap: 6pt; font-size: 13pt; font-weight: 700; letter-spacing: -.2pt; color: #0C2C5A; }
  /* Dieselbe Falle wie in der Kopfzeile: ohne display:block sitzt das SVG
     auf der Grundlinie und die Wortmarke daneben verrutscht. */
  .pd__brand svg { display: block; }
  .pd__meta { font-size: 8.5pt; color: #555; }

  .pd__eyebrow { font-size: 8.5pt; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: #12C0D4; margin: 0 0 2pt; }
  .pd__title { font-size: 21pt; margin: 0 0 12pt; letter-spacing: -.3pt; color: #0C2C5A; }

  .pd__block { margin-bottom: 12pt; }
  .pd__block h3, .pd__group h2 { font-size: 9pt; text-transform: uppercase; letter-spacing: .8pt; color: #444; margin: 0 0 5pt; }

  .pd__refs { display: flex; flex-wrap: wrap; gap: 5pt 14pt; }
  .pd__ref { display: flex; align-items: center; gap: 5pt; font-size: 10pt; }
  .pd__refnum, .pd__dnum span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 13pt; height: 13pt; border-radius: 3pt;
    color: #fff; font-size: 8pt; font-weight: 700;
    /* Ohne das druckt Chrome die Farbflächen nicht. */
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .pd__refw { font-size: 8pt; color: #666; }

  .pd__group { margin-bottom: 4pt; }
  .pd__grouptitle {
    display: flex; align-items: center; gap: 6pt;
    padding-bottom: 3pt; border-bottom: .75pt solid #ccc; margin-top: 12pt !important;
  }
  .pd__grouptitle span { font-size: 8.5pt; color: #fff; background: #666; border-radius: 6pt; padding: 0 5pt;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pd__grouptitle em { font-style: normal; font-size: 8.5pt; color: #777; text-transform: none; letter-spacing: 0; }
  .pd__grouptitle--green span  { background: #2F8F4E; }
  .pd__grouptitle--yellow span { background: #B7791F; }
  .pd__grouptitle--red span    { background: #C43D34; }

  /* Ein Eintrag soll nie ueber einen Seitenumbruch zerrissen werden. */
  .pd__entry {
    break-inside: avoid; page-break-inside: avoid;
    padding: 7pt 0 8pt; border-bottom: .5pt dotted #bbb;
  }
  .pd__entryhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10pt; }
  .pd__name { font-size: 12pt; margin: 0 0 1pt; }
  .pd__sub { font-size: 9pt; color: #555; }
  .pd__scores { display: flex; gap: 5pt; flex: none; }
  .pd__score {
    font-size: 8pt; border: .75pt solid #2E6FCB; color: #1E5299;
    border-radius: 7pt; padding: 1pt 5pt; white-space: nowrap;
  }
  .pd__score b { font-size: 9.5pt; }
  .pd__score--q { border-color: #bbb; color: #555; }

  .pd__cols { display: flex; gap: 16pt; margin-top: 6pt; align-items: flex-start; }
  .pd__facts { flex: 1; margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1pt 8pt; font-size: 9.5pt; }
  .pd__facts dt { color: #666; }
  .pd__facts dd { margin: 0; }
  .pd__unit { color: #777; font-size: 8.5pt; }

  .pd__dists { flex: 1; border-collapse: collapse; font-size: 9.5pt; }
  .pd__dists td { padding: 1pt 0; vertical-align: middle; }
  .pd__dname { padding-left: 5pt !important; color: #444; }
  .pd__dval { text-align: right; font-weight: 700; white-space: nowrap; }
  .pd__dtime { text-align: right; padding-left: 7pt !important; color: #666; white-space: nowrap; }

  .pd__amen { margin: 5pt 0 0; font-size: 9pt; color: #444; line-height: 1.4; }
  .pd__amen strong { color: #000; }

  .pd__note {
    margin: 6pt 0 0; padding: 4pt 6pt; font-size: 9.5pt;
    background: #FBF7E8; border-left: 2pt solid #D9B94A;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  /* Kaestchen zum Abhaken – das Papier soll man benutzen koennen. */
  .pd__check { margin-top: 6pt; font-size: 8.5pt; color: #555; }
  .pd__check span {
    display: inline-block; width: 9pt; height: 9pt;
    border: .75pt solid #888; margin-right: 3pt; vertical-align: -1pt;
  }

  .pd__foot {
    margin-top: 14pt; padding-top: 5pt; border-top: .5pt solid #ccc;
    font-size: 7.5pt; color: #777; line-height: 1.4;
  }
  .pd__muted { font-size: 9.5pt; color: #777; font-style: italic; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------- Was ohne Konto fehlt ------------------------ */

/*
 * Gesperrtes wird gezeigt, nicht versteckt. Damit das nicht wie Werbung
 * wirkt, bleibt alles hier bewusst leise: keine Signalfarbe, kein Rahmen um
 * den ganzen Block, nur ein Schloss und ein geschwaerzter Platzhalter dort,
 * wo der Wert stuende.
 */

.lockchip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px 1px 5px; border: 1px dashed var(--line-strong);
  border-radius: 999px; background: none; cursor: pointer;
  font: inherit; font-size: 11.5px; line-height: 1.5;
  color: var(--ink-3); white-space: nowrap;
}
.lockchip:hover, .lockchip:focus-visible {
  color: var(--brand); border-color: var(--brand); border-style: solid;
  background: color-mix(in srgb, var(--brand) 7%, transparent);
}
.lockico { width: 12px; height: 12px; flex: none; }

/* Der geschwaerzte Wert: zwei Balken in Zifferbreite plus die Einheit. */
.lockval { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-4); font-size: 12px; }
.lockval i {
  display: inline-block; width: 7px; height: 11px; border-radius: 2px;
  background: repeating-linear-gradient(-45deg,
    var(--line-strong) 0 2px, transparent 2px 4px);
}

/* Zweite Zeile unter einem Bezugspunkt – eingerueckt, damit die Zuordnung
   ohne Beschriftung lesbar ist. */
.dist--traffic { padding-left: 14px; font-size: 12px; color: var(--ink-3); }
.dist--traffic .dist__name { font-style: italic; }
.dist__dot--sub { opacity: .45; transform: scale(.7); }
.dist--traffic.is-pending .dist__val { color: var(--ink-4); }
.dist--traffic.is-slow .dist__val b { color: var(--m-yellow); }
.dist__warn {
  padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  background: color-mix(in srgb, #f59e0b 20%, transparent); color: var(--m-yellow);
}

/* Streifen ueber der Auswahlliste. */
.selection__strip { padding: 0 var(--pad) 6px; }
.astrip { border-top: 1px solid var(--line); padding-top: 8px; }
.astrip__line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.astrip__state { font-size: 12px; color: var(--ink-3); }
.astrip--full .astrip__state { color: var(--m-yellow); font-weight: 600; }
.astrip__chips { display: flex; gap: 5px; flex-wrap: wrap; }
.astrip__more {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--brand); text-decoration: underline;
}
.astrip__line .btn { margin-left: auto; }

.astrip__list { list-style: none; margin: 8px 0 2px; padding: 0; display: grid; gap: 6px; }
.astrip__list li {
  display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 2px 10px;
  font-size: 12px; align-items: baseline;
}
.astrip__list strong { color: var(--ink); }
.astrip__list span { color: var(--ink-2); }
.astrip__list em { grid-column: 2; font-style: normal; color: var(--ink-4); font-size: 11.5px; }

@media (max-width: 640px) {
  .astrip__line .btn { margin-left: 0; width: 100%; }
  .astrip__list li { grid-template-columns: 1fr; }
  .astrip__list em { grid-column: 1; }
}

/* Im Ausdruck hat eine Anmeldeaufforderung nichts verloren. */
@media print {
  .selection__strip, .lockchip, .lockval { display: none !important; }
}

/* Hin- und Rueckweg im Assistenten: drei beschriftete Felder je Punkt. */
.wiztime__field { display: grid; gap: 2px; }
.wiztime__field > span { font-size: 11px; color: var(--ink-4); }
.dist__dir { display: inline-block; width: 10px; color: var(--ink-4); }

/* --------------------- Genauigkeit umschalten -------------------------- */

/*
 * Segmentschalter statt Dropdown: Die drei Stufen stehen in einer Ordnung
 * (grob → genau → zur Uhrzeit), und die soll man sehen, nicht aufklappen.
 */
.levelsw {
  display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 2px; background: var(--surface-2);
}
.levelsw__btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: 12px; color: var(--ink-3); cursor: pointer;
  white-space: nowrap;
}
.levelsw__btn:hover { color: var(--ink); }
.levelsw__btn.is-on { background: var(--brand); color: #fff; font-weight: 600; }
/* Gewaehlt, aber gerade nicht wirksam – Konto fehlt oder Kontingent leer. */
.levelsw__btn.is-on.is-inactive {
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  color: var(--brand); border: 1px dashed var(--brand); padding: 2px 9px;
}
.levelsw__rest {
  padding: 0 5px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  background: color-mix(in srgb, currentColor 16%, transparent);
}
.levelsw__lock { font-size: 10px; opacity: .75; }
/* Geografisch nicht verfuegbar (kein Konto-Problem): grau, aber weiter
   antippbar, um die Begruendung zu zeigen. */
.levelsw__btn.is-locked { opacity: .5; }
.levelsw__btn.is-locked:hover { color: var(--ink-3); }

/* Zeit eingetragen, Stufe steht aber nicht auf "mit Verkehr". */
.dist--traffic.is-off .dist__val { color: var(--ink-4); }
.dist__switch {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 11.5px; color: var(--brand); text-decoration: underline;
}

@media (max-width: 560px) {
  .levelsw__btn { padding: 3px 7px; font-size: 11.5px; }
}
@media print { .levelsw, .dist__switch { display: none !important; } }

/* ------------------------ Registrierung erklären ----------------------- */

/*
 * Das Formular steht oben auf der Seite, nicht am Ende: Wer sich schon
 * entschieden hat, soll nicht erst an einer Vorteilsliste vorbeiscrollen.
 * Die Erklärung darunter ist für die anderen.
 */
.signup {
  margin: 20px 0 28px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}
.signup__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.signup__row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup__input { flex: 1 1 240px; min-width: 0; }
.signup__hint { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
.signup__privacy { margin: 12px 0 0; font-size: 12px; color: var(--ink-3); }

.signup__msg {
  display: block; margin-top: 12px; padding: 10px 12px;
  border-radius: 10px; font-size: 13.5px; line-height: 1.5;
}
.signup__msg--ok {
  background: color-mix(in srgb, #16a34a 12%, transparent);
  color: #15803d; border: 1px solid color-mix(in srgb, #16a34a 30%, transparent);
}
.signup__msg--error {
  background: color-mix(in srgb, #dc2626 10%, transparent);
  color: #b91c1c; border: 1px solid color-mix(in srgb, #dc2626 28%, transparent);
}

/* Ein Vorteil je Block: was es ist, dann warum es fehlt ohne Konto. */
.benefit { margin: 0 0 18px; padding-left: 14px; border-left: 3px solid var(--line-strong); }
.benefit h3 { margin: 0 0 4px; font-size: 15px; }
.benefit p { margin: 0 0 4px; }
.benefit__why { font-size: 13px; color: var(--ink-3); }

.infopage__foot { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 520px) {
  .signup__row { flex-direction: column; }
  .signup__input { flex: 1 1 auto; }
  .infopage__foot .btn { width: 100%; justify-content: center; }
}
.astrip__more2 { margin: 8px 0 2px; font-size: 12px; color: var(--ink-3); }
.astrip__more2 a { color: var(--brand-dark); }

/* Fuss der Filterleiste: Ausblenden-Haken und Zuruecksetzen in einer Zeile,
   damit sie nicht als lose Einzelposten in der Feldliste stehen. */
.filter__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; width: 100%;
  margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line);
}

/* ---------------------------- Demo-Hinweis ---------------------------- */

/*
 * Einmal je Sitzung beim Oeffnen. Bewusst ein kleiner, klarer Kasten statt
 * eines Banners, das dauerhaft Platz wegnimmt: Der Hinweis ist beim ersten
 * Blick wichtig und danach im Weg. Wer ihn wegklickt, sieht ihn erst in einer
 * neuen Sitzung wieder.
 */
.demo {
  position: fixed; inset: 0; z-index: 1400;
  display: grid; place-items: center; padding: 20px;
  background: rgba(12, 44, 90, .42); backdrop-filter: blur(2px);
}
.demo__card {
  width: min(440px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 24px 22px; box-shadow: var(--sh-3);
  animation: demo-in .18s ease-out;
}
@keyframes demo-in { from { opacity: 0; transform: translateY(8px); } }
.demo__badge {
  display: inline-block; margin-bottom: 10px; padding: 2px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; background: var(--logo-coral, #FA5A47);
}
.demo__title { margin: 0 0 10px; font-size: 19px; letter-spacing: -.01em; color: var(--ink); }
.demo__text { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.demo__text--muted { color: var(--ink-3); font-size: 13px; }
.demo__ok { margin-top: 6px; width: 100%; justify-content: center; }

/* Namensfeld im Assistenten (Schritt 3). */
.wiz__namefield { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.wiz__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.wiz__label span { font-weight: 400; color: var(--ink-4); }

/* -------------------- Rechtsseiten & Kontaktformular ------------------ */
.legal p { margin: 0 0 12px; }
.legal h2 { font-size: 15px; margin: 22px 0 6px; }
.legal__block { line-height: 1.7; }
.legal__note {
  margin-top: 20px; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--m-yellow) 12%, transparent);
  color: var(--ink-2); font-size: 13px;
}
.cfield { margin: 0 0 14px; }
.cseg { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cseg__opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 13px; cursor: pointer;
}
.cseg__opt:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
}
textarea.input { width: 100%; resize: vertical; font: inherit; line-height: 1.5; }
.app-footer__legal { margin-top: 6px; font-size: 12px; }
.app-footer__legal a { color: var(--brand-dark); }

/* Buchstaben-Schild in der Bezugspunkt-Leiste – passt zu den eckigen
   Kartenmarkern (A, B, C …). */
.refchip__badge {
  position: relative; flex: none; width: 22px; height: 22px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 800; line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.5); cursor: pointer;
}
/* Der native Farbwähler liegt unsichtbar über dem Schild – Klick öffnet ihn. */
.refchip__color {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; padding: 0; cursor: pointer;
}

/* POI-Layer (Parkplaetze u. a.) – kleine, dezente Plaketten, klar anders als
   die eckigen Bezugspunkte und die runden Angebote. */
.nm-poi {
  width: 18px; height: 18px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  background: var(--pc, #2563EB); color: #fff;
  border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(15,25,40,.35);
  font-size: 11px; font-weight: 800; line-height: 1; opacity: .92;
}

/* Parkplatz-Popup */
.poipop { font-size: 12.5px; min-width: 170px; }
.poipop__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.poipop__badge {
  width: 22px; height: 22px; flex: none; border-radius: 5px; color: #fff;
  background: var(--pc, #2563EB); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}
.poipop__name { font-weight: 700; color: var(--ink); line-height: 1.2; }
.poipop__type { font-size: 11.5px; color: var(--ink-3); }
.poipop__row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.poipop__row span { color: var(--ink-3); }
.poipop__row b { color: var(--ink); text-align: right; }
.poipop__none { color: var(--ink-4); font-size: 12px; }
.poipop__src { margin-top: 8px; font-size: 10.5px; color: var(--ink-4); }
.poipop__add { width: 100%; justify-content: center; margin-top: 8px; }

/* POI-Umgebungsmenue (Kartenwerkzeuge). */
.poimenu { position: relative; }
.poimenu__pop {
  position: absolute; top: calc(100% + 6px); z-index: 700;
  /* Immer rechtsbuendig an den Werkzeugen – die mobile .popover-Regel
     (left:0) wuerde das Menue sonst nach rechts aus dem Bild schieben. */
  right: 0 !important; left: auto !important;
  width: min(230px, calc(100vw - 24px)); padding: 8px;
}
.poimenu__row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px;
}
.poimenu__row:hover { background: var(--surface-2); }
.poimenu__row input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.poimenu__badge {
  width: 20px; height: 20px; flex: none; border-radius: 5px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
.poimenu__label { color: var(--ink); }
.poimenu__hint { margin: 6px 4px 0; font-size: 11px; color: var(--ink-4); }

/* Kompakte Routeninfos in der Mini-Bubble (statt Labels auf der Karte). */
.mini__routes {
  display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px;
  padding-top: 6px; border-top: 1px solid var(--line);
}
.miniroute {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--ink-2); white-space: nowrap;
}
.miniroute__b {
  width: 15px; height: 15px; flex: none; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rc, #3B5BDB); color: #fff; font-size: 9.5px; font-weight: 800;
}

/* Immer sichtbares "Demo"-Schild im Header – Klick zeigt den Hinweis erneut. */
.demochip {
  margin-left: 2px; padding: 1px 7px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--logo-coral, #FA5A47); color: #fff;
  font: inherit; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  line-height: 1.6;
}
.demochip:hover { filter: brightness(1.06); }

/* Abo-Block im Konto-Menü. */
.acc__plus { margin: 10px 0; padding: 12px; border: 1px solid var(--brand-line); border-radius: 12px; background: var(--brand-soft); }
.acc__plus > strong { display: block; margin-bottom: 2px; color: var(--brand-dark); }
.acc__plusbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.acc__plusbtns .btn { flex: 1 1 auto; justify-content: center; }
.acc__note--muted { color: var(--ink-4); }
.acc__plus--on { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-color: color-mix(in srgb, var(--m-green) 40%, transparent);
  background: color-mix(in srgb, var(--m-green) 8%, transparent); }
.acc__plus--on strong { color: var(--m-green); }
.acc__plus--teaser { margin-top: 10px; }

/* ----------------------- Registrierungs-Dialog ----------------------- */
/* Der ausgeloggte Zustand des Konto-Panels: erst kurz zur Sache (Formular),
   dann klar getrennt, was kostenlos ist und was Mittavia Plus dazugibt. */
.reg { display: grid; gap: 15px; }
.reg__title { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); margin-bottom: 2px; }
.reg__form { display: grid; gap: 8px; }
.reg__block { padding-top: 13px; border-top: 1px solid var(--line); }
.reg__blocktitle { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ink-4); margin-bottom: 9px; }
.reg__block .acc__benefits { margin: 0; padding: 0; border: 0; }

.reg__plus { padding: 14px; border: 1px solid var(--brand-line); border-radius: 14px;
  background: linear-gradient(180deg, var(--brand-soft), color-mix(in srgb, var(--brand-soft) 25%, transparent)); }
.reg__plushead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 6px; }
.reg__plusname { font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; color: var(--brand-dark); }
.reg__pluspill { display: inline-block; padding: 1px 7px; border-radius: var(--radius-pill);
  background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  vertical-align: 1px; }
.reg__plusprice { font-size: 14px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.reg__plusprice small { font-size: 11px; font-weight: 600; color: var(--ink-4); }
.reg__plusrow { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; padding: 10px 11px;
  background: var(--surface); border: 1px solid var(--brand-line); border-radius: 10px; }
.reg__plusrow svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 1px; }
.reg__plusrow strong { display: block; font-size: 12.5px; color: var(--ink); }
.reg__plusrow span { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; margin-top: 2px; }
.reg__more { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600;
  color: var(--brand-dark); text-decoration: none; }
.reg__more:hover { text-decoration: underline; }

/* -------------------- Kategorie-Abfrage (nach Assistent) ------------- */
.catask { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center;
  padding: 20px; background: rgba(12,44,90,.42); backdrop-filter: blur(2px); animation: area-pop .16s ease-out; }
.catask__card { position: relative; width: min(420px, 100%); background: var(--surface);
  border-radius: 16px; box-shadow: var(--sh-3); padding: 22px 22px 24px; text-align: center; }
.catask__x { position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  font-size: 22px; line-height: 1; color: var(--ink-4); cursor: pointer; }
.catask__title { display: block; font-size: 17px; font-weight: 700; color: var(--ink); }
.catask__sub { margin: 4px 0 16px; font-size: 13px; color: var(--ink-3); }
.catask__opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.catask__opts button { display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 16px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.catask__opts button:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.catask__opts svg { width: 24px; height: 24px; }
@media (max-width: 420px){ .catask__opts { grid-template-columns: 1fr; } .catask__opts button { flex-direction: row; justify-content: center; } }

/* --------------------------- Teilen-Fenster --------------------------- */
.shr { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center;
  padding: 20px; background: rgba(12,44,90,.42); backdrop-filter: blur(2px); }
.shr__card { position: relative; width: min(430px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--sh-3);
  animation: demo-in .18s ease-out; }
.shr__x { position: absolute; top: 12px; right: 12px; border: 0; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink-4); }
.shr__title { margin: 0 0 4px; font-size: 18px; }
.shr__note { margin: 0 0 14px; font-size: 13px; color: var(--ink-3); }
.shr__block { margin: 0 0 16px; }
.shr__lbl { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.shr__coderow, .shr__linkrow, .shr__loadrow { display: flex; gap: 8px; align-items: center; }
.shr__code { flex: 1; font-size: 24px; font-weight: 800; letter-spacing: .12em;
  color: var(--ink-4); font-variant-numeric: tabular-nums; }
.shr__code.is-code { color: var(--brand-dark); }
.shr__hint { margin: 6px 0 0; font-size: 12px; color: var(--ink-4); }
.shr__linkrow .input, .shr__loadrow .input { flex: 1; min-width: 0; }
.shr__loadinput { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.shr__block--load { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 0; }
.shr__qr { margin: 12px 0 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.shr__qr img {
  width: 164px; height: 164px; image-rendering: pixelated;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px;
}
.shr__qr figcaption { font-size: 11.5px; color: var(--ink-3); }
.shr__msg { display: block; margin-top: 8px; font-size: 13px; }
.shr__msg--error { color: #b91c1c; }
@media print { .shr { display: none !important; } }

/* Immobilien: Datenschutz-Gebiet + Bodenrichtwert in der Bubble. */
.rezone__hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.rezone__brw { margin-top: 5px; padding: 6px 9px; border-radius: 8px;
  background: color-mix(in srgb, var(--c-realestate) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-realestate) 40%, transparent);
  color: var(--ink); font-size: 13px; }
.rezone__brw small { color: var(--muted); font-weight: 400; }

/* Bewertungen beim Bubble-Öffnen nachladen: Ladehinweis + kompakte Quellenblöcke. */
.rat-load { display: flex; align-items: center; gap: 8px; padding: 8px 2px; font-size: 12.5px; color: var(--ink-3); }
.rat-spin { width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-strong); border-top-color: var(--brand); animation: rat-spin .7s linear infinite; }
@keyframes rat-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rat-spin { animation: none; } }
.rat-empty { padding: 6px 2px; font-size: 12px; color: var(--ink-4); }
.srcinfo--inline { margin-top: 6px; display: grid; gap: 8px; }
.srcinfo--inline .srcinfo__block { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.srcinfo--inline .srcinfo__block--google { border-left: 3px solid #4285F4; }
.srcinfo--inline .srcinfo__block--ta { border-left: 3px solid #00AA6C; }
.srcinfo--inline .srcinfo__title { margin: 0 0 4px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.srcinfo--inline .srcinfo__desc, .srcinfo--inline .srcinfo__review { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.bub--mini .srcinfo--inline { margin-top: 8px; }
