:root {
  --rot: #9b0a0a; --rot-hell: #fbeaea; --text: #1f1f1f; --leise: #6b6b6b; --linie: #e3e0dc;
  --grund: #f7f5f2; --karte: #ffffff; --agent: #ffffff; --nutzer: #9b0a0a;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--grund); }
body { display: flex; flex-direction: column; }
[hidden] { display: none !important; }

.kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: var(--rot); color: #fff; flex: 0 0 auto; }
.marke { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: .85; }
.aktionen { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.aktionen #wer { opacity: .85; margin-right: 4px; }
button { font: inherit; cursor: pointer; }
.leise { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 3px 8px; }
.leise:hover { background: rgba(255,255,255,.15); }

main { flex: 1 1 auto; min-height: 0; display: flex; }
.login { margin: auto; width: min(320px, 92%); background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 20px; }
.login h1 { font-size: 17px; margin: 0 0 12px; }
.login label { display: block; font-size: 12px; color: var(--leise); margin-bottom: 10px; }
.login input { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--linie); border-radius: 6px; font: inherit; }
.login button { width: 100%; padding: 9px; border: 0; border-radius: 6px; background: var(--rot); color: #fff; font-weight: 600; }
.fehler { color: var(--rot); font-size: 12px; min-height: 1em; margin: 8px 0 0; }

.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.verlauf { flex: 1 1 auto; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; padding: 8px 11px; border-radius: 10px; overflow-wrap: anywhere; }
.msg.nutzer { align-self: flex-end; background: var(--nutzer); color: #fff; border-bottom-right-radius: 3px; white-space: pre-wrap; }
.msg.agent { align-self: flex-start; background: var(--agent); border: 1px solid var(--linie); border-bottom-left-radius: 3px; }
.msg.agent p { margin: 0 0 6px; } .msg.agent p:last-child { margin-bottom: 0; }
.msg.agent ul, .msg.agent ol { margin: 4px 0 6px; padding-left: 18px; }
.msg.agent li { margin: 2px 0; }
.msg.agent a { color: var(--rot); }
.msg.agent code { background: var(--rot-hell); padding: 0 3px; border-radius: 3px; font-size: 12px; }
.msg.fehler-msg { border-color: var(--rot); background: var(--rot-hell); }
.meta { font-size: 11px; color: var(--leise); margin-top: 4px; }
.denkt { align-self: flex-start; color: var(--leise); font-size: 12px; padding: 4px 2px; }

.leer { padding: 14px 12px 0; color: var(--leise); }
.leer p { margin: 0 0 10px; }
.beispiele { display: flex; flex-wrap: wrap; gap: 6px; }
.beispiel { background: var(--karte); border: 1px solid var(--linie); border-radius: 14px; padding: 5px 10px; color: var(--text); font-size: 12px; }
.beispiel:hover { border-color: var(--rot); }
.hinweis { margin: 0 12px; padding: 6px 10px; background: var(--rot-hell); border-radius: 6px; font-size: 12px; }

.eingabe { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--linie); background: var(--karte); flex: 0 0 auto; }
.eingabe textarea { flex: 1; resize: none; max-height: 140px; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; font: inherit; }
.eingabe textarea:focus, .login input:focus { outline: 2px solid var(--rot-hell); border-color: var(--rot); }
.eingabe button { width: 40px; border: 0; border-radius: 8px; background: var(--rot); color: #fff; font-size: 16px; }
.eingabe button:disabled { opacity: .5; cursor: default; }

.karte { align-self: stretch; background: var(--karte); border: 2px solid var(--rot); border-radius: 10px; padding: 10px 12px; }
.karte-titel { font-weight: 600; margin-bottom: 6px; }
.karte-zeilen { white-space: pre-wrap; font-size: 13px; }
.karte-warn { margin-top: 6px; padding: 4px 8px; background: #fff4d6; border-radius: 6px; font-size: 12px; }
.karte-ergebnis { white-space: pre-wrap; font-size: 12px; margin-top: 6px; }
.karte-ergebnis:empty { display: none; }
.karte-knoepfe { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.karte-knoepfe .ja { background: var(--rot); color: #fff; border: 0; border-radius: 6px; padding: 7px 14px; font-weight: 600; }
.karte-knoepfe .nein { background: transparent; border: 1px solid var(--linie); border-radius: 6px; padding: 7px 12px; }
.karte-knoepfe button:disabled { opacity: .6; cursor: default; }
.karte-info { font-size: 11px; color: var(--leise); margin-left: auto; }
.karte.ok { border-color: #2e7d32; }
.karte.teil { border-color: #c77700; }
.karte.aus { border-color: var(--linie); opacity: .75; }
.karte.automat { border-style: dashed; }
.karte.automat.ok, .karte.automat.teil, .karte.automat.aus { border-style: solid; }
.eingang { background: #fff; color: var(--rot); border: 0; border-radius: 10px; padding: 2px 9px; font-weight: 600; font-size: 12px; }
.zur-app { margin-top: 22px; padding: 12px 14px; border-radius: 10px; background: #fdf0f0; line-height: 1.5; }
.zur-app a { color: #c82020; font-weight: 700; font-size: 17px; text-decoration: none; }
