:root {
  --gruen: #2e7d46;
  --gruen-dunkel: #1f5730;
  --text: #1f2328;
  --muted: #5b6470;
  --linie: #e3e6ea;
  --bg: #ffffff;
  --bg-sanft: #f6f8f7;
  --breite: 1100px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--gruen-dunkel); }

/* Kopf + Navigation */
.kopf { border-bottom: 1px solid var(--linie); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.kopf-inner {
  max-width: var(--breite); margin: 0 auto; padding: 0 1.2rem;
  display: flex; align-items: center; gap: 2rem; min-height: 64px;
}
.marke { font-weight: 800; font-size: 1.2rem; color: var(--gruen-dunkel); text-decoration: none; white-space: nowrap; }
.hauptnav { margin-left: auto; }
.hauptnav > ul { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }
.hauptnav > ul > li { position: relative; }
.hauptnav a { display: block; padding: .55rem .8rem; text-decoration: none; color: var(--text); border-radius: 8px; font-weight: 600; font-size: .95rem; }
.hauptnav a:hover { background: var(--bg-sanft); color: var(--gruen-dunkel); }
.hauptnav .hat-kinder > a::after { content: " ▾"; color: var(--muted); }

.untermenue {
  list-style: none; margin: 0; padding: .4rem;
  position: absolute; top: 100%; left: 0; min-width: 210px;
  background: var(--bg); border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: .12s;
}
.hat-kinder:hover .untermenue { opacity: 1; visibility: visible; transform: translateY(0); }
.untermenue a { font-weight: 500; }

/* Inhalt */
.inhalt { max-width: var(--breite); margin: 0 auto; padding: 2rem 1.2rem 4rem; min-height: 60vh; }
.seite h1 { font-size: 2rem; line-height: 1.2; margin: .2rem 0 1.2rem; color: var(--gruen-dunkel); }
.wp-inhalt img { max-width: 100%; height: auto; border-radius: 8px; }
.wp-inhalt table { border-collapse: collapse; max-width: 100%; }
.wp-inhalt td, .wp-inhalt th { border: 1px solid var(--linie); padding: .4rem .6rem; }
.wp-inhalt h2 { margin-top: 2rem; color: var(--gruen-dunkel); }

.banner-geschuetzt {
  background: #fff7e6; border: 1px solid #ffd591; color: #8a5a00;
  padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1.5rem; font-size: .92rem;
}

/* Fuss */
.fuss { border-top: 1px solid var(--linie); background: var(--bg-sanft); margin-top: 3rem; }
.fuss-inner { max-width: var(--breite); margin: 0 auto; padding: 1.4rem 1.2rem;
  display: flex; justify-content: space-between; color: var(--muted); font-size: .88rem; }

/* Redaktion */
.redaktionsleiste {
  background: var(--gruen-dunkel); color: #fff; font-size: .88rem;
  padding: .4rem 1.2rem; display: flex; gap: 1rem; justify-content: center; align-items: center;
}
.redaktionsleiste a { color: #cfe9d6; }
.mitgliederleiste { background: #455a4d; }
.bearbeiten-knopf {
  display: inline-block; margin-bottom: 1rem; font-size: .85rem; font-weight: 600;
  color: var(--gruen-dunkel); background: var(--bg-sanft); border: 1px solid var(--linie);
  padding: .35rem .7rem; border-radius: 8px; text-decoration: none;
}
.bearbeiten-knopf:hover { background: #eef4ef; }

.feld {
  display: block; width: 100%; max-width: 640px; padding: .55rem .7rem; margin: .3rem 0 1.2rem;
  border: 1px solid var(--linie); border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.btn {
  display: inline-block; background: var(--gruen); color: #fff; border: none; cursor: pointer;
  padding: .55rem 1.1rem; border-radius: 8px; font-size: .95rem; font-weight: 600; text-decoration: none;
}
.btn:hover { background: var(--gruen-dunkel); }
.btn-still { background: var(--bg-sanft); color: var(--text); border: 1px solid var(--linie); }

.editor-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.werkzeugleiste { display: flex; flex-wrap: wrap; gap: .3rem; border: 1px solid var(--linie); border-bottom: none;
  border-radius: 8px 8px 0 0; padding: .4rem; background: var(--bg-sanft); }
.werkzeugleiste button { background: #fff; border: 1px solid var(--linie); border-radius: 6px;
  padding: .3rem .6rem; cursor: pointer; font-size: .85rem; }
.werkzeugleiste button:hover { background: #eef4ef; }
.editor {
  border: 1px solid var(--linie); border-radius: 0 0 8px 8px; min-height: 320px;
  padding: 1rem 1.2rem; background: #fff; outline: none;
}
.editor:focus { border-color: var(--gruen); }
.editor-aktionen { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.editor-status { color: var(--muted); font-size: .85rem; }

/* Seiten-/Menueverwaltung */
.sb-neu { display: flex; gap: .5rem; margin: 1rem 0 1.5rem; }
.sb-neu input { flex: 1; max-width: 380px; padding: .5rem .7rem; border: 1px solid var(--linie); border-radius: 8px; font-size: .95rem; }

.seitenbaum { list-style: none; margin: 0; padding-left: 0; }
.seitenbaum .seitenbaum { padding-left: 1.6rem; }
.seitenbaum li { margin: .2rem 0; }
.sb-zeile {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem;
  border: 1px solid var(--linie); border-radius: 8px; background: #fff;
}
.sb-zeile:hover { border-color: var(--gruen); }
.sb-griff { cursor: grab; color: var(--muted); user-select: none; }
.sb-titel { font-weight: 600; }
.sb-slug { color: var(--muted); font-size: .8rem; }
.sb-marke { font-size: .72rem; padding: .1rem .45rem; border-radius: 20px; border: 1px solid var(--linie); color: var(--muted); }
.sb-oeffentlich { background: #eaf5ee; color: #256b3c; border-color: #bfe0cb; }
.sb-geschuetzt { background: #fff7e6; color: #8a5a00; border-color: #ffd591; }
.sb-entwurf { background: #f2f3f5; }
.sb-aus { background: #fdecea; color: #a8322a; border-color: #f5c2bd; }
.sb-aktionen { margin-left: auto; display: flex; gap: .8rem; font-size: .82rem; white-space: nowrap; }
.sb-link { background: none; border: none; color: var(--gruen-dunkel); cursor: pointer; font-size: .82rem; padding: 0; }
.sb-link:hover { text-decoration: underline; }

li.zieht > .sb-zeile { opacity: .45; }
li.ueber > .sb-zeile { border-top: 3px solid var(--gruen); }
li.ueber-kind > .sb-zeile { background: #eaf5ee; border-color: var(--gruen); box-shadow: inset 3px 0 0 var(--gruen); }

.sb-eigenschaften { display: none; gap: .8rem; flex-wrap: wrap; align-items: flex-end;
  padding: .8rem; margin: .3rem 0 .3rem 1.6rem; background: var(--bg-sanft);
  border: 1px solid var(--linie); border-radius: 8px; }
.sb-eigenschaften.offen { display: flex; }
.sb-eigenschaften label { font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: .2rem; }
.sb-eigenschaften input[type=text], .sb-eigenschaften select {
  padding: .4rem .5rem; border: 1px solid var(--linie); border-radius: 6px; font-size: .9rem; }
.sb-check { flex-direction: row !important; align-items: center; gap: .4rem !important; }
.sb-eig-aktionen { display: flex; gap: .5rem; margin-left: auto; }
.btn-gefahr { background: #fff; color: #a8322a; border: 1px solid #f5c2bd; }
.btn-gefahr:hover { background: #fdecea; }

/* Kacheln — oeffentliche Ansicht */
.kachelgitter {
  display: grid; gap: 1.4rem; margin: 0 0 2.5rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.kachel {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; background: #fff;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.kachel:hover { border-color: var(--gruen); box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.kachel-bild { display: block; background: var(--bg-sanft); }
.kachel-bild img { display: block; width: 100%; height: 190px; object-fit: contain; padding: .8rem; }
.kachel-titel {
  padding: .9rem 1rem; font-weight: 700; font-size: 1.05rem; text-align: center;
  color: var(--gruen-dunkel); border-top: 1px solid var(--linie);
}

.bearbeiten-leiste { display: flex; gap: .5rem; justify-content: flex-end; margin-bottom: .5rem; }
.bearbeiten-leiste .bearbeiten-knopf { margin: 0; }

/* Kachel-Verwaltung */
.kv-gitter { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 1rem 0 2rem; }
.kv-leer { color: var(--muted); }
.kv-kachel { border: 1px solid var(--linie); border-radius: 10px; background: #fff; overflow: hidden; }
.kv-kachel.zieht { opacity: .45; }
.kv-kachel.ueber { border-color: var(--gruen); box-shadow: inset 3px 0 0 var(--gruen); }
.kv-vorschau { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .8rem; position: relative; }
.kv-vorschau img { max-width: 100%; height: 130px; object-fit: contain; }
.kv-kein-bild { height: 130px; display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.kv-griff { position: absolute; top: .4rem; left: .5rem; cursor: grab; color: var(--muted); user-select: none; }
.kv-ziel-anzeige { font-size: .8rem; color: var(--muted); text-align: center; }
.kv-warnung { color: #a8322a; }
.kv-form, .kv-neu { display: flex; flex-direction: column; gap: .5rem; padding: .8rem; background: var(--bg-sanft); border-top: 1px solid var(--linie); }
.kv-neu { border: 1px solid var(--linie); border-radius: 10px; max-width: 520px; }
.kv-neu h2 { margin: 0; font-size: 1.05rem; color: var(--gruen-dunkel); }
.kv-form label, .kv-neu label { font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: .2rem; }
.kv-form input, .kv-form select, .kv-neu input, .kv-neu select {
  padding: .4rem .5rem; border: 1px solid var(--linie); border-radius: 6px; font-size: .9rem;
  font-family: inherit; max-width: 100%;
}
.kv-form-aktionen { display: flex; gap: .5rem; }

/* Links im Editor sichtbar machen — sonst sieht man einem Bild nicht an,
   dass es verlinkt ist, und schon gar nicht, wohin. */
.editor a[href] { box-shadow: inset 0 -2px 0 var(--gruen); }
.editor a[href] img { outline: 2px solid var(--gruen); outline-offset: 2px; }
.linkliste { margin-top: 1rem; border: 1px solid var(--linie); border-radius: 8px; background: var(--bg-sanft); padding: .7rem .9rem; }
.linkliste h3 { margin: 0 0 .4rem; font-size: .9rem; color: var(--gruen-dunkel); }
.linkliste ul { margin: 0; padding-left: 1.1rem; font-size: .85rem; }
.linkliste li { margin: .15rem 0; }
.linkliste code { color: var(--muted); }
.linkliste .ll-extern { color: #a8322a; }
.linkliste .ll-leer { color: var(--muted); font-size: .85rem; }

/* Hinweis-Meldungen (flash) */
.hinweise { max-width: var(--breite); margin: 1rem auto 0; padding: 0 1.2rem; }
.hinweis {
  background: #eaf5ee; border: 1px solid #bfe0cb; color: #256b3c;
  padding: .6rem .9rem; border-radius: 10px; font-size: .9rem; margin-bottom: .5rem;
}

/* Redaktionsleiste — Status-Abzeichen */
.rl-abzeichen { font-size: .74rem; padding: .12rem .55rem; border-radius: 20px; font-weight: 700; }
.rl-frei { background: #eaf5ee; color: #1f5730; }
.rl-vorschlag { background: #fff3cd; color: #7a5a00; }

/* Hinweis unter der Sichtbarkeits-Auswahl */
.sb-hinweis { font-size: .72rem; color: #8a5a00; margin-top: .2rem; }

/* Redaktionsrechte-Liste */
.rd-leer { color: var(--muted); }
.rd-liste { list-style: none; margin: 1.2rem 0 0; padding: 0; max-width: 820px; }
.rd-zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding: .7rem .9rem; margin: .4rem 0;
  border: 1px solid var(--linie); border-radius: 10px; background: #fff;
}
.rd-wer { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.rd-name { font-weight: 700; }
.rd-sub { color: var(--muted); font-size: .74rem; }
.rd-gesehen { color: var(--muted); font-size: .76rem; }
.rd-form { display: flex; align-items: center; gap: .6rem; }
.rd-stand { font-size: .78rem; font-weight: 700; padding: .18rem .6rem; border-radius: 20px; }
.rd-stand.rd-an { background: #eaf5ee; color: #1f5730; border: 1px solid #bfe0cb; }
.rd-stand.rd-aus { background: #f2f3f5; color: var(--muted); border: 1px solid var(--linie); }
.rd-schalter { cursor: pointer; border-radius: 8px; padding: .4rem .8rem; font-size: .82rem; font-weight: 600; }
.rd-an-btn { background: var(--gruen); color: #fff; border: none; }
.rd-an-btn:hover { background: var(--gruen-dunkel); }
.rd-aus-btn { background: #fff; color: #a8322a; border: 1px solid #f5c2bd; }
.rd-aus-btn:hover { background: #fdecea; }

/* Footer-Spendenlink — dezent, auf allen Seiten */
.fuss-spenden { color: var(--gruen-dunkel); text-decoration: none; font-weight: 600; font-size: .88rem; }
.fuss-spenden:hover { text-decoration: underline; }

/* Hardwarehilfe (oeffentlich) */
.hw-block { margin: 1.6rem 0; }
.hw-block h2 { color: var(--gruen-dunkel); margin-bottom: .4rem; }
.hw-tabelle { border-collapse: collapse; width: 100%; max-width: 560px; }
.hw-tabelle th, .hw-tabelle td { border-bottom: 1px solid var(--linie); padding: .5rem .6rem; text-align: left; }
.hw-tabelle th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.hw-preis { white-space: nowrap; font-weight: 700; text-align: right; }
.hw-frei { color: #256b3c; }
.hw-hinweis { color: var(--muted); font-weight: 400; font-size: .9rem; }
.hw-immer { margin-top: 1rem; background: var(--bg-sanft); border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .8rem; }
.hw-fussnote { color: var(--muted); font-size: .82rem; margin-top: .8rem; }
.hw-leer { color: var(--muted); }

/* Hardware-Gebühren-Editor */
.hw-edit { border-collapse: collapse; width: 100%; }
.hw-edit th { font-size: .74rem; color: var(--muted); text-align: left; padding: .3rem .4rem; text-transform: uppercase; }
.hw-edit td { padding: .3rem .4rem; border-top: 1px solid var(--linie); vertical-align: middle; }
.hw-edit input[type=text], .hw-edit input[type=number] { width: 100%; padding: .35rem .5rem; border: 1px solid var(--linie); border-radius: 6px; font-size: .9rem; font-family: inherit; }
.hw-akt { white-space: nowrap; display: flex; gap: .4rem; }
.hw-akt .btn { padding: .35rem .7rem; font-size: .82rem; }
.hw-neu { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; max-width: 820px; }
.hw-neu input[type=text] { flex: 1; min-width: 160px; padding: .45rem .6rem; border: 1px solid var(--linie); border-radius: 6px; font-size: .9rem; }

/* Toggle „immer dabei" — gefüllt statt nackter Checkbox */
.hw-schalter { position: relative; display: inline-block; cursor: pointer; }
.hw-schalter input { position: absolute; opacity: 0; width: 0; height: 0; }
.hw-schalter span { display: inline-block; width: 40px; height: 22px; background: #cfd4da; border-radius: 22px; transition: background .12s; }
.hw-schalter span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .12s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.hw-schalter input:checked + span { background: var(--gruen); }
.hw-schalter input:checked + span::after { transform: translateX(18px); }

@media (max-width: 720px) {
  .kopf-inner { flex-wrap: wrap; gap: .6rem; min-height: 0; padding: .6rem 1rem; }
  .hauptnav { margin-left: 0; width: 100%; overflow-x: auto; }
  .hauptnav > ul { flex-wrap: nowrap; }
  .untermenue { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 0 1rem; }
}
