/* Sloca – Gestaltung. Mobile first. Vertraut wie ein Messenger, aber eigene Farben und Formen. */

:root {
  --primaer: #0f6b7e;
  --primaer-dunkel: #0b5463;
  --primaer-hell: #dceef2;
  --akzent: #f29b2a;
  --hintergrund: #eef1f5;
  --flaeche: #ffffff;
  --text: #1b2330;
  --text-schwach: #6b7684;
  --linie: #d9dee5;
  --eigene-blase: #d5ebf0;
  --fremde-blase: #ffffff;
  --fehler: #c0392b;
  --termin: #b45309;
  --termin-hell: #fdf1e0;
  --aufgabe: #2e7d32;
  --aufgabe-hell: #e3f1e4;
  --notiz: #6b46a8;
  --notiz-hell: #f1ecf9;
  --notiz-linie: #c9b8e6;
  --radius: 16px;
  --schatten: 0 1px 2px rgba(20, 30, 50, 0.08);
  --sicher-oben: env(safe-area-inset-top, 0px);
  --sicher-unten: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--hintergrund);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body { position: fixed; inset: 0; overflow: hidden; }

.app { height: 100%; display: flex; flex-direction: column; }

button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--primaer); }

/* ---------- Seitenrahmen ---------- */

.seite { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.kopf {
  background: var(--primaer);
  color: #fff;
  padding: calc(var(--sicher-oben) + 8px) 8px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: calc(var(--sicher-oben) + 56px);
  flex-shrink: 0;
}

.kopf-titel { flex: 1; min-width: 0; padding: 0 4px; }
.kopf-name { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf-unter { font-size: 13px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kopf-knopf {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kopf-knopf:active { background: rgba(255, 255, 255, 0.18); }
.kopf-knopf svg { width: 24px; height: 24px; fill: currentColor; }

.inhalt { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; }

.fuss { padding: 12px 16px calc(var(--sicher-unten) + 12px); background: var(--flaeche); border-top: 1px solid var(--linie); flex-shrink: 0; }

/* ---------- Startseite ---------- */

.kopf-start {
  flex-direction: column; align-items: flex-start; gap: 2px;
  padding: calc(var(--sicher-oben) + 28px) 24px 24px;
  background: linear-gradient(160deg, var(--primaer) 0%, var(--primaer-dunkel) 100%);
}
.logo { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.5px; }
.claim { margin: 0; font-size: 15px; opacity: 0.9; }

.abschnitt-titel { margin: 8px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-schwach); text-transform: uppercase; letter-spacing: 0.4px; }

.liste { list-style: none; margin: 0; padding: 0; background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.liste li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--linie); }
.liste li:first-child { border-top: 0; }
.liste li.klickbar { cursor: pointer; }
.liste li.klickbar:active { background: var(--primaer-hell); }

.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--primaer-hell); color: var(--primaer);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px;
}
.listen-text { flex: 1; min-width: 0; }
.listen-haupt { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listen-neben { display: block; font-size: 13px; color: var(--text-schwach); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.leer { color: var(--text-schwach); text-align: center; padding: 48px 24px; }

/* ---------- Formulare ---------- */

.formular { display: flex; flex-direction: column; gap: 14px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label { font-size: 13px; font-weight: 600; color: var(--text-schwach); }
.feld label span { font-weight: 400; }
.feld input, .feld textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 12px;
  background: var(--flaeche); outline: none; font-size: 16px;
}
.feld input:focus, .feld textarea:focus, .feld select:focus { border-color: var(--primaer); box-shadow: 0 0 0 3px rgba(15, 107, 126, 0.15); }
.feld select {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 12px;
  background: var(--flaeche); outline: none; font: inherit; font-size: 16px; color: inherit;
}
/* Datum und Uhrzeit: gleiche Höhe wie die Textfelder, auch dort, wo der Browser sie von sich aus anders zeichnet */
.feld input[type="date"], .feld input[type="time"] { min-height: 48px; -webkit-appearance: none; appearance: none; text-align: left; }
.feld-reihe { display: flex; gap: 10px; }
.feld-reihe .feld { flex: 1; min-width: 0; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 14px; font-weight: 600; font-size: 16px;
}
.knopf-primaer { background: var(--primaer); color: #fff; }
.knopf-primaer:active { background: var(--primaer-dunkel); }
.knopf-sekundaer { background: var(--primaer-hell); color: var(--primaer); }
.knopf-sekundaer:active { background: #c5e1e8; }
.knopf:disabled { opacity: 0.55; cursor: default; }
.knopf svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
a.knopf { text-decoration: none; }
.knopf-stapel { display: flex; flex-direction: column; gap: 10px; }

.karte { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); padding: 20px; }
.karte h2 { margin: 0 0 6px; font-size: 20px; }
.karte p { margin: 0 0 16px; color: var(--text-schwach); }
.karte p.eng { margin-bottom: 2px; }

/* Kleine Helfer statt style-Attributen – die verbietet die Inhaltsrichtlinie des Servers. */
.schwach { color: var(--text-schwach); }
.normal { font-weight: 400; }
.klein { font-size: 13px; }

/* ---------- Chat ---------- */

.verlauf {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 10px 8px;
  display: flex; flex-direction: column;
  background:
    radial-gradient(circle at 20% 10%, rgba(15, 107, 126, 0.05), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(242, 155, 42, 0.05), transparent 40%),
    var(--hintergrund);
}

.tag {
  align-self: center; margin: 10px 0 8px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85); color: var(--text-schwach);
  font-size: 12px; font-weight: 600; box-shadow: var(--schatten);
}

.nachricht { display: flex; margin: 2px 0; max-width: 100%; }
.nachricht.eigene { justify-content: flex-end; }
.nachricht.fremde { justify-content: flex-start; }
.nachricht.folge { margin-top: 1px; }
.nachricht:not(.folge) { margin-top: 8px; }

.blase {
  max-width: 82%; min-width: 72px;
  padding: 7px 10px 6px;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  position: relative;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.eigene .blase { background: var(--eigene-blase); border-bottom-right-radius: 6px; }
.fremde .blase { background: var(--fremde-blase); border-bottom-left-radius: 6px; }

.autor { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.text { white-space: pre-wrap; }
.zeit { font-size: 11px; color: var(--text-schwach); text-align: right; margin-top: 2px; }

.foto-rahmen {
  display: block; width: min(70vw, 320px); max-width: 100%;
  border-radius: 12px; overflow: hidden; background: var(--linie);
  margin: 0 0 4px; cursor: pointer;
}
.foto-rahmen img { display: block; width: 100%; height: auto; }
.foto-rahmen.laedt img { opacity: 0; }

.typ-foto .blase { padding: 4px 4px 4px; }
.typ-foto .autor { padding: 3px 6px 0; }
.typ-foto .text { padding: 2px 6px 0; }
.typ-foto .zeit { padding: 0 6px 2px; }

/* Termin und Aufgabe: normale Nachrichten mit farbiger Markierung */

.typ-termin .blase, .typ-aufgabe .blase { border-left: 4px solid var(--termin); padding-left: 10px; min-width: min(72vw, 250px); }
.typ-aufgabe .blase { border-left-color: var(--aufgabe); }
.marke { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.marke svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.marke-termin { color: var(--termin); }
.marke-aufgabe { color: var(--aufgabe); }
.titel { font-weight: 600; }
.durch { text-decoration: line-through; color: var(--text-schwach); }
.angabe { margin-top: 1px; font-size: 14px; color: var(--text-schwach); }
.angabe.stark { color: var(--text); }
.angabe.gut { color: var(--aufgabe); }
.angabe .warn { color: var(--fehler); font-weight: 600; }
.angabe.mit-symbol { display: flex; align-items: center; gap: 4px; }
.angabe.mit-symbol svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }

.aufgabe-zeile { display: flex; align-items: flex-start; gap: 10px; }
.aufgabe-text { flex: 1; min-width: 0; }
.haken {
  position: relative; width: 30px; height: 30px; margin-top: 1px; padding: 0; flex-shrink: 0;
  border: 2px solid var(--aufgabe); border-radius: 50%; background: #fff; color: transparent;
  display: inline-flex; align-items: center; justify-content: center;
}
.haken::after { content: ""; position: absolute; inset: -9px; } /* größere Fläche zum Antippen */
.haken svg { width: 18px; height: 18px; fill: currentColor; }
.haken.an { background: var(--aufgabe); color: #fff; }
.haken:disabled { opacity: 0.45; cursor: default; }
.haken:not(:disabled):active { transform: scale(0.92); }

/* Sprung aus der Liste zur Nachricht: kurz aufleuchten */
.nachricht.blitz .blase { animation: blitz 1.8s ease-out; }
@keyframes blitz {
  0%, 45% { box-shadow: 0 0 0 3px var(--akzent); }
  100% { box-shadow: var(--schatten); }
}

/* Angepinnte Leiste unter dem Kopf: nächster Termin, offene Aufgaben */

.leiste {
  display: flex; align-items: center; gap: 12px; width: 100%; flex-shrink: 0;
  padding: 9px 6px 9px 14px; border: 0; border-bottom: 1px solid var(--linie);
  background: var(--flaeche); color: var(--text); text-align: left; font-size: 14px;
  position: relative; z-index: 1; box-shadow: var(--schatten);
}
.leiste[hidden] { display: none; }
.leiste:active { background: var(--primaer-hell); }
.leiste-teil { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.leiste-teil svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.leiste-termin { flex: 1; }
.leiste-termin svg { color: var(--termin); }
.leiste-aufgabe { flex-shrink: 0; font-weight: 600; }
.leiste-aufgabe svg { color: var(--aufgabe); }
.leiste-aufgabe.allein { flex: 1; }
.leiste-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leiste .leise { color: var(--text-schwach); font-weight: 400; }
.leiste-pfeil { display: inline-flex; flex-shrink: 0; color: var(--text-schwach); }
.leiste-pfeil svg { width: 20px; height: 20px; fill: currentColor; }

/* Eingabezeile */

.eingabe {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 8px 8px calc(var(--sicher-unten) + 8px);
  background: var(--flaeche); border-top: 1px solid var(--linie);
  flex-shrink: 0;
}
.eingabe textarea {
  flex: 1; resize: none; max-height: 140px;
  padding: 11px 14px; border: 1px solid var(--linie); border-radius: 22px;
  background: var(--hintergrund); outline: none; font-size: 16px; line-height: 1.3;
}
.eingabe textarea:focus { border-color: var(--primaer); }

.rund {
  width: 44px; height: 44px; border: 0; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.rund svg { width: 24px; height: 24px; fill: currentColor; }
.rund-plus { background: transparent; color: var(--primaer); }
.rund-plus:active { background: var(--primaer-hell); }
.rund-senden { background: var(--primaer); color: #fff; }
.rund-senden:active { background: var(--primaer-dunkel); }
.rund-senden:disabled { background: var(--linie); color: #fff; }

/* ---------- Blätter (von unten) und Überlagerungen ---------- */

.schleier {
  position: fixed; inset: 0; background: rgba(15, 22, 35, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50; animation: einblenden 0.15s ease-out;
}
.blatt {
  width: 100%; max-width: 560px; max-height: 92%;
  background: var(--flaeche); border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(var(--sicher-unten) + 16px);
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
  animation: hochschieben 0.2s ease-out;
}
.blatt-griff { width: 40px; height: 4px; border-radius: 2px; background: var(--linie); margin: 4px auto 6px; flex-shrink: 0; }
.blatt-inhalt { display: flex; flex-direction: column; gap: 10px; }
.blatt h3 { margin: 4px 0 2px; font-size: 18px; }

/* Listen in einem Blatt: Termine und Aufgaben */
.liste-flach { box-shadow: none; border: 1px solid var(--linie); flex-shrink: 0; }
.liste-flach li { padding: 12px 14px; }
.liste-flach .listen-haupt { white-space: normal; }
.liste-flach .angabe { font-size: 13px; }
.liste li.vorbei { opacity: 0.6; }
.symbol-kasten { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.symbol-kasten svg { width: 20px; height: 20px; fill: currentColor; }
.kasten-termin { background: var(--termin-hell); color: var(--termin); }

.menue { list-style: none; margin: 0; padding: 0; }
.menue li { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-top: 1px solid var(--linie); cursor: pointer; }
.menue li:first-child { border-top: 0; }
.menue li:active { background: var(--primaer-hell); }
.menue .symbol { width: 40px; height: 40px; border-radius: 12px; background: var(--primaer-hell); color: var(--primaer); display: inline-flex; align-items: center; justify-content: center; }
.menue .symbol svg { width: 22px; height: 22px; fill: currentColor; }
.menue .symbol-termin { background: var(--termin-hell); color: var(--termin); }
.menue .symbol-aufgabe { background: var(--aufgabe-hell); color: var(--aufgabe); }

.vorschau { width: 100%; max-height: 45vh; object-fit: contain; border-radius: 12px; background: var(--hintergrund); }

.link-feld { display: flex; gap: 8px; align-items: center; }
.link-feld input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--hintergrund); font-size: 13px; }

.betrachter {
  position: fixed; inset: 0; background: #000; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  animation: einblenden 0.15s ease-out;
}
.betrachter img { max-width: 100%; max-height: 100%; object-fit: contain; }
.betrachter .schliessen { position: absolute; top: calc(var(--sicher-oben) + 8px); right: 8px; color: #fff; background: rgba(255, 255, 255, 0.15); }

/* ---------- Profilbilder ---------- */

.avatar { overflow: hidden; }
.avatar[data-mitglied] { border-radius: 50%; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar.mit-bild { background: var(--linie); }
/* Im Verlauf, links neben fremden Nachrichten */
.avatar-klein { width: 28px; height: 28px; margin: 2px 6px 0 0; font-size: 12px; align-self: flex-start; }
.avatar-platz { width: 28px; margin-right: 6px; flex-shrink: 0; }
.avatar-gross { width: 112px; height: 112px; font-size: 40px; }
.profil-vorschau { display: flex; justify-content: center; padding: 8px 0 4px; }
.zeilen-symbol { display: inline-flex; color: var(--text-schwach); flex-shrink: 0; }
.zeilen-symbol svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Gelöscht, bearbeitet, die drei Punkte ---------- */

.weg { display: flex; align-items: center; gap: 6px; font-size: 15px; font-style: italic; color: var(--text-schwach); }
.weg svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.nachricht.geloescht .blase { background: transparent; box-shadow: none; border: 1px dashed var(--linie); min-width: 0; padding-left: 10px; }
.mehr-knopf {
  position: absolute; top: 1px; right: 1px; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-schwach);
  display: inline-flex; align-items: center; justify-content: center;
}
.mehr-knopf svg { width: 20px; height: 20px; fill: currentColor; }
.mehr-knopf:active { background: rgba(0, 0, 0, 0.07); }
.mehr-knopf ~ .marke { padding-right: 30px; }
/* Am Handy öffnet langes Drücken die Aktionen – dabei soll kein Text markiert werden. */
@media (pointer: coarse) {
  .blase { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}

.knopf-gefahr { background: var(--fehler); color: #fff; }
.knopf-gefahr:active { background: #a53125; }
.knopf-gefahr-leise { background: transparent; color: var(--fehler); margin-top: 6px; }
.knopf-gefahr-leise:active { background: #fbe9e7; }
.knopf-klein { align-self: flex-start; width: auto; min-height: 40px; padding: 0 14px; font-size: 15px; }
.menue li.gefahr { color: var(--fehler); }
.menue li.gefahr .symbol { background: #fbe9e7; color: var(--fehler); }
.haken-zeile { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.haken-zeile input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--fehler); }

/* ---------- Kalender ---------- */

.kal-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kal-monat { margin: 0; text-align: center; flex: 1; }
.kal-blaettern { background: transparent; color: var(--primaer); }
.kal-blaettern:active { background: var(--primaer-hell); }
.kal-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; flex-shrink: 0; }
.kal-wochentage span { padding: 2px 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-schwach); }
.kal-tag {
  min-height: 44px; padding: 5px 0 4px; border: 0; border-radius: 12px; background: transparent; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.kal-tag:active { background: var(--primaer-hell); }
.kal-tag.fremd { color: #aab3bf; }
.kal-zahl { font-size: 15px; line-height: 20px; }
.kal-tag.heute .kal-zahl { color: var(--primaer); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.kal-tag.gewaehlt { background: var(--primaer); }
.kal-tag.gewaehlt .kal-zahl { color: #fff; font-weight: 700; }
.kal-punkte { display: flex; gap: 3px; height: 7px; }
.punkt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.punkt-termin { background: var(--termin); }
.punkt-aufgabe { background: var(--aufgabe); }
.kal-tag.gewaehlt .punkt { box-shadow: 0 0 0 1.5px #fff; }
.kal-legende { display: flex; align-items: center; gap: 14px; min-height: 28px; font-size: 13px; color: var(--text-schwach); flex-shrink: 0; }
.kal-legende span { display: inline-flex; align-items: center; gap: 5px; }
.kal-heute { margin-left: auto; padding: 4px 12px; border: 0; border-radius: 999px; background: var(--primaer-hell); color: var(--primaer); font-size: 13px; font-weight: 600; }

/* ---------- Projektleitung, Entfernen, Verlassen ---------- */

/* Zeile im Verlauf, die niemand geschrieben hat: beigetreten, gegangen, Leitung übergeben.
   Leiser als der Tagestrenner: ohne Schatten, in normaler Schrift. */
.ereignis {
  align-self: center; max-width: 88%; margin: 8px 0 4px; padding: 3px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.6); color: var(--text-schwach);
  font-size: 12.5px; text-align: center;
}
.rolle { color: var(--primaer); font-weight: 600; }
.person { display: flex; align-items: center; gap: 12px; }
.person h3 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knopf-dicht { margin-top: 0; }
/* ---------- Ungelesenes ---------- */

/* Startseite: rechts in der Zeile die Zeit des jüngsten Eintrags und, wenn es Neues gibt, die Anzahl */
.listen-rand { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; min-height: 40px; }
.listen-zeit { font-size: 12px; color: var(--text-schwach); }
.zaehler {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primaer); color: #fff;
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
/* Im Verlauf: Hier beginnt, was seit dem letzten Besuch dazugekommen ist */
.neu-marke {
  align-self: stretch; display: flex; align-items: center; gap: 10px; margin: 12px 4px 6px;
  color: var(--primaer); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
}
.neu-marke::before, .neu-marke::after { content: ''; flex: 1; height: 1px; background: var(--primaer); opacity: 0.35; }

/* ---------- Reaktionen ---------- */

/* Unter einer Nachricht: wer wie reagiert hat. Antippen setzt dieselbe Reaktion oder nimmt die eigene zurück. */
.reaktionen { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reaktion {
  display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 8px;
  border: 1px solid var(--linie); border-radius: 999px; background: rgba(255, 255, 255, 0.75); color: var(--text);
  font-size: 15px; line-height: 1;
}
.reaktion span { font-size: 12px; font-weight: 600; color: var(--text-schwach); }
.reaktion.eigene { border-color: var(--primaer); background: var(--primaer-hell); }
.reaktion:disabled { opacity: 1; }
/* Im Blatt zu einer Nachricht: die Auswahl */
.reaktion-wahl { display: flex; justify-content: space-between; gap: 6px; padding: 2px 0 4px; }
.reaktion-knopf { flex: 1; min-height: 48px; padding: 0; border: 0; border-radius: 14px; background: var(--primaer-hell); font-size: 24px; line-height: 1; }
.reaktion-knopf:active, .reaktion-knopf.an { background: #c5e1e8; }
.reaktion-knopf.an { box-shadow: inset 0 0 0 2px var(--primaer); }
.mittig { text-align: center; }

/* Abgeschlossenes Projekt: Wo sonst das Eingabefeld ist, steht, warum es keines gibt */
.abschluss {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px calc(12px + var(--sicher-unten));
  background: var(--flaeche); border-top: 1px solid var(--linie); color: var(--text-schwach); font-size: 14px;
}
.abschluss[hidden], .eingabe[hidden] { display: none; }
.abschluss svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
/* Die Kennung des Projekts, ganz unten im Blatt: klein, antippen kopiert sie */
.kennung {
  align-self: center; padding: 6px 8px; border: 0; background: transparent; color: var(--text-schwach);
  font-size: 11.5px; text-align: center; word-break: break-all; user-select: all;
}

/* ---------- Private Notizen ---------- */

/* Im eigenen Verlauf: über die ganze Breite, gestrichelt umrandet, in eigener Farbe. Keine Sprechblase,
   keine Seite (links/rechts) – damit sie niemand für eine Nachricht ans Team hält. */
.notiz { align-self: stretch; margin: 8px 2px 4px; }
.notiz-karte {
  padding: 8px 12px 6px; border: 1.5px dashed var(--notiz-linie); border-radius: 12px;
  background: var(--notiz-hell); cursor: pointer; outline: none;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.notiz-karte:active, .notiz-karte:focus-visible { border-color: var(--notiz); }
.notiz-kopf {
  display: flex; align-items: center; gap: 6px; margin-bottom: 3px; color: var(--notiz);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.notiz-kopf svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.notiz-nur { margin-left: auto; font-weight: 600; text-transform: none; letter-spacing: 0; }

/* Die Blätter für Notizen: eigene Farbe – man sieht, dass dies nicht das Eingabefeld des Chats ist */
.blatt-notiz { background: var(--notiz-hell); box-shadow: inset 0 5px 0 var(--notiz); }
.notiz-titel { display: flex; align-items: center; gap: 10px; color: var(--notiz); }
.notiz-titel svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
.notiz-erklaerung { color: var(--notiz); font-size: 14px; }
.blatt-notiz .feld textarea { min-height: 132px; resize: vertical; border-color: var(--notiz-linie); line-height: 1.4; }
.blatt-notiz .feld textarea:focus { border-color: var(--notiz); box-shadow: 0 0 0 3px rgba(107, 70, 168, 0.18); }
.knopf-notiz { background: var(--notiz); color: #fff; }
.knopf-notiz:active { background: #563690; }
.knopf-notiz-hell { background: var(--notiz-hell); color: var(--notiz); }
.knopf-notiz-hell:active { background: #e2d8f3; }
.haken-notiz input { accent-color: var(--notiz); }
.haken-notiz input:disabled + span { opacity: 0.55; }
/* Wo private Notizen mit hinausgehen: beim Protokoll */
.notiz-warnung { padding: 8px 12px; border-radius: 10px; background: var(--notiz-hell); color: var(--notiz); font-size: 13.5px; font-weight: 600; }
.notiz-liste li { align-items: flex-start; }
.notiz-wann { display: block; font-size: 12px; color: var(--text-schwach); }
.notiz-auszug {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.menue .symbol-notiz { background: var(--notiz-hell); color: var(--notiz); }
.menue-neben { display: block; font-size: 13px; color: var(--text-schwach); }

/* ---------- Hinweis (unten eingeblendet) ---------- */

.hinweis {
  position: fixed; left: 50%; bottom: calc(var(--sicher-unten) + 80px); transform: translateX(-50%);
  background: #2a3342; color: #fff; padding: 10px 16px; border-radius: 12px;
  font-size: 14px; max-width: calc(100% - 32px); z-index: 70; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: einblenden 0.15s ease-out;
}
.hinweis.fehler { background: var(--fehler); }

@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes hochschieben { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* Größere Bildschirme: App mittig wie ein Handy-Fenster, aber breiter */
@media (min-width: 720px) {
  body { background: #dde3ea; }
  .app { max-width: 720px; margin: 0 auto; box-shadow: 0 0 40px rgba(0, 0, 0, 0.12); background: var(--hintergrund); }
  .blase { max-width: 70%; }
}
