/* Stil der Vorlage. Farben und Schriften kommen als Variablen aus marke.css (vom Build aus
   app.config.json erzeugt, Kontrast geprueft). Hier steht keine Farbe der Kundin.
   Mindestversionen (Kapitel 16 §5): iOS 15, Android Chrome 90, aktuelle Desktop-Browser.
   Alles Neuere nur mit Rueckfall davor: svh (iOS 15.4), dvh, :focus-visible (iOS 15.4).
   Kein color-mix() (erst iOS 16.2): abgeleitete Toene rechnet der Build aus (werkzeug/kontrast.mjs). */

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* sonst gewinnt display:flex einer Klasse gegen hidden (Audit, niedrig) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 1.0625rem/1.55 var(--schrift-text);
  min-height: 100vh; min-height: 100svh;
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}
body.seite { padding-bottom: 2rem; }
h1, h2, h3 { font-family: var(--schrift-titel); line-height: 1.2; font-weight: 600; overflow-wrap: break-word; hyphens: auto; } /* lange deutsche Woerter (Teilnahmebedingungen) sprengen sonst schmale Bildschirme */
h1 { font-size: 1.6rem; margin: 1.25rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
a { color: var(--akzent); }
img { max-width: 100%; height: auto; }

.rahmen {
  max-width: 40rem; margin: 0 auto;
  padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right));
}
main:focus { outline: none; }
.unsichtbar, .springen:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.springen:focus { position: fixed; top: .5rem; left: .5rem; z-index: 50; background: var(--grund); padding: .5rem 1rem; }

.kopf { padding-top: env(safe-area-inset-top); background: var(--grund); border-bottom: 1px solid var(--rand-leise); }
.kopf-innen { display: flex; align-items: center; gap: .6rem; min-height: 3.25rem; }
.kopf-logo { height: 2rem; width: auto; }
.kopf-name { font-family: var(--schrift-titel); font-weight: 600; font-size: 1.05rem; }

.karte { background: var(--flaeche); border-radius: .9rem; padding: 1.1rem 1rem; margin: 0 0 1rem; }
.feld { margin: 0 0 1rem; }
label { display: block; margin: 0 0 .3rem; font-weight: 500; }
input, textarea, select {
  width: 100%; font: inherit; font-size: 1rem; /* unter 16px zoomt iOS beim Tippen (U22) */
  padding: .7rem .8rem; border: 1px solid var(--rand); border-radius: .55rem; background: var(--grund); color: var(--text);
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; } /* sonst sprengt eine Checkbox die Flex-Zeile (U150) */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .6rem 1.15rem; border: 0; border-radius: .6rem;
  background: var(--akzent); color: var(--akzent-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.knopf.voll { width: 100%; margin-top: .25rem; }
.knopf.voll + .knopf.voll { margin-top: .5rem; }
.knopf.zweit { background: transparent; color: var(--akzent); box-shadow: inset 0 0 0 1.5px var(--akzent); }
.knopf.gefahr { background: var(--gefahr); color: #fff; }
.knopf.gefahr-text { color: var(--gefahr); box-shadow: inset 0 0 0 1.5px var(--gefahr); }
.knopf.klein { min-height: 36px; padding: .3rem .8rem; font-size: .9rem; }
.knopf:disabled { opacity: .55; cursor: default; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; }
.knopfreihe > .knopf { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.b-titel { font-size: 1.05rem; margin: 1.25rem 0 .25rem; }
a:focus, button:focus, input:focus, textarea:focus, select:focus { outline: 3px solid var(--akzent); outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; } /* Rueckfall: ohne :focus-visible bleibt der Rahmen */
@media (hover: hover) and (pointer: fine) { .knopf:hover { filter: brightness(1.08); } } /* U24 */

.leise { color: var(--leise); }
.status { min-height: 1.5em; }
.gruss { font-family: var(--schrift-titel); font-size: 1.5rem; margin: 1.25rem 0 .5rem; }
.start-bild { display: block; width: 100%; border-radius: .9rem; margin-top: 1rem; aspect-ratio: 16 / 9; object-fit: cover; }
.text p, .text ul, .text ol { margin: 0 0 .9rem; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.kachel { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: .9rem; background: var(--flaeche); color: var(--text); text-decoration: none; font-weight: 600; min-height: 6rem; }
.kachel .symbol { width: 1.75rem; height: 1.75rem; color: var(--akzent); }
.symbol { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { padding: .7rem 0; border-top: 1px solid var(--rand-leise); }
.liste > li:first-child { border-top: 0; }
.zeile { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.zeilenknopf { display: block; width: 100%; min-height: 44px; padding: .2rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.block { display: block; }
.klein { font-size: .9rem; }
.schalter-zeile { display: flex; align-items: flex-start; gap: .5rem; margin: 0 0 1rem; font-weight: 500; }
.schalter-zeile input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; flex: none; }
.knopfreihe input { flex: 1 1 12rem; width: auto; }
.ebene h3 { margin: 1.25rem 0 .5rem; font-size: 1.05rem; }
.integrationen { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: .75rem; }
.integration { border: 1px solid var(--rand-leise); border-radius: .75rem; padding: .9rem; background: var(--grund); }
.integration h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.integration.fehler { border-color: var(--gefahr); }
.hinweis-warn { margin: .4rem 0; padding: .45rem .6rem; border-radius: .5rem; background: color-mix(in srgb, #e0a800 18%, transparent); border-left: 3px solid #e0a800; }
.marke.aus { background: var(--flaeche); }
.gefahr-farbe { color: var(--gefahr); }
select { width: 100%; font: inherit; font-size: 1rem; padding: .7rem .8rem; border: 1px solid var(--rand); border-radius: .55rem; background: var(--grund); color: var(--text); }
.video { position: relative; margin: 0 0 1rem; padding: 1.25rem; border-radius: .9rem; background: var(--flaeche); text-align: center; }
.video.laeuft { padding: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.video.laeuft iframe { width: 100%; height: 100%; border: 0; display: block; }
@supports not (aspect-ratio: 1) { .video.laeuft { height: 0; padding-bottom: 56.25%; } .video.laeuft iframe { position: absolute; inset: 0; top: 0; left: 0; } }
.videowahl { display: flex; align-items: center; gap: .75rem; }
.videowahl img { border-radius: .4rem; flex: none; }
.vereinbarung-text { white-space: pre-wrap; max-height: 50vh; overflow: auto; padding: 1rem; margin: 0 0 1rem; border: 1px solid var(--rand); border-radius: .6rem; background: var(--grund); }
.unterschrift-feld { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; touch-action: none; background: #fff; border: 1px solid var(--rand); border-radius: .6rem; }
.mitte { text-align: center; }
.einrichten { padding-left: 1.25rem; margin: 1rem 0; }
.einrichten > li { margin-bottom: 1.25rem; }
.einrichten > li.erledigt { opacity: .6; }
.einrichten-schritte { padding-left: 1.25rem; margin: .5rem 0; }
.einrichten-schritte li { margin: .3rem 0; }
.b-zeile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.b-zeile.aus { opacity: .55; }
.b-frequenz { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid var(--rand); border-radius: .75rem; }
.schalter { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 2.9rem; height: 1.7rem; margin: 0; border-radius: 1rem; background: var(--rand); cursor: pointer; transition: background .15s; }
.schalter::after { content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.schalter:checked { background: var(--akzent); }
.schalter:checked::after { transform: translateX(1.2rem); }
.schalter:disabled { cursor: not-allowed; opacity: .5; }
.schalter:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
/* In einer Schalterzeile gilt die Haken-Groesse (.schalter-zeile input) nicht fuer den Schalter: sonst schrumpft er und der Knopf liegt ueber dem Text */
.schalter-zeile input.schalter { width: 2.9rem; height: 1.7rem; margin: 0; }
/* Netzwerk: Richtlinien (beim Beitreten aufklappbar, nach einer neuen Fassung als Karte) */
.nw-richtlinien ol { padding-left: 1.25rem; margin: 0 0 .9rem; }
.nw-richtlinien li { margin: 0 0 .5rem; }
.as-schritte { list-style: none; padding: 0; margin: .5rem 0 0; }
.as-schritt { display: flex; gap: .6rem; align-items: baseline; margin: 0 0 .45rem; }
.as-haken { flex: none; width: 1.2rem; text-align: center; font-weight: 700; color: var(--leise); }
.as-schritt.ok .as-haken { color: var(--akzent); }
.as-code { font: 600 1.35rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; background: var(--grund); border-radius: .55rem; padding: .6rem .8rem; margin: .4rem 0 .8rem; display: inline-block; user-select: all; }
.as-eingabe { margin: .4rem 0 1rem; padding: .7rem .8rem; background: var(--grund); border-radius: .55rem; }
.as-eingabe dt { font-size: .85rem; font-weight: 600; margin: .35rem 0 0; }
.as-eingabe dt:first-child { margin-top: 0; }
.as-eingabe dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.as-eingabe dd.as-code { font-size: .85rem; word-break: break-all; display: block; }
.as-app { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .5rem .75rem; padding: .6rem 0; border-top: 1px solid var(--rand-leise); }
.as-app .knopfreihe { margin: 0; }
.as-nummer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem 0; }
.as-wortlaut { display: flex; gap: .6rem; align-items: flex-start; margin: .6rem 0 .8rem; font-size: .95rem; }
.as-wortlaut input { margin-top: .3rem; flex: none; width: auto; }
.as-beispiele { padding-left: 1.2rem; margin: .4rem 0 .8rem; }
.as-beispiele li { margin: 0 0 .35rem; }
details > summary { cursor: pointer; margin: 0 0 .75rem; color: var(--akzent); }
.social-medien { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .5rem; margin: .5rem 0; }
.social-medien figure { position: relative; margin: 0; }
.social-medien img, .social-medien video, .social-wahl img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .5rem; display: block; }
.social-medien figure button { position: absolute; top: .25rem; right: .25rem; }
.social-wahl { padding: 0; border: 0; background: none; cursor: pointer; min-height: 2.75rem; }
.social-zeile { display: flex; gap: .75rem; align-items: center; }
.social-zeile > img, .social-leer { flex: none; width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: .5rem; background: var(--flaeche); }
.wa-verlauf { display: flex; flex-direction: column; gap: .5rem; max-height: 55vh; overflow-y: auto; margin: 1rem 0; padding: .25rem; }
.wa-blase { max-width: 85%; padding: .55rem .75rem; border-radius: .9rem; background: var(--grund); border: 1px solid var(--rand-leise); }
.wa-blase p { margin: 0 0 .2rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-blase.ein { align-self: flex-start; border-bottom-left-radius: .25rem; }
.wa-blase.aus { align-self: flex-end; border-bottom-right-radius: .25rem; background: var(--akzent-hell); }
.ablauf { list-style: none; margin: 1rem 0; padding: 0; }
.ablauf li { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 auto 1.25rem; padding: .7rem .9rem; max-width: 24rem; border: 1px solid var(--rand); border-radius: .7rem; background: var(--grund); }
.ablauf li + li::before { content: ''; position: absolute; top: -1.25rem; left: 50%; height: 1.25rem; border-left: 2px solid var(--rand); }
.ablauf .ablauf-ausloeser { flex-direction: column; align-items: flex-start; border-color: var(--akzent); background: var(--akzent-hell); }
.ablauf .warten { border-style: dashed; }
.ablauf-schritt > span { flex: 1; min-width: 0; }
.ablauf details { width: 100%; }
code.block { display: block; padding: .6rem .75rem; margin: .5rem 0; border-radius: .5rem; background: var(--grund); border: 1px solid var(--rand-leise); overflow-wrap: anywhere; font-size: .9rem; }
.marke { display: inline-block; padding: .1rem .55rem; border-radius: 1rem; background: var(--akzent-hell); color: var(--text); font-size: .85rem; font-weight: 600; }

.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  background: var(--grund); border-top: 1px solid var(--rand-leise);
  padding: .25rem max(.25rem, env(safe-area-inset-right)) calc(.25rem + env(safe-area-inset-bottom)) max(.25rem, env(safe-area-inset-left));
}
.leiste-punkt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .1rem; min-height: 48px; padding: .3rem .2rem; color: var(--leise); text-decoration: none; font-size: .75rem; border-radius: .5rem; }
.leiste-punkt[aria-current="page"] { color: var(--akzent); font-weight: 600; }
@media (max-width: 380px) { .leiste-punkt { font-size: .68rem; padding-left: 0; padding-right: 0; } }
.leiste-punkt span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.meldung { position: fixed; left: 1rem; right: 1rem; bottom: calc(5rem + env(safe-area-inset-bottom)); z-index: 70; /* ueber .ebene-hg (60), sonst unsichtbar aus jedem Fenster */ max-width: 30rem; margin: 0 auto; padding: .75rem 1rem; border-radius: .6rem; background: var(--text); color: var(--grund); }
.meldung.fehler { background: var(--gefahr); color: #fff; }
.inapp-hinweis { background: var(--hinweis); padding: .75rem 1rem; border-radius: .6rem; margin: 0 0 1rem; }
.inapp-hinweis .knopf { margin-top: .25rem; }
.fuss { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 1rem; font-size: .9rem; }
.fuss a { color: var(--leise); }

.ebene-hg { position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); }
.ebene { width: 100%; max-width: 32rem; max-height: 90vh; overflow: auto; background: var(--grund); border-radius: 1rem 1rem 0 0; padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom)); }
@media (min-width: 40rem) { .ebene-hg { align-items: center; } .ebene { border-radius: 1rem; } }
.ebene:focus { outline: none; }

.sw-leiste { position: fixed; left: 0; right: 0; bottom: calc(4rem + env(safe-area-inset-bottom)); z-index: 45; display: flex; gap: 1rem; align-items: center; justify-content: center; padding: .75rem 1rem; background: var(--text); color: var(--grund); }
.sw-leiste button { margin: 0; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } } /* U28 */

/* Verwaltung (zweite App unter /verwaltung/) */
.kachel.achtung { box-shadow: inset 0 0 0 2px var(--akzent); }
.kachel-wert { font-size: 1.8rem; font-weight: 700; line-height: 1.1; color: var(--akzent); }
.kachel .leise { font-weight: 400; }
.mehr-link { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; color: var(--text); text-decoration: none; min-height: 44px; }
.zur-verwaltung { margin: 0 0 1rem; }
.bereich.einzeln > h2:first-child { display: none; }
.leiste .nur-breit { display: none; }
@media (min-width: 900px) {
  body[data-app="verwaltung"] .leiste { position: fixed; top: 0; bottom: 0; left: 0; right: auto; width: 15rem; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: .15rem; padding: 4.5rem .75rem 1rem; border-top: 0; border-right: 1px solid var(--rand-leise); overflow-y: auto; }
  body[data-app="verwaltung"] .leiste .leiste-punkt { flex: none; flex-direction: row; justify-content: flex-start; gap: .65rem; font-size: .95rem; padding: .55rem .75rem; min-height: 40px; }
  body[data-app="verwaltung"] .leiste .nur-breit { display: flex; }
  body[data-app="verwaltung"] .leiste .nur-schmal { display: none; }
  body[data-app="verwaltung"] .leiste .leiste-zurueck { margin-top: auto; }
  body[data-app="verwaltung"] main, body[data-app="verwaltung"] .kopf-innen { margin-left: 16rem; max-width: 60rem; }
}

/* Modul Seiten (Verwaltung) */
.seiten-abschnitt { margin: .75rem 0; }
.seiten-bild img { max-height: 120px; width: auto; border-radius: .5rem; margin: .25rem 0; }
.seiten-paar { display: grid; gap: .25rem; padding: .5rem 0; border-bottom: 1px solid var(--rand-leise); }
.seiten-paar textarea, .seiten-paar input { width: 100%; }
.feld .label { display: block; font-weight: 600; margin-bottom: .25rem; }

/* Modul Kurse */
.kurs-balken { height: .5rem; border-radius: 1rem; background: var(--rand-leise); overflow: hidden; margin: .5rem 0 .25rem; }
.kurs-balken span { display: block; height: 100%; background: var(--akzent); }
.kurs-kachel img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .6rem; }
.kurs-lektionen { list-style: none; padding: 0; }
.kurs-link { display: flex; gap: .6rem; align-items: baseline; padding: .55rem 0; min-height: 44px; color: var(--text); text-decoration: none; }
.kurs-link.gesperrt { color: var(--leise); }
.kurs-haken { width: 1.2rem; flex: none; color: var(--akzent); font-weight: 700; }
.kurs-datei { margin: 1rem 0; } .kurs-datei audio { width: 100%; }
.kurs-blaettern { justify-content: space-between; }
.kurs-zeile { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .35rem 0; }
.kurs-zeile input { flex: 1 1 8rem; min-width: 0; }
.kurs-lektion { margin: .5rem 0; } .kurs-baustein { display: grid; gap: .25rem; padding: .5rem 0; border-bottom: 1px solid var(--rand-leise); }
.kurs-baustein textarea { width: 100%; }

/* Zahl an der Leiste und in Listen (ungelesen) */
.leiste-punkt { position: relative; }
.zahl-punkt { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: var(--akzent); color: var(--grund); font-size: .72rem; font-weight: 700; line-height: 1; }
.leiste-punkt .zahl-punkt { position: absolute; top: .15rem; left: calc(50% + .35rem); max-width: none; overflow: visible; }

/* Modul Gemeinschaft */
.gem-gruppe { display: flex; align-items: center; gap: .75rem; }
.gem-gruppe-text { flex: 1 1 auto; min-width: 0; }
.gem-gruppe-text .block { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gem-zeichen { font-size: 1.5rem; width: 2rem; text-align: center; flex: none; }
.gem-nachrichten-link { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.gem-nachrichten-link strong { flex: 1; }
.gem-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0 1rem; }
.gem-leiste select { width: auto; }
.gem-eingabe textarea { width: 100%; resize: vertical; min-height: 3rem; }
.gem-eingabe .knopfreihe { margin-top: .5rem; }
.gem-bildvorschau img, .gem-bild { display: block; max-width: 100%; max-height: 420px; border-radius: .6rem; margin: .5rem 0; object-fit: contain; }
.gem-faden { padding-bottom: .5rem; }
.gem-beitrag + .gem-antworten { border-top: 1px solid var(--rand-leise); margin-top: .5rem; padding-top: .25rem; }
.gem-beitrag.antwort { padding: .5rem 0 .25rem .75rem; border-left: 2px solid var(--rand-leise); margin-top: .5rem; }
.gem-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.gem-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .35rem 0; }
.gem-reaktionen { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.gem-reaktion { border: 1px solid var(--rand-leise); background: transparent; color: inherit; border-radius: 999px; padding: .15rem .55rem; font-size: .85rem; min-height: 32px; cursor: pointer; }
.gem-reaktion.meine { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 12%, transparent); }
.gem-reaktion.neu { color: var(--leise); }
.gem-emojis { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.gem-emoji { font-size: 1.8rem; width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 1px solid var(--rand-leise); background: transparent; cursor: pointer; }
.gem-aktionen { display: flex; flex-wrap: wrap; gap: .75rem; }
.textknopf { background: none; border: 0; padding: .35rem 0; color: var(--leise); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; min-height: 32px; }
.gem-angeheftet { border-color: var(--akzent); }
.gem-verlauf { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.gem-blase { max-width: 85%; align-self: flex-start; background: var(--flaeche); border-radius: 1rem 1rem 1rem .3rem; padding: .5rem .8rem; }
.gem-blase.eigen { align-self: flex-end; background: color-mix(in srgb, var(--akzent) 16%, transparent); border-radius: 1rem 1rem .3rem 1rem; }
.gem-blase .gem-text { margin: 0 0 .2rem; }

/* Kurswerkstatt */
.werkstatt-kopf { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; }
.werkstatt-text { width: 100%; min-height: 18rem; font-family: inherit; line-height: 1.6; }
.werkstatt-zwei { display: grid; gap: 1rem; }
@media (min-width: 720px) { .werkstatt-zwei { grid-template-columns: 1fr 1fr; } }
.werkstatt-diff p { margin: 0 0 .5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-gleich { color: var(--leise); }
.diff-aenderung { border: 1px solid var(--rand-leise); border-radius: .6rem; padding: .6rem .75rem; margin: .5rem 0 1rem; }
.diff-alt, .diff-neu { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: .4rem; }
.diff-alt del { background: color-mix(in srgb, var(--gefahr) 18%, transparent); text-decoration: line-through; }
.diff-neu ins { background: color-mix(in srgb, var(--akzent) 20%, transparent); text-decoration: none; }
.diff-wahl { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; }

/* Integrationen: Schluessel verdeckt ohne Passwortfeld (kein Speichern-Angebot), lange Pruefwoerter umbrechen */
input.verdeckt { -webkit-text-security: disc; text-security: disc; }
.umbruch { overflow-wrap: anywhere; }

/* Workflows: Ja-/Nein-Zweige eingerueckt unter der Bedingung */
.zweig { margin: .5rem 0 0 1.25rem; padding-left: .75rem; border-left: 2px solid var(--rand); }
.ablauf-zweig { margin: .25rem 0 .5rem; }

/* Workflows: grafischer Ablauf (editor.js). Kein freies Ziehen; die Anordnung folgt dem Ablauf. */
.fluss { display: flex; flex-direction: column; align-items: center; margin: 1rem 0; }
.fluss-spalte { display: flex; flex-direction: column; align-items: center; width: 100%; }
.fluss-knoten { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; width: 100%; max-width: 22rem; margin: 0 0 1.25rem;
  padding: .65rem .85rem; border: 1px solid var(--rand); border-radius: .7rem; background: var(--grund); color: var(--text); font: inherit; text-align: left; }
button.fluss-knoten { cursor: pointer; }
button.fluss-knoten:hover, button.fluss-knoten:focus-visible { border-color: var(--akzent); }
.fluss-knoten > .fluss-text { flex: 1; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.fluss-knoten > svg, .fluss-knoten > .symbol { flex: none; }
.fluss-knoten details { width: 100%; }
/* Linie nach unten zum naechsten Kaestchen */
.fluss-knoten::after { content: ''; position: absolute; left: 50%; bottom: -1.25rem; height: 1.25rem; border-left: 2px solid var(--rand); }
.fluss-spalte > :last-child.fluss-knoten::after { display: none; }
.fluss-ausloeser { flex-direction: column; align-items: flex-start; border-color: var(--akzent); background: var(--akzent-hell); }
.fluss-knoten.warten { border-style: dashed; max-width: 14rem; justify-content: center; }
.fluss-knoten.bedingung { border-color: var(--akzent); border-width: 2px; }
.fluss-plus { width: 1.9rem; height: 1.9rem; margin: -.95rem 0 .3rem; border: 1px dashed var(--akzent); border-radius: 50%; background: var(--grund); color: var(--akzent);
  font: inherit; font-weight: 600; line-height: 1; cursor: pointer; position: relative; z-index: 1; }
.fluss-plus:hover, .fluss-plus:focus-visible { background: var(--akzent-hell); }
/* Weiche: Ja links, Nein rechts, danach laufen beide wieder zusammen */
.fluss-weiche { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; width: 100%; margin: -.5rem 0 1.25rem; padding-top: .75rem; border-top: 2px solid var(--rand); position: relative; }
.fluss-weiche::after { content: ''; position: absolute; left: 50%; bottom: -1.25rem; height: 1.25rem; border-left: 2px solid var(--rand); }
.fluss-zweig { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: .5rem .35rem 0; border-radius: .6rem; background: var(--grund-zwei, transparent); }
.fluss-marke { display: inline-block; margin-bottom: .6rem; padding: .1rem .6rem; border-radius: 1rem; font-size: .85rem; font-weight: 600; border: 1px solid var(--rand); }
.fluss-zweig.ja .fluss-marke { border-color: var(--akzent); color: var(--akzent); }
.fluss-zweig .fluss-knoten { font-size: .92rem; }
/* Schmal: verschachtelte Weichen untereinander statt nebeneinander, sonst wird es unleserlich */
@media (max-width: 40rem) {
  .fluss-weiche.innen { grid-template-columns: 1fr; }
  .fluss-weiche.innen .fluss-zweig { border-left: 2px solid var(--rand); align-items: stretch; padding-left: .6rem; }
  .fluss-weiche.innen .fluss-marke { align-self: flex-start; }
  .fluss-zweig .fluss-knoten { padding: .55rem .6rem; }
}
.fluss-editor .feld:first-of-type { max-width: 24rem; }
/* Modul Shopify */
.sh-zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.sh-zahl strong { font-size: 1.15rem; }
.sh-regel { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem 0; border-top: 1px solid var(--rand-leise); }
/* Modul Mail-Zentrale */
.as-schritt span { overflow-wrap: anywhere; }
.mz-app { display: block; }
.mz-dns dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; word-break: break-all; }
.mz-dns dd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; word-break: break-all; }
.mz-bremse { color: var(--fehler, #b3261e); }
.mz-pool { margin-top: .5rem; }

/* Assistent: Chat in der Verwaltung */
.as-chat-kopf { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.as-chat-kopf h3 { margin: 0; }
.as-chat-verlauf { max-height: min(60vh, 34rem); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .6rem; padding: .75rem; margin: .6rem 0 .4rem; background: var(--grund); border-radius: .75rem; }
.as-msg { max-width: 88%; padding: .55rem .8rem; border-radius: .8rem; background: var(--flaeche); overflow-wrap: anywhere; }
.as-msg.as-ich { align-self: flex-end; background: var(--akzent-leise, var(--flaeche)); border: 1px solid var(--rand-leise); }
.as-msg.as-assistent { align-self: flex-start; }
.as-msg.as-hinweis { align-self: center; background: none; font-size: .9rem; color: var(--leise); text-align: center; padding: .2rem .5rem; }
.as-wer { display: block; font-size: .75rem; font-weight: 600; color: var(--leise); margin: 0 0 .15rem; }
.as-wer:empty { display: none; }
.as-roh { white-space: pre-wrap; margin: 0; }
.as-md p { margin: 0 0 .5rem; white-space: pre-wrap; }
.as-md p:last-child, .as-md ul:last-child { margin-bottom: 0; }
.as-md ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.as-chat-freigabe { margin: .5rem 0 0; padding: .6rem .7rem; border: 1px solid var(--rand); border-radius: .6rem; background: var(--grund); }
.as-chat-freigabe .knopfreihe { margin: .4rem 0 0; }
.as-chat-freigabe .karte { margin: 0; padding: 0; background: none; }
.as-chat-freigabe h2 { font-size: 1.05rem; margin: 0 0 .4rem; }
.as-chat-eingabe { display: flex; gap: .5rem; align-items: flex-end; }
.as-chat-eingabe textarea { flex: 1; min-width: 0; resize: vertical; min-height: 2.9rem; max-height: 40vh; }
.as-chat-denkt { margin: 0 0 .4rem; }

/* Seiten: Visual Editor (Im Bild bearbeiten) */
.ebene-hg.ve-hg { align-items: stretch; }
.ebene.ve-ebene { max-width: none; width: 100%; max-height: none; height: 100%; height: 100dvh; border-radius: 0; padding: 0; overflow: hidden; }
.ve { display: flex; flex-direction: column; height: 100%; }
.ve-leiste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem; border-bottom: 1px solid var(--rand-leise); background: var(--grund); }
.ve-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ve-knoepfe [aria-pressed="true"] { background: var(--akzent); color: var(--akzent-text); }
.ve-status { min-width: 8rem; text-align: right; }
.ve-status.ve-fehler { color: var(--fehler, #b3261e); }
.ve-buehne { flex: 1; min-height: 0; background: var(--flaeche); display: flex; justify-content: center; }
.ve-rahmen { border: 0; width: 100%; height: 100%; background: #fff; }
.ve-rahmen.ve-handy { width: 390px; max-width: 100%; box-shadow: 0 0 0 1px var(--rand); }
.ve-md { padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--rand); background: var(--grund); max-height: 55vh; overflow: auto; }
.ve-md textarea { width: 100%; min-height: 8rem; margin: .4rem 0; }
@media (max-width: 40rem) { .ve-breite { display: none; } .ve-status { min-width: 0; text-align: left; } }

.ve-panel-kopf { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin: 0 0 .5rem; }
.ve-wahlen { display: flex; flex-wrap: wrap; gap: .5rem; }
.seiten-alle { margin: 1.25rem 0 .5rem; }
.seiten-alle > summary { cursor: pointer; font-weight: 600; padding: .4rem 0; }
