/* Feldtauglich: große Flächen, starker Kontrast, Moosgrün wie die Biologie-Seite */
:root {
  --bg: #f4f6f1; --surface: #ffffff; --ink: #18241d; --muted: #56665c; --line: #d3dbd1;
  --moss: #2e6a4a; --moss-soft: #e2eee5; --warn: #94590f; --warn-soft: #f5e8d3; --bad: #a8281e; --bad-soft: #f8e0dc;
  --on-moss: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1512; --surface: #161f1a; --ink: #e2e9e3; --muted: #9babA1; --line: #2b3931;
    --moss: #7cc29d; --moss-soft: #1a2c22; --warn: #e2a85a; --warn-soft: #2d2416; --bad: #f08a7f; --bad-soft: #351c19;
    --on-moss: #0f1512; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: env(safe-area-inset-top, 0px) 0 calc(env(safe-area-inset-bottom, 0px) + 24px); }
.kopf { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.marke { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.punkt { width: 12px; height: 12px; border-radius: 50%; background: var(--moss); }
main { padding: 16px; max-width: 40rem; margin: 0 auto; }
.ansicht { display: grid; gap: 16px; }
h1 { font-size: 1.6rem; margin: 8px 0 0; }
h2 { font-size: 1.05rem; margin: 6px 0 0; }
.text { margin: 0; } .klein { font-size: 0.9rem; color: var(--muted); }
button, .knopf-datei { font: 600 1rem system-ui, sans-serif; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px; min-height: 48px; cursor: pointer; text-align: center; }
button:focus-visible, input:focus-visible, textarea:focus-visible, .knopf-datei:focus-within { outline: 3px solid var(--moss); outline-offset: 2px; }
button.haupt { background: var(--moss); border-color: var(--moss); color: var(--on-moss); font-size: 1.15rem; min-height: 60px; }
button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--moss); text-decoration: underline; font-weight: 400; }
.knopf-datei { display: block; position: relative; overflow: hidden; }
.knopf-datei input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.zeile-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.zeile-knoepfe button { flex: 1 1 auto; }
.block { display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.feld { display: grid; gap: 6px; }
.feld label, .label { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
input[type="text"], input:not([type]), input[inputmode], textarea { font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 100%; }
.schalter label { display: flex; gap: 10px; align-items: center; font-size: 1rem; color: var(--ink); }
.schalter input { width: 24px; height: 24px; accent-color: var(--moss); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 44px; padding: 8px 14px; border-radius: 999px; font-weight: 500; }
.chips button[aria-pressed="true"] { background: var(--moss); border-color: var(--moss); color: var(--on-moss); }
.chip-status { min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
.chip-status.ok { background: var(--moss-soft); color: var(--moss); border-color: transparent; }
.chip-status.wartet { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip-status.fehler { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.gps { margin: 0; font-weight: 600; }
.gps.gut { color: var(--moss); } .gps.maessig { color: var(--warn); } .gps.schlecht { color: var(--bad); }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.foto { position: relative; }
.foto img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: var(--moss-soft); }
.foto .rolle { position: absolute; left: 4px; bottom: 4px; font-size: 0.7rem; background: var(--surface); color: var(--ink);
  padding: 1px 6px; border-radius: 6px; }
.foto button { position: absolute; top: 4px; right: 4px; min-height: 0; padding: 2px 8px; font-size: 0.8rem; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.liste li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.liste li button.eintrag { all: unset; display: grid; gap: 2px; cursor: pointer; }
.liste .kennung { font: 700 1rem ui-monospace, Menlo, monospace; }
.liste .zusatz { font-size: 0.85rem; color: var(--muted); }
.status { font-size: 0.8rem; font-weight: 600; }
.status.lokal { color: var(--warn); } .status.hochgeladen { color: var(--moss); } .status.fehler { color: var(--bad); }
.leiste-zurueck { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.zurueck { min-height: 40px; padding: 6px 12px; }
#etiketten-vorschau { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.vorschau-karte { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.liste .link { margin-left: 6px; font-size: 0.85rem; }

/* Briefing */
#briefing-inhalt { display: grid; gap: 12px; }
details.block > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
details.block > summary::-webkit-details-marker { display: none; }
details.block > summary::after { content: "+"; font: 600 1.4rem system-ui, sans-serif; color: var(--muted); }
details.block[open] > summary::after { content: "–"; }
details.block > summary h2 { margin: 0; }
details.block:not([open]) { gap: 0; }
.punkte { margin: 0; padding-left: 1.3rem; display: grid; gap: 8px; }
.punkte li { padding-left: 2px; }
.arten { display: grid; gap: 12px; }
.art { display: grid; grid-template-columns: 136px 1fr; gap: 12px; align-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.art-bilder { display: grid; gap: 4px; }
.bild-knopf { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; min-height: 0; border: 0; border-radius: 10px;
  overflow: hidden; background: var(--moss-soft); }
.bild-knopf img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease; }
.bild-knopf .zweites { opacity: 0; }
@media (hover: hover) { .bild-knopf:hover .zweites { opacity: 1; } }
.bild-knopf .anzahl { position: absolute; right: 6px; bottom: 6px; font-size: 0.72rem; font-weight: 700; color: #fff;
  background: rgba(0, 0, 0, 0.55); padding: 2px 7px; border-radius: 999px; }
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mini button { padding: 0; min-height: 0; border: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 1; background: var(--moss-soft); }
.mini img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Galerie: Vollbild, wischen per Scroll-Snap */
dialog.galerie { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0b0f0c; color: #eef2ee; }
dialog.galerie[open] { display: grid; grid-template-rows: auto 1fr auto; }
dialog.galerie::backdrop { background: #0b0f0c; }
.galerie-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; }
.galerie-titel { display: grid; min-width: 0; }
.galerie-titel span { font-size: 0.85rem; color: #a9b8ad; }
.galerie button { background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; }
.galerie-band { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.galerie-band::-webkit-scrollbar { display: none; }
.galerie-band figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.galerie-band img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.galerie-fuss { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px); }
.galerie-fuss p { margin: 0; font-size: 0.8rem; color: #c3cfc6; text-align: center; }
.galerie-pfeil { font-size: 1.6rem; line-height: 1; width: 48px; padding: 0; }
.galerie-pfeil:disabled { opacity: 0.3; }
.art-text { min-width: 0; display: grid; gap: 4px; }
.art-text h3 { margin: 0; font-size: 1.02rem; line-height: 1.25; }
.art-text p { margin: 0; font-size: 0.92rem; }
.art-text .latein { font-style: italic; color: var(--muted); }
.art-text .achtung { color: var(--bad); font-weight: 600; }
.art-text .credit { font-size: 0.72rem; color: var(--muted); }
.marken { display: flex; flex-wrap: wrap; gap: 6px; }
.marke-chip { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; }
.marke-chip.prio { background: var(--moss-soft); color: var(--moss); }
.marke-chip.giftig { background: var(--bad-soft); color: var(--bad); }
.marke-chip.geschuetzt { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 380px) { .art { grid-template-columns: 1fr; } .bild-knopf { aspect-ratio: 4 / 3; } .mini { grid-template-columns: repeat(4, 1fr); } }

/* Pilznamen im Text und Vorschau-Karte */
.art-verweis { all: unset; cursor: pointer; color: var(--moss); font-weight: 600; text-decoration: underline;
  text-decoration-style: dotted; text-underline-offset: 3px; }
.art-verweis:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; border-radius: 3px; }
.art-vorschau { position: fixed; z-index: 20; width: min(320px, calc(100vw - 16px)); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); overflow: hidden; }
.art-vorschau img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--moss-soft); }
.art-vorschau.blatt { left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); width: auto; max-width: 32rem;
  margin: 0 auto; max-height: 80vh; overflow-y: auto; }
.vorschau-text { display: grid; gap: 6px; padding: 12px 14px 14px; }
.vorschau-text em { color: var(--muted); font-size: 0.9rem; }
.vorschau-text p { margin: 0; font-size: 0.92rem; }
.vorschau-text .achtung { color: var(--bad); font-weight: 600; }
.vorschau-knoepfe { display: flex; gap: 8px; margin-top: 4px; }
.vorschau-knoepfe button { min-height: 40px; padding: 6px 12px; flex: 1 1 auto; }
.vorschau-knoepfe button[data-vorschau="zu"] { flex: 0 0 auto; }
.art.hervor { animation: hervor 1.6s ease; }
@keyframes hervor { 0%, 60% { background: var(--moss-soft); } 100% { background: transparent; } }

/* Pilz-Finder */
.finder { border-color: var(--moss); }
.frage { display: grid; gap: 6px; }
.finder-ergebnis { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.finder-ergebnis p { margin: 0; }
.finder-warnung { background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: 0.9rem; padding: 8px 10px; border-radius: 8px; }
.treffer { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.treffer button { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left;
  padding: 6px; min-height: 0; }
.treffer img, .treffer button > span:first-child { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--moss-soft); }
.treffer-name { display: grid; font-weight: 600; min-width: 0; }
.treffer-name em { font-weight: 400; font-size: 0.82rem; color: var(--muted); }
.tun { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tun.sammeln { background: var(--moss); color: var(--on-moss); }
.tun.foto { background: var(--warn-soft); color: var(--warn); }
.tun.nie { background: var(--bad); color: #fff; }
.art-verweis-beispiel { color: var(--moss); font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; }

/* Abhaklisten und Zeitleiste */
.haken { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: schritt; }
.haken label { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 8px 4px; border-radius: 8px; cursor: pointer; }
.haken input { width: 24px; height: 24px; margin: 0; accent-color: var(--moss); }
.haken input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.haken-fuss { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--muted); }
.haken-zahl { margin-left: auto; margin-right: 10px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
details.fertig .haken-zahl { color: var(--moss); }
.zeitleiste { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.zeitleiste li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 0 0 12px; position: relative; }
.zeitleiste li::before { content: ""; position: absolute; left: 100px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.zeitleiste li:last-child::before { display: none; }
.zeitleiste .wann { font-size: 0.78rem; font-weight: 700; color: var(--moss); background: var(--moss-soft); border-radius: 999px;
  padding: 3px 8px; text-align: center; align-self: start; }
.zeitleiste li > span:last-child { padding-left: 10px; font-size: 0.95rem; }

/* Bäume erkennen */
.baum-finder { display: grid; gap: 10px; }
.baeume { display: grid; gap: 14px; margin-top: 12px; }
.baum { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.baum.gewaehlt { background: var(--moss-soft); border-radius: 10px; padding: 10px; border-top-color: transparent; }
.baum-bilder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.baum-bilder button { position: relative; padding: 0; min-height: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1;
  background: var(--moss-soft); }
.baum-bilder img { width: 100%; height: 100%; object-fit: cover; display: block; }
.baum-bilder span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 0.66rem; font-weight: 700; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); padding: 10px 4px 3px; text-align: left; }
.baum-text { display: grid; gap: 6px; justify-items: start; }
.baum-text h3 { margin: 0; font-size: 1.05rem; }
.baum-text h3 em { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.baum-text dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 0.92rem; }
.baum-text dt { font-weight: 700; color: var(--muted); }
.baum-text dd { margin: 0; }
.baum-waehlen { min-height: 44px; }
.baum-waehlen[aria-pressed="true"] { background: var(--moss); border-color: var(--moss); color: var(--on-moss); }
dialog.baum-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; background: var(--bg);
  color: var(--ink); padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px); }
dialog.baum-dialog > * + * { margin-top: 12px; }
.feld .label .link { margin-left: 8px; font-size: 0.85rem; }
.tun.weg { background: var(--line); color: var(--muted); }
