/* Web-Client. Baut auf dem Formsystem in /app.css auf (Knopf, Pille, Faden, Statuszeile, Einwilligung).
   Hier nur, was der echte Client zusätzlich braucht: Rahmen ohne Vorführleiste, Anmeldung, Antworten mit
   Tabellen und Formeln, Anhänge, schmale Bildschirme. Keine Markenwerte, keine Kästen, keine Linksstriche. */

.app { height: 100vh; height: 100dvh; }
body.ohne-leiste .app { grid-template-columns: minmax(0, 1fr); }
body.ohne-leiste .leiste { display: none; }
.unsichtbar { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.knopf { cursor: pointer; position: relative; }
.laden { margin: auto; color: var(--tinte-2); }
/* Übergang von der Brücke: die Ladeanzeige erscheint erst, wenn es dauert (sonst blitzt „Einen Moment“ auf), die erste
   Ansicht blendet kurz ein, und Senden ist hervorgehoben, wenn eine Frage aus der Brücke im Feld steht. */
@keyframes wb-erscheinen { from { opacity: 0; } to { opacity: 1; } }
.laden { animation: wb-erscheinen .2s ease .5s both; }
body.ankunft #haupt, body.ankunft #leiste { animation: wb-erscheinen .22s ease-out both; }
@keyframes wb-bereit { 0%, 100% { outline-color: transparent; } 50% { outline-color: var(--akzent); } }
#senden.bereit { outline: 3px solid var(--akzent-weich); outline-offset: 3px; animation: wb-bereit 1.1s ease-in-out 2; }

/* Leiste: Kopf und Rumpf, damit sie auf dem Handy oben als Zeile steht */
.leiste-kopf { display: flex; align-items: center; justify-content: space-between; gap: .15rem; min-width: 0; }
/* Paneel-Knopf oben links (Claude-App): klappt die Leiste ein und aus, am Handy die Schublade */
.paneel-knopf { flex: none; color: var(--tinte-2); margin-left: -.35rem; }
.paneel-knopf .ic { width: 20px; height: 20px; }
.schleier { display: none; }
@media (max-width: 48rem) { .schleier { display: block; } }
.leiste-rumpf { display: flex; flex-direction: column; gap: 1rem; flex: 1; min-height: 0; }
.nur-schmal { display: none; }
.verlauf a[aria-current="true"] { color: var(--tinte); background: var(--flaeche-2); }
/* Herkunft im Eintrag von „Zuletzt“: nur im Profil Wasser sichtbar, Profil bertha bleibt wie es war */
.verlauf .herkunft { display: none; }
/* Blättern in „Zuletzt“: leiser Textknopf unter der Liste, lädt auch von selbst, sobald er beim Scrollen sichtbar wird */
.verlauf .zuletzt-mehr { display: block; margin: .35rem .6rem .2rem; padding: 0 .1rem; min-height: 1.9rem; font-size: .8rem; color: var(--tinte-2); }
.verlauf .zuletzt-mehr:disabled { opacity: .7; cursor: progress; }

/* Anmeldung */
.tor { min-height: 100%; flex: 1; display: grid; grid-template-rows: auto 1fr auto; padding: 1.5rem; gap: 1rem; }
.tor-mitte { align-self: center; justify-self: center; text-align: center; max-width: 26rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.tor-mitte h1 { margin-top: .4rem; }
.tor-mitte .knopf { margin-top: .9rem; }
.avatar.gross { width: 3.6rem; height: 3.6rem; }

/* Chat */
.chatkopf { justify-content: space-between; }
.chatkopf .knopf.text { color: var(--tinte-2); font-weight: 500; font-size: .85rem; }
.ich-spalte { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; max-width: 80%; }
.nachricht.ich .ich-spalte .text { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.status .sekunden { font-variant-numeric: tabular-nums; }
/* Schritte aus dem Strom des Cores (web/schritte.js): während des Laufs offen unter der Statuszeile, danach eine Zeile
   zum Aufklappen (details.schritte aus /app.css). Zeichen statt Emoji: Punkt läuft, Haken fertig, Strich ohne Ergebnis.
   Neue Einträge tauchen einmal kurz auf, nur über opacity und transform; „Bewegung reduzieren“ schaltet es unten ab. */
.schritte.laeuft { margin: -.1rem 0 .45rem; }
.schritt-liste { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .28rem; font-size: .8rem; line-height: 1.4; color: var(--tinte-2); }
.schritte.laeuft .schritt-liste { margin-top: 0; }
details.schritte[open] .schritt-liste { margin-bottom: .65rem; }
.schritt-dauer { padding-left: .2rem; }
.schritt { display: grid; grid-template-columns: 1rem minmax(0, auto) auto; justify-content: start; column-gap: .45rem; align-items: start; }
.schritt-text { min-width: 0; overflow-wrap: anywhere; }
.schritt-dauer { font-variant-numeric: tabular-nums; white-space: nowrap; }
.schritt-ic { width: .95rem; height: .95rem; margin-top: .05rem; fill: none; stroke: var(--akzent-text); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.schritt.failed .schritt-ic { stroke: var(--tinte-2); }
.schritt-punkt { width: .45rem; height: .45rem; margin: .3rem 0 0 .25rem; border-radius: var(--sw-radius-round, 50%); background: var(--akzent); animation: puls 1s ease-in-out infinite; }
.schritt.running .schritt-text { color: var(--tinte); }
.schritt-satz-zeichen { width: .45rem; height: .45rem; margin: .3rem 0 0 .25rem; border-radius: var(--sw-radius-round, 50%); border: 1.5px solid var(--tinte-2); opacity: .7; }
.schritt.satz .schritt-text { font-style: italic; }
.schritt.neu { animation: schritt-ein .22s var(--kurve, ease-out) both; }
@keyframes schritt-ein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
:is(.nachricht, .gemeldet-text) .text { overflow-wrap: anywhere; }
:is(.nachricht, .gemeldet-text) .text > :last-child { margin-bottom: 0; }
:is(.nachricht, .gemeldet-text) .text .zwischentitel { margin-top: .9em; }
:is(.nachricht, .gemeldet-text) .text hr { border: 0; border-top: 1px solid var(--linie); margin: 1rem 0; }
:is(.nachricht, .gemeldet-text) .text blockquote { margin: .4rem 0 .8rem; padding-left: 1.2rem; color: var(--tinte-2); font-style: italic; }
:is(.nachricht, .gemeldet-text) .text code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; background: var(--flaeche-2); border-radius: var(--sw-radius-xs, 4px); padding: .05em .3em; }
:is(.nachricht, .gemeldet-text) .text pre { background: var(--flaeche-2); border-radius: var(--r-s); padding: .8rem 1rem; overflow-x: auto; margin: .4rem 0 .8rem; }
:is(.nachricht, .gemeldet-text) .text pre code { background: none; padding: 0; font-size: .84rem; }
:is(.nachricht, .gemeldet-text) .text .tabelle { overflow-x: auto; margin: .4rem 0 .8rem; }
:is(.nachricht, .gemeldet-text) .text .tabelle table { margin: 0; min-width: 60%; }
:is(.nachricht, .gemeldet-text) .text th { font-weight: 600; border-bottom-color: var(--linie-stark); }
:is(.nachricht, .gemeldet-text) .text td, :is(.nachricht, .gemeldet-text) .text th { vertical-align: top; overflow-wrap: normal; }
:is(.nachricht, .gemeldet-text) .text th { white-space: nowrap; }
:is(.nachricht, .gemeldet-text) .text .katex { font-size: 1.15em; }
:is(.nachricht, .gemeldet-text) .text .katex-display { margin: .6rem 0; overflow-x: auto; overflow-y: hidden; padding: .2rem 0; }
.formel-quelle { font-size: .9em; }
.randnotiz { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }

/* Anhänge, Dateien und Bilder aus der Antwort */
.anhaenge { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.anhaenge:not(:empty) { margin-bottom: .45rem; }
.anhaenge.rechts { justify-content: flex-end; }
.anhang { margin-bottom: 0; text-decoration: none; color: var(--tinte); max-width: 100%; }
.anhang .ic { width: 15px; height: 15px; }
a.anhang:hover { background: var(--akzent-weich); color: var(--akzent-text); }
.anhang .weg { border: 0; background: none; padding: 0; margin-left: .1rem; display: inline-grid; cursor: pointer; color: var(--tinte-2); }
.dateien-antwort { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.bild { margin: 0; display: inline-flex; flex-direction: column; gap: .25rem; max-width: 100%; }
.bild img { max-width: min(100%, 28rem); height: auto; border-radius: var(--r-s); display: block; }
.bild figcaption { margin-top: .2rem; }

/* Rückfrage des Cores: verbinden oder zustimmen. Wie die Einwilligung offen im Faden, ohne Kasten */
.gate { margin-top: .7rem; }
.gate .zeile { flex-wrap: wrap; gap: .6rem; }
.gate-titel { margin: 0 0 .5rem; font-size: 1rem; }
/* Freigabe-Karte (0.5.9): Erlauben mit Ticket, Stand darunter; Knöpfe mit 44 px Griff, schmal untereinander */
.gate.freigabe { display: grid; gap: .45rem; padding: .9rem 1rem; border: 1.5px solid var(--linie, #D6D1CA); border-radius: var(--sw-nested-radius, 14px); }
.gate.freigabe.zu { padding: 0; border: 0; }
.gate.entscheidung { display: grid; gap: .45rem; }
.gate.entscheidung .feld { min-height: 44px; }
.gate.entscheidung.zu p { margin: 0; }
.gate.freigabe .gate-titel { margin: 0; }
.freigabe-punkte { margin: 0; padding-left: 1.2rem; }
.gate.freigabe .zeile .knopf { min-height: 44px; }
.freigabe-stand { margin: 0; }
.freigabe-stand:empty { display: none; }
.freigabe-stand:focus { outline: none; }
@media (max-width: 360px) { .gate.freigabe .zeile { flex-direction: column; align-items: stretch; } }

/* Einwilligung: Abstände der Absätze im Faden */
.einwilligung details p { margin-top: .4rem; }
.einwilligung > p:last-child { margin: .7rem 0 0; }

/* Konto */
.inhalt.schmal { max-width: 36rem; }
.abschnitt h2 { margin-bottom: .4rem; }

/* Schmale Bildschirme: Leiste wird Kopfzeile, Menü klappt darunter auf */
@media (max-width: 48rem) {
  .app, .app.mit-seite { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .leiste { border-right: 0; border-bottom: 1px solid var(--linie); padding: .5rem .75rem; padding-top: max(.5rem, env(safe-area-inset-top)); gap: 0; position: relative; z-index: 2; }
  .nur-schmal { display: inline-flex; }
  /* Schublade wie in der Claude-App: von links über dem Inhalt, Hintergrund abgedunkelt */
  .leiste-rumpf { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; width: min(20rem, 86vw); background: var(--flaeche);
    padding: max(.5rem, env(safe-area-inset-top)) .75rem max(.75rem, env(safe-area-inset-bottom)); padding-left: max(.75rem, env(safe-area-inset-left));
    overflow: auto; overscroll-behavior: contain; box-shadow: 0 0 40px -8px rgba(0,0,0,.35);
    transform: translateX(-105%); visibility: hidden; transition: transform .34s cubic-bezier(.32,.72,0,1), visibility 0s linear .34s; }
  body.menue-offen .leiste-rumpf { transform: none; visibility: visible; transition: transform .34s cubic-bezier(.32,.72,0,1); }
  .rumpf-kopf { display: flex; align-items: center; gap: .15rem; margin: 0 0 -.25rem; min-height: var(--griff); }
  .schleier { position: fixed; inset: 0; z-index: 29; background: rgba(8, 18, 22, .38); opacity: 0; pointer-events: none; transition: opacity .34s ease; }
  body.menue-offen .schleier { opacity: 1; pointer-events: auto; }
  /* Titelleiste am Handy: Paneel-Knopf, Titel der Ansicht in der Mitte, rechts „…“ und „Neues Gespräch“ */
  .leiste-kopf { display: flex; align-items: center; gap: .25rem; }
  .kopf-mitte { flex: 1; min-width: 0; justify-content: center; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block !important; text-align: center; }
  .kopfknoepfe { min-width: 2.75rem; justify-content: flex-end; }
  .kopf-menue-ort { display: contents; }
  /* Schmal und bei 200 % Zoom: der Kopf bleibt, wenn er etwas anbietet, das die Leiste nicht hat (Bot zurück,
     Moodle-Kontext, Menü „…“); dann mit dem Titel des Gesprächs. „Neues Gespräch“ steht schon oben (WCAG 1.4.10) */
  .chatkopf { padding: .35rem .75rem; gap: .25rem; flex-wrap: nowrap; }
  .chatkopf [data-neu] { display: none; }
  .chatkopf:not(:has(.kontext, [data-gehe="bots"], .app-schalter)) { display: none; }
  .chatkopf [data-chatmenue] { display: none; } /* am Handy steht „…“ in der Titelleiste */
  .chatkopf .kopf-von { display: none; }
  .kopfknoepfe { gap: .1rem; }
  .faden { padding: 1rem 1rem .5rem; }
  .eingabe { padding: .4rem .75rem; padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
  .nachricht { gap: .55rem; }
  .nachricht > .avatar { width: 1.6rem; height: 1.6rem; }
  .ich-spalte { max-width: 88%; }
  .inhalt { padding: 1.25rem 1rem 2rem; }
  .leer { padding-top: 2.5rem; }
}
.abschnitt .punkte { margin: .2rem 0 .9rem; padding-left: 1.2rem; color: var(--tinte-2); }
:is(.nachricht, .gemeldet-text) .text .katex-display > .katex { text-align: left; padding-left: 1.2rem; }

/* Bots: Bibliothek, Bauen, Vorschau */
.meldung { display: flex; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.liste .rechts { flex-wrap: wrap; justify-content: flex-end; }
.marke-schild { margin-left: .35rem; }
.avatar.bot.gross { width: 3.6rem; height: 3.6rem; font-size: 1.1rem; margin: 0 auto; }
.chatkopf .wer .knopf.rund { margin-left: -.6rem; color: var(--tinte-2); }
.startfragen:empty { display: none; }
.startfragen { margin-bottom: .55rem; }
.abschnitt > .pillen + .startzeile, .startzeile { margin-top: .6rem; }
.startzeile input { flex: 1; }
.schalterzeile { margin-bottom: .6rem; }
.teilenzeile { margin-top: .9rem; }
.pille .weg { border: 0; background: none; padding: 0; display: inline-grid; cursor: pointer; color: var(--tinte-2); }
.pille .weg .ic { width: 14px; height: 14px; }
.dateien li .knopf.rund { width: 2rem; min-height: 2rem; }
.pruefung-titel { margin-top: 1.4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tinte-2); }
.pruefung li .ic { margin-top: .15rem; }
.pruefung li.leise { color: var(--tinte-2); }
.fussleiste .platz { flex: 1; }
.knopf.text.gefahr { color: var(--warnung); }
.mini-leer { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.mini-start { justify-content: center; }
.mini-feld { flex: 1; padding: .3rem; }
.vorschau-wo { margin-top: 1rem; }
.seite .mini .avatar.bot { width: 2.4rem; height: 2.4rem; }
@media (max-width: 48rem) {
  .seite { display: none; }
  .fussleiste { flex-wrap: wrap; }
  .liste > li { grid-template-columns: auto 1fr; }
  .liste .rechts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Mein Lotse */
.vorspann { max-width: 44rem; margin-bottom: 1.1rem; }
.reiter { margin-bottom: .4rem; }
.meldung-zeile { min-height: 1.6rem; display: flex; align-items: center; gap: .4rem; margin: .2rem 0 .6rem; }
.liste.schlicht > li { display: flex; align-items: flex-start; gap: .9rem; }
.liste.schlicht .eintrag-text { flex: 1; min-width: 0; }
.liste.schlicht .eintrag-text textarea { min-height: 3.2rem; }
.liste.schlicht .rechts { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.liste.schlicht .schalter { margin-top: .2rem; }
.zustand { width: 2rem; height: 2rem; border-radius: var(--sw-radius-round, 50%); display: grid; place-items: center; background: var(--flaeche-2); color: var(--tinte-2); flex: none; }
.zustand.an { background: var(--akzent-weich); color: var(--akzent-text); }
.wahl-zeile { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; width: 100%; }
.wahl-zeile input { margin-top: .3rem; accent-color: var(--akzent-text); }
.wahl-zeile > span { display: flex; flex-direction: column; }
.wahl-zeile.gesperrt { opacity: .5; cursor: default; }
.fussknoepfe { margin-top: 1rem; }
.unterwahl { margin-top: .55rem; gap: .5rem; }
.unterwahl input[type=number] { width: 5rem; }
.unterwahl input[type=time] { width: auto; border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: var(--r-s); padding: .45rem .6rem; }
.auftrag-neu { margin-top: 1.4rem; }
.qr-block { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.qr { width: 11rem; height: 11rem; background: #fff; padding: .4rem; border-radius: var(--r-s); flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.adresse { font-family: ui-monospace, monospace; overflow-wrap: anywhere; color: var(--tinte-2); }
.pruefzahl { font: 700 2.6rem/1 var(--schrift-titel); letter-spacing: .08em; color: var(--akzent-text); margin: .4rem 0; font-variant-numeric: tabular-nums; }
.chatkopf .kopf-rechts { display: flex; gap: .2rem; align-items: center; margin-left: auto; }
.chatkopf .kontext { margin-left: 1rem; }
.chatkopf .kontext .pille .weg { border: 0; background: none; padding: 0; display: inline-grid; cursor: pointer; color: var(--tinte-2); }
/* Fokus: angeheftete Quellen des Gesprächs als Liste (heute der Moodle-Kurs, später Ordner und Dateien). Das Kreuz steht
   mittig rechts in der Pille, sichtbar 28 px, Trefferfläche 44 px über ::after */
.fokus { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; padding: 0; list-style: none; min-width: 0; }
.fokus-eintrag { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; max-width: 18rem; min-height: 2.1rem;
  padding: 0 .2rem 0 .75rem; border: 1px solid var(--linie-stark); border-radius: var(--r-voll); background: var(--flaeche);
  color: var(--tinte); font-size: .85rem; line-height: 1.3; }
.fokus-ic { display: inline-grid; flex: none; color: var(--tinte-2); }
.fokus-ic .ic { width: 15px; height: 15px; }
.fokus-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fokus-weg { position: relative; flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin: 0; padding: 0;
  border: 0; border-radius: var(--sw-radius-round, 50%); background: none; box-shadow: none; color: var(--tinte-2); cursor: pointer; }
.fokus-weg::before { content: none; }
.fokus-weg::after { content: ""; position: absolute; inset: -8px; border-radius: var(--sw-radius-round, 50%); background: none; box-shadow: none; opacity: 1; }
.fokus-weg:hover { background: var(--flaeche-2); color: var(--tinte); }
.fokus-weg .ic { width: 14px; height: 14px; }

/* Melden: offen unter der Antwort, ohne Kasten. Gleiche Bausteine wie überall: Pillen, Feld, Schalter, Knöpfe */
.melden { margin-top: .8rem; padding-top: .2rem; max-width: 34rem; }
.melden h2 { font-size: .95rem; display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.melden fieldset { border: 0; padding: 0; margin: .7rem 0 .9rem; min-width: 0; }
.melden legend { padding: 0; margin-bottom: .4rem; }
.melden .feld { margin-bottom: .7rem; }
.melden textarea { min-height: 3.4rem; }
.melden .zeile { flex-wrap: wrap; gap: .5rem; }
.gemeldet { display: inline-flex; align-items: center; gap: .3rem; color: var(--tinte-2); padding: 0 .5rem; min-height: 2rem; }
.nav .zahl { margin-left: auto; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: var(--r-voll); background: var(--akzent-text); color: var(--auf-akzent); font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.zitat { margin: .35rem 0; font-style: italic; color: var(--tinte-2); }
.gemeldet-text { margin-top: .35rem; font-size: .87rem; }
.gemeldet-text summary { cursor: pointer; color: var(--akzent-text); font-weight: 500; }
.gemeldet-text .vor { white-space: pre-wrap; overflow-wrap: anywhere; }
.gemeldet-text .text { margin-top: .3rem; }

/* Barrierefreiheit: Überschrift nur für Screenreader, Begrüßung im leeren Faden als h2 in Größe von h1 */
.nur-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.leer h2.gross { font-size: 1.45rem; margin: .8rem 0 .3rem; }
label.schalterzeile, label.zeile { cursor: pointer; }
.pille[aria-selected="true"] { background: var(--akzent-weich); border-color: var(--akzent-text); color: var(--akzent-text); font-weight: 600; }
[role=tabpanel]:focus-visible { outline-offset: 6px; }
.aktionen { flex-wrap: wrap; }
.faden { overflow-x: hidden; }
.gemeldet-text summary { list-style: none; display: inline-flex; align-items: center; gap: .3rem; min-height: 2rem; }
.gemeldet-text summary::-webkit-details-marker { display: none; }
.gemeldet-text summary .ic { width: 15px; height: 15px; transition: transform var(--dauer) var(--kurve); }
.gemeldet-text[open] summary .ic { transform: rotate(90deg); }
.link-aus { text-decoration: underline dotted; color: var(--tinte-2); }
@media (max-width: 48rem) { .aktionen .knopf.text { padding: 0 .35rem; } .aktionen .lang { display: none; } }

/* Bilder: eine Form für alle Bilder in Antworten (Core, Markdown), eigene mit gleichem Radius */
.anhang.mit-bild img { width: 1.6rem; height: 1.6rem; object-fit: cover; border-radius: var(--sw-radius-xs, 4px); }
.beschreibung-zeile { display: flex; flex-direction: column; gap: .2rem; width: 100%; color: var(--tinte-2); }
.beschreibung-zeile input { font-size: .85rem; padding: .35rem .55rem; }
.eigenes-bild { max-width: min(100%, 14rem); max-height: 14rem; border-radius: var(--r-s); display: block; }
.bild[data-bild] { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .25rem; margin: .3rem 0; max-width: 100%; }
.bild-text { color: var(--tinte-2); }
.bild[data-bild] .knopf.text { padding-left: 0; }
.formel-wartet { color: var(--tinte-2); letter-spacing: .1em; }

/* Apps im Chat: Leiste über dem Eingabefeld, fester Ort, ohne Kasten. Eine Linie oben trennt sie vom Faden */
.app-dock { display: flex; flex-direction: column; height: min(58vh, 40rem); border-top: 1px solid var(--linie); background: var(--papier); flex: none; }
.app-dock .app-kopf { display: flex; align-items: center; gap: .5rem; padding: .35rem 1.5rem; }
.app-dock .app-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-dock .app-kopf > .ic, .app-dock .app-kopf > .knopf { flex: none; }
.app-dock .platz { flex: 1; }
.app-dock iframe { flex: 1; width: 100%; border: 0; background: var(--papier); }
.app-dock:fullscreen { height: 100vh; }
.app-wahl { margin-bottom: .55rem; }
.app-zeile .ic { width: 15px; height: 15px; }
.app-zeile .app-anlass { margin: -.35rem 0 0 1.4rem; }
.ergebnis-zeile .randnotiz { flex-wrap: nowrap; align-items: flex-start; }
.ergebnis-zeile .randnotiz .ic { flex: none; margin-top: .2em; }
.ergebnis-zeile .randnotiz span { color: var(--tinte); min-width: 0; }
/* Vollbild ohne Fullscreen-API (iPhone): die Leiste füllt das Fenster */
.app-dock.voll { position: fixed; inset: 0; height: auto; z-index: 20; padding-top: env(safe-area-inset-top); }
.chat.mit-app .leer { padding-top: 1.2rem; }
.chat.mit-app .leer p { display: none; }
.app-zeile .knopf.text { padding-left: .2rem; }
/* „· offen“ und „Zeigen“ gleich hoch: der Knopf trägt kein eigenes Polster, die Trefferfläche bleibt über ::after */
.app-zeile .randnotiz .knopf.text { min-height: 0; padding-block: 0; line-height: inherit; position: relative; }
.app-zeile .randnotiz .knopf.text::after { content: ""; position: absolute; inset: -12px -4px; box-shadow: none !important; }
.app-meldung:empty { display: none; }
.lg-hinweis:empty { display: none; }
.lg-hinweis { color: var(--tinte-2); }
.app-zeile-titel { overflow-wrap: anywhere; }
@media (max-width: 48rem) {
  .app-dock .app-kopf { padding: .3rem .75rem; }
  .app-dock .app-herkunft { display: none; }
  .feldrahmen { gap: .25rem; } /* Knopfabstand 40 + 4 px: jede Trefferfläche hat ihre 44 px, ohne die Nachbarn zu überdecken */
  .feldrahmen .knopf.text.rund { width: 2.5rem; }
}
/* App-Spalte (0.5.4). Die Spalte ist ein eigenes Kind von #app und wird nie neu aufgebaut (ein iframe, das umzieht,
   lädt neu). Breit (ab 62rem): dritte Spalte rechts neben dem Gespräch, über die ganze Höhe. Schmal: über dem Faden,
   zwischen Kopf und Eingabe (--chat-oben, --chat-unten misst app.js). Ausgeblendet behält sie Ort und Größe und wird
   nur nicht gezeichnet, damit die Apps weiterlaufen, ohne umzubrechen. Mehrere Apps liegen übereinander, vorne eine. */
.app-spalte { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: auto; border-top: 0; background: var(--papier); }
.app-spalte[data-zustand="leer"] { display: none; }
.app-spalte[data-zustand="zu"] { visibility: hidden; pointer-events: none; }
.app-spalte .app-kopf { min-height: 2.75rem; padding-block: .1rem; }
.app-spalte .app-buehne { position: relative; flex: 1; min-height: 0; overflow: hidden; isolation: isolate; }
.app-spalte .app-rahmen { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--papier); }
.app-spalte .app-rahmen[data-lage="vorne"] { z-index: 1; }
.app-spalte .app-rahmen:not([data-lage="vorne"]) { visibility: hidden; opacity: 0; }
.app-startet { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; margin: 0; }
.app-startet:empty { display: none; }
.app-spalte:fullscreen { height: 100vh; }
.app-spalte.voll { position: fixed; inset: 0; height: auto; margin: 0; z-index: 20; padding-top: env(safe-area-inset-top); visibility: visible; }
/* Reiter, wenn mehrere Apps offen sind: Text, darunter ein Strich, der zum vorderen Reiter wandert */
.app-reiter { position: relative; display: flex; flex: 0 1 auto; gap: .1rem; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: -.7rem; }
.app-reiter-knopf { flex: none; max-width: 12rem; min-height: var(--griff, 44px); padding: 0 .7rem; border: 0; background: none; font: inherit; color: var(--tinte-2); cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: var(--r-s); }
.app-reiter-knopf[aria-selected="true"] { color: var(--tinte); font-weight: 600; }
/* Platz für die fette Fassung: der Reiter wird beim Wählen nicht breiter, nichts rückt */
.app-reiter-knopf { display: inline-grid; align-content: center; }
.app-reiter-knopf::after { content: attr(data-titel); font-weight: 600; height: 0; visibility: hidden; overflow: hidden; }
/* Eine App: derselbe Reiter, ohne Auswahl, damit beim zweiten nichts umgebaut aussieht */
.app-reiter.allein .app-reiter-knopf { cursor: default; max-width: 26rem; }
.app-reiter-strich { position: absolute; left: 0; bottom: 4px; width: 1px; height: 2px; background: var(--akzent); transform-origin: 0 50%; pointer-events: none; }
/* Knopf im Kopf des Gesprächs: Symbol mit der Fläche, wohin die App kommt (breit rechts, schmal über dem Faden) */
.app-schalter-ort { display: contents; }
.app-schalter { gap: .4rem; }
.app-schalter { position: relative; }
:is(.app-schalter, .app-aus) .spalte-flaeche { fill: currentColor; stroke: none; opacity: 0; }
:is(.app-schalter[aria-expanded="true"], .app-aus) .spalte-flaeche { opacity: .6; }
:is(.app-schalter, .app-aus) .ic-blatt { display: none; }
.app-schalter-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-schalter[aria-expanded="true"] .app-schalter-name { display: none; }
/* Ausgeblendet läuft die App weiter: ein Punkt am Symbol sagt das, ohne Wort */
.app-schalter-punkt { position: absolute; left: calc(.75rem + 13px); top: calc(50% - 9px); width: 7px; height: 7px; border-radius: var(--sw-radius-round, 50%);
  background: var(--akzent); box-shadow: 0 0 0 2px var(--papier); opacity: 0; transform: scale(.4); pointer-events: none; }
.app-schalter[data-zustand="aus"] .app-schalter-punkt { opacity: 1; transform: none; }
.app-spalte .app-kopf .app-zu { margin-left: -.35rem; }
.app-spalte .app-kopf .app-zu .ic { width: 15px; height: 15px; }
.app-schalter-zahl { min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: var(--sw-radius-pill, 999px); background: var(--flaeche-2); color: var(--tinte); font-size: .72rem; font-weight: 600; line-height: 1.15rem; text-align: center; }
@media (max-width: 62rem) {
  /* Spalte und Gespräch in derselben Zelle; beide fest gesetzt, sonst schöbe die Spalte das Gespräch in eine neue Zeile */
  #haupt, .app-spalte { grid-row: 1; grid-column: 2; }
  body.ohne-leiste :is(#haupt, .app-spalte) { grid-column: 1; }
  .app-spalte { position: relative; z-index: 1; margin-top: var(--chat-oben, 3.5rem); margin-bottom: var(--chat-unten, 6rem); }
  :is(.app-schalter, .app-aus) .ic-spalte { display: none; }
  :is(.app-schalter, .app-aus) .ic-blatt { display: inline; }
  .app-schalter-name { max-width: 7.5rem; }
}
@media (max-width: 48rem) {
  #haupt, .app-spalte { grid-row: 2; grid-column: 1; }
  .app-reiter-knopf { padding-inline: .5rem; max-width: 9.5rem; }
  .app-reiter { margin-left: -.5rem; }
  .app-spalte .app-kopf { gap: .15rem; }
}
@media (min-width: 62.01rem) {
  .app.mit-app { grid-template-columns: var(--leiste-breite) minmax(20rem, min(32.5rem, 42vw)) minmax(0, 1fr); }
  body.ohne-leiste .app.mit-app { grid-template-columns: minmax(20rem, min(32.5rem, 42vw)) minmax(0, 1fr); }
  .app-spalte[data-zustand="offen"] { grid-column: -2 / -1; grid-row: 1 / -1; border-left: 1px solid var(--linie); }
  /* Ausgeblendet aus dem Raster genommen, mit der zuletzt gemessenen Breite */
  .app-spalte[data-zustand="zu"] { position: fixed; top: 0; right: 0; bottom: 0; width: var(--spalte-breite, 50vw); }
  .chat.mit-app > .chatkopf, .chat.mit-app > .faden, .chat.mit-app > .eingabe { padding-inline: 1rem; }
  .chat.mit-app .chatkopf .knopf.text { padding-inline: .35rem; }
  .chat.mit-app .ich-spalte { max-width: 90%; }
}
/* Eingeklappt (Paneel-Knopf) ab Tablet: die Leiste ist ganz weg (fisc 17.11.2026), oben links bleiben Paneel-Knopf
   und „Neues Gespräch“ über dem Inhalt. Übergang nur beim Umschalten */
.zu-knoepfe { display: none; }
@media (min-width: 48.01rem) {
  body.leiste-zu .app, body.leiste-zu .app.mit-seite { --leiste-breite: 0rem; }
  body.leiste-wechsel .app { transition: grid-template-columns .34s cubic-bezier(.32,.72,0,1); }
  body.leiste-zu .leiste { visibility: hidden; overflow: hidden; padding: 0; border: 0; }
  body.leiste-zu .zu-knoepfe { display: flex; gap: .15rem; position: fixed; z-index: 20; top: .55rem; left: max(.6rem, env(safe-area-inset-left));
    padding: .15rem; border-radius: var(--r-voll); background: color-mix(in srgb, var(--papier) 85%, transparent); backdrop-filter: blur(8px); }
  body.leiste-zu .chatkopf { padding-left: 6.5rem; min-height: 3.4rem; }
  body.leiste-zu .chatkopf [data-neu] { display: none; }
  body.leiste-zu #haupt > :is(.inhalt, .tor) { padding-top: 3.6rem; }
}
@media (min-width: 62.01rem) {
  body.leiste-zu .app.mit-app { grid-template-columns: minmax(20rem, min(32.5rem, 42vw)) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  body.leiste-wechsel .app, .leiste-rumpf, body.menue-offen .leiste-rumpf, .schleier { transition: none; }
}
/* Mittlere Breite mit offener App: die Leiste geht weg wie eingeklappt, damit Gespräch und App Platz haben */
@media (min-width: 62.01rem) and (max-width: 80rem) {
  body.app-offen .app { grid-template-columns: minmax(20rem, min(32.5rem, 42vw)) minmax(0, 1fr); }
  body.app-offen .leiste { display: none; }
  body.app-offen .zu-knoepfe { display: flex; gap: .15rem; position: fixed; z-index: 20; top: .55rem; left: .6rem; }
  body.app-offen .chatkopf { padding-left: 6.5rem; }
}

/* Ergebnisse aus Apps */
.ergebnis-tabelle { overflow-x: auto; margin: .3rem 0 .8rem; }
.ergebnis-tabelle table { border-collapse: collapse; min-width: 60%; font-size: .95rem; }
.ergebnis-tabelle th, .ergebnis-tabelle td { text-align: left; padding: .4rem .8rem .4rem 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
.ergebnis-tabelle thead th { font-weight: 600; color: var(--tinte-2); }
.ergebnis-tabelle tbody th { font-weight: 500; }
.ergebnis-aufgabe h2 .leise { font-weight: 400; }
.ergebnis-dock { margin-top: 1rem; border: 1px solid var(--linie); border-radius: var(--ecke, 12px); overflow: hidden; }
.app-zeile .pillen { margin: .3rem 0 .2rem; }

/* ---------- Barrierefreiheit und Handy (Review 01.11.2026) ---------- */
/* Datei-Knöpfe: das Eingabefeld ist unsichtbar, der Fokus zeigt sich am Etikett (WCAG 2.4.7) */
label.knopf:has(input:focus-visible), label.knopf:focus-within { outline: 2px solid var(--akzent); outline-offset: 2px; }
/* Eingabefeld des Chats: deutlicher Fokus als nur der Wechsel der Randfarbe */
.feldrahmen:focus-within { outline: 2px solid var(--akzent); outline-offset: 1px; }
/* Platzhalter auch im Dunkeln mit genug Kontrast (WCAG 1.4.3) */
::placeholder { color: var(--tinte-2); opacity: 1; }
/* .sekunden: volle Deckkraft, sonst unter 4,5 : 1 (axe, 05.11.2026) */
/* iOS zoomt beim Fokus in Felder unter 16 px hinein und verschiebt das Layout */
@media (pointer: coarse) { input, textarea, select { font-size: max(16px, 1em); } }
/* Bewegung nur, wenn sie gewünscht ist */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Ränder seitlich im Querformat (Kamera-Aussparung) und unten über der Home-Leiste */
.app { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
@media (min-width: 48.01rem) { .eingabe { padding-bottom: max(1rem, env(safe-area-inset-bottom)); } }
/* Kleine Entfernen-Knöpfe: Ziel mindestens 24 px (WCAG 2.5.8) */
.anhang .weg, .pille .weg { min-width: 24px; min-height: 24px; }
.verlauf a .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: .2rem; }

/* Vorschläge und Hilfe am Eingabefeld (0.3.0): dieselbe Pille wie überall, Symbol vorn, die Hilfe als zweite Zeile */
.startfragen .pille .ic { width: 15px; height: 15px; flex: none; }
.startfragen:has(.pillen-reihe) { display: block; }
.startfragen.hat-pillen { display: block; }
.startfragen .hilfe-zeile { margin-top: .4rem; }
/* Vorschläge brechen um, damit keiner halb abgeschnitten am Rand steht (Befund Gesamtprüfung 17.11.2026). Reiter und
   Filter (Mein Lotse, Handgriffe, Bots) bleiben am Handy eine Reihe zum Wischen */
@media (max-width: 48rem) {
  .pillen.reiter, .pillen.bereiche { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding: .1rem 1rem;
    scroll-snap-type: x proximity; }
  .pillen.reiter::-webkit-scrollbar, .pillen.bereiche::-webkit-scrollbar { display: none; }
  .pillen.reiter .pille, .pillen.bereiche .pille { flex: none; scroll-snap-align: start; }
}
.pille .avatar.bot.mini { width: 1.3rem; height: 1.3rem; font-size: .6rem; margin-left: -.45rem; }
.pille[data-hilfe][aria-expanded="true"] { background: var(--akzent-weich); border-color: var(--akzent-text); color: var(--akzent-text); }

/* Anmeldung: Claim der Marke leise unter dem Logo (nur, wenn das Profil einen hat) */
.tor-kopf { display: flex; flex-direction: column; gap: .2rem; }
.tor-kopf .claim { margin: 0; padding: 0 .4rem; font-size: .85rem; }
/* Weg zurück zur Startseite der Schule (Brücke): ein Textknopf über der Navigation */
/* Werft-Launcher (web/werft-launcher): Raster der Dienste im Kopf der Leiste vor der Marke, auf allen Breiten ein Ort
   (Julian 11.11.2026). PC: Rastermitte senkrecht über der Mitte der Nav-Symbole (12 Polster + 9.6 + 8 = ~30 px, Knopf
   44 px also bei -.25rem), Logo bei Rastermitte + 40 px wie in der Brücke. Der Knopf ragt oben und unten je .2rem in
   das Polster, damit die Kopfmitte bei ~35 px bleibt und mit dem Titel im Chatkopf fluchtet. */
.leiste-kopf > werft-launcher.werft { flex: none; margin: -.2rem .7rem -.2rem -.25rem; }
.leiste-kopf:has(> werft-launcher) .marke { margin-right: auto; }
.leiste-kopf.hat-launcher .marke { margin-right: auto; }
/* Handy: Knopfkante auf der Kante von Eingabe und Vorschlägen (12 px), Logo bei Rastermitte + 32 px wie in der Brücke */
@media (max-width: 48rem) { .leiste-kopf > werft-launcher.werft { margin: 0 .25rem 0 0; } }

/* ---------- Bot-Bau, geführt (app.js, web/botbau.js, web/botbild.js) ---------- */
.avatar.bot, .botzeichen { background: none; padding: 0; overflow: visible; border-radius: 0; }
.avatar.bot > svg, .botzeichen > svg { display: block; overflow: visible; }
.avatar.bot.riesig { width: 5.5rem; height: 5.5rem; }
.liste .avatar.botzeichen { width: 2.4rem; height: 2.4rem; }
.botbau { max-width: 50rem; padding-bottom: 0; display: flex; flex-direction: column; min-height: 100%; }
.nur-breit { display: inline-flex; }
.bau-kopf { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.1rem; }
.bau-kopf .rechts { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.bau-kopf [data-vorschau-auf] .avatar { width: 1.4rem; height: 1.4rem; }
.bau-stand { margin: .15rem 0 0; }
.bau-schritte ol { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: s; }
.bau-schritte li { position: relative; }
.bau-schritte li + li::before { content: ""; position: absolute; top: 1.05rem; left: -50%; width: 100%; height: 2px; background: var(--linie); z-index: 0; }
.bau-schritte li.st-fertig + li::before, .bau-schritte li.st-jetzt::before { background: var(--akzent-text); opacity: .45; }
.bau-schritte button { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: center; gap: .3rem; background: none; border: 0; padding: .1rem .2rem .3rem; cursor: pointer; color: var(--tinte-2); font-size: .8rem; font-weight: 500; border-radius: var(--r-s); }
.bau-schritte button:hover .st-nr { border-color: var(--akzent-text); }
.st-nr { width: 2.1rem; height: 2.1rem; border-radius: var(--sw-radius-round, 50%); display: grid; place-items: center; background: var(--papier); border: 2px solid var(--linie-stark); font-weight: 700; font-size: .85rem; color: var(--tinte-2); transition: background var(--dauer), border-color var(--dauer); }
.st-nr .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.st-jetzt button { color: var(--tinte); font-weight: 700; }
.st-jetzt .st-nr { background: var(--akzent-text); border-color: var(--akzent-text); color: var(--auf-akzent); box-shadow: 0 0 0 4px var(--akzent-weich); }
.st-fertig .st-nr { background: var(--akzent-weich); border-color: var(--akzent-weich); color: var(--akzent-text); }
.st-fehler .st-nr { background: var(--zweit-weich); border-color: var(--warnung); color: var(--warnung); }
.bau-balken { display: none; height: 3px; border-radius: var(--sw-radius-xs, 3px); background: var(--linie); overflow: hidden; margin: -.4rem 0 1rem; }
.bau-balken i { display: block; height: 100%; background: var(--akzent-text); border-radius: var(--sw-radius-xs, 3px); transition: width 240ms var(--kurve); }
.bau-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-l); padding: 1.5rem 1.6rem .6rem; }
.bau-karte > h2 { font-size: 1.3rem; margin-bottom: .35rem; }
.bau-karte > h2:focus { outline: none; }
.bau-karte > h2:focus-visible { outline: 2px solid var(--akzent); outline-offset: 4px; border-radius: var(--sw-radius-xs, 2px); }
.bau-unter { margin-bottom: 1.1rem; max-width: 38rem; }
.bau-karte > .hinweis { margin: .4rem 0 1rem; }
/* Hinweis des Lotsen im Bot-Bau: Text auf der Schritt-Karte, kein getönter Kasten darin (keine Karte in der Karte) */
.bau-karte > .hinweis { background: none; border-radius: 0; padding: 0; color: var(--tinte-2); }
#bau-idee { font-size: 1.05rem; min-height: 6rem; }
.ideen { margin: -.2rem 0 1.1rem; }
.ideen .pille { color: var(--tinte-2); }
.bau-ki { flex-wrap: wrap; gap: .5rem; }
#bau-ki-status .punkt { width: .55rem; height: .55rem; border-radius: var(--sw-radius-round, 50%); background: var(--akzent); animation: puls 1s ease-in-out infinite; }
.feldkopf { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.feldkopf .feldname { margin-bottom: .35rem; }
.feldname .leise { font-weight: 400; }
.zaehler { font-size: .75rem; color: var(--tinte-2); font-variant-numeric: tabular-nums; }
.feldfehler { margin: .3rem 0 0; color: var(--warnung); font-size: .82rem; font-weight: 600; display: flex; gap: .35rem; align-items: flex-start; }
.feldfehler:empty { display: none; }
.feldfehler .ic { width: 16px; height: 16px; margin-top: .1rem; }
[aria-invalid="true"] { border-color: var(--warnung) !important; box-shadow: 0 0 0 1px var(--warnung); }
.schalterblock .schalterzeile { align-items: flex-start; }
.schalterblock .schalter { margin-top: .15rem; }
.schalterblock .hilfe { margin-top: .1rem; }
.startliste { list-style: none; margin: 0 0 .2rem; padding: 0; }
.startliste li { display: flex; align-items: center; gap: .5rem; padding: .3rem .2rem .3rem .75rem; border: 1px solid var(--linie); border-radius: var(--r-voll); margin-bottom: .35rem; font-size: .9rem; background: var(--papier); }
.startliste li span { flex: 1; min-width: 0; }
.startliste .knopf.rund { width: 2rem; min-height: 2rem; color: var(--tinte-2); }

/* Vorschläge: nie still übernommen, sichtbar am Feld und als Liste */
.vorschlag-feld { margin-top: .55rem; padding: .65rem .8rem .55rem; border-radius: var(--r-s); border: 1px solid var(--linie); border-left: 3px solid var(--akzent-text); background: color-mix(in srgb, var(--akzent-weich) 45%, var(--flaeche)); font-size: .9rem; }
.vf-kopf { display: flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--akzent-text); margin-bottom: .3rem; }
.vf-kopf .ic { width: 14px; height: 14px; }
.vf-knoepfe { display: flex; gap: .4rem; margin-top: .5rem; }
.vf-knoepfe .knopf { min-height: 2.1rem; font-size: .82rem; }
.vk-text { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.vk-start { margin: 0; padding-left: 1.1rem; }
.vk-bild { display: inline-flex; align-items: center; gap: .55rem; }
.vk-bild .avatar { width: 1.9rem; height: 1.9rem; }
.vorschlag-karte { margin: 1.4rem 0 1rem; border: 1px solid var(--linie-stark); border-radius: var(--r-l); background: var(--papier); overflow: hidden; }
.vk-kopf { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: 1rem 1.1rem; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.vk-kopf .avatar.gross { width: 3rem; height: 3rem; margin: 0; }
.vk-kopf h3 { font-size: 1rem; }
.vk-kopf h3:focus { outline: none; }
.vk-kopf p { margin: .1rem 0 0; }
.vk-liste { list-style: none; margin: 0; padding: 0; }
.vk-liste li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: .4rem 1rem; align-items: start; padding: .75rem 1.1rem; border-top: 1px solid var(--linie); font-size: .9rem; }
.vk-liste li:first-child { border-top: 0; }
.vk-liste .feldname { margin: .1rem 0 0; }
.vk-liste .vk-drin .vk-wert { color: var(--tinte-2); }
.vk-tun { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; white-space: nowrap; }
.vk-tun .knopf { min-height: 2.1rem; font-size: .82rem; }
.vk-tun .ok { display: inline-flex; align-items: center; gap: .3rem; }
.vk-tun .ok .ic { width: 15px; height: 15px; }
.vk-fuss { padding: 0 1.1rem .8rem; margin: 0; display: flex; gap: .35rem; align-items: flex-start; }
.vk-fuss .ic { width: 15px; height: 15px; margin-top: .15rem; }

/* Auftritt: Bild links, Felder rechts */
.auftritt { display: grid; grid-template-columns: 16.4rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.bildwahl fieldset { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
.bildwahl legend { padding: 0; margin-bottom: .45rem; }
.bild-buehne { display: grid; place-items: center; padding: 1.2rem; margin-bottom: 1rem; border-radius: var(--r-l); background: var(--papier); border: 1px solid var(--linie); }
.bildwahl fieldset label { position: relative; cursor: pointer; display: inline-grid; }
.bildwahl fieldset label input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.bb-farben { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.bildwahl .bb-farbe { display: grid; justify-items: center; gap: .25rem; padding: .3rem 0; border-radius: var(--r-s); }
.bb-farbstein { width: 2.75rem; height: 2.75rem; display: block; }
.bb-farbname { max-width: 100%; font-size: .72rem; color: var(--tinte-2); line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.bb-farbe:has(input:checked) { background: var(--flaeche-2); }
.bb-farbe:has(input:checked) .bb-farbname { color: var(--tinte); font-weight: 600; }
.bb-farbe:has(input:checked) .bb-farbstein .botbild-svg { --bb-kante: 2px; --bb-kante-farbe: var(--tinte); }
.bb-gruppe + .bb-gruppe { margin-top: .6rem; }
.bb-gruppe-titel { margin: 0 0 .3rem; font-size: .75rem; font-weight: 600; color: var(--tinte-2); }
.bb-raster { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .3rem; }
.bildwahl .bb-motiv { display: block; }
.bb-motiv .sym-k { display: block; aspect-ratio: 1; padding: .3rem; border-radius: var(--r-s); color: var(--tinte); }
/* Im Raster nur die Linie; das gewählte Feld wird zum Stein in der gewählten Farbe (Auswahl ist zugleich Vorschau) */
.bb-motiv .sym-k .botbild-svg { --bb-s: 1.2; --bb-strich: 2; --bb-grund-an: none; --bb-kante: 0px; --bb-flaeche: transparent; }
.bb-motiv:hover .sym-k { background: var(--flaeche-2); }
.bb-motiv:has(input:checked) .sym-k { background: none; padding: .1rem; }
.bb-motiv:has(input:checked) .sym-k .botbild-svg { --bb-s: 1.05; --bb-strich: 2.1; --bb-grund-an: inline; --bb-kante: 2px; --bb-kante-farbe: var(--tinte); --bb-flaeche: var(--bb-f-flaeche); }
.bildwahl :is(.bb-motiv, .bb-farbe):has(input:focus-visible) { outline: 3px solid var(--akzent-text); outline-offset: 2px; border-radius: var(--r-s); }
/* :has() fallback (Firefox 115 ESR): has-rueckfall.js sets .ist-gewaehlt, focus via :focus-within */
.bb-farbe.ist-gewaehlt { background: var(--flaeche-2); }
.bb-farbe.ist-gewaehlt .bb-farbname { color: var(--tinte); font-weight: 600; }
.bb-farbe.ist-gewaehlt .bb-farbstein .botbild-svg { --bb-kante: 2px; --bb-kante-farbe: var(--tinte); }
.bb-motiv.ist-gewaehlt .sym-k { background: none; padding: .1rem; }
.bb-motiv.ist-gewaehlt .sym-k .botbild-svg { --bb-s: 1.05; --bb-strich: 2.1; --bb-grund-an: inline; --bb-kante: 2px; --bb-kante-farbe: var(--tinte); --bb-flaeche: var(--bb-f-flaeche); }
@supports not selector(:has(*)) {
  .bildwahl :is(.bb-motiv, .bb-farbe):focus-within { outline: 3px solid var(--akzent-text); outline-offset: 2px; border-radius: var(--r-s); }
}

/* ---------- Bot-Bild (web/botbild.js): Stein wie im App-Hafen, Farbe aus der Palette des Profils ----------
   Fläche, Versatz und Linie je Farbe; Marker trägt im Dunkeln keinen Versatz und eine dunkle Linie
   (data-modus setzt app.js mit dem Thema). Maße je Größe über Container-Abfragen, Vorgabe für 37 bis 60 px. */
[data-bb-farbe] { --bb-f-flaeche: var(--akzent-weich); --bb-versatz: var(--akzent); --bb-linie: var(--tinte); }
[data-bb-farbe="zweit"] { --bb-f-flaeche: var(--zweit-weich); --bb-versatz: var(--zweit); }
[data-bb-farbe="marker"] { --bb-f-flaeche: var(--marker); --bb-versatz: var(--flaeche); }
html[data-modus="dunkel"] [data-bb-farbe="marker"] { --bb-versatz: transparent; --bb-linie: var(--auf-akzent); }
/* Im Dunkeln ist der kräftige Ton heller als die Linie will; halb gedeckt bleibt die Linie darüber lesbar (über 3:1) */
html[data-modus="dunkel"] .bb-grund { opacity: .55; }
[data-bb-farbe="grau"] { --bb-f-flaeche: var(--flaeche-2); --bb-versatz: var(--linie-stark); }
.botbild-svg { --bb-flaeche: var(--bb-f-flaeche); --bb-s: 1; --bb-strich: 2; --bb-vx: 1.4px; --bb-vy: 1.6px; --bb-vs: 4.5; --bb-grund-an: inline;
  --bb-kante: 1.5px; --bb-kante-farbe: var(--tinte); }
.bb-stein { fill: var(--bb-flaeche); stroke: var(--bb-kante-farbe); stroke-width: var(--bb-kante); vector-effect: non-scaling-stroke; }
.bb-symbol { transform: translate(24px, 24px) scale(var(--bb-s)) translate(-12px, -12px); }
.bb-grund { display: var(--bb-grund-an); transform: translate(var(--bb-vx), var(--bb-vy)); }
.bb-grund * { fill: var(--bb-versatz); stroke: var(--bb-versatz); stroke-width: var(--bb-vs); stroke-linejoin: round; stroke-linecap: round; }
.bb-linie * { fill: none; stroke: var(--bb-linie); stroke-width: var(--bb-strich); stroke-linecap: round; stroke-linejoin: round; }
:is(.avatar.bot, .botzeichen, .bb-farbstein, .bb-motiv .sym-k) { container-type: inline-size; }
@container (max-width: 27px) { .botbild-svg { --bb-s: 1.2; --bb-strich: 2.4; --bb-grund-an: none; --bb-kante: 1px; --bb-kante-farbe: var(--tinte-2); } }
@container (min-width: 27.01px) and (max-width: 36px) { .botbild-svg { --bb-s: 1.1; --bb-strich: 2.2; --bb-vx: 1.2px; --bb-vy: 1.4px; --bb-vs: 4; --bb-kante: 1.25px; --bb-kante-farbe: var(--tinte-2); } }
@container (min-width: 60.01px) { .botbild-svg { --bb-s: .92; --bb-strich: 1.9; --bb-kante: 2px; } }
.form-k { width: .85rem; height: .85rem; background: currentColor; opacity: .75; }
.form-kreis { border-radius: var(--sw-radius-round, 50%); }
.form-kachel { border-radius: var(--sw-radius-xs, 3px); }
#f-initialen { width: 5rem; text-transform: uppercase; text-align: center; font-weight: 700; }
.botbau :is(input, textarea) { scroll-margin: 5rem 0 7rem; }
.bau-fuss { margin-top: auto; padding-top: .8rem; align-items: center; z-index: 1; }
.bau-karte { margin-bottom: 1rem; }
.bau-fuss .knopf.primaer .ic { margin-right: -.2rem; }

/* Vorschau mit Probe */
.vorschau-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.vorschau-kopf h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--tinte-2); }
.mini.probe { display: flex; flex-direction: column; box-shadow: 0 18px 40px -28px rgba(0,0,0,.35); }
.mini.probe .minikopf .avatar.bot { width: 2rem; height: 2rem; }
.vs-wer { min-width: 0; }
.vs-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vs-faden { min-height: 16rem; max-height: calc(100vh - 19rem); overflow: auto; gap: .8rem; }
#vs-faden .nachricht { gap: .5rem; }
#vs-faden .nachricht > .avatar { width: 1.5rem; height: 1.5rem; }
#vs-faden .nachricht:not(.ich) .text { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-l); border-top-left-radius: 4px; padding: .5rem .7rem; }
#vs-faden .mini-leer { padding: 1.2rem 0 .4rem; }
#vs-faden .mini-leer .avatar.bot.gross { width: 3.4rem; height: 3.4rem; }
#vs-faden .status { margin: 0; }
.vs-eingabe { padding: 0 .8rem .8rem; display: flex; flex-direction: column; gap: .5rem; }
.vs-eingabe .feldrahmen textarea { min-height: 2.2rem; padding: .4rem; font-size: .85rem; }
.vs-eingabe .knopf.rund { width: 2.2rem; min-height: 2.2rem; }
.vs-fuss { margin-top: .8rem; }
.vs-fuss .knopf.text { padding: 0 .3rem; min-height: 1.6rem; font-size: .8rem; margin-left: -.3rem; }
.nachricht.begruessung { margin-top: .5rem; text-align: left; }

/* Entwürfe des Lotsen */
.bot-entwurf-karte { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; margin: .6rem 0 .3rem; padding: .8rem .9rem; border: 1px solid var(--linie-stark); border-radius: var(--r-l); background: var(--flaeche); }
.bot-entwurf-karte .avatar { width: 2.4rem; height: 2.4rem; }
.bot-entwurf-karte .titel { font-weight: 700; }
.lotse-entwuerfe { margin-bottom: 1.6rem; }
.lotse-entwuerfe h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--tinte-2); margin-bottom: .5rem; }

@media (max-width: 62rem) {
  .auftritt { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .bildwahl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1.2rem; }
  .bild-buehne { grid-row: span 3; align-self: start; }
}
@media (max-width: 48rem) {
  .botbau { padding-top: 1rem; }
  .bau-kopf h1 { font-size: 1.25rem; }
  .bau-schritte ol { margin-bottom: .7rem; }
  .bau-schritte li + li::before { top: .8rem; }
  .bau-schritte .st-nr { width: 1.6rem; height: 1.6rem; font-size: .75rem; }
  .bau-schritte .st-jetzt .st-nr { box-shadow: 0 0 0 3px var(--akzent-weich); }
  .bau-schritte .st-titel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bau-balken { display: block; margin: 0 0 1rem; }
  .bau-karte { border: 0; background: none; padding: 0; border-radius: 0; }
  .bau-karte > h2 { font-size: 1.15rem; }
  .bildwahl { display: block; }
  .bild-buehne { padding: .9rem; }
  .bb-raster { gap: .375rem; }
  .vk-liste li { grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; align-items: center; }
  .vk-liste .vk-wert { grid-column: 1 / -1; grid-row: 2; }
  .vk-tun { flex-direction: row; align-items: center; grid-column: 2; grid-row: 1; }
  .vk-kopf { grid-template-columns: auto 1fr; }
  .vk-kopf > .knopf { grid-column: 1 / -1; }
  .bau-fuss { flex-wrap: nowrap; gap: .4rem; margin: 1rem -1rem 0; padding: .6rem 1rem; padding-bottom: max(.6rem, env(safe-area-inset-bottom)); }
  .bau-fuss .platz { display: none; }
  .nur-breit, .bau-fuss .lang { display: none; }
  .bau-kopf { align-items: center; }
  .bau-kopf .rechts .knopf.text { padding: 0 .45rem; }
  .bau-stand { font-size: .78rem; }
  .auftritt-felder { order: -1; }
  .bau-fuss [data-schritt-zurueck] { padding: 0 .4rem; }
  .bau-fuss .knopf { padding: 0 .75rem; }
  .bau-fuss .knopf.primaer { flex: 1; }
  .bau-fuss [data-schritt-weiter] { white-space: nowrap; }
  body.vorschau-offen .seite { display: block; position: fixed; inset: 0; z-index: 30; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); border: 0; }
  body.vorschau-offen #vs-faden { max-height: calc(100dvh - 15rem); }
  .bot-entwurf-karte { grid-template-columns: auto 1fr; }
  .bot-entwurf-karte .knopf { grid-column: 1 / -1; }
}

/* Sprachnachricht (0.4.0, web/sprache.js): während der Aufnahme nimmt die Leiste den Platz des Felds, Senden bleibt
   rechts. Roter Punkt, das Wort „Aufnahme“ und die Uhr sagen „es läuft“ auch ohne Bewegung; der Pegel ist Zugabe.
   Rot eigens für die Aufnahme (mindestens 3:1 gegen das Feld, hell und dunkel), nicht die gedeckte Warnfarbe */
.aufnahme { flex: 1; display: flex; align-items: center; gap: .55rem; min-height: var(--griff); min-width: 0; padding-right: .25rem; }
.feldrahmen.nimmt-auf > textarea, .feldrahmen.nimmt-auf > label, .feldrahmen.nimmt-auf > [data-appwahl], .feldrahmen.nimmt-auf > #mikro { display: none; }
.eingabe.nimmt-auf #startfragen, .eingabe.nimmt-auf #app-wahl { display: none; }
.aufnahme-punkt { width: .75rem; height: .75rem; border-radius: var(--sw-radius-round, 50%); background: #D0261B; background: light-dark(#D0261B, #FF6B5E); flex: none; animation: aufnahme-puls 1.6s ease-in-out infinite; }
.angehalten .aufnahme-punkt { animation: none; background: var(--tinte-2); }
.aufnahme-zeit { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.aufnahme-wort { font-weight: 500; }
.bald-voll .aufnahme-zeit, .angehalten .aufnahme-zeit { color: var(--warnung); }
.aufnahme-pegel { flex: none; width: 9rem; display: flex; align-items: center; gap: 2px; height: 1.5rem; overflow: hidden; }
.aufnahme-pegel i { flex: none; width: 3px; height: calc(var(--h, .12) * 100%); min-height: 3px; border-radius: var(--sw-radius-xs, 2px); background: var(--akzent); opacity: .75; }
.angehalten .aufnahme-pegel { display: none; }
.aufnahme-hinweis { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes aufnahme-puls { 50% { opacity: .4; } }
.anhang.sprache { background: var(--akzent-weich); color: var(--akzent-text); }
#mikro.gesperrt { opacity: .55; }
/* 0.5.14: „Kein Ton“ macht den Pegel blass (Text dazu im Hinweis und für Screenreader), Mikrofon wählbar, wenn das Gerät
   mehr als einen Eingang hat. Die Auswahl ist ein natives select: Tastatur, Screenreader und Handy-Wähler gratis */
.aufnahme-pegel.still i { opacity: .25; }
.aufnahme-geraet { position: relative; flex: 0 1 auto; min-width: 0; max-width: 13rem; display: flex; }
.aufnahme-geraet.versteckt { display: none; }
.aufnahme-geraet select { width: 100%; min-width: 0; height: 2rem; padding: 0 1.6rem 0 .55rem; border-radius: var(--sw-radius-pill, 999px); border: 1px solid var(--linie, currentColor); background-color: transparent; color: inherit; font: inherit; font-size: .85rem; text-overflow: ellipsis; }
.aufnahme-geraet-ic { display: none; }
.transkript-hinweis { margin: 0 0 .4rem; }
.transkript-hinweis svg { width: 1rem; height: 1rem; flex: none; }
.transkript-hinweis .knopf { margin-left: auto; }
@media (max-width: 48rem) {
  .aufnahme { gap: .4rem; }
  .aufnahme-pegel { width: auto; flex: 1; min-width: 3rem; justify-content: flex-end; }
  .aufnahme-hinweis { display: none; }
  .mit-hinweis .aufnahme-hinweis { display: block; }
  .mit-hinweis .aufnahme-pegel, .mit-hinweis .aufnahme-wort { display: none; }
  /* Am Handy nur das Mikrofon-Zeichen; das unsichtbare select darüber öffnet den Wähler des Systems */
  .aufnahme-geraet { flex: none; width: var(--griff); height: var(--griff); max-width: none; align-items: center; justify-content: center; border-radius: var(--sw-radius-round, 50%); color: var(--akzent-text); }
  .aufnahme-geraet-ic { display: flex; }
  .aufnahme-geraet-ic svg { width: 1.3rem; height: 1.3rem; }
  .aufnahme-geraet select { position: absolute; inset: 0; height: 100%; opacity: 0; padding: 0; border: 0; }
  .aufnahme-geraet:focus-within { outline: 2px solid var(--akzent-text); outline-offset: 2px; }
}

/* Hinweis „In der Schulwerft gebaut“ (web/werft-badge) am Ende von „Mein Konto“: Seitenende, nie im Weg der Arbeit.
   Der Link trägt eigenen Innenabstand (Trefferfläche), darum um diesen nach links, damit die Schrift mit den
   Abschnitten fluchtet. Profil marke.hinweisGebaut (schulwerft an, bertha aus), Administration marke.hinweis_gebaut. */
.konto-fuss { margin: 2.5rem 0 .25rem -10px; }

/* ---------- Bewegung der App-Spalte (0.5.4) ----------
   Dauern und Kurven aus der Formsprache (wasser-tokens.css): Fenster --sw-dur-window mit der Dünung --sw-ease-swell,
   Abgang --sw-dur-flow mit --sw-ease-settle. Ohne Wasser (Profil bertha) dieselben Werte als Rückfall. Nur transform
   und opacity. Ein-, Ausblenden, Öffnen der ersten und Schließen der letzten App laufen als View Transition
   (app.js mitUebergang, <html data-uebergang>): Das Gespräch gleitet zur Seite, sein Text blendet über, statt
   umzubrechen; die Spalte schwimmt von ihrer Seite herein. Der Wechsel zwischen Reitern ist eine Überblendung mit
   kurzem Weg in Richtung des Reiters. Die Apps selbst bewegen sich dabei nicht im DOM und laden nicht neu. */
:root {
  --spalte-dauer: var(--sw-dur-window, 460ms);
  --spalte-dauer-zu: var(--sw-dur-flow, 320ms);
  --spalte-kurve: var(--sw-ease-swell, cubic-bezier(.3, 1.15, .5, 1));
  --spalte-kurve-ruhig: var(--sw-ease-settle, cubic-bezier(.2, 0, 0, 1));
  --spalte-weg: 60px;
  --reiter-weg: 20px;
}
html[data-uebergang] #leiste { view-transition-name: wb-leiste; }
/* Nur breit gleitet das Gespräch zur Seite; schmal bleibt es stehen und das Blatt kommt darüber */
html[data-uebergang]:not([data-uebergang$="-schmal"]) #faden-rahmen { view-transition-name: wb-faden; }
html[data-uebergang]:not([data-uebergang$="-schmal"]) .chat > .eingabe { view-transition-name: wb-eingabe; }
html[data-uebergang] .chatkopf .kopf-rechts { view-transition-name: wb-kopf-rechts; }
html[data-uebergang] #app-spalte[data-zustand="offen"] { view-transition-name: wb-spalte; }
::view-transition-group(*) { animation-duration: var(--spalte-dauer); animation-timing-function: var(--spalte-kurve-ruhig); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--spalte-dauer-zu); }
/* Gespräch und Eingabe: die Fläche gleitet, ihr Inhalt bleibt in seiner Größe und blendet um die Mitte über */
::view-transition-group(wb-faden), ::view-transition-group(wb-eingabe) { overflow: clip; }
::view-transition-old(wb-faden), ::view-transition-new(wb-faden), ::view-transition-old(wb-eingabe), ::view-transition-new(wb-eingabe) {
  width: 100%; height: 100%; object-fit: none; object-position: 50% 0; }
::view-transition-old(wb-eingabe), ::view-transition-new(wb-eingabe) { object-position: 50% 100%; }
::view-transition-old(wb-kopf-rechts), ::view-transition-new(wb-kopf-rechts) { width: 100%; height: 100%; object-fit: none; object-position: 100% 50%; }
/* Überblenden als Durchgang: das Alte geht im ersten Drittel, das Neue kommt danach. Gleichzeitig stünde der Text
   zweimal versetzt übereinander */
::view-transition-old(wb-faden), ::view-transition-old(wb-eingabe), ::view-transition-old(wb-kopf-rechts) {
  animation: wb-weg calc(var(--spalte-dauer) * .4) cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(wb-faden), ::view-transition-new(wb-eingabe), ::view-transition-new(wb-kopf-rechts) {
  animation: wb-her calc(var(--spalte-dauer) * .5) var(--spalte-kurve-ruhig) calc(var(--spalte-dauer) * .2) both; }
/* Ausblenden: alles gemeinsam und kürzer, ohne Nachschwingen */
html[data-uebergang^="spalte-zu"]::view-transition-group(*) { animation-duration: var(--spalte-dauer-zu); }
@keyframes wb-weg { to { opacity: 0; } }
@keyframes wb-her { from { opacity: 0; } }
/* Die Spalte: herein mit der Dünung von rechts (schmal von unten, wie ein Blatt), hinaus ruhiger und kürzer */
/* Erst macht das Gespräch Platz, die Spalte folgt kurz danach (70 ms) und ist nach einem Drittel ganz da */
html[data-uebergang^="spalte-auf"]::view-transition-new(wb-spalte) { animation: wb-spalte-rein var(--spalte-dauer) var(--spalte-kurve) calc(var(--spalte-dauer) * .15) both; }
html[data-uebergang^="spalte-zu"]::view-transition-old(wb-spalte) { animation: wb-spalte-raus var(--spalte-dauer-zu) var(--spalte-kurve-ruhig) both; }
/* Schmal: ein deckendes Blatt, das aus seiner eigenen Fläche heraufkommt (die Gruppe schneidet ab), ohne Durchscheinen */
html[data-uebergang$="-schmal"]::view-transition-group(wb-spalte) { overflow: clip; }
/* Ganze Höhe als Weg: ohne Nachschwingen (8 % davon wären ein Sprung über den Kopf hinaus) */
html[data-uebergang$="-schmal"]::view-transition-new(wb-spalte) { animation: wb-blatt-rein var(--spalte-dauer) var(--spalte-kurve-ruhig) both; }
html[data-uebergang$="-schmal"]::view-transition-old(wb-spalte) { animation: wb-blatt-raus calc(var(--spalte-dauer-zu) * .85) var(--spalte-kurve-ruhig) both; }
@keyframes wb-spalte-rein { from { transform: translateX(var(--spalte-weg)); opacity: 0; } 35% { opacity: 1; } }
@keyframes wb-spalte-raus { 30% { opacity: 1; } to { transform: translateX(calc(var(--spalte-weg) * .7)); opacity: 0; } }
@keyframes wb-blatt-rein { from { transform: translateY(100%); } }
@keyframes wb-blatt-raus { 70% { opacity: 1; } to { transform: translateY(100%); opacity: 0; } }
/* Reiter: die neue App kommt von der Seite ihres Reiters, die alte geht zur anderen; sichtbar wird sie sofort,
   unsichtbar erst nach dem Ausblenden */
/* Überlappender Durchgang: die alte geht in 200 ms, die neue kommt ab 100 ms; nie eine leere Karte */
.app-spalte .app-rahmen { transition: opacity calc(var(--spalte-dauer) * .45) cubic-bezier(.4, 0, 1, 1), transform var(--spalte-dauer) var(--spalte-kurve), visibility 0s linear calc(var(--spalte-dauer) * .45); }
.app-spalte .app-rahmen[data-lage="vorne"] { transition: opacity var(--spalte-dauer-zu) var(--spalte-kurve-ruhig) calc(var(--spalte-dauer) * .22), transform var(--spalte-dauer) var(--spalte-kurve), visibility 0s; }
.app-spalte .app-rahmen[data-lage="davor"] { transform: translateX(calc(-1 * var(--reiter-weg))); }
.app-spalte .app-rahmen[data-lage="danach"] { transform: translateX(var(--reiter-weg)); }
.app-spalte .app-rahmen[data-lage="weg"] { transition: none; }
.app-reiter-strich { transition: transform var(--spalte-dauer-zu) var(--spalte-kurve); }
.app-schalter .spalte-flaeche { transition: opacity var(--spalte-dauer-zu) var(--spalte-kurve-ruhig); }
.app-schalter-punkt { transition: opacity var(--spalte-dauer-zu) var(--spalte-kurve-ruhig), transform var(--sw-dur-release, 520ms) var(--sw-ease-buoy, cubic-bezier(.34, 1.45, .64, 1)); }
.app-startet { animation: wb-erscheinen var(--spalte-dauer-zu) ease .4s both; }
@media (prefers-reduced-motion: reduce) {
  .app-spalte .app-rahmen, .app-reiter-strich, .app-schalter .spalte-flaeche, .app-schalter-punkt { transition: none; }
  .app-spalte .app-rahmen[data-lage] { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Handgriffe und Wissen (Scheibe G): Liste mit Zeilen zum Öffnen, Editor als eigene Seite. Nur vorhandene Bauteile
   (liste schlicht, feld, pillen, knopf); keine Karte in der Karte, keine farbigen Linksstriche */
.hg-leiste { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.hg-oeffnen { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; width: 100%; min-height: var(--griff, 2.75rem);
  padding: .2rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.hg-oeffnen .titel { font-weight: 600; }
.hg-oeffnen:hover .titel { color: var(--akzent-text); }
.hg-zeile.aus .hg-oeffnen { color: var(--tinte-2); }
.hg-spur { margin-top: .35rem; }
.hg-spur p { margin: 0; }
.hg-knoepfe { flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.hg-kopf { margin: 0 0 .4rem -.6rem; }
.hg-titel { margin-bottom: .3rem; }
.hg-wer { margin: 0 0 .5rem; }
.hg-ziel { font-size: 1.15rem; margin: .8rem 0 1rem; }
.hg-meldung { margin: .6rem 0 1rem; }
.hg-entscheid { margin: .6rem 0 1.2rem; padding: .75rem 0; border-block: 1px solid var(--linie); }
.hg-entscheid p { margin: 0 0 .4rem; font-weight: 600; }
.hg-meldung p { margin: 0 0 .5rem; }
.hg-editor fieldset, .w-neu fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.hg-editor legend, .w-neu legend { padding: 0; margin-bottom: .35rem; }
.w-neu { max-width: 42rem; margin-bottom: 2.4rem; }
.w-neu .feld textarea { width: 100%; }
.hg-editor .feld textarea, .hg-editor .feld input, .hg-editor select { width: 100%; }
.hg-schrittliste { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .5rem; }
.hg-schritt { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .4rem; align-items: start; }
.hg-nr { padding-top: .65rem; text-align: right; color: var(--tinte-2); font-variant-numeric: tabular-nums; }
.hg-schritt textarea { min-height: var(--griff, 2.75rem); resize: vertical; field-sizing: content; }
.hg-schritt-knoepfe { display: flex; }
.hg-schritte-lesen { margin: 0; padding-left: 1.4rem; }
.hg-schritte-lesen li { margin-bottom: .3rem; }
.hg-dienste .liste.schlicht > li { align-items: center; }
.hg-dienste select { margin-top: .5rem; }
@media (max-width: 30rem) {
  /* Handy: Knöpfe des Schritts unter das Feld, das Feld bekommt die ganze Breite */
  .hg-schritt { grid-template-columns: 1.6rem 1fr; }
  .hg-schritt-knoepfe { grid-column: 2; justify-content: flex-end; margin-top: -.2rem; }
  .hg-dienste .liste.schlicht > li { flex-wrap: wrap; }
}
.hg-zeile { cursor: pointer; }
.hg-chevron { flex: none; align-self: center; color: var(--tinte-2); }
.hg-meldung p { font-weight: 400; }
.hg-meldung .knopf { white-space: normal; max-width: 100%; height: auto; }
/* Speichern bleibt am Handy erreichbar: Fußleiste klebt am unteren Rand */
.hg-aktionen { margin: .2rem 0 1rem; }
.hg-editor .hg-fuss { position: sticky; bottom: 0; z-index: 2; background: var(--papier); padding: .6rem 0 calc(.6rem + env(safe-area-inset-bottom)); margin-bottom: 0; }
html:has(.hg-editor) { scroll-padding-bottom: 5.5rem; }
html.hat-hg-editor { scroll-padding-bottom: 5.5rem; }

/* ---------- Geplant (Entscheid fisc 17.11.2026): dieselben Bauteile wie Handgriffe (liste schlicht, feld, pillen,
   schalter), eine Zeile je Eintrag, keine Karte in der Karte */
.gp-oeffnen { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; width: 100%; min-height: var(--griff, 2.75rem);
  padding: .2rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gp-oeffnen .titel { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
@media (hover: hover) { .gp-oeffnen:hover .titel { color: var(--akzent-text); } }
.gp-frisch { background: var(--akzent-weich); transition: background .6s; }
.inhalt.gp, .inhalt.gp-editor { max-width: 44rem; }
#gp-meldung:empty { display: none; }
.gp-wann { font-size: .95rem; }
.gp-zeile.aus .gp-oeffnen .titel, .gp-zeile.aus .gp-wann { color: var(--tinte-2); }
.gp-zeile { cursor: pointer; }
.gp-leer { max-width: 34rem; }
.gp-leer p { margin: 0 0 .5rem; }
.gp-beispiel { white-space: normal; text-align: left; height: auto; min-height: var(--griff, 2.75rem); }
.gp-schalter { display: flex; align-items: flex-start; gap: .75rem; margin: .4rem 0 .6rem; }
.gp-schalter .schalter { margin-top: .15rem; }
.gp-schalter-titel { display: block; font-weight: 600; }
.gp-zustand { display: block; }
.gp-info { margin: 0 0 1.1rem; }
.gp-editor .feld textarea { width: 100%; field-sizing: content; min-height: 4.5rem; }
.gp-editor fieldset[disabled] { opacity: .6; }
.gp-editor fieldset .pillen { margin-bottom: .6rem; }
.gp-tage { gap: .4rem; margin-bottom: .2rem; }
.gp-tage .pille[aria-pressed="true"] { background: var(--akzent-text); border-color: var(--akzent-text); color: var(--auf-akzent); }
.gp-vorlagen { gap: .2rem; margin: 0 0 .6rem -.6rem; flex-wrap: wrap; }
.gp-vorlagen .knopf[aria-pressed="true"] { text-decoration: underline; text-underline-offset: .25em; }
.gp-uhr { margin-right: .3rem; }
.gp-tage .pille { min-width: var(--griff, 2.75rem); min-height: var(--griff, 2.75rem); justify-content: center; padding-inline: .5rem; }
.gp-zeit input, .gp-uhr input { min-height: var(--griff, 2.75rem); font: inherit; max-width: 100%; }
.gp-editor .feld :is(.gp-zeit, .gp-uhr) input { width: auto; }
.gp-editor .feld .gp-zeit input { min-width: 13rem; }
.gp-editor :is(input[type=time], input[type=datetime-local]) { border: 1px solid var(--linie-stark); background: var(--flaeche); color: inherit;
  border-radius: var(--r-s); padding: .45rem .7rem; }
.gp-uhren { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.gp-uhr { display: inline-flex; align-items: center; gap: .2rem; }
.gp-eigen { margin: 0 0 .5rem; }
.gp-loeschen { margin: 1.6rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.gp-loeschen .knopf { padding-inline: 0; }

/* ---------- Review 17.11.2026 (UX nach Apple HIG und Claude-App) ---------- */
/* Trefferflächen mindestens 44 pt bei Touch: Text- und Rundknöpfe, Menü und Verlauf; Pillen über eine unsichtbare
   Fläche, damit die Reihe nicht höher wird */
@media (pointer: coarse) {
  .knopf.text, .knopf.rund { min-height: 44px; }
  .knopf.rund { width: 44px; }
  .nav a, .verlauf a { min-height: 44px; }
  .pille { position: relative; }
  .pille::after { content: ""; position: absolute; inset: -8px -2px; }
}
/* Eingabefeld: ein Fokusring statt Rand und abgesetzter Umriss */
.feldrahmen:focus-within { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
/* Bot bauen am Handy: die Fußleiste bleibt unten am Bildschirm statt mitten im Bild zu schweben */
@media (max-width: 48rem) { .bau-fuss { position: sticky; bottom: 0; background: var(--papier); } }
/* Eingeklappte Leiste: „Neues Gespräch“ unter dem Paneel-Knopf, Symbole größer */
.nur-eingeklappt { display: none; }
@media (min-width: 48.01rem) {
  body.leiste-zu .leiste-kopf > .nur-eingeklappt { display: inline-flex; }
  body.leiste-zu .leiste .nav .ic { width: 20px; height: 20px; }
  body.leiste-zu .leiste .nav a { min-width: 44px; min-height: 44px; }
}
/* Seiten ohne Anmeldung: Marke mittig über dem Inhalt */
.tor-schlicht .tor-kopf { align-items: center; }

/* Kopf des Gesprächs: Titel wie in der Claude-App, eine Zeile, kürzt sich vor den Knöpfen */
.chatkopf .wer { min-width: 0; flex: 1 1 auto; }
.chatkopf .kopf-titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chatkopf .kopf-von { flex: none; white-space: nowrap; }
.chatkopf .kopf-rechts { flex: none; }

/* Menü an einem Knopf (Überlauf „…“, „+“ im Eingabefeld, Zeilen der Bots): ein Blatt, Punkte mit voller Trefferfläche */
.menue-pop { position: fixed; z-index: 60; min-width: 13rem; max-width: calc(100vw - 1rem); padding: .3rem; background: var(--papier);
  border: 1px solid var(--linie); border-radius: var(--r-l); box-shadow: 0 10px 30px rgb(0 0 0 / .14), 0 2px 6px rgb(0 0 0 / .08); }
.menue-punkt { display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 2.75rem; padding: .5rem .75rem; border: 0;
  border-radius: calc(var(--r-l) - .3rem); background: none; color: var(--tinte); font: inherit; text-align: left; cursor: pointer; }
.menue-punkt .ic { width: 18px; height: 18px; flex: none; color: var(--tinte-2); }
.menue-punkt:is(:hover, :focus-visible) { background: var(--flaeche-2); outline: none; }
.menue-punkt.gefahr, .menue-punkt.gefahr .ic { color: var(--warnung); }
@media (prefers-reduced-motion: no-preference) { .menue-pop { animation: menue-auf .12s ease-out; } }
@keyframes menue-auf { from { opacity: 0; transform: scale(.97); } }

/* Bots als Liste wie in iOS: die ganze Zeile öffnet, „…“ für Bearbeiten, Kopieren, Löschen. Keine Knöpfe unter der
   Zeile, auch am Handy nicht (Befund Gesamtprüfung 17.11.2026) */
.bot-liste > li.bot-zeile { position: relative; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .8rem; align-items: start; }
.bot-zeile > .avatar { margin-top: .15rem; }
.bot-zeile > .bot-mehr, .bot-zeile > .bot-chevron { align-self: center; }
.bot-zeile .bot-text { min-width: 0; }
.bot-zeile .bot-oeffnen { all: unset; cursor: pointer; display: inline; }
.bot-zeile .bot-oeffnen::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-s); }
.bot-zeile .bot-oeffnen:focus-visible::after { outline: 2px solid var(--akzent-text); outline-offset: -2px; }
.bot-zeile:hover { background: var(--flaeche-2); }
.bot-zeile .bot-beschreibung { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--tinte-2); }
.bot-zeile .marke-schild { margin-left: .35rem; vertical-align: .1em; }
.bot-zeile .recht-schild { display: inline-block; margin: .15rem 0 .1rem; padding: .05rem .5rem; border-radius: var(--r-voll);
  background: var(--akzent-weich); color: var(--akzent-text); font-size: .75rem; font-weight: 600; }
.bot-zeile .bot-mehr { position: relative; z-index: 1; }
.bot-zeile .bot-chevron { color: var(--tinte-2); display: inline-flex; }
.bot-zeile .bot-chevron .ic { width: 18px; height: 18px; }
.filter-zeile { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin: .6rem 0 .9rem; }
.filter-zeile:empty { display: none; }
.filter-wahl select { min-height: 2.75rem; padding: .35rem 2rem .35rem .8rem; border: 1px solid var(--linie-stark); border-radius: var(--r-voll); background-color: var(--flaeche); color: var(--tinte); font: inherit; font-size: max(16px, .9rem); border-radius: var(--r-voll) !important; }
.filter-zeile .schalterzeile { margin: 0; }
@media (max-width: 48rem) {
  .bot-liste > li.bot-zeile { grid-template-columns: auto minmax(0, 1fr) auto auto; } .bot-zeile .bot-chevron { display: none; }
  .filter-zeile { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding: .1rem 1rem; }
  .filter-zeile::-webkit-scrollbar { display: none; }
  .filter-zeile > * { flex: none; }
}
.filter-wahl select { max-width: 12rem; text-overflow: ellipsis; }
.bot-zeile .bot-chevron { display: none; }

/* Schritt Teilen: drei Abschnitte in einer Fläche, getrennt durch Abstand und eine Linie, keine Karte in der Karte */
.bau-gruppe { padding: 1rem 0 .4rem; border-top: 1px solid var(--linie); }
.bau-gruppe:first-child { border-top: 0; padding-top: 0; }
.bau-gruppe > h3 { font-size: 1rem; margin: 0 0 .6rem; }
.bau-gruppe .schalterzeile small.hilfe { display: block; }
.freigabe-stand { margin: .6rem 0 0; }
.angaben { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0 0 1rem; }
.angaben dt { color: var(--tinte-2); }
.angaben dd { margin: 0; }
.wahlfeld { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.wahlfeld legend { padding: 0; margin-bottom: .4rem; }
.pillen.jahrgaenge .pille { min-width: 2.75rem; justify-content: center; }

/* Einstellungen als Gruppe wie in den iOS-Einstellungen: eine Fläche, Zeilen mit Linie, Zustand rechts (Mein Lotse) */
.einstellungen { margin: .9rem 0 1rem; }
.einstellungen h3 { font-size: .95rem; margin: 0 0 .45rem; }
.gruppe { list-style: none; margin: 0 0 .4rem; padding: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-l); }
.gruppe > li { display: flex; align-items: center; gap: .9rem; min-height: 2.75rem; padding: .7rem .95rem; }
.gruppe > li + li { border-top: 1px solid var(--linie); }
.gruppe .einstellung-text { flex: 1; min-width: 0; }
.gruppe .titel { font-weight: 600; }
.gruppe .meta { font-size: .85rem; color: var(--tinte-2); margin-top: .1rem; }
.stand-wert { flex: none; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .9rem; }
.stand-wert::before { content: ""; width: .55rem; height: .55rem; border-radius: var(--sw-radius-round, 50%); background: var(--tinte-2); }
.stand-wert.an { color: var(--akzent-text); }
.stand-wert.an::before { background: var(--akzent-text); }
.stand-wert.aus { color: var(--tinte-2); }

/* Recht je Handgriff: ein Schild unter dem Ziel, Farbe nur für „Bearbeitbar“ */
.hg-recht { display: inline-block; margin: .2rem 0 .1rem; padding: .05rem .5rem; border-radius: var(--r-voll); font-size: .75rem;
  font-weight: 600; background: var(--flaeche-2); color: var(--tinte-2); }
.hg-recht[data-recht="bearbeiten"] { background: var(--akzent-weich); color: var(--akzent-text); }

/* Formsystem beim Bot-Bau (Befund Gesamtprüfung 17.11.2026): die Schritt-Karte ist die einzige Karte. Die Bühne des
   Bilds liegt ohne eigenen Rahmen auf ihr, so steht keine Karte in der Karte */
.bild-buehne { background: none; border: 0; padding: .6rem 0 1rem; }
.vorschlag-karte { border: 0; border-top: 1px solid var(--linie); border-radius: 0; background: none; overflow: visible; }
.vorschlag-karte .vk-kopf { background: none; padding-inline: 0; }
.pillen.jahrgaenge { gap: .55rem; }

/* iOS-Safari zoomt bei Feldern unter 16 px (Befund UX-Prüfung 17.11.2026) */
@media (pointer: coarse) { .vs-eingabe .feldrahmen textarea, .beschreibung-zeile input, .aufnahme-geraet select { font-size: max(16px, 1em); } }
/* Vorschlag im Feld: keine Karte in der Karte, kein farbiger Linksstrich */
.vorschlag-feld { border: 0; border-top: 1px solid var(--linie); border-radius: 0; background: none; }
/* Wischreihen beginnen am Seitenrand */
.pillen.reiter, .pillen.bereiche, .filter-zeile { scroll-padding-inline: 1rem; }
/* Vorschläge linksbündig wie überall; offenes Menü verdeckt keine halben Pillen */
body:has(.menue-pop) .startfragen { visibility: hidden; }
body.hat-menue-pop .startfragen { visibility: hidden; }
/* Menü: eigene Fläche, Linie vor der zerstörenden Aktion */
.menue-pop { background: var(--flaeche); }
.menue-punkt.gefahr { border-top: 1px solid var(--linie); border-radius: 0 0 calc(var(--r-l) - .3rem) calc(var(--r-l) - .3rem); margin-top: .2rem; }
/* Werte in „Was für dich gilt“: grau und rechtsbündig wie in iOS, ohne farbigen Punkt */
.stand-wert, .stand-wert.an { color: var(--tinte-2); font-weight: 500; }
.stand-wert::before, .stand-wert.an::before { content: none; }
/* Schilder neutral, nur für Ausnahmen */
.bot-zeile .recht-schild, .hg-recht { background: var(--flaeche-2); color: var(--tinte-2); }

/* Person unten in der Leiste: ein Knopf, öffnet „Mein Konto“ und „Abmelden“ (wie das Kontomenü der Claude-App) */
.leiste .person { width: 100%; margin-top: auto; border: 0; border-top: 1px solid var(--linie); background: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer; min-height: 2.75rem; border-radius: var(--r-s); padding: .55rem .4rem; }
.leiste .person:hover, .leiste .person[aria-expanded="true"] { background: var(--flaeche-2); }
.leiste .person-text { display: flex; flex-direction: column; min-width: 0; }
.leiste .person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Nachprüfung Seitenleiste: „Neues Gespräch“ fest im Kopf der offenen Leiste (wie in der Claude-App), nicht im Inhalt;
   Personenknopf zeigt sein Menü an; eingeklappte Knöpfe ohne Fläche; Titel am Handy mit Abstand zum „…“ */
.leiste-kopf .kopf-neu { margin-left: auto; }
@media (min-width: 48.01rem) {
  .leiste-kopf { min-height: 2.75rem; display: flex; align-items: center; gap: .25rem; }
  .chatkopf [data-neu] { display: none; }
}
.leiste .person { display: flex; align-items: center; gap: .6rem; }
.leiste .person::after { content: ""; margin-left: auto; width: .5rem; height: .5rem; border-right: 1.5px solid var(--tinte-2);
  border-bottom: 1.5px solid var(--tinte-2); transform: rotate(-135deg) translate(-2px, -2px); flex: none; }
.menue-punkt.trenner { border-top: 1px solid var(--linie); border-radius: 0; margin-top: .2rem; }
body.leiste-zu .zu-knoepfe, body.app-offen .zu-knoepfe { background: none; backdrop-filter: none; }
.zu-knoepfe .paneel-knopf { background: none; }
@media (max-width: 48rem) { .kopf-mitte { padding-inline: .25rem .5rem; } }
/* Leerer Kopf im neuen Gespräch: ohne Titel, Menü, Bot, Kontext oder App keine leere Leiste mit Linie */
@media (min-width: 48.01rem) {
  .chatkopf:not(:has(.kopf-titel:not(:empty), .kontext, [data-chatmenue], [data-gehe="bots"], .app-schalter)) { display: none; }
}

/* Personenmenü (fisc 18.11.2026): am Desktop Popover über dem Personenknopf, am Handy ein Blatt von unten wie in der
   Claude-App. Zahl der offenen Meldungen am Eintrag und am Personenknopf. */
.menue-punkt .zahl, .leiste .person .zahl { margin-left: auto; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: var(--r-voll);
  background: var(--akzent-text); color: var(--auf-akzent); font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.leiste .person:has(.zahl)::after { margin-left: .4rem; }
.menue-punkt.aktiv { font-weight: 600; }
.menue-punkt.aktiv .ic { color: var(--akzent-text); }
.blatt-schleier { position: fixed; inset: 0; z-index: 59; background: rgb(0 0 0 / .32); }
.menue-pop.blatt { left: 0; right: 0; bottom: 0; top: auto; max-width: none; width: 100%; border-radius: var(--r-l) var(--r-l) 0 0;
  border-bottom: 0; padding: .5rem .5rem max(.75rem, env(safe-area-inset-bottom)); max-height: 80dvh; overflow-y: auto; }
.menue-pop.blatt::before { content: ""; display: block; width: 2.25rem; height: .3rem; margin: .1rem auto .5rem; border-radius: var(--r-voll); background: var(--linie); }
.menue-pop.blatt .menue-punkt { min-height: 3rem; }
@media (prefers-reduced-motion: no-preference) {
  .menue-pop.blatt { animation: blatt-auf .22s cubic-bezier(.2, .8, .2, 1); }
  .blatt-schleier { animation: schleier-auf .2s ease-out; }
}
@keyframes blatt-auf { from { transform: translateY(100%); } }
@keyframes schleier-auf { from { opacity: 0; } }
/* Kurzinfo zum Bot über den Einträgen (Name im Kopf des Gesprächs) */
.menue-kopf { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; align-items: start; padding: .6rem .75rem .7rem;
  border-bottom: 1px solid var(--linie); margin-bottom: .2rem; max-width: 20rem; }
.menue-pop.blatt .menue-kopf { max-width: none; }
.menue-kopf .avatar { width: 2.4rem; height: 2.4rem; }
.menue-kopf .titel { font-weight: 600; }
.menue-kopf p { margin: .15rem 0 0; }

/* Angeheftet und Einträge der Leiste (fisc 18.11.2026): „…“ am Eintrag bei Zeiger und Fokus, langes Drücken am Handy.
   Ohne Karte, ohne Linksstrich: dieselbe Zeile wie „Zuletzt“. */
.verlauf .eintrag { -webkit-touch-callout: none; position: relative; display: flex; align-items: center; border-radius: var(--r-s); }
.verlauf .eintrag > a { flex: 1; min-width: 0; padding-right: 2.2rem; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.verlauf .angeheftet .eintrag > a { display: flex; align-items: center; gap: .5rem; color: var(--tinte); }
.verlauf .angeheftet .eintrag > a .titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verlauf .angeheftet .avatar.bot.mini { width: 1.25rem; height: 1.25rem; flex: none; }
.eintrag-mehr { position: absolute; right: .15rem; top: 50%; transform: translateY(-50%); width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 0; border-radius: var(--r-s); background: none; color: var(--tinte-2); cursor: pointer; opacity: 0; }
.eintrag-mehr .ic { width: 16px; height: 16px; }
.eintrag-mehr:hover { background: var(--linie); }
.eintrag:is(:hover, :focus-within) .eintrag-mehr, .eintrag-mehr[aria-expanded="true"], .eintrag:has(a[aria-current]) .eintrag-mehr { opacity: 1; }
.eintrag:has(a:focus-visible) .eintrag-mehr { opacity: 1; }
@media (hover: none) {
  /* Am Handy und Tablet öffnet langes Drücken das Menü; „…“ steht nur am offenen Eintrag */
  .eintrag:not(:has(a[aria-current])) .eintrag-mehr { opacity: 0; pointer-events: none; }
  .eintrag-mehr { width: 2.75rem; height: 2.75rem; right: 0; }
}
.angeheftet .eintrag.zieht { opacity: .45; }
.angeheftet .eintrag.davor { box-shadow: inset 0 2px 0 var(--akzent-text); }
.angeheftet .eintrag.danach { box-shadow: inset 0 -2px 0 var(--akzent-text); }
.angeheftet [draggable="true"] { cursor: grab; }

/* Bot im Kopf des Gesprächs: Name als Knopf mit Kurzinfo (kein Botwechsel mitten im Chat) */
.bot-name-knopf { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; min-width: 0; padding: .2rem .5rem .2rem .25rem; border: 0;
  border-radius: var(--r-s); background: none; color: inherit; font: inherit; cursor: pointer; }
.bot-name-knopf:hover, .bot-name-knopf[aria-expanded="true"] { background: var(--flaeche-2); }
.bot-name-knopf .kopf-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-name-knopf > .ic { width: 14px; height: 14px; flex: none; color: var(--tinte-2); }
.kopf-mitte.bot-name-knopf { justify-content: center; font-weight: 600; }

/* Kurzer Hinweis unten (Angeheftet, Link kopiert) */
.hinweis-zeile { position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom)); transform: translate(-50%, 1rem); z-index: 70;
  max-width: min(28rem, calc(100vw - 2rem)); padding: .6rem 1rem; border-radius: var(--r-l); background: var(--tinte); color: var(--papier);
  font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.hinweis-zeile.zeigt { opacity: 1; transform: translate(-50%, 0); }

/* Direktlink ohne Zugriff: freundlich, ohne Namen von Bot oder Person */
.kein-zugriff { display: grid; place-items: center; min-height: 60dvh; text-align: center; }
.kein-zugriff .kz-mitte { max-width: 26rem; display: grid; gap: .75rem; justify-items: center; }
.kein-zugriff .kz-mitte > .ic { width: 40px; height: 40px; color: var(--tinte-2); }
.kein-zugriff .kz-knoepfe { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; }
.bot-zeile { -webkit-touch-callout: none; }
@media (min-width: 48.01rem) { .kopf-mitte.bot-name-knopf { display: none; } }
@media (max-width: 48rem) { .hinweis-zeile { bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 4.5rem)); } }
.bot-name-knopf .kopf-titel + .ic { margin-left: .25rem; }
@media (hover: none) { .bot-name-knopf:hover { background: none; } }
@media (pointer: coarse) { .verlauf .eintrag > a { min-height: 44px; display: flex; align-items: center; } }
/* „Neue Aufgabe“ (plan 2026-11-18, B2): same fields as the editor, above the list, separated by a line */
.gp-neu { margin: 0 0 1.6rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--linie); }
.gp-neu fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.gp-neu fieldset .pillen { margin-bottom: .2rem; }
.gp-neu .feld textarea { width: 100%; field-sizing: content; min-height: 4.5rem; }
.gp-neu .hg-meldung { margin: 0 0 1rem; }
.gp-neu-wiederholung { gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.gp-neu :is(input[type=time], select) { min-height: var(--griff, 2.75rem); border: 1px solid var(--linie-stark); background: var(--flaeche);
  color: inherit; border-radius: var(--r-s); padding: .45rem .7rem; font: inherit; }
.gp-kopf-neu { margin-left: auto; }
.zuletzt-hinweis { margin: .4rem .6rem; }
/* <lotse-verbindungen> in Einstellungen: colours from the profile's theme (light and dark), not the component's
   light fallbacks. Outside the Wasser form no --sw-* is set, so the names were dark on dark (B6, 19.11.2026) */
lotse-verbindungen {
  --lotse-tinte: var(--tinte); --lotse-tinte-weich: var(--tinte-2); --lotse-karte: var(--flaeche);
  --lotse-akzent-zart: var(--akzent-weich); --lotse-linie: var(--linie-stark); --lotse-akzent: var(--akzent-text);
  --lotse-akzent-tief: var(--akzent-tief); --lotse-auf-akzent: var(--auf-akzent); --lotse-warn: var(--warnung);
}

/* Wortmarke der Schule oben in der Leiste (app.js wortmarke): Link zur Brücke, Trefferfläche wie ein Griff, Fokusring
   aus :focus-visible. Breit im Kopf der Leiste, am Handy oben in der ausgeklappten Leiste */
.wortmarke { --marke-max: 1.6rem; min-height: var(--griff, 2.75rem); border-radius: var(--r-s); color: inherit; text-decoration: none; flex: 0 1 auto; }
a.wortmarke:focus-visible { outline: 3px solid var(--akzent-text); outline-offset: 2px; }
.leiste-kopf > .wortmarke { margin-right: auto; }
.rumpf-kopf > .wortmarke { margin-left: .2rem; }
@media (max-width: 48rem) { .leiste-kopf > .wortmarke { display: none; } }

/* ---------- Suchen (web/suche.js) ---------- */
.inhalt.such-ansicht { max-width: 44rem; }
.such-feld { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem;
  padding: .55rem .85rem; border: 1px solid var(--linie-stark); border-radius: var(--r-voll, 999px); background: var(--papier); }
.such-feld:focus-within { outline: 2px solid var(--akzent); outline-offset: 2px; }
.such-feld svg { flex: none; width: 1.15rem; height: 1.15rem; opacity: .65; }
.such-feld input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1rem; color: inherit; outline: none; }
.such-hinweis { margin: 1.25rem .25rem; }
.such-liste { list-style: none; margin: 0; padding: 0; }
.such-treffer { display: flex; flex-direction: column; gap: .25rem; width: 100%; padding: .75rem .6rem; border: 0; border-radius: var(--sw-radius-small, .6rem);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.such-treffer:hover { background: var(--akzent-weich); }
.such-treffer:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.such-kopf { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.such-titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.such-zeit { flex: none; }
.such-ausschnitt { overflow-wrap: anywhere; line-height: 1.45; }
.such-ausschnitt mark { background: var(--marker); color: inherit; border-radius: var(--sw-radius-xs, .2rem); padding: 0 .1rem; }
.such-mehr { margin: .75rem auto 0; display: block; }
.such-ziel { animation: such-ziel 2.4s ease-out; border-radius: var(--sw-radius-small, .75rem); }
@keyframes such-ziel { 0%, 35% { box-shadow: 0 0 0 3px var(--akzent); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (max-width: 48rem) {
  .inhalt.such-ansicht { padding-top: .75rem; }
  .such-kopfzeile { display: none; }
  .such-treffer { padding: .85rem .25rem; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .such-ziel { animation: none; box-shadow: 0 0 0 3px var(--akzent); } }

/* Phones: visible viewport instead of resizes-content (web/sichtfeld.js sets --wb-vv-h/--wb-vv-top and data-tastatur on
   html). The app is pinned to the visible area, so neither the keyboard nor leftover document scroll can move the input
   row, and the canvas (html) carries the paper colour right down under the gesture bar, light and dark. */
html { background-color: var(--papier); }
@media (max-width: 48rem) {
  html, body { overflow: hidden; overscroll-behavior: none; }
  .app { position: fixed; left: 0; right: 0; top: var(--wb-vv-top, 0px); height: var(--wb-vv-h, 100dvh); }
  html[data-tastatur] .eingabe { padding-bottom: .5rem; }
}
/* Keyboard open on a phone: the empty-state intro shrinks to its heading (no picture, no sentence), so it is never
   clipped by or tucked under the suggestion chips; chips and input stay. Same rule in the overlay (.fenster.tastatur). */
@media (max-width: 48rem) {
  html[data-tastatur] .leer { padding-top: .75rem; }
  html[data-tastatur] .leer > :not(h1, h2) { display: none; }
  /* Chips in one row that scrolls sideways, so header, greeting title, chips and input fit above the keyboard */
  html[data-tastatur] .startfragen .pillen-reihe, html[data-tastatur] .startfragen:not(:has(.pillen-reihe)) {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  html[data-tastatur] .startfragen .pille { flex: none; }
  html[data-tastatur] .chatkopf, html[data-tastatur] .leiste { flex: none; }
}
/* Firefox 115 ESR has no :has(): has-rueckfall.js marks .startfragen.hat-pillen, so the chip-row rule above gets its twin */
@supports not selector(:has(*)) {
  @media (max-width: 48rem) {
    html[data-tastatur] .startfragen:not(.hat-pillen) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  }
}

/* Browser floor hint (browser-hinweis.js): visible once, dismissible, not modal */
.browser-hinweis { position: relative; z-index: 50; display: flex; align-items: flex-start; gap: .75rem; padding: .6rem .9rem; background: #FFF4D6; color: #3A2E00; border-bottom: 1px solid #E5C76B; font-size: .9rem; line-height: 1.4; }
.browser-hinweis p { margin: 0; flex: 1; }
.browser-hinweis-zu { flex: none; min-width: 2.75rem; min-height: 2.75rem; border: 0; background: none; color: inherit; font-size: 1.4rem; cursor: pointer; }
/* Herkunftsfilter in „Zuletzt“ und Talk-Symbol (Konzept 2026-11-23) */
.verlauf .zuletzt-filter { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem .6rem .1rem; }
.verlauf .zuletzt-filter .pille { min-height: 2.75rem; padding: 0 .8rem; font-size: .8rem; }
.verlauf a.talk-eintrag { display: flex; align-items: center; gap: .45rem; }
.verlauf a.talk-eintrag .titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verlauf .talk-symbol { display: inline-flex; flex: none; color: var(--tinte-2); }
.verlauf .talk-symbol .ic { width: 1rem; height: 1rem; }
.verlauf .zuletzt-filter .pille[aria-pressed="true"] { background: var(--akzent-weich); border-color: var(--akzent-text); color: var(--akzent-text); font-weight: 600; }
