:root { --n0: #060d1c; --n1: #0b1730; --n2: #12224a; --linie: #26396a; --gold: #c9a54a; --weiss: #f2f5fb; --grau: #9aa8c7; --rot: #d63a2f; --gruen: #27ae60; --gelb: #e6b422; --schrift: 16px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--n0); color: var(--weiss); font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 16px; min-height: 100%; }
body { overflow-x: hidden; }
#app { max-width: 720px; margin: 0 auto; padding: 0 16px; min-height: 100vh; display: flex; flex-direction: column; }
.laden { color: var(--grau); margin-top: 40vh; text-align: center; }
h1 { font-size: 15px; letter-spacing: .16em; color: var(--gold); margin: 18px 0 14px; font-weight: 800; }
.start { padding-top: 6vh; }
.start .gross-eingabe { font-size: 22px; padding: 16px; border-radius: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--linie); background: var(--n1); color: var(--weiss); font: inherit; font-weight: 600; min-height: 44px; cursor: pointer; }
.chip.an { border-color: var(--gold); background: var(--n2); box-shadow: inset 0 0 0 1px var(--gold); }
.chip[disabled] { opacity: .45; cursor: not-allowed; }
.chip img { height: 20px; width: auto; display: block; }
.chip .stufe { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: #3a3320; color: #e8c66a; }
.chip[data-stufe=nicht_verfuegbar] .stufe { background: #2a2a2a; color: #aaa; }
.hinweis[data-stufe=eingeschraenkt] b { color: #e8c66a; }
.hinweis { font-size: 13px; color: var(--grau); line-height: 1.45; margin: 6px 0; }
.fehlertext { color: #ff9a8f; }
button { font: inherit; color: var(--weiss); background: var(--n2); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 16px; font-weight: 600; min-height: 48px; cursor: pointer; }
button.gold { background: var(--gold); color: var(--n0); border-color: var(--gold); }
button.rot { background: var(--rot); border-color: var(--rot); }
button.breit { width: 100%; font-size: 19px; min-height: 58px; margin-top: 16px; }
button.klein { min-height: 38px; padding: 6px 12px; font-size: 14px; }
input, select, textarea { font: inherit; color: inherit; background: var(--n0); border: 1px solid var(--linie); border-radius: 10px; padding: 11px; width: 100%; }
textarea { min-height: 64px; resize: vertical; }
input[type=range] { accent-color: var(--gold); padding: 0; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
label { display: block; font-size: 13px; color: var(--grau); margin: 10px 0 4px; }
details { background: var(--n1); border: 1px solid var(--linie); border-radius: 12px; margin: 10px 0; }
details > summary { padding: 14px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details > summary::after { content: '▾'; color: var(--gold); } details[open] > summary::after { content: '▴'; }
details > .innen { padding: 0 14px 14px; }
.schalter { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 15px; color: var(--weiss); }
.zeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.zeile > * { flex: 1 1 auto; }
/* Chatansicht */
.kopf { position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--n0) 85%, transparent); padding: 10px 0 8px; }
.kopfzeile { display: flex; gap: 8px; align-items: center; }
.vorlesen { flex: 1; font-size: 17px; min-height: 52px; }
.vorlesen.an { background: var(--gold); color: var(--n0); border-color: var(--gold); }
.zahnrad { min-width: 52px; font-size: 20px; }
.status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 8px 4px 6px; border-radius: 999px; background: var(--n1); border: 1px solid var(--linie); cursor: pointer; }
.st img { height: 14px; } .st .punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--grau); }
.st.verbunden .punkt { background: var(--gruen); } .st.verbinde .punkt, .st.getrennt .punkt, .st.wartet_auf_webhook .punkt { background: var(--gelb); animation: puls 1s infinite alternate; }
.st.fehler .punkt, .st.nicht_gefunden .punkt, .st.unbekannt .punkt { background: var(--rot); } .st.aus { opacity: .45; text-decoration: line-through; }
.st .live { background: var(--rot); color: #fff; font-weight: 800; font-size: 10px; border-radius: 4px; padding: 1px 4px; }
@keyframes puls { to { opacity: .35; } }
.banner { background: rgba(230,180,34,.14); border: 1px solid rgba(230,180,34,.55); color: #f3d98a; padding: 8px 12px; border-radius: 10px; font-size: 14px; margin-top: 8px; }
.banner.rot { background: rgba(214,58,47,.14); border-color: rgba(214,58,47,.6); color: #ffb3aa; }
.chat { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-bottom: 96px; font-size: var(--schrift); }
.msg { background: var(--n1); border-radius: 10px; padding: 8px 10px; line-height: 1.4; overflow-wrap: anywhere; cursor: pointer; border-left: 3px solid transparent; }
.msg .zeit { color: var(--grau); font-size: .75em; margin-right: 6px; }
.msg .wer { font-weight: 700; color: var(--gold); margin-right: 6px; }
.msg .abz { display: inline-flex; vertical-align: -2px; margin-right: 3px; } .msg .abz img { height: 1.05em; }
.msg .abz.t { font-size: .65em; font-weight: 800; text-transform: uppercase; background: var(--n2); border: 1px solid var(--linie); border-radius: 4px; padding: 0 4px; vertical-align: 2px; }
.msg.erwaehnt { border-left-color: var(--gold); background: #1a2647; }
.msg.ereignis { border-left-color: #b37cff; background: linear-gradient(90deg, #2a1f4d, var(--n1)); }
.msg.ereignis .art { font-size: .7em; font-weight: 800; letter-spacing: .08em; color: #d7c2ff; margin-right: 6px; text-transform: uppercase; }
.msg.spricht { box-shadow: 0 0 0 2px var(--gold); } .msg.gesprochen { opacity: .82; }
.marke { display: inline-flex; align-items: center; font-size: .65em; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
.marke.mit-logo { padding: 0; background: transparent !important; } .marke img { height: 1.1em; width: auto; display: block; }
.emote { height: 1.6em; vertical-align: -0.45em; }
.leer { color: var(--grau); text-align: center; margin-top: 18vh; line-height: 1.6; }
.leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: rgba(6,13,28,.96); border-top: 1px solid var(--linie); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
.leiste .innen { max-width: 720px; margin: 0 auto; display: flex; gap: 8px; align-items: center; }
.leiste .info { flex: 1; font-size: 13px; color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leiste button { min-width: 48px; padding: 8px 10px; }
.runter { position: fixed; right: 16px; bottom: 84px; z-index: 6; border-radius: 999px; }
/* Einstellungen + Blatt */
.blatt-hg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.blatt { width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; background: var(--n0); border: 1px solid var(--linie); border-radius: 16px 16px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
.blatt h2 { font-size: 14px; letter-spacing: .14em; color: var(--gold); margin: 12px 0; display: flex; justify-content: space-between; align-items: center; }
.aktionen { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.url { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; background: var(--n1); border: 1px solid var(--linie); border-radius: 8px; padding: 10px; user-select: all; }
.obs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.obs span { background: var(--n1); border: 1px solid var(--linie); border-radius: 6px; padding: 4px 8px; } .obs .an { background: var(--rot); border-color: var(--rot); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 30; background: var(--n2); border: 1px solid var(--gold); color: var(--weiss); padding: 10px 14px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); }
.ende { text-align: center; padding-top: 20vh; }
.klein-grau { font-size: 12px; color: var(--grau); }
