/* Tafel Nordhorn - Schulung. Farben und Schrift wie auf tafel-nordhorn.de:
   Primaerfarbe #424242, weisse Kopfleiste, Ueberschriften in Antonio. */
:root {
  --haupt:   #424242;
  --dunkel:  #1a1a1a;
  --linie:   #d8d8d8;
  --hell:    #f5f5f5;
  --weiss:   #ffffff;
  --rot:     #c0392b;
  --gruen:   #2e7d32;
  --gelb:    #f0ad4e;
  --blau:    #31708f;
  --schrift: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--hell); color: var(--dunkel);
  font-family: var(--schrift); font-size: 15px; line-height: 1.5;
}
h1, h2, h3, h4 { font-family: "Antonio", var(--schrift); font-weight: 600; letter-spacing: .3px; margin: 0 0 .5em; }
.versteckt { display: none !important; }

/* ── Anmeldung ───────────────────────────────────────────────────────────── */
.anmeldung { min-height: 100vh; display: grid; place-items: center; background: var(--hell); }
.anmeldekasten {
  background: var(--weiss); padding: 2.5rem; border-radius: 6px; width: min(380px, 92vw);
  box-shadow: 0 2px 16px rgba(0,0,0,.12); text-align: center;
}
.logo-gross { width: 212px; max-width: 100%; margin-bottom: 1rem; }
.anmeldekasten h1 { font-size: 1.9rem; }
.anmeldekasten .hinweis { color: #666; font-size: .9rem; margin-top: 0; }
.anmeldekasten input {
  width: 100%; padding: .7rem; font-size: 1rem; border: 1px solid var(--linie);
  border-radius: 4px; margin: .6rem 0;
}
.anmeldekasten button {
  width: 100%; padding: .7rem; font-size: 1rem; background: var(--haupt); color: #fff;
  border: 0; border-radius: 4px; cursor: pointer;
}
.anmeldekasten button:hover { background: var(--dunkel); }
.fehler { color: var(--rot); min-height: 1.2em; margin: .5rem 0 0; font-size: .9rem; }

/* ── Kopf ────────────────────────────────────────────────────────────────── */
.kopf {
  background: var(--weiss); border-bottom: 1px solid var(--linie);
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 1rem; gap: 1rem; flex-wrap: wrap;
}
.marke { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--haupt); }
.marke img { height: 52px; }
.marke span { font-family: "Antonio", var(--schrift); font-size: 1.6rem; }
.kopf-rechts { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sprachwahl { font-size: .85rem; color: #555; display: flex; align-items: center; gap: .4rem; }
.sprachwahl select { padding: .35rem .5rem; border: 1px solid var(--linie); border-radius: 4px; font-size: .95rem; }
.speicherstand { font-size: .82rem; color: var(--gruen); min-width: 8rem; }
.speicherstand.arbeitet { color: #999; }
.speicherstand.schiefgegangen { color: var(--rot); }
button.flach { background: none; border: 1px solid var(--linie); border-radius: 4px; padding: .4rem .8rem; cursor: pointer; }
button.flach:hover { background: var(--hell); }

/* ── Reiter ──────────────────────────────────────────────────────────────── */
.reiter { background: var(--weiss); border-bottom: 1px solid var(--linie); padding: 0 1rem; display: flex; gap: .2rem; overflow-x: auto; }
.reiter button {
  background: none; border: 0; border-bottom: 3px solid transparent; padding: .7rem 1rem;
  font-size: .95rem; cursor: pointer; color: #555; white-space: nowrap;
}
.reiter button.an { color: var(--haupt); border-bottom-color: var(--haupt); font-weight: 600; }

/* ── Buehne ──────────────────────────────────────────────────────────────── */
.buehne { padding: 1rem; }
.bereich { display: block; }
#bereich-inhalte { display: grid; grid-template-columns: 320px 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { #bereich-inhalte { grid-template-columns: 1fr; } }

.kasten { background: var(--weiss); border: 1px solid var(--linie); border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.leer { color: #888; padding: 2rem; text-align: center; }

/* ── Baum ────────────────────────────────────────────────────────────────── */
.baum { background: var(--weiss); border: 1px solid var(--linie); border-radius: 6px; padding: .8rem; }
.baum h2 { font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.baum ul { list-style: none; margin: 0; padding: 0; }
.baum ul ul { margin-left: .9rem; border-left: 1px dotted var(--linie); padding-left: .6rem; }
.baum li { margin: .15rem 0; }
.zeile { display: flex; align-items: center; gap: .35rem; padding: .25rem .3rem; border-radius: 4px; }
.zeile:hover { background: var(--hell); }
.zeile.gewaehlt { background: #e8eef2; }
.zeile .titel { flex: 1; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile.thema .titel { font-weight: 600; }
.zeile.kurs .titel::before { content: "▸ "; color: #999; }
.zeile .knopf { background: none; border: 0; cursor: pointer; color: #888; font-size: .9rem; padding: 0 .2rem; }
.zeile .knopf:hover { color: var(--haupt); }
.marke-ersatz { color: var(--gelb); font-size: .75rem; }
.marke-aus { opacity: .5; }
.zahl { color: #999; font-size: .78rem; }

/* ── Formulare ───────────────────────────────────────────────────────────── */
label.feld { display: block; margin-bottom: .8rem; }
label.feld > span { display: block; font-size: .82rem; color: #555; margin-bottom: .2rem; }
input[type=text], input[type=number], textarea, select {
  width: 100%; padding: .5rem; border: 1px solid var(--linie); border-radius: 4px;
  font-family: inherit; font-size: .95rem; background: var(--weiss);
}
textarea { min-height: 5rem; resize: vertical; }
input.ersatz, textarea.ersatz { background: #fffbe9; }
.reihe { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; }
.reihe > * { flex: 1 1 10rem; }
.knopfreihe { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
button.haupt { background: var(--haupt); color: #fff; border: 0; border-radius: 4px; padding: .5rem 1rem; cursor: pointer; }
button.haupt:hover { background: var(--dunkel); }
button.weg { color: var(--rot); background: none; border: 1px solid #e8c4bf; border-radius: 4px; padding: .4rem .7rem; cursor: pointer; }
.hinweistext { font-size: .82rem; color: #777; }

/* ── Folien im Editor ────────────────────────────────────────────────────── */
.folienliste { display: grid; gap: .8rem; }
.folie { background: var(--weiss); border: 1px solid var(--linie); border-radius: 6px; }
.folie > header {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem;
  border-bottom: 1px solid var(--linie); background: #fafafa; border-radius: 6px 6px 0 0;
}
.folie > header .nr { font-family: "Antonio", var(--schrift); font-size: 1.2rem; color: #999; min-width: 1.6rem; }
.folie > header .platz { flex: 1; }
.folie .koerper { padding: .8rem; }
.folie.zu .koerper { display: none; }
.feldkopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .2rem; }
.feldkopf .bez { font-size: .82rem; color: #555; }
.umschalter { display: flex; gap: .2rem; }
.umschalter button {
  font-size: .75rem; padding: .15rem .5rem; border: 1px solid var(--linie);
  background: var(--weiss); border-radius: 3px; cursor: pointer; color: #666;
}
.umschalter button.an { background: var(--haupt); color: #fff; border-color: var(--haupt); }
.bildwahl { display: flex; gap: .6rem; align-items: center; }
.bildwahl img { max-height: 70px; border: 1px solid var(--linie); border-radius: 4px; }

/* ── Bilderliste ─────────────────────────────────────────────────────────── */
.bildnetz { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.bildkachel { background: var(--weiss); border: 1px solid var(--linie); border-radius: 6px; padding: .5rem; text-align: center; }
.bildkachel img { width: 100%; height: 110px; object-fit: contain; }
.bildkachel .name { font-size: .8rem; word-break: break-word; }

/* ── Vorschau ────────────────────────────────────────────────────────────── */
.vorschau-rahmen { background: var(--weiss); border: 1px solid var(--linie); border-radius: 6px; padding: 0; overflow: hidden; }
.vorschau-leiste {
  display: flex; align-items: center; gap: .8rem; padding: .5rem .8rem;
  background: #fafafa; border-bottom: 1px solid var(--linie);
}
.vorschau-leiste .platz { flex: 1; }
.schaufenster { padding: 2rem; min-height: 24rem; }
.schaufenster[dir=rtl] { text-align: right; }
.sf-titel { font-family: "Antonio", var(--schrift); font-size: 2rem; color: var(--haupt); }
.sf-untertitel { font-size: 1.2rem; color: #666; }
.sf-text { font-size: 1.05rem; white-space: pre-wrap; }
.sf-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.sf-textbild { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.sf-textbild.links > .sf-bild { order: -1; }
.sf-bild img { max-width: 100%; border-radius: 4px; }
.sf-unterschrift { font-size: .85rem; color: #777; margin-top: .3rem; }
.sf-liste { font-size: 1.05rem; }
.sf-frage { background: var(--hell); border-left: 4px solid var(--haupt); padding: 1rem; border-radius: 4px; }
.sf-frage .wahl { display: block; margin: .4rem 0; }
.sf-frage .richtig { color: var(--gruen); font-weight: 600; }
.sf-fehlt { color: var(--rot); font-style: italic; }
.sf-ersatzhinweis { background: #fffbe9; border: 1px solid #f0e2b6; font-size: .8rem; padding: .3rem .6rem; border-radius: 4px; display: inline-block; margin-bottom: 1rem; }

/* ── Meldung unten ───────────────────────────────────────────────────────── */
.meldung {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: var(--dunkel); color: #fff; padding: .6rem 1.2rem; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3); z-index: 50; max-width: 90vw;
}
.meldung.schlecht { background: var(--rot); }
