/* Contentpipeline — schlichte Grundgestalt, zuerst fürs Handy. */
:root {
  --grund: #f6f4ef;
  --flaeche: #ffffff;
  --text: #1d1b18;
  --leise: #6b665d;
  --linie: #e2ddd2;
  --akzent: #1f5f4a;
  --rot: #b3261e;
  --gruen: #1f7a4d;
  --radius: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #151412;
    --flaeche: #1f1d1a;
    --text: #f1eee8;
    --leise: #a59f94;
    --linie: #34312c;
    --akzent: #6cc3a0;
    --rot: #ff8a80;
    --gruen: #7fd8a8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--linie); background: var(--flaeche);
}
.marke { font-weight: 650; color: var(--text); text-decoration: none; }

.inhalt { max-width: 760px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.05rem; margin: 0 0 8px; }

.karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}

button {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 0; border-radius: 10px; padding: 10px 16px; min-height: 44px;
  background: var(--akzent); color: #fff;
}
button.warnend { background: var(--rot); }
button.leise { background: transparent; color: var(--leise); padding: 6px 10px; min-height: 36px; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=password], input[type=text], input[type=url] {
  width: 100%; font: inherit; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--linie); border-radius: 10px; background: var(--grund); color: var(--text);
  margin-bottom: 12px;
}

.anmeldung { max-width: 380px; margin: 12vh auto 0; }
.anmeldung h1 { text-align: center; }
.anmeldung button { width: 100%; }
.fehler { color: var(--rot); margin: 0 0 12px; }

.status { margin: 0 0 12px; font-weight: 600; }
.status-rot { color: var(--rot); }
.status-gruen { color: var(--gruen); }

/* Navigation */
.hauptnav { display: flex; gap: 4px; margin-left: auto; margin-right: 4px; }
.hauptnav a { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 550; }
.hauptnav a:hover { background: var(--grund); }
@media (max-width: 560px) {
  .kopf { flex-wrap: wrap; row-gap: 8px; }
  .hauptnav { order: 3; width: 100%; margin: 0; flex-wrap: wrap; }
  .hauptnav a { flex: 1 1 auto; text-align: center; background: var(--grund); padding: 8px 6px; }
}
.pfad { color: var(--leise); font-size: .9rem; margin-top: 4px; }
.pfad a { color: var(--leise); }
.leise-text { color: var(--leise); font-size: .9rem; }
.titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.titelzeile h1 { margin-bottom: 12px; }
a.knopf {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 10px;
  background: var(--akzent); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap;
}
button.zweit { background: transparent; color: var(--akzent); border: 1px solid var(--linie); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; }
.knopfreihe form { margin: 0; }

/* Marken */
[class^="marke-"], .tag {
  display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--linie); color: var(--leise); background: var(--grund);
}
.marke-gruen { color: var(--gruen); border-color: currentColor; }
.marke-rot { color: var(--rot); border-color: currentColor; }
.marke-akzent { color: var(--akzent); border-color: currentColor; }
.tag { font-weight: 500; }
.zeile-marken { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.meldung { color: var(--gruen); font-weight: 600; margin: 0 0 12px; }

/* Bereichs-Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.kachel {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 104px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
}
.kachel:hover { border-color: var(--akzent); }
.kachel-titel { font-weight: 650; font-size: 1.05rem; }
.kachel-zahlen { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* Liste */
.filter { display: grid; gap: 10px; margin-bottom: 12px; }
.reiter { display: flex; gap: 4px; overflow-x: auto; }
.reiter a {
  padding: 8px 12px; border-radius: 999px; color: var(--leise); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
}
.reiter a.aktiv { color: var(--text); border-color: var(--linie); background: var(--flaeche); font-weight: 600; }
input[type=search] {
  width: 100%; font: inherit; padding: 10px 12px; min-height: 44px; border: 1px solid var(--linie);
  border-radius: 10px; background: var(--flaeche); color: var(--text);
}
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.zeile-eintrag {
  display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.zeile-eintrag:hover { border-color: var(--akzent); }
.mini { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; background: var(--grund); }
.mini-leer { display: block; border: 1px dashed var(--linie); }
.zeile-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.zeile-titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.zeile-text .zeile-marken { margin: 0; }
.leer { color: var(--leise); }
.dateien { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* Formulare */
.formular .feld { margin-bottom: 4px; }
.hilfe { color: var(--leise); font-size: .85rem; margin: -2px 0 6px; }
select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; min-height: 44px; border: 1px solid var(--linie);
  border-radius: 10px; background: var(--grund); color: var(--text); margin-bottom: 12px;
}
textarea { resize: vertical; }
.shots { display: grid; gap: 10px; margin-bottom: 12px; }
.shot { border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px 6px; margin: 0; min-width: 0; }
.shot legend { font-weight: 600; padding: 0 4px; }
.shot input { margin-bottom: 8px; }
.shot .zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shots > button.zweit { justify-self: start; }

/* Medien und Hochladen */
.medien { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.medium { margin: 0; border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; background: var(--grund); }
.medium video, .medium img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #000; }
.medium audio { display: block; width: 100%; padding: 8px; }
.medium img.streifen, .medium img.wellenform { max-height: none; background: var(--flaeche); border-top: 1px solid var(--linie); }
.medium figcaption { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
.medium figcaption form { margin: 0; }
.datei-name { font-weight: 600; overflow-wrap: anywhere; }
.analyse { padding: 8px 10px; border-top: 1px solid var(--linie); background: var(--flaeche); }
.analyse-kopf { margin: 0 0 8px; font-weight: 600; font-size: .9rem; }
.shotbilder { list-style: none; padding: 0; margin: 0 0 8px; display: flex; gap: 6px; overflow-x: auto; }
.shotbilder li { flex: none; width: 64px; display: flex; flex-direction: column; gap: 2px; font-size: .75rem; color: var(--leise); }
.shotbilder img { width: 64px; height: 114px; object-fit: cover; border-radius: 6px; background: #000; }
.transkript { margin: 0 0 8px; font-size: .9rem; }
.transkript summary { cursor: pointer; font-weight: 600; }
.transkript p { margin: 6px 0 0; }
.hochladen { display: grid; gap: 0; }
.hochladen input[type=file] { width: 100%; min-width: 0; padding: 10px 0; }
.zeile-wahl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zeile-wahl select { width: auto; flex: 1; margin: 0; }
.zeile-wahl input[type=file] { flex: 1 1 200px; }
.zeile-wahl input[type=url] { flex: 1 1 200px; margin: 0; width: auto; }

/* Sichtung */
.fassung h2 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sprachen { display: flex; gap: 6px; margin-bottom: 8px; }
.sprachen button { min-height: 36px; padding: 6px 12px; }
.sprachen button.aktiv { background: var(--akzent); color: #fff; }
.reel-video { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 10px; margin-bottom: 12px; }
.urteil { display: grid; gap: 10px; margin-bottom: 12px; }
.sterne { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stern input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.stern span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 10px;
  border: 1px solid var(--linie); font-weight: 700; font-size: 1.05rem; cursor: pointer; background: var(--grund);
}
.stern input:checked + span { background: #e8a317; border-color: #e8a317; color: #1d1b18; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--linie); cursor: pointer; background: var(--grund); font-size: .92rem;
}
.chip input:checked + span { background: var(--rot); border-color: var(--rot); color: #fff; }
.stern input:focus-visible + span, .chip input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.urteil textarea { margin: 0; }
.zeitkommentar { display: grid; gap: 8px; }
.zeitkommentar input[type=text] { flex: 1 1 200px; margin: 0; width: auto; }
.zeitliste { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.zeitliste button { font-variant-numeric: tabular-nums; min-height: 32px; padding: 4px 8px; }
video.mini { object-fit: cover; }

.zahlen { display: grid; gap: 8px; margin: 0; }
.zahlen div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--linie); padding-top: 8px; }
.zahlen div:first-child { border-top: 0; padding-top: 0; }
.zahlen dt { color: var(--leise); }
.zahlen dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* Regeln */
.regeln { list-style: none; padding: 0; margin: 0 0 24px; }
.regel { margin-bottom: 12px; }
.regel[data-stand="widerrufen"] .regel-text { color: var(--leise); text-decoration: line-through; }
.regel-kopf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.regel-text { margin: 10px 0 6px; font-size: 1.05rem; line-height: 1.45; }
.regel .leise-text { display: block; margin: 0 0 10px; font-size: .85rem; }
.belege { margin: 0 0 12px; }
.belege summary { cursor: pointer; color: var(--akzent); min-height: 32px; }
.belege ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; overflow-wrap: anywhere; }
.hauptnav .marke-akzent { margin-left: 4px; font-size: .7rem; padding: 0 6px; }
.tabelle-rahmen { overflow-x: auto; margin-bottom: 8px; }
.statistik { border-collapse: collapse; width: 100%; font-size: .9rem; }
.statistik th, .statistik td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.statistik th { color: var(--leise); font-weight: 600; }
.statistik td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.belege a { color: var(--akzent); }
.statistik td:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 7em; }
.statistik th, .statistik td { padding: 8px 6px; }

/* Posten */
.post-zeit { margin: 10px 0 8px; }
.post-inhalt { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.post-inhalt > div { flex: 1; min-width: 0; }
.post-inhalt .leise-text { margin: 0 0 6px; font-size: .85rem; }
.post-text { font-size: .9rem; min-height: 0; margin-bottom: 0; resize: vertical; }
.konto form { align-items: center; margin-top: 10px; }
.verbinden { margin-top: 10px; }
.verbinden summary { cursor: pointer; color: var(--akzent); min-height: 32px; font-weight: 600; }
.verbinden form { margin-top: 8px; }
.konto form.knopfreihe + form.knopfreihe { margin-top: 6px; }
