/* ============================================================
   Grundlagen: Farben, Flächen, Text (eine Stelle für das ganze Design)
   ============================================================ */
:root {
  --akzent: #1f6b8c;
  --akzent-hg: #e5f0f5;
  --gut: #237a45;        --gut-hg: #e4f3e9;
  --mittel: #8a5a00;     --mittel-hg: #fbf0d9;
  --schlecht: #b3261e;   --schlecht-hg: #fbe8e6;

  --flaeche: #ffffff;    /* Panels, Knöpfe */
  --flaeche-2: #f2f5f7;  /* Kacheln, Segmente */
  --rand: #e2e7ea;
  --text: #17262e;
  --text-2: #5a6e78;     /* Beschriftungen */
  --text-3: #8b9aa2;     /* Hinweise */

  --schatten: 0 2px 10px rgba(16, 32, 40, 0.16);
  --radius: 12px;

  /* Kartenfarben (Leaflet-Ebenen) */
  --wasser: #2b7cc4;
  --erlaubt: #3fa34d;
  --gesperrt: #d64545;

  /* alte Namen, noch vom Fangbuch genutzt */
  --panel-bg: var(--flaeche);
  --text-leise: var(--text-2);
  --linie: var(--rand);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); }
/* Vollbild-Karte: Seite selbst nie scrollen (eingeklappte Panels ragen sonst
   unten heraus, die Seite verrutscht und ein leeres Panel schaut hervor) */
html, body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; }

.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

#karte { position: absolute; inset: 0; z-index: 1; }

/* ============================================================
   Kartenoberfläche (karte-ui.js): Kopfleiste, Knöpfe, Menüs, Suche
   ============================================================ */
#kopfleiste {
  position: absolute; z-index: 800; left: 10px; right: 10px;
  top: calc(10px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 4px;
  background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 6px 6px 6px 12px;
}
@media (min-width: 700px) { #kopfleiste { right: auto; width: 400px; left: 12px; } }
.kl-marke { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.kl-logo { width: 36px; height: 36px; border-radius: 9px; flex: none; background: #fff; }
.kl-marke b { display: block; font-size: 0.95rem; font-weight: 650; line-height: 1.2; }
.kl-marke span { display: block; font-size: 0.74rem; color: var(--text-2); }
.kl-knopf {
  width: 38px; height: 38px; border: none; border-radius: 10px; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--text-2);
}
.kl-knopf .ic { width: 22px; height: 22px; }
.kl-knopf:active { background: var(--flaeche-2); }

/* Knopfspalte rechts unten */
#knoepfe {
  position: absolute; z-index: 700; right: 12px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s;
}
body[data-sheet="kurz"] #knoepfe { transform: translateY(calc(-1 * var(--sheet-kurz, 0px) + 10px - env(safe-area-inset-bottom))); }
body[data-sheet="voll"] #knoepfe { opacity: 0; pointer-events: none; }
.rund {
  width: 46px; height: 46px; border: none; border-radius: 14px; cursor: pointer;
  background: var(--flaeche); color: var(--text); box-shadow: var(--schatten);
  display: flex; align-items: center; justify-content: center;
}
.rund .ic { width: 22px; height: 22px; }
.rund:active { transform: scale(0.95); }
#gpsBtn.laden { animation: puls 1s infinite; }
#gpsBtn.aktiv { color: var(--akzent); }                          /* Standort an */
#gpsBtn.folgt { background: var(--akzent); color: #fff; }        /* Karte folgt */
.primaer {
  height: 46px; padding: 0 18px 0 14px; border: none; border-radius: 14px; cursor: pointer;
  background: var(--akzent); color: #fff; font-size: 0.95rem; font-weight: 650;
  box-shadow: var(--schatten); display: flex; align-items: center; gap: 6px;
}
.primaer .ic { width: 20px; height: 20px; }
.primaer.laden { opacity: .6; pointer-events: none; }

/* Menüs (Konto oben, Ebenen unten) */
.menue {
  position: absolute; z-index: 900; min-width: 250px;
  background: var(--flaeche); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(16, 32, 40, 0.22);
  padding: 6px;
}
.menue[hidden] { display: none; }
.menue.oben { right: 10px; top: calc(66px + env(safe-area-inset-top)); }
.menue.unten { right: 56px; bottom: 0; }
.menue-kopf { padding: 10px 10px 8px; border-bottom: 1px solid var(--rand); margin-bottom: 4px; }
.menue-kopf b { display: block; font-size: 0.92rem; }
.menue-kopf span { display: block; font-size: 0.78rem; color: var(--text-2); margin-top: 2px; }
.menue-titel { font-size: 0.74rem; font-weight: 600; color: var(--text-2); padding: 10px 10px 4px; }
.menue-zeile, .schalter-zeile {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px; border: none; background: none; border-radius: 8px;
  font-size: 0.9rem; text-align: left; cursor: pointer;
}
.menue-zeile:active, .schalter-zeile:active { background: var(--flaeche-2); }
.menue-zeile .ic, .schalter-zeile .ic { color: var(--text-2); }
.schalter {
  margin-left: auto; width: 34px; height: 20px; border-radius: 10px; flex: none;
  background: var(--rand); position: relative; transition: background 0.15s;
}
.schalter::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform 0.15s;
}
[aria-pressed="true"] > .schalter { background: var(--akzent); }
[aria-pressed="true"] > .schalter::after { transform: translateX(14px); }
.legende { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 4px 10px 10px; font-size: 0.78rem; color: var(--text-2); }
.legende span { display: flex; align-items: center; gap: 6px; }
.legende i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legende i.ring { border-radius: 50%; border: 3px solid; background: #fff; }

/* Gewässersuche */
.suche {
  position: absolute; z-index: 1200; inset: 0; background: var(--flaeche);
  display: flex; flex-direction: column; padding-top: env(safe-area-inset-top);
}
.suche[hidden] { display: none; }
.suche-feld { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 16px; border-bottom: 1px solid var(--rand); }
.suche-feld > .ic { color: var(--text-2); width: 20px; height: 20px; }
.suche-feld input { flex: 1; border: none; outline: none; font-size: 1rem; padding: 8px 0; background: none; color: var(--text); }
.suche-liste { flex: 1; overflow-y: auto; padding: 4px 8px calc(16px + env(safe-area-inset-bottom)); }
.suche-treffer {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 8px; border: none; border-bottom: 1px solid var(--rand); background: none; cursor: pointer;
}
.suche-treffer > .ic { color: var(--akzent); width: 20px; height: 20px; }
.suche-treffer b { display: block; font-size: 0.95rem; font-weight: 600; }
.suche-treffer .klein { display: block; }
@media (min-width: 700px) {
  .suche { inset: auto; left: 12px; top: calc(10px + env(safe-area-inset-top)); width: 400px; max-height: 70vh;
           border-radius: var(--radius); box-shadow: 0 8px 28px rgba(16, 32, 40, 0.22); }
}

/* Hinweis ohne Netz */
#offlineHinweis {
  position: absolute; z-index: 750; left: 50%; transform: translateX(-50%);
  top: calc(70px + env(safe-area-inset-top));
  background: #263743; color: #fff; padding: 6px 14px; border-radius: 16px;
  font-size: 0.8rem; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Windpfeil an den Gewässern (Zahl: Wind/Böen in km/h) */
.wind-anker { background: none; border: none; }
.wind-symbol {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 3px;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.92); border-radius: 14px; padding: 2px 7px 2px 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.25); white-space: nowrap;
  font-size: 12px; font-weight: 700; color: var(--text);
}
.wind-symbol svg { fill: var(--akzent); flex: none; }
.wind-symbol small { font-weight: 400; color: var(--text-2); }
.wind-symbol.zu-windig { background: #d64545; color: #fff; }
.wind-symbol.zu-windig svg { fill: #fff; }
.wind-symbol.zu-windig small { color: #ffe1e1; }

/* Spot-Punkte auf der Karte */
.spot-anker { background: none; border: none; }
.spot-symbol {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px;
  background: #fff; border: 3px solid var(--farbe); color: var(--text);
  font: 700 11px/20px system-ui, sans-serif; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.spot-symbol.top { background: #fff6d6; box-shadow: 0 0 0 3px #c9741e, 0 1px 4px rgba(0,0,0,0.35); }
@keyframes puls { 50% { opacity: 0.5; } }


/* ============================================================
   Gewässer-Panel (panel.js): Bottom-Sheet zu / kurz / voll
   ============================================================ */
#panel {
  position: absolute; z-index: 500; left: 0; right: 0; bottom: 0;
  height: min(88vh, 88dvh);
  display: flex; flex-direction: column;
  background: var(--flaeche);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(16, 32, 40, 0.18);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  touch-action: pan-y;
}
#panel[data-zustand="zu"]   { transform: translateY(105%); }
#panel[data-zustand="kurz"] { transform: translateY(calc(100% - var(--kurz, 200px) - env(safe-area-inset-bottom))); }
#panel[data-zustand="voll"] { transform: translateY(0); }
#panel.zieht { transition: none; }
@media (min-width: 700px) {
  #panel { left: 12px; right: auto; width: 400px; bottom: 0; }
}

#panelGriff { padding: 8px 0 2px; cursor: grab; touch-action: none; }
#panelGriff .griff { width: 38px; height: 4px; border-radius: 2px; background: var(--rand); margin: 0 auto; }

#panelKopf { padding: 4px 16px 0; cursor: grab; touch-action: none; }
.sheet-titelzeile { display: flex; align-items: flex-start; gap: 12px; }
.sheet-titelzeile > div { flex: 1; min-width: 0; }
.sheet-name { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
.sheet-meta { font-size: 0.82rem; color: var(--text-2); margin-top: 2px; }
.sheet-zu {
  width: 32px; height: 32px; border: none; border-radius: 50%; flex: none;
  background: var(--flaeche-2); color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Kacheln (Kurzkarte und Reiter „Jetzt") */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.kachel { background: var(--flaeche-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.k-titel { font-size: 0.72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-wert { font-size: 1.05rem; font-weight: 650; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-sub { font-size: 0.72rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kachel.gut { background: var(--gut-hg); }      .kachel.gut .k-wert { color: var(--gut); }
.kachel.mittel { background: var(--mittel-hg); } .kachel.mittel .k-wert { color: var(--mittel); }
.kachel.schlecht { background: var(--schlecht-hg); } .kachel.schlecht .k-wert { color: var(--schlecht); }

.hinweisband {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 0;
  font-size: 0.82rem; color: var(--text-2);
}
.hinweisband.warn { color: var(--mittel); }
.hinweisband.schlecht { color: var(--schlecht); background: var(--schlecht-hg); padding: 10px 12px; border-radius: 10px; }

/* Reiter */
#panelReiter {
  display: flex; gap: 2px; margin: 14px 16px 0; padding: 3px;
  background: var(--flaeche-2); border-radius: 10px;
}
#panelReiter button {
  flex: 1; border: none; background: none; padding: 7px 0; border-radius: 8px;
  font-size: 0.86rem; color: var(--text-2); cursor: pointer;
}
#panelReiter button.aktiv { background: var(--flaeche); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

#panelInhalt {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(24px + env(safe-area-inset-bottom));
}
#panelInhalt h4 { font-size: 0.8rem; font-weight: 600; color: var(--text-2); margin: 20px 0 8px; }
#panelInhalt .kacheln { margin-top: 14px; }

.klein { font-size: 0.78rem; color: var(--text-2); line-height: 1.4; }
.leise { color: var(--text-2); }
.erklaerung { font-size: 0.86rem; color: var(--text-2); line-height: 1.45; margin-top: 10px; }
.fussnote { font-size: 0.74rem; color: var(--text-3); line-height: 1.4; margin-top: 22px; }

.zeile { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; padding: 6px 0; }
.zeile.zwei { justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rand); padding: 8px 0; }
.zeile.zwei span:last-child { text-align: right; }

.pille { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; background: var(--flaeche-2); color: var(--text-2); }
.pille.gut { background: var(--gut-hg); color: var(--gut); }
.pille.mittel { background: var(--mittel-hg); color: var(--mittel); }
.pille.schlecht { background: var(--schlecht-hg); color: var(--schlecht); }

.warnkarte {
  display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0;
  padding: 10px 12px; border-radius: 10px;
  background: var(--mittel-hg); color: var(--mittel); font-size: 0.86rem; line-height: 1.4;
}
.warnkarte .ic { margin-top: 2px; }
.warnkarte .klein { color: inherit; opacity: 0.85; }
.warnkarte.schlecht { background: var(--schlecht-hg); color: var(--schlecht); }

/* Beißzeiten-Leiste */
.zeitleiste { position: relative; height: 22px; background: var(--flaeche-2); border-radius: 6px; overflow: hidden; }
.zl-f { position: absolute; top: 0; bottom: 0; }
.zl-f.d { background: #f2c35b; }
.zl-f.h { background: var(--akzent); opacity: 0.75; }
.zl-f.n { background: var(--akzent); opacity: 0.3; }
.zl-jetzt { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text); }
.zl-achse { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--text-3); margin-top: 3px; }
.zl-zeiten { margin-top: 6px; }
.legende-klein { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.72rem; color: var(--text-2); margin-top: 6px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 6px; }
.lg:first-child { margin-left: 0; }
.lg.d { background: #f2c35b; } .lg.h { background: var(--akzent); opacity: 0.75; } .lg.n { background: var(--akzent); opacity: 0.3; }

/* Köder */
.koederkarte { border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px 12px; }
.k-name { font-size: 1.05rem; font-weight: 650; }
.info { padding: 9px 0; border-bottom: 1px solid var(--rand); font-size: 0.88rem; line-height: 1.4; }
.info > span { display: block; font-size: 0.74rem; color: var(--text-2); margin-bottom: 1px; }
.segment { display: flex; gap: 2px; padding: 3px; margin-top: 12px; background: var(--flaeche-2); border-radius: 10px; }
.segment button { flex: 1; border: none; background: none; padding: 7px 4px; border-radius: 8px; font-size: 0.78rem; color: var(--text-2); cursor: pointer; }
.segment button.aktiv { background: var(--flaeche); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* Zielfische, Tage, Spots, Regeln: ruhige Listen mit Trennlinien */
.fischzeile, .tagzeile { padding: 10px 0; border-bottom: 1px solid var(--rand); }
.fz-kopf, .tz-kopf { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; margin-bottom: 3px; }
.fz-groesse { margin-left: auto; font-size: 0.82rem; color: var(--text-2); }
.tz-tag { width: 76px; flex: none; white-space: nowrap; }
.bester { display: inline-flex; align-items: center; gap: 3px; font-size: 0.74rem; font-weight: 600; color: #b56a12; }
.tz-wind { margin-left: auto; font-size: 0.8rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tz-belly { display: inline-flex; }
.tz-belly.gut { color: var(--gut); } .tz-belly.schlecht { color: var(--schlecht); }

.spotzeile {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 0; border: none; border-bottom: 1px solid var(--rand); background: none; cursor: pointer;
}
.spotzeile:active { background: var(--flaeche-2); }
.rang {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 650; background: var(--flaeche-2); color: var(--text-2);
}
.rang.top { background: var(--akzent-hg); color: var(--akzent); }
.sz-text { flex: 1; min-width: 0; font-size: 0.92rem; }
.sz-text .klein { display: block; margin-top: 2px; }

.regelzeile {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--rand); font-size: 0.9rem;
}
.regelzeile > .ic { color: var(--text-2); }
.regelzeile > span:last-child { text-align: right; }
.regelzeile.schlecht > span:last-child, .regelzeile.schlecht > .ic { color: var(--schlecht); }
.regelzeile.leise-wert > span:last-child { color: var(--text-2); }

.leer { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 12px; color: var(--text-2); font-size: 0.86rem; }
.leer .ic { width: 28px; height: 28px; color: var(--text-3); }
.leer b { color: var(--text); font-size: 0.95rem; }

/* ============================================================
   Gemeinsame Panel-Bausteine (vom Fangbuch-Panel genutzt)
   ============================================================ */
.p-name { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; padding-right: 34px; }
.p-ort { color: var(--text-2); font-size: 0.88rem; margin-bottom: 14px; }
.p-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.p-tag {
  font-size: 0.74rem; padding: 4px 10px; border-radius: 20px;
  background: #eef3f5; color: var(--akzent); font-weight: 600;
}
.p-tag.warn { background: var(--schlecht-hg); color: var(--schlecht); }
.p-tag.gut { background: var(--gut-hg); color: var(--gut); }
.p-abschnitt { margin: 16px 0; }
.p-abschnitt h3 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-2); margin-bottom: 8px; font-weight: 600;
}
.p-zeile { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.92rem; border-bottom: 1px solid var(--rand); }
.p-zeile:last-child { border-bottom: none; }
.p-zeile .k { color: var(--text-2); }
.p-zeile .v { font-weight: 500; text-align: right; }
.p-hint { font-size: 0.74rem; color: var(--text-2); margin-top: 10px; }

/* Leaflet-Popup schlicht halten */
.leaflet-popup-content { margin: 10px 14px; font-size: 0.9rem; font-weight: 600; }


/* ============================================================
   Fangbuch: Anmeldung, Fang melden / Details / Filter, Marker, Toast
   ============================================================ */

/* ---- Anmeldung ---- */
#authOverlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--akzent);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-box {
  background: var(--flaeche); border-radius: 18px; padding: 28px 22px 22px;
  width: 100%; max-width: 360px; box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.auth-logo { display: block; width: 120px; height: 120px; margin: -8px auto 6px; border-radius: 26px; background: #fff; }
.auth-titel { font-size: 1.3rem; font-weight: 650; text-align: center; }
.auth-untertitel { font-size: 0.86rem; color: var(--text-2); text-align: center; margin: 4px 0 20px; }
.auth-tabs { display: flex; gap: 2px; padding: 3px; margin-bottom: 16px; background: var(--flaeche-2); border-radius: 10px; }
.auth-tabs button {
  flex: 1; padding: 8px; border: none; border-radius: 8px; cursor: pointer;
  background: none; color: var(--text-2); font-size: 0.9rem;
}
.auth-tabs button.aktiv { background: var(--flaeche); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-fehler {
  background: var(--schlecht-hg); color: var(--schlecht); border-radius: 10px;
  padding: 10px 12px; font-size: 0.86rem; margin-bottom: 12px;
}

/* ---- Eingabefelder und Knöpfe (Anmeldung und Fang-Fenster) ---- */
.auth-form input, .m-abschnitt select, .m-abschnitt input[type=number], .m-abschnitt input[type=text] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--rand); border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--text); background: var(--flaeche); outline: none;
  -webkit-appearance: none; appearance: none;
}
.m-abschnitt select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
.auth-form input:focus, .m-abschnitt select:focus, .m-abschnitt input:focus { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hg); }
.auth-primaer, .knopf-primaer {
  width: 100%; padding: 13px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--akzent); color: #fff; font-size: 1rem; font-weight: 650; margin-top: 6px;
}
.auth-primaer:active, .knopf-primaer:active { filter: brightness(0.92); }
.knopf-sekundaer {
  width: 100%; padding: 13px; border: 1px solid var(--rand); border-radius: 12px; cursor: pointer;
  background: var(--flaeche); color: var(--text); font-size: 1rem; margin-top: 6px;
}
.knopf-gefahr {
  width: 100%; margin-top: 24px; padding: 12px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--schlecht-hg); color: var(--schlecht); font-size: 0.95rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.knopf-gefahr.bestaetigen { background: var(--schlecht); color: #fff; }

/* ---- Fang-Fenster (melden, Details, Filter) ---- */
#meldePanel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1100;
  background: var(--flaeche); border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(16, 32, 40, 0.22);
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
  transition: transform .32s cubic-bezier(0.32, 0.72, 0, 1);
}
@media (min-width: 700px) { #meldePanel { left: 12px; right: auto; width: 400px; } }
#meldePanel.zu { transform: translateY(105%); }
#meldePanel .griff { width: 38px; height: 4px; background: var(--rand); border-radius: 2px; margin: 0 auto 12px; }
#meldeZu { position: absolute; top: 14px; right: 14px; }
#meldeInhalt .sheet-name { padding-right: 40px; }
#meldeInhalt .sheet-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
#meldeInhalt h4 { font-size: 0.8rem; font-weight: 600; color: var(--text-2); margin: 20px 0 4px; }
.fang-titel { display: flex; align-items: center; gap: 8px; }
.fang-titel .fisch-punkt { width: 14px; height: 14px; }
.pillen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.m-abschnitt { margin: 16px 0 0; }
.m-abschnitt label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.m-reihe { display: flex; gap: 10px; }
.m-abschnitt.halb { flex: 1; min-width: 0; }
.knopfreihe { margin-top: 18px; }
.m-fische { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-fisch {
  display: flex; align-items: center; gap: 8px; padding: 12px;
  border: 1px solid var(--rand); border-radius: 12px; background: var(--flaeche);
  font-size: 0.95rem; cursor: pointer;
}
.m-fisch.aktiv { border-color: var(--fc); box-shadow: inset 0 0 0 1px var(--fc); background: color-mix(in srgb, var(--fc) 10%, var(--flaeche)); font-weight: 600; }
.m-cr { margin-top: 0; }
.schalter-zeile.rahmen { margin-top: 16px; border: 1px solid var(--rand); border-radius: 12px; padding: 12px; }
.fisch-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
#mFehler { margin-top: 12px; }

/* ---- Pin-Hinweis ---- */
#pinHinweis {
  position: absolute; top: calc(76px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  z-index: 950; background: var(--akzent); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
  box-shadow: var(--schatten); pointer-events: none; text-align: center; white-space: nowrap;
}

/* ---- Fang-Marker ---- */
.fang-marker { background: none; border: none; }
.fm-punkt {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
  color: #fff; font: 700 11px/1 system-ui, sans-serif;
}

/* ---- Toast ---- */
#toast {
  position: fixed; bottom: calc(96px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 1500; background: #22323b; color: #fff; padding: 12px 18px;
  border-radius: 12px; font-size: 0.9rem; box-shadow: 0 6px 20px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  max-width: calc(100vw - 32px); text-align: center;
}
#toast.sichtbar { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   Dunkelmodus (folgt der Einstellung des Handys)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --akzent: #5fb3d6;
    --akzent-hg: #173543;
    --gut: #6fcf8f;        --gut-hg: #183526;
    --mittel: #e8b552;     --mittel-hg: #3a2e14;
    --schlecht: #f08a80;   --schlecht-hg: #40201d;
    --flaeche: #1b2328;
    --flaeche-2: #252f35;
    --rand: #33414a;
    --text: #e7edf0;
    --text-2: #a3b3bb;
    --text-3: #75868f;
    --schatten: 0 2px 12px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
  body { background: #11181c; }
  /* Kartenkacheln abdunkeln (Tiefenkarten liegen in eigener Ebene und bleiben farbig) */
  .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9) saturate(0.7); }
  .leaflet-container { background: #11181c; }
  .primaer, .knopf-primaer, .auth-primaer, #gpsBtn.folgt, #pinHinweis { color: #0d1a20; }
  #authOverlay { background: #0f1619; }
  .wind-symbol { background: rgba(27, 35, 40, 0.92); color: var(--text); }
  .spot-symbol { background: #1b2328; color: var(--text); }
  .spot-symbol.top { background: #3a2e14; }
  .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--flaeche); color: var(--text); }
  .leaflet-control-attribution { background: rgba(27, 35, 40, 0.8) !important; color: var(--text-3); }
  .leaflet-control-attribution a { color: var(--text-2); }
  .leaflet-bar a { background: var(--flaeche); color: var(--text); border-color: var(--rand); }
  .zl-f.d, .lg.d { background: #c9952e; }
}