/* ============================================================================
   Ansichten — App-Shell, Navigation und die fünf Routen
   ========================================================================= */

/* ==========================================================================
   App-Shell
   Mobil: Inhalt scrollt, Tab-Leiste klebt unten (Safe Area eingerechnet).
   Ab 900px: linke Leiste, Inhalt rückt ein.
   ========================================================================== */
.shell { display: flex; min-height: 100dvh; }
.shell__main {
  flex: 1; min-width: 0;
  padding-bottom: calc(var(--nav-h) + var(--s6));
}
@media (min-width: 900px) {
  .shell__main { margin-left: var(--rail-w); padding-bottom: var(--s8); }
}
/* Auf sehr breiten Schirmen nicht endlos auseinanderlaufen. */
@media (min-width: 1700px) { .shell__main { max-width: 1560px; } }

/* Kopfzeile einer Ansicht. Bewusst NICHT klebend: eine halbtransparente
   Leiste über Fotos schmiert, und der Inhalt ist hier die Hauptsache.
   Filter setzt man einmal und scrollt dann. */
.vhead {
  padding-top: calc(var(--sat) + var(--s4));
  padding-bottom: var(--s3);
}
.vhead__top { display: flex; align-items: center; gap: var(--s2); min-height: 44px; }
.vhead__title { flex: 1; min-width: 0; }
.vhead h1 { font-size: var(--t-h1); letter-spacing: -0.025em; }
.vhead__sub { font-size: var(--t-label); color: var(--muted); margin-top: 2px; }
.vhead__tools { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s3); }

/* ==========================================================================
   Navigation
   Die Leiste nimmt bis zu fünf Einträge; alles darüber wandert automatisch
   in das "Mehr"-Sheet. Weitere Bereiche kosten damit keine Umbauarbeit.
   ========================================================================== */
.nav {
  position: fixed; z-index: var(--z-nav);
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: stretch;
  padding: 0 var(--sar) var(--sab) var(--sal);
  background: oklch(0.19 0.009 260 / 0.86);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--line-soft);
}
.nav__item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; padding: var(--s1) 2px;
  color: var(--muted); font-size: var(--t-micro); font-weight: 540;
  transition: color var(--d-fast) var(--ease-out);
  position: relative;
}
.nav__item svg { width: 22px; height: 22px; }
.nav__item:hover { color: var(--ink-2); }
.nav__item[aria-current="page"] { color: var(--accent); }
/* Aktiv-Markierung: ein kurzer Strich über dem Icon, nicht nur Farbe. */
.nav__item[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 2px; border-radius: 0 0 2px 2px; background: var(--accent);
}
.nav__label { line-height: 1; }

@media (min-width: 900px) {
  .nav {
    top: 0; right: auto; bottom: 0; width: var(--rail-w);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 2px;
    padding: calc(var(--sat) + var(--s5)) var(--s3) var(--s4) calc(var(--s3) + var(--sal));
    border-top: none; border-right: 1px solid var(--line-soft);
    background: oklch(0.19 0.009 260 / 0.6);
  }
  .nav__item {
    flex: none; flex-direction: row; justify-content: flex-start; gap: var(--s3);
    min-height: 44px; padding: 0 var(--s3);
    border-radius: var(--r-md); font-size: var(--t-body); font-weight: 520;
  }
  .nav__item:hover { background: var(--surface-2); }
  .nav__item[aria-current="page"] { background: var(--accent-dim); color: var(--accent); font-weight: 620; }
  .nav__item[aria-current="page"]::before { display: none; }
}

/* Wortmarke über der Leiste (nur Desktop). */
.nav__brand {
  display: none; align-items: center; gap: var(--s2);
  padding: 0 var(--s3) var(--s5); font-weight: 680;
  letter-spacing: -0.03em; font-size: var(--t-lead);
}
.nav__brand b { color: var(--accent); font-weight: 680; }
@media (min-width: 900px) { .nav__brand { display: flex; } }

/* Konto-Fuß der Leiste (nur Desktop). */
.nav__foot { display: none; margin-top: auto; padding: var(--s3) var(--s3) 0; border-top: 1px solid var(--line-soft); }
.nav__who { font-size: var(--t-micro); color: var(--muted); word-break: break-all; margin-bottom: var(--s2); }
@media (min-width: 900px) { .nav__foot { display: block; } }

/* "Mehr"-Sheet, wenn mehr als fünf Bereiche existieren. */
.more__list { flex: 1; overflow-y: auto; padding: var(--s3) var(--s4) calc(var(--s6) + var(--sab)); }
.more__item {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; min-height: 52px; padding: 0 var(--s3);
  border-radius: var(--r-md); color: var(--ink); font-size: var(--t-body); text-align: left;
}
.more__item:hover { background: var(--surface-2); }
.more__item svg { width: 22px; height: 22px; color: var(--muted); flex: none; }

/* ==========================================================================
   Login
   ========================================================================== */
.login {
  min-height: 100dvh; display: grid; place-items: center;
  padding: calc(var(--s6) + var(--sat)) var(--s5) calc(var(--s6) + var(--sab));
}
.login__card { max-width: 360px; width: 100%; text-align: center; }
.login__mark {
  width: 60px; height: 60px; margin: 0 auto var(--s5);
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent-dim);
}
.login__mark svg { width: 30px; height: 30px; }
.login h1 { font-size: var(--t-h1); margin-bottom: var(--s2); }
.login p { color: var(--muted); font-size: var(--t-sm); line-height: 1.6; margin-bottom: var(--s6); }
.login .btn { width: 100%; }
.login__note { margin-top: var(--s4); font-size: var(--t-micro); color: var(--muted); }

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dash__date {
  font-size: var(--t-label); color: var(--accent);
  font-weight: 600; letter-spacing: 0.01em; margin-bottom: 2px;
}

/* Ab 1100px zwei Spalten: links was heute ansteht und wo du bist,
   rechts was es zu entdecken gibt. Sonst laufen die Zeilen auf einem
   breiten Bildschirm auf 1200px auseinander. */
@media (min-width: 1100px) {
  .dash {
    display: grid;
    /* minmax(0,…): sonst zieht die min-content-Breite des Foto-Streams
       die Spalten über den Viewport hinaus. */
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--s7); align-items: start;
  }
  .dash__col > .sec:first-child { margin-top: var(--s4); }
  .near__map { height: 320px; }
  /* In der Spalte nicht mehr randlos bluten — das gehört der Vollbreite. */
  .dash__col .scroll-x { margin-inline: 0; padding-inline: 0; }
}

/* --- Heute: Termine und fällige Todos in einer Liste --------------------- */
.today { display: flex; flex-direction: column; }
.today__item {
  display: grid; grid-template-columns: 54px 1fr auto;
  gap: var(--s3); align-items: center;
  padding: var(--s3) var(--s2);
  border-radius: var(--r-md);
}
.today__item + .today__item { box-shadow: 0 -1px 0 var(--line-soft); }
.today__time {
  font-size: var(--t-label); font-variant-numeric: tabular-nums;
  color: var(--ink-2); font-weight: 600; text-align: right;
}
.today__time--none { color: var(--muted); font-weight: 400; }
.today__main { min-width: 0; }
.today__title { font-size: var(--t-body); line-height: 1.35; }
.today__meta { display: flex; gap: var(--s2); align-items: center; margin-top: 2px; flex-wrap: wrap; }
.today__kind {
  font-size: var(--t-micro); color: var(--muted);
  display: inline-flex; align-items: center; gap: var(--s1);
}
.today__kind svg { width: 12px; height: 12px; }
.today__item--overdue .today__time { color: var(--danger); }

/* --- In der Nähe -------------------------------------------------------- */
.near__map {
  height: 210px; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line-soft); background: var(--surface-2);
}
@media (min-width: 700px) { .near__map { height: 260px; } }
.near__list { display: flex; flex-direction: column; margin-top: var(--s2); }
.near__item {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s2); border-radius: var(--r-md);
  width: 100%; text-align: left;
}
.near__item:hover { background: var(--surface-2); }
.near__dist {
  font-size: var(--t-label); font-variant-numeric: tabular-nums;
  color: var(--accent); font-weight: 620; min-width: 62px; text-align: right; flex: none;
}
.near__name { font-size: var(--t-sm); min-width: 0; flex: 1; }
.near__place { font-size: var(--t-micro); color: var(--muted); }

/* --- Bereichs-Kacheln --------------------------------------------------- */
.area__count {
  font-size: var(--t-micro); color: oklch(0.86 0.006 260);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Rezepte
   ========================================================================== */
.axes { display: flex; flex-direction: column; gap: var(--s3); }
.axis { display: flex; align-items: center; gap: var(--s2); }
.axis__label {
  font-size: var(--t-micro); color: var(--muted); font-weight: 600;
  min-width: 62px; flex: none;
}
/* Nach rechts bis zum Seitenrand laufen lassen: eine am Padding
   abgeschnittene Chip-Reihe sieht kaputt aus statt scrollbar. */
.axis__chips {
  display: flex; gap: var(--s2); padding: 2px var(--pad, 16px) 2px 0;
  margin-right: calc(var(--pad, 16px) * -1);
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.axis__chips::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .axis__chips { flex-wrap: wrap; overflow: visible; margin-right: 0; padding-right: 0; }
}

/* Mobile Filterleiste: eine Zeile statt vier. Alle Achsen liegen im Sheet. */
.filterbar { display: flex; align-items: center; gap: var(--s2); }
.filterbar__chips { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; flex: 1; }
.filterbar__chips::-webkit-scrollbar { display: none; }
.filterbar__count[hidden] { display: none; }
.filterbar__count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--t-micro); font-weight: 700; font-variant-numeric: tabular-nums;
}
/* flex:1 — sonst hängt die Fußleiste mitten im Bildschirm statt unten. */
.axes--sheet { flex: 1; padding: var(--s4) var(--s5) var(--s7); overflow-y: auto; }
.axes--sheet .axis { flex-direction: column; align-items: flex-start; gap: var(--s2); }
.axes--sheet .axis__label { font-size: var(--t-label); min-width: 0; }
.axes--sheet .axis__chips { flex-wrap: wrap; overflow: visible; margin-right: 0; padding-right: 0; }

@media (max-width: 899px) { .axes--inline { display: none; } }
@media (min-width: 900px) { .filterbar { display: none; } }

.kcal { color: var(--accent); font-weight: 620; }

/* --- Rezept-Reader ------------------------------------------------------ */
.reader { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.reader__scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.reader__hero { position: relative; }
.reader__hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.reader__hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 2%, oklch(0.17 0.008 260 / 0) 62%);
  pointer-events: none;
}
.reader__close {
  position: absolute; top: calc(var(--sat) + var(--s2)); right: var(--s3);
  z-index: 2; background: oklch(0.12 0.01 260 / 0.6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: oklch(0.97 0 0);
}
.reader__body { padding: 0 var(--s5) calc(var(--s8) + var(--sab)); margin-top: calc(var(--s5) * -1); position: relative; }
.reader h2 { font-size: var(--t-h1); letter-spacing: -0.028em; margin-bottom: var(--s2); }
.reader__tags { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s5); }

/* 2×2 auf dem Handy, eine Reihe ab 520px. Als Flexbox brachen die vier
   Werte in 3+1 um, weil "Kohlenhydrate" die Zelle aufzieht. */
.nutri {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--s2); margin-bottom: var(--s6);
}
@media (min-width: 520px) { .nutri { grid-template-columns: repeat(4, 1fr); } }
.nutri__cell {
  min-width: 0; padding: var(--s3);
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md);
}
.nutri__v { font-size: var(--t-lead); font-weight: 660; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.nutri__k { font-size: var(--t-micro); color: var(--muted); margin-top: 1px; }

.reader h3 { margin-bottom: var(--s3); }
.reader__sec { margin-bottom: var(--s6); }
.reader__sec p { color: var(--ink-2); line-height: 1.65; max-width: 68ch; }
.reader__sec p + p { margin-top: var(--s3); }

/* Zutaten: abhakbar, große Trefferfläche (nasse Finger). */
.ing { display: flex; flex-direction: column; }
.ing__item {
  display: flex; align-items: flex-start; gap: var(--s3);
  padding: var(--s3) var(--s2); min-height: 48px;
  border-radius: var(--r-md); text-align: left; width: 100%;
  color: var(--ink-2); font-size: var(--t-body); line-height: 1.45;
  transition: color var(--d-fast) var(--ease-out);
}
.ing__item + .ing__item { box-shadow: 0 -1px 0 var(--line-soft); }
.ing__box {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 1.5px solid var(--line); border-radius: 6px;
  display: grid; place-items: center;
  transition: background var(--d-fast) var(--ease-out), border-color var(--d-fast) var(--ease-out);
}
.ing__box svg { width: 14px; height: 14px; color: var(--accent-ink); opacity: 0; transition: opacity var(--d-fast); }
.ing__item[aria-pressed="true"] { color: var(--muted); }
.ing__item[aria-pressed="true"] .ing__text { text-decoration: line-through; text-decoration-color: var(--line); }
.ing__item[aria-pressed="true"] .ing__box { background: var(--accent); border-color: var(--accent); }
.ing__item[aria-pressed="true"] .ing__box svg { opacity: 1; }
.ing__amount { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.ing__item[aria-pressed="true"] .ing__amount { color: var(--muted); font-weight: 500; }

/* Portionsrechner */
.portions { display: flex; align-items: center; gap: var(--s2); }
.portions__v { font-size: var(--t-body); font-weight: 640; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: center; }
.portions__note { font-size: var(--t-micro); color: var(--muted); margin-top: var(--s2); }

/* --- Kochmodus ---------------------------------------------------------- */
/* Größer, ruhiger, einhändig bedienbar. Nur Zutaten und Schritte. */
.reader--cook { font-size: 1.0625rem; }
.reader--cook .reader__hero { display: none; }
.reader--cook .reader__body { margin-top: calc(var(--sat) + var(--s4)); }
.reader--cook .ing__item { font-size: 1.125rem; min-height: 60px; padding: var(--s4) var(--s2); }
.reader--cook .ing__box { width: 26px; height: 26px; }
.reader--cook .reader__sec p { font-size: 1.0625rem; line-height: 1.7; }
.reader--cook .reader__tags, .reader--cook .nutri { display: none; }
.cook-bar {
  flex: none; display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s5) calc(var(--s3) + var(--sab));
  border-top: 1px solid var(--line); background: var(--surface);
}
.cook-bar__hint { flex: 1; font-size: var(--t-micro); color: var(--muted); line-height: 1.4; }

/* ==========================================================================
   Filme
   ========================================================================== */
.film--seen .tile__img { filter: grayscale(0.85) brightness(0.55); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.seg__btn {
  min-height: 32px; padding: 0 var(--s3); border-radius: var(--r-pill);
  font-size: var(--t-label); font-weight: 560; color: var(--muted);
  transition: background var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out);
}
.seg__btn[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }

/* Tabelle (Desktop-Umschalter) */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tbl th, .tbl td { padding: var(--s3) var(--s3); text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl thead th {
  position: sticky; top: 0; background: var(--bg); z-index: 1;
  font-size: var(--t-label); font-weight: 640; color: var(--muted);
  white-space: nowrap;
}
/* Auf schmalen Schirmen nur Haken, Titel und Jahr — der Rest würde die
   Tabelle über den Bildschirmrand schieben. Poster-Ansicht zeigt alles. */
@media (max-width: 699px) { .tbl .col-wide { display: none; } }
.tbl th button { color: inherit; font: inherit; display: inline-flex; align-items: center; gap: var(--s1); min-height: 32px; }
.tbl th button:hover { color: var(--ink); }
.tbl tbody tr:hover { background: var(--surface); }
.tbl tr[data-seen="1"] td { color: var(--muted); }
.tbl__title { font-weight: 560; color: var(--ink); }
.tbl tr[data-seen="1"] .tbl__title { color: var(--ink-2); }
.tbl__orig { display: block; font-size: var(--t-micro); color: var(--muted); }

/* Kreis-Checkbox, überall gleich (Tabelle wie Poster). */
.check {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  transition: background var(--d-fast) var(--ease-out), border-color var(--d-fast) var(--ease-out);
}
.check svg { width: 14px; height: 14px; color: var(--accent-ink); opacity: 0; transition: opacity var(--d-fast); }
.check[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.check[aria-pressed="true"] svg { opacity: 1; color: oklch(0.18 0.03 155); }

/* ==========================================================================
   Todos
   ========================================================================== */
.todo__group { margin-bottom: var(--s6); }
.todo__group:first-child { margin-top: var(--s3); }
.todo__item { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s2); }
.todo__item + .todo__item { box-shadow: 0 -1px 0 var(--line-soft); }
.todo__ring {
  width: 20px; height: 20px; border-radius: 50%; flex: none; margin-top: 2px;
  border: 1.5px solid var(--ring, var(--p4));
}
.todo__body { min-width: 0; flex: 1; }
.todo__title { font-size: var(--t-body); line-height: 1.4; color: var(--ink); }
.todo__meta { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-top: 3px; }
.todo__due { font-size: var(--t-micro); color: var(--muted); font-variant-numeric: tabular-nums; }
.todo__due--over { color: var(--danger); font-weight: 600; }
.todo__project { font-size: var(--t-micro); color: var(--muted); }

/* ==========================================================================
   Karte (Leaflet)
   Logik unverändert — nur Erscheinung. Kacheln kommen dunkel von CARTO.
   ========================================================================== */
.mapview { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; background: var(--bg); }
#map.mini { position: relative; inset: auto; height: 100%; }

.leaflet-container { background: var(--bg); font-family: var(--font); }
.leaflet-control-zoom { display: none; }
.leaflet-control-attribution {
  background: oklch(0.15 0.01 260 / 0.72) !important;
  color: var(--muted) !important; font-size: 10px !important;
  padding: 2px 6px !important;
}
.leaflet-control-attribution a { color: var(--ink-2) !important; }

/* Marker: Bernstein-Nadel, "besucht" wird grün — plus Häkchen-Glyphe,
   damit die Unterscheidung nicht allein an der Farbe hängt. */
.pin-marker { display: grid; place-items: center; }
.pin-marker svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 4px oklch(0 0 0 / 0.6)); }
.pin-marker--plan svg { color: var(--accent); }
.pin-marker--visited svg { color: var(--ok); }
.pin-marker--none svg { color: var(--muted); }

.marker-cluster {
  background: var(--accent-glow); border-radius: 50%;
  display: grid !important; place-items: center;
}
.marker-cluster div {
  background: var(--accent); color: var(--accent-ink);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font: inherit;
  font-size: var(--t-label); font-weight: 680; font-variant-numeric: tabular-nums;
}
.marker-cluster span { line-height: 1; }

.leaflet-popup-content-wrapper {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
}
.leaflet-popup-tip { background: var(--surface); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 0; width: 232px !important; }
.leaflet-popup-close-button { color: var(--muted) !important; padding: 6px 8px 0 0 !important; }
.pop__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.pop__body { padding: var(--s3); }
.pop__name { font-size: var(--t-sm); font-weight: 620; line-height: 1.3; }
.pop__place { font-size: var(--t-micro); color: var(--muted); margin-top: 1px; }
.pop__actions { display: flex; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s3); }
.pop__actions .btn { min-height: 34px; padding: 0 var(--s3); font-size: var(--t-micro); }

/* Bottom-Sheet der Karte (mobil) / Seitenleiste (Desktop) */
.panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet);
  height: 92dvh; display: flex; flex-direction: column;
  background: oklch(0.19 0.009 260 / 0.94);
  backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-top: 1px solid var(--line);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--sh-3);
  transform: translateY(var(--sheet-y, 70dvh));
  transition: transform var(--d-slow) var(--ease-out);
  touch-action: none;
}
.panel.dragging { transition: none; }
.panel__handle { flex: none; padding: var(--s2) 0 var(--s1); display: flex; justify-content: center; cursor: grab; }
.panel__handle::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line); }
.panel__head { flex: none; padding: var(--s1) var(--s4) var(--s2); }
.panel__head h1 { font-size: var(--t-lead); }
.panel__head .vhead__sub { margin-top: 1px; }
.panel__tools { flex: none; padding: var(--s2) var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.panel__count { flex: none; padding: 0 var(--s4) var(--s2); font-size: var(--t-micro); color: var(--muted); font-variant-numeric: tabular-nums; }
.panel__list {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 0 var(--s3) calc(var(--nav-h) + var(--s5));
}

/* Reel-Gruppe in der Ortsliste */
.reel { border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--surface); margin-bottom: var(--s2); overflow: hidden; }
.reel__head { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3); width: 100%; text-align: left; }
.reel__toggle { flex: none; width: 28px; height: 28px; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--muted); display: grid; place-items: center; }
.reel__toggle svg { width: 14px; height: 14px; transition: transform var(--d-base) var(--ease-out); }
.reel.is-open .reel__toggle svg { transform: rotate(45deg); }
.reel__main { min-width: 0; flex: 1; }
.reel__title { font-size: var(--t-sm); font-weight: 600; line-height: 1.3; }
.reel__meta { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin-top: var(--s2); }
.reel__locs { display: none; border-top: 1px solid var(--line-soft); }
.reel.is-open .reel__locs { display: block; }

.loc { display: flex; gap: var(--s3); padding: var(--s3); width: 100%; text-align: left; cursor: pointer; }
.loc + .loc { border-top: 1px solid var(--line-soft); }
.loc:hover { background: var(--surface-2); }
.loc.is-sel { background: var(--accent-dim); }
.loc__thumb { width: 54px; height: 54px; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--surface-2); }
.loc__body { min-width: 0; flex: 1; }
.loc__name { font-size: var(--t-sm); font-weight: 580; line-height: 1.3; }
.loc__place { font-size: var(--t-micro); color: var(--muted); }
.loc__desc { font-size: var(--t-micro); color: var(--muted); margin-top: 1px; }
.loc__status { font-size: var(--t-micro); color: var(--accent); margin-top: 2px; min-height: 0; }
.loc__actions { display: flex; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s2); }
.loc__actions .btn { min-height: 34px; padding: 0 var(--s2); font-size: var(--t-micro); }
.loc__actions .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.loc__actions .btn.is-visited[aria-pressed="true"] { background: var(--ok); color: oklch(0.18 0.03 155); }
.loc.no-coord .loc__name { color: var(--ink-2); }

@media (min-width: 900px) {
  .mapview { left: var(--rail-w); }
  .mapview { display: flex; }
  #map { position: relative; inset: auto; flex: 1; order: 2; height: 100dvh; }
  .panel {
    position: relative; order: 1; transform: none !important; transition: none;
    width: 384px; min-width: 340px; height: 100dvh;
    border-radius: 0; border-top: none; border-right: 1px solid var(--line);
    box-shadow: none; touch-action: auto;
  }
  .panel__handle { display: none; }
  .panel__head { padding-top: calc(var(--sat) + var(--s5)); }
  .panel__list { padding-bottom: var(--s6); }
}

/* Karten-Ansicht braucht die Tab-Leiste über dem Sheet. */
.mapview ~ .nav { z-index: var(--z-modal); }
