:root, :root[data-theme="light"] {
  color-scheme: light;
  --seite: #fbfbfd;
  --karte: #ffffff;
  --karte-rand: #dcdfe4;
  --flaeche: #f4f5f7;
  --flaeche-stark: #e7e9ee;
  --text: #172b4d;
  --leise: #5b6b86;
  --linie: #dfe1e6;
  --akzent: #0c66e4;
  --akzent-hover: #0055cc;
  --akzent-text: #ffffff;
  --link: #0055cc;
  --eingabe: #ffffff;
  --eingabe-rand: #b3bac6;
  --fokus: #1d7afc;
  --knopf-hover: #eef0f4;
  --rot: #ae2e24;   --rot-hell: #ffeceb;   --rot-linie: #e2483d;
  --gruen: #1f845a; --gruen-hell: #dcfff1; --gruen-text: #164b35;
  --gelb: #7f5f01;  --gelb-hell: #fff7d6;  --gelb-linie: #f5b800;
  --blau-hell: #e9f2ff; --blau-text: #09326c;
  --grau-hell: #f1f2f4; --grau-text: #44546f;
  --schatten: 0 1px 1px rgba(9, 30, 66, .18), 0 0 1px rgba(9, 30, 66, .24);
  --schatten-hoch: 0 6px 16px rgba(9, 30, 66, .16), 0 0 1px rgba(9, 30, 66, .3);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --seite: #15191d;
  --karte: #22272b;
  --karte-rand: #3a444e;
  --flaeche: #1d2125;
  --flaeche-stark: #2c333a;
  --text: #dee4ea;
  --leise: #9fadbc;
  --linie: #38414a;
  --akzent: #579dff;
  --akzent-hover: #85b8ff;
  --akzent-text: #101214;
  --link: #85b8ff;
  --eingabe: #1d2125;
  --eingabe-rand: #596773;
  --fokus: #85b8ff;
  --knopf-hover: #2c333a;
  --rot: #fd9891;   --rot-hell: #42221f;   --rot-linie: #f15b50;
  --gruen: #7ee2b8; --gruen-hell: #1c3329; --gruen-text: #baf3db;
  --gelb: #f8e6a0;  --gelb-hell: #332e1b;  --gelb-linie: #cf9f02;
  --blau-hell: #1c2b41; --blau-text: #cce0ff;
  --grau-hell: #2c333a; --grau-text: #b6c2cf;
  --schatten: 0 1px 1px rgba(0, 0, 0, .5), 0 0 1px rgba(0, 0, 0, .5);
  --schatten-hoch: 0 6px 16px rgba(0, 0, 0, .5), 0 0 1px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--seite);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; margin-top: 1.2em; }
p { margin: 0 0 .8em; }
.leise { color: var(--leise); }
.klein { font-size: .9rem; }
.versteckt { display: none !important; }

/* Kopfzeile */
.kopf {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px max(16px, calc((100vw - 1100px) / 2));
  background: var(--karte); border-bottom: 1px solid var(--linie);
}
.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); margin-right: auto; }
.marke img { height: 34px; width: auto; display: block; }
.marke .logo-dunkel { display: none; }
:root[data-theme="dark"] .marke .logo-hell { display: none; }
:root[data-theme="dark"] .marke .logo-dunkel { display: block; }
.marke-text { display: flex; flex-direction: column; line-height: 1.15; }
.marke-text strong { font-size: 1.05rem; }
.marke-text span { font-size: .85rem; color: var(--leise); }
.kopf-rechts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Knöpfe */
button, .knopf {
  font: inherit; font-size: .95rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; min-height: 42px;
  border: 1px solid var(--eingabe-rand); background: var(--karte); color: var(--text); text-decoration: none;
}
button:hover, .knopf:hover { background: var(--knopf-hover); }
button.haupt, .knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); font-weight: 600; }
button.haupt:hover, .knopf.haupt:hover { background: var(--akzent-hover); }
button.gross, .knopf.gross { font-size: 1.05rem; padding: 12px 22px; min-height: 50px; }
button.gefahr { color: var(--rot); border-color: var(--rot-linie); }
button.schlicht { border-color: transparent; background: transparent; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }

main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 80px; }
.hinweis-kopf { margin: 0 0 20px; color: var(--leise); }

/* Fortschritt und Filter */
.leiste { position: sticky; top: 59px; z-index: 5; background: var(--seite); padding: 8px 0 12px; }
.balken { height: 8px; border-radius: 4px; background: var(--flaeche-stark); overflow: hidden; margin: 6px 0 12px; }
.balken div { height: 100%; background: var(--gruen); transition: width .25s; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter button { min-height: 38px; padding: 6px 12px; }
.filter button[aria-pressed="true"] { background: var(--blau-hell); border-color: var(--akzent); color: var(--blau-text); font-weight: 600; }

/* Beitrag */
.beitrag { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; background: var(--karte); border: 1px solid var(--karte-rand); border-left: 5px solid var(--karte-rand); border-radius: 12px; padding: 20px; margin-top: 16px; box-shadow: var(--schatten); scroll-margin-top: 150px; }
.beitrag[data-status="passt"] { border-left-color: var(--gruen); }
.beitrag[data-status="aendern"] { border-left-color: var(--gelb-linie); }
.beitrag[data-status="nicht_posten"] { border-left-color: var(--rot-linie); }
.beitrag[data-status="nicht_posten"] .medien { opacity: .55; }
.medien { min-width: 0; }
.medien video { width: 100%; aspect-ratio: 9 / 16; border-radius: 8px; background: #000; display: block; }
.galerie { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 8px; background: var(--flaeche); }
.galerie img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: start; display: block; }
.blaettern { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.blaettern button { min-height: 38px; padding: 4px 14px; }
.kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.kopfzeile h2 { margin: 0; font-size: 1.15rem; }
.meta { color: var(--leise); font-size: .95rem; margin: 0 0 12px; }
.marke-status { font-size: .85rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--grau-hell); color: var(--grau-text); }
.marke-status.passt { background: var(--gruen-hell); color: var(--gruen-text); }
.marke-status.aendern { background: var(--gelb-hell); color: var(--gelb); }
.text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--flaeche); border-radius: 8px; padding: 14px; margin: 0 0 8px; }
.aufruf { font-size: .92rem; color: var(--leise); margin: 0 0 12px; overflow-wrap: anywhere; }
.warnung { background: var(--gelb-hell); border-left: 4px solid var(--gelb-linie); padding: 10px 12px; border-radius: 6px; margin: 0 0 12px; font-size: .95rem; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
button.gut { background: var(--gruen); border-color: var(--gruen); color: var(--karte); font-weight: 600; }
button.gut:hover { background: var(--gruen); filter: brightness(1.1); }
.marke-status.nicht_posten { background: var(--rot-hell); color: var(--rot); }
.aktionen.abstand { margin-top: 12px; }
button.stopp { background: var(--rot-hell); border-color: var(--rot-linie); color: var(--rot); font-weight: 600; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
textarea { width: 100%; min-height: 90px; font: inherit; padding: 10px; border-radius: 8px; border: 1px solid var(--eingabe-rand); background: var(--eingabe); color: var(--text); resize: vertical; }
textarea.gross { min-height: 200px; }
.ergebnis { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linie); }
.ergebnis p { white-space: pre-wrap; overflow-wrap: anywhere; }
.fehler { color: var(--rot); margin-top: 8px; }
.leer { padding: 40px 0; text-align: center; color: var(--leise); }
.mitte { max-width: 520px; margin: 15vh auto; padding: 0 16px; text-align: center; }

@media (max-width: 760px) {
  .beitrag { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 16px; }
  .medien { max-width: 340px; margin: 0 auto; width: 100%; }
  .leiste { top: 0; position: static; }
  .kopf { position: static; }
}
