/* ==========================================================================
   STUDIT Academy v0.1 – app.css
   Gesamtes Styling nach Mood Board (docs/design/*.dc.html) und SPEC §9.
   Kein Build-Schritt, keine Bibliotheken. Schrift: Montserrat (Google Fonts).

   WICHTIG für lernen.js / admin.js:
   - CSP erlaubt KEINE Inline-Skripte und KEINE onclick="…"-Attribute.
     Ereignisse immer per addEventListener (am besten Event-Delegation auf A.main()).
   - Inline-style="…" ist erlaubt (style-src 'unsafe-inline').
   - Farben nie hart kodieren, sondern Klassen unten oder var(--…) nutzen.

   --------------------------------------------------------------------------
   KLASSENLISTE (dieselbe Liste steht oben in core.js)
   --------------------------------------------------------------------------
   Grundgerüst (setzt core.js, nicht selbst bauen)
     .app .seitenleiste .seitenleiste__marke .seitenleiste__fuss .seitenleiste__person
     .nav-punkt .nav-punkt--aktiv .nav-zaehler .nav-abschnitt .mobilleiste
     .hauptbereich .inhalt-rahmen .verlaufslinie .inhalt (= A.main())
     .inhalt--breit      → auf A.main() setzen für breite Admin-Ansichten (max. 1400 px;
                           core.js setzt es für alle #/admin/…-Routen automatisch)
   Seitenkopf und Schrift
     .seitenkopf .seitenkopf__text .seitenkopf__aktionen
     .ueberzeile (11/700 blau, Versalien)  .unterzeile (12/600 gedämpft)
     .begruessung (30/700) .verlauf-text (Verlaufsschrift Blau→Pink)  .titel-gross (30 px)
     .gedaempft .klein .sehr-klein .fett .text-rechts .mono .umbruch
     .zurueck (Zurück-Knopf oben links, mit .knopf .knopf--zweit .knopf--klein)
   Raster und Abstände
     .raster-2 .raster-3 .raster-4 (mobil 1-spaltig) .stapel .stapel--eng .stapel--weit
     .zeile .zeile--zwischen .zeile--oben .wachsen .mt-auto .trenner
   Karten
     .karte .karte--tuerkis .karte--blau .karte--pink .karte--dunkel .karte--kompakt
     .karte--link (ganze Karte klickbar, <a>)  .karte__kopf .karte__titel .karte__fuss
     .jetzt-dran .jetzt-dran__label .jetzt-dran__titel  .kennzahl .kennzahl__wert .kennzahl__label
   Knöpfe
     .knopf + .knopf--haupt (Verlauf) | .knopf--akzent (Pink, max. 1 je Seite) | .knopf--zweit (weiß)
     .knopf--text .knopf--gefahr .knopf--gestrichelt .knopf--klein .knopf--icon .knopf--block
     .knopfreihe
   Chips und Abzeichen
     .chip .chip--bestanden .chip--naechstes .chip--faellig .chip--dauer .chip--pflicht
     .chip--neutral .chip--blau .chipreihe  .abzeichen .abzeichen--erreicht  .zaehler
   Fortschritt
     .ring .ring__wert (A.ring)  .fortschritt-block .phasen .phase .phase__titel
     .balken .balken__fuell .balken__fuell--blau .balken__marke
   Formulare
     .formular .formular-raster .feld .feld__label .feld__hilfe .eingabe (input/select/textarea)
     .checkzeile .schalter (input type=checkbox role=switch) .schalter-zeile
     .umschalter (Segment-Knöpfe; aktiv per aria-pressed="true" oder .ist-aktiv)
     .suchfeld (label mit Icon + input) .fehlertext .passwort-box
   Listen und Tabellen
     .liste .liste__zeile .liste--schlicht  .gruppe .gruppe__kopf .gruppe__titel
     .modulzeile .modulzeile--fertig .modulzeile__status .modulzeile__text .modulzeile__titel
     .modulzeile__kurz .modulzeile__meta  .status-kreis .status-kreis--fertig/--offen/--aktiv
     .tabelle-rahmen .tabelle .tabelle--kompakt .tabelle--matrix .zahl
     .zelle--fertig .zelle--offen .zelle--ueberfaellig .zelle--nicht_zugewiesen
     .suchergebnis .suchergebnis__titel .suchergebnis__treffer (mit <mark>)
   Lern-Bausteine (erzeugt A.bausteinHtml; Lerntext erzeugt A.md)
     .lernseite .baustein .baustein--<typ> .lerntext
     .hinweis .hinweis--info .hinweis--achtung .hinweis--merksatz .hinweis__inhalt .hinweis__titel
     .bild .video .video__rahmen .pdf .pdf-vorschau .html-modul .akkordeon .akkordeon__inhalt
     .dateikarte .dateikarte--link .dateikarte__icon .dateikarte__text .dateikarte__titel
     .dateikarte__meta .dateikarte__aktion
   Lernseite und Kurz-Check
     .schritte .schritt .schritt--fertig .schritt--aktiv .schritt__nr
     .kurzcheck .kurzcheck__kopf .frage .frage__text .frage__hinweis
     .option .option--richtig .option--falsch .option--verpasst .option__marke
     .erklaerung .ergebnis .ergebnis--bestanden .ergebnis--nicht .ergebnis__quote
   Zertifikate
     .zertifikatkarte .zertifikatkarte--offen .zertifikatkarte__text .zertifikatkarte__titel
     .zertifikatkarte__meta
     .druck-zertifikat = Druck-Markierung (A4 quer, randlos): beim Drucken ist NUR dieses
       Element sichtbar. Gestaltung des Zertifikats liefert die Ansicht selbst.
     .nicht-drucken (wird beim Drucken immer ausgeblendet)
   Admin / Baukasten
     .editor-raster (Struktur | Seite | Einstellungen) .panel .panel__titel .panel__abschnitt
     .baum .baum__bereich .baum__gruppe .baum__modul .baum__modul--aktiv .baum__modul--entwurf
     .reiter .reiter__knopf (aktiv per aria-selected="true" oder .ist-aktiv)
     .baustein-zeile .baustein-zeile--aktiv .baustein-zeile__griff .baustein-zeile__typ
     .baustein-zeile__text .baustein-zeile__aktionen .baustein-formular .einfuegen .einfuegen__titel
     .dialog (für natives <dialog>, mit ::backdrop) .dialog__kopf .dialog__fuss
   Zustände und Hilfen
     .leer .lade .fehlerkarte .toast-bereich .toast .toast--ok .toast--fehler
     .sr-only .sprunglink .ist-aktiv  [hidden]
   Anmeldung (setzt core.js)
     .anmeldung .anmeldung-karte .anmeldung-kopf .anmeldung-band .anmeldung-inhalt .anmeldung-fuss
   ========================================================================== */

/* ---------- Design-Tokens (SPEC §9) ---------- */
:root {
  --dunkelblau: #25388E;
  --blau: #136BC0;
  --pink: #F84791;          /* Akzent für Linien, Marken, Icons */
  --pink-tief: #DB2A79;     /* Pink für Flächen mit weißer Schrift (Kontrast ≥ 4.5:1) */
  --pink-text: #b0145a;
  --tuerkis: #57DBD8;
  --tuerkis-text: #0d5f5c;
  --tuerkis-tief: #0f7d79;
  --rose: #F9B8B1;
  --rose-text: #8a2130;
  --cloud: #FFFCF4;
  --text: #1d2a6e;
  --gedaempft: #4a5585;
  --dezent: #9aa1c2;        /* nur Deko (Trenner, Griffe), nie für lesbaren Text */
  --rahmen: rgba(37, 56, 142, 0.10);
  --rahmen-mittel: rgba(37, 56, 142, 0.16);
  --rahmen-stark: rgba(37, 56, 142, 0.25);
  --flaeche: rgba(37, 56, 142, 0.06);
  --check-grund: #F5F7FD;
  --verlauf-linie: linear-gradient(90deg, #25388E 0%, #136BC0 35%, #57DBD8 65%, #F84791 100%);
  --verlauf-knopf: linear-gradient(90deg, #25388E, #136BC0);
  --verlauf-text: linear-gradient(90deg, #136BC0, #F84791);
  --radius-karte: 12px;
  --radius-knopf: 8px;
  --schrift: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cloud);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--blau); }
a:hover { color: var(--dunkelblau); }
h1, h2, h3, h4 { color: var(--dunkelblau); margin: 0; line-height: 1.25; font-weight: 700; }
h1 { font-size: 26px; letter-spacing: -0.2px; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
p { margin: 0; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
mark { background: rgba(87, 219, 216, 0.35); color: inherit; padding: 0 2px; border-radius: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--flaeche); padding: 1px 5px; border-radius: 4px; }
hr, .trenner { border: 0; border-top: 1px solid rgba(37, 56, 142, 0.08); margin: 4px 0; }
.icon { flex: none; vertical-align: middle; }

/* Fokus: immer sichtbar, 2 px Pink */
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.inhalt:focus, .inhalt:focus-visible { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprunglink {
  position: absolute; left: -9999px; top: 12px; z-index: 300;
  background: #fff; color: var(--dunkelblau); font-weight: 600; padding: 10px 14px;
  border-radius: var(--radius-knopf); border: 1px solid var(--rahmen-stark);
}
.sprunglink:focus { left: 12px; }

/* ---------- App-Gerüst ---------- */
.app { display: flex; min-height: 100vh; }

.seitenleiste {
  width: 250px; flex: none; background: #fff;
  border-right: 1px solid rgba(37, 56, 142, 0.08);
  padding: 40px 16px 20px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.seitenleiste__marke {
  padding: 0 10px 28px; display: flex; flex-direction: column; gap: 4px; text-decoration: none;
}
.seitenleiste__marke img { width: 118px; height: auto; display: block; }
.seitenleiste__marke span { font-size: 11px; font-weight: 600; color: var(--dunkelblau); }
.seitenleiste__fuss {
  margin-top: auto; border-top: 1px solid var(--rahmen); padding-top: 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.seitenleiste__person { padding: 8px 12px 0; font-size: 11px; color: var(--gedaempft); line-height: 1.4; overflow-wrap: anywhere; }
.seitenleiste__person strong { color: var(--dunkelblau); font-weight: 600; }

.nav-punkt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 44px; padding: 11px 12px; border-radius: 8px; border: 0; background: none;
  font-size: 13px; font-weight: 600; color: var(--dunkelblau); text-decoration: none; text-align: left;
  cursor: pointer; font-family: inherit; line-height: 1.3;
}
.nav-punkt:hover { background: rgba(37, 56, 142, 0.04); color: var(--dunkelblau); }
.nav-punkt--aktiv, .nav-punkt--aktiv:hover { background: rgba(37, 56, 142, 0.06); box-shadow: inset 3px 0 0 var(--pink); }
.nav-punkt--aktiv .icon { color: var(--pink); }
.nav-punkt__text { flex: 1; min-width: 0; }
.nav-zaehler {
  font-size: 11px; font-weight: 700; color: var(--dunkelblau);
  background: rgba(37, 56, 142, 0.07); border-radius: 6px; padding: 2px 7px;
}
.nav-abschnitt {
  margin: 18px 12px 4px; font-size: 10.5px; font-weight: 700; color: var(--gedaempft);
  letter-spacing: 1px; text-transform: uppercase;
}

.mobilleiste { display: none; }

.hauptbereich { flex: 1; min-width: 0; padding: 0 64px 48px; }
.inhalt-rahmen { width: 100%; max-width: 1060px; margin: 0 auto; }
.inhalt-rahmen:has(.inhalt--breit), .hauptbereich.ist-breit .inhalt-rahmen { max-width: 1400px; }
.verlaufslinie { height: 3px; border-radius: 2px; margin-top: 22px; background: var(--verlauf-linie); }
.inhalt { padding-top: 28px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* ---------- Seitenkopf und Schrift ---------- */
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.seitenkopf__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.seitenkopf__aktionen { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ueberzeile { font-size: 11px; font-weight: 700; color: var(--blau); letter-spacing: 1px; text-transform: uppercase; }
.unterzeile { font-size: 12px; font-weight: 600; color: var(--gedaempft); }
.begruessung, .titel-gross { font-size: 30px; font-weight: 700; color: var(--dunkelblau); }
.verlauf-text {
  background: var(--verlauf-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.gedaempft { color: var(--gedaempft); }
.klein { font-size: 12px; }
.sehr-klein { font-size: 11px; }
.fett { font-weight: 700; }
.text-rechts { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.umbruch { overflow-wrap: anywhere; }
.zurueck { align-self: flex-start; }

/* ---------- Raster und Abstände ---------- */
.raster-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.raster-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.raster-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stapel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stapel--eng { gap: 8px; }
.stapel--weit { gap: 22px; }
.zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.zeile--zwischen { justify-content: space-between; }
.zeile--oben { align-items: flex-start; }
.wachsen { flex: 1; min-width: 0; }
.mt-auto { margin-top: auto; }

/* ---------- Karten ---------- */
.karte {
  background: #fff; border: 1px solid var(--rahmen); border-radius: var(--radius-karte);
  padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.karte--tuerkis { border-top: 2px solid var(--tuerkis); }
.karte--blau { border-top: 2px solid var(--blau); }
.karte--pink { border-top: 2px solid var(--pink); }
.karte--dunkel { border-top: 2px solid var(--dunkelblau); }
.karte--kompakt { padding: 14px 16px; gap: 8px; }
.karte--link { color: inherit; text-decoration: none; transition: border-color 0.15s; }
.karte--link:hover { border-color: rgba(19, 107, 192, 0.45); color: inherit; }
.karte__kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.karte__titel, .karte h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--dunkelblau); }
.karte__kopf a { font-size: 12px; font-weight: 600; }
.karte__fuss { margin-top: auto; font-size: 11px; color: var(--gedaempft); }

.jetzt-dran { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
.jetzt-dran > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jetzt-dran__label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--dunkelblau); }
.jetzt-dran__titel { font-size: 18px; font-weight: 700; color: var(--dunkelblau); }
.jetzt-dran .knopf { flex: none; }

.kennzahl { display: flex; flex-direction: column; gap: 2px; }
.kennzahl__wert { font-size: 26px; font-weight: 700; color: var(--dunkelblau); line-height: 1.15; }
.kennzahl__label { font-size: 11px; font-weight: 600; color: var(--gedaempft); }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-knopf);
  border: 1px solid transparent; background: #fff; color: var(--dunkelblau);
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: filter 0.15s, background-color 0.15s, border-color 0.15s;
}
.knopf--haupt { color: #fff; background: var(--verlauf-knopf); border-color: transparent; }
.knopf--haupt:hover { color: #fff; filter: brightness(1.08); }
.knopf--akzent { color: #fff; background: var(--pink-tief); border-color: transparent; }
.knopf--akzent:hover { color: #fff; background: #C8246E; }
.knopf--zweit { color: var(--dunkelblau); background: #fff; border-color: var(--rahmen-stark); }
.knopf--zweit:hover { color: var(--dunkelblau); background: #f7f8fc; border-color: rgba(37, 56, 142, 0.4); }
.knopf--text { color: var(--blau); background: none; border-color: transparent; padding: 0 8px; }
.knopf--text:hover { color: var(--dunkelblau); background: var(--flaeche); }
.knopf--gefahr { color: var(--rose-text); background: #fff; border-color: rgba(138, 33, 48, 0.35); }
.knopf--gefahr:hover { color: var(--rose-text); background: rgba(249, 184, 177, 0.18); }
.knopf--gestrichelt { color: var(--dunkelblau); background: #fff; border: 1px dashed rgba(37, 56, 142, 0.35); }
.knopf--gestrichelt:hover { background: #f7f8fc; }
.knopf--klein { min-height: 36px; padding: 0 12px; font-size: 12px; }
.knopf--icon { width: 44px; padding: 0; }
.knopf--icon.knopf--klein { width: 36px; }
.knopf--block { width: 100%; }
.knopf:disabled, .knopf[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; filter: none; }
.knopfreihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Chips und Abzeichen ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 11px; font-weight: 700; line-height: 1.3; border-radius: 6px; padding: 4px 9px;
  color: var(--gedaempft); background: rgba(37, 56, 142, 0.05); border: 1px solid transparent;
}
.chip--bestanden { color: var(--tuerkis-text); background: rgba(87, 219, 216, 0.25); }
.chip--naechstes { color: #fff; background: var(--dunkelblau); }
.chip--faellig { color: var(--rose-text); background: rgba(249, 184, 177, 0.45); }
.chip--dauer { color: var(--dunkelblau); background: rgba(37, 56, 142, 0.07); }
.chip--pflicht { color: var(--pink-text); background: rgba(248, 71, 145, 0.10); border-color: rgba(248, 71, 145, 0.35); padding: 3px 8px; }
.chip--neutral { color: var(--gedaempft); background: rgba(37, 56, 142, 0.05); }
.chip--blau { color: var(--blau); background: rgba(19, 107, 192, 0.08); }
.chipreihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.abzeichen {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--gedaempft);
  background: rgba(37, 56, 142, 0.06); border-radius: 999px; padding: 5px 10px;
}
.abzeichen--erreicht { color: #fff; background: var(--dunkelblau); }
.zaehler {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px;
  font-size: 11px; font-weight: 700; color: var(--dunkelblau);
  background: rgba(37, 56, 142, 0.07); border-radius: 6px; padding: 2px 7px;
}

/* ---------- Fortschritt ---------- */
.ring { position: relative; flex: none; display: inline-block; }
.ring svg { display: block; }
.ring__wert {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--dunkelblau); white-space: nowrap;
}
.fortschritt-block { display: flex; align-items: center; gap: 22px; }
.phasen { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.phase { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.phase__titel { font-weight: 600; color: var(--dunkelblau); }
.balken { position: relative; height: 8px; border-radius: 4px; background: rgba(37, 56, 142, 0.08); }
.balken__fuell { height: 8px; border-radius: 4px; background: var(--tuerkis); max-width: 100%; }
.balken__fuell--blau { background: var(--blau); }
.balken__marke { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--pink); border-radius: 1px; }

/* ---------- Formulare ---------- */
.formular { display: flex; flex-direction: column; gap: 14px; }
.formular-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld > label, .feld__label { font-size: 12px; font-weight: 600; color: var(--dunkelblau); }
.feld__hilfe { font-size: 11.5px; color: var(--gedaempft); line-height: 1.45; }

.eingabe,
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="search"], input[type="url"], input[type="tel"],
select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font-family: inherit; font-size: 14px; color: var(--text); line-height: 1.4;
  background: #fff; border: 1px solid var(--rahmen-stark); border-radius: var(--radius-knopf);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
select { cursor: pointer; }
.eingabe:focus, input:focus, select:focus, textarea:focus { border-color: var(--dunkelblau); }
input::placeholder, textarea::placeholder { color: #6b74a0; opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background: #f6f6f9; color: var(--gedaempft); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rose-text); }

input[type="checkbox"], input[type="radio"] { accent-color: var(--dunkelblau); }
.checkzeile { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); min-height: 32px; cursor: pointer; }
.checkzeile input { width: 18px; height: 18px; margin: 0; flex: none; cursor: pointer; }

/* Schalter: <input type="checkbox" class="schalter" role="switch"> */
.schalter-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 600; color: var(--dunkelblau); min-height: 32px; cursor: pointer; }
input.schalter {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 38px; height: 22px; border-radius: 11px; position: relative;
  background: rgba(37, 56, 142, 0.25); transition: background-color 0.15s;
}
input.schalter::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform 0.15s;
}
input.schalter:checked { background: var(--pink-tief); }
input.schalter:checked::before { transform: translateX(16px); }

/* Umschalter (Segment-Knöpfe) */
.umschalter { display: inline-flex; background: rgba(37, 56, 142, 0.06); border-radius: 8px; padding: 3px; gap: 2px; }
.umschalter button {
  flex: 1; border: 0; background: none; border-radius: 6px; cursor: pointer;
  min-height: 36px; padding: 0 14px; font-size: 12px; font-weight: 600; color: var(--gedaempft);
}
.umschalter button[aria-pressed="true"], .umschalter button.ist-aktiv {
  background: #fff; color: var(--dunkelblau); font-weight: 700; box-shadow: 0 1px 2px rgba(37, 56, 142, 0.12);
}

/* Suchfeld: <label class="suchfeld">icon <span class="sr-only">…</span><input type="search"></label> */
.suchfeld {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  background: #fff; border: 1px solid var(--rahmen-stark); border-radius: var(--radius-knopf); color: var(--gedaempft);
}
.suchfeld:focus-within { outline: 2px solid var(--pink); outline-offset: 2px; border-color: var(--dunkelblau); }
.suchfeld input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; min-height: 42px; padding: 0; font-size: 13px; color: var(--dunkelblau); }
.suchfeld input:focus-visible { outline: none; }

.fehlertext { color: var(--rose-text); font-size: 12.5px; font-weight: 600; }
.fehlertext:empty { display: none; }
.passwort-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: 1px;
  background: var(--flaeche); color: var(--dunkelblau); padding: 12px 14px; border-radius: 8px;
  user-select: all; -webkit-user-select: all; overflow-wrap: anywhere;
}

/* ---------- Listen ---------- */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste > li, .liste__zeile {
  background: #fff; border: 1px solid var(--rahmen); border-radius: 10px;
  padding: 12px 16px; display: flex; align-items: center; gap: 14px; min-width: 0;
}
.liste--schlicht { gap: 0; }
.liste--schlicht > li, .liste--schlicht .liste__zeile { background: none; border: 0; border-bottom: 1px solid rgba(37, 56, 142, 0.08); border-radius: 0; padding: 10px 0; }
.liste--schlicht > li:last-child { border-bottom: 0; }

.gruppe { display: flex; flex-direction: column; gap: 10px; }
.gruppe__kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gruppe__titel { font-size: 15px; font-weight: 700; color: var(--dunkelblau); margin: 0; }

.modulzeile {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  background: #fff; border: 1px solid var(--rahmen); border-radius: 10px; padding: 12px 16px;
  color: inherit; text-decoration: none; transition: border-color 0.15s;
}
a.modulzeile:hover { border-color: rgba(19, 107, 192, 0.45); color: inherit; }
.modulzeile__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.modulzeile__titel { font-size: 14px; font-weight: 600; color: var(--dunkelblau); }
.modulzeile__kurz { font-size: 12px; color: var(--gedaempft); line-height: 1.45; }
.modulzeile__meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: none; justify-content: flex-end; }
.modulzeile--fertig .modulzeile__titel { color: var(--gedaempft); }
.status-kreis {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(37, 56, 142, 0.08); color: var(--dunkelblau); font-size: 11px; font-weight: 700;
}
.status-kreis--fertig { background: var(--tuerkis); color: #0d4f4d; }
.status-kreis--offen { background: rgba(37, 56, 142, 0.08); color: var(--dunkelblau); }
.status-kreis--aktiv { background: var(--pink-tief); color: #fff; }

/* ---------- Tabellen ---------- */
/* position: relative, damit absolut positionierte Kinder (z. B. .sr-only in Kopfzellen) mitscrollen
   und auf dem Handy nicht die Seite verbreitern */
.tabelle-rahmen { position: relative; overflow-x: auto; background: #fff; border: 1px solid var(--rahmen); border-radius: var(--radius-karte); }
.tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabelle th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--gedaempft);
  letter-spacing: 0.5px; text-transform: uppercase; padding: 11px 14px;
  border-bottom: 1px solid var(--rahmen); background: #fff; white-space: nowrap; vertical-align: bottom;
}
.tabelle td { padding: 10px 14px; border-bottom: 1px solid rgba(37, 56, 142, 0.06); vertical-align: middle; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover td { background: rgba(37, 56, 142, 0.02); }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle--kompakt th, .tabelle--kompakt td { padding: 7px 10px; }
.tabelle--matrix th { white-space: normal; min-width: 110px; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.tabelle--matrix th:first-child, .tabelle--matrix td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 180px; }
.tabelle--matrix td { text-align: center; white-space: nowrap; font-size: 12px; font-weight: 600; }
.tabelle--matrix td:first-child { text-align: left; }
.zelle--fertig { background: rgba(87, 219, 216, 0.18) !important; color: var(--tuerkis-text); }
.zelle--offen { color: var(--dunkelblau); }
.zelle--ueberfaellig { background: rgba(249, 184, 177, 0.35) !important; color: var(--rose-text); }
.zelle--nicht_zugewiesen, .zelle--nicht-zugewiesen { color: var(--gedaempft); font-weight: 400; }

.suchergebnis { display: flex; flex-direction: column; gap: 4px; }
.suchergebnis__titel { font-size: 14px; font-weight: 600; color: var(--dunkelblau); }
.suchergebnis__treffer { font-size: 12.5px; color: var(--gedaempft); line-height: 1.5; }

/* ---------- Lern-Bausteine ---------- */
.lernseite {
  background: #fff; border: 1px solid var(--rahmen); border-radius: var(--radius-karte);
  padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.baustein { min-width: 0; }
.baustein--ueberschrift h2 { font-size: 19px; margin-top: 6px; }

.lerntext { font-size: 14px; line-height: 1.65; color: var(--text); overflow-wrap: break-word; }
.lerntext p, .lerntext ul, .lerntext ol { margin: 0 0 0.8em; }
.lerntext > :last-child { margin-bottom: 0; }
.lerntext ul, .lerntext ol { padding-left: 1.4em; }
.lerntext li { margin: 0.25em 0; }
.lerntext h3 { font-size: 16px; margin: 1.2em 0 0.5em; }
.lerntext > h3:first-child { margin-top: 0; }
.lerntext strong { color: var(--dunkelblau); font-weight: 700; }
.lerntext a { color: var(--blau); text-decoration: underline; text-underline-offset: 2px; }

.hinweis {
  border-radius: 10px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start;
  font-size: 13px; line-height: 1.55; color: var(--text);
}
.hinweis > .icon { margin-top: 1px; }
.hinweis__inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hinweis__titel { font-size: 13px; font-weight: 700; color: var(--dunkelblau); }
.hinweis .lerntext { font-size: 13px; line-height: 1.55; }
.hinweis--info, .hinweis--merksatz { background: rgba(19, 107, 192, 0.07); }
.hinweis--info > .icon, .hinweis--merksatz > .icon { color: var(--blau); }
.hinweis--achtung { background: rgba(249, 184, 177, 0.30); }
.hinweis--achtung > .icon, .hinweis--achtung .hinweis__titel { color: var(--rose-text); }

.bild { margin: 0; }
.bild img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
.bild figcaption, .video figcaption, .html-modul figcaption { font-size: 12px; color: var(--gedaempft); margin-top: 6px; }

.video { margin: 0; border: 1px solid var(--rahmen); border-radius: 10px; overflow: hidden; background: #fff; }
.video__rahmen { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #25388E, #136BC0 60%, #57DBD8); }
.video__rahmen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { margin: 0; padding: 10px 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.video figcaption strong { color: var(--dunkelblau); font-weight: 600; }

.pdf { display: flex; flex-direction: column; gap: 10px; }
.pdf-vorschau { display: block; width: 100%; height: 520px; border: 1px solid var(--rahmen); border-radius: 10px; background: #f4f5f9; }

.html-modul { margin: 0; }
.html-modul iframe { display: block; width: 100%; border: 1px solid var(--rahmen); border-radius: 10px; background: #fff; }
.html-modul figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.akkordeon { border: 1px solid rgba(37, 56, 142, 0.12); border-radius: 10px; background: #fff; }
.akkordeon summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; font-weight: 600; color: var(--dunkelblau); border-radius: 10px;
}
.akkordeon summary::-webkit-details-marker { display: none; }
.akkordeon summary::after { content: "+"; font-size: 18px; font-weight: 500; color: var(--blau); line-height: 1; }
.akkordeon[open] summary::after { content: "–"; }
.akkordeon__inhalt { padding: 0 16px 14px; }

.dateikarte {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  border: 1px solid rgba(37, 56, 142, 0.12); border-radius: 10px; padding: 10px 14px;
  background: #fff; color: inherit; text-decoration: none;
}
.dateikarte__icon { color: var(--blau); flex: none; display: inline-flex; }
.dateikarte__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dateikarte__titel { font-size: 13px; font-weight: 600; color: var(--dunkelblau); overflow-wrap: anywhere; }
.dateikarte__meta { font-size: 11px; color: var(--gedaempft); overflow-wrap: anywhere; }
.dateikarte__aktion {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px;
  font-size: 12px; font-weight: 600; color: var(--blau); white-space: nowrap; flex: none;
}
.dateikarte--link { transition: border-color 0.15s; }
.dateikarte--link:hover { border-color: rgba(19, 107, 192, 0.45); color: inherit; }
.dateikarte audio { width: 100%; margin-top: 6px; }

/* ---------- Lernseite: Schritte und Kurz-Check ---------- */
.schritte {
  list-style: none; margin: 0; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--rahmen); border-radius: 10px; padding: 8px 16px;
  font-size: 12px; font-weight: 600;
}
.schritt { display: flex; align-items: center; gap: 7px; color: var(--gedaempft); }
.schritt + .schritt::before { content: "›"; color: var(--dezent); margin-right: 3px; }
.schritt a, .schritt button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 4px;
  background: none; border: 0; border-radius: 6px; color: inherit; font: inherit; text-decoration: none; cursor: pointer;
}
.schritt a:hover, .schritt button:hover { color: var(--dunkelblau); }
.schritt__nr {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(37, 56, 142, 0.10); color: var(--dunkelblau); font-size: 11px; font-weight: 700;
}
.schritt--fertig { color: var(--tuerkis-tief); }
.schritt--fertig .schritt__nr { background: var(--tuerkis); color: #0d4f4d; }
.schritt--aktiv { color: var(--pink-text); }
.schritt--aktiv .schritt__nr { background: var(--pink-tief); color: #fff; }

.kurzcheck {
  background: var(--check-grund); border: 1px solid var(--rahmen); border-radius: var(--radius-karte);
  padding: 22px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.kurzcheck__kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kurzcheck__kopf h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.frage { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.frage legend, .frage__text { padding: 0; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--dunkelblau); line-height: 1.45; }
.frage__hinweis { font-weight: 500; color: var(--gedaempft); }
.option {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px;
  font-size: 13px; color: var(--text); background: #fff; cursor: pointer;
  border: 1px solid rgba(37, 56, 142, 0.12); border-radius: 8px; transition: border-color 0.15s;
}
.option input { width: 16px; height: 16px; margin: 0; flex: none; cursor: pointer; }
.option:hover { border-color: rgba(37, 56, 142, 0.3); }
.option:has(input:checked) { border-color: var(--dunkelblau); }
.option:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: 2px; }
.option:has(input:disabled) { cursor: default; }
.option--richtig, .option--richtig:has(input:checked) { color: #0d4f4d; background: rgba(87, 219, 216, 0.18); border: 1.5px solid var(--tuerkis); }
.option--richtig input { accent-color: var(--tuerkis-tief); }
.option--falsch, .option--falsch:has(input:checked) { color: var(--rose-text); background: rgba(249, 184, 177, 0.30); border: 1.5px solid var(--rose); }
.option--falsch input { accent-color: var(--rose-text); }
.option--verpasst { border: 1.5px dashed var(--tuerkis-tief); }
.option__marke { margin-left: auto; font-size: 11px; font-weight: 700; white-space: nowrap; padding-left: 8px; }
.erklaerung {
  font-size: 12.5px; line-height: 1.5; color: var(--text); background: #fff;
  border-left: 3px solid var(--blau); border-radius: 0 8px 8px 0; padding: 8px 12px;
}
.ergebnis { border-radius: 12px; padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border: 1px solid var(--rahmen); background: #fff; }
.ergebnis--bestanden { background: rgba(87, 219, 216, 0.18); border-color: var(--tuerkis); }
.ergebnis--nicht { background: rgba(249, 184, 177, 0.30); border-color: var(--rose); }
.ergebnis__quote { font-size: 26px; font-weight: 700; color: var(--dunkelblau); line-height: 1.1; }

/* ---------- Zertifikate ---------- */
.zertifikatkarte {
  display: flex; gap: 12px; align-items: center; min-width: 0;
  border: 1px solid rgba(37, 56, 142, 0.12); border-radius: 12px; padding: 12px 14px;
  background: linear-gradient(135deg, rgba(87, 219, 216, 0.10), rgba(248, 71, 145, 0.08));
  color: inherit; text-decoration: none;
}
a.zertifikatkarte:hover { border-color: rgba(19, 107, 192, 0.45); color: inherit; }
.zertifikatkarte > .icon { color: var(--dunkelblau); }
.zertifikatkarte--offen { background: none; border: 1px dashed var(--rahmen-stark); }
.zertifikatkarte--offen > .icon, .zertifikatkarte--offen .zertifikatkarte__titel { color: var(--gedaempft); }
.zertifikatkarte__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zertifikatkarte__titel { font-size: 13px; font-weight: 700; color: var(--dunkelblau); }
.zertifikatkarte__meta { font-size: 11px; color: var(--gedaempft); }

/* Zertifikat zum Drucken: .druck-zertifikat ist eine reine Druck-Markierung.
   Die Gestaltung des Zertifikats liefert die Ansicht selbst (lernen.js);
   hier nur neutrale Grundwerte und die Druckregeln weiter unten. */
.druck-zertifikat { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

/* ---------- Admin / Baukasten ---------- */
.editor-raster { display: grid; grid-template-columns: 230px minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.panel {
  background: #fff; border: 1px solid var(--rahmen); border-radius: var(--radius-karte);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; min-width: 0;
}
.panel__titel { font-size: 11px; font-weight: 700; color: var(--gedaempft); letter-spacing: 1px; text-transform: uppercase; }
.panel__abschnitt { border-top: 1px solid rgba(37, 56, 142, 0.08); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }

.baum, .baum ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.baum ul { padding-left: 12px; }
.baum__bereich { font-weight: 700; color: var(--dunkelblau); margin-top: 10px; }
.baum > li:first-child > .baum__bereich, .baum > .baum__bereich:first-child { margin-top: 0; }
.baum__gruppe { padding-left: 12px; color: var(--gedaempft); font-weight: 600; margin-top: 4px; }
.baum__modul {
  display: block; width: 100%; text-align: left; margin-left: 0; padding: 6px 8px 6px 24px;
  border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-decoration: none; cursor: pointer;
}
.baum__modul:hover { background: rgba(37, 56, 142, 0.04); color: var(--dunkelblau); }
.baum__modul--aktiv, .baum__modul[aria-current="page"] { background: rgba(37, 56, 142, 0.07); color: var(--dunkelblau); font-weight: 600; }
.baum__modul--entwurf::after { content: " · Entwurf"; color: var(--gedaempft); font-size: 11px; font-weight: 500; }

.reiter { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid rgba(37, 56, 142, 0.08); }
.reiter__knopf {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  min-height: 40px; padding: 6px 10px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--gedaempft); text-decoration: none;
}
.reiter__knopf:hover { color: var(--dunkelblau); }
.reiter__knopf[aria-selected="true"], .reiter__knopf.ist-aktiv { color: var(--dunkelblau); border-bottom-color: var(--pink); }

.baustein-zeile {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  border: 1px solid rgba(37, 56, 142, 0.12); border-radius: 10px; padding: 8px 10px 8px 14px; background: #fff;
}
.baustein-zeile--aktiv { border: 1.5px solid var(--blau); background: rgba(19, 107, 192, 0.04); }
.baustein-zeile__griff { color: var(--dezent); font-size: 16px; line-height: 1; flex: none; }
.baustein-zeile__typ { font-size: 11px; font-weight: 700; color: var(--blau); background: rgba(19, 107, 192, 0.08); border-radius: 6px; padding: 3px 8px; flex: none; }
.baustein-zeile__text { flex: 1; min-width: 0; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.baustein-zeile__aktionen { display: flex; gap: 4px; flex: none; }
/* Schmale Spalte (Handy): Aktionen rutschen in eine eigene Zeile statt über den Rand */
@media (max-width: 560px) {
  .baustein-zeile { flex-wrap: wrap; }
  .baustein-zeile__text { flex-basis: 140px; }
  .baustein-zeile__aktionen { margin-left: auto; }
}
.baustein-formular {
  border: 1px solid rgba(19, 107, 192, 0.35); border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 12px; background: rgba(19, 107, 192, 0.03);
}
.einfuegen { border: 1px dashed rgba(37, 56, 142, 0.30); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.einfuegen__titel { font-size: 12px; font-weight: 700; color: var(--dunkelblau); }

.dialog {
  border: 0; border-radius: 14px; padding: 24px; width: calc(100% - 32px); max-width: 560px;
  color: var(--text); background: #fff; box-shadow: 0 20px 60px rgba(29, 42, 110, 0.25);
  max-height: calc(100vh - 48px); overflow: auto;
}
.dialog::backdrop { background: rgba(29, 42, 110, 0.35); }
.dialog__kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.dialog__kopf h2 { font-size: 17px; }
.dialog__fuss { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Zustände ---------- */
.leer {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 32px 20px; color: var(--gedaempft); font-size: 13.5px; line-height: 1.5;
  border: 1px dashed rgba(37, 56, 142, 0.20); border-radius: 12px; background: rgba(255, 255, 255, 0.6);
}
.leer > .icon { color: var(--blau); }
.leer p { max-width: 460px; }
.karte .leer { background: none; }

.lade { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px 0; color: var(--gedaempft); font-size: 13px; }
.lade::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(37, 56, 142, 0.15); border-top-color: var(--blau);
  animation: drehen 0.8s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.fehlerkarte {
  border-radius: 12px; padding: 16px 18px; background: rgba(249, 184, 177, 0.30);
  border: 1px solid var(--rose); color: var(--text); display: flex; gap: 12px; align-items: flex-start;
}
.fehlerkarte > .icon { color: var(--rose-text); margin-top: 1px; }
.fehlerkarte strong { color: var(--rose-text); }

.toast-bereich {
  position: fixed; right: 24px; bottom: 24px; z-index: 400;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none;
}
.toast {
  pointer-events: auto; max-width: 380px; padding: 12px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 600; line-height: 1.4; color: #fff; background: var(--dunkelblau);
  box-shadow: 0 8px 24px rgba(29, 42, 110, 0.22);
  display: flex; align-items: flex-start; gap: 10px;
  animation: toast-rein 0.2s ease-out;
}
.toast--ok { background: var(--dunkelblau); }
.toast--fehler { background: var(--rose-text); }
.toast.ist-weg { opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }
@keyframes toast-rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ist-aktiv { /* Zustandsklasse, Gestaltung je Komponente (Umschalter, Reiter) */ }

/* ---------- Anmeldung, Einrichtung, Passwort ---------- */
.anmeldung {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 16px; background: var(--cloud);
}
.anmeldung-karte {
  width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--rahmen);
  border-radius: 14px; overflow: hidden;
}
.anmeldung-kopf { padding: 30px 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.anmeldung-kopf img { width: 190px; height: auto; display: block; }
.anmeldung-band { background: var(--dunkelblau); color: #fff; padding: 16px 28px 18px; text-align: center; position: relative; }
.anmeldung-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--verlauf-linie); }
.anmeldung-band strong { display: block; font-size: 17px; font-weight: 700; color: #fff; }
.anmeldung-band span { display: block; font-size: 12.5px; color: rgba(255, 255, 255, 0.88); margin-top: 2px; }
.anmeldung-inhalt { padding: 24px 28px 26px; display: flex; flex-direction: column; gap: 14px; }
.anmeldung-inhalt h1 { font-size: 20px; }
.anmeldung-fuss { font-size: 11.5px; color: var(--gedaempft); text-align: center; padding: 0 28px 22px; line-height: 1.5; }

/* ---------- Responsiv ---------- */
@media (max-width: 1200px) {
  .editor-raster { grid-template-columns: 220px minmax(0, 1fr); }
  .editor-raster > :nth-child(3) { grid-column: 1 / -1; }
  .raster-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) and (min-width: 900px) {
  .hauptbereich { padding: 0 36px 40px; }
}

/* Mobil: Seitenleiste wird obere Leiste mit Menü-Knopf */
@media (max-width: 899px) {
  .app { flex-direction: column; }
  .mobilleiste {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 60; height: 60px; padding: 0 16px;
    background: #fff; border-bottom: 1px solid rgba(37, 56, 142, 0.10);
  }
  .mobilleiste__marke { display: flex; align-items: center; gap: 8px; text-decoration: none; }
  .mobilleiste__marke img { width: 96px; height: auto; display: block; }
  .mobilleiste__marke span { font-size: 11px; font-weight: 600; color: var(--dunkelblau); }
  .seitenleiste {
    position: fixed; top: 60px; left: 0; right: 0; bottom: 0; z-index: 55;
    width: auto; height: auto; padding: 12px 16px 20px; border-right: 0;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.15s, transform 0.15s, visibility 0s linear 0.15s;
  }
  .seitenleiste.ist-offen { visibility: visible; opacity: 1; transform: none; transition: opacity 0.15s, transform 0.15s; }
  .seitenleiste__marke { display: none; }
  .hauptbereich { padding: 0 16px 32px; }
  .verlaufslinie { margin-top: 14px; }
  .inhalt { padding-top: 20px; gap: 18px; }
  .raster-2, .raster-3, .raster-4, .formular-raster, .editor-raster { grid-template-columns: minmax(0, 1fr); }
  .seitenkopf { flex-direction: column; align-items: stretch; }
  .jetzt-dran { flex-direction: column; align-items: stretch; }
  .karte { padding: 18px 18px; }
  .lernseite { padding: 20px 18px; }
  .kurzcheck { padding: 18px; }
  .modulzeile { flex-wrap: wrap; }
  .modulzeile__meta { justify-content: flex-start; width: 100%; padding-left: 42px; }
  .begruessung, .titel-gross { font-size: 26px; }
  h1 { font-size: 22px; }
  .pdf-vorschau { height: 420px; }
  .toast-bereich { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; }
  .druck-zertifikat { padding: 6% 6% 4%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Druck ---------- */
@media print {
  .seitenleiste, .mobilleiste, .verlaufslinie, .toast-bereich, .sprunglink, .nicht-drucken { display: none !important; }
  html, body { background: #fff !important; }
  .hauptbereich { padding: 0 !important; }
  .inhalt-rahmen { max-width: none !important; }
  .karte, .lernseite, .kurzcheck { break-inside: avoid; }
  a[href]::after { content: none !important; }
}

/* Zertifikat: nur .druck-zertifikat sichtbar, A4 quer, randlos */
@page { size: A4 landscape; margin: 0; }
@media print {
  /* Alle Vorfahren des Zertifikats statisch → es positioniert sich an der Seite,
     nicht an einem Container (und wird von .app unten nicht abgeschnitten). */
  body:has(.druck-zertifikat) :has(.druck-zertifikat) {
    position: static !important; transform: none !important; filter: none !important; contain: none !important;
  }
  /* Restlichen Seiteninhalt aus dem Fluss nehmen (verhindert Leerseiten) */
  body:has(.druck-zertifikat) .app { height: 0 !important; min-height: 0 !important; overflow: hidden !important; }
  body:has(.druck-zertifikat) * { visibility: hidden !important; }
  body:has(.druck-zertifikat) .druck-zertifikat,
  body:has(.druck-zertifikat) .druck-zertifikat * { visibility: visible !important; }
  body:has(.druck-zertifikat) .druck-zertifikat {
    position: absolute !important; left: 0 !important; top: 0 !important; margin: 0 !important;
    width: 297mm; height: 209mm; max-width: none; aspect-ratio: auto;
    border: 0; border-radius: 0; box-shadow: none; break-inside: avoid; page-break-inside: avoid;
  }
}
