body {
  margin: 0;
  padding-bottom: 70px;
  background: #fff;
  color: #6141ac;
  font: 15px Helvetica, Arial, "Liberation Sans", sans-serif;
}

a { color: #6141ac; }
h1 { font-size: 19px; text-align: center; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 24px 0 8px; }

main { max-width: 640px; margin: 48px auto; padding: 0 16px; }

.navi { display: flex; background: #6141ac; border-bottom: 1px solid #4b3187; }
.navi a { color: #fff; font-weight: bold; text-decoration: none; padding: 8px 16px; border-right: 1px solid #8a72c6; }
.navi a.aktiv { background: #fff; color: #6141ac; }
.unternavi { background: #f0ecf8; border-bottom: 1px solid #6141ac; padding: 6px 16px; }
.unternavi a { margin-right: 18px; }
.unternavi a.aktiv { font-weight: bold; text-decoration: none; }

/* Abstand unter jedem Formular, damit nichts direkt an einem Knopf klebt */
form { margin: 0 0 36px; }
form.schmal { max-width: 300px; margin: 0 auto 36px; }
.kasten form, .ueberlagerung form { margin-bottom: 0; }
main > .knopf, main > p > .knopf { margin-top: 24px; }
label { display: block; margin: 12px 0 4px; font-size: 16px; }
label.option { display: inline; margin: 0 16px 0 0; }
.hinweis { font-size: 12px; color: #6f6f6f; margin: 2px 0 4px; }
.zaehler { font-size: 12px; color: #6f6f6f; text-align: right; margin-top: 2px; font-variant-numeric: tabular-nums; }
.zaehler.ueber { color: #cc0000; font-weight: bold; }

input, select, textarea, pre { font-family: monospace; font-size: 15px; color: #6141ac; }
input[type=text], input[type=password], input[type=email], input[type=datetime-local], select, textarea {
  width: 100%; box-sizing: border-box; padding: 5px; border: 1px solid #6141ac; border-radius: 0; background: #fff;
}
:focus { outline: 2px solid #6141ac; outline-offset: 1px; }
input::placeholder { color: #bfb1de; font-weight: bold; }

.ziffern { display: inline-block; white-space: nowrap; }
.ziffern input { width: 32px; height: 32px; padding: 0; margin-right: 6px; text-align: center; box-sizing: border-box; border: 1px solid #6141ac; }
.ziffern.gross input { width: 40px; height: 64px; font-size: 26px; }
.luecke { display: inline-block; width: 12px; }

fieldset { border: 1px solid #6141ac; margin: 0 0 16px; padding: 4px 14px 14px; }
legend { font-weight: bold; padding: 0 4px; }

button, .knopf {
  display: block; width: 100%; box-sizing: border-box; margin-top: 14px; padding: 12px;
  background: #6141ac; color: #fff; border: 1px solid #6141ac; border-radius: 0;
  font: bold 17px Helvetica, Arial, "Liberation Sans", sans-serif; text-align: center; text-decoration: none; cursor: pointer;
}
.knopf-zweit { background: #fff; color: #6141ac; }
.janein { display: flex; gap: 8px; padding: 0 4px 4px; }

.kasten { border: 1px solid #6141ac; padding: 4px; background: #fff; margin: 0 0 24px; }
.kasten-kopf { background: #6141ac; color: #fff; font-weight: bold; font-size: 24px; text-align: center; padding: 18px 8px; }
.kasten-gut .kasten-kopf { background: #457a00; }
.kasten-schlecht .kasten-kopf { background: #cc0000; }
.kasten pre { background: #f8f5ff; margin: 0; padding: 14px 16px; min-height: 90px; max-height: 60vh; overflow: auto; white-space: pre; }
.kasten .knopf { margin-top: 4px; padding: 10px; font-size: 16px; }
.frage { font-weight: bold; margin: 12px 8px 0; }

.altersanzeige { margin-top: 4px; padding: 22px 8px; text-align: center; font-weight: bold; font-size: 44px; letter-spacing: 1px; color: #fff; background: #cc0000; }
.altersanzeige-achtung { background: #ffb000; color: #000; }
.altersanzeige-ok { background: #6141ac; }
/* Gastnummer zum Abschreiben auf das Billett */
.altersanzeige-nummer { background: #6141ac; padding: 28px 8px; font: bold 96px/1 monospace; letter-spacing: 14px; }

.zahl { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: #cc0000; color: #fff; font-size: 13px; text-align: center; }
.kasten-grau .kasten-kopf { background: #6f6f6f; }
.billettverkauf { text-align: center; }
.billettverkauf button[hidden] { display: none; }
.billettverkauf h2 { margin-top: 28px; }

.gastformular { text-align: left; padding: 4px 16px 16px; margin: 0; }
.gastformular .janein { padding: 0; margin-top: 18px; }
.gastformular .janein .knopf { margin-top: 14px; }
.gastfenster .kasten { max-height: 94vh; overflow-y: auto; }
.kategorien { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kategorien button, .kategorien .knopf { margin: 0; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 16px; }
.kategorien .knopf-gast { background: #fff; color: #6141ac; }
.kategorien .preis { font: bold 30px monospace; }
.einlasszaehler { position: fixed; top: 0; right: 0; z-index: 20; padding: 6px 14px; background: #fff; border: 1px solid #6141ac; border-top: 0; border-right: 0; font-size: 15px; text-align: right; }
.einlasszaehler b { font: bold 22px monospace; margin-left: 8px; }
details.kasten > summary { cursor: pointer; list-style: none; }
details.kasten > summary::-webkit-details-marker { display: none; }
details.kasten > summary::after { content: " ▸"; }
details.kasten[open] > summary::after { content: " ▾"; }
.liste-rahmen { background: #f8f5ff; overflow-x: auto; }
table.liste { width: 100%; border-collapse: collapse; font: 15px monospace; color: #6141ac; }
table.liste th, table.liste td { text-align: left; padding: 7px 10px; white-space: nowrap; }
table.liste td:last-child { white-space: normal; }
table.liste th { font-weight: normal; border-bottom: 1px solid #6141ac; }
table.liste tbody tr + tr td { border-top: 1px dotted #cfc4ea; }
table.liste tr.ungelesen td { font-weight: bold; }
table.liste tbody tr:hover { background: #ece6fa; }
.knopfzeile button { background: #fff; color: #6141ac; }
.exporte { display: flex; gap: 10px; margin-bottom: 36px; }
.exporte form { flex: 1; margin: 0; }
.als-link { padding: 4px 10px 10px; text-align: right; }
.als-link button { display: inline; width: auto; margin: 0; padding: 0; background: none; border: 0; color: #cc0000; font: 14px Helvetica, Arial, "Liberation Sans", sans-serif; text-decoration: underline; }
.einleitung { margin-bottom: 24px; line-height: 1.45; }
.einleitung p { margin: 0 0 12px; }
.kopflogo { display: block; width: fit-content; margin: 0 auto 20px; }
.kopflogo .logo svg { display: block; height: 72px; width: auto; }
.kopflogo .logo svg * { fill: #6141ac !important; }
.kopflogo .logo svg [stroke]:not([stroke="none"]) { stroke: #6141ac !important; }
.referenzformular { width: fit-content; max-width: 100%; margin: 0 auto 32px; }
.ziffern .fest {
  display: inline-block; box-sizing: border-box; width: 40px; height: 64px; margin-right: 6px; vertical-align: middle;
  border: 1px solid #6141ac; background: #f0ecf8; font: 26px/62px monospace; text-align: center; user-select: none;
}
.ziffern.gross input { vertical-align: middle; }
.ziffern input.buchstabe { text-transform: uppercase; }
.mitte { text-align: center; }

/* Slogan nur bei viel Platz, sonst stehen nur die Links rechts */
@media (max-width: 1100px) {
  footer .slogan { display: none; }
  footer .konto { margin-left: auto; }
}
@media (max-width: 720px) {
  footer { padding: 10px 16px; font-size: 16px; }
}
/* Grosse Ziffernfelder (Referenz, Abfrage) passen so auch auf 360 px breite Telefone */
@media (max-width: 520px) {
  .ziffern.gross input, .ziffern .fest { width: 28px; height: 48px; margin-right: 3px; font-size: 20px; }
  .ziffern .fest { line-height: 46px; }
  .ziffern.gross .luecke { width: 6px; }
}
.unsichtbar { display: none; }

.mitteilung { border-width: 3px; padding: 14px 16px; background: #f8f5ff; }
.mitteilung-titel { font-weight: bold; font-size: 18px; margin-bottom: 6px; }
.mitteilung-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.ueberlagerung { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(97, 65, 172, 0.12); display: flex; z-index: 10; align-items: center; justify-content: center; }
.ueberlagerung .kasten { width: 680px; max-width: 94vw; margin: 0; }

.unten { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; }
body:has(.jugendschutz-banner) { padding-bottom: 110px; }
.jugendschutz-banner {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 32px;
  padding: 8px 38px; background: #ffb000; color: #000; font-size: 16px; border-top: 1px solid #b37b00;
}

footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 38px; background: #d9d9d9; font-size: 18px;
}
footer .marke { font-weight: bold; }
footer .konto a:not(:last-of-type) { margin-right: 10px; }
footer .marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
footer .logo svg { display: block; height: 1em; width: auto; }
footer .logo svg * { fill: #6141ac !important; }
footer .logo svg [stroke]:not([stroke="none"]) { stroke: #6141ac !important; }

/* Überwachungsmodus: grosse Schrift für einen zweiten Bildschirm */
body.ueberwachung { padding-bottom: 0; }
.ueberwachung-kopf {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 18px 32px; background: #6141ac; color: #fff;
}
.ueberwachung-kopf h1 { margin: 0; font-size: 64px; text-align: left; line-height: 1.1; }
.ueberwachung-kopf { flex-wrap: wrap; row-gap: 0; }
/* Root-Warnung: volle Breite direkt unter dem Kopf, bleibt mit ihm oben stehen */
.serverwarnung { flex: 0 0 calc(100% + 64px); margin: 18px -32px -18px; }
.serverwarnung:empty { display: none; }
.warnung-root {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 28px; padding: 12px 32px;
  background: #ffb000; color: #000; font: bold 30px/1.3 sans-serif; text-transform: uppercase;
}
.warnung-root + .warnung-root { border-top: 2px solid #000; }
.warnung-root span { font: bold 22px/1.3 monospace; }
.ueberwachung-zustand { white-space: nowrap; }
.serveruhr { font: bold 48px monospace; }
.verbindung { font-size: 20px; }
.ueberwachung-zustand.getrennt { color: #ffb000; font-weight: bold; }
.ueberwachung-liste { list-style: none; margin: 0; padding: 12px 32px 90px; font: 26px/1.35 monospace; color: #6141ac; }
.ueberwachung-liste li { display: flex; flex-wrap: wrap; gap: 0 28px; padding: 8px 0; border-bottom: 1px solid #cfc4ea; }
.ueberwachung-liste li:last-child { background: #f8f5ff; }
.ueberwachung-liste .zeit { color: #6f6f6f; }
.ueberwachung-liste .wer { font-weight: bold; }
.ueberwachung-liste li.fehler { color: #cc0000; }
.ueberwachung-liste li.fehler .ergebnis { font-weight: bold; }
.ueberwachung-liste .bemerkung { flex-basis: 100%; font-size: 22px; color: #444; }
/* Erweitert: Anfrage links, Antwort rechts */
/* Zwei gleich breite Hälften, 40 px Abstand zu beiden Seiten der Mittellinie; die Antwort beginnt immer an derselben Stelle */
.ueberwachung-liste li.verkehr { display: grid; grid-template-columns: 1fr 1fr; gap: 0; font-size: 20px; }
.ueberwachung-liste li.verkehr pre { margin: 4px 0 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.ueberwachung-liste li.verkehr .anfrage { min-width: 0; padding-right: 40px; }
.ueberwachung-liste li.verkehr .antwort { min-width: 0; padding-left: 40px; border-left: 1px dotted #cfc4ea; text-align: left; }
.ueberwachung-liste li.verkehr .antwort pre { white-space: pre; overflow-x: auto; }
.ueberwachung-liste li.verkehr .mitglied { font-weight: bold; }
.ueberwachung-liste li.verkehr .verbindung-zeile { font-size: 16px; color: #6f6f6f; }
.ueberwachung-liste li.verkehr.seite { color: #6f6f6f; }
.ueberwachung-liste li.verkehr.fehler { color: #cc0000; }
.ueberwachung-liste li.verkehr .ergebnis { font-weight: bold; }
.ueberwachung-liste li.fehler .bemerkung { color: #cc0000; }
footer.ueberwachung-fuss { position: fixed; right: 0; bottom: 0; padding: 6px 14px; font-size: 16px; }
.zugang-entziehen button { background: #cc0000; border-color: #cc0000; }
.exporte .zugang-entziehen { flex: 1; margin: 0; }
.befehlsauswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; font-size: 14px; }
.befehlsauswahl label.option { margin: 0; }

/* Einlasskontrolle: entwerten oder schliessen links, einlass verweigern rechts; Frage nach Sanktion oder Meldung darüber */
.einlassknoepfe { display: flex; gap: 8px; }
.einlassknoepfe > form, .einlassknoepfe > .knopf { flex: 1; margin: 0; }
.einlassknoepfe .knopf, .einlassknoepfe button { margin-top: 4px; padding: 10px; font-size: 16px; }
/* Frage nach Sanktion oder Meldung im gewohnten Kasten */
.einlassfrage { margin: 4px 0 8px; }
.einlassfrage pre { min-height: 0; font-size: 15px; white-space: pre-wrap; }
.einlassfrage form { padding: 0 4px 4px; }
.verweigern button { background: #cc0000; border-color: #cc0000; }
/* Fenster für den Grund der Verweigerung: lange, leicht zu treffende Knöpfe */
.grundfenster pre { min-height: 0; font-size: 15px; }
.gruende { padding: 4px 4px 0; }
.gruende button { margin: 8px 0 0; padding: 18px 16px; background: #fff; color: #cc0000; border: 2px solid #cc0000; font-size: 20px; text-align: left; }
.gruende button.vorgeschlagen { background: #cc0000; color: #fff; }
.grundfenster > .knopf { margin: 16px 4px 4px; width: calc(100% - 8px); }

/* Ergebnis über der Seite: Anzeigen zuerst, Person mit grossem Geburtsdatum, Einzelheiten zurückhaltend */
.ergebnis .kasten-kopf { font-size: 16px; padding: 7px 8px; }
.ergebnis .anzeigen .altersanzeige { margin: 4px 0 0; padding: 10px 8px; font-size: 32px; }
.ergebnis .person { padding: 14px 16px 6px; color: #000; }
.ergebnis .person-name { font-size: 20px; font-weight: bold; }
.ergebnis .person-nummer { font-family: monospace; color: #6141ac; margin-right: 6px; }
.ergebnis .person-geburt { font: bold 56px/1.1 monospace; letter-spacing: 2px; margin-top: 4px; }
.ergebnis .person-alter { font: bold 32px Helvetica, Arial, "Liberation Sans", sans-serif; letter-spacing: 0; color: #000; margin-left: 24px; }
.ergebnis .details pre { min-height: 0; max-height: 26vh; padding: 8px 16px; font-size: 13px; color: #6f6f6f; background: #fff; border-top: 1px solid #e6e0f5; }
.ergebnis .einlassknoepfe .knopf, .ergebnis .einlassknoepfe button { padding: 14px; font-size: 18px; }

/* DJ-Songwünsche: grosse Einträge, Löschen rechts */
.dj-liste { list-style: none; margin: 0; padding: 12px 32px 90px; }
.dj-liste li { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 12px 0; border-bottom: 1px solid #3a3150; }
.dj-wunsch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; }
.dj-titel { font-size: 32px; font-weight: bold; }
.dj-kuenstler { font-size: 26px; }
.dj-von { flex-basis: 100%; font-size: 16px; }
.dj-liste form { margin: 0; flex-shrink: 0; }
.dj-liste button { width: auto; margin: 0; padding: 10px 18px; background: transparent; color: #ff6b6b; border: 2px solid #ff6b6b; font-size: 16px; }

/* Dunkles Erscheinungsbild, nur für die DJ-Seiten (Wunschformular und DJ-Anzeige) */
body.dunkel { background: #121016; color: #e6dff7; }
body.dunkel a { color: #c7b6f5; }
body.dunkel h1, body.dunkel h2, body.dunkel label { color: #e6dff7; }
body.dunkel input[type=text], body.dunkel textarea { background: #1d1926; color: #f2edff; border-color: #6e58b8; }
body.dunkel input::placeholder { color: #6e6485; }
body.dunkel :focus { outline-color: #b49cf3; }
body.dunkel .hinweis, body.dunkel .zaehler { color: #9a91b3; }
body.dunkel .zaehler.ueber { color: #ff6b6b; }
body.dunkel button, body.dunkel .knopf { background: #7a5ad6; border-color: #7a5ad6; color: #fff; }
body.dunkel .kasten { background: #1d1926; border-color: #6e58b8; }
body.dunkel .kasten pre { background: #17141f; color: #e6dff7; }
body.dunkel footer { background: #1d1926; color: #9a91b3; }
body.dunkel .ueberwachung-kopf { background: #2a2140; }
body.dunkel .dj-liste { color: #e6dff7; }
body.dunkel .dj-liste li:last-child { background: #1d1926; }
body.dunkel .dj-von { color: #9a91b3; }
body.dunkel .dj-liste button { background: transparent; color: #ff6b6b; border-color: #ff6b6b; }

/* Übungsumgebung: auf jeder Seite unübersehbar */
.uebungsbanner {
  position: sticky; top: 0; z-index: 30; padding: 6px 12px; text-align: center; font-weight: bold; letter-spacing: 2px;
  color: #000; background: repeating-linear-gradient(135deg, #ffb000 0 18px, #ffd166 18px 36px);
}
body:has(.uebungsbanner) .einlasszaehler { top: 34px; }
