:root{
  --bg:#0e0d0b; --flaeche:#1a1814; --flaeche2:#24211c; --linie:#35302738; --text:#f3eee4; --leise:#a89f8f;
  --gold:#d4ad6a; --gold2:#f0d49b; --rot:#e0735f; --gruen:#8cc49a;
  --r:18px; --unten:64px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;background:var(--bg);color:var(--text);min-height:100%}
body{padding-bottom:calc(var(--unten) + 72px + env(safe-area-inset-bottom))}
button,input,select,textarea{font:inherit;color:inherit}
h1{font-size:1.45rem;margin:0;font-weight:650;letter-spacing:-.01em}
h2{font-size:1rem;margin:0 0 .4rem;font-weight:600;color:var(--gold2)}
.klein{font-size:.85rem;color:var(--leise)}
.seite{max-width:720px;margin:0 auto;padding:calc(12px + env(safe-area-inset-top)) 16px 16px}
.kopf{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:6px 0 14px}
.pille{font-size:.78rem;color:var(--leise);background:var(--flaeche);border-radius:99px;padding:5px 10px}
.karte{background:var(--flaeche);border-radius:var(--r);padding:16px;margin-bottom:14px}
details.karte summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center}
details.karte summary::-webkit-details-marker{display:none}
details.karte summary::after{content:"›";transform:rotate(90deg);color:var(--leise);font-size:1.3rem;transition:.2s}
details[open].karte summary::after{transform:rotate(-90deg)}
details.karte summary h2{margin:0}
details[open].karte summary{margin-bottom:12px}
.raster{display:grid;grid-template-columns:1fr;gap:12px}
@media(min-width:620px){.raster{grid-template-columns:1fr 1fr}}
label{display:flex;flex-direction:column;gap:6px;font-size:.9rem;color:var(--leise)}
label b{color:var(--text)}
label.haken{flex-direction:row;align-items:center;gap:10px;grid-column:1/-1}
label.haken input{width:22px;height:22px;accent-color:var(--gold)}
select,input[type=password],input[type=text],textarea,.titel-feld{width:100%;background:var(--flaeche2);border:1px solid #ffffff14;border-radius:12px;padding:12px;color:var(--text);outline:none}
select:focus,input:focus,textarea:focus{border-color:var(--gold)}
textarea{resize:vertical;line-height:1.45}
input[type=range]{width:100%;accent-color:var(--gold);height:28px}
.knopf{border:0;border-radius:99px;padding:13px 20px;background:var(--flaeche2);font-weight:600;cursor:pointer}
.knopf.haupt{background:linear-gradient(135deg,var(--gold),#b88a45);color:#1a1206}
.knopf.gross{width:100%;padding:16px;font-size:1.05rem;margin:4px 0 12px}
.knopf:disabled{opacity:.5}
.knopf.klein-k{padding:8px 14px;font-size:.85rem}
.meldung{background:var(--flaeche2);border-left:3px solid var(--gold);padding:12px 14px;border-radius:10px;font-size:.92rem;line-height:1.4}
.meldung.fehler,.fehler{border-color:var(--rot);color:#ffd0c6}
/* Mikrofon */
.mik-zeile{display:flex;align-items:center;gap:16px;margin:10px 0 14px}
.mik{width:76px;height:76px;border-radius:50%;border:0;background:radial-gradient(circle at 35% 30%,var(--gold2),var(--gold) 55%,#9c7434);flex:none;cursor:pointer;position:relative;box-shadow:0 6px 24px #d4ad6a40}
.mik-symbol{display:block;width:20px;height:32px;border-radius:12px;background:#1a1206;margin:auto;position:relative}
.mik-symbol::after{content:"";position:absolute;left:-7px;right:-7px;top:16px;height:16px;border:3px solid #1a1206;border-top:0;border-radius:0 0 14px 14px}
.mik.an{background:radial-gradient(circle at 35% 30%,#ffb3a3,var(--rot) 60%,#a8432f);animation:puls 1.4s infinite}
.mik.an .mik-symbol{width:24px;height:24px;border-radius:5px}
.mik.an .mik-symbol::after{display:none}
.mik.arbeit{animation:none;opacity:.6}
@keyframes puls{0%{box-shadow:0 0 0 0 #e0735f80}70%{box-shadow:0 0 0 18px #e0735f00}100%{box-shadow:0 0 0 0 #e0735f00}}
#mik-status{font-weight:600}
/* Entwurf */
.titel-feld{font-size:1.25rem;font-weight:650;background:transparent;border:0;border-bottom:1px solid #ffffff20;border-radius:0;padding:6px 0}
.kap{border-top:1px solid #ffffff10;padding:12px 0}
.kap:first-child{border-top:0}
.kap-kopf{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}
.kap-kopf input{flex:1;background:transparent;border:0;font-weight:600;color:var(--gold2);padding:4px 0;outline:none}
.kap textarea{font-size:.93rem;min-height:140px}
.kap .klein{display:block;margin-top:4px}
.zustand{font-size:.78rem;border-radius:99px;padding:3px 9px;background:var(--flaeche2);color:var(--leise);white-space:nowrap}
.zustand.ok{color:var(--gruen)} .zustand.warn{color:var(--rot)} .zustand.lauf{color:var(--gold2)}
.balken{height:8px;background:var(--flaeche2);border-radius:99px;overflow:hidden;margin:10px 0}
.balken>div{height:100%;background:linear-gradient(90deg,var(--gold),var(--gold2));width:0;transition:width .4s}
/* Bibliothek */
.buch{display:flex;gap:14px;align-items:center;background:var(--flaeche);border-radius:var(--r);padding:12px;margin-bottom:10px;cursor:pointer}
.buch-cover{width:64px;height:64px;border-radius:12px;flex:none;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.5rem;color:#1a1206}
.buch-info{flex:1;min-width:0}
.buch-info b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.buch-info .klein{display:block;margin-top:3px}
.buch-fort{height:3px;background:var(--flaeche2);border-radius:9px;margin-top:7px;overflow:hidden}
.buch-fort div{height:100%;background:var(--gold)}
.leer{text-align:center;color:var(--leise);padding:40px 10px}
/* Player */
.zurueck{background:none;border:0;font-size:1.8rem;width:44px;height:44px;cursor:pointer;color:var(--text)}
.klein-titel{font-size:.85rem;color:var(--leise);font-weight:500;text-transform:uppercase;letter-spacing:.08em}
.cover{aspect-ratio:1;max-width:340px;width:78%;margin:6px auto 22px;border-radius:22px;display:flex;flex-direction:column;justify-content:flex-end;padding:22px;box-shadow:0 20px 60px #0009;position:relative;overflow:hidden}
.cover::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 75% 20%,#ffffff30,transparent 45%)}
.cover-titel{font-size:1.6rem;font-weight:700;line-height:1.15;color:#1a1206;position:relative}
.cover-marke{font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;color:#1a1206b0;margin-top:8px;position:relative}
.sp-titel{font-size:1.25rem;font-weight:650}
.sp-kapitel{color:var(--leise);margin:4px 0 14px}
.leiste-box{position:relative;margin-bottom:6px}
#sp-leiste{position:relative;z-index:2;background:transparent}
.marken{position:absolute;left:8px;right:8px;top:12px;height:4px;pointer-events:none;z-index:1}
.marken i{position:absolute;top:-3px;width:2px;height:10px;background:#ffffff40;border-radius:2px}
.zeiten{display:flex;justify-content:space-between;font-size:.8rem;color:var(--leise);font-variant-numeric:tabular-nums}
.steuer{display:flex;align-items:center;justify-content:space-between;max-width:400px;margin:10px auto 16px}
.rund{width:54px;height:54px;border-radius:50%;border:0;background:none;font-size:1.45rem;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:1px;color:var(--text)}
.rund span{font-size:.7rem;font-weight:700}
.play{width:78px;height:78px;border-radius:50%;border:0;background:var(--text);color:var(--bg);font-size:1.9rem;cursor:pointer;padding-left:4px}
.play.laeuft{padding-left:0}
.extras{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-bottom:16px}
.chip{background:var(--flaeche);border:0;border-radius:99px;padding:9px 14px;font-size:.88rem;cursor:pointer;color:var(--text);text-decoration:none}
.chip.an{background:var(--gold);color:#1a1206}
.kap-liste{list-style:none;padding:0;margin:0}
.kap-liste li{display:flex;justify-content:space-between;gap:10px;padding:12px 4px;border-top:1px solid #ffffff10;cursor:pointer}
.kap-liste li:first-child{border-top:0}
.kap-liste li.jetzt{color:var(--gold2);font-weight:600}
.kap-liste li.fehlt{opacity:.45}
.kap-liste li span:last-child{color:var(--leise);font-variant-numeric:tabular-nums;font-size:.88rem}
.lesetext{line-height:1.65;white-space:pre-wrap;color:#e6dfd2}
/* Mini-Player + Navigation */
#mini{position:fixed;left:8px;right:8px;bottom:calc(var(--unten) + 6px + env(safe-area-inset-bottom));background:#2a2620;border-radius:14px;overflow:hidden;box-shadow:0 8px 30px #000a;max-width:704px;margin:0 auto;z-index:20}
.mini-fort{height:3px;background:#ffffff14}.mini-fort div{height:100%;background:var(--gold);width:0}
.mini-inhalt{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 14px}
.mini-text{flex:1;min-width:0;cursor:pointer}
.mini-text b,.mini-text span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-knopf{width:44px;height:44px;border-radius:50%;border:0;background:var(--text);color:var(--bg);font-size:1.1rem;cursor:pointer}
nav#unten{position:fixed;left:0;right:0;bottom:0;height:calc(var(--unten) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#0e0d0bf2;backdrop-filter:blur(12px);display:flex;border-top:1px solid #ffffff10;z-index:21}
nav#unten button{flex:1;background:none;border:0;color:var(--leise);font-size:.78rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer}
nav#unten button span{font-size:1.3rem}
nav#unten button.aktiv{color:var(--gold2)}
body.im-spieler nav#unten,body.im-spieler #mini{display:none}
/* Tor */
.tor-box{max-width:380px;margin:12vh auto 0;text-align:center}
.tor-box form{display:flex;flex-direction:column;gap:12px;text-align:left;margin-top:24px}
.logo{font-size:3rem;color:var(--gold)}
pre{background:var(--flaeche);padding:12px;border-radius:10px;text-align:left;overflow:auto;font-size:.82rem}
/* Dialog */
#dialog{position:fixed;inset:0;background:#000a;display:flex;align-items:flex-end;justify-content:center;z-index:50}
.dlg{background:var(--flaeche);width:100%;max-width:520px;border-radius:20px 20px 0 0;padding:20px 18px calc(18px + env(safe-area-inset-bottom))}
@media(min-width:620px){#dialog{align-items:center}.dlg{border-radius:20px}}
.dlg-knoepfe{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.dlg-knoepfe .knopf{width:100%}
