:root {
  --grund: #f6f3ee;
  --flaeche: #ffffff;
  --seite: #efeae1;
  --linie: #e1d9cc;
  --text: #24211d;
  --leise: #6d665c;
  --gruen: #2f6b4f;
  --gruen-hell: #e3efe8;
  --gruen-dunkel: #24553e;
  --fehler: #a3362b;
  --schatten: 0 1px 2px rgba(36, 33, 29, .06), 0 4px 14px rgba(36, 33, 29, .06);
  --rund: 14px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--grund); color: var(--text); font: 16px/1.5 var(--schrift); }
button { font: inherit; cursor: pointer; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.rahmen { display: flex; height: 100dvh; }
.seite { width: 280px; flex: none; background: var(--seite); border-right: 1px solid var(--linie);
  display: flex; flex-direction: column; padding: 14px; gap: 12px; }
.seite-kopf { display: flex; align-items: center; justify-content: space-between; }
.marke { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.marke img { width: 26px; height: 26px; }
.knopf-neu { background: var(--gruen); color: #fff; border: 0; border-radius: 10px; padding: 10px 14px;
  font-weight: 600; text-align: left; }
.knopf-neu:hover { background: var(--gruen-dunkel); }
.knopf-neu:focus-visible, .eintrag:focus-visible, .knopf-kopieren:focus-visible, .knopf-senden:focus-visible,
.knopf-bild:focus-within { outline: 3px solid #8fbfa5; outline-offset: 2px; }
.eingabe-zeile:focus-within { border-color: var(--gruen); }
.liste { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.eintrag { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px;
  border-radius: 9px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eintrag:hover { background: rgba(47, 107, 79, .08); }
.eintrag.aktiv { background: var(--flaeche); box-shadow: var(--schatten); }
.eintrag small { display: block; color: var(--leise); font-size: 12px; }
.seite-fuss { border-top: 1px solid var(--linie); padding-top: 10px; font-size: 14px; color: var(--leise); }
.ich { display: flex; justify-content: space-between; align-items: center; }
.knopf-link { background: none; border: 0; color: var(--gruen); text-decoration: underline; padding: 4px; }
.verbrauch { margin-bottom: 8px; line-height: 1.4; }
.knopf-klein { background: none; border: 0; font-size: 20px; padding: 4px 8px; color: var(--text); }
.nur-handy { display: none; }

.haupt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.kopf { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--linie);
  background: var(--grund); }
.kopf h1 { font-size: 17px; margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attrappe { margin-left: auto; white-space: nowrap; font-size: 12px; background: #fff3d6; color: #7a5a12; padding: 3px 8px; border-radius: 99px; }

.verlauf { flex: 1; overflow-y: auto; padding: 24px 20px 12px; display: flex; flex-direction: column; gap: 16px; }
.verlauf > * { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
.leer { margin-top: 12vh; text-align: center; color: var(--leise); }
.leer-gross { font-size: 22px; color: var(--text); font-weight: 600; margin-bottom: 6px; }
.nachricht { display: flex; flex-direction: column; gap: 6px; }
.nachricht.nutzerin { align-items: flex-end; }
.blase { padding: 11px 14px; border-radius: var(--rund); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92%; }
.nutzerin .blase { background: var(--gruen-hell); border-bottom-right-radius: 4px; }
.assistent .blase { background: var(--flaeche); box-shadow: var(--schatten); border-bottom-left-radius: 4px; }
.bilder { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bilder img { max-width: 160px; max-height: 200px; border-radius: 10px; border: 1px solid var(--linie); object-fit: cover; }
.tipp { color: var(--leise); font-size: 14px; padding-left: 4px; }
.aktionen { display: flex; gap: 8px; align-items: center; }
.knopf-kopieren { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 99px; padding: 6px 14px;
  font-size: 14px; color: var(--gruen-dunkel); font-weight: 600; }
.knopf-kopieren:hover { border-color: var(--gruen); }
.knopf-kopieren.ok { background: var(--gruen); color: #fff; border-color: var(--gruen); }
.denkt { color: var(--leise); font-style: italic; }
.denkt::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: punkte 1.2s steps(4) infinite; }
@keyframes punkte { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.fehlermeldung { color: var(--fehler); }

.eingabe { padding: 10px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--grund); }
.eingabe > * { max-width: 760px; margin: 0 auto; }
.vorschau { display: flex; gap: 8px; flex-wrap: wrap; }
.vorschau:not(:empty) { margin-bottom: 8px; }
.vorschau figure { position: relative; margin: 0; }
.vorschau img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--linie); }
.vorschau button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: var(--text); color: #fff; font-size: 13px; line-height: 24px; padding: 0; }
.vorschau button:disabled { opacity: .35; cursor: default; }
.eingabe-zeile { display: flex; align-items: flex-end; gap: 8px; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 18px; padding: 6px; box-shadow: var(--schatten); }
.knopf-bild { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  font-size: 20px; flex: none; }
.knopf-bild:hover { background: var(--grund); }
textarea { flex: 1; border: 0; resize: none; font: inherit; padding: 9px 4px; max-height: 40vh; background: none;
  color: var(--text); outline: none; min-width: 0; }
.knopf-senden { width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; background: var(--gruen); color: #fff;
  font-size: 18px; }
.knopf-senden:disabled { background: #b9c9bf; cursor: default; }
.ziehen { position: fixed; inset: 0; background: rgba(47, 107, 79, .18); border: 4px dashed var(--gruen); display: grid;
  place-items: center; font-size: 24px; font-weight: 700; color: var(--gruen-dunkel); z-index: 20; pointer-events: none; }

.anmelde-seite { display: grid; place-items: center; min-height: 100dvh; padding: 16px; }
.anmelde-karte { background: var(--flaeche); padding: 28px; border-radius: 18px; box-shadow: var(--schatten);
  width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.anmelde-karte h1 { margin: 0; font-size: 22px; }
.anmelde-symbol { width: 44px; height: 44px; }
.anmelde-karte label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--leise); }
.anmelde-karte input { font: inherit; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; color: var(--text); }
.anmelde-karte input:focus-visible { outline: 3px solid #8fbfa5; outline-offset: 1px; }
.anmelde-karte .knopf-neu { text-align: center; }
.namen { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.namen legend { padding: 0; margin-bottom: 6px; font-size: 14px; color: var(--leise); }
.anmelde-karte .name-knopf { flex: 1 1 90px; display: block; position: relative; font-size: 16px; }
.name-knopf input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.name-knopf span { display: block; text-align: center; padding: 12px 10px; border: 1px solid var(--linie); border-radius: 10px;
  color: var(--text); background: var(--flaeche); font-weight: 600; min-height: 48px; }
.name-knopf:hover span { border-color: var(--gruen); }
.name-knopf input:checked + span { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.name-knopf input:focus-visible + span { outline: 3px solid #8fbfa5; outline-offset: 2px; }
.fehler { color: var(--fehler); margin: 0; }

@media (max-width: 760px) {
  .nur-handy { display: inline-block; }
  .seite { position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); z-index: 10; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  .rahmen.seite-offen .seite { transform: none; }
  .kopf { padding: 10px 12px; }
  .verlauf { padding: 16px 12px 8px; }
  .eingabe { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .blase { max-width: 100%; }
  textarea { font-size: 16px; }
}
.liste.gesperrt { opacity: .55; pointer-events: none; }
.knopf-neu:disabled { opacity: .55; cursor: default; }
