/* Plattform — Gestaltung („Papier und Tinte“, 1.17).
 *
 * Grundsätze:
 *   Lesbar vor allem anderen. Die Schrift ist Fira Sans — aus der Familie der
 *   FF Meta, die Erik Spiekermann für die Deutsche Bundespost entworfen hat:
 *   gebaut, um auch klein und flüchtig gelesen zu werden. Buchstaben, die sich
 *   nicht verwechseln lassen (I l 1), eine Null ohne Schrägstrich (der sähe aus
 *   wie „Ø“ für Durchschnitt). Sie liegt auf dem eigenen Server (static/schrift,
 *   unverändert, Lizenz OFL in OFL.txt) — nichts kommt von fremden Quellen, die
 *   Content-Security-Policy bleibt bei 'self'. Fehlt ein Zeichen (Emoji, andere
 *   Schriften), springt die Systemschrift ein. Schnitte: 400, 500, 600, 700,
 *   kursiv 400 — andere Stärken gibt es nicht, also nur diese verwenden.
 *
 *   Grundgröße 17 Pixel, Nebentext nie unter 14. Großzügiger Zeilenabstand.
 *   Überschriften in normaler Schreibweise, nie in Versalien.
 *
 *   Papier und Tinte: Der Hintergrund ist der Tisch, Karten und Antworten sind
 *   Blätter darauf. EINE Farbe — das Tintenblau aus dem Zeichen der Plattform —
 *   für das, was du selbst sagst und tust: eigene Beiträge, Hauptknöpfe, Links.
 *   Braun-Gelb warnt, Rot stoppt, Grün heißt bestätigt. Wo alles bunt ist, fällt
 *   die Warnung nicht mehr auf.
 *
 *   Formen nach Rolle: Bedienelemente 10 px Rundung, Blätter 14, Sprechblasen
 *   und die Eingabe 20, runde Knöpfe nur für Symbole. Schatten nur, wo etwas über
 *   der Seite schwebt. Jedes Bedienelement mindestens 40 px hoch (Finger).
 *
 *   Alle Farben doppelt — hell und dunkel; der Dunkelmodus folgt dem System.
 *   Bewegung nur als Antwort auf eine Handlung; prefers-reduced-motion gilt.
 */

@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("schrift/fira-sans-4.203-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  /* Flächen: der Tisch, das Blatt, ein Fach darin */
  --grund:        #f1f3f5;
  --flaeche:      #ffffff;
  --flaeche-2:    #e9edf1;
  --rand:         #d8dee4;
  --rand-stark:   #b3bec8;
  --rand-feld:    #7b8794;

  /* Schrift */
  --text:         #1d2733;
  --text-leise:   #465462;
  --text-still:   #56636f;

  /* Tinte und Bedeutung */
  --akzent:       #2f5d8a;
  --akzent-stark: #264d73;
  --akzent-hell:  #e4ecf5;
  --akzent-text:  #ffffff;
  --link:         #2a5785;
  --warn:         #8a4b08;
  --warn-flaeche: #fbf0dc;
  --stopp:        #a32638;
  --stopp-flaeche:#fbe7e9;
  --gut:          #2d6a3e;
  --gut-flaeche:  #e3f1e6;

  /* Form */
  --r-marke:  6px;
  --r-feld:   10px;
  --r-klein:  10px;
  --r-mittel: 14px;
  --r-gross:  20px;
  --r-blase:  20px;
  --r-voll:   999px;

  --schatten-1: 0 1px 2px rgba(20, 32, 46, .06);
  --schatten-2: 0 1px 2px rgba(20, 32, 46, .06), 0 8px 24px -12px rgba(20, 32, 46, .22);
  --schatten-3: 0 2px 6px rgba(20, 32, 46, .08), 0 18px 40px -18px rgba(20, 32, 46, .30);
  --fokus-hof:  rgba(47, 93, 138, .28);

  /* Schrift und Maße */
  --schrift: "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Noto Sans", Arial, sans-serif;
  --schrift-zahl: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --gr-klein: .875rem;      /* 14 px — kleiner wird nichts, was man lesen muss */
  --gr-text:  1.0625rem;    /* 17 px */
  --gr-h3:    1.1875rem;    /* 19 px */
  --gr-h2:    1.375rem;     /* 22 px */
  --gr-h1:    1.75rem;      /* 28 px */

  --breite: 62rem;
  --spalte: 46rem;          /* Lesespalte des Gesprächs: um 70 Zeichen je Zeile */
  --seite: 1.25rem;         /* Seitenrand links und rechts */
  --oben: 2rem;             /* Abstand unter der Kopfzeile */
  --kopf-hoehe: 3.5rem;
  --ziel: 2.75rem;          /* 44 px: Mindestmaß für einen Finger */
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund:        #12171c;
    --flaeche:      #1a2027;
    --flaeche-2:    #232b34;
    --rand:         #2e3843;
    --rand-stark:   #465363;
    --rand-feld:    #778593;

    --text:         #e7ebef;
    --text-leise:   #b0bac4;
    --text-still:   #97a3ae;

    --akzent:       #3a6c9e;
    --akzent-stark: #4479ad;
    --akzent-hell:  #1e2d3d;
    --akzent-text:  #ffffff;
    --link:         #94bbe4;
    --warn:         #f0b862;
    --warn-flaeche: #33270f;
    --stopp:        #f4919c;
    --stopp-flaeche:#3b1a20;
    --gut:          #82cf98;
    --gut-flaeche:  #16301f;

    --schatten-1: 0 1px 2px rgba(0, 0, 0, .4);
    --schatten-2: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px -12px rgba(0, 0, 0, .7);
    --schatten-3: 0 2px 6px rgba(0, 0, 0, .5), 0 18px 40px -18px rgba(0, 0, 0, .8);
    --fokus-hof:  rgba(148, 187, 228, .30);
  }
}

/* 2.1 — Labor ([M] 11.11.2026): eine deutlich andere Farbe, damit man immer sieht, wo man ist. Statt Tintenblau ein
 * Flaschengrün („Laborglas“); alles andere bleibt Papier und Tinte. Beide Modi, Kontrast wie beim Blau geprüft. */
body.labor {
  --akzent:       #1f6b57;
  --akzent-stark: #185746;
  --akzent-hell:  #e1f1ec;
  --link:         #1d6552;
  --fokus-hof:    rgba(31, 107, 87, .28);
}
@media (prefers-color-scheme: dark) {
  body.labor {
    --akzent:       #2c7d68;
    --akzent-stark: #2a7964;
    --akzent-hell:  #17322b;
    --link:         #86d3bd;
    --fokus-hof:    rgba(134, 211, 189, .30);
  }
}
.kind-labor { --art: #1f6b57; }
@media (prefers-color-scheme: dark) { .kind-labor { --art: #86d3bd; } }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: var(--gr-text);
  line-height: 1.6;
  color: var(--text);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6rem; color: var(--text); text-wrap: balance; }
h1 { font-size: var(--gr-h1); font-weight: 700; letter-spacing: -.012em; }
h2 { font-size: var(--gr-h2); font-weight: 700; letter-spacing: -.006em; }
h3 { font-size: var(--gr-h3); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
main > h2, .col > h2 { margin-top: 2rem; }
p { margin: 0 0 .85rem; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
small { font-size: .85em; }
strong, b { font-weight: 700; }
code { font-family: var(--schrift-zahl); font-size: .88em; background: var(--flaeche-2);
       padding: .05rem .35rem; border-radius: 5px; overflow-wrap: anywhere; }
.muted { color: var(--text-leise); }
.small { font-size: var(--gr-klein); line-height: 1.5; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zeit { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--schrift-zahl); font-size: .8125rem; overflow-wrap: anywhere; }

main {
  max-width: var(--breite);
  margin: 0 auto;
  padding: var(--oben) var(--seite) 3rem;
}
/* Im Gespräch schließt die Eingabeleiste die Seite ab — kein Leerraum darunter. */
main:has(> .chat) { padding-bottom: 0; }
@media (max-width: 620px) {
  :root { --seite: 1rem; --oben: 1.25rem; }
}

/* Sichtbarer Fokus für alle, die mit der Tastatur arbeiten. */
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; }

/* --- Symbole -------------------------------------------------------------- */

.icon { width: 1.2rem; height: 1.2rem; flex: none; display: block; }
svg.icon use { transform-box: fill-box; }
.icon > use { pointer-events: none; }

/* --- Kopfzeile ------------------------------------------------------------ */

.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--kopf-hoehe);
  padding: .3rem var(--seite);
  padding-top: max(.3rem, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--flaeche) 92%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rand);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.0625rem;
         color: var(--text); text-decoration: none; white-space: nowrap; }
.brand .marke { width: 1.75rem; height: 1.75rem; flex: none; display: block; }
.brand small { color: var(--text-still); font-weight: 500; font-size: var(--gr-klein); }
.brand:hover { text-decoration: none; color: var(--link); }      /* --akzent wäre im Dunkeln zu schwach */
.top .ctx { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem;
            overflow: hidden; white-space: nowrap; }
.top nav { display: flex; align-items: center; gap: .25rem; }
.top nav a, .top nav .link {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 2.5rem; padding: .4rem .7rem;
  font-size: .9375rem; font-weight: 500; color: var(--text-leise); text-decoration: none;
  background: none; border: 0; border-radius: var(--r-feld); cursor: pointer; font-family: inherit;
}
.top nav a:hover, .top nav .link:hover { color: var(--text); background: var(--flaeche-2); }
@media (max-width: 620px) {
  .brand small, .brand span { display: none; }
  .nav-text { display: none; }          /* auf dem Handy sprechen die Symbole */
  .top { gap: .5rem; }
  .top nav { gap: 0; }
  .top nav a, .top nav .link { min-width: var(--ziel); min-height: var(--ziel); justify-content: center; padding: .4rem; }
}
form.inline { display: inline; margin: 0; }

/* Ein Knopf, der wie ein Link aussieht — für leise Handlungen im Text. */
.link {
  display: inline; background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: .2em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); cursor: pointer;
}
.link:hover { text-decoration-color: currentColor; }

/* Der Bereich, in dem man gerade ist — mit seiner Farbe als Punkt. */
/* 2.0: inline-block statt inline-flex — nur so kürzt der Browser einen langen Namen mit „…“, statt ihn
   abzuschneiden (auf 360 px mit einem Symbol mehr in der Kopfzeile wurde aus „Werkstatt“ sonst „Werks“). */
.pill {
  display: inline-block; flex: none; vertical-align: middle;
  padding: .25rem .7rem; border-radius: var(--r-voll);
  font-size: var(--gr-klein); font-weight: 600; line-height: 1.4;
  background: var(--flaeche-2); color: var(--text); text-decoration: none;
  border: 1px solid var(--rand);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill:hover { text-decoration: none; border-color: var(--rand-feld); }
.pill::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .45rem;
                vertical-align: .02em; border-radius: 50%; background: var(--art, var(--text-still)); }
.kind-household { --art: var(--gut); }
.kind-personal  { --art: var(--akzent); }
.kind-workshop  { --art: var(--warn); }
.crumb { color: var(--text-leise); font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
a.crumb:hover { color: var(--text); text-decoration: underline; }

/* --- Hinweisbänder -------------------------------------------------------- */

/* Ein Band ist ein Textblock (mit Links mittendrin) — das Zeichen davor steht absolut,
   sonst zerfiele der Satz an jedem Link in Spalten. */
.banner {
  position: relative; display: block;
  margin: .75rem 0 0;
  padding: .75rem 1rem .75rem .9rem; border-radius: var(--r-feld);
  font-size: .9375rem; line-height: 1.5;
  border: 1px solid transparent; border-left-width: 4px;
}
.banner.warn, .banner.error, .banner.stop { padding-left: 2.85rem; }
body > .banner { width: calc(100% - 2 * var(--seite)); max-width: calc(var(--breite) - 2 * var(--seite));
                 margin: 1rem auto 0; }
.banner + .banner { margin-top: .5rem; }
.banner.note  { background: var(--flaeche); color: var(--text); border-color: var(--rand); border-left-color: var(--rand-feld); }
.banner.warn  { background: var(--warn-flaeche); color: var(--warn);
                border-color: color-mix(in srgb, var(--warn) 25%, transparent); border-left-color: var(--warn); }
.banner.error,
.banner.stop  { background: var(--stopp-flaeche); color: var(--stopp);
                border-color: color-mix(in srgb, var(--stopp) 25%, transparent); border-left-color: var(--stopp); }
.banner.warn::before, .banner.error::before, .banner.stop::before {
  position: absolute; left: .8rem; top: .82rem;
  display: flex; align-items: center; justify-content: center;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  font-size: .875rem; font-weight: 700; line-height: 1;
}
.banner.warn::before  { content: "!"; background: var(--warn); color: var(--warn-flaeche); }
.banner.error::before,
.banner.stop::before  { content: "×"; background: var(--stopp); color: var(--stopp-flaeche); font-size: 1rem; }
.banner a { color: inherit; }

/* --- Flächen und Raster --------------------------------------------------- */

.card {
  background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: var(--r-mittel); padding: 1.25rem 1.4rem;
}
.card + .card { margin-top: 1rem; }
.card > h3:first-child, .card > h2:first-child { margin-top: 0; }
.card.narrow { max-width: 25rem; margin: 3rem auto; padding: 2rem 1.75rem; box-shadow: var(--schatten-2); }
@media (max-width: 600px) {
  .card { padding: 1.05rem 1.1rem; }
  .card.narrow { margin: 1.5rem auto; padding: 1.5rem 1.25rem; }
}
.big { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.big small { font-size: 1rem; font-weight: 500; color: var(--text-leise); letter-spacing: 0; }

.row { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.75rem; align-items: start; }
.col { min-width: 0; }
.col.side { position: sticky; top: calc(var(--kopf-hoehe) + 1rem); }
@media (max-width: 860px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .col.side { position: static; }
}

/* Startseite: je Bereich ein Blatt mit seiner Farbe am Rand. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.tile {
  position: relative; display: block; overflow: hidden;
  padding: 1.2rem 1.35rem 1.3rem 1.6rem; border-radius: var(--r-mittel);
  background: var(--flaeche); border: 1px solid var(--rand);
  color: var(--text); text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--art, var(--akzent)); }
.tile:hover { text-decoration: none; border-color: var(--rand-feld); }
.tile-kind { font-size: var(--gr-klein); font-weight: 600; color: var(--text-leise); margin-bottom: .2rem; }
.tile-name { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }

/* Listen von Räumen und Gesprächen: Zeilen auf einem Blatt. */
ul.plain, ul.convs, ul.rooms { list-style: none; padding: 0; margin: .75rem 0 0; }
ul.convs, ul.rooms { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--r-mittel); overflow: hidden; }
ul.convs li, ul.rooms li {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .85rem 1.1rem; min-height: 3.25rem;
}
ul.convs li + li, ul.rooms li + li { border-top: 1px solid var(--rand); }
ul.convs li:hover, ul.rooms li:hover { background: color-mix(in srgb, var(--akzent-hell) 55%, var(--flaeche)); }
ul.convs a, ul.rooms a { color: var(--text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
ul.convs a:hover, ul.rooms a:hover { color: var(--link); text-decoration: underline; }
ul.convs li > a:first-child, ul.rooms li > a:first-child { flex: 1 1 14rem; min-width: 0; }
ul.plain li { padding: .25rem 0; font-size: .9375rem; }
.rooms .depth-1 { padding-left: 2rem; }
.rooms .depth-2 { padding-left: 3.5rem; }
.room-kind { font-size: var(--gr-klein); font-weight: 500; color: var(--text-still); margin-right: .45rem; }

table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
/* Breite Tabellen scrollen in sich, nicht die ganze Seite (Handy, schmale Seitenspalte). */
.card:has(table) { overflow-x: auto; }
main > table { display: block; overflow-x: auto; }
th { text-align: left; font-weight: 600; color: var(--text-leise); font-size: var(--gr-klein);
     padding: .5rem .6rem; border-bottom: 1px solid var(--rand-stark); }
td { padding: .6rem .6rem; border-top: 1px solid var(--rand); vertical-align: top; }
tr:first-child > td { border-top: 0; }
tr.failed td { color: var(--stopp); }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: var(--r-marke);
       font-size: .8125rem; font-weight: 600; line-height: 1.45; vertical-align: .05em;
       background: var(--flaeche-2); color: var(--text-leise); white-space: nowrap; }
.tag.warn { background: var(--warn-flaeche); color: var(--warn); }
.tag.ok { background: var(--akzent); color: var(--akzent-text); }

/* Modelle außerhalb der EU (1.6.1): Hinweis unter der Eingabe, Zustimmung in
   den Einstellungen. Farben aus dem geprüften Warnpaar, damit der Kontrast
   stimmt. */
.modell-hinweis { max-width: var(--spalte); margin: .5rem auto 0; padding: .55rem .8rem; border-radius: var(--r-feld);
                  background: var(--warn-flaeche); color: var(--warn); line-height: 1.45; }
.modell-hinweis[hidden] { display: none; }
.weltmodelle li { margin: .4rem 0; }
.bereiche { display: grid; gap: .75rem; margin-top: .75rem; }
.bereich-zustimmung { border-top: 1px solid var(--rand); padding-top: .9rem; }
.bereich-kopf { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.bereich-name { font-weight: 700; }

/* --- Bedienelemente ------------------------------------------------------- */

button, input, select, textarea { font-family: inherit; font-size: inherit; color: var(--text); }

/* Eingabefelder: weiß, mit sichtbarem Rand (3:1) — ein Feld muss als Feld zu erkennen sein. */
:where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=hidden], [type=submit], [type=button]), textarea) {
  font-size: var(--gr-text); line-height: 1.45; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--rand-feld); border-radius: var(--r-feld);
  padding: .55rem .75rem; min-height: var(--ziel); max-width: 100%;
}
:where(textarea) { display: block; width: 100%; line-height: 1.5; resize: vertical; }
::placeholder { color: var(--text-still); opacity: 1; }

button.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--ziel); padding: .55rem 1.2rem; margin: 0;
  background: var(--akzent); color: var(--akzent-text);
  border: 1px solid var(--akzent); border-radius: var(--r-feld);
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease, opacity .15s ease;
}
button.primary:hover:not(:disabled) { background: var(--akzent-stark); border-color: var(--akzent-stark); }
button.primary:active:not(:disabled) { transform: translateY(1px); }
button.primary:disabled { opacity: .5; cursor: not-allowed; }

/* Der Senden-Knopf: auf dem Rechner mit Tastenkürzel, auf dem Handy mit Pfeil.
   Während gesendet wird, weicht beides einem Kreisel. */
button.primary kbd {
  font: inherit; font-size: .75em; font-weight: 600; opacity: .85;
  background: rgba(255, 255, 255, .18); border-radius: 5px; padding: .05em .4em;
  line-height: 1.5;
}
button.primary .icon { display: none; }
button.primary.sendet { opacity: .9; }
button.primary.sendet .icon,
button.primary.sendet kbd { display: none; }
button.primary.sendet::before {
  content: ""; width: .95rem; height: .95rem; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: drehen .7s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: var(--ziel); padding: .45rem .95rem; margin: 0;
  background: var(--flaeche); color: var(--text);
  border: 1px solid var(--rand-feld); border-radius: var(--r-feld);
  font-size: .9375rem; font-weight: 600; line-height: 1.2; text-decoration: none;
  cursor: pointer; max-width: 100%; text-align: center; text-wrap: balance;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
/* Kein nowrap: Eine lange Beschriftung („Belegsuche: 153 Mails durchsuchen …“) bricht auf dem Handy um,
   statt die Seite zu verbreitern — sonst zoomt das Handy die ganze Seite kleiner. */
.knopf:hover:not(:disabled) { background: var(--flaeche-2); color: var(--text); text-decoration: none; }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopf.klein { min-height: 2.125rem; padding: .3rem .7rem; font-size: var(--gr-klein); }
.knopf.leise { background: transparent; color: var(--text-leise); border-color: transparent; }
.knopf.leise:hover:not(:disabled) { background: var(--flaeche-2); color: var(--text); }
.knopf.hervor { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.knopf.hervor:hover:not(:disabled) { background: var(--akzent-stark); border-color: var(--akzent-stark); color: var(--akzent-text); }
.knopf .zahl { display: inline-block; min-width: 1.4rem; text-align: center; background: var(--akzent);
               color: var(--akzent-text); border-radius: var(--r-voll); padding: 0 .45rem;
               font-size: .8125rem; font-weight: 700; line-height: 1.45; }

select {
  min-height: var(--ziel); max-width: 100%;
  background-color: var(--flaeche); border: 1px solid var(--rand-feld);
  border-radius: var(--r-feld); padding: .4rem 2.1rem .4rem .75rem;
  font-size: .9375rem; color: var(--text); cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1.05rem center, right .75rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}
select:hover { border-color: var(--text-leise); }
select:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; margin-bottom: 1rem; font-size: .9375rem; font-weight: 500; color: var(--text); }
label :where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=hidden]), textarea) {
  display: block; width: 100%; margin-top: .35rem; font-weight: 400;
}
label select { display: block; margin-top: .35rem; }
label.check { display: inline-flex; align-items: center; gap: .5rem; margin: 0;
              font-size: .9375rem; font-weight: 400; cursor: pointer; user-select: none; }
label.check input, input[type=radio] { accent-color: var(--akzent); width: 1.15rem; height: 1.15rem; margin: 0; flex: none; }
/* Auswahl untereinander (Radio-Listen): Der Text läuft neben dem Knopf um, nicht unter ihm. */
fieldset > label.check { display: flex; align-items: flex-start; }
fieldset > label.check input { margin-top: .2em; }
input[type=checkbox] { accent-color: var(--akzent); }
fieldset { border: 1px solid var(--rand); border-radius: var(--r-feld); padding: .75rem 1rem 1rem; margin: 0 0 1rem;
           display: grid; gap: .45rem; }
legend { font-weight: 600; padding: 0 .35rem; }
summary { cursor: pointer; }

/* --- Gespräch ------------------------------------------------------------- */

/* So hoch wie der Platz unter der Kopfzeile: Ein leeres Gespräch scrollt nicht, die Eingabe steht unten. */
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - var(--kopf-hoehe) - var(--oben)); }
.chat .small-h { font-size: 1.25rem; font-weight: 700; margin: 0;
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat > .kopfzeile { width: 100%; max-width: var(--spalte); margin: 0 auto 1.1rem; }
@media (min-width: 601px) {
  .chat > .kopfzeile { flex-wrap: nowrap; }
  .chat > .kopfzeile .small-h { flex: 1 1 auto; min-width: 0; }
  .chat > .kopfzeile .rechts { flex: none; }
}

/* Ein Gespräch liest sich schlecht über die volle Breite eines Bildschirms —
   der Blick springt dann zwischen den Rändern hin und her. */
.messages {
  flex: 1; display: flex; flex-direction: column; gap: 1.15rem;
  width: 100%; max-width: var(--spalte); margin: 0 auto; padding-bottom: 1.5rem;
}

.msg { display: flex; flex-direction: column; max-width: 85%; min-width: 0; }
.msg-body {
  padding: .7rem 1.05rem; border-radius: var(--r-blase);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Was du schreibst: Tinte. */
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.user .msg-body {
  background: var(--akzent); color: var(--akzent-text);
  border-bottom-right-radius: 6px;
}
/* Was die KI antwortet: ein Blatt in voller Breite der Spalte — Briefe liest man auf Papier. */
.msg.assistant { align-self: stretch; max-width: 100%; }
.msg.assistant .msg-body {
  background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: var(--r-mittel); padding: 1rem 1.25rem; line-height: 1.65;
}
.msg.assistant.wartet { align-self: flex-start; }
.msg-meta {
  display: flex; align-items: center; gap: .3rem .9rem; flex-wrap: wrap;
  font-size: var(--gr-klein); color: var(--text-still); margin: .45rem .25rem 0;
}
.msg-meta .zeile { display: inline; margin: 0; }
.msg.neu { animation: einblenden .22s ease both; }
@keyframes einblenden { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 600px) {
  .msg { max-width: 90%; }
  .msg.assistant .msg-body { padding: .85rem 1rem; }
}

button.vorlesen {
  display: inline-flex; align-items: center; gap: .3rem; min-height: 2rem;
  background: none; border: 0; padding: .2rem .5rem .2rem .35rem; margin-left: -.35rem; border-radius: var(--r-feld);
  font-size: var(--gr-klein); font-weight: 500; color: var(--text-leise); cursor: pointer; font-family: inherit;
}
button.vorlesen .icon { width: 1rem; height: 1rem; }
button.vorlesen:hover:not(:disabled) { background: var(--flaeche-2); color: var(--text); }
button.vorlesen.spielt { color: var(--link); background: var(--akzent-hell); }

/* Schreibpunkte: das Zeichen, dass gerade gearbeitet wird. */
.tippt { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem 0; vertical-align: middle; }
.tippt span {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--text-still); animation: huepfen 1.25s infinite ease-in-out;
}
.tippt span:nth-child(2) { animation-delay: .16s; }
.tippt span:nth-child(3) { animation-delay: .32s; }
@keyframes huepfen {
  0%, 62%, 100% { transform: translateY(0); opacity: .38; }
  31%           { transform: translateY(-4px); opacity: 1; }
}

/* --- Eingabeleiste -------------------------------------------------------- */

.composer {
  position: sticky; bottom: 0;
  margin: 0 calc(-1 * var(--seite)); padding: .85rem var(--seite);
  padding-bottom: max(.85rem, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--grund) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--rand);
}
/* Eingabefeld und Bedienleiste sitzen in EINEM Rahmen. Das ist der Unterschied
   zwischen "Formular" und "Gerät": es wirkt wie ein Ding, nicht wie fünf. */
.composer .eingabe {
  max-width: var(--spalte); margin: 0 auto;
  background: var(--flaeche); border: 1px solid var(--rand-feld);
  border-radius: var(--r-gross); box-shadow: var(--schatten-2);
  padding: .45rem .55rem .55rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.composer .eingabe:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--fokus-hof), var(--schatten-2); }
.composer textarea {
  width: 100%; resize: none; border: 0; background: none; outline: none; border-radius: 0;
  padding: .5rem .6rem .35rem; line-height: 1.5; min-height: 2.75rem;
  max-height: 40vh; field-sizing: content;
}
.composer textarea:disabled { opacity: .6; }

/* Auf dem Rechner eine Zeile: Reicht der Platz nicht (etwa mit „Gründlichkeit“), werden die
   Auswahlfelder schmaler, nicht die Knöpfe. Auf dem Handy darf die Zeile umbrechen. */
.composer-row { display: flex; align-items: center; gap: .45rem; flex-wrap: nowrap; }
.composer-row > * { flex: none; }
.composer-row select { flex: 0 1 auto; min-width: 6.5rem; max-width: 14rem; min-height: 2.5rem; }
.composer-row #modellwahl { min-width: 8rem; }
/* Steht die Gründlichkeit da, weicht das Tastenkürzel am Knopf (es steht weiter im Hinweis des Knopfes). */
.composer-row:has(.stufe:not([hidden])) button.primary kbd { display: none; }
.composer-row button.primary { margin-left: auto; }
.composer-row .auto-vorlesen { color: var(--text-leise); white-space: nowrap; }
.stufe { display: contents; }

/* Fußzeile unter der Eingabe: eine Zeile, kein Stapel. Unter dem Eingabefeld
   ist der knappste Platz der ganzen Seite, besonders auf dem Handy. */
.fuss {
  display: flex; align-items: flex-end; justify-content: space-between; gap: .35rem 1rem; flex-wrap: wrap;
  max-width: var(--spalte); margin: .55rem auto 0;
}
.fuss .fuss-rechts { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto;
               gap: .05rem; text-align: right; white-space: nowrap; }
.fuss .deckel-text { white-space: nowrap; }
.fuss .verbrauch { color: var(--text-still); font-size: var(--gr-klein);
                   font-variant-numeric: tabular-nums; }
.hinweis { max-width: var(--spalte); margin: .55rem auto 0; font-size: var(--gr-klein); color: var(--text-still); }
.hinweis summary { cursor: pointer; }

@media (max-width: 560px) {
  .composer-row { gap: .35rem; flex-wrap: wrap; }
  .composer-row #modellwahl { min-width: 0; }
  .composer-row select { min-width: 0; max-width: 7.5rem; font-size: var(--gr-klein); padding-right: 1.6rem;
                         background-position: right .8rem center, right .5rem center; }
  .composer-row .auto-vorlesen { display: none; }   /* Freihändig deckt das ab */
  .freihaendig .label { display: none; }
  /* Nur der Senden-Knopf im Eingabefeld wird zum Pfeil. Andere Hauptknöpfe
     ("Passwort ändern", "Speichern") behalten ihre Beschriftung — sonst
     stehen da leere Pillen. Genau das war in 1.6.0 kurz der Fall. */
  .composer-row button.primary .label,
  .composer-row button.primary kbd { display: none; }
  .composer-row button.primary .icon { display: block; }
  .composer-row button.primary { min-width: var(--ziel); padding: .5rem .8rem; border-radius: var(--r-voll); }
  .fuss { gap: .5rem; }
  .fuss .deckel { max-width: none; }
}
@media (max-width: 400px) {
  .composer-row { gap: .3rem; }
  .composer-row select { max-width: 6.25rem; }
}

.mic, .freihaendig {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 2.5rem; height: 2.5rem; padding: 0 .6rem; margin: 0;
  border-radius: var(--r-voll); border: 1px solid var(--rand-feld);
  background: var(--flaeche); color: var(--text-leise);
  font-size: .9375rem; font-weight: 600; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.mic:hover:not(:disabled), .freihaendig:hover:not(:disabled) { border-color: var(--text-leise); color: var(--text); background: var(--flaeche-2); }
.mic:disabled, .freihaendig:disabled { opacity: .4; cursor: not-allowed; }

.mic.recording, .freihaendig.an {
  background: var(--stopp); border-color: var(--stopp); color: var(--stopp-flaeche); font-weight: 600;
}
.mic.recording { animation: pochen 1.6s infinite; }
.freihaendig.an .icon { animation: kreisen 2.4s linear infinite; }
@keyframes kreisen { to { transform: rotate(360deg); } }
@keyframes pochen { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.mic-status { max-width: var(--spalte); margin: .5rem auto 0; font-size: var(--gr-klein); color: var(--text-leise); min-height: 1.2rem; }
.mic-status.live { color: var(--link); }
.mic-status.warn { color: var(--warn); }
.mic-status:empty { display: none; }
.mic-hinweis { margin-top: .4rem; line-height: 1.45; }

.zeitmessung { font-size: var(--gr-klein); color: var(--text-still); font-variant-numeric: tabular-nums; }
.zeitmessung:empty { display: none; }

/* Gesprächsdeckel: ein dünner Balken, der erst bei Bedarf auffällt. */
.deckel-bahn { height: 4px; border-radius: var(--r-voll); background: var(--rand); overflow: hidden; }
.deckel-stand {
  height: 100%; width: 0; border-radius: var(--r-voll);
  background: var(--akzent); transition: width .4s ease, background-color .4s ease;
}
.deckel.warnung .deckel-stand { background: var(--warn); }
.deckel.ende    .deckel-stand { background: var(--stopp); }
.deckel-text { font-size: var(--gr-klein); color: var(--text-still); margin-top: .25rem;
               font-variant-numeric: tabular-nums; }
.deckel.warnung .deckel-text { color: var(--warn); }
.deckel.ende    .deckel-text { color: var(--stopp); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* --- Kleinteile ------------------------------------------------------------ */

.anmeldung h1 { margin-bottom: .3rem; }
.anmeldung p { margin-bottom: 1.4rem; }
.anmeldung .marke-gross { width: 3rem; height: 3rem; display: block; margin-bottom: 1.1rem; }
button.primary.breit { width: 100%; margin-top: .35rem; }
.tile-sub { margin-top: .35rem; line-height: 1.45; }
.raum-start { margin: 1rem 0 1.25rem; }

dl.werte { margin: .5rem 0 .75rem; display: grid; grid-template-columns: minmax(6.5rem, 1fr) minmax(0, 1.5fr); gap: .5rem .9rem; align-items: baseline; }
dl.werte dt { font-size: .9375rem; color: var(--text-leise); }
dl.werte dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-size: .9375rem; }
dl.werte dd .muted { font-size: var(--gr-klein); }


/* --- Einstellungen --------------------------------------------------------- */
/* Untereinander statt nebeneinander: eine Spalte zum Lesen, wie ein Formular auf Papier. */
.einstellungen { max-width: 48rem; margin: 0 auto; }
.einstellungen > .card + .card { margin-top: 1.1rem; }
.einstellungen .stimmen { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }

.vorrat { position: absolute; }
.nachsatz { margin: .7rem 0 0; }
.stimmen { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; margin: .5rem 0 1.1rem; }
.stimme-wahl {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .6rem;
  align-items: center; padding: .6rem .75rem; margin: 0;
  border: 1px solid var(--rand); border-radius: var(--r-feld); background: var(--flaeche);
  cursor: pointer; font-size: .9375rem; color: var(--text);
}
.stimme-wahl:hover { border-color: var(--rand-feld); }
.stimme-wahl:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); box-shadow: inset 0 0 0 1px var(--akzent); }
.stimme-wahl input { grid-row: 1 / span 2; margin: 0; accent-color: var(--akzent); }
.stimme-name { font-weight: 600; }
.stimme-art { grid-column: 2; }
.tempo { display: block; margin: .6rem 0 1.1rem; }
.tempo-wert { float: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.tempo input[type=range] { width: 100%; margin: .5rem 0 .15rem; accent-color: var(--akzent); }
.tempo-skala { display: flex; justify-content: space-between; font-weight: 400; }
.stimm-knoepfe { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

/* --- Anhänge und Ablage (1.7) --------------------------------------------- */
.kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.kopfzeile > h1, .kopfzeile > h2 { margin-bottom: 0; }
.leise-link { color: var(--text-leise); text-decoration: none; margin-left: .5rem; }
.leise-link:hover { color: var(--stopp); text-decoration: underline; }
.anhaenge { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; align-items: center; }
.anhang { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: var(--r-feld);
          background: var(--flaeche); border: 1px solid var(--rand); color: var(--text); text-decoration: none;
          font-size: .9375rem; max-width: 100%; overflow-wrap: anywhere; }
.msg.user .anhang { background: var(--flaeche); }
.anhang:hover { border-color: var(--rand-feld); text-decoration: none; }
.anhang .icon { width: 1rem; height: 1rem; flex: none; }
.anhang.bild { padding: 0; background: none; border: 0; border-radius: var(--r-feld); overflow: hidden; }
.anhang.bild img { display: block; max-width: min(100%, 320px); max-height: 240px; border-radius: var(--r-feld); }
.ablegen { display: inline-flex; align-items: center; gap: .3rem; }
.ablegen select { min-height: 2.125rem; font-size: var(--gr-klein); padding: .2rem 1.6rem .2rem .55rem; max-width: 9rem;
                  background-position: right .8rem center, right .5rem center; }
.anhang-liste { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .35rem .25rem 0; }
.anhang-liste[hidden] { display: none; }
.anhang-chip { font-size: var(--gr-klein); padding: .2rem .6rem; border-radius: var(--r-marke); background: var(--flaeche-2); color: var(--text); }
.anhang-knopf { cursor: pointer; }
.ordnerliste { list-style: none; padding: 0; margin: 0 0 .9rem; }
.ordnerliste li { display: flex; align-items: center; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--rand); }
.ordnerliste a { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--text); font-weight: 600; }
.ordnerliste a:hover { color: var(--link); text-decoration: underline; }
.ordnerliste .icon { width: 1.2rem; height: 1.2rem; }
.zeile { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; margin: .6rem 0 1rem; }
.zeile input[name=name] { flex: 1 1 12rem; min-width: 0; }
.dateitabelle td { vertical-align: middle; }
.dateitabelle .aktionen { white-space: nowrap; text-align: right; }
.dateitabelle a { display: inline-flex; align-items: center; gap: .4rem; }
.dateitabelle .icon { width: 1.05rem; height: 1.05rem; }
.card.schmal { max-width: 40rem; margin: 1rem auto; }
.knoepfe { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 1.1rem; }
button.primary.gefahr { background: var(--stopp-flaeche); color: var(--stopp); border: 1px solid var(--stopp); }
button.primary.gefahr:hover:not(:disabled) { background: var(--stopp); border-color: var(--stopp); color: var(--stopp-flaeche); }
.erinnerung-text { font-style: italic; }

.anhang-knopf input[type=file], .datei-wahl input[type=file] { display: none; }
.datei-wahl { cursor: pointer; }

/* --- Dokumente hinaus (1.8) ----------------------------------------------- */
.msg-meta .export { display: inline-flex; gap: .15rem .3rem; align-items: center; flex-wrap: wrap; }
.msg-meta .export a, .msg-meta .export button.link {
  display: inline-flex; align-items: center; min-height: 2rem; padding: .15rem .45rem; border-radius: var(--r-feld);
  color: var(--text-leise); text-decoration: none; font-size: var(--gr-klein); font-weight: 500;
}
.msg-meta .export a:hover, .msg-meta .export button.link:hover { color: var(--text); background: var(--flaeche-2); text-decoration: none; }
.briefkopf { margin-top: 1.25rem; }

/* --- Erinnerung (1.9) ------------------------------------------------------ */
.erinnerung-liste { list-style: none; padding: 0; margin: 0; }
.erinnerung-liste li { padding: .8rem 0; border-bottom: 1px solid var(--rand); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: start; }
.erinnerung-liste .text { font-size: var(--gr-text); }
.erinnerung-liste .meta { grid-column: 1 / -1; }
.erinnerung-liste .warum { font-style: italic; }
.erinnerung-liste .zitat { display: block; margin-top: .3rem; padding-left: .7rem; border-left: 3px solid var(--rand-stark); }
.kopfzeile .inline { display: inline; }
.kopfzeile .rechts { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }

/* --- Zum Ende (1.9.2) -------------------------------------------------------- */
#ende { height: 1px; }
.zum-ende {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 9rem;
  z-index: 40; display: flex; align-items: center; gap: .4rem;
  min-height: 2.5rem; padding: .45rem 1rem; border-radius: var(--r-voll); border: 1px solid var(--rand-feld);
  background: var(--flaeche); color: var(--text); font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer;
  box-shadow: var(--schatten-3);
}
.zum-ende[hidden] { display: none; }
.zum-ende:hover { border-color: var(--akzent); color: var(--text); }

/* --- Kalender (1.11) ---------------------------------------------------------- */
.kal-kopf { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.kal-kopf h1 { margin-bottom: .25rem; }
.kal-nav { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
table.monat { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; margin: .9rem 0 1.1rem;
              background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--r-mittel); overflow: hidden; }
table.monat th { font-size: var(--gr-klein); font-weight: 600; color: var(--text-leise); text-align: left; padding: .45rem .5rem;
                 border-bottom: 1px solid var(--rand); background: var(--flaeche); }
table.monat td {
  vertical-align: top; height: 6.5rem; padding: .3rem .35rem; border: 0;
  border-top: 1px solid var(--rand); border-left: 1px solid var(--rand);
  background: var(--flaeche); overflow: hidden;
}
table.monat tr:nth-child(2) td { border-top: 0; }
table.monat td:first-child { border-left: 0; }
table.monat td.fremd { background: var(--grund); }
table.monat td.fremd .tagzahl { color: var(--text-leise); }
table.monat td.heute { box-shadow: inset 0 0 0 2px var(--akzent); }
.tagzahl { display: inline-block; font-size: var(--gr-klein); font-weight: 600; color: var(--text); text-decoration: none;
  min-width: 1.7rem; padding: 0 .35rem; border-radius: var(--r-voll); text-align: center; }
td.heute .tagzahl { background: var(--akzent); color: var(--akzent-text); }
.tagzahl:hover { text-decoration: underline; }
.eintrag {
  display: block; margin-top: .2rem; padding: .1rem .35rem; border-radius: var(--r-marke);
  font-size: var(--gr-klein); line-height: 1.35; color: var(--text); background: var(--flaeche-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
  border-left: 3px solid var(--akzent);
}
.eintrag.ganztags { border-left-color: var(--rand-feld); }
.eintrag:hover { text-decoration: underline; }
.eintrag .uhr, .agenda-eintrag .uhr { font-variant-numeric: tabular-nums; color: var(--text-leise); }
.agenda { display: none; }
.agenda.immer { display: block; }
.agenda-tag { padding: .5rem 0 .7rem; border-bottom: 1px solid var(--rand); }
.agenda-tag.heute h3 { border-left: 3px solid var(--akzent); padding-left: .5rem; }
.agenda-tag h3 { font-size: 1rem; margin: .25rem 0 .35rem; }
.agenda-tag h3 a { color: var(--text); text-decoration: none; }
.agenda-eintrag {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem; padding: .5rem .15rem;
  color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rand);
}
.agenda-eintrag.heute { border-left: 3px solid var(--akzent); padding-left: .45rem; }
.agenda-eintrag.heute .uhr { color: var(--text); font-weight: 600; }
.agenda-eintrag:hover span:last-child { text-decoration: underline; }
@media (max-width: 760px) {
  table.monat { display: none; }
  .agenda { display: block; }
}

/* Ablegen: gilt für den Chat, die Ablage und das Einlesen */
.ablegen-hinweis {
  display: none; position: fixed; inset: 1rem; z-index: 90; align-items: center; justify-content: center;
  border: 2px dashed var(--akzent); border-radius: var(--r-gross); background: var(--flaeche);
  color: var(--text); font-weight: 600; font-size: 1.15rem; pointer-events: none; opacity: .96;
}
.ablegen-hinweis.sichtbar { display: flex; }
.einlesen-form textarea { width: 100%; margin: .5rem 0; }
.einlesen-form .datei-wahl { margin-top: .25rem; }
.abo-adresse { width: 100%; font-size: var(--gr-klein); padding: .4rem .55rem; border: 1px solid var(--rand-feld);
  border-radius: var(--r-feld); background: var(--grund); color: var(--text); min-height: 0; }

/* Aufgaben */
.aufgabenliste, .aufgaben-kurz { list-style: none; padding: 0; margin: .3rem 0 .9rem; }
.aufgabenliste li, .aufgaben-kurz li {
  display: flex; align-items: flex-start; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--rand);
}
.aufgabe-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.aufgabe-notiz { display: block; }
.aufgabenliste li.fertig .aufgabe-text { text-decoration: line-through; color: var(--text-leise); }
li.ueberfaellig .aufgabe-text, li.ueberfaellig > span { color: var(--stopp); }
.haken {
  flex: none; width: 1.35rem; height: 1.35rem; margin-top: .1rem; padding: 0; cursor: pointer;
  border: 2px solid var(--rand-feld); border-radius: 6px; background: var(--flaeche);
}
.haken:hover { border-color: var(--akzent); }
.haken.an { background: var(--akzent); border-color: var(--akzent); }
details.erledigt summary { cursor: pointer; color: var(--text-leise); margin: .6rem 0; }

/* Termin-Formular */
.felder-zeile { display: flex; gap: .75rem; flex-wrap: wrap; }
.felder-zeile > label { flex: 1 1 8rem; }
.terminform select { display: block; width: 100%; margin-top: .35rem; }
.terminform textarea, .terminform input[type=date], .terminform input[type=time] { display: block; width: 100%; }
.loeschen-zeile { margin-top: 1.1rem; }

/* Vorschau des Einlesens */
.einlesung { max-width: 58rem; }
.vorschlag { padding: .75rem .85rem; margin: .5rem 0; border: 1px solid var(--rand); border-radius: var(--r-mittel);
  background: var(--flaeche); }
.vorschlag.unsicher { border-color: var(--warn); border-left-width: 4px; }
.vorschlag .check { margin-bottom: .4rem; }
.vorschlag-felder { display: flex; flex-wrap: wrap; gap: .45rem; }
.vorschlag-felder input, .vorschlag-felder select { font-size: .9375rem; min-height: 2.25rem; padding: .3rem .55rem;
  border: 1px solid var(--rand-feld); border-radius: var(--r-feld); background-color: var(--flaeche); color: var(--text); }
.vorschlag-felder select { padding-right: 2rem; }
.vorschlag-felder input.breit { flex: 1 1 16rem; }
.vorschlag-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .4rem; align-items: center; }

/* Vorschlag unter einer Chat-Antwort */
.kal-vorschlag { width: 100%; max-width: var(--spalte); margin: .6rem auto 0; padding: .8rem 1rem; border: 1px solid var(--rand);
  border-left: 4px solid var(--akzent); border-radius: var(--r-mittel); background: var(--flaeche); font-size: .9375rem; }
.msg .kal-vorschlag { max-width: none; }
.kal-vorschlag ul { margin: .3rem 0 .55rem; padding-left: 1.2rem; }
.kal-vorschlag .zeile { gap: .45rem; margin-bottom: .2rem; }

.in-meinen { margin-top: 1rem; gap: .45rem; flex-wrap: wrap; align-items: center; }
.kal-vorschlag .in-meinen { margin-top: .45rem; }

.kal-chat textarea { width: 100%; margin: .3rem 0 .55rem; }
.kal-chat .zeile { justify-content: space-between; }
.kal-vorschlag.ersetzt { opacity: .6; }

/* --- Gesprächsdeckel anheben (1.13) ------------------------------------------ */
.deckel-anheben { margin-left: .5rem; white-space: nowrap; }
.deckel-anheben[hidden] { display: none; }

/* --- Unterlagen (1.13) ----------------------------------------------------------- */
#unterlagen:empty { display: none; }
.unterlagen { max-width: var(--spalte); margin: .75rem auto; padding: .6rem .9rem;
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--r-mittel); font-size: .9375rem; }
.unterlagen summary { cursor: pointer; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; min-height: 2rem; }
.unterlagen summary .icon { width: 1.05rem; height: 1.05rem; flex: none; }
.unterlagen ul { list-style: none; margin: .55rem 0 .35rem; padding: 0; }
/* minmax(0, …): Sonst richtet sich die Spalte nach dem längsten Auswahltext und läuft am Handy über. */
.unterlagen li { padding: .6rem 0; border-top: 1px solid var(--rand);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.unterlagen li > div { overflow-wrap: anywhere; }
.unterlagen .name { font-weight: 600; margin-right: .5rem; }
.unterlagen form.unterlage-modus { display: flex; gap: .45rem; align-items: center; min-width: 0; }
.unterlagen select { flex: 1 1 auto; min-width: 0; width: 100%; max-width: 26rem; text-overflow: ellipsis; }
.unterlagen form .knopf { flex: none; }
.unterlagen p { margin: .35rem 0 0; }

/* --- Meldungen über der Eingabe (1.13.1) ---------------------------------------- */
.chat > .banner { width: 100%; max-width: var(--spalte); margin-left: auto; margin-right: auto; }
.chat > .banner.laufend { margin-top: .5rem; }

/* --- Belegsuche (1.14) ---------------------------------------------------------- */
.belege { max-width: 52rem; margin: 0 auto; }
.belege-felder { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 .9rem; }
@media (max-width: 640px) { .belege-felder { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .belege-felder label:first-child { grid-column: 1 / -1; } }
.belege-suche .zeile { margin-bottom: 0; }
.belege-leiste { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin: 1.25rem 0 .45rem;
  position: sticky; top: var(--kopf-hoehe, 3.5rem); z-index: 20; padding: .5rem .1rem;
  background: var(--grund); border-bottom: 1px solid var(--rand); }
.belege-ausgabe { margin-left: auto; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.belege-liste { list-style: none; margin: 0; padding: 0; }
.belege-liste > li { padding: .9rem 0; border-bottom: 1px solid var(--rand); min-width: 0; }
.beleg-kopf { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; color: var(--text); font-size: .9375rem; }
.beleg-wann { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.beleg-von { overflow-wrap: anywhere; }
.beleg-betreff { font-weight: 600; margin: .15rem 0 .1rem; overflow-wrap: anywhere; }
.beleg-ausschnitt { margin: .4rem 0; font-size: .9375rem; overflow-wrap: anywhere; }
.belege mark { background: var(--warn-flaeche); color: var(--text); padding: 0 .1em; border-radius: 3px;
  box-shadow: inset 0 -2px 0 var(--warn); }
.beleg-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .9375rem; line-height: 1.55; margin: .55rem 0 0;
  padding: .8rem .9rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--r-feld); }
.belege-link { margin: .55rem 0 .25rem; }
.tagesdeckel { display: flex; align-items: end; gap: .6rem; flex-wrap: wrap; margin: .35rem 0 .7rem; }
.tagesdeckel label { margin: 0; }

/* --- Akte (1.15) ---------------------------------------------------------------- */
.akte { max-width: 52rem; margin: 0 auto; }
.akte section.card { margin: 1.1rem 0; }
.akte h2 { display: flex; align-items: center; gap: .6rem; }
.akte h3 { margin-top: 1.5rem; }
.akte h4 { font-size: .9375rem; font-weight: 600; color: var(--text-leise); margin: 1rem 0 .35rem; }
/* Die Schritte sind eine Reihenfolge — deshalb Nummern. */
.schritt { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; flex: none;
  border-radius: 50%; background: var(--akzent); color: var(--akzent-text); font-size: .9375rem; font-weight: 700; }
.akten-liste { list-style: none; margin: 0 0 1rem; padding: 0; }
.akten-liste li { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; padding: .7rem 0;
  border-bottom: 1px solid var(--rand); }
.akten-liste a { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); font-weight: 600; text-decoration: none;
  overflow-wrap: anywhere; }
.akten-liste a:hover { color: var(--link); text-decoration: underline; }
.akten-liste .icon { width: 1.2rem; height: 1.2rem; flex: none; align-self: center; }
.akte-dateien td { overflow-wrap: anywhere; padding: .45rem .35rem .45rem 0; }
.akte-dateien a { overflow-wrap: anywhere; }
.akte-form textarea, .akte textarea { display: block; width: 100%; margin: .35rem 0 .7rem; }
.akte-form fieldset { border: 0; padding: 0; margin: 0 0 .7rem; display: grid; gap: .4rem; }
.akte-form select, .akte .zeile select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.akte .zeile label { margin: 0; }
.akte label.schmal { display: inline-flex; align-items: center; gap: .5rem; }
.akte label.schmal input { width: 6.5rem; margin: 0; }
.vorformatiert { white-space: pre-wrap; overflow-wrap: anywhere; }
.akte-uebersicht { margin: .8rem 0; }
.akte-uebersicht summary { cursor: pointer; font-weight: 600; }
.akte-uebersicht .vorformatiert { margin-top: .55rem; font-size: .9375rem; }
.akte-loeschen { margin: 1.5rem 0 .5rem; }
.akte-loeschen summary { cursor: pointer; }
.hochladen-stand { list-style: none; margin: 0 0 .7rem; padding: 0; }
.hochladen-stand li { padding: .2rem 0; color: var(--text-leise); overflow-wrap: anywhere; }
.hochladen-stand li.fehler { color: var(--stopp); }
.hochladen-stand li.gut { color: var(--text); }
.akte-fragen { list-style: none; margin: 0; padding: 0; }
.akte-fragen > li { padding: 1.1rem 0; border-bottom: 1px solid var(--rand); min-width: 0; }
.frage-kopf { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; color: var(--text); }
.frage-nr { font-weight: 700; }
.frage-text { font-weight: 600; margin: .35rem 0 .65rem; overflow-wrap: anywhere; }
.antwort { margin: .45rem 0 .7rem; line-height: 1.65; padding: .9rem 1.1rem; background: var(--grund);
  border: 1px solid var(--rand); border-radius: var(--r-feld); }
.zitate { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.zitate li { min-width: 0; }
.zitate blockquote { margin: 0 0 .3rem; padding: .6rem .85rem; background: var(--flaeche);
  border: 1px solid var(--rand); border-left: 4px solid var(--akzent); border-radius: var(--r-marke);
  font-size: .9375rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.zitate li.ungeprueft blockquote { border-left-color: var(--warn); background: var(--warn-flaeche); color: var(--text); }
.zitate li.auslassung blockquote { border-left-color: var(--warn); }
.zitat-nr { font-weight: 700; font-variant-numeric: tabular-nums; margin-right: .2rem; }
.fundstelle { overflow-wrap: anywhere; }
.tag.gut { background: var(--gut-flaeche); color: var(--gut); }
.tag.leise { background: transparent; color: var(--text-leise); box-shadow: inset 0 0 0 1px var(--rand-stark); }
.suche-angaben { margin-top: .7rem; }
.suche-angaben summary { cursor: pointer; }
.suche-angaben ul { margin: .35rem 0; padding-left: 1.2rem; }
.suche-angaben li { overflow-wrap: anywhere; }
.akte-start { margin: 1.1rem 0; }
.akte-start .zeile:last-of-type { margin-bottom: .45rem; }
.akte .banner { margin: .6rem 0; }
.akte .zeile > input:not([type=checkbox]):not([type=hidden]) { flex: 1 1 12rem; min-width: 0; }
.akte-dateien td:first-child { width: 42%; }
.beleg-hinweis { margin-top: .25rem; color: var(--text); overflow-wrap: anywhere; }
.zitate li.ungeprueft .beleg-hinweis, .zitate li.auslassung .beleg-hinweis { font-weight: 600; }
.neu-stellen { margin: .5rem 0 0; padding-top: .55rem; border-top: 1px dashed var(--rand); }
.neu-stellen select { min-height: 2.125rem; font-size: var(--gr-klein); }

/* --- Akte: Signal-Chat (1.16) ---------------------------------------------------- */
.signal { margin: 1rem 0 .7rem; padding: .7rem .9rem; border: 1px solid var(--rand); border-radius: var(--r-feld); background: var(--grund); }
.signal > summary { cursor: pointer; font-weight: 600; }
.signal p { margin: .55rem 0; }
.signal .fehler { color: var(--stopp); }
.signal-liste { list-style: none; margin: .45rem 0 .7rem; padding: 0; max-height: 22rem; overflow-y: auto;
  border: 1px solid var(--rand); border-radius: var(--r-feld); background: var(--flaeche); }
.signal-liste li { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; padding: .5rem .7rem;
  border-bottom: 1px solid var(--rand); min-width: 0; }
.signal-liste li:last-child { border-bottom: 0; }
.signal-liste li[hidden] { display: none; }
.signal-liste label { color: var(--text); overflow-wrap: anywhere; }

/* --- Antwort beim Entstehen und Hinweise an der Antwort (1.17) ------------------ */
.msg.entsteht .msg-body::after {
  content: ""; display: inline-block; width: .5em; height: 1em; margin-left: .1em;
  vertical-align: -.12em; background: currentColor; opacity: .35; animation: pochen 1.1s infinite;
}
.warte-text { margin-left: .65rem; font-size: var(--gr-klein); color: var(--text-leise); vertical-align: middle; }
.warte-text:empty { display: none; }
.antwort-hinweis { margin: .55rem 0 0; padding: .6rem .85rem; border-radius: var(--r-feld);
  font-size: .9375rem; line-height: 1.5; background: var(--akzent-hell); color: var(--text);
  border-left: 4px solid var(--akzent); }
.antwort-hinweis.warn { background: var(--warn-flaeche); color: var(--warn); border-left-color: var(--warn); }
.stufe[hidden] { display: none; }

/* --- Familien-Helfer (1.18) ------------------------------------------------------
 * Der Knopf schwebt unten rechts über jeder Seite — über der Eingabeleiste, nie auf ihr
 * (--helfer-unten setzt helfer.js aus der Höhe der Leiste). Das Fenster ist ein Blatt mit
 * Schatten (es schwebt), auf dem Handy die ganze Höhe. Nur Bausteine und Farben von oben.
 */
.helfer-knopf {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: var(--helfer-unten, 1rem); z-index: 80;
  display: inline-flex; align-items: center; gap: .45rem; min-height: var(--ziel); padding: .5rem 1rem .5rem .85rem;
  border: 1px solid var(--akzent); border-radius: var(--r-voll); background: var(--akzent); color: var(--akzent-text);
  font: inherit; font-size: .9375rem; font-weight: 600; box-shadow: var(--schatten-3); cursor: pointer;
}
.helfer-knopf:hover { background: var(--akzent-stark); border-color: var(--akzent-stark); }
.helfer-knopf.offen { background: var(--flaeche); color: var(--text); border-color: var(--rand-stark); }
.helfer-fenster {
  position: fixed; right: 1rem; bottom: calc(var(--helfer-unten, 1rem) + 3.5rem); z-index: 95;
  width: min(27rem, calc(100vw - 2rem)); height: min(44rem, calc(100vh - var(--helfer-unten, 1rem) - 6rem));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--flaeche); border: 1px solid var(--rand-stark); border-radius: var(--r-mittel); box-shadow: var(--schatten-3);
}
.helfer-fenster[hidden] { display: none; }
.helfer-fenster-kopf {
  display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem .35rem 1rem;
  border-bottom: 1px solid var(--rand); background: var(--flaeche);
}
.helfer-fenster-kopf strong { flex: 1 1 auto; font-size: 1rem; }
.helfer-fenster-kopf .rechts { display: flex; gap: .2rem; }
.helfer-fenster iframe { flex: 1 1 auto; width: 100%; border: 0; background: var(--grund); }
@media (max-width: 620px) {
  .helfer-knopf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .helfer-knopf { padding: .6rem; width: var(--ziel); justify-content: center; }
  .helfer-fenster { inset: 0; width: auto; height: auto; border-radius: 0; border: 0;
    padding-top: env(safe-area-inset-top); }
  .helfer-offen .helfer-knopf { display: none; }
  .helfer-offen body { overflow: hidden; }
}
@media print { .helfer-knopf, .helfer-fenster { display: none; } }

/* Im Fenster: keine Kopfzeile der Anwendung, wenig Rand. */
body.im-fenster main { padding-top: .75rem; }
body.im-fenster .chat > .kopfzeile { margin-bottom: .6rem; }
body.im-fenster .chat > .kopfzeile .small-h { font-size: 1rem; }
body.im-fenster .chat > .kopfzeile .knopf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.im-fenster .chat > .kopfzeile { flex-wrap: nowrap; }
body.im-fenster .chat > .kopfzeile .small-h { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.helfer-hinweis { width: 100%; max-width: var(--spalte); margin: 0 auto 1rem; border-left: 4px solid var(--akzent); }
.helfer-hinweis p { margin-bottom: .6rem; }
.helfer-leer { max-width: var(--spalte); margin: 0 auto; }
.helfer-modell { max-width: var(--spalte); margin: .35rem auto 0; color: var(--text-still); }
.fuss .helfer-stand { color: var(--text-still); font-size: var(--gr-klein); white-space: nowrap; }

/* Karten: ein Vorschlag des Helfers unter der Antwort — wie der Kalendervorschlag. */
.helfer-karte {
  margin: .6rem 0 0; padding: .7rem .9rem; border: 1px solid var(--rand); border-left: 4px solid var(--akzent);
  border-radius: var(--r-mittel); background: var(--flaeche); font-size: .9375rem;
}
.helfer-karte .karte-kopf { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .3rem; }
.helfer-karte .karte-zeile { margin: 0 0 .45rem; overflow-wrap: anywhere; }
.helfer-karte .karte-knoepfe { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.helfer-karte.stand-uebernommen { border-left-color: var(--gut); }
.helfer-karte.stand-verworfen, .helfer-karte.stand-zurueckgenommen { border-left-color: var(--rand-stark); }
.helfer-karte.stand-verworfen .karte-zeile, .helfer-karte.stand-zurueckgenommen .karte-zeile { color: var(--text-leise); }
.helfer-karte .karte-meldung { margin: .45rem 0 0; color: var(--gut); }
.helfer-karte .karte-meldung.fehler { color: var(--stopp); }
.helfer-protokoll .protokoll-zeile { margin-bottom: 1rem; }
.helfer-protokoll .helfer-karte { margin-top: .25rem; }

/* Wunschzettel, Wissen, Hilfe */
.kopiertext { width: 100%; font-family: var(--schrift); font-size: .9375rem; }
ul.wunschliste { list-style: none; padding: 0; margin: 1rem 0 0; }
ul.wunschliste li { padding: .75rem 1rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--r-mittel); }
ul.wunschliste li + li { margin-top: .5rem; }
ul.wunschliste li.stand-erledigt, ul.wunschliste li.stand-verworfen { color: var(--text-leise); }
ul.wunschliste .wunsch-stand { gap: .3rem; margin-top: .3rem; flex-wrap: wrap; }
form.stapel label { display: block; margin-bottom: .7rem; }
form.stapel input[type=text], form.stapel textarea { width: 100%; }
.wissen-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9375rem; line-height: 1.55; }
.wissen-feld { font-family: var(--schrift); font-size: .9375rem; }
section.wissen { margin-top: 2rem; }
.neues-projekt { margin-top: 1.25rem; }
.neues-projekt .zeile { gap: .5rem; flex-wrap: wrap; }
.neues-projekt input[type=text] { flex: 1 1 14rem; min-width: 0; }
details.card > summary { cursor: pointer; font-weight: 600; }
.hilfe { max-width: var(--spalte); margin: 0 auto; }
.hilfe .hilfe-abschnitt { scroll-margin-top: calc(var(--kopf-hoehe) + 1rem); }
.hilfe .hilfe-abschnitt h2 { margin-top: 0; }
.hilfe nav.inhalt ul { columns: 2 14rem; }
/* Platz unter dem Inhalt, damit der schwebende Knopf nichts zudeckt — im Gespräch hinter dem letzten Beitrag. */
body:has(> #helfer-knopf) main { padding-bottom: 5.5rem; }
body:has(> #helfer-knopf) main:has(> .chat) { padding-bottom: 0; }
body:has(> #helfer-knopf) .chat #ende { height: 3.75rem; }

/* --- 2.0 Bauwerkstatt: Aufträge, Fortschritt, Bericht, Freigabe — fürs Handy gebaut ---------------------- */
.bau { max-width: var(--spalte); margin: 0 auto; }
.bau .kopfzeile { align-items: baseline; flex-wrap: wrap; gap: .4rem .8rem; }
.bau .kopfzeile h1 { overflow-wrap: anywhere; }
.bau-aktionen { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .8rem 0; }
.bau-aktionen form { display: inline-flex; margin: 0; }
.bau form.stapel textarea, .bau form.stapel input[type=text], .bau form.stapel input[type=password] { width: 100%; }
.bau form.stapel textarea { font-family: var(--schrift); font-size: .9375rem; }
.bau-liste { list-style: none; margin: 0; padding: 0; }
.bau-liste li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; padding: .7rem 0;
                border-bottom: 1px solid var(--rand); }
.bau-liste li:last-child { border-bottom: 0; }
.bau-liste .titel { flex: 1 1 14rem; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.bau-liste .meta { font-size: var(--gr-klein); color: var(--text-leise); }
.tag.gut { background: var(--gut-flaeche); color: var(--gut); }
.tag.stopp { background: var(--stopp-flaeche); color: var(--stopp); }
.bau-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 .6rem; }
.bau-bericht h3 { margin: 1.15rem 0 .35rem; }
.bau-bericht h3:first-of-type { margin-top: .4rem; }
.bau-dateien { list-style: none; margin: .2rem 0 .6rem; padding: 0; font-size: .9375rem; }
.bau-dateien li { overflow-wrap: anywhere; padding: .1rem 0; }
.bau-dateien .art { color: var(--text-leise); }
.bau-schritte { list-style: none; margin: .3rem 0 0; padding: 0; font-size: .9375rem; }
.bau-schritte li { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); gap: .5rem; padding: .3rem 0;
                   border-bottom: 1px dashed var(--rand); }
.bau-schritte li:last-child { border-bottom: 0; }
.bau-schritte .uhr { color: var(--text-still); font-variant-numeric: tabular-nums; }
.bau-schritte .text { overflow-wrap: anywhere; }
.bau-schritte li.art-fehler .text { color: var(--stopp); }
.bau-schritte li.art-testet .text, .bau-schritte li.art-pruefen .text, .bau-schritte li.art-prueft .text { font-weight: 500; }
.bau-schritte li.neu { animation: einblenden .4s ease; }   /* einblenden: wie neue Beiträge im Gespräch */
.bau-laeuft { display: flex; align-items: center; gap: .55rem; color: var(--text-leise); font-size: var(--gr-klein); }
.bau-laeuft::before { content: ""; width: .7rem; height: .7rem; border-radius: var(--r-voll); background: var(--akzent);
                      animation: pochen 1.6s ease-in-out infinite; flex: none; }
.bau-diff { font-family: var(--schrift-zahl); font-size: .875rem; line-height: 1.5; margin: .5rem 0 0;
            background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--r-klein);
            padding: .6rem 0; overflow-x: auto; max-width: 100%; white-space: pre; }
.bau-diff span { display: block; padding: 0 .75rem; min-height: 1.5em; }
.bau-diff .plus { background: var(--gut-flaeche); color: var(--gut); }
.bau-diff .minus { background: var(--stopp-flaeche); color: var(--stopp); }
.bau-diff .datei { font-weight: 700; color: var(--text); background: var(--flaeche-2); }
.bau-diff .stelle { color: var(--text-still); }
.bau-pruefung { list-style: none; margin: .3rem 0 0; padding: 0; }
.bau-pruefung li { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; padding: .4rem 0;
                   border-bottom: 1px solid var(--rand); font-size: .9375rem; }
.bau-pruefung li:last-child { border-bottom: 0; }
.bau-pruefung .name { flex: 1 1 12rem; min-width: 0; font-weight: 500; }
.bau-pruefung .text { flex: 1 1 100%; color: var(--text-leise); overflow-wrap: anywhere; font-size: var(--gr-klein); }
.bau-kosten { font-variant-numeric: tabular-nums; }
.bau details.card > summary { font-weight: 600; }
.bau details.card[open] > summary { margin-bottom: .6rem; }
.bau .zitat { margin: .4rem 0 .8rem; padding: .5rem .85rem; border-left: 4px solid var(--rand-stark);
              background: var(--flaeche-2); border-radius: var(--r-marke); overflow-wrap: anywhere; }
.bau .check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; }
.bau .check input { margin-top: .35rem; flex: none; }
@media (prefers-reduced-motion: reduce) {
  .bau-laeuft::before, .bau-schritte li.neu { animation: none; }
}

/* 2.0.1 Bauwerkstatt: Fortschritt der Tests und Hinweis zur Verbindung (bauwerkstatt.js schaltet sie ein) */
.bau-verbindung[hidden], .bau-fortschritt[hidden] { display: none; }
.bau-fortschritt { margin-top: .4rem; }

/* 2.1 Labor und Spielwiese */
body.labor .top { box-shadow: inset 0 3px 0 var(--akzent); }
.labor-hinweis { border-left: 5px solid var(--akzent); margin-bottom: 1.5rem; }
.labor-hinweis ul { margin: .4rem 0 .9rem; padding-left: 1.2rem; }
.labor-hinweis li { margin: .3rem 0; }
.labor-zeile { margin: 0 auto .9rem; width: 100%; max-width: var(--spalte); font-size: var(--gr-klein);
               color: var(--text-leise); background: var(--akzent-hell); border-radius: var(--r-klein);
               padding: .45rem .8rem; }
.anwendung-buehne { border: 1px solid var(--rand); border-radius: var(--r-mittel); overflow: hidden;
                    background: var(--flaeche); box-shadow: var(--schatten-1); }
.anwendung-buehne iframe { display: block; width: 100%; height: min(78vh, 60rem); min-height: 26rem; border: 0;
                           background: #fff; }
.anwendung-buehne.gross { position: fixed; inset: 0; z-index: 60; border: 0; border-radius: 0; }
.anwendung-buehne.gross iframe { height: 100%; min-height: 0; }
body:has(.anwendung-buehne.gross) #anwendung-gross { position: fixed; z-index: 61; right: .6rem;
     bottom: calc(.6rem + env(safe-area-inset-bottom)); background: var(--flaeche); box-shadow: var(--schatten-2); }
body:has(.anwendung-buehne.gross) { overflow: hidden; }
.anwendung-meldung[hidden] { display: none; }
.anwendung-meldung { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; }
.anwendung-meldung span { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.anwendung-knoepfe { margin-top: .9rem; }
.anwendung-karte { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin: .6rem 0 .2rem;
                   padding: .6rem .85rem; background: var(--akzent-hell); border-radius: var(--r-klein);
                   border-left: 4px solid var(--akzent); }
.anwendung-karte .text { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.fach-wert { margin: .5rem 0 0; padding: .6rem .75rem; background: var(--flaeche-2); border-radius: var(--r-klein);
             font-family: var(--schrift-zahl); font-size: .875rem; line-height: 1.5; white-space: pre-wrap;
             overflow-wrap: anywhere; max-height: 16rem; overflow: auto; }
.fach-eintrag .zeile { margin: 0; }
.fach-eintrag .zeile strong { flex: 1 1 10rem; min-width: 0; overflow-wrap: anywhere; }
