:root {
  --hg: #f4f6f9;
  --flaeche: #ffffff;
  --text: #16202c;
  --leise: #5b6878;
  --linie: #dde3ea;
  --akzent: #0b5ea8;
  --akzent-text: #ffffff;
  --persona: #eaf2fb;
  --warn: #8a5300;
  --warn-hg: #fff4e0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hg: #0f141a;
    --flaeche: #18202a;
    --text: #e7edf3;
    --leise: #9aa7b6;
    --linie: #2a3542;
    --akzent: #4a9be6;
    --akzent-text: #0b1520;
    --persona: #1b2c40;
    --warn: #f3c178;
    --warn-hg: #3a2c12;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --hg: #0f141a; --flaeche: #18202a; --text: #e7edf3; --leise: #9aa7b6; --linie: #2a3542;
  --akzent: #4a9be6; --akzent-text: #0b1520; --persona: #1b2c40; --warn: #f3c178; --warn-hg: #3a2c12;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  max-width: 760px;
  margin-inline: auto;
  background: var(--hg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--linie); background: var(--flaeche);
}
.marke { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 34px; height: 34px; flex: none; fill: var(--akzent); }
h1 { margin: 0; font-size: 1.15rem; line-height: 1.2; }
.unter { margin: 0; color: var(--leise); font-size: .85rem; }
.werkzeuge { display: flex; align-items: center; gap: 6px; }
select {
  font: inherit; font-size: .9rem; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 8px; padding: 6px 8px; max-width: 9rem;
}

.symbol {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--linie); border-radius: 50%; background: var(--flaeche); color: var(--text); cursor: pointer;
}
.symbol svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.symbol[aria-pressed="false"] .wellen { opacity: .25; }
.symbol[aria-pressed="true"] { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
#mikrofon[aria-pressed="true"] { animation: puls 1.2s infinite; }
@keyframes puls { 50% { opacity: .6; } }

.hinweis {
  margin: 0; padding: 8px 16px; font-size: .82rem; color: var(--leise);
  background: var(--flaeche); border-bottom: 1px solid var(--linie);
}
.hinweis strong { color: var(--text); }

.verlauf { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.blase { max-width: 85%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.blase.persona { align-self: flex-start; background: var(--persona); border-bottom-left-radius: 4px; }
.blase.nutzer { align-self: flex-end; background: var(--akzent); color: var(--akzent-text); border-bottom-right-radius: 4px; }
.blase.meldung { align-self: center; background: var(--warn-hg); color: var(--warn); font-size: .9rem; text-align: center; }
.blase a { color: inherit; }
.blase.laedt::after { content: "…"; animation: puls 1s infinite; }

.eingabe {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 16px;
  background: var(--flaeche); border-top: 1px solid var(--linie);
}
textarea {
  flex: 1; min-width: 0; resize: none; max-height: 9rem;
  font: inherit; color: var(--text); background: var(--hg);
  border: 1px solid var(--linie); border-radius: 20px; padding: 9px 14px;
}
textarea:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.senden {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 50%; background: var(--akzent); color: var(--akzent-text); cursor: pointer;
}
.senden svg { width: 20px; height: 20px; fill: currentColor; }
.senden:disabled { opacity: .5; cursor: default; }

.fuss {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  padding: 6px 16px 10px; font-size: .78rem; color: var(--leise); background: var(--flaeche);
}
.fuss nav { display: flex; gap: 12px; }
.fuss a { color: var(--leise); }

.unsichtbar {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 480px) {
  .unter { display: none; }
  select { max-width: 6.5rem; }
}
