/* SVO – Stallverordnung.
   Mobil zuerst: die App wird zu 95 % einhändig im Stall bedient, mit Handschuhen
   oder dreckigen Fingern. Große Ziele, kein Hover als einzige Rückmeldung. */

:root {
  --gruen-tief:   #16211b;
  --gruen-karte:  #1e2c24;
  --gruen-rand:   #2c3f34;
  --stroh:        #e0a94a;
  --stroh-hell:   #f2c877;
  --text:         #eef2ee;
  --text-leise:   #9db0a3;
  --rot:          #e0705f;
  --gruen-ok:     #74c08b;
  --radius:       16px;
  --breite:       620px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 50% -10%, #24352b 0%, transparent 70%),
    var(--gruen-tief);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}

body.mittig { display: grid; place-items: center; padding: 24px 16px; }
body.mittig main { width: 100%; max-width: 400px; }

main {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 12px 14px 56px;
}

h1 { font-size: 1.45rem; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 1.08rem; margin: 0 0 10px; letter-spacing: -0.01em; }
a  { color: var(--stroh-hell); }

/* ------------------------------------------------------------------ Kopf */

.kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-top));
  padding-top: calc(14px + env(safe-area-inset-top));
  max-width: var(--breite); margin: 0 auto;
}
.marke { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; }
.marke-kuerzel {
  font-weight: 800; font-size: 1.35rem; letter-spacing: 0.06em;
  color: var(--stroh);
}
.marke-lang { color: var(--text-leise); font-size: 0.86rem; }
.abmelden { margin: 0; }

.reiter {
  display: flex; gap: 6px; max-width: var(--breite); margin: 0 auto;
  padding: 0 14px 4px; overflow-x: auto; scrollbar-width: none;
}
.reiter::-webkit-scrollbar { display: none; }
.reiter a {
  flex: 1 0 auto; text-align: center; text-decoration: none;
  padding: 10px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--gruen-karte); border: 1px solid var(--gruen-rand);
  color: var(--text-leise); font-weight: 600; font-size: 0.92rem;
}
.reiter a.aktiv { background: var(--stroh); border-color: var(--stroh); color: #23180a; }
.perle {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--rot); color: #2a0f0a;
  font-size: 0.78rem; font-weight: 800;
}

/* ----------------------------------------------------------------- Karten */

.karte {
  background: var(--gruen-karte);
  border: 1px solid var(--gruen-rand);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
}
.karte.inaktiv { opacity: 0.5; }
.karte.leer { text-align: center; }

.schritt { display: flex; align-items: center; gap: 10px; }
.schritt span {
  display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px;
  border-radius: 999px; background: var(--stroh); color: #23180a;
  font-size: 0.82rem; font-weight: 800;
}

.fussnote { color: var(--text-leise); font-size: 0.87rem; margin: 8px 0 0; }
.gross-text { font-size: 1.05rem; }

/* --------------------------------------------------------------- Hinweise */

.hinweise { margin: 8px 0; }
.hinweis {
  margin: 6px 0; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--gruen-rand); background: var(--gruen-karte);
  font-size: 0.92rem;
}
.hinweis.ok     { border-color: rgba(116,192,139,.5); color: var(--gruen-ok); }
.hinweis.fehler { border-color: rgba(224,112,95,.5);  color: var(--rot); }

/* ------------------------------------------------------------------- Foto */

.foto-feld {
  display: block; border: 2px dashed var(--gruen-rand); border-radius: 14px;
  background: rgba(0,0,0,.18); cursor: pointer; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.foto-feld:active { border-color: var(--stroh); }
.foto-leer {
  display: grid; place-items: center; gap: 6px; padding: 34px 16px;
  color: var(--text-leise); text-align: center;
}
.foto-titel { font-weight: 700; color: var(--text); font-size: 1.02rem; }
.foto-klein { font-size: 0.83rem; }
#foto-vorschau { display: block; width: 100%; height: auto; }
.weg { margin-top: 10px; }

/* ------------------------------------------------------------------ Chips */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 11px 16px; border-radius: 999px;
  background: rgba(0,0,0,.2); border: 1px solid var(--gruen-rand);
  font-weight: 600; font-size: 0.96rem;
}
.chip input:checked + span { background: var(--stroh); border-color: var(--stroh); color: #23180a; }
.chip input:focus-visible + span { outline: 2px solid var(--stroh-hell); outline-offset: 2px; }

/* --------------------------------------------------------------- Vergehen */

.suche {
  width: 100%; margin-bottom: 10px; padding: 11px 14px; font-size: 1rem;
  border-radius: 12px; border: 1px solid var(--gruen-rand);
  background: rgba(0,0,0,.22); color: var(--text);
}
.vergehen-liste { display: flex; flex-direction: column; gap: 6px; }
.vergehen {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 12px; background: rgba(0,0,0,.2);
  border: 1px solid var(--gruen-rand); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.vergehen input { position: absolute; opacity: 0; pointer-events: none; }
.vergehen-text { flex: 1; display: flex; flex-direction: column; }
.vergehen-text small, .katalog-text small { color: var(--text-leise); font-size: 0.83rem; }
.vergehen:has(input:checked) { background: rgba(224,169,74,.16); border-color: var(--stroh); }
.vergehen:has(input:focus-visible) { outline: 2px solid var(--stroh-hell); outline-offset: 2px; }
.preis { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--stroh); white-space: nowrap; }
.nichts { color: var(--text-leise); font-size: 0.9rem; }

/* ----------------------------------------------------------------- Felder */

.feld { display: block; margin: 12px 0; }
.feld > span { display: block; margin-bottom: 6px; font-size: 0.88rem; color: var(--text-leise); }
.feld > span small { opacity: 0.75; }
.feld.schmal { max-width: 140px; }
input[type=text], input[type=password], input[type=number], input[type=search],
select, textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem;
  border-radius: 12px; border: 1px solid var(--gruen-rand);
  background: rgba(0,0,0,.22); color: var(--text);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--stroh); outline-offset: 1px; }

.pruef-zeile { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pruef-zeile .feld { flex: 1 1 140px; }

/* ----------------------------------------------------------------- Knöpfe */

.knopf, button.knopf {
  display: inline-block; padding: 13px 20px; border: 0; border-radius: 12px;
  background: var(--stroh); color: #23180a; font: inherit; font-weight: 700;
  text-decoration: none; text-align: center; cursor: pointer;
}
.knopf.gross { display: block; width: 100%; padding: 16px; font-size: 1.06rem; margin-top: 6px; }
.knopf.hell { background: transparent; color: var(--text); border: 1px solid var(--gruen-rand); }
.knopf-klein {
  padding: 8px 13px; border-radius: 10px; border: 1px solid var(--gruen-rand);
  background: rgba(0,0,0,.2); color: var(--text); font: inherit;
  font-size: 0.86rem; font-weight: 600; cursor: pointer;
}
.knopf-klein.gefahr { color: var(--rot); border-color: rgba(224,112,95,.4); }
.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.knopf-reihe .knopf { flex: 1 1 140px; }
button:disabled { opacity: 0.55; }

.reihe-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reihe-form input { flex: 1 1 160px; width: auto; }
.katalog-form .feld:first-child { margin-top: 0; }

/* ------------------------------------------------------------- Kasse/Feed */

.kennzahlen, .getraenke-summe {
  display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap;
}
.getraenke-summe > div { flex: 1 1 90px; }
.kennzahlen > div, .getraenke-summe > div {
  flex: 1; padding: 12px 10px; border-radius: 12px; text-align: center;
  background: rgba(0,0,0,.2); border: 1px solid var(--gruen-rand);
}
.kennzahlen .zahl, .getraenke-summe .zahl {
  display: block; font-weight: 800; font-size: 1.12rem;
  font-variant-numeric: tabular-nums; color: var(--stroh);
}
.kennzahlen .etikett, .getraenke-summe .etikett {
  display: block; font-size: 0.78rem; color: var(--text-leise);
  line-height: 1.25;
}

/* Getränke-Marken in der Rangliste */
.posten { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.posten-marke {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: rgba(224,169,74,.16); color: var(--stroh-hell);
  font-size: 0.76rem; font-weight: 600; white-space: nowrap;
}
.posten-marke.leer { background: rgba(116,192,139,.14); color: var(--gruen-ok); }
.posten-marke.gut  { background: rgba(157,176,163,.16); color: var(--text-leise); }

/* Getränkename neben dem Anzahl-Feld in der Freigabe */
.feld-fest {
  align-self: flex-end; padding: 12px 0; font-weight: 700;
  color: var(--stroh-hell); white-space: nowrap;
}

.rangliste { list-style: none; margin: 0; padding: 0; }
.rangliste li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--gruen-rand);
}
.rangliste li:last-child { border-bottom: 0; }
.rangliste .platz {
  width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center;
  border-radius: 999px; background: rgba(0,0,0,.25);
  font-size: 0.8rem; font-weight: 800; color: var(--text-leise);
}
.rangliste li:first-child .platz { background: var(--stroh); color: #23180a; }
.rang-name { flex: 1; display: flex; flex-direction: column; font-weight: 600; }
.rang-name small { color: var(--text-leise); font-weight: 400; font-size: 0.8rem; }
.rang-betrag { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--stroh); }
.rangliste .schuldenfrei .rang-betrag { color: var(--gruen-ok); }

.feed, .liste, .katalog { list-style: none; margin: 0; padding: 0; }
.feed-eintrag {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--gruen-rand);
}
.feed-eintrag:last-child { border-bottom: 0; }
.feed-foto img {
  width: 68px; height: 68px; object-fit: cover; border-radius: 10px; display: block;
}
.feed-text { flex: 1; min-width: 0; }
.feed-text small { display: block; color: var(--text-leise); font-size: 0.79rem; margin-top: 3px; }
.notiz { margin: 5px 0 0; color: var(--text-leise); font-style: italic; font-size: 0.9rem; }
.notiz.admin { font-style: normal; }

.katalog li, .liste li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--gruen-rand);
}
.katalog li:last-child, .liste li:last-child { border-bottom: 0; }
.katalog-text { flex: 1; display: flex; flex-direction: column; }
.liste li > span { flex: 1; }
.liste li small { display: block; color: var(--text-leise); font-size: 0.8rem; }
.liste li.inaktiv { opacity: 0.5; }

/* ------------------------------------------------------------ Admin-Prüfung */

.pruef-kopf h2 { margin-bottom: 2px; }
.pruef-vergehen { margin: 2px 0; color: var(--stroh-hell); font-weight: 600; }
.pruef-kopf small, .verlauf-eintrag small { color: var(--text-leise); font-size: 0.8rem; }
.beweis { display: block; margin: 12px 0; }
.beweis img { width: 100%; height: auto; border-radius: 12px; display: block; }
.beweis.klein img { max-width: 180px; }
.kein-foto { color: var(--text-leise); font-size: 0.87rem; font-style: italic; }
.pruef-form { margin-top: 4px; }

.verlauf-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.marke-status {
  padding: 3px 9px; border-radius: 999px; font-size: 0.74rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.marke-status.offen        { background: rgba(224,169,74,.2);  color: var(--stroh); }
.marke-status.freigegeben  { background: rgba(116,192,139,.18); color: var(--gruen-ok); }
.marke-status.abgelehnt    { background: rgba(224,112,95,.18);  color: var(--rot); }
.verlauf-kopf .preis { margin-left: auto; }
.verlauf-eintrag .knopf-reihe form { margin: 0; }

/* ----------------------------------------------------------------- Erfolg */

.erfolg { text-align: center; }
.haken {
  width: 68px; height: 68px; margin: 4px auto 12px; display: grid; place-items: center;
  border-radius: 999px; background: rgba(116,192,139,.16); color: var(--gruen-ok);
}
.tor-karte { text-align: center; }
.tor-marke { font-size: 2.2rem; letter-spacing: 0.08em; color: var(--stroh); margin-bottom: 2px; }
.tor-karte .feld { text-align: left; }

/* ------------------------------------------------------------------- Fuß */

.fuss {
  max-width: var(--breite); margin: 0 auto; padding: 20px 16px 32px;
  text-align: center; color: var(--text-leise); font-size: 0.84rem;
}
.fuss a { color: var(--text-leise); }

@media (prefers-reduced-motion: no-preference) {
  .karte { transition: opacity .15s ease; }
}
