:root {
  --bg: #111214; --karte: #1b1d21; --linie: #2b2e34; --text: #f2f2f2; --leise: #9aa0a8;
  --gelb: #ffd400; --gruen: #2fbf71; --rot: #ff5d5d; --blau: #4da3ff;
  --oben: env(safe-area-inset-top); --unten: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }

.kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--oben) + 10px) 16px 10px; background: rgba(17,18,20,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linie); }
.kopf h1 { margin: 0; font-size: 22px; }
.icon-btn { background: var(--karte); width: 38px; height: 38px; border-radius: 19px; font-size: 20px; }
main { padding: 12px 12px calc(var(--unten) + 86px); max-width: 720px; margin: 0 auto; }

.leiste { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: rgba(17,18,20,.95);
  backdrop-filter: blur(12px); border-top: 1px solid var(--linie); padding-bottom: var(--unten); z-index: 5; }
.leiste button { flex: 1; background: none; padding: 8px 0 10px; color: var(--leise); font-size: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; }
.leiste button span { font-size: 20px; }
.leiste button.aktiv { color: var(--gelb); }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.karte h2 { margin: 6px 0 8px; font-size: 18px; }
.karte p { margin: 6px 0; }
.zeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.marke { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--linie); color: var(--leise); }
.marke.lang { background: #3a3000; color: var(--gelb); }
.marke.short { background: #0f2e4a; color: var(--blau); }
.marke.ok { background: #12351f; color: var(--gruen); }
.marke.warn { background: #3d1717; color: var(--rot); }
.leise { color: var(--leise); font-size: 14px; }
.kurz { white-space: pre-wrap; }
.mehr { color: var(--blau); background: none; padding: 0; font-size: 14px; }

.knoepfe { display: flex; gap: 8px; margin-top: 12px; }
.knoepfe button { flex: 1; padding: 12px; border-radius: 12px; background: var(--linie); font-weight: 600; }
.knoepfe .ja { background: var(--gruen); color: #04130a; }
.knoepfe .nein { background: #3d1717; color: var(--rot); }
.knoepfe button.gewaehlt { outline: 3px solid var(--gelb); }
textarea, input[type=password] { width: 100%; background: #0d0e10; color: var(--text); border: 1px solid var(--linie);
  border-radius: 12px; padding: 12px; font: inherit; }
textarea { min-height: 90px; margin-top: 10px; }

.thumbs { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
.thumb { position: relative; border-radius: 12px; overflow: hidden; border: 3px solid transparent; background: #000; padding: 0; }
.thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.thumb .buchst { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.7); padding: 2px 9px; border-radius: 8px; font-weight: 800; }
.thumb.gewaehlt { border-color: var(--gelb); }
.titel-wahl { display: block; width: 100%; text-align: left; background: #0d0e10; border: 2px solid var(--linie);
  border-radius: 12px; padding: 12px; margin-top: 8px; }
.titel-wahl.gewaehlt { border-color: var(--gelb); }
video { width: 100%; border-radius: 12px; background: #000; margin-top: 10px; }

.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 14px; }
.kachel b { display: block; font-size: 26px; }
.balken { display: flex; align-items: flex-end; gap: 2px; height: 120px; margin-top: 10px; }
.balken div { flex: 1; background: var(--gelb); border-radius: 2px 2px 0 0; min-height: 1px; opacity: .85; }
.liste-eintrag { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linie); }
.liste-eintrag:first-of-type { border-top: 0; }
.liste-eintrag .r { text-align: right; white-space: nowrap; }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; background: var(--rot); }
.punkt.an { background: var(--gruen); }
.abschnitt { margin: 18px 4px 8px; color: var(--leise); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.leer { text-align: center; color: var(--leise); padding: 40px 10px; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 100%; max-width: 340px; text-align: center; }
.login-icon { width: 84px; height: 84px; border-radius: 20px; }
.login form { display: grid; gap: 10px; margin-top: 16px; }
.login button { padding: 13px; border-radius: 12px; background: var(--gelb); color: #000; font-weight: 700; }
.fehler { color: var(--rot); min-height: 1.4em; margin: 0; }
.hinweis { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--unten) + 80px);
  background: #000; border: 1px solid var(--linie); padding: 10px 16px; border-radius: 12px; z-index: 9; font-size: 14px; }
