:root {
  --bg: #f2f4f7;
  --card: #ffffff;
  --ink: #1a2230;
  --muted: #6b7688;
  --line: #e2e6ec;
  --brand: #17554a;
  --brand-ink: #ffffff;
  --pos: #1a7f4b;
  --neg: #c23b3b;
  --danger: #c23b3b;
  --stern-hoch: #16a34a;               /* 8-10 Sterne */
  --stern-mittel: #d97706;             /* 4-7  Sterne */
  --stern-niedrig: #6b7280;            /* 0-3  Sterne */
  --park: #2563eb;
  --radius: 14px;
  --tabbar-h: 62px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --card: #1a2230;
    --ink: #eef1f6;
    --muted: #93a0b4;
    --line: #2a3444;
    --brand: #3f9481;
    --pos: #4fc584;
    --neg: #f0736f;
    --danger: #f0736f;
    --stern-hoch: #4fc584;
    --stern-mittel: #eab35a;
    --stern-niedrig: #93a0b4;
    --park: #6ea8fe;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

.content {
  max-width: 560px;
  margin: 0 auto;
  /* Unten um Tableiste + Home-Indikator einruecken. Das obere Inset ist in der
     installierten App 0 (die Statusleiste hat ihr eigenes Band, siehe
     base.html) und greift nur dort, wo die Seite wirklich darunter liegt -
     etwa in Safari im Querformat. */
  padding: calc(env(safe-area-inset-top) + 16px) 16px
           calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
}

a { color: var(--brand); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  /* Keine eigene Hoehe: die Tabs geben sie vor, das Inset kommt als Polster
     darunter. Sonst steckt das Inset in height UND padding und zaehlt doppelt. */
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  z-index: 1000;
}
.tab {
  flex: 1;
  height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}
.tab.active { color: var(--brand); font-weight: 600; }
.tab-ico { font-size: 21px; }

/* ---------- Kopfzeile ---------- */
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
/* Zwei Knoepfe daneben: die Ueberschrift schrumpft und kuerzt notfalls,
   statt die Knoepfe aus der Zeile zu druecken. */
.pagehead h1 {
  margin: 0; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.navbtn {
  min-width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px;
  font-size: 15px; line-height: 1;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink);
  white-space: nowrap;
}

/* ---------- Karten (Container) & Formulare ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-title { margin: 0; font-size: 16px; }

/* Aufklappbarer Kasten - sieht aus wie .card, spart beim Anlegen aber Platz.
   Reines HTML, kein JavaScript: funktioniert auch, wenn das Skript scheitert. */
.klappkasten {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  margin-bottom: 16px;
}
.klappkasten[open] { padding-bottom: 16px; }
.klappkasten > summary {
  min-height: 44px;                /* Touch-Ziel, wie die uebrigen Bedienelemente */
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;                /* eigenes Dreieck statt des Standardmarkers */
}
.klappkasten > summary::-webkit-details-marker { display: none; }
.klappkasten > summary::before {
  content: "›";
  display: inline-block;
  font-size: 20px;
  color: var(--muted);
  transition: transform .15s;
}
.klappkasten[open] > summary::before { transform: rotate(90deg); }
/* Derselbe Abstand zwischen den Feldern wie in einer .card. */
.klappkasten > *:not(summary) { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
/* Der Browser gibt [hidden] nur ein schwaches display:none mit - eine eigene
   Regel wie .field oben schlaegt es. Ohne dieses !important bliebe jedes per
   el.hidden ausgeblendete Feld sichtbar. */
[hidden] { display: none !important; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }
label { font-size: 13px; color: var(--muted); }
input[type=text], input[type=number], input[type=password], input[type=search],
input[type=date], input[type=file], select, textarea {
  width: 100%;
  font-size: 18px;              /* >=16px verhindert das Zoomen auf iOS */
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
input[type=file] { font-size: 15px; padding: 10px; }

/* Kleine Abweichungen vom Grundmass. Als Klassen und nicht als
   style-Attribut: die CSP (default-src 'self') deckt ueber style-src auch
   Inline-Stile ab - ein style="..." im Markup bliebe wirkungslos. Die
   Schriftgroesse bleibt dabei ueberall >= 16 px, sonst zoomt iOS beim Fokus. */
.feld-flach { min-height: 80px; }
.feld-eng { padding: 8px; }
.text-mitte { text-align: center; }
.card-eng { padding: 10px; }
.btn-eigenbreit { width: auto; }

/* ---------- Bewertung ---------- */
.sterne-anzeige {
  margin: 0 0 6px; font-size: 20px; line-height: 1.2;
  color: var(--stern-mittel); letter-spacing: 1px;
}
.sterne-zahl { margin-left: 8px; font-size: 15px; color: var(--muted); letter-spacing: 0; }
/* Der Regler traegt das Touch-Ziel: 44 px hoch, damit er sich am Wasser mit
   klammen Fingern treffen laesst. */
input[type=range] { width: 100%; height: 44px; accent-color: var(--brand); }
input[type=range]:disabled { opacity: .4; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; }
.check input { width: 22px; height: 22px; }

/* ---------- Segmented control ---------- */
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.segmented.cols-3 { grid-template-columns: repeat(3, 1fr); }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 4px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  text-align: center;
  min-height: 44px;
}
.seg input:checked + span {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
  font-weight: 600;
}

/* ---------- Knöpfe ---------- */
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-small { padding: 10px; font-size: 15px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.linkbtn {
  background: none; border: none; padding: 4px 0;
  color: var(--muted); font-size: 14px; cursor: pointer;
  text-decoration: underline; font-family: inherit;
}

/* ---------- Liste der Angelstellen ---------- */
.spotlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.spotlist-item a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--ink);
}
.sl-thumb {
  /* Oben buendig, unabhaengig von der Hoehe der Karte: die Oberkante des
     Bildes soll auf einer Linie mit dem Namen daneben liegen. Mittig
     ausgerichtet saesse es bei einer hohen Karte tiefer als der Name. */
  align-self: start;
  width: 72px; height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--muted);
}
.sl-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sl-name { font-weight: 600; font-size: 17px; }
.sl-meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.sl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
/* Bewirtschafter links, Badges rechts - in einer Zeile, nicht in zweien.
   flex-wrap sorgt dafuer, dass ein langer Vereinsname die Badges umbrechen
   laesst, statt sie aus der Karte zu draengen. */
.sl-zeile {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
/* margin-left:auto haelt die Badges rechtsbuendig - auch dann noch, wenn sie
   umgebrochen sind, und auch ohne Verein daneben. */
.sl-badges {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-size: 12px; white-space: nowrap;
}
.badge-muted { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.badge-stern-hoch { background: var(--stern-hoch); color: #fff; }
.badge-stern-mittel { background: var(--stern-mittel); color: #fff; }
.badge-stern-niedrig { background: var(--stern-niedrig); color: #fff; }
/* Die Scores teilen sich die Farben der Bewertung: dieselben drei Baender,
   dieselbe Bedeutung "gut / mittel / schwach". Welches Band gilt, rechnet der
   Server (stats.score_band) - die Vorlage kennt die Grenzen nicht. */
.badge-score-hoch { background: var(--stern-hoch); color: #fff; }
.badge-score-mittel { background: var(--stern-mittel); color: #fff; }
.badge-score-niedrig { background: var(--stern-niedrig); color: #fff; }

/* ---------- Auswertungen ---------- */
/* Balken als CSS-Breite statt Diagrammbibliothek: die CSP laesst kein CDN zu,
   und fuer einen Balken lohnt keine Abhaengigkeit. Die Breite rechnet der
   Server. */
.balkenliste { list-style: none; margin: 8px 0 0; padding: 0; }
.balkenliste li {
  display: grid;
  grid-template-columns: minmax(6em, 40%) 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 14px;
}
.balken-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balken-spur { background: var(--line); border-radius: 999px; height: 10px; }
.balken-fuellung {
  display: block; height: 100%; border-radius: 999px; background: var(--brand);
  min-width: 2px;
}
/* Die Breite kommt als Klasse, nicht als style-Attribut: die CSP verbietet
   Inline-Stile ebenso wie Inline-Skripte, ein gesetztes width bliebe also
   wirkungslos. Der Server rechnet die Stufe (stats.breitenklasse). */
.balken-b0 { width: 0%; }
.balken-b1 { width: 5%; }
.balken-b2 { width: 10%; }
.balken-b3 { width: 15%; }
.balken-b4 { width: 20%; }
.balken-b5 { width: 25%; }
.balken-b6 { width: 30%; }
.balken-b7 { width: 35%; }
.balken-b8 { width: 40%; }
.balken-b9 { width: 45%; }
.balken-b10 { width: 50%; }
.balken-b11 { width: 55%; }
.balken-b12 { width: 60%; }
.balken-b13 { width: 65%; }
.balken-b14 { width: 70%; }
.balken-b15 { width: 75%; }
.balken-b16 { width: 80%; }
.balken-b17 { width: 85%; }
.balken-b18 { width: 90%; }
.balken-b19 { width: 95%; }
.balken-b20 { width: 100%; }
.balken-zahl { color: var(--muted); font-variant-numeric: tabular-nums; }

.vorschlagsliste { list-style: none; margin: 0; padding: 0; }
.vorschlag { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.vorschlag:first-child { border-top: 0; margin-top: 0; }
.vorschlag-zeit { margin: 2px 0 6px; font-size: 14px; }

.kriterien { list-style: none; margin: 6px 0; padding: 0; }
.kriterium {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  padding: 4px 0 4px 10px;
  border-left: 3px solid var(--line);
  margin-bottom: 4px;
  font-size: 14px;
}
.kriterium-name { font-weight: 600; }
.kriterium-wert { color: var(--muted); }
.kriterium .hint { flex-basis: 100%; margin: 0; }
.kriterium-gut { border-left-color: var(--stern-hoch); }
.kriterium-mittel { border-left-color: var(--stern-mittel); }
.kriterium-schlecht { border-left-color: var(--neg); }
.kriterium-offen { border-left-color: var(--line); }

/* ---------- Besuche ---------- */
.besuch {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.besuch:first-of-type { border-top: none; padding-top: 0; }
.besuch-kopf { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.besuch-stelle { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.fangliste { list-style: none; margin: 0; padding: 0; display: flex;
             flex-direction: column; gap: 6px; }
.fangliste li {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 14px;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
}
.fang-art { font-weight: 600; font-size: 15px; }

/* ---------- Karte ---------- */
.map {
  height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  z-index: 0;                  /* bleibt unter der Tab-Leiste */
}
/* Zwei Zeilen mit Absicht: dvh meint auf dem iPhone die tatsaechlich sichtbare
   Hoehe, vh die groesste. Aeltere Browser nehmen die erste, neuere die zweite. */
.map-full {
  height: calc(100vh - var(--tabbar-h) - env(safe-area-inset-top)
               - env(safe-area-inset-bottom) - 150px);
  height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-top)
               - env(safe-area-inset-bottom) - 150px);
  min-height: 320px;
}
.map-note { font-size: 12px; color: var(--muted); }

/* Marker als divIcon – so braucht Leaflet keine eigenen Bilddateien. */
.pin {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--stern-niedrig);
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.pin-stern-hoch { background: var(--stern-hoch); }
.pin-stern-mittel { background: var(--stern-mittel); }
.pin-stern-niedrig { background: var(--stern-niedrig); }
/* Noch nicht bewertet: hohl statt gefuellt - sonst saehe es aus wie 0 Sterne. */
.pin-stern-keine { background: var(--card); border-color: var(--stern-niedrig); }
.pin-park {
  border-radius: 5px;
  background: var(--park);
  color: #fff;
  font-size: 12px; font-weight: 700; line-height: 12px;
  text-align: center;
}
.pin-drag { background: var(--brand); width: 22px; height: 22px; cursor: grab; }
.leaflet-container { font: inherit; background: var(--bg); }
.leaflet-popup-content { margin: 10px 12px; font-size: 14px; }
.leaflet-popup-content b { display: block; font-size: 15px; }

/* ---------- Fotogalerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); display: block;
}
.gallery figcaption { font-size: 11px; color: var(--muted); text-align: center; }
.foto-datum { display: block; font-variant-numeric: tabular-nums; color: var(--ink); }
.titel-abzeichen {
  display: block; margin-top: 4px; text-align: center;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); font-weight: 600;
}

/* ---------- Bilder verwalten ---------- */
.verwaltungszeile {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.verwaltungszeile > img {
  width: 56px; height: 56px; flex: none;
  border-radius: 8px; object-fit: cover;
}
.verwaltungszeile .field { flex: 1; min-width: 0; }
.sortierzeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sortierzeile form { display: inline; }
.sortbtn {
  /* 44px Touch-Ziel nach Apples Vorgabe - Pfeile werden sonst zum Glücksspiel. */
  min-width: 44px; min-height: 44px;
  font-size: 18px; line-height: 1;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink);
  cursor: pointer; font-family: inherit;
}
.sortbtn:disabled { opacity: .35; cursor: default; }
.photo-hero img {
  width: 100%; max-height: 300px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line); display: block;
}
.photo-actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.photo-actions form { display: inline; }

/* ---------- Detailangaben ---------- */
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.facts dt { color: var(--muted); font-size: 13px; align-self: center; }
.facts dd { margin: 0; }
.coord { font-variant-numeric: tabular-nums; font-size: 14px; }
.notiz { white-space: pre-wrap; line-height: 1.5; margin: 0; }

/* ---------- Meldungen & Login ---------- */
.login-wrap { max-width: 360px; margin: 12vh auto 0; padding: 0 4px; }
.login-title { text-align: center; margin-bottom: 20px; }
.notice {
  background: color-mix(in srgb, var(--brand) 12%, var(--card));
  border: 1px solid var(--line);
  padding: 12px; border-radius: 10px; font-size: 14px; margin-bottom: 16px;
}
.notice.ok { background: color-mix(in srgb, var(--pos) 18%, var(--card)); }
.notice.bad { background: color-mix(in srgb, var(--neg) 15%, var(--card)); }
.notice.small { font-size: 13px; margin-bottom: 0; }
.error { color: var(--neg); font-weight: 600; text-align: center; }
.hint { font-size: 13px; color: var(--muted); margin: -4px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
code { background: color-mix(in srgb, var(--muted) 18%, transparent); padding: 2px 6px; border-radius: 6px; font-size: 14px; }
.logout-row { text-align: center; margin-top: 8px; }
.logout-row a { color: var(--muted); font-size: 14px; }

/* --- Umweltbedingungen ------------------------------------------------- */
/* Die gemessenen Bedingungen stehen bewusst ruhiger als der Freitext: sie
   ergaenzen den Besuch, sie sind nicht seine Hauptsache. */
.umwelt { line-height: 1.5; margin-top: 6px; }
.umwelt-marke { margin-right: 2px; }
.umwelt-offen { margin-top: 8px; font-style: italic; }
.quelle { opacity: .75; }
.fang-umwelt { display: block; margin-top: 2px; opacity: .85; }

.umweltliste { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.umweltliste dt { color: var(--muted); font-size: 13px; align-self: center; }
.umweltliste dd { margin: 0; }

/* Ein flacherer Klappkasten fuer den Detailblock innerhalb eines Besuchs -
   der volle Kartenlook waere dort eine Karte in der Karte. */
.klappkasten-schmal { background: none; border: 0; padding: 0; margin-top: 8px; }
.klappkasten-schmal > summary { min-height: 32px; font-size: 14px; padding-left: 18px; }

/* Formulare, die nebeneinander in einer Zeile stehen (Knopf im Fliesstext). */
.inlineform { display: inline-block; margin: 0 8px 0 0; }

.pegelliste { list-style: none; margin: 0; padding: 0; }
.pegelliste li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pegelliste li:last-child { border-bottom: 0; }
/* Touch-Ziel: eine Zeile der Auswahlliste bleibt mit 44 px greifbar. */
.pegelliste .check { min-height: 44px; align-items: flex-start; }
.pegelliste .hint { display: block; margin-top: 2px; }

/* --- Vollbild-Ebene ----------------------------------------------------- */
/* Ein Bild wird ueber der Seite gezeigt, nicht als eigenes Dokument geoeffnet:
   in der installierten PWA gaebe es aus einem Bilddokument keinen Rueckweg.
   Siehe app.js, Abschnitt Vollbild. */
dialog.vollbild {
  padding: 0;
  border: 0;
  margin: 0;
  /* Ausdruecklich fix statt auf die UA-Regel 'dialog:modal' zu bauen. */
  position: fixed;
  inset: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  background: transparent;
  /* Der ganze Bereich ist Schliessflaeche; das Bild selbst faengt seinen
     Klick ab und schaltet stattdessen den Zoom um. */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  /* Im gezoomten Zustand nicht die Seite dahinter mitscrollen. */
  overscroll-behavior: contain;
}
/* Dieselbe Falle wie bei [hidden] weiter oben: der Browser blendet die
   geschlossene Ebene nur mit seiner eigenen Regel 'dialog:not([open])' aus,
   und die verliert gegen jede Regel aus dieser Datei - also auch gegen das
   'display: flex' darueber. Ohne die Zeile hier bliebe nach dem ersten
   Schliessen ein durchsichtiger Kasten ueber der ganzen Seite liegen: der
   Schliessen-Knopf klebte am Bildschirmrand, und Tipps auf Bildlinks
   darunter kaemen nicht mehr an. */
dialog.vollbild:not([open]) { display: none !important; }
dialog.vollbild::backdrop { background: rgba(0, 0, 0, .92); }

.vollbild-bild {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  cursor: zoom-in;
}
/* Originalgroesse: das Bild darf ueber den Rand hinauswachsen, der Container
   wird scrollbar und laesst sich schieben. */
dialog.vollbild.gezoomt { align-items: flex-start; justify-content: flex-start; }
dialog.vollbild.gezoomt .vollbild-bild {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* Lade- und Fehlerzustand: eine schwarze Flaeche ohne Erklaerung sieht aus
   wie ein Fehler. Am Wasser ist fehlendes Netz der Normalfall. */
.vollbild-hinweis {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 24px);
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.vollbild-zu {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 8px);
  right: calc(env(safe-area-inset-right) + 8px);
  z-index: 1;
  /* Touch-Ziel >= 44 px, wie ueberall in dieser App. */
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
