:root {
  --grund: #0d1017;
  --flaeche: #151a25;
  --rand: #252b3d;
  --text: #e6e8ee;
  --leise: #9aa2b5;
  --orange: #f2b13f;
  --tuerkis: #4bc6d9;
  --fehler: #ff7a6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 17px/1.6 system-ui, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--tuerkis); }
a:hover { color: var(--orange); }

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

/* Kopfzeile */
.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rand);
  background: var(--flaeche);
}
.marke {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
}
.menue { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.menue a { color: var(--leise); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.menue a:hover { color: var(--text); }
.menue a[aria-current="page"] { color: var(--text); border-bottom-color: var(--orange); }
.abmelden { display: flex; align-items: center; gap: 10px; color: var(--leise); font-size: 15px; margin: 0; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--rand);
  background: transparent;
  color: var(--text);
  padding: 6px 14px;
}
button:hover { border-color: var(--tuerkis); }

/* Startseite */
.buehne {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}
.buehne img { flex: none; width: 168px; height: 168px; }
.einleitung h1 { margin: 0 0 8px; font-size: 40px; line-height: 1.15; color: var(--orange); }
.einleitung p { margin: 0 0 10px; color: var(--leise); font-size: 19px; }

.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.kachel {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--rand);
  border-radius: 14px;
  background: var(--flaeche);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.kachel:hover { border-color: var(--orange); transform: translateY(-2px); color: var(--text); }
.kachel h2 { margin: 0 0 8px; font-size: 20px; }
.kachel p { margin: 0 0 16px; color: var(--leise); flex: 1; }
.weiter { color: var(--tuerkis); font-weight: 600; }

/* Textseiten */
.text { max-width: 720px; }
.text h1 { color: var(--orange); font-size: 34px; line-height: 1.2; margin-top: 0; }
.text h2 { margin-top: 32px; }
.text img { max-width: 100%; height: auto; border-radius: 10px; }
.text code { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 4px; padding: 1px 5px; }
.text blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--tuerkis); color: var(--leise); }
hr { border: 0; border-top: 1px solid var(--rand); margin: 32px 0; }
.zurueck { margin-top: 40px; }

/* Anmeldung */
.anmeldung {
  max-width: 380px;
  margin: 6vh auto 0;
  padding: 32px 28px;
  text-align: center;
  border: 1px solid var(--rand);
  border-radius: 16px;
  background: var(--flaeche);
}
.anmeldung h1 { margin: 12px 0 4px; color: var(--orange); }
.hinweis { margin: 0 0 20px; color: var(--leise); }
.fehler { color: var(--fehler); margin: 0 0 16px; }
.anmeldung form { display: grid; gap: 14px; text-align: left; }
.anmeldung label { display: grid; gap: 4px; font-size: 15px; color: var(--leise); }
.anmeldung input {
  font: inherit;
  color: var(--text);
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 10px 12px;
}
.anmeldung input:focus { outline: 2px solid var(--tuerkis); outline-offset: 1px; border-color: transparent; }
.anmeldung button[type="submit"] {
  margin-top: 6px;
  padding: 11px;
  border: 0;
  background: var(--orange);
  color: #1a1206;
  font-weight: 700;
}
.anmeldung button[type="submit"]:hover { background: #f6c260; }

@media (max-width: 640px) {
  .buehne { flex-direction: column; text-align: center; gap: 16px; }
  .buehne img { width: 120px; height: 120px; }
  .einleitung h1 { font-size: 30px; }
  .abmelden span { display: none; }
}

/* Verwaltung */
main.breit { max-width: 1180px; }
main.breit h1 { color: var(--orange); margin: 16px 0; font-size: 28px; }
main.breit h2 { margin: 28px 0 10px; font-size: 20px; }
.abmelden a { color: var(--orange); text-decoration: none; font-weight: 600; }
.reiter, .filter { display: flex; flex-wrap: wrap; gap: 6px; }
.reiter a, .filter a {
  padding: 6px 14px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  color: var(--leise);
  text-decoration: none;
}
.reiter a:hover, .filter a:hover { color: var(--text); border-color: var(--tuerkis); }
.reiter a[aria-current="page"], .filter a[aria-current="page"] { color: #1a1206; background: var(--orange); border-color: var(--orange); font-weight: 600; }
.trenner { width: 16px; }
.leise { color: var(--leise); font-size: 15px; }
.kasten { margin: 16px 0; padding: 16px 20px; border: 1px solid var(--rand); border-radius: 12px; background: var(--flaeche); }
.kasten h2 { margin-top: 0; }
.kasten summary { cursor: pointer; color: var(--leise); }
.kasten pre { margin: 12px 0 0; white-space: pre-wrap; font-size: 14px; }
.meldung { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--rand); margin: 12px 0; }
.meldung.ok { border-color: var(--tuerkis); }
.meldung.warnung { border-color: var(--fehler); color: var(--text); background: rgba(255, 122, 107, .1); }
.meldung.vorschau { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-color: var(--orange); background: rgba(242, 177, 63, .1); margin: 0 0 24px; }
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.zahl { padding: 14px 18px; border: 1px solid var(--rand); border-radius: 12px; background: var(--flaeche); }
.zahl strong { display: block; font-size: 30px; line-height: 1.2; color: var(--orange); }
.zahl span { color: var(--leise); font-size: 14px; }
.tabelle { overflow-x: auto; border: 1px solid var(--rand); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; color: var(--leise); font-weight: 600; background: var(--flaeche); white-space: nowrap; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--rand); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.marke-art { display: inline-block; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--rand); font-size: 14px; white-space: nowrap; }
.marke-art.angriff { border-color: var(--fehler); color: var(--fehler); }
.marke-art.hinweis { border-color: var(--orange); color: var(--orange); }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.aktionen form { margin: 0; }
.aktionen button, td button { padding: 3px 10px; font-size: 14px; white-space: nowrap; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.zeile label, .reihe { display: inline-flex; align-items: center; gap: 8px; color: var(--leise); }
main.breit input:not([type="checkbox"]):not([type="file"]), .editor textarea {
  font: inherit;
  color: var(--text);
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 7px 10px;
}
main.breit input:focus, .editor textarea:focus { outline: 2px solid var(--tuerkis); outline-offset: 1px; }
.editor { display: grid; gap: 12px; margin-bottom: 16px; }
.editor textarea { width: 100%; font-family: Consolas, Menlo, monospace; font-size: 15px; line-height: 1.5; resize: vertical; }
.reihe input { width: 90px; }
.knopf {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.knopf:hover { border-color: var(--tuerkis); color: var(--text); }
button.haupt { background: var(--orange); border-color: var(--orange); color: #1a1206; font-weight: 700; }
button.haupt:hover { background: #f6c260; border-color: #f6c260; }
button.gefahr { color: var(--fehler); border-color: var(--fehler); }
img.klein { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.feld { display: inline-block; padding: 4px 10px; border: 1px solid var(--rand); border-radius: 6px; background: var(--flaeche); font: 600 18px/1.4 Consolas, Menlo, monospace; word-break: break-all; }
.qr { margin: 12px 0; }
.qr svg { max-width: 100%; height: auto; display: block; }

@media print {
  body { background: #fff; color: #000; }
  .kopf, .zurueck { display: none; }
  .feld { background: #fff; color: #000; border-color: #000; }
  .meldung.warnung { background: #fff; border-color: #000; }
  .text h1, .text h2 { color: #000; }
}

.abmelden { margin-left: auto; }
main.breit .kasten h2 { margin-top: 0; }

.zeile label { flex-wrap: wrap; max-width: 100%; }
.zeile label input { min-width: 0; max-width: 100%; }
