/* Welpensuche - ein Akzent (Waldgruen), Ecken 10px ueberall, Hell/Dunkel nach System.
   Das Braun bei "Leber mit Loh" ist die Fellfarbe selbst, also eine
   inhaltliche Markierung, keine zweite Akzentfarbe. */

:root {
  --grund: #f3f4f1;
  --flaeche: #fbfcfa;
  --linie: #d9ddd6;
  --text: #1c211d;
  --leise: #5b645d;
  --akzent: #2f6b45;
  --akzent-text: #ffffff;
  --akzent-zart: #e1ede4;
  --leber: #6b3a22;
  --leber-zart: #f2e3da;
  --warn: #8a5a00;
  --fehler: #a3261b;
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #121613;
    --flaeche: #1a201b;
    --linie: #2c352e;
    --text: #e6eae4;
    --leise: #a1aba3;
    --akzent: #7fbf93;
    --akzent-text: #0f1a12;
    --akzent-zart: #1f3326;
    --leber: #e2a888;
    --leber-zart: #3a261c;
    --warn: #e0b45c;
    --fehler: #f08a7e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .25rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0; }

.leise { color: var(--leise); }
.klein { font-size: .85rem; }
.unter { display: block; color: var(--leise); font-size: .82rem; margin-top: .1rem; }

/* ---- Kopf ---- */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 10; }
.kopf-innen { max-width: 1180px; margin: 0 auto; padding: 0 1rem; height: 56px; display: flex; align-items: center; gap: 2rem; }
.marke { font-weight: 700; color: var(--text); text-decoration: none; }
.kopf nav { display: flex; gap: .25rem; }
.kopf nav a { color: var(--leise); text-decoration: none; padding: .4rem .75rem; border-radius: var(--radius); }
.kopf nav a[aria-current="page"] { color: var(--text); background: var(--akzent-zart); font-weight: 600; }

.inhalt { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.seitenkopf { margin-bottom: 1.25rem; }
.seitenkopf p { margin: 0; }

/* ---- Filter ---- */
.filter { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: end; margin-bottom: 1.5rem;
  padding: .9rem 1rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.segmente { display: flex; flex-wrap: wrap; gap: .25rem; }
.segmente input { position: absolute; opacity: 0; pointer-events: none; }
.segmente span { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--linie); border-radius: var(--radius); cursor: pointer; }
.segmente small { color: var(--leise); margin-left: .2rem; }
.segmente input:checked + span { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.segmente input:checked + span small { color: inherit; opacity: .8; }
.segmente input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.feld { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; color: var(--leise); }
.feld select, .feld input, .notizblock select, .notizblock textarea {
  font: inherit; font-size: .95rem; color: var(--text); background: var(--grund);
  border: 1px solid var(--linie); border-radius: var(--radius); padding: .4rem .6rem; }
.suche input { min-width: 14rem; }
.schalter { display: flex; align-items: center; gap: .4rem; padding-bottom: .35rem; }
.schalter input { accent-color: var(--akzent); width: 1rem; height: 1rem; }

/* ---- Wurfliste ---- */
.gruppe h2 { display: flex; align-items: baseline; gap: .5rem; }
.zahl { color: var(--leise); font-weight: 400; font-size: .95rem; }
.wurfliste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .9rem; }
.wurfliste.kompakt { grid-template-columns: 1fr; }
.wurf { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
/* Fotos: ein grosses Hauptfoto, darunter bis zu drei kleine */
.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: -1rem -1.1rem .2rem;
  border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--linie); }
.fotos a { display: block; }
.fotos a:first-child { grid-column: 1 / -1; }
.fotos img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--linie); }
.fotos a:first-child img { aspect-ratio: 16 / 10; }
.kompakt .fotos { margin: 0; border-radius: var(--radius); max-width: 560px; }
.wurf.hervor { border-color: var(--leber); box-shadow: inset 4px 0 0 var(--leber); }
.wurf.vergangen { opacity: .7; }
.wurf-kopf { display: flex; justify-content: space-between; gap: 1rem; }
.wurf-kopf h3 a { color: var(--text); text-decoration: none; }
.wurf-kopf h3 a:hover { color: var(--akzent); }
.ort { margin: .1rem 0 0; color: var(--leise); font-size: .9rem; }
.entfernung { white-space: nowrap; color: var(--leise); font-size: .9rem; }
.entfernung strong { color: var(--text); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.fakten { display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: center; font-size: .9rem; }
.farben { margin: 0; font-size: .9rem; }
.grund { margin: 0; font-size: .85rem; color: var(--leise); }
.fuss { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: .55rem; border-top: 1px solid var(--linie); font-size: .88rem; }
.kontakt, .quellen { display: flex; flex-wrap: wrap; gap: .3rem .85rem; }
.quellen a { color: var(--leise); }
details summary { cursor: pointer; color: var(--leise); font-size: .85rem; }
.auszug { white-space: pre-line; font-size: .88rem; color: var(--leise); margin: .4rem 0 0; }

/* ---- Marken ---- */
.status { font-weight: 600; }
.status-verfuegbar { color: var(--akzent); }
.status-erwartet, .status-geplant { color: var(--warn); }
.frei { font-weight: 600; color: var(--akzent); }
.marke-klein { font-size: .78rem; padding: .1rem .5rem; border: 1px solid var(--linie); border-radius: var(--radius); color: var(--leise); cursor: help; white-space: nowrap; }
.richtung-jagdlich { border-color: var(--akzent); color: var(--akzent); }
.koerper { margin-left: .3rem; }
.leber { font-size: .8rem; font-weight: 600; padding: .12rem .55rem; border-radius: var(--radius); white-space: nowrap; }
.leber-ja { background: var(--leber); color: #fff; }
.leber-moeglich { background: var(--leber-zart); color: var(--leber); }
.leber-verwandt { color: var(--leise); border: 1px dashed var(--linie); font-weight: 400; }
@media (prefers-color-scheme: dark) { .leber-ja { color: #1d120b; } }

/* ---- Tabelle ---- */
.tabelle-huelle { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.tabelle { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabelle th { text-align: left; font-weight: 600; color: var(--leise); font-size: .8rem; padding: .65rem .8rem; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle td { padding: .65rem .8rem; vertical-align: top; }
.tabelle tbody tr + tr td { border-top: 1px solid var(--linie); }
.tabelle .name { font-weight: 600; color: var(--text); text-decoration: none; }
.tabelle .name:hover { color: var(--akzent); }
.zahl-sp { text-align: right; font-variant-numeric: tabular-nums; }
.rasse-kurz { display: block; white-space: nowrap; }
.akt-ruht td { color: var(--leise); }
.aktiv { font-weight: 600; white-space: nowrap; }
.aktiv-aktiv { color: var(--akzent); }
.aktiv-ruht { color: var(--leise); font-weight: 400; }
.notiz-status { font-weight: 600; }
.fehler { color: var(--fehler); }
.tabelle .kontakt { flex-direction: column; gap: .1rem; }
.tel { white-space: nowrap; }

/* ---- Detail ---- */
.zurueck { margin: 0 0 1rem; font-size: .9rem; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.eigenschaften { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem 1rem; margin: 1.25rem 0; }
.eigenschaften dt { color: var(--leise); font-size: .88rem; }
.eigenschaften dd { margin: 0; }
.notizblock { position: sticky; top: 72px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; }
.notizblock h2 { margin-top: 0; }
.notizblock form { display: flex; flex-direction: column; gap: .4rem; }
.notizblock label { font-size: .85rem; color: var(--leise); margin-top: .4rem; }
.notizblock textarea { resize: vertical; }
.notizblock button { margin-top: .8rem; font: inherit; font-weight: 600; padding: .55rem 1rem; border: 0; border-radius: var(--radius);
  background: var(--akzent); color: var(--akzent-text); cursor: pointer; }
.notizblock button:active { transform: translateY(1px); }
.gespeichert { margin: 0 0 .5rem; color: var(--akzent); font-weight: 600; }

.leer { padding: 2rem; text-align: center; background: var(--flaeche); border: 1px dashed var(--linie); border-radius: var(--radius); color: var(--leise); }

@media (max-width: 760px) {
  .kopf-innen { gap: 1rem; }
  .detail { grid-template-columns: 1fr; }
  .notizblock { position: static; }
  .wurfliste { grid-template-columns: 1fr; }
  .eigenschaften { grid-template-columns: 1fr; gap: .1rem; }
  .eigenschaften dd { margin-bottom: .5rem; }
  .suche input { min-width: 0; width: 100%; }
}

/* ---- Sichere Vorschau ---- */
.vorschau-leiste { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: start;
  padding: .8rem 1rem; background: var(--akzent-zart); border-radius: var(--radius); }
.vorschau-leiste .leise { margin-left: .4rem; }
.vorschau-hinweis { display: block; margin-top: .3rem; color: var(--warn); font-weight: 600; font-size: .9rem; }
.vorschau-adresse { margin: .5rem 0 1rem; word-break: break-all; }
a.original { color: var(--leise); font-size: .85em; }
.fremd { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; overflow-wrap: anywhere; }
.fremd img { max-width: 100%; height: auto; border-radius: 6px; margin: .3rem 0; }
.fremd table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.fremd td, .fremd th { padding: .3rem .5rem; vertical-align: top; }
.fremd a.extern::after { content: " ↗"; font-size: .8em; }
.fremd h1, .fremd h2, .fremd h3 { margin: 1.2rem 0 .5rem; }
.fremd .rahmen { padding: .6rem .8rem; border: 1px dashed var(--linie); border-radius: var(--radius); }
.masse { margin: 0; font-size: .88rem; font-variant-numeric: tabular-nums; }
.masse .trenner::before { content: ""; display: inline-block; width: 1px; height: .8em; background: var(--linie); margin: 0 .6rem; vertical-align: middle; }

/* ---- Anmeldung ---- */
.anmelde-seite { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.anmelde-karte { width: 100%; max-width: 380px; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 1.6rem 1.5rem; }
.anmelde-karte form { display: flex; flex-direction: column; gap: .4rem; margin-top: 1rem; }
.anmelde-karte label { font-size: .85rem; color: var(--leise); }
.anmelde-karte input { font: inherit; padding: .6rem .7rem; border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--grund); color: var(--text); }
.anmelde-karte button { margin-top: .6rem; font: inherit; font-weight: 600; padding: .65rem 1rem; border: 0;
  border-radius: var(--radius); background: var(--akzent); color: var(--akzent-text); cursor: pointer; }
.anmelde-karte .fehler { margin: .2rem 0 0; font-weight: 600; }
.kopf .abmelden { margin-left: auto; color: var(--leise); font-size: .85rem; }
.foto-hinweis { margin: -.2rem 0 0; font-size: .78rem; color: var(--leise); }
