:root {
  --grund: #000000;
  --karte: #1c1c1e;
  --text: #f2f2f7;
  --leise: #a1a1a6;
  --linie: #3a3a3c;
  --feld: #2c2c2e;
  --gelb: #ffd60a;
  --akzent: #ffd60a;
  --akzent-text: #000000;
  --gut: #7fd894;
  --gut-grund: #12301b;
  --schlecht: #ff8a80;
  --schlecht-grund: #3b1513;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.zoom-leiste:empty { display: none; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--akzent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.klein { font-size: 13px; color: var(--leise); }

/* ---------------------------------------------------------------- Anmeldung */

.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.karte { background: var(--karte); border-radius: var(--radius); padding: 16px; }
.anmeldekarte { width: 100%; max-width: 360px; display: grid; gap: 10px; text-align: center; }
.anmeldekarte img { margin: 0 auto; border-radius: 12px; }
.anmeldekarte h1 { margin: 0 0 6px; font-size: 22px; }
.anmeldekarte label { text-align: left; font-size: 14px; color: var(--leise); }
input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--linie);
  border-radius: 12px;
  background: var(--feld);
  font-size: 17px;
}
input:focus, select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.primaer, .zweit {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 600;
  font-size: 17px;
}
.primaer { background: var(--akzent); color: var(--akzent-text); }
.primaer:disabled { opacity: .6; }
.zweit { background: var(--feld); }
.fehler { color: var(--schlecht); margin: 0; }

/* ---------------------------------------------------------------- App */

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom));
}
.kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 10px;
}
.auswahl { flex: 1; position: relative; }
.auswahl::after {
  content: "";
  position: absolute;
  right: 16px; top: 50%;
  width: 8px; height: 8px;
  border: solid var(--gelb);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--karte);
  padding: 12px 40px 12px 14px;
  font-size: 18px;
  font-weight: 600;
}
.fortschritt {
  min-width: 52px;
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--karte);
  color: var(--leise);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.fortschritt.komplett { color: var(--gut); background: var(--gut-grund); }

/* Sucher: quadratisch wie das Foto */
.sucher {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.sucher video, .sucher #foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .15s ease-out;
}
.sucher #foto { background: #000; cursor: zoom-in; }
.sucher #foto.gross { transform: scale(2.5); cursor: zoom-out; }
.sucher.klick::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  animation: klick .18s ease-out;
}
@keyframes klick { from { opacity: 1; } to { opacity: 0; } }

.kamera-hinweis {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--leise);
}

.oben-links {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  gap: 10px;
}
.sucher.vorschau .oben-links, .sucher.vorschau .zoom-leiste, .sucher.vorschau .kamera-hinweis { display: none; }
.rund {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.rund svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.rund[aria-pressed="true"] { background: var(--gelb); color: #000; }
.rund[aria-pressed="true"] svg { fill: currentColor; }
.rund[aria-pressed="true"] .strich { display: none; }
.rund.geht-nicht { opacity: .4; }

/* Zoomstufen wie in der iPhone-Kamera */
.zoom-leiste {
  position: absolute;
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
}
.zoomstufe {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(30, 30, 30, .75);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  transition: all .15s;
}
.zoomstufe.aktiv {
  width: 40px; height: 40px;
  color: var(--gelb);
  font-size: 13px;
}
.lupe-hinweis {
  position: absolute;
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  font-size: 13px;
  pointer-events: none;
}

/* Auslöser und Eingabe */
.steuerung { padding: 14px 16px 6px; }
.aufnahme {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.ausloeser {
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: transparent;
  padding: 4px;
}
.ausloeser span {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #fff;
  transition: transform .1s;
}
.ausloeser:active span { transform: scale(.9); }
.datei-knopf {
  justify-self: start;
  width: 48px; height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--karte);
  cursor: pointer;
}
.datei-knopf svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }

.eingabe { display: grid; gap: 8px; }
.eingabe label { font-size: 14px; color: var(--leise); }
.eingabe input { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.dateiname { margin: 0; font-size: 13px; color: var(--leise); word-break: break-all; }
.knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }

.meldung { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--karte); font-size: 15px; }
.meldung.gut { background: var(--gut-grund); color: var(--gut); }
.meldung.fehler { background: var(--schlecht-grund); color: var(--schlecht); }

/* Liste von heute */
.liste { margin: 12px 12px 0; }
.liste h2 { margin: 0 0 8px; font-size: 17px; }
.liste h2 span { color: var(--leise); font-weight: 500; }
.warnung { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #3a2c00; color: var(--gelb); font-size: 14px; }
.liste ul { list-style: none; margin: 0; padding: 0; }
.liste li { border-top: 1px solid var(--linie); padding: 6px 0; }
.liste li:first-child { border-top: 0; }
.zeile {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border: 0;
  background: none;
  text-align: left;
}
.haken {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--linie);
  flex: none;
}
.fertig .haken { background: var(--gut); border-color: var(--gut); position: relative; }
.fertig .haken::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.datei {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0 2px 32px;
  font-size: 13px;
  color: var(--leise);
  word-break: break-all;
}
.loeschen {
  flex: none;
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--feld);
  font-size: 18px;
  line-height: 1;
}
