:root {
  --text: #1c2430;
  --grau: #5b6675;
  --linie: #d5dae1;
  --flaeche: #ffffff;
  --grund: #f3f5f8;
  --akzent: #0b5cad;
  --gut: #1a7f4b;
  --gut-grund: #e8f6ee;
  --warn: #9a5b00;
  --warn-grund: #fff5e0;
  --fehler: #b3261e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--grund);
}

h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .6rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
p { margin: 0 0 .8rem; }
a { color: var(--akzent); }

.testband {
  background: #3b2f00;
  color: #ffe9a8;
  font-size: .85rem;
  text-align: center;
  padding: .35rem 1rem;
}

.kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .7rem 1rem;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
}
.marke { font-weight: 600; }
.sprachen a, .sprachen strong { padding: .3rem .45rem; text-decoration: none; }
.sprachen strong { border-bottom: 2px solid var(--akzent); }

main { margin: 0 auto; padding: 1.2rem 1rem 3rem; }
main.schmal { max-width: 30rem; }
main.breit { max-width: 70rem; }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}
.karte.gut { background: var(--gut-grund); border-color: var(--gut); text-align: center; }
.karte.warn { background: var(--warn-grund); border-color: var(--warn); }
.haken {
  width: 4rem; height: 4rem; line-height: 4rem;
  margin: 0 auto .6rem;
  border-radius: 50%;
  background: var(--gut); color: #fff;
  font-size: 2.2rem; font-weight: 700;
}

.einheit { margin-bottom: 1rem; }
.einheit .titel { font-size: 1.2rem; font-weight: 600; margin-bottom: .2rem; }
.grau { color: var(--grau); }
.klein { font-size: .85rem; }
.gross { font-size: 1.25rem; font-weight: 600; }
.wer { margin-top: 1.2rem; }
.fehler { color: var(--fehler); font-weight: 600; }

button, .knopf {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--linie);
  border-radius: 10px;
  background: var(--flaeche);
  color: var(--text);
  padding: .6rem 1rem;
}
button.haupt, .knopf.haupt {
  display: inline-block;
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: .9rem 1.2rem;
}
main.schmal button.haupt, main.schmal .knopf.haupt { width: 100%; text-align: center; font-size: 1.1rem; }
button.link {
  border: 0; background: none; padding: 0;
  color: var(--akzent); text-decoration: underline;
}
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }
form.leise { display: inline; }

.personen { display: grid; gap: .5rem; margin: 1rem 0; }
button.person {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1rem;
}
button.person span { color: var(--grau); font-size: .9rem; }
.frei label { display: block; margin-bottom: .3rem; }
.zeile { display: flex; gap: .5rem; }
.zeile input { flex: 1; min-width: 0; }

input {
  font: inherit;
  padding: .55rem .7rem;
  border: 1px solid #9aa4b2;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.raster { display: grid; grid-template-columns: 2fr 2fr auto; gap: .8rem; align-items: end; }
.raster label { display: grid; gap: .25rem; font-size: .9rem; color: var(--grau); }
.raster .lang { grid-column: 1 / -1; }
@media (max-width: 40rem) { .raster { grid-template-columns: 1fr; } }

.kopfzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

table.liste {
  width: 100%;
  border-collapse: collapse;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 12px;
  overflow: hidden;
}
table.liste th, table.liste td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--linie); }
table.liste th { font-size: .85rem; color: var(--grau); background: #fafbfc; }
table.liste tr:last-child td { border-bottom: 0; }
.zahl { text-align: right !important; font-variant-numeric: tabular-nums; }

.zweispaltig { display: grid; grid-template-columns: minmax(18rem, 26rem) 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 52rem) { .zweispaltig { grid-template-columns: 1fr; } }
.qr { text-align: center; }
.qrbild svg { width: 100%; height: auto; display: block; }
.adresse { font-size: .8rem; color: var(--grau); word-break: break-all; margin: 0; }

.zustand { font-weight: 600; }
.zustand.offen { color: var(--gut); }
.zustand.zufrueh, .zustand.zuspaet { color: var(--warn); }

/* ---------- Erfassung (Teilnehmende) ---------- */
.kamera {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: .6rem;
}
.kamera video, .kamera img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Wie ein Spiegel: Vorschau gespiegelt, gespeichertes Bild nicht. */
.kamera video { transform: scaleX(-1); }
.kamera-status {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin: 0;
}
button.zweit { width: 100%; margin-bottom: 1.2rem; font-weight: 600; }
label.feld { display: grid; gap: .25rem; margin-bottom: .8rem; color: var(--grau); font-size: .95rem; }
label.feld input { color: var(--text); }
.karte h2 { margin-top: .4rem; }
.selfie-gross {
  width: 9rem; height: 12rem;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0 auto .6rem;
}

/* ---------- Kursleitung ---------- */
.selfie-klein {
  width: 3.5rem; height: 4.5rem;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.qr-bild { width: 100%; max-width: 26rem; height: auto; display: block; margin: 0 auto; image-rendering: pixelated; }
.qr-aus { padding: 3rem 1rem; }
.knoepfe { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: .8rem 0; }
.vollbild { text-align: center; }
.vollbild .qr-bild { max-width: min(80vh, 90vw); }
.vollbild-seite .kopf, .vollbild-seite .testband { display: none; }
