/* Bauakte – ruhiges, warmes Erscheinungsbild; hell/dunkel über prefers-color-scheme */
:root {
  --grund: #f5f3ef;
  --flaeche: #ffffff;
  --flaeche-2: #faf8f5;
  --linie: #e4dfd7;
  --text: #1f2326;
  --gedaempft: #6a6f74;
  --akzent: #a8502b;         /* Terrakotta */
  --akzent-hell: #f6e6dd;
  --akzent-text: #ffffff;
  --petrol: #2d5f63;
  --petrol-hell: #e2eeee;
  --rot: #b3261e; --rot-hell: #fbe7e5;
  --gelb: #8a6100; --gelb-hell: #fdf1d6;
  --gruen: #2e6b3a; --gruen-hell: #e3f1e5;
  --blau: #2b5aa0; --blau-hell: #e5ecf8;
  --grau: #5d6166; --grau-hell: #eceae6;
  --radius: 12px;
  --radius-klein: 8px;
  --schatten: 0 1px 2px rgba(31, 35, 38, .06), 0 4px 16px rgba(31, 35, 38, .05);
  --nav-breite: 248px;
  --kopf-hoehe: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #16181a; --flaeche: #1f2225; --flaeche-2: #25292c; --linie: #33383c; --text: #eceae6;
    --gedaempft: #a2a7ab; --akzent: #e08a62; --akzent-hell: #3a2820; --akzent-text: #1a1411;
    --petrol: #7fb8bb; --petrol-hell: #1f3335;
    --rot: #f08a80; --rot-hell: #3b1f1d; --gelb: #e9c46a; --gelb-hell: #3a3120; --gruen: #86c995; --gruen-hell: #1f3323;
    --blau: #8fb2ea; --blau-hell: #1f2a3b; --grau: #b5b9bd; --grau-hell: #2c3033;
    --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--petrol); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .25rem; display: flex; align-items: center; gap: .5rem; }
h2 { font-size: 1.05rem; margin: 0 0 .9rem; display: flex; align-items: center; gap: .45rem; }
h2 small { font-weight: 400; color: var(--gedaempft); font-size: .85rem; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; color: var(--gedaempft); }
p { margin: 0 0 .8rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.gross { width: 32px; height: 32px; }
.i.riesig { width: 48px; height: 48px; stroke-width: 1.3; }
.gedaempft { color: var(--gedaempft); }
.klein, small { font-size: .85rem; }
.leer { color: var(--gedaempft); }
.mehrzeilig { white-space: pre-line; }
.nur-mobil { display: none !important; }

/* ---------- Gerüst */
.kopf {
  position: fixed; inset: 0 0 auto 0; height: var(--kopf-hoehe); z-index: 20;
  display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
  background: var(--flaeche); border-bottom: 1px solid var(--linie);
}
.marke { display: flex; align-items: center; gap: .6rem; font-weight: 650; color: var(--text); font-size: 1.05rem; }
.marke:hover { text-decoration: none; }
.marke-zeichen { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--akzent); color: var(--akzent-text); }
.marke.gross { font-size: 1.25rem; margin-bottom: 1rem; }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.wer { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.wer small { color: var(--gedaempft); }
.seitenleiste {
  position: fixed; top: var(--kopf-hoehe); bottom: 0; left: 0; width: var(--nav-breite); overflow-y: auto;
  padding: 1rem .75rem 2rem; background: var(--flaeche); border-right: 1px solid var(--linie); z-index: 15;
}
.seitenleiste a {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: var(--radius-klein);
  color: var(--text); font-weight: 500;
}
.seitenleiste a:hover { background: var(--flaeche-2); text-decoration: none; }
.seitenleiste a.aktiv { background: var(--akzent-hell); color: var(--akzent); }
.nav-titel { margin: 1.1rem .75rem .35rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gedaempft); }
.inhalt { margin-left: var(--nav-breite); padding: calc(var(--kopf-hoehe) + 1.75rem) 2rem 3rem; max-width: 1320px; }
body.ohne-nav .inhalt { margin: 0 auto; padding: 3rem 1rem; }

/* ---------- Bausteine */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.25rem 1.35rem; box-shadow: var(--schatten); margin-bottom: 1.25rem; min-width: 0; }
.karte.schmal { max-width: 440px; }
.karte.mitte { margin: 6vh auto 0; }
.karte.hervorgehoben, .hervorgehoben { border-color: var(--akzent); background: linear-gradient(0deg, var(--flaeche), var(--flaeche)) padding-box; box-shadow: 0 0 0 3px var(--akzent-hell); }
.hervorgehoben.innen { padding: 1rem; border: 1px solid var(--akzent); border-radius: var(--radius-klein); margin-bottom: 1rem; }
.raster { display: grid; gap: 1.25rem; }
.raster.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.detail { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.raster > .karte { margin-bottom: 0; }
.raster + .karte, .raster + .raster, .karte + .raster { margin-top: 1.25rem; }
.seitenkopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.seitenkopf p { margin: 0; }
.pfad { font-size: .85rem; color: var(--gedaempft); margin-bottom: .5rem; }
.pfad span { margin: 0 .3rem; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.kopfzeile h2 { margin: 0; }
.hinweis { background: var(--petrol-hell); color: var(--petrol); border-radius: var(--radius-klein); padding: .7rem 1rem; margin-bottom: 1.25rem; font-weight: 500; }
.fehler { background: var(--rot-hell); color: var(--rot); border-radius: var(--radius-klein); padding: .7rem 1rem; margin-bottom: 1rem; }
.leer-hinweis { color: var(--gedaempft); text-align: center; padding: 1.2rem .5rem; margin: 0; }
.hinweis-leise { color: var(--gedaempft); margin-top: 1.25rem; }
.ausblick { display: flex; gap: .8rem; align-items: flex-start; margin-top: 1.25rem; padding: .9rem 1rem; border-radius: var(--radius-klein); background: var(--petrol-hell); color: var(--text); font-size: .9rem; }
.ausblick .i { color: var(--petrol); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .5rem 1rem;
  border-radius: var(--radius-klein); border: 1px solid var(--linie); background: var(--flaeche); color: var(--text);
  font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.knopf:hover { text-decoration: none; background: var(--flaeche-2); }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.knopf.haupt:hover { filter: brightness(1.06); }
.knopf.leise { background: transparent; }
.knopf.gefahr { color: var(--rot); }
.knopf.klein { min-height: 32px; padding: .3rem .7rem; font-size: .85rem; }
.knopf.breit { width: 100%; }
.knopf:disabled { opacity: .6; cursor: wait; }
.knopf-symbol { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-klein); border: 0; background: transparent; color: var(--text); cursor: pointer; }
.knopf-symbol:hover { background: var(--flaeche-2); }
.knopfreihe { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.knopfreihe form, form.inline { display: inline; }

.badge { display: inline-block; padding: .08rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--grau-hell); color: var(--grau); white-space: nowrap; }
.badge.rot { background: var(--rot-hell); color: var(--rot); }
.badge.gelb { background: var(--gelb-hell); color: var(--gelb); }
.badge.gruen { background: var(--gruen-hell); color: var(--gruen); }
.badge.blau { background: var(--blau-hell); color: var(--blau); }
.rot-text { color: var(--rot); } .gruen-text { color: var(--gruen); }

/* ---------- Formulare */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=date], select, textarea {
  width: 100%; min-height: 40px; padding: .5rem .7rem; border: 1px solid var(--linie); border-radius: var(--radius-klein);
  background: var(--flaeche); color: var(--text); font: inherit;
}
textarea { resize: vertical; }
select[multiple] { min-height: 7rem; }
input:focus, select:focus, textarea:focus, .knopf:focus-visible, a:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.feld { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.feld > span { font-size: .85rem; font-weight: 600; color: var(--gedaempft); }
.feld small { color: var(--gedaempft); }
.stapel { display: flex; flex-direction: column; gap: .9rem; }
.felder-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem 1.1rem; margin-bottom: 1.1rem; }
.felder-raster .breit, .feld.breit { grid-column: 1 / -1; }
.formular { max-width: 960px; }
.schalter { display: flex; align-items: center; gap: .5rem; min-height: 40px; }
.zeile { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; margin-top: .8rem; }
.zeile > input, .zeile > .feld { flex: 1 1 220px; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border: 1px solid var(--linie); border-radius: 999px; font-size: .88rem; cursor: pointer; }
.filterleiste { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filterleiste input[type=search] { flex: 1 1 240px; width: auto; }
.filterleiste select { width: auto; flex: 0 1 200px; }
details > summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .45rem; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; color: var(--gedaempft); font-size: .8rem; }
details[open] > summary::before { content: "▾"; }
details[open] > summary { margin-bottom: .8rem; }
.freigabe { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.verwalten { margin-top: .6rem; }
.kopierfeld { display: flex; gap: .5rem; margin: .6rem 0; }
.kopierfeld input { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; }
pre.code, pre.textauszug { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: .8rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
pre.textauszug { max-height: 420px; overflow-y: auto; word-break: normal; }

/* ---------- Hochladen */
.ablage { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; margin-top: 1rem; padding: 1rem; border: 2px dashed var(--linie); border-radius: var(--radius); background: var(--flaeche-2); color: var(--gedaempft); }
.ablage strong { color: var(--text); }
.ablage.ziehen { border-color: var(--akzent); background: var(--akzent-hell); }
.ablage-knoepfe { display: flex; gap: .5rem; flex-wrap: wrap; }
.ablage > div:nth-child(2) { flex: 1 1 180px; }
.ablage-liste { flex-basis: 100%; font-size: .85rem; color: var(--text); }
.ablage-liste:empty { display: none; }

/* ---------- Tabellen */
.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 1.25rem; }
.karte .tabelle-rahmen { box-shadow: none; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gedaempft); font-weight: 600; background: var(--flaeche-2); white-space: nowrap; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tfoot th { background: var(--flaeche-2); color: var(--text); font-size: .9rem; text-transform: none; letter-spacing: 0; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle td.mini { width: 56px; }
.tabelle td.mini img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
.tabelle tbody tr:hover { background: var(--flaeche-2); }
.balken-spalte { width: 26%; min-width: 160px; }
.balken { position: relative; height: 18px; }
.balken span { position: absolute; left: 0; border-radius: 4px; }
.balken .budget { top: 0; height: 18px; background: var(--grau-hell); border: 1px dashed var(--grau); }
.balken .prognose { top: 3px; height: 12px; background: var(--petrol); opacity: .55; }
.balken .bezahlt { top: 6px; height: 6px; background: var(--akzent); }
.legende { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--gedaempft); margin-bottom: .75rem; align-items: center; }
.punkt { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: -.6rem; vertical-align: -1px; }
.punkt.budget { background: var(--grau-hell); border: 1px dashed var(--grau); }
.punkt.prognose { background: var(--petrol); opacity: .55; }
.punkt.bezahlt { background: var(--akzent); }

/* ---------- Übersicht */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kennzahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: .15rem; }
.kennzahl small { color: var(--gedaempft); font-weight: 600; }
.kennzahl strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kennzahl em { font-style: normal; font-size: .8rem; color: var(--gedaempft); }
.kennzahl.warnung strong, .kennzahl.warnung em { color: var(--rot); }
.terminliste { list-style: none; margin: 0; padding: 0; }
.terminliste li { display: grid; grid-template-columns: 6.5rem 1fr; column-gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--linie); }
.terminliste li:last-child { border-bottom: 0; }
.terminliste .datum { grid-row: span 2; font-variant-numeric: tabular-nums; font-weight: 600; }
.terminliste small { color: var(--gedaempft); }
.terminliste li.ueberfaellig .datum, .terminliste li.ueberfaellig strong { color: var(--rot); }
.bereichskacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.bereichskacheln a { display: flex; align-items: center; gap: .55rem; padding: .7rem .8rem; border: 1px solid var(--linie); border-radius: var(--radius-klein); color: var(--text); background: var(--flaeche-2); }
.bereichskacheln a:hover { border-color: var(--akzent); text-decoration: none; }
.bereichskacheln span { flex: 1; font-weight: 500; font-size: .9rem; }
.bereichskacheln strong { color: var(--gedaempft); font-variant-numeric: tabular-nums; }
ul.einfach { list-style: none; padding: 0; margin: 0; }
ul.einfach li { padding: .45rem 0; border-bottom: 1px solid var(--linie); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
ul.einfach li:last-child { border-bottom: 0; }
.aktivitaet { list-style: none; padding: 0; margin: 0 0 .6rem; font-size: .88rem; }
.aktivitaet li { padding: .35rem 0; border-bottom: 1px solid var(--linie); }

/* ---------- Karten, Galerie, Dateien */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.eintragskarte { display: flex; flex-direction: column; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--schatten); }
.eintragskarte:hover { text-decoration: none; border-color: var(--akzent); }
.eintragskarte .bild { aspect-ratio: 4 / 3; background: var(--flaeche-2); display: grid; place-items: center; color: var(--gedaempft); }
.eintragskarte .bild img { width: 100%; height: 100%; object-fit: cover; }
.eintragskarte .text { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.eintragskarte small { display: flex; flex-wrap: wrap; gap: .3rem .7rem; color: var(--gedaempft); }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.kachel-bild { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-klein); overflow: hidden; background: var(--flaeche-2); }
.kachel-bild img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.kachel-bild:hover img { transform: scale(1.04); }
.kachel-bild span { position: absolute; inset: auto 0 0 0; padding: .9rem .5rem .35rem; font-size: .75rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dateiliste { list-style: none; padding: 0; margin: 0 0 .5rem; }
.dateiliste li { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--linie); }
.dateiliste li:last-child { border-bottom: 0; }
.dateiliste li > a:first-child { flex: 1; display: flex; gap: .7rem; align-items: center; padding: .55rem 0; color: var(--text); min-width: 0; }
.dateiliste li > a:first-child span { display: flex; flex-direction: column; min-width: 0; }
.dateiliste small { color: var(--gedaempft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dateiliste .i { color: var(--petrol); }
dl.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem 1.25rem; margin: 0; }
dl.felder .breit { grid-column: 1 / -1; }
dl.felder dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gedaempft); font-weight: 600; margin-bottom: .15rem; }
dl.felder dd { margin: 0; }
.vorschau { text-align: center; }
.vorschau img { max-width: 100%; max-height: 75vh; border-radius: var(--radius-klein); }
.vorschau iframe { width: 100%; height: 78vh; border: 0; border-radius: var(--radius-klein); background: #fff; }
.vorschau video { max-width: 100%; max-height: 75vh; }
.personen { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.person { display: flex; gap: .9rem; margin: 0; }
.person > div:last-child { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--petrol-hell); color: var(--petrol); font-weight: 700; font-size: 1.1rem; }

/* ---------- Chat */
.chat-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.25rem; height: calc(100vh - var(--kopf-hoehe) - 4.5rem); }
.chat-liste { display: flex; flex-direction: column; gap: .75rem; min-height: 0; }
.chat-liste ul { list-style: none; padding: 0; margin: 0; overflow-y: auto; }
.chat-liste li a { display: flex; flex-direction: column; padding: .5rem .7rem; border-radius: var(--radius-klein); color: var(--text); font-size: .9rem; }
.chat-liste li a small { color: var(--gedaempft); font-size: .75rem; }
.chat-liste li a.aktiv, .chat-liste li a:hover { background: var(--flaeche); text-decoration: none; }
.chat { display: flex; flex-direction: column; min-height: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); }
.chat-verlauf { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: .9rem; }
.chat-willkommen { margin: auto; text-align: center; max-width: 560px; color: var(--text); }
.chat-willkommen .i { color: var(--akzent); }
.chat-willkommen h1 { justify-content: center; margin-top: .5rem; }
.vorschlaege { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.25rem; }
.vorschlaege button { text-align: left; padding: .7rem .9rem; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: var(--flaeche-2); color: var(--text); font: inherit; cursor: pointer; }
.vorschlaege button:hover { border-color: var(--akzent); }
.nachricht { display: flex; }
.nachricht.user { justify-content: flex-end; }
.blase { max-width: min(760px, 88%); padding: .7rem 1rem; border-radius: 14px; background: var(--flaeche-2); border: 1px solid var(--linie); overflow-wrap: anywhere; white-space: pre-wrap; }
.blase.gerendert { white-space: normal; }
.nachricht.user .blase { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); border-bottom-right-radius: 4px; }
.nachricht.assistant .blase { border-bottom-left-radius: 4px; }
.nachricht.fehler .blase { background: var(--rot-hell); color: var(--rot); border-color: var(--rot-hell); }
.blase p { margin: 0 0 .6rem; } .blase p:last-child { margin: 0; }
.blase ul, .blase ol { margin: .2rem 0 .6rem; padding-left: 1.3rem; }
.blase h4 { margin: .6rem 0 .3rem; font-size: .95rem; }
.blase code { background: var(--grau-hell); padding: 0 .25rem; border-radius: 4px; }
.denkt { display: inline-flex; gap: 4px; }
.denkt i { width: 7px; height: 7px; border-radius: 50%; background: var(--gedaempft); animation: puls 1.2s infinite ease-in-out; }
.denkt i:nth-child(2) { animation-delay: .2s; } .denkt i:nth-child(3) { animation-delay: .4s; }
@keyframes puls { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-eingabe { display: flex; gap: .6rem; padding: .9rem; border-top: 1px solid var(--linie); align-items: flex-end; }
.chat-eingabe textarea { min-height: 44px; max-height: 200px; resize: none; }
.chat-eingabe .knopf { min-height: 44px; }
.chat-fuss { padding: 0 1rem .8rem; margin: 0; }

/* ---------- Schmale Bildschirme */
@media (max-width: 980px) {
  .raster.zwei, .raster.detail { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-liste { display: none; }
  .chat { height: calc(100vh - var(--kopf-hoehe) - 3rem); }
}
@media (max-width: 760px) {
  .nur-mobil { display: inline-flex !important; }
  .kopf { padding: 0 .6rem; gap: .4rem; }
  .wer { display: none; }
  .seitenleiste { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--schatten); }
  .seitenleiste.offen { transform: none; }
  .inhalt { margin-left: 0; padding: calc(var(--kopf-hoehe) + 1rem) 1rem 2.5rem; }
  h1 { font-size: 1.35rem; }
  .karte { padding: 1rem; }
  .filterleiste select { flex: 1 1 45%; }
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .kennzahl { padding: .75rem .85rem; }
  .kennzahl strong { font-size: 1.05rem; }
  .terminliste li { grid-template-columns: 5.6rem 1fr; }
}
