:root {
  --grund: #f6f5f2;
  --flaeche: #ffffff;
  --text: #1c1b19;
  --leise: #5c5a55;
  --linie: #dcd9d2;
  --akzent: #1f5c4a;
  --akzent-text: #ffffff;
  --warnung: #8a2a12;
  --warnung-grund: #fbeee9;
  --ki: #eef4f1;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--grund);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; font-size: 1rem; line-height: 1.5; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sprunglink { position: absolute; left: 1rem; top: -4rem; padding: 0.5rem 1rem; background: var(--text); color: #fff; z-index: 10; }
.sprunglink:focus { top: 1rem; }
h1, h2, h3 { margin: 0; line-height: 1.2; }

.marke { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.marke span { font-weight: 400; color: var(--leise); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--text); font: inherit; font-weight: 550; cursor: pointer;
}
.knopf:hover:not(:disabled) { border-color: var(--text); }
.knopf--haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.knopf--haupt:hover:not(:disabled) { background: #174a3b; }
.knopf:disabled { opacity: 0.45; cursor: not-allowed; }

/* Anmelden */
.anmelden-seite { align-items: center; justify-content: center; padding: 1rem; }
.anmelden { width: min(100%, 24rem); background: var(--flaeche); padding: 2rem; border-radius: 12px; border: 1px solid var(--linie); }
.anmelden h1 { font-size: 1.5rem; margin: 1.25rem 0; }
.feld { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.feld label { font-weight: 550; }
input, textarea, select { font: inherit; color: inherit; border: 1px solid #8f8b83; border-radius: 8px; padding: 0.6rem 0.75rem; background: #fff; min-height: 44px; }
.meldung { color: var(--warnung); min-height: 1.5em; margin: 0 0 0.75rem; }
.klein { font-size: 0.875rem; color: var(--leise); margin: 1.25rem 0 0; }
.anmelden .knopf { width: 100%; }

/* Kopf */
.kopf { display: flex; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; padding: 0.75rem 1.25rem; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf__website { margin: 0; color: var(--leise); }
.kopf__rechts { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.kopf__benutzer { color: var(--leise); }

/* Arbeitsfläche */
.arbeitsflaeche { flex: 1; display: grid; grid-template-columns: minmax(20rem, 26rem) 1fr; min-height: 0; }
@media (max-width: 60rem) { .arbeitsflaeche { grid-template-columns: 1fr; } }

.chat { display: flex; flex-direction: column; border-right: 1px solid var(--linie); background: var(--flaeche); min-height: 0; max-height: calc(100dvh - 4rem); }
.ki-hinweis { margin: 0; padding: 0.75rem 1.25rem; font-size: 0.875rem; color: var(--leise); border-bottom: 1px solid var(--linie); }
.verlauf { list-style: none; margin: 0; padding: 1rem 1.25rem; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 0.75rem; }
.nachricht { padding: 0.65rem 0.9rem; border-radius: 12px; max-width: 92%; }
.nachricht p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nachricht__wer { display: block; font-size: 0.75rem; font-weight: 650; color: var(--leise); margin-bottom: 0.15rem; }
.nachricht--ich { background: var(--grund); justify-self: end; }
.nachricht--ki { background: var(--ki); }
.nachricht--studio { background: transparent; border: 1px dashed var(--linie); font-size: 0.9375rem; }
.nachricht--warnung { background: var(--warnung-grund); border-color: var(--warnung); color: var(--warnung); }
.arbeitet { margin: 0 1.25rem 0.5rem; color: var(--leise); font-size: 0.9375rem; }
.eingabe { padding: 0.75rem 1.25rem 1.25rem; border-top: 1px solid var(--linie); display: grid; gap: 0.6rem; }
.eingabe textarea { resize: vertical; min-height: 5rem; }
.eingabe__knoepfe { display: flex; justify-content: space-between; gap: 0.5rem; }
.hochladen { position: relative; }
.hochladen:focus-within { outline: 3px solid var(--akzent); outline-offset: 2px; }

.vorschau { display: flex; flex-direction: column; min-height: 0; }
.leiste { display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.leiste__titel { font-size: 1rem; }
.status { margin: 0; color: var(--leise); font-size: 0.9375rem; }
.leiste__knoepfe { margin-left: auto; display: flex; gap: 0.5rem; }
.aenderungen { padding: 0.75rem 1.25rem; background: #fffbea; border-bottom: 1px solid var(--linie); font-size: 0.9375rem; }
.aenderungen h3 { font-size: 0.875rem; margin-bottom: 0.25rem; }
.aenderungen ul { margin: 0; padding-left: 1.25rem; }
.vorschau__rahmen { flex: 1; width: 100%; min-height: 60vh; border: 0; background: #fff; }
.frueher { padding: 0.75rem 1.25rem; border-top: 1px solid var(--linie); background: var(--flaeche); font-size: 0.9375rem; }
.frueher summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.frueher ol { padding-left: 1.25rem; color: var(--leise); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
