:root{--akzent:#b4451f;--akzent-hell:#f8e9e2;--akzent-dunkel:#f0a07e;--akzent-hell-dunkel:#332a23;--marke:#b4451f}
:root {
  --text: #1c1f1d;
  --leise: #5b625d;
  --linie: #dfe3df;
  --flaeche: #ffffff;
  --grund: #f6f7f4;
  --akzent-text: #ffffff;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8ebe8;
    --leise: #a3aba5;
    --linie: #333a35;
    --flaeche: #1b1f1c;
    --grund: #121513;
    --akzent: var(--akzent-dunkel);
    --akzent-hell: var(--akzent-hell-dunkel); /* aus bauen.mjs: Hauch Akzent auf dem dunklen Grund */
    --akzent-text: #0f1310;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--grund);
  /* Fuß immer am unteren Rand, auch bei wenig Inhalt */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--akzent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin-top: 2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.huelle { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 30; }
.kopf .huelle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.logo-zeichen { width: 22px; height: 22px; flex: none; color: var(--akzent); }
.kopf nav a { color: var(--leise); text-decoration: none; margin-left: 1rem; font-size: .95rem; }
.kopf nav a:hover { color: var(--akzent); }
.menue-knopf { display: none; }
/* Handy: Kopf in einer Zeile mit Menü, läuft nicht mit (mehr Platz für Karte und Liste) */
@media (max-width: 699px) {
  html { scroll-padding-top: 12px; }
  .kopf { position: static; }
  .kopf .huelle { min-height: 56px; gap: 0 1rem; }
  .js .menue-knopf { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--text); cursor: pointer; border-radius: 8px; }
  .menue-knopf::before, .menue-knopf::after { content: ""; grid-area: 1 / 1; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .15s, box-shadow .15s; }
  .menue-knopf::before { box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
  .menue-knopf::after { transform: scaleX(0); }
  .offen .menue-knopf::before { box-shadow: none; transform: rotate(45deg); }
  .offen .menue-knopf::after { transform: rotate(-45deg); }
  .js .kopf nav { display: none; }
  .js .kopf.offen nav { display: flex; flex-direction: column; flex-basis: 100%; padding-bottom: .5rem; }
  .js .kopf nav a { margin: 0; padding: .75rem 0; font-size: 1rem; color: var(--text); border-top: 1px solid var(--linie); }
}

main { flex: 1 0 auto; padding: 1.25rem 0 3rem; }
main.mit-vorspann { padding-top: 0; }
.krumen { font-size: .875rem; color: var(--leise); margin-bottom: .75rem; }
.krumen ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.krumen li + li::before { content: "›"; margin-right: .25rem; color: var(--leise); }
.krumen a { color: var(--leise); }
/* Handy: aktuelle Seite steht ohnehin in der Überschrift */
@media (max-width: 699px) { .krumen li:nth-child(n+3)[aria-current] { display: none; } }
.einleitung { font-size: 1.05rem; color: var(--leise); max-width: 50rem; }
.seitenkopf { margin-bottom: 1rem; }
.seitenkopf h1 { margin-bottom: .3rem; }
.seitenkopf .einleitung { margin: 0; }

.knopf { font: inherit; font-weight: 600; padding: .65rem 1rem; border-radius: 8px; border: 1px solid var(--akzent); background: var(--akzent); color: var(--akzent-text); cursor: pointer; text-decoration: none; display: inline-block; }
.knopf.zweit { background: transparent; color: var(--akzent); }
.knopf.hell { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .6); color: #fff; }
.knopf.hell:hover { background: rgb(255 255 255 / .22); }
.ikon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.ikon .voll { fill: currentColor; stroke: none; }
.knopf .ikon { margin-right: .45rem; vertical-align: -.22em; }
.knopf:disabled { opacity: .6; cursor: wait; }
.hinweis-klein { font-size: .875rem; color: var(--leise); margin-top: .5rem; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfbereich der Startseite ---------- */
.hero {
  position: relative; color: #fff; margin-bottom: 1.25rem;
  background-color: var(--marke);
  background-image: radial-gradient(110% 130% at 88% 35%, color-mix(in srgb, var(--marke) 75%, #fff) 0%, transparent 55%), linear-gradient(160deg, var(--marke) 30%, color-mix(in srgb, var(--marke) 65%, #000));
}
@media (prefers-color-scheme: dark) { .hero::before { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .35); } }
.hero .huelle { position: relative; padding-top: 3.5rem; padding-bottom: 2.75rem; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); letter-spacing: -.02em; line-height: 1.12; margin: 0 0 .5rem; }
.hero-text { font-size: clamp(1rem, 2vw, 1.2rem); color: rgb(255 255 255 / .88); max-width: 40rem; margin-bottom: 1.5rem; }
.hero-ringe { position: absolute; right: max(-140px, calc(50% - 760px)); top: 50%; width: 580px; height: 580px; transform: translateY(-50%); fill: none; stroke: rgb(255 255 255 / .1); stroke-width: 1.5; pointer-events: none; }
.hero-ringe .voll { fill: rgb(255 255 255 / .08); }
.hero-zeichen { position: absolute; right: max(-80px, calc(50% - 700px)); top: 50%; width: 460px; height: 460px; transform: translateY(-50%) rotate(-12deg); color: rgb(255 255 255 / .09); pointer-events: none; }
/* Ringe beschneiden, ohne die Vorschlagsliste der Suche abzuschneiden */
.hero-grund { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* Feines Punktraster, das nach rechts hin auftaucht: gibt dem Kopf Tiefe ohne Bild */
.hero-grund::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / .13) 1px, transparent 1.6px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 85%); mask-image: linear-gradient(100deg, transparent 35%, #000 85%); }
.hero-suche { position: relative; z-index: 5; max-width: 44rem; }
.hero-feld { display: flex; gap: .4rem; padding: .4rem; background: var(--flaeche); border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / .25); }
.hero-feld:focus-within { outline: 3px solid rgb(255 255 255 / .55); outline-offset: 2px; }
.hero-feld .suchfeld { flex: 1 1 auto; }
.hero-feld .suchfeld input { border: 0; background: transparent; font-size: 1.05rem; padding: .8rem .8rem .8rem 2.7rem; }
.hero-feld .suchfeld input:focus { outline: none; }
.hero-feld .knopf { padding: .8rem 1.5rem; border-radius: 10px; }
.hero-feld .vorschlaege { margin-top: .6rem; left: -.4rem; right: -.4rem; color: var(--text); }
.hero-standort { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .9rem 0 0; font-size: .875rem; color: rgb(255 255 255 / .78); }
.hero-standort .knopf { display: inline-flex; align-items: center; }
.hero-beliebt { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.5rem 0 0; font-size: .9rem; }
.hero-beliebt span { color: rgb(255 255 255 / .75); }
.hero-beliebt a { color: #fff; text-decoration: none; padding: .38rem .9rem; border-radius: 999px; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .3); white-space: nowrap; }
.hero-beliebt a:hover, .hero-beliebt a.an { background: #fff; border-color: #fff; color: var(--marke); }
.hero-zahlen { list-style: none; padding: 1.25rem 0 0; margin: 1.5rem 0 0; border-top: 1px solid rgb(255 255 255 / .18); display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; font-size: .9rem; color: rgb(255 255 255 / .8); }
.hero-zahlen li::before { content: "✓"; font-weight: 700; margin-right: .45rem; color: rgb(255 255 255 / .6); }
.hero-zahlen b { color: #fff; font-variant-numeric: tabular-nums; }
/* Breite Bildschirme: Kopf kompakt halten, damit Karte und Liste im ersten Bild stehen.
   Suche und „Mein Standort“ in einer Zeile, „Beliebt“ und Kennzahlen in einer zweiten. */
@media (min-width: 700px) {
  .hero { margin-bottom: .9rem; }
  .hero .huelle { padding-top: 1.9rem; padding-bottom: 1.5rem; }
  .hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-bottom: .3rem; }
  .hero-text { font-size: 1.05rem; margin-bottom: 1.1rem; }
  .hero-suche { display: flex; align-items: center; gap: .75rem; max-width: 52rem; }
  .hero-feld { flex: 1 1 auto; }
  .hero-standort { margin: 0; flex: none; }
  .hero-standort .knopf { min-height: 3.35rem; padding-left: 1.1rem; padding-right: 1.1rem; }
  .hero-standort span { display: none; }
  .hero-unten { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; margin-top: 1.1rem; }
  .hero-beliebt { margin: 0; }
  .hero-zahlen { margin: 0; padding: 0; border: 0; gap: .3rem 1.25rem; font-size: .85rem; }
}
@media (max-width: 699px) {
  .hero .huelle { padding-top: 1.5rem; padding-bottom: 1.25rem; }
  .hero h1 { margin-bottom: .35rem; }
  .hero-text { font-size: .95rem; line-height: 1.5; margin-bottom: 1rem; }
  .hero-ringe { width: 380px; height: 380px; right: -190px; top: 38%; }
  .hero-zeichen { width: 260px; height: 260px; right: -70px; top: 30%; }
  .hero-feld .knopf { padding: .75rem 1rem; }
  .hero-standort { flex-direction: column; align-items: stretch; text-align: center; gap: .3rem; margin-top: .6rem; font-size: .8rem; }
  .hero-standort .knopf { justify-content: center; min-height: 48px; }
  /* „Beliebt“ als Raster in zwei Spalten: alle Chips sichtbar, nichts zum Wischen; ein einzelner letzter Chip nimmt die ganze Breite */
  .hero-beliebt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: 1rem; font-size: .85rem; }
  .hero-beliebt span { grid-column: 1 / -1; margin-bottom: -.25rem; }
  .hero-beliebt a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .3rem .6rem; border-radius: 10px; text-align: center; line-height: 1.3; white-space: normal; text-wrap: balance; }
  .hero-beliebt a:last-child:nth-child(even) { grid-column: 1 / -1; }
  .hero-zahlen { margin-top: 1rem; padding-top: 0; border: 0; gap: .2rem 1rem; font-size: .8rem; }
}

/* ---------- Karte mit Suche, Filtern und Liste ---------- */
.finder { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .75rem; margin-bottom: 2rem; }
.leiste { display: flex; flex-wrap: wrap; gap: .5rem; }
.suchfeld { position: relative; flex: 1 1 260px; }
.suchfeld .ikon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--leise); pointer-events: none; }
.suchfeld input, .leiste select, .filterleiste select { width: 100%; font: inherit; padding: .62rem .9rem; border: 1px solid var(--linie); border-radius: 8px; background: var(--grund); color: var(--text); }
.suchfeld input { padding-left: 2.5rem; }
.leiste select { width: auto; flex: 0 1 230px; }
.leiste .standort { display: inline-flex; align-items: center; }
.filterleiste select { width: auto; padding: .28rem .75rem; border-radius: 999px; font-size: .875rem; margin-right: .5rem; }
/* Handy: Suchfeld mit Knopf in einer Zeile, darunter Standort und Bundesland nebeneinander */
@media (max-width: 699px) {
  .leiste { display: grid; grid-template-columns: auto 1fr auto; }
  .leiste .suchfeld { grid-column: 1 / 3; }
  .leiste .standort { grid-column: 1; justify-content: center; white-space: nowrap; padding-left: .5rem; padding-right: .5rem; }
  .leiste select { grid-column: 2 / -1; width: 100%; }
}
.suchfeld input:focus, .leiste select:focus, .filterleiste select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.vorschlaege { list-style: none; margin: .25rem 0 0; padding: 0; position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .14); max-height: 340px; overflow: auto; }
.vorschlaege:empty { display: none; }
.vorschlaege button { all: unset; display: block; width: 100%; padding: .55rem .9rem; cursor: pointer; box-sizing: border-box; }
.vorschlaege button:hover, .vorschlaege button:focus { background: var(--akzent-hell); }
.vorschlaege small { color: var(--leise); margin-left: .4rem; }
.vorschlaege .meldung { padding: .55rem .9rem; font-size: .9rem; line-height: 1.45; }

.filterleiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
/* Jede Merkmalgruppe als eigener Rahmen, der nur als Ganzes umbricht */
.fgruppe { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .3rem .35rem .3rem .75rem; border: 1px solid var(--linie); border-radius: 999px; }
.filterleiste .gruppe { font-size: .78rem; color: var(--leise); margin-right: .15rem; text-transform: uppercase; letter-spacing: .04em; }
.chip { font: inherit; font-size: .875rem; padding: .28rem .75rem; border-radius: 999px; border: 1px solid var(--linie); background: var(--grund); color: var(--text); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--akzent); }
.chip[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.filter-weg { all: unset; cursor: pointer; font-size: .85rem; color: var(--akzent); text-decoration: underline; margin-left: .5rem; white-space: nowrap; }
/* Handy ohne JavaScript: Gruppen brechen um, eine umbrochene Gruppe bekommt Ecken statt Pillenform */
@media (max-width: 699px) { .fgruppe { border-radius: 12px; } }
/* Handy: Filter hinter einem Knopf, als Blatt von unten (ohne JavaScript bleiben die Gruppen über der Karte) */
.filter-knopf, .blatt-kopf, .blatt-fertig, .blatt-grund, .nur-blatt { display: none; }
.blatt-fuss { display: contents; }
@media (max-width: 699px) {
  /* Schwebt oben links auf der Karte (Zoom steht oben rechts) und kostet so keine eigene Zeile */
  .js .filter-knopf { display: inline-flex; align-items: center; gap: .45rem; position: absolute; top: 10px; left: 10px; z-index: 3; min-height: 44px; padding: .45rem 1rem; font: inherit; font-size: .9rem; font-weight: 600; border: 1px solid var(--linie); border-radius: 999px; background: var(--flaeche); color: var(--text); box-shadow: 0 2px 10px rgb(0 0 0 / .2); cursor: pointer; }
  .filter-knopf .zahl:not(:empty) { min-width: 1.5em; padding: 0 .35em; border-radius: 999px; background: var(--akzent); color: var(--akzent-text); font-size: .8rem; line-height: 1.5em; text-align: center; }
  .js .filterleiste { display: none; }
  .js .filter-offen .filterleiste {
    display: flex; flex-wrap: wrap; align-content: flex-start; gap: .5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    max-height: 85vh; max-height: 85dvh; overflow: hidden auto; overscroll-behavior: contain; margin: 0; padding: 0 16px;
    background: var(--flaeche); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgb(0 0 0 / .25); -webkit-mask-image: none; mask-image: none;
  }
  .js .filter-offen .blatt-grund { display: block; position: fixed; inset: 0; z-index: 59; background: rgb(0 0 0 / .45); }
  .blatt-offen { overflow: hidden; }
  .js .blatt-kopf { display: flex; flex-basis: 100%; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1; padding: .6rem 0 .6rem; background: var(--flaeche); border-bottom: 1px solid var(--linie); font-size: 1.1rem; }
  .blatt-zu { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--text); cursor: pointer; }
  .blatt-zu::before, .blatt-zu::after { content: ""; grid-area: 1 / 1; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
  .blatt-zu::after { transform: rotate(-45deg); }
  .js .filter-offen .fgruppe { display: flex; flex-wrap: wrap; flex-basis: 100%; gap: .5rem; padding: 0; border: 0; border-radius: 0; }
  .js .filter-offen .gruppe, .js .filter-offen .nur-blatt { display: block; flex-basis: 100%; margin: .8rem 0 0; }
  .js .filter-offen select { flex-basis: 100%; max-width: none; margin: 0; padding-top: .6rem; padding-bottom: .6rem; border-radius: 8px; }
  .js .blatt-fuss { display: flex; flex-basis: 100%; justify-content: space-between; align-items: center; gap: 1rem; position: sticky; bottom: 0; margin-top: 1rem; padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom)); background: var(--flaeche); border-top: 1px solid var(--linie); }
  .js .blatt-fuss .filter-weg { margin-left: 0; padding: .5rem 0; }
  .js .blatt-fertig { display: block; margin-left: auto; min-height: 46px; padding: .6rem 1.4rem; }
}
/* Finger statt Maus: größere Tippflächen */
@media (pointer: coarse) {
  .chip, .filterleiste select { padding-top: .5rem; padding-bottom: .5rem; }
}
/* Zeile zur Liste: unter 920 px zwischen Karte und Liste (nichts schiebt die Karte nach unten), breit über beiden */
.finder-info { font-size: .875rem; color: var(--leise); margin: 0; min-height: 1.4em; }
.finder-info b { color: var(--text); }

.flaeche { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; position: relative; margin-top: .75rem; }
.finder .karte { height: 58vh; height: 58dvh; min-height: 340px; border-radius: 8px; overflow: hidden; border: 1px solid var(--linie); background: var(--grund); }
/* Handy: Kasten und Karte randlos über die ganze Breite (der Rahmen kostete 58 von 360 px) */
@media (max-width: 699px) {
  .finder:not(.finder-klein) { margin-inline: -16px; padding: .5rem 16px .75rem; border-inline: 0; border-radius: 0; }
  .finder:not(.finder-klein) .karte { margin-inline: -16px; border-inline: 0; border-radius: 0; }
  .js .finder.ohne-suche .flaeche { margin-top: 0; }
}
/* Touch, Liste unter der Karte: Tippen auf den Treffer zeigt ihn auf der Karte, der Knopf wäre doppelt */
@media (max-width: 919px) and (pointer: coarse) { .treffer-links .auf-karte { display: none; } }
/* Gewählter Eintrag am Handy: Karte unten auf der Karte statt Sprechblase über den Punkten (finder.js) */
.karten-wahl { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; padding: .7rem 3rem .75rem .9rem; font-size: .9rem; line-height: 1.45; background: var(--flaeche); color: var(--text); border-radius: 10px; box-shadow: 0 6px 20px rgb(0 0 0 / .25); }
.karten-wahl .wahl-zu { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--leise); cursor: pointer; }
.karten-wahl .wahl-zu::before, .karten-wahl .wahl-zu::after { content: ""; grid-area: 1 / 1; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.karten-wahl .wahl-zu::after { transform: rotate(-45deg); }
@media not all and (pointer: coarse) { .karten-wahl .pop-links a, .karten-wahl .pop-links .merken { padding-block: .3rem; } }
/* Kartendaten-Hinweis bleibt über der Karte des gewählten Eintrags sichtbar (Lizenz) */
.mit-wahl .maplibregl-ctrl-bottom-right, .mit-wahl .maplibregl-ctrl-bottom-left { bottom: calc(var(--wahl-h, 0px) + 8px); }
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
@media (min-width: 920px) {
  .flaeche { grid-template-columns: minmax(0, 1fr) 370px; }
  .flaeche > .finder-info { grid-column: 1 / -1; order: -1; }
  .finder .karte, .liste-huelle { height: calc(100vh - 240px); min-height: 520px; max-height: 820px; }
  .liste-huelle { overflow-y: auto; padding-right: .3rem; scrollbar-width: thin; }
}
/* Handy quer (wenig Höhe): Kopf klebt nicht, Karte ohne Mindesthöhe, damit sie ganz ins Bild passt */
@media (max-height: 500px) {
  html { scroll-padding-top: 12px; }
  .kopf { position: static; }
  .finder:not(.finder-klein) .karte { height: 75vh; height: 75dvh; min-height: 0; }
}
@media (min-width: 920px) and (max-height: 500px) {
  .finder:not(.finder-klein) .karte, .liste-huelle { height: calc(100vh - 2rem); height: calc(100dvh - 2rem); min-height: 0; }
}
.treffer { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .8rem; background: var(--flaeche); cursor: pointer; }
.treffer:hover { border-color: var(--akzent); }
.treffer.gewaehlt { border-color: #c2410c; box-shadow: inset 3px 0 0 #c2410c; }
.treffer h3 { font-size: 1rem; margin: 0 0 .1rem; }
.treffer h3 a { text-decoration: none; }
.treffer h3 a:hover { text-decoration: underline; }
.treffer .meta { margin: 0; font-size: .875rem; color: var(--leise); }
.treffer .meta b { color: var(--text); }
.treffer-links { margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .85rem; }
.treffer-links .auf-karte { color: var(--leise); }
.auf-karte { all: unset; cursor: pointer; color: var(--akzent); text-decoration: underline; }
/* Merken: in Liste und Kartenfenster wie ein Link, auf der Anlagenseite als Knopf; gemerkt = gefüllter Stern */
.treffer-links .merken, .pop-links .merken { all: unset; cursor: pointer; color: var(--akzent); text-decoration: underline; }
.merken::before { content: '☆ '; text-decoration: none; display: inline-block; white-space: pre; }
.merken[aria-pressed="true"]::before { content: '★ '; }
.merk-link[hidden], html:not(.js) .merken { display: none !important; }
/* Finger: Aktionen unter Treffern und im Kartenfenster 44 px hoch (nach den all: unset oben) */
@media (pointer: coarse) {
  .treffer-links a, .treffer-links .merken, .auf-karte, .pop-links a, .pop-links .merken { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; box-sizing: border-box; }
  .treffer-links, .pop .pop-links { row-gap: 0; }
}
.merk-link span { display: inline-block; min-width: 1.3em; padding: 0 .35em; margin-left: .2em; border-radius: 999px; background: var(--akzent); color: var(--akzent-text); font-size: .8em; text-align: center; }
.vergleich th[scope="col"] { color: var(--text); font-size: .95rem; white-space: normal; min-width: 9rem; vertical-align: top; }
.vergleich th[scope="col"] a { display: block; }
.vergleich th[scope="col"] .link-knopf { font: inherit; font-size: .8rem; font-weight: 400; color: var(--leise); background: none; border: 0; padding: .2rem 0 0; text-decoration: underline; cursor: pointer; }
.vergleich th[scope="col"] .link-knopf::before { content: none; }
.vergleich th[scope="row"] { white-space: nowrap; vertical-align: top; }
.vergleich td { vertical-align: top; min-width: 9rem; }
.vergleich .leise { color: var(--leise); }
.liste .mehr { font-size: .875rem; color: var(--leise); padding: .4rem .2rem; }
.liste .alle-zeigen { display: block; width: 100%; min-height: 44px; }
.liste .leer .knopf { display: block; width: 100%; margin-top: .6rem; font-size: .875rem; padding: .5rem .8rem; text-align: left; }
/* Handy: schwebender Knopf zwischen Karte und Liste */
.umschalter { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; min-height: 46px; padding: .6rem 1.4rem; font: inherit; font-weight: 600; font-size: .95rem; border: 0; border-radius: 999px; background: var(--text); color: var(--flaeche); box-shadow: 0 6px 22px rgb(0 0 0 / .3); cursor: pointer; }
.umschalter::before { content: "↓"; margin-right: .5rem; }
.umschalter[data-ziel="karte"]::before { content: "↑"; }
@media (min-width: 920px) { .umschalter { display: none; } }

.finder-klein { padding: 0; border: 0; background: none; margin: 1rem 0; }
.finder-klein .karte { height: 300px; min-height: 0; }
.bezugspunkt span { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: .75rem; font-weight: 600; line-height: 1.4; padding: .05rem .45rem; border-radius: 999px; background: #2563eb; color: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.bezugspunkt { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 3px rgb(37 99 235 / .3), 0 1px 4px rgb(0 0 0 / .3); }

.maplibregl-popup-content { font: inherit; font-size: .9rem; line-height: 1.45; padding: .7rem .9rem; border-radius: 8px; background: var(--flaeche); color: var(--text); box-shadow: 0 6px 20px rgb(0 0 0 / .2); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--flaeche); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip, .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--flaeche); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--flaeche); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--flaeche); }
.maplibregl-popup-close-button { color: var(--leise); font-size: 1.25rem; padding: 0 .45rem; }
.pop strong { display: block; margin-right: 1rem; }
.pop strong a { text-decoration: none; }
.pop p { margin: .15rem 0 0; color: var(--leise); }
.pop .pop-links { display: flex; flex-wrap: wrap; gap: .2rem .8rem; margin-top: .5rem; }

/* ---------- Übrige Bausteine ---------- */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 1fr; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.raster li { display: flex; }
.raster a { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; text-decoration: none; color: var(--text); }
.raster a:hover { border-color: var(--akzent); }
.raster a.an { border-color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
.raster span { color: var(--leise); font-variant-numeric: tabular-nums; }
.raster + p { margin-top: .75rem; }
/* Handy: zwei Spalten statt einer langen Liste (UI-UX-REGELN 5.), lange Namen brechen um */
@media (max-width: 699px) { .raster { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; } .raster a { padding: .55rem .7rem; hyphens: auto; overflow-wrap: break-word; } }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips a { display: inline-block; padding: .4rem .8rem; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent); text-decoration: none; font-weight: 600; font-size: .925rem; }
.chips a:hover, .chips a.an { background: var(--akzent); color: var(--akzent-text); }
.chips span { font-weight: 400; opacity: .8; }

.marken { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: .45rem 0 0; }
.marken li { font-size: .78rem; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--linie); color: var(--leise); }

.zweispaltig { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
/* Breit: Inhalt links über zwei Zeilen, rechts Aktionen und darunter der Ratgeber-Kasten; schmal steht der Ratgeber am Ende */
@media (min-width: 860px) {
  .zweispaltig { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto 1fr; }
  .zweispaltig > div { grid-row: span 2; }
}
.kasten { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.kasten h2 { margin-top: 0; font-size: 1.1rem; }
.fakten { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.fakten dt { color: var(--leise); }
.fakten dd { margin: 0; }
@media (max-width: 479px) {
  .kasten { padding: 1rem; }
  .fakten { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fakten dt { font-size: .85rem; margin-top: .6rem; }
  .fakten dt:first-child { margin-top: 0; }
}
.aktionen { display: flex; flex-direction: column; gap: .5rem; order: -1; }
@media (min-width: 860px) { .aktionen { order: 0; } }
.aktionen .knopf { text-align: center; }
.route { display: grid; gap: .3rem; }
.route > span { font-size: .875rem; color: var(--leise); }
.route > div { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.route .knopf { padding-left: .5rem; padding-right: .5rem; }
.quellen { font-size: .9rem; color: var(--leise); padding-left: 1.1rem; }
.quellen li { margin-bottom: .3rem; }
.hinweis { border-left: 3px solid var(--akzent); padding: .6rem 1rem; background: var(--akzent-hell); border-radius: 0 8px 8px 0; }

.kasten + .kasten { margin-top: 1rem; }
.nah { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.nah li { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .8rem; background: var(--flaeche); }
.nah a { font-weight: 600; text-decoration: none; }
.nah a:hover { text-decoration: underline; }
.nah .meta { display: block; font-size: .875rem; color: var(--leise); }
.ratgeber-kurz { align-self: start; padding: .9rem 1.1rem; }
.ratgeber-kurz ul { margin: 0; padding-left: 1.1rem; }
.ratgeber-kurz li { margin-bottom: .35rem; }

.artikel-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.artikel-liste a { display: block; height: 100%; padding: 1rem 1.1rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.artikel-liste a:hover { border-color: var(--akzent); }
.artikel-liste strong { display: block; color: var(--akzent); margin-bottom: .25rem; }
.artikel-liste span { font-size: .925rem; color: var(--leise); }
article.prosa { margin-bottom: 1rem; }
.prosa li { margin-bottom: .35rem; }
.prosa .hinweis { margin: 1.25rem 0; }
.hinweis.entwurf { border-left-color: #c2410c; }
code { font-size: .9em; background: var(--grund); border: 1px solid var(--linie); border-radius: 4px; padding: 0 .3em; overflow-wrap: anywhere; }

details.abc { margin-top: 2rem; }
details.abc summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; }
.abc h3 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
h2 small { font-weight: 400; color: var(--leise); font-size: .9rem; }
pre { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: .75rem 1rem; overflow-x: auto; }
@media (max-width: 699px) { pre { white-space: pre-wrap; overflow-wrap: anywhere; } }
mark { background: #ffe58a; color: #1c1f1d; padding: 0 .2em; }
.prosa { max-width: 46rem; }
.prosa h2 { font-size: 1.15rem; }
.tabelle-huelle { overflow-x: auto; margin: .5rem 0 1rem; }
.tabelle { border-collapse: collapse; width: 100%; max-width: 46rem; font-size: .95rem; margin: .5rem 0 1rem; }
.tabelle-huelle .tabelle { margin: 0; }
.tabelle th, .tabelle td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--linie); }
.tabelle th { font-weight: 600; color: var(--leise); font-size: .85rem; white-space: nowrap; }
.tabelle tbody tr:nth-child(even) { background: var(--flaeche); }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle .zweitzeile { display: none; }
/* Handy: Tabellen passen ab 320 px ohne Wischen. Eine Nebenspalte (.breit) steht dafür als zweite Zeile (.zweitzeile) in der Namensspalte. */
@media (max-width: 699px) {
  .tabelle { font-size: .9rem; }
  .tabelle .breit { display: none; }
  .tabelle .zweitzeile { display: block; font-size: .8rem; color: var(--leise); }
  .tabelle th, .tabelle th.zahl { white-space: normal; }
  .tabelle th, .tabelle td { padding: .45rem .3rem; }
}
/* Merkliste: breit als Vergleichstabelle, am Handy als Karten untereinander (merkliste.js) */
.merk-karten { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .75rem; }
.merk-karten .kasten + .kasten { margin-top: 0; }
.merk-karten h2 { font-size: 1.1rem; }
.merk-karten .link-knopf { font: inherit; font-size: .875rem; color: var(--leise); background: none; border: 0; min-height: 44px; padding: 0; margin-top: .25rem; text-decoration: underline; cursor: pointer; }
.merk-karten .leise { color: var(--leise); }
@media (min-width: 700px) { .merk-karten { display: none; } }
@media (max-width: 699px) { .merk-tabelle { display: none; } }

.fuss { border-top: 1px solid var(--linie); background: var(--flaeche); font-size: .875rem; color: var(--leise); padding: 1.5rem 0; }
.fuss .huelle { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.fuss a { color: var(--leise); }
.fuss nav a { margin-right: 1rem; }
.fuss .link-knopf { font: inherit; color: var(--leise); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* Tastatur-Fokus überall sichtbar (UI-UX-REGELN 15.). Steht am Ende, damit „all: unset“ bei Links-Knöpfen ihn nicht wieder entfernt. */
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
/* Kleine Textlinks mindestens 24 px hoch (UI-UX-REGELN, 2.) */
.fuss a, .fuss .link-knopf, .krumen a, .hinweis-klein a, .nah a, .ratgeber-kurz > a, .artikel-liste + p a, .fakten dd a { display: inline-block; padding-block: 3px; }
/* Finger: Logo, Fußzeilen-Links, Filter-Chips, Ausklapp-Listen, Zoom-Knöpfe und Treffernamen 44 px hoch (UI-UX-REGELN 2.) */
@media (pointer: coarse) {
  .logo { min-height: 44px; }
  .fuss nav a, .fuss .link-knopf, .chips a { display: inline-flex; align-items: center; gap: .3em; min-height: 44px; padding-block: 0; }
  details.abc summary { padding-block: .6rem; }
  .maplibregl-ctrl-group button { width: 44px; height: 44px; }
  /* Name in der Trefferliste: Tippfläche nach oben und unten vergrößern, ohne die Karte höher zu machen */
  .treffer h3 a { display: inline-block; padding-block: .75rem; margin-block: -.75rem; }
}
