/* SchlauStart – Haupt-Styles der App (aus templates/index.html ausgelagert,
   Refactor A1). Cache-Busting laeuft ueber asset_url() in app.py. */

  :root{
    --paper:#F1F2F6; --card:#FFFFFF; --ink:#1B2230; --muted:#6A7384; --line:#E4E7EE;
    --brand:#2E5BFF; --brand-dk:#1E3FCC; --brand-soft:#E9EEFF;
    --pf-sent:#5063D6;      /* Akzent (Haken, Zitat-Rand, Fokus) */
    --pf-sent-bg:#E6EAFF;   /* eigene Chat-Blase: PASTELL-Lavendel (weich) */
    --pf-sent-ink:#2B3358;  /* dunkler Text auf der Pastell-Blase (lesbar) */
    --ok:#15A05A; --ok-soft:#E4F6EC; --bad:#E2483D; --bad-soft:#FCE9E7; --amber:#F5A623; --amber-soft:#FFF6E6; --amber-line:#FFE3B0;
    --radius:18px; --shadow:0 1px 2px rgba(27,34,48,.06), 0 8px 24px rgba(27,34,48,.07);
    /* Flaeche hinter Leiste und Panel. BEWUSST eine EIGENE Variable und nicht
       --paper: --paper wird an ueber 90 Stellen als Fuellfarbe benutzt (Kaesten,
       Eingabefelder, dunkles Design). Wuerde die Wunschfarbe der Lehrkraft dort
       ueberall durchschlagen, faerbte ein "Salbei" auch Eingabefelder gruen.
       --shell-bg faerbt NUR html/body. */
    --shell-bg:var(--paper);
  }

  /* ===== Flaechenfarbe (Wunsch Murat 29.07.2026, Vorbild Gmail) =====
     Seit 2.60.0 hat die Seitenleiste keinen eigenen Hintergrund mehr; weiss ist
     nur noch das Inhaltspanel. Damit wird die Flaeche dahinter sichtbar - und
     die darf die Lehrkraft waehlen (Einstellungen -> Darstellung).
     WIE ES ZUSAMMENHAENGT: users.shell_farbe (db.py, BEIDE Zweige) -> /auth/me
     -> AUTH.shellFarbe -> applyShellFarbe() setzt <html data-flaeche="..."> ->
     diese Regeln. Erlaubte Schluessel stehen in SHELL_FARBEN (sso.py) - Liste
     und Palette hier muessen deckungsgleich bleiben, das prueft
     qa/unit/test_shell_farbe.py.
     WARUM nur diese Toene: die Schrift der Leiste steht jetzt direkt auf dieser
     Flaeche. Alle Werte sind hell genug, dass var(--ink) sicher lesbar bleibt -
     auch die 9.5px kleinen Mini-Labels der eingeklappten Leiste. */
  /* Der Standard ("") hat bewusst KEINE Regel - dann gilt der Grundwert oben. */
  html[data-flaeche="stein"]   { --shell-bg:#E8EAEF; }
  html[data-flaeche="himmel"]  { --shell-bg:#E6EEFA; }
  html[data-flaeche="salbei"]  { --shell-bg:#E7F0E8; }
  html[data-flaeche="lavendel"]{ --shell-bg:#ECEAF7; }
  html[data-flaeche="sand"]    { --shell-bg:#F4EFE5; }
  html[data-flaeche="rose"]    { --shell-bg:#F8EBEE; }
  html[data-flaeche="minze"]   { --shell-bg:#E4F1EF; }
  /* Freie Wunschfarben (seit 2.81.0) haben hier ABSICHTLICH keine Regel: sie
     kommen als aufgehelltes Hex direkt per style="--shell-bg:…" ans <html>
     (applyShellFarbe). Eine Regel pro Farbe waere sonst unendlich lang. */
  /* Im dunklen Design bleibt die dunkle Flaeche: ein helles Salbei waere dort
     ein Blitz, und der Sinn des dunklen Designs ist genau das Gegenteil. Die
     Auswahl wird deshalb im Konto ausgegraut (kbFlaecheDots) - der gespeicherte
     Wert bleibt erhalten und greift wieder, sobald hell aktiv ist.
     Das !important ist die zweite Sicherung fuer freie Wunschfarben: die stehen
     als Inline-Wert am <html> und wuerden dieses Stylesheet sonst schlagen.
     applyShellFarbe setzt sie im Dunkeln schon gar nicht erst - beides zusammen
     haelt das dunkle Design auch dann dunkel, wenn ein Weg mal ausfaellt. */
  html[data-theme="dark"]{ --shell-bg:var(--paper) !important; }
  *{box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
  /* Scrollbalken: normalerweise UNSICHTBAR (liegen sonst über Inhalten).
     Innere Bereiche zeigen einen hauchdünnen Daumen erst, wenn die Maus über
     dem Bereich ist (macOS-Gefühl). Haupt-Scrollbalken der Seite: ganz aus.
     Scrollen per Rad/Touch funktioniert unverändert. */
  *{scrollbar-width:thin;scrollbar-color:transparent transparent;}
  *:hover{scrollbar-color:rgba(106,115,132,.35) transparent;}
  html, html:hover, body, body:hover{scrollbar-width:none;scrollbar-color:transparent transparent;}
  ::-webkit-scrollbar{width:5px;height:5px;background:transparent;}
  ::-webkit-scrollbar-track{background:transparent;}
  ::-webkit-scrollbar-thumb{background:transparent;border-radius:99px;}
  *:hover::-webkit-scrollbar-thumb{background:rgba(106,115,132,.32);}
  ::-webkit-scrollbar-thumb:hover{background:rgba(106,115,132,.55);}
  ::-webkit-scrollbar-corner{background:transparent;}
  html::-webkit-scrollbar, body::-webkit-scrollbar{width:0;height:0;display:none;}
  html{overscroll-behavior:none;background:var(--shell-bg);touch-action:pan-x pan-y;}
  body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,Roboto,Arial,sans-serif;
    background:var(--shell-bg);color:var(--ink);line-height:1.5;-webkit-font-smoothing:antialiased;overscroll-behavior:none;}

  /* ===== iOS-Rotationsfix (quer -> hoch bleibt Layout "haengen") =====
     Symptom: nach dem Drehen ins Querformat und zurueck ins Hochformat behaelt
     iOS die BREITERE Layout-Breite bei -> Inhalt ragt rechts raus, Panel sitzt
     nicht mehr, Text wird abgeschnitten. Drei Ursachen, drei Gegenmittel:
     1) -webkit-text-size-adjust: iOS skaliert nach dem Drehen Schriftgroessen
        automatisch neu ("Text Autosizing") -> auf 100% festnageln.
     2) Ein einziges horizontal ueberlaufendes Element friert die Layout-Breite
        ein -> overflow-x:hidden + max-width:100% auf html/body.
     3) Layout-Breite hart an die Geraetebreite binden (nicht an den Inhalt). */
  html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  html, body{ width:100%; max-width:100%; overflow-x:hidden; }
  .wrap{max-width:720px;margin:0 auto;padding:max(calc(20px + env(safe-area-inset-top)), 28px) calc(16px + env(safe-area-inset-right)) calc(80px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));}
  /* gap: 4px ile yazıyı logoya yaklaştırdık, margin ile de genel üst/alt boşluğu daralttık */
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 22px; min-height: 48px; }
  /* Begrüßung: bleibt mittig zwischen Logo und Profil, einzeilig, weiche moderne Schrift.
     Bei langen Namen wird die Schrift automatisch kleiner (clamp). */
  .greeting{
    flex:1 1 auto; min-width:0; text-align:center;
    font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
    font-weight:600; line-height:1.2; letter-spacing:-0.015em;
    color:var(--ink);
    font-size:clamp(13px, 2.7vw, 17px);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    padding:0 8px;
  }
  .greeting.empty{ display:none; }
  .card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow);margin-bottom:16px;}
  h2{font-size:22px;letter-spacing:-.5px;margin:0 0 6px;}
  .lead{color:var(--muted);font-size:14.5px;margin:0 0 18px;}
  label{display:block;font-size:13px;font-weight:600;margin:0 0 7px;}
  input[type=text],input[type=number],input[type=password],textarea{width:100%;padding:13px 14px;border:1.5px solid var(--line);border-radius:12px;font-size:16px;font-family:inherit;color:var(--ink);background:#fff;}
  textarea{resize:vertical;min-height:120px;}
  /* Ghost-Autocomplete: Mirror-Div hinter dem Textfeld zeigt die graue Fortsetzung */
  #manual-ghost-wrap{position:relative;}
  #manual-ghost-wrap textarea{position:relative;background:transparent;z-index:2;line-height:1.5;}
  #manual-ghost{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden;
    width:100%;padding:13px 14px;border:1.5px solid transparent;border-radius:12px;
    font-size:16px;font-family:inherit;line-height:1.5;white-space:pre-wrap;word-break:break-word;
    color:transparent;background:#fff;}
  #manual-ghost .ghost-rest{color:var(--muted);opacity:.55;}
  html[data-theme="dark"] #manual-ghost, html:not([data-theme="light"]) #manual-ghost{background:transparent;}
  input:focus,textarea:focus{outline:none;border-color:var(--brand);box-shadow:none;}
  select{width:100%;padding:11px 12px;border:1.5px solid var(--line);border-radius:11px;font-size:15px;font-family:inherit;background:#fff;color:var(--ink);}
  .btn{appearance:none;border:none;cursor:pointer;font-family:inherit;font-weight:700;font-size:16px;padding:14px 18px;border-radius:13px;background:var(--brand);color:#fff;width:100%;transition:transform .08s ease,background .15s ease;}
  .btn:hover{background:var(--brand-dk);} .btn:active{transform:scale(.985);} .btn:disabled{background:#B9C0D4;cursor:not-allowed;}
  .btn.ghost{background:#fff;color:var(--brand);border:1.5px solid var(--line);} .btn.ghost:hover{border-color:var(--brand);background:var(--brand-soft);}
  .btn.sub{background:var(--ink);} .btn.sub:hover{background:#000;}
  .btn.ok{background:var(--ok);} .btn.ok:hover{background:#0e7a43;}
  .ed-acc{border:1px solid var(--line);border-radius:12px;margin:18px 0;overflow:hidden;}
  .ed-acc-head{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;cursor:pointer;background:var(--brand-soft,#eef2ff);font-weight:700;font-size:14.5px;}
  .ed-acc-arrow{font-size:13px;color:var(--muted);font-weight:600;}
  .ed-acc-body{padding:15px;border-top:1px solid var(--line);}
  .ed-section-label{font-size:13px;font-weight:800;color:var(--muted);letter-spacing:.04em;margin:20px 0 10px;}
  .ed-mini-toggle{appearance:none;border:1px solid var(--line);background:var(--card);color:var(--muted);font-family:inherit;font-size:11px;font-weight:700;padding:4px 9px;border-radius:8px;cursor:pointer;letter-spacing:0;}
  .ed-mini-toggle:hover{border-color:var(--brand);color:var(--brand);}
  .ed-actions{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:11px;}
  /* Lebendiger Haupt-CTA zum Veröffentlichen */
  .ed-publish-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:11px;
    width:100%;border:none;cursor:pointer;font-family:inherit;font-weight:800;font-size:16.5px;color:#fff;
    padding:17px 22px;border-radius:16px;letter-spacing:.01em;
    background:linear-gradient(120deg,#2E5BFF,#5B4BE8 45%,#7A5AF8 70%,#15A05A);background-size:200% 100%;
    box-shadow:0 12px 30px rgba(46,91,255,.34),0 2px 6px rgba(46,91,255,.2);
    animation:ephFlow 6s ease infinite;transition:transform .12s ease,box-shadow .2s ease;}
  .ed-publish-hero:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(46,91,255,.42),0 3px 8px rgba(46,91,255,.24);}
  .ed-publish-hero:active{transform:translateY(0) scale(.99);}
  .ed-publish-hero:disabled{opacity:.65;cursor:default;animation:none;transform:none;}
  @keyframes ephFlow{0%,100%{background-position:0% 50%;}50%{background-position:100% 50%;}}
  .ed-publish-hero .eph-ico{width:22px;height:22px;flex:none;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ed-publish-hero .eph-arr{width:20px;height:20px;flex:none;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease;}
  .ed-publish-hero:hover .eph-arr{transform:translateX(4px);}
  .ed-publish-hero .eph-txt{white-space:nowrap;}
  /* Glanz-Streifen, der langsam über den Button wandert */
  .ed-publish-hero .eph-shine{position:absolute;top:0;left:-40%;width:32%;height:100%;pointer-events:none;
    background:linear-gradient(100deg,transparent,rgba(255,255,255,.34),transparent);transform:skewX(-18deg);
    animation:ephShine 3.4s ease-in-out infinite;}
  @keyframes ephShine{0%{left:-45%;}55%{left:130%;}100%{left:130%;}}
  @media (max-width:430px){ .ed-publish-hero{font-size:15px;padding:16px 16px;gap:9px;} .ed-publish-hero .eph-txt{white-space:normal;} }
  @media (prefers-reduced-motion: reduce){ .ed-publish-hero,.ed-publish-hero .eph-shine{animation:none;} }
  .bic{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px;margin-right:8px;}
  .btn{display:inline-flex;align-items:center;justify-content:center;}
  .field{margin-bottom:16px;}
  .note{font-size:13px;background:var(--brand-soft);color:var(--brand-dk);padding:11px 13px;border-radius:11px;margin-top:14px;}
  .err{font-size:13.5px;background:var(--bad-soft);color:#B0271D;padding:11px 13px;border-radius:11px;margin-top:14px;}
  .hidden{display:none!important;} .center{text-align:center;}
  /* Anti-Flackern beim Laden/Refresh: Bevor das JS entscheidet, welcher Screen
     gezeigt wird, ist KEIN Screen sichtbar (sonst blitzt kurz der Upload-Screen
     auf). go() setzt danach .app-booted und zeigt den richtigen Screen. */
  body:not(.app-booted) section[id^="screen-"]{ display:none !important; }
  .badge{display:inline-block;font-size:12px;font-weight:700;padding:4px 10px;border-radius:99px;background:var(--brand-soft);color:var(--brand-dk);margin-bottom:10px;}
  .seg{display:flex;border:1.5px solid var(--line);border-radius:12px;overflow:hidden;}
  .seg button{flex:1;padding:12px 6px;border:none;background:#fff;font-family:inherit;font-weight:700;font-size:13px;cursor:pointer;color:var(--muted);white-space:nowrap;}
  .seg button.on{background:var(--brand);color:#fff;}
  .seg-wrap{flex-wrap:wrap;gap:5px;border:none;}
  /* FIX 2026-07 (Rueckmeldung Murat): vorher stand hier flex:1 1 0 + min-width:0.
     Damit bekam JEDER Knopf dieselbe Breite, unabhaengig vom Text – bei
     #seg-schulform wurde "Hauptschule"/"Gesamtschule"/"Gymnasium" deshalb
     abgeschnitten ("Hauptschul", "Gymnasiun"), weil .seg button zusaetzlich
     white-space:nowrap setzt. Jetzt: flex-basis:auto (Startbreite = Textbreite)
     und white-space:normal, und min-width:0 ist ABSICHTLICH weg. Dadurch gilt
     wieder die automatische Mindestbreite min-width:auto = min-content, also
     die Breite des laengsten Wortes – der Knopf kann gar nicht mehr unter
     "Gesamtschule" schrumpfen, die Zeile bricht stattdessen um. */
  .seg-wrap button{flex:1 1 auto;white-space:normal;border:1.5px solid var(--line);border-radius:9px;padding:10px 12px;font-size:13px;line-height:1.25;}
  .seg-wrap button.on{border-color:var(--brand);}
  @media(max-width:520px){ .seg-wrap{gap:4px;} .seg-wrap button{padding:9px 10px;font-size:12px;} }
  .grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
  @media(max-width:520px){ .grid2{grid-template-columns:1fr;} }
  /* ===== Unterrichtsplanung: moderne Seiten-Navigation (Topbar, Verlauf, Papierkorb) ===== */
  /* padding-top: Platz für das kleine Zähler-Badge oben am Icon (sonst schneidet
     der scrollende Panel-Rand die Zahl oben ab). */
  .pl-topbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;padding-top:8px;}
  .pl-topbar .back-link{margin:0;}
  /* Aktionen (Verlauf/Papierkorb) IMMER rechts – auch wenn der Zurück-Pfeil
     ausgeblendet ist (Haupt-Editor). */
  .pl-actions{display:flex;gap:6px;flex:none;margin-left:auto;}
  .pl-iconbtn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid var(--line);border-radius:11px;background:var(--card);color:var(--muted);cursor:pointer;transition:border-color .15s,color .15s;padding:0;}
  .pl-iconbtn:hover{border-color:var(--brand);color:var(--brand);}
  .pl-iconbtn-danger{color:#D64545;}
  .pl-iconbtn-danger:hover{border-color:#D64545;color:#D64545;background:#D6454510;}
  .pl-count{position:absolute;top:-5px;right:-5px;min-width:16px;height:16px;line-height:16px;font-size:10px;font-weight:700;color:#fff;background:var(--brand);border-radius:999px;padding:0 4px;text-align:center;}
  .pl-navcard{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:16px;padding:14px 16px;cursor:pointer;background:var(--card);transition:border-color .15s,box-shadow .15s,transform .15s;}
  .pl-navcard:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(0,0,0,.06);transform:translateY(-1px);}
  .pl-navcard-ico{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:11px;background:var(--brand-soft);color:var(--brand);flex:none;}
  .pl-sec{margin-top:24px;}
  .pl-sec:first-of-type{margin-top:0;}
  .pl-sec-title{font-size:15.5px;font-weight:800;margin:0 0 3px;}
  .pl-sec-sub{font-size:12.5px;color:var(--muted);margin:0 0 12px;line-height:1.4;}
  .pl-steps{display:grid;grid-template-columns:1fr;gap:8px;position:relative;}
  .pl-step{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:16px;padding:13px 15px;cursor:pointer;background:var(--card);transition:border-color .15s,box-shadow .15s,transform .15s;}
  .pl-step:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(0,0,0,.06);transform:translateY(-1px);}
  .pl-step-num{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:999px;background:var(--brand-soft);color:var(--brand);font-size:12.5px;font-weight:800;flex:none;}
  .pl-step-ico{display:inline-flex;color:var(--brand);flex:none;}
  @media(max-width:560px){ .pl-step-ico{display:none;} }
  .pl-item{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:13px;padding:12px 14px;margin-bottom:9px;background:var(--card);transition:border-color .15s;}
  .pl-item:hover{border-color:var(--brand);}
  .pl-item-main{min-width:0;flex:1;cursor:pointer;}
  .pl-item-title{font-weight:650;font-size:13.5px;line-height:1.35;word-break:break-word;}
  .pl-item-meta{font-size:11px;color:var(--muted);margin-top:3px;}
  .pl-item-btn{flex:none;display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;background:none;border:1px solid var(--line);border-radius:9px;padding:7px 10px;color:var(--muted);cursor:pointer;transition:border-color .15s,color .15s;}
  .pl-item-btn:hover{border-color:var(--brand);color:var(--brand);}
  .pl-item-btn.danger:hover{border-color:#D64545;color:#D64545;}
  .pl-section-label{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:10px;}
  /* ===== Phasen-Formular: kompakt & horizontal (Apple-Ruhe, alles auf einen Blick) ===== */
  .ph-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin-bottom:14px;}
  .ph-field label{display:block;font-size:11.5px;font-weight:650;letter-spacing:.01em;color:var(--muted);margin-bottom:5px;}
  .ph-in{width:100%;box-sizing:border-box;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);font-size:13.5px;transition:border-color .15s,box-shadow .15s;}
  .ph-in:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);}
  .ph-field.ph-wide{grid-column:1 / -1;}
  .ph-sec-label{display:block;font-size:11.5px;font-weight:650;letter-spacing:.01em;color:var(--muted);margin:2px 0 7px;}
  .ph-methods{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:6px;}
  .ph-m{display:flex;align-items:center;gap:9px;min-width:0;border:1px solid var(--line);border-radius:10px;padding:8px 12px;cursor:pointer;background:var(--card);transition:border-color .13s,background .13s;}
  .ph-m:hover{border-color:var(--brand);}
  .ph-m-t{flex:none;font-weight:650;font-size:12.5px;color:var(--ink);white-space:nowrap;}
  .ph-m-d{flex:1;min-width:0;font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ph-m-chk{flex:none;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border:1.5px solid var(--line);border-radius:999px;color:transparent;transition:all .13s;}
  .ph-m-chk svg{width:10px;height:10px;}
  .ph-m.on{border-color:var(--brand);background:var(--brand-soft);}
  .ph-m.on .ph-m-chk{border-color:var(--brand);background:var(--brand);color:#fff;}
  .ph-ctxbar{display:flex;align-items:center;gap:8px;border:1px dashed var(--line);border-radius:10px;padding:7px 10px;margin-bottom:12px;}
  .ph-ctxbar svg{flex:none;color:var(--brand);}
  .ph-ctxbar select{flex:1;min-width:0;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--ink);font-size:12.5px;}
  .ph-ctxbar button{flex:none;font-size:12px;font-weight:600;color:var(--brand);background:none;border:1px solid var(--brand);border-radius:9px;padding:7px 12px;cursor:pointer;transition:background .13s,color .13s;}
  .ph-ctxbar button:hover{background:var(--brand);color:#fff;}
  @media(max-width:560px){
    .pl-two-col{grid-template-columns:1fr !important;}
    #phase-methoden{grid-template-columns:1fr !important;}
    .ph-m-t{white-space:normal;}
    .pl-item{flex-wrap:wrap;}
    .pl-item-btn{padding:8px 12px;}
  }
  /* Unterrichtsentwurf als Tabelle (wie die schriftliche Planung) */
  .ent-doc-title{font-weight:800;font-size:16px;margin:6px 0 8px;}
  .ent-table{width:100%;border-collapse:collapse;font-size:12.5px;}
  .ent-table th,.ent-table td{border:1px solid var(--line);padding:6px 8px;vertical-align:top;text-align:left;}
  .ent-kopf th{width:34%;background:var(--paper);font-weight:700;color:var(--ink);}
  .ent-kopf-in{width:100%;border:none;background:transparent;font:inherit;color:var(--ink);padding:2px 0;outline:none;}
  .ent-kopf-in::placeholder{color:#bbb;}
  .ent-kopf-ta{width:100%;border:none;background:transparent;font:inherit;color:var(--ink);resize:vertical;outline:none;}
  .ent-verlauf-tbl th{background:var(--paper);font-weight:700;font-size:11.5px;}
  .ent-verlauf-tbl td{padding:0;}
  .ent-cell{min-height:34px;padding:6px 8px;font-size:12px;line-height:1.4;outline:none;white-space:pre-wrap;}
  .ent-cell:focus{background:transparent;}
  .ent-verlauf-tbl{min-width:760px;}
  /* Fach-Akkordeon (Unterrichtsfächer + Börse) */
  .fach-acc{border:1.5px solid var(--line);border-radius:14px;margin-bottom:10px;overflow:hidden;}
  /* Im Aufgaben-Dashboard darf das Kebab-Menü über den Rand hinausragen */
  .fach-acc.has-actions{overflow:visible;}
  .fach-acc.has-actions .fach-acc-head{border-radius:14px;}
  /* Börse-Admin: kleine Aktions-Icons oben rechts auf der Karte */
  .quiz-card{position:relative;}
  .boerse-admin-row{position:absolute;top:8px;right:8px;display:flex;gap:5px;z-index:2;}
  .boerse-admin-row .icon-act{width:28px;height:28px;background:rgba(255,255,255,.92);}
  .boerse-admin-row .icon-act svg{width:14px;height:14px;}
  .folder-edit-btn{appearance:none;border:1px solid var(--line);background:var(--card);color:var(--muted);width:26px;height:26px;border-radius:8px;cursor:pointer;font-size:13px;line-height:1;display:flex;align-items:center;justify-content:center;}
  .folder-edit-btn:hover{border-color:var(--brand);color:var(--brand);}
  .fach-acc-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;cursor:pointer;user-select:none;}
  .fach-acc-head:hover{background:rgba(127,127,127,.04);}
  .fach-ico{width:40px;height:40px;border-radius:11px;flex:none;display:flex;align-items:center;justify-content:center;}
  .fach-ico svg{width:21px;height:21px;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .fach-name{font-weight:800;font-size:14.5px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .fach-sub{font-size:12px;color:var(--muted);font-weight:600;margin-top:1px;}
  .fach-arr{width:18px;height:18px;flex:none;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s;}
  .fach-arr.open{transform:rotate(90deg);}
  .fach-acc-body{padding:0 14px 12px;border-top:1px solid var(--line);}
  /* ===== HORIZONTALE FACH-LEISTE (Aufgaben-Dashboard) ===== */
  .fachbar-wrap{position:relative;margin:14px 0 6px;}
  .fachbar{display:flex;flex-wrap:nowrap;align-items:center;gap:9px;overflow-x:auto;scroll-behavior:smooth;padding:2px 2px 8px;touch-action:pan-x;overscroll-behavior-x:contain;
           -ms-overflow-style:none;scrollbar-width:none;scroll-snap-type:x proximity;}
  .fachbar::-webkit-scrollbar{display:none;}
  .fachbar,.cockpit-recent,.nav-scroll{cursor:grab;}
  .fachbar.dragging-scroll,.cockpit-recent.dragging-scroll,.nav-scroll.dragging-scroll{cursor:grabbing;scroll-behavior:auto;}
  /* Sanfter Fade an den Raendern signalisiert „weiter scrollbar“ */
  .fachbar-wrap::before,.fachbar-wrap::after{content:"";position:absolute;top:0;bottom:8px;width:26px;
           pointer-events:none;z-index:3;transition:opacity .15s;}
  .fachbar-wrap::before{left:0;background:linear-gradient(90deg,var(--card),transparent);opacity:0;}
  .fachbar-wrap::after{right:0;background:linear-gradient(270deg,var(--card),transparent);opacity:0;}
  .fachbar-wrap.fade-l::before{opacity:1;}
  .fachbar-wrap.fade-r::after{opacity:1;}
  .fach-chip{appearance:none;flex:none;scroll-snap-align:start;display:inline-flex;align-items:center;gap:9px;
           padding:9px 14px;border:1.5px solid var(--line);background:var(--card);border-radius:13px;
           cursor:pointer;font-family:inherit;font-weight:700;font-size:14px;color:var(--ink);
           white-space:nowrap;transition:border-color .12s,background .12s,transform .08s,box-shadow .12s;}
  .fach-chip:hover{border-color:var(--brand);}
  .fach-chip:active{transform:scale(.97);}
  .fach-chip .fc-ico{width:26px;height:26px;border-radius:8px;flex:none;display:flex;align-items:center;justify-content:center;}
  .fach-chip .fc-ico svg{width:16px;height:16px;fill:none;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;}
  .fach-chip .fc-count{font-size:11.5px;font-weight:800;padding:1px 8px;border-radius:99px;background:rgba(127,127,127,.12);color:var(--muted);}
  .fach-chip.active{color:#fff;border-color:transparent;box-shadow:0 4px 14px rgba(46,91,255,.18);}
  .fach-chip.active .fc-ico{background:rgba(255,255,255,.22)!important;}
  .fach-chip.active .fc-ico svg{stroke:#fff!important;}
  .fach-chip.active .fc-count{background:rgba(255,255,255,.25);color:#fff;}
  .fach-chip.dragging{opacity:.45;}
  .fach-chip.add-chip{border-style:dashed;color:var(--muted);font-weight:800;}
  .fach-chip.add-chip:hover{color:var(--brand);border-color:var(--brand);}
  .fach-chip.manage-chip{color:var(--muted);}
  .fach-chip.manage-chip svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* Fach-Verwaltungsliste (Reorder/Umbenennen/Ausblenden/Entfernen) */
  .fm-row{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1.5px solid var(--line);border-radius:12px;margin-bottom:8px;background:var(--card);}
  .fm-row.dragging{opacity:.5;border-style:dashed;}
  .fm-grip{cursor:grab;color:var(--muted);flex:none;display:flex;}
  .fm-grip svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* Sortier-Pfeile (statt Drag) – garantiert touch-tauglich */
  .fm-move{flex:none;display:flex;flex-direction:column;gap:2px;}
  .fm-move button{appearance:none;border:1.5px solid var(--line);background:var(--card);color:var(--muted);
                  width:30px;height:22px;border-radius:7px;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;}
  .fm-move button:hover:not(:disabled){border-color:var(--brand);color:var(--brand);}
  .fm-move button:active:not(:disabled){transform:scale(.93);}
  .fm-move button:disabled{opacity:.28;cursor:default;}
  .fm-move button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;}
  .fm-name{flex:1;font-weight:700;font-size:14px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .fm-name.hidden-fach{color:var(--muted);text-decoration:line-through;}
  .fm-cnt{font-size:11.5px;font-weight:700;color:var(--muted);flex:none;}
  /* Kurs-Editor: feste 3er-Quadrat-Buttons, immer nebeneinander */
  .ke-add-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px;}
  .ke-add-sq{appearance:none;border:1.5px solid var(--line);background:var(--card);border-radius:14px;cursor:pointer;
             min-height:86px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
             font-family:inherit;font-weight:800;font-size:12.5px;color:var(--ink);transition:transform .1s,box-shadow .12s,border-color .12s;padding:10px 6px;}
  .ke-add-sq:hover{transform:translateY(-2px);box-shadow:0 5px 14px rgba(0,0,0,.07);}
  .ke-add-sq:active{transform:scale(.96);}
  .ke-add-sq .ke-add-ic{font-size:21px;line-height:1;}
  .ke-add-sq .ke-add-lb{text-align:center;line-height:1.1;}
  /* Aufgabe-Untermenü: kleinere Kacheln, alle in Aufgabe-Blau */
  #ke-aufgabe-menu .ke-add-sq{min-height:62px;font-size:11.5px;border-radius:12px;padding:7px 5px;}
  #ke-aufgabe-menu .ke-add-sq .ke-add-ic{font-size:17px;}
  /* Hauptaktionen – je eine Farbe */
  .ke-add-aufgabe{border-color:#2E5BFF55;background:#2E5BFF14;color:#2E5BFF;}
  .ke-add-spiel{border-color:#16A05A55;background:#16A05A14;color:#0E7C44;}
  .ke-add-info{border-color:#E0962955;background:#E0962914;color:#9A6512;}
  /* Aufgabe-Untermenü – alle in Aufgabe-Blau (gehören zusammen) */
  .ke-sub-wählen,.ke-sub-ki,.ke-sub-selbst{border-color:#2E5BFF55;background:#2E5BFF14;color:#2E5BFF;}
  .drop{border:2px dashed #C8CFDE;border-radius:14px;padding:30px 18px;text-align:center;background:#FAFBFE;cursor:pointer;transition:.15s;}
  .drop.hot{border-color:var(--brand);background:var(--brand-soft);}
  .spinner{width:34px;height:34px;border:3.5px solid var(--brand-soft);border-top-color:var(--brand);border-radius:50%;animation:spin .8s linear infinite;margin:6px auto 14px;}
  /* Markiertes Laden: sieben bunte Punkte, durch die eine Welle laeuft.
     WIE DIE WELLE ENTSTEHT (ueberarbeitet 30.07.2026, Rueckmeldung Murat
     "o noktalar oynamali dalga gibi"): Jeder Punkt spielt DIESELBE Animation,
     nur zeitversetzt (animation-delay in gleichen Schritten). Der Versatz ist
     bewusst deutlich kuerzer als die Laufzeit - dadurch ist immer mehr als ein
     Punkt gleichzeitig oben und das Auge sieht eine durchlaufende Welle statt
     sieben einzeln huepfender Punkte. Vorher war die Bewegung mit 8 px und
     ohne Groessenwechsel so klein, dass sie auf einem hellen Hintergrund kaum
     auffiel; jetzt wandert der Punkt hoeher, wird dabei groesser und heller
     und ruht danach kurz (die lange Haltephase von 62 % bis 100 %) - das
     erzeugt die Pause, an der man die Welle ueberhaupt erst erkennt. */
  .ld-dots{display:flex;gap:9px;justify-content:center;align-items:center;margin:10px auto 16px;height:26px;}
  .ld-dots span{width:11px;height:11px;border-radius:50%;display:block;
    animation:ldWave 1.35s cubic-bezier(.34,.06,.28,1) infinite;will-change:transform,opacity;}
  .ld-dots span:nth-child(1){background:#2E5BFF;animation-delay:0s;}
  .ld-dots span:nth-child(2){background:#E0463E;animation-delay:.09s;}
  .ld-dots span:nth-child(3){background:#15A05A;animation-delay:.18s;}
  .ld-dots span:nth-child(4){background:#F5A623;animation-delay:.27s;}
  .ld-dots span:nth-child(5){background:#9B51E0;animation-delay:.36s;}
  .ld-dots span:nth-child(6){background:#00B8D9;animation-delay:.45s;}
  .ld-dots span:nth-child(7){background:#FF66A5;animation-delay:.54s;}
  @keyframes ldWave{
    0%,62%,100%{transform:translateY(0) scale(.7);opacity:.35;}
    22%{transform:translateY(-10px) scale(1.15);opacity:1;}
    42%{transform:translateY(1px) scale(.82);opacity:.55;}}
  @media (prefers-reduced-motion: reduce){ .ld-dots span{animation:none;opacity:.8;} }
  /* Globaler dünner Fortschrittsbalken oben (app-like Navigations-Cue). */
  #top-progress{position:fixed;top:0;left:0;height:3px;width:0;z-index:100000;
    background:linear-gradient(90deg,#2E5BFF,#7C5CFF,#15A05A);
    box-shadow:0 0 8px rgba(46,91,255,.5);opacity:0;transition:width .2s ease,opacity .3s ease;pointer-events:none;}
  #top-progress.on{opacity:1;}
  .load-steps{max-width:340px;margin:18px auto 0;text-align:left;display:flex;flex-direction:column;gap:11px;}
  .load-step{display:flex;align-items:center;gap:11px;font-size:14.5px;color:var(--muted);transition:color .25s;}
  .load-step .ls-ico{flex:none;width:24px;height:24px;border-radius:50%;border:2px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:13px;transition:all .25s;}
  .load-step.active{color:var(--ink);font-weight:700;}
  .load-step.active .ls-ico{border-color:var(--brand);color:var(--brand);}
  .load-step.done{color:var(--ink);}
  .load-step.done .ls-ico{background:var(--ok);border-color:var(--ok);color:#fff;}
  .load-step.active .ls-ico .ls-dot{width:8px;height:8px;border-radius:50%;background:var(--brand);animation:pulse 1s ease-in-out infinite;}
  @keyframes pulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:.4;transform:scale(.7);}}
  .load-reassure{margin-top:18px;font-size:13px;color:var(--muted);}
  @keyframes spin{to{transform:rotate(360deg);}}
  .progressbar{height:8px;background:var(--line);border-radius:99px;overflow:hidden;margin-bottom:8px;}
  .progressbar i{display:block;height:100%;background:var(--brand);border-radius:99px;transition:width .3s ease;}
  .qmeta{display:flex;justify-content:space-between;font-size:12.5px;color:var(--muted);font-weight:600;margin-bottom:18px;}
  /* Quiz-Kopfleiste: Fragenzähler-Pill, Sterne, Timer, Score */
  .quiz-topbar{display:flex;align-items:center;gap:8px;margin-bottom:16px;flex-wrap:wrap;}
  .quiz-top-spacer{flex:1;}
  .q-pill{display:inline-flex;align-items:center;font-size:13px;font-weight:800;color:#fff;
    background:linear-gradient(135deg,#2E5BFF,#5B4BE8);padding:5px 13px;border-radius:999px;letter-spacing:.02em;
    box-shadow:0 4px 12px rgba(46,91,255,.28);white-space:nowrap;}
  .q-score{font-size:12.5px;font-weight:700;color:var(--muted);white-space:nowrap;}
  .q-stars{display:inline-flex;align-items:center;gap:8px;font-size:22px;font-weight:900;color:#E6A700;line-height:1;
    background:#FFF6E0;border:2px solid #F6D98A;padding:8px 16px 8px 13px;border-radius:999px;white-space:nowrap;transition:transform .12s;
    box-shadow:0 4px 14px rgba(245,166,35,.28);}
  html[data-theme="dark"] .q-stars, html:not([data-theme="light"]) .q-stars{background:#3A3320;border-color:#6b5a2a;}
  .q-stars .q-star-ico{width:26px;height:26px;fill:#F5A623;stroke:#E6A700;stroke-width:1;flex:none;transition:transform .2s;}
  .q-stars.pop{animation:qStarPop .5s cubic-bezier(.2,.9,.3,1.4);}
  .q-stars.pop .q-star-ico{animation:qStarSpin .6s ease;}
  @keyframes qStarPop{0%{transform:scale(1);}40%{transform:scale(1.28);}100%{transform:scale(1);}}
  @keyframes qStarSpin{0%{transform:rotate(0) scale(1);}50%{transform:rotate(20deg) scale(1.35);}100%{transform:rotate(0) scale(1);}}
  /* Fliegender Stern von der richtigen Antwort zur Sterne-Anzeige */
  .q-fly-star{position:fixed;z-index:1500;width:22px;height:22px;pointer-events:none;fill:#F5A623;stroke:#E6A700;stroke-width:1;
    filter:drop-shadow(0 2px 5px rgba(245,166,35,.6));transition:transform .7s cubic-bezier(.4,0,.2,1),opacity .7s ease;}
  @media (prefers-reduced-motion: reduce){ .q-stars.pop,.q-stars.pop .q-star-ico{animation:none;} .q-fly-star{transition:opacity .3s;} }
  .qtag{font-size:11px;font-weight:700;color:var(--brand-dk);background:var(--brand-soft);padding:3px 8px;border-radius:8px;display:inline-block;margin-bottom:12px;}
  /* Frage-Rahmen: eigene "Bühne" für die Frage, klar getrennt von den Antworten.
     Farbiger Akzentstreifen links, dezenter Hintergrund, viel Innenabstand. */
  .q-frame{position:relative;background:var(--paper);border:2px solid var(--line);border-radius:16px;
    padding:18px 20px 16px 22px;margin:6px 0 22px;overflow:hidden;}
  .q-frame::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;
    background:linear-gradient(180deg,var(--brand),#5B4BE8);border-radius:0 4px 4px 0;}
  .qtext{font-size:20px;font-weight:700;letter-spacing:-.3px;margin:0;line-height:1.45;}
  .opt{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:16px 18px;border:2px solid var(--line);border-radius:13px;background:var(--card);font-family:inherit;font-size:16px;font-weight:600;color:var(--ink);cursor:pointer;margin-bottom:12px;transition:.12s;}
  .opt .k{width:26px;height:26px;border-radius:8px;background:var(--paper);display:grid;place-items:center;font-size:13px;font-weight:800;color:var(--muted);flex:none;border:1.5px solid var(--line);transition:.12s;}
  .opt:hover{border-color:var(--brand);}
  /* Ausgewählt: dicker Rahmen + kräftige Füllung + Buchstabe in Markenfarbe.
     Funktioniert in Light UND Dark gut sichtbar. */
  .opt.sel{border-color:var(--brand);border-width:2px;background:var(--brand-soft);background:color-mix(in srgb, var(--brand) 16%, var(--card));box-shadow:0 0 0 1.5px var(--brand) inset;}
  .opt.sel .k{background:var(--brand);color:#fff;border-color:var(--brand);}
  .opt{position:relative;}
  .opt.sel::after{content:"✓";margin-left:auto;color:var(--brand);font-weight:900;font-size:18px;flex:none;}
  .opt.correct::after{content:"✓";margin-left:auto;color:var(--ok);font-weight:900;font-size:18px;flex:none;}
  .opt.wrong::after{content:"✕";margin-left:auto;color:var(--bad);font-weight:900;font-size:18px;flex:none;}
  .opt.correct{border-color:var(--ok);border-width:2px;background:var(--ok-soft);background:color-mix(in srgb, var(--ok) 18%, var(--card));} .opt.correct .k{background:var(--ok);color:#fff;border-color:var(--ok);}
  .opt.wrong{border-color:var(--bad);border-width:2px;background:var(--bad-soft);background:color-mix(in srgb, var(--bad) 18%, var(--card));} .opt.wrong .k{background:var(--bad);color:#fff;border-color:var(--bad);}
  /* ===== QUIZ-DESIGNS (Schüler-Ansicht, von der Lehrkraft wählbar) ==========
     Wirken auf Quiz- UND Willkommens-Screen. Richtig/Falsch-Farben bleiben. */
  body.qt-neon{ --qbg:linear-gradient(160deg,#12061f,#1b0b3a 55%,#06122b); --qcard:#170b2e; --qink:#F2ECFF; --qmut:#B9A9E6; --qopt:#241247; --qbd:#8A5CFF; --qacc:#C6A2FF; --qglow:0 0 16px rgba(138,92,255,.45); }
  body.qt-ozean{ --qbg:linear-gradient(160deg,#062a44,#083a5e 55%,#0a4f6b); --qcard:#0b3550; --qink:#EAF7FF; --qmut:#A9D4E8; --qopt:#0f4767; --qbd:#38BDF8; --qacc:#7DD3FC; --qglow:0 0 16px rgba(56,189,248,.4); }
  body.qt-sonnenuntergang{ --qbg:linear-gradient(160deg,#3a0f2a,#6b1f3a 50%,#8a3b1f); --qcard:#4a1730; --qink:#FFF0EC; --qmut:#F3C6BE; --qopt:#66203f; --qbd:#FF7A59; --qacc:#FFB08A; --qglow:0 0 16px rgba(255,122,89,.4); }
  body.qt-wald{ --qbg:linear-gradient(160deg,#0c2a1a,#123b25 55%,#1c4a2a); --qcard:#0f3320; --qink:#EAFBEF; --qmut:#AEDDBE; --qopt:#154029; --qbd:#34D07A; --qacc:#86EFAC; --qglow:0 0 16px rgba(52,208,122,.38); }
  body.qt-candy{ --qbg:linear-gradient(160deg,#3a1146,#5e1a63 50%,#7a1f52); --qcard:#4a1554; --qink:#FFEFFB; --qmut:#F1C2E8; --qopt:#661f6e; --qbd:#F472B6; --qacc:#FBB6E0; --qglow:0 0 16px rgba(244,114,182,.4); }
  body.qt-dark{ --qbg:linear-gradient(160deg,#15181f,#1c2029 55%,#12151b); --qcard:#1b1f28; --qink:#EDF1F7; --qmut:#AEB6C2; --qopt:#252b36; --qbd:#5B6472; --qacc:#93A0B4; --qglow:0 0 0 rgba(0,0,0,0); }

  /* Vollflächiger Theme-Hintergrund über fixiertes Pseudo-Element (iOS-sicher). */
  body.has-qtheme[data-screen="quiz"]::before,
  body.has-qtheme[data-screen="student-welcome"]::before{
    content:""; position:fixed; inset:0; z-index:0; pointer-events:none; background:var(--qbg); }
  body.has-qtheme[data-screen="quiz"] .wrap,
  body.has-qtheme[data-screen="student-welcome"] .wrap{ position:relative; z-index:1; }
  /* Übung füllt den ganzen Bildschirm (kein weißer Rand unten). */
  body.has-qtheme[data-screen="quiz"] #screen-quiz,
  body.has-qtheme[data-screen="student-welcome"] #screen-student-welcome{ min-height:100dvh; display:flex; flex-direction:column; }
  body.has-qtheme #screen-quiz, body.has-qtheme #screen-student-welcome{
    position:relative; z-index:1;
    background:var(--qcard) !important; color:var(--qink) !important;
    border:1.5px solid color-mix(in srgb, var(--qbd) 45%, transparent); box-shadow:0 18px 50px rgba(0,0,0,.35), var(--qglow); }
  body.has-qtheme #screen-quiz .qtext, body.has-qtheme #screen-student-welcome h2,
  body.has-qtheme #screen-quiz .q-score{ color:var(--qink) !important; }
  body.has-qtheme #screen-student-welcome .lead, body.has-qtheme #screen-quiz .q-score{ color:var(--qmut) !important; }
  body.has-qtheme #screen-quiz .q-pill{ background:linear-gradient(135deg,var(--qbd),var(--qacc)); box-shadow:var(--qglow); }
  body.has-qtheme #screen-quiz .qtag{ background:color-mix(in srgb,var(--qbd) 22%, transparent); color:var(--qacc); }
  body.has-qtheme #screen-quiz .q-frame{ background:color-mix(in srgb,var(--qopt) 55%, var(--qcard));
    border-color:color-mix(in srgb,var(--qbd) 45%, transparent); }
  body.has-qtheme #screen-quiz .q-frame::before{ background:linear-gradient(180deg,var(--qbd),var(--qacc)); }
  body.has-qtheme #screen-quiz .progressbar{ background:color-mix(in srgb,var(--qbd) 20%, transparent); }
  body.has-qtheme #screen-quiz .progressbar i{ background:linear-gradient(90deg,var(--qbd),var(--qacc)); box-shadow:var(--qglow); }
  /* Optionen (nur unbeantwortet): getönt + Glow. Richtig/Falsch behalten Grün/Rot. */
  body.has-qtheme #screen-quiz .opt:not(.correct):not(.wrong):not(.sel){
    background:var(--qopt) !important; color:var(--qink) !important;
    border-color:color-mix(in srgb,var(--qbd) 55%, transparent) !important; box-shadow:var(--qglow); }
  body.has-qtheme #screen-quiz .opt:not(.correct):not(.wrong) .k{
    background:color-mix(in srgb,var(--qbd) 30%, transparent); color:var(--qink); border-color:var(--qbd); }
  body.has-qtheme #screen-quiz .opt:not(.correct):not(.wrong):hover{ border-color:var(--qacc) !important; }
  body.has-qtheme #screen-student-welcome #st-select,
  body.has-qtheme #screen-student-welcome #st-name{ background:var(--qopt); color:var(--qink); border-color:color-mix(in srgb,var(--qbd) 45%, transparent); }

  /* Start-Sperre: Warte-Overlay für Schüler (Aufgaben noch nicht freigegeben).
     DECKKRAFT IST HIER EINE FUNKTION, KEIN GESCHMACK (gemeldet 29.07.2026):
     bis 2.65.0 lag nur ein halbtransparenter Schleier (.55) mit 9 px Unschärfe
     darüber. Titel, Infotext und die ersten Aufgaben blieben lesbar – und wer
     das Gerät kippte oder die Helligkeit hochdrehte, las mit. Das Gate ist aber
     genau dafür da, dass die Klasse noch NICHTS sieht, bis die Lehrkraft
     freigibt. Jetzt deckt es zuverlässig ab (.965 + 16 px Unschärfe); die
     Unschärfe bleibt, damit erkennbar ist, dass da eine Seite WARTET und nicht
     etwa nichts geladen hat. */
  #wait-gate{position:fixed;inset:0;z-index:1400;display:none;align-items:center;justify-content:center;padding:26px;
    background:rgba(16,22,40,.965);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);text-align:center;}
  #wait-gate.show{display:flex;}
  /* Kein Mitscrollen und kein Tab-Sprung in die verdeckte Seite. */
  body.wg-an{overflow:hidden;}
  #wait-gate .wg-card{background:var(--card);border-radius:20px;padding:28px 24px;max-width:360px;width:100%;box-shadow:0 24px 60px rgba(0,0,0,.35);}
  #wait-gate .wg-ico{width:64px;height:64px;margin:0 auto 14px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--brand-soft,#EEF1FB);}
  #wait-gate .wg-ico svg{width:32px;height:32px;stroke:var(--brand);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  #wait-gate h3{margin:0 0 6px;font-size:19px;}
  #wait-gate p{margin:0;color:var(--muted);font-size:14px;line-height:1.5;}
  /* Dieselbe Punktreihe wie beim Laden (.ld-dots) – ein Kind, das dieses
     Muster kennt, weiß: es passiert etwas, ich muss nichts tun. */
  #wait-gate .ld-dots{margin:18px auto 0;}

  /* Auge-Umschalter (Start-Sperre) oben links auf der QR-Seite – nur Icon. */
  .qr-lock{position:absolute;top:12px;left:12px;z-index:4;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;
    border-radius:12px;border:1.5px solid var(--line);background:var(--card);cursor:pointer;color:var(--muted);box-shadow:0 2px 8px rgba(20,30,60,.08);}
  .qr-lock svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .qr-lock.locked{border-color:var(--bad);color:var(--bad);background:var(--bad-soft,#FCE9E7);}
  .qr-lock.open{border-color:var(--ok);color:var(--ok);background:var(--ok-soft,#E4F6EC);}
  /* Gesperrt: QR unscharf + Hinweis, damit die Klasse nicht scannen kann. */
  .qh-frame{position:relative;transition:filter .25s;}
  .qr-hero.locked .qh-frame{filter:blur(11px);}
  .qr-hero.locked .qh-frame::after{content:"Gesperrt";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
    filter:blur(0);font-weight:800;font-size:15px;color:var(--bad);letter-spacing:.02em;}

  /* Quiz auf dem Handy: mehr Breite, größere Tippflächen, nichts verrutscht/scrollt. */
  @media (max-width:600px){
    body[data-screen="quiz"] .wrap{ padding-left:calc(10px + env(safe-area-inset-left)); padding-right:calc(10px + env(safe-area-inset-right)); padding-top:max(calc(12px + env(safe-area-inset-top)),16px); }
    body[data-screen="quiz"] #screen-quiz.card{ padding:16px 14px; border-radius:16px; }
    #screen-quiz .qtext{ font-size:18px; }
    #screen-quiz .q-frame{ padding:14px 14px 13px 17px; margin-bottom:18px; }
    #screen-quiz .opt{ padding:16px 15px; font-size:16px; }
    #screen-quiz .opt .k{ width:28px; height:28px; }
  }
  #screen-quiz .qtext, #screen-quiz .opt{ overflow-wrap:anywhere; }
  /* Mehr Luft zwischen Fortschrittsbalken und Frage-Rahmen (nur im Quiz). */
  #screen-quiz .progressbar{ margin-bottom:16px; }

  /* ===== FACH-LEISTE mit Pfeil-Scroll (statt Scrollbar) ===== */
  .kb-fachwrap{ display:flex; align-items:center; gap:4px; margin-bottom:12px; }
  .kb-fachscroll{ display:flex; gap:6px; flex-wrap:nowrap; overflow-x:auto; scroll-behavior:smooth;
    flex:1; min-width:0; padding:1px; scrollbar-width:none; -ms-overflow-style:none; }
  .kb-fachscroll::-webkit-scrollbar{ display:none; height:0; }
  .kb-facharrow{ flex:none; width:26px; height:26px; border-radius:50%; border:1.5px solid var(--line);
    background:var(--card); color:var(--ink); cursor:pointer; display:none; align-items:center;
    justify-content:center; font-size:14px; line-height:1; padding:0; }
  .kb-facharrow.show{ display:inline-flex; }
  .kb-facharrow:active{ transform:scale(.92); }
  .kb-fachchip{ flex:none; padding:6px 13px; border-radius:999px; font:inherit; font-size:12.5px;
    font-weight:600; cursor:pointer; white-space:nowrap; border:1.5px solid var(--line);
    background:#fff; color:var(--ink); }
  .kb-fachchip.on{ border-color:var(--brand); background:var(--brand); color:#fff; }

  /* ===== KOMPAKTE AKTIONSLEISTE (Klassenansicht) ===== */
  .kb-actbar{ display:flex; gap:6px; align-items:stretch; justify-content:center;
    flex-wrap:nowrap; margin-bottom:12px; }
  .kb-actbtn{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center;
    justify-content:center; gap:3px; padding:8px 4px; border:1.5px solid var(--line);
    border-radius:11px; background:var(--card); color:var(--ink); cursor:pointer;
    font:inherit; font-size:11px; font-weight:600; line-height:1.1; transition:border-color .12s,transform .08s; }
  .kb-actbtn:hover{ border-color:var(--brand); }
  .kb-actbtn:active{ transform:scale(.96); }
  .kb-actbtn svg{ width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2;
    stroke-linecap:round; stroke-linejoin:round; }
  .kb-actbtn.accent{ background:var(--brand); border-color:var(--brand); color:#fff; }
  /* Kurzzeitiges Highlight, solange die zugehörige Aktion (Popup/Prompt) offen ist. */
  .kb-actbtn.on{ border-color:var(--brand); box-shadow:0 0 0 2px var(--brand-weak,rgba(124,92,246,.22)) inset; }
  .kb-actbtn .kb-actlbl{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
  .kb-actbtn.more{ flex:0 0 44px; }
  @media (max-width:560px){
    .kb-actbtn .kb-actlbl{ display:none; }   /* eng/mobil: nur Icons */
    .kb-actbtn{ flex:1 1 0; padding:10px 4px; }
    .kb-actbtn.more{ flex:0 0 44px; }
  }

  /* ===== NEUE KLASSEN-ANSICHT (kbx): Kopfzeile + Fach-Matrix + Fokus-Blur =====
     Kopf: Klassen-Chip (Dropdown) + Kennzahlen inline + Icon-Aktionen, die sich
     bei Hover/Aktiv wie die Sidebar-Nav mit Label + eigener Farbe ausklappen. */
  .kbx-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
  .kbx-chip{ display:inline-flex; align-items:center; gap:8px; border:none; border-radius:12px;
    padding:9px 17px; font:inherit; font-size:16.5px; font-weight:800; cursor:pointer;
    background:var(--brand-soft); color:var(--brand-dk); box-shadow:0 1px 2px rgba(27,34,48,.08);
    transition:transform .1s, box-shadow .12s; }
  .kbx-chip:hover{ box-shadow:0 3px 8px rgba(27,34,48,.14); }
  .kbx-chip:active{ transform:scale(.96); }
  .kbx-chip svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.8;
    stroke-linecap:round; stroke-linejoin:round; }
  /* Klassen-Chip + Kennzahlen sitzen auf Desktop OBEN in der Kopfzeile neben
     dem Seitentitel (linksbündig, vertikal zentriert); mobil in der Karte. */
  /* KEIN `overflow:hidden` MEHR (Befund Murat 05.08.2026: „klasse secmeye
     calisinca kesiliyo soldan kutu"). Es beschnitt den Klassen-Chip an der
     Seite – sichtbar an seinem Schatten und beim Antippen (`:active` skaliert
     ihn). Das Abschneiden langer Kennzahlen braucht es hier nicht: `.kbx-kpi`
     bringt sein eigenes `overflow:hidden` mit `text-overflow:ellipsis` mit.
     Etwas mehr Luft (`gap`), weil in dieser Zeile jetzt drei Dinge stehen. */
  #kbx-tb{ flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:16px;
    margin-left:18px; overflow:visible; }
  #kbx-tb .kbx-kpi{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .kbx-head-ck{ display:none; align-items:center; gap:10px; min-width:0; }
  @media (max-width:899px){
    #kbx-tb{ display:none; }
    .kbx-head-ck{ display:flex; flex:1 1 auto; flex-wrap:wrap; }
  }
  /* MOBIL GEHOERT DER KLASSENNAME NACH OBEN (v2.143.0, Wunsch Murat
     05.08.2026: „mobilde 10 a var ya klassenbuchun yaninda olsun,
     klassenbuch textini kücült").
     WELCHE KLASSE ist auf einem schmalen Schirm die wichtigste Angabe der
     Seite - wichtiger als das Wort „Klassenbuch", das ohnehin schon in der
     Seitenleiste steht. Genau dieselbe Abwaegung wurde beim Kalender-Zeitraum
     (`#kal-tb`, 2.93.0) getroffen; dort steht die Begruendung ausfuehrlich.
     NUR der Chip wandert mit - die Kennzahlen bleiben mobil verborgen, sonst
     draengen sie Postfach und Profil aus der Zeile.
     Wichtig: `.kbx-head-ck` muss hier AUS, sonst steht der Chip zweimal auf
     dem Bildschirm (oben und in der Karte). */
  @media (max-width:640px){
    /* Der Titel darf NICHT abgeschnitten werden (Befund Murat 05.08.2026:
       „yukarda klassenbuch yazisini sigdir demistim, ne demek bu"). Aus
       „Klassenbuch" wurde „Klassenb…", weil der Titel mit `flex:1 1 auto` und
       `text-overflow:ellipsis` der nachgiebige Teil der Zeile war.
       Jetzt umgekehrt: der Titel ist `flex:0 0 auto` (gibt nicht nach) und
       wird so weit verkleinert, dass er ganz hineinpasst; nachgeben darf der
       Chip-Bereich daneben. `#kbx-tb` braucht dafuer `overflow:visible` -
       das geerbte `overflow:hidden` hat die Klassen-Auswahl an der Seite
       beschnitten („klasse secim kutusuda kesik yandan"). */
    #kbx-tb{ display:flex; flex:1 1 auto; min-width:0; margin-left:8px; gap:8px;
      overflow:visible; }
    #kbx-tb .kbx-kpi{ display:none; }
    #kbx-tb .kbx-chip{ flex:none; font-size:13px; padding:5px 10px; border-radius:10px;
      box-shadow:none; }
    #kbx-tb .kbx-chip svg{ width:12px; height:12px; }
    .kbx-head-ck{ display:none; }
    .app-topbar:has(#kbx-tb) .at-title{ flex:0 0 auto; min-width:0;
      font-size:clamp(13px,3.8vw,16px); overflow:visible; text-overflow:clip; }
  }
  /* Nur Desktop: Titel gibt Platz für den Chip frei. Mobil behält der Titel
     flex:1, damit Postfach + Profil rechts außen bleiben. */
  @media (min-width:900px){
    .app-topbar:has(#kbx-tb) .at-title{ flex:0 0 auto; }
  }
  /* Derselbe Handgriff fuer den Kalender-Zeitraum (2.93.0): er haengt neben
     "Kalender" und braucht denselben Platz-Verzicht des Titels. Anders als
     der Klassen-Chip bleibt er AUCH mobil stehen - "welche Woche sehe ich"
     ist dort die wichtigste Angabe der ganzen Seite, und die eigene Zeile
     dafuer ist gerade weggefallen. */
  .app-topbar:has(#kal-tb) .at-title{ flex:0 0 auto; }
  #kal-tb{ margin-left:12px; }
  .kbx-kpi{ font-size:12.5px; color:var(--muted); min-width:0; }
  .kbx-acts{ margin-left:auto; display:flex; gap:6px; flex-wrap:wrap; }

  /* ===== HALBJAHR-WAEHLER (v2.144.0, docs/PLAN_HALBJAHR.md P1) =============
     ZWEI FASSUNGEN, BEIDE IM HTML - hier entscheidet sich, welche man sieht:
       .kbz-band    ab 641 px: Jahr-Knopf + zwei Reiter + "Gesamt"
       .kbz-kasten  bis 640 px: EIN Knopf, der eine Liste oeffnet
     Kein Messen in JS, kein Neuzeichnen beim Drehen (CLAUDE.md, Muster
     .k-lang/.k-kurz). Wer eine der beiden Regeln entfernt, bekommt entweder
     zwei Waehler nebeneinander oder gar keinen. */
  .kbz-band{ display:flex; align-items:center; gap:5px; flex-wrap:wrap; min-width:0; }
  .kbz-kasten{ display:none; }
  .kbz-jahr, .kbz-reiter, .kbz-ges{ flex:none; font:inherit; font-size:12.5px;
    font-weight:700; cursor:pointer; border-radius:9px; padding:6px 12px;
    border:1px solid var(--line); background:var(--card); color:var(--muted);
    transition:background .12s, color .12s, border-color .12s; }
  .kbz-jahr{ display:inline-flex; align-items:center; gap:5px; font-size:12px; }
  .kbz-jahr svg{ width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:2.6;
    stroke-linecap:round; stroke-linejoin:round; }
  .kbz-jahr:hover, .kbz-reiter:hover, .kbz-ges:hover{ color:var(--ink); border-color:var(--ink); }
  /* Der aktive Reiter traegt die KLASSENFARBE (--zc, aus kbClassColor). Eine
     eigene Farbe fuer Zeitraeume waere eine zweite Bedeutung und wuerde die
     erste entwerten. */
  .kbz-reiter.an{ background:var(--zc,var(--brand)); border-color:var(--zc,var(--brand));
    color:#fff; }
  .kbz-reiter.an:hover{ color:#fff; }
  /* "Gesamt" ist KEIN Halbjahr, sondern die Aufhebung des Filters - deshalb
     gestrichelt und nicht wie ein Reiter geformt. */
  .kbz-ges{ border-style:dashed; font-weight:600; }
  .kbz-ges.an{ border-style:solid; background:var(--brand-soft);
    color:var(--brand); border-color:transparent; }
  .kbz-kbtn{ display:inline-flex; align-items:center; gap:6px; flex:none; font:inherit;
    font-size:12px; font-weight:800; cursor:pointer; border-radius:10px; padding:6px 11px;
    border:1px solid var(--zc,var(--brand)); background:var(--brand-soft);
    color:var(--brand); }
  .kbz-kbtn svg{ width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:2.6;
    stroke-linecap:round; stroke-linejoin:round; }
  /* Im Verwalten-Schubfach steht die Gruppe "Im Unterricht" nur auf schmalen
     Schirmen - auf Tablet und Computer sind dieselben Knoepfe oben (v2.56.0). */
  .kbv-grp.kbv-nurschmal{ display:none; }

  /* Eintraege des Zeitraum-Menues: aktiv HELL, uebrige GEDAEMPFT. Der
     Unterschied liegt in der Schriftfarbe, nicht in `opacity` - Deckkraft auf
     Text multipliziert sich mit dem Untergrund und wandert je Flaechenfarbe. */
  .kbz-opt{ display:flex; align-items:center; gap:10px; width:100%; border:none;
    font:inherit; text-align:left; padding:8px 12px; border-radius:10px;
    cursor:pointer; background:none; }
  .kbz-opt:hover{ background:var(--paper); }
  .kbz-opt-tx{ flex:1; min-width:0; }
  .kbz-opt-tx b{ display:block; font-size:13.5px; font-weight:600; color:var(--muted); }
  .kbz-opt-tx small{ display:block; font-size:11px; color:var(--muted); opacity:.75; }
  .kbz-opt.an .kbz-opt-tx b{ font-weight:800; color:var(--ink); }
  .kbz-opt-hk{ width:15px; height:15px; flex:none; fill:none; stroke:var(--brand);
    stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }

  /* Ein Punkt am Reiter sagt „hier ist noch nichts" - ohne einen Satz in den
     Arbeitsbereich zu legen (v2.146.0). Er ist bewusst KEIN Rot: es ist
     nichts kaputt, es ist nur nichts da. */
  .kbz-leerpunkt{ display:inline-block; width:5px; height:5px; border-radius:50%;
    background:currentColor; opacity:.45; margin-left:6px; vertical-align:2px; }
  .kbz-reiter.an .kbz-leerpunkt{ opacity:.7; }
  /* "Schüler hinzufügen" bei einer noch leeren Klasse - derselbe Knopf wie
     unter der Liste, nur ohne Tabelle darueber. */
  .kbx-leeradd{ margin-top:10px; }
  .kbx-leeradd .kbx-addbtn{ width:auto; border:1px dashed var(--line);
    border-radius:10px; padding:9px 14px; }
  .kbx-act{ display:inline-flex; align-items:center; height:34px; padding:0 8px;
    border:1.5px solid var(--line); border-radius:9px; background:var(--card); color:var(--muted);
    cursor:pointer; font:inherit; font-size:12px; font-weight:700; overflow:hidden;
    transition:border-color .15s, color .15s, box-shadow .15s; }
  .kbx-act svg{ width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:2;
    stroke-linecap:round; stroke-linejoin:round; }
  .kbx-act .kbx-actlbl{ max-width:0; opacity:0; white-space:nowrap; overflow:hidden; margin-left:0;
    transition:max-width .22s ease, opacity .18s ease, margin-left .22s ease; }
  .kbx-act:hover, .kbx-act:focus-visible, .kbx-act.on{ border-color:var(--ac,var(--brand));
    color:var(--ac,var(--brand)); box-shadow:0 0 0 1px var(--ac,var(--brand)) inset; }
  .kbx-act:hover .kbx-actlbl, .kbx-act:focus-visible .kbx-actlbl, .kbx-act.on .kbx-actlbl{
    max-width:110px; opacity:1; margin-left:6px; }
  .kbx-act:active{ transform:scale(.95); }

  .kbx-tablewrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; margin-top:2px; }
  .kbx-table{ width:100%; border-collapse:separate; border-spacing:0; }
  .kbx-table th{ font-size:11.5px; font-weight:700; color:var(--muted); text-align:left;
    padding:7px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
  .kbx-table td{ padding:8px; font-size:13px; border-bottom:1px solid var(--line); white-space:nowrap; }
  .kbx-table tr:last-child td{ border-bottom:none; }
  .kbx-row{ cursor:pointer; transition:filter .2s ease, opacity .2s ease, background .15s; }
  /* ZEBRASTREIFEN (v2.142.0): jede zweite Zeile bekommt einen Hauch Themenfarbe.
     DREI DINGE, DIE HIER NICHT ZUFAELLIG SO SIND:
     1) REIHENFOLGE. Diese Regel steht ABSICHTLICH VOR `:hover` und `.open` -
        alle drei haben dieselbe Spezifitaet (0,2,1), also entscheidet die
        Position in der Datei. Waer sie weiter unten, gaebe es auf jeder
        zweiten Zeile keine Hover-Anzeige mehr.
     2) NICHT `nth-child`. Zwischen den Schuelerzeilen steht bei geoeffneter
        Zeile ein `.kbx-panelrow` - `nth-child` wuerde ab da falsch zaehlen und
        das Muster beim Aufklappen springen lassen. Die Klasse setzt deshalb
        das JS aus dem SCHUELER-Index (kbxClassTable).
     3) EIGENE TOENE STATT `--paper`. `--paper` ist die Hover-Farbe; als
        Zebraton waere der Unterschied weg. Hell: eine Spur kuehler als Weiss.
        Dunkel: eine Spur heller als `--card` (#1B2230) - im dunklen Design
        ist `--paper` DUNKLER als die Karte, ein "helleres Grau" gibt es dort
        also nicht zu erben. */
  /* Grundtoene ohne Flaechenfarbe. Waehlt die Lehrkraft eine, ueberschreibt
     der Abschnitt „Akzent aus der Flaechenfarbe" am Dateiende beide Zeilen -
     dort steht die vollstaendige Liste, hier nur der Rueckfall. */
  .kbx-row.kbx-zebra td{ background:#FAFBFE; }
  html[data-theme="dark"] .kbx-row.kbx-zebra td{ background:#1F2739; }
  @media (prefers-color-scheme: dark){
    html:not([data-theme="light"]) .kbx-row.kbx-zebra td{ background:#1F2739; }
  }
  /* ===== SCHUELERPROFIL: REITER UND FACH-KARTEN (N4, v2.160.0) ==========
     Aufbau des Profils von oben: Kopf, Noten-Trend, Endnote je Fach als
     Karten, dann diese vier Reiter. Gebaut in kbBuildProfilReiter()
     bzw. kbBuildEndnote() (static/js/index-app.js).

     WARUM DIE FARBEN INLINE KOMMEN UND NICHT HIER STEHEN: Die Karte traegt
     die Farbe IHRER Note (zensurFarbe). Eine Klasse je Note waere eine
     zweite Notenfarben-Tabelle neben der in JavaScript - und die beiden
     liefen bei der naechsten Aenderung auseinander. Hier steht nur, was
     unabhaengig von der Note gilt: Form, Abstand, Schrift. */
  .kbp-tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:12px; }
  .kbp-tab{ flex:1 1 0; min-width:0; border:0; background:none; font:inherit; font-size:13px;
    font-weight:700; color:var(--muted); padding:9px 8px; cursor:pointer;
    border-bottom:2.5px solid transparent; white-space:nowrap; border-radius:9px 9px 0 0;
    overflow:hidden; text-overflow:ellipsis; }
  .kbp-tab:hover{ background:var(--paper); color:var(--text); }
  .kbp-tab.an{ color:var(--brand); border-bottom-color:var(--brand); background:var(--paper); }
  .kbp-fachchip{ display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line);
    border-radius:999px; padding:5px 6px 5px 11px; font:inherit; font-size:12.5px;
    cursor:pointer; color:var(--text); }
  .kbp-fachchip:hover{ filter:brightness(.97); }
  .kbp-fachchip-n{ font-weight:700; max-width:150px; overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap; }
  .kbp-fachchip-p{ color:var(--muted); font-size:11.5px; white-space:nowrap; }
  .kbp-fachchip-b{ width:22px; height:22px; border-radius:7px; color:#fff; font-weight:800;
    font-size:12.5px; display:inline-flex; align-items:center; justify-content:center; flex:none; }
  .kbp-rechenweg{ margin-top:10px; border:1px solid var(--line); background:none; font:inherit;
    font-size:12px; font-weight:700; border-radius:9px; padding:6px 11px; cursor:pointer; }
  @media (max-width:640px){
    /* Vier Reiter passen auf einem Handy nicht nebeneinander. Sie brechen
       aber NICHT um (dann waechst das Profil nach unten), sondern werden zu
       einer schiebbaren Spur - der einzige Fall, in dem Schieben richtig
       ist: Es ist ein Bedienelement in EINER Zeile, keine Kopfzeile mit
       Knoepfen (vgl. v2.99.7, .foerder-head). */
    .kbp-tabs{ overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
    .kbp-tabs::-webkit-scrollbar{ display:none; }
    .kbp-tab{ flex:0 0 auto; font-size:12.5px; padding:9px 13px; }
    .kbp-fachchip-n{ max-width:110px; }
  }
  .kbx-row:hover td{ background:var(--paper); }
  .kbx-row.open td{ background:#F3F6FF; border-bottom-color:transparent; }
  .kbx-row.open td:first-child{ border-top-left-radius:14px; }
  .kbx-row.open td:last-child{ border-top-right-radius:14px; }
  .kbx-row.blur{ filter:blur(1.6px); opacity:.5; }
  .kbx-panelrow td{ background:#F3F6FF; white-space:normal;
    border-bottom-left-radius:14px; border-bottom-right-radius:14px; }
  /* "+ Schüler hinzufügen" als LETZTE Zeile der Liste (v2.142.0). Der Weg
     ueber "Verwalten" bleibt - das hier ist ein zweiter Zugang an der Stelle,
     an der man den Wunsch hat: unter dem letzten Kind. Bewusst leise
     (gestrichelt, grau), damit es die Namen nicht ueberstrahlt. */
  .kbx-addrow td{ padding:0; border-bottom:none; }
  .kbx-addbtn{ display:flex; align-items:center; gap:9px; width:100%; border:none;
    background:none; font:inherit; font-size:12.5px; font-weight:700; color:var(--muted);
    padding:9px 8px; cursor:pointer;
    transition:color .15s, background .15s; }
  .kbx-addbtn:hover{ color:var(--brand); background:var(--paper); }
  .kbx-addbtn svg{ width:15px; height:15px; flex:none; fill:none; stroke:currentColor;
    stroke-width:2.6; stroke-linecap:round; }
  @keyframes kbxSlide{ from{ opacity:0; transform:translateY(-7px); } to{ opacity:1; transform:none; } }
  .kbx-panel{ animation:kbxSlide .24s ease; }
  .kbx-num{ display:inline-block; min-width:20px; color:var(--muted); font-weight:700; font-size:11.5px; }
  /* Auge hinter einem gekürzten Namen (§6.13): deckt GENAU diesen Namen auf.
     Bewusst blass und klein – in einer 28-Zeilen-Liste darf es kein Schaltpult
     werden. Auf Touch-Geräten bleibt es sichtbar (kein Hover), deshalb wird die
     Deckkraft nur beim Hover erhöht, nie auf 0 gesetzt. */
  .name-auge{ display:inline-flex; align-items:center; justify-content:center;
    vertical-align:middle; margin-left:5px; padding:1px; border:0; background:none;
    color:var(--muted); opacity:.42; cursor:pointer; line-height:0; border-radius:5px; }
  .name-auge:hover{ opacity:1; color:var(--brand); background:var(--paper); }
  .name-auge:focus-visible{ opacity:1; outline:2px solid var(--brand); outline-offset:1px; }
  @media print{ .name-auge{ display:none !important; } }
  .kbx-starpill{ display:inline-flex; align-items:center; gap:3px; background:#FFF6E0;
    border:1px solid #F6D98A; color:#8A6100; border-radius:999px; padding:2px 9px;
    font-size:11.5px; font-weight:800; cursor:pointer; }
  .kbx-starpill:hover{ border-color:#E6B335; }
  .kbx-act.primary{ background:var(--brand); border-color:var(--brand); color:#fff; }
  .kbx-act.primary .kbx-actlbl{ max-width:110px; opacity:1; margin-left:6px; }
  .kbx-act.primary:hover{ background:var(--brand-dk); border-color:var(--brand-dk); color:#fff; box-shadow:none; }
  /* Mobil: alles muss OHNE Seitwärts-Scrollen passen – 3. Fach-Spalte, "+N"
     und Sterne-Spalte ausblenden, Abstände/Schrift kompakter. */
  @media (max-width:600px){
    .kbx-table{ min-width:0; }
    .kbx-table th, .kbx-table td{ padding:7px 4px; font-size:12px; }
    .kbx-c3, .kbx-cplus, .kbx-cstar{ display:none; }
    .kbx-note{ min-width:18px; height:18px; font-size:10.5px; }
    .kbx-panel{ padding:9px 10px; gap:9px; }
    .kbx-head{ gap:7px; }
    .kbx-chip{ padding:5px 10px; font-size:13.5px; }
    .kbx-kpi{ font-size:11.5px; }
    .kbx-act{ height:31px; padding:0 7px; }
    .kbx-act svg{ width:15px; height:15px; }
    .kbx-acts{ gap:5px; }
  }
  .kbx-note{ display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px;
    color:#fff; border-radius:6px; font-weight:800; font-size:11.5px; padding:0 5px; }
  /* Fach-Spalten mittig – gleichmäßig verteilt, wächst sauber mit jedem neuen Fach.
     Name-Spalte bleibt links, Sterne rechts. */
  .kbx-table th.kbx-cfach, .kbx-table td.kbx-cfach{ text-align:center; }
  .kbx-table th.kbx-cstar, .kbx-table td.kbx-cstar{ text-align:right; }
  .kbx-table th:first-child, .kbx-table td:first-child{ text-align:left; }
  /* Viele Fach-Spalten: kompakter, aber ALLE sichtbar (nie verstecken). */
  .kbx-table.kbx-many th, .kbx-table.kbx-many td{ font-size:11.5px; padding:8px 5px; }
  .kbx-table.kbx-many .kbx-note{ min-width:17px; height:17px; font-size:10px; padding:0 4px; }
  /* Kritische Fach-Zellen: kein roter Hintergrund mehr – die rote Noten-
     Plakette (5/6) reicht als Signal. */
  .kbx-crit{ background:transparent; }
  /* Profil-Karte im Fokus-Panel: DER Blickfang rechts (statt Sterne-Karte). */
  .kbx-profcard{ flex:none; display:flex; flex-direction:column; align-items:center; gap:3px;
    padding:10px 18px; border-radius:14px; cursor:pointer; font:inherit;
    border:1.5px solid transparent;
    background:linear-gradient(var(--card),var(--card)) padding-box,
      linear-gradient(135deg,#2E5BFF,#7A5AF8,#D4537E) border-box;
    transition:transform .13s ease, box-shadow .13s ease; }
  .kbx-profcard:hover{ transform:translateY(-2px); box-shadow:0 8px 20px rgba(46,91,255,.20); }
  .kbx-profcard:active{ transform:scale(.97); }
  .kbx-profcard .kbx-pem{ font-size:31px; line-height:1; filter:drop-shadow(0 2px 3px rgba(0,0,0,.20)); }
  .kbx-profcard .kbx-plb{ display:flex; align-items:center; gap:4px; font-size:12px; font-weight:800;
    background:linear-gradient(90deg,#2E5BFF,#7A5AF8); -webkit-background-clip:text;
    background-clip:text; color:transparent; white-space:nowrap; }
  /* Schmale Ansicht: Panel-Inhalte stapeln sich -> Aktions-Icons und die
     Profil-Karte MITTIG zeigen. Ab Tablet/Desktop (Karte sitzt rechts)
     bleibt das bisherige Layout unverändert. */
  @media (max-width:760px){
    .kbx-actrow{ justify-content:center; }
    .kbx-profcard{ margin-left:auto; margin-right:auto; }
  }
  .kbx-kichip{ display:inline-flex; align-items:center; gap:4px; border-radius:999px;
    padding:2px 9px; font-size:11px; font-weight:800; margin:4px 5px 0 0; }
  .kbx-plusfach{ color:var(--brand) !important; cursor:pointer; }
  .kbx-plusfach:hover{ text-decoration:underline; }
  .kbx-stars{ color:#B8860B; font-weight:800; text-align:right; }
  .kbx-panel{ background:var(--card); border:1px solid var(--line); border-radius:10px;
    padding:11px 13px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; cursor:default; }
  .kbx-qa{ display:inline-flex; align-items:center; gap:5px; border:1px solid var(--line);
    border-radius:8px; padding:5px 10px; font:inherit; font-size:12px; font-weight:600;
    color:var(--ink); background:var(--card); cursor:pointer; }
  .kbx-qa svg{ width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2;
    stroke-linecap:round; stroke-linejoin:round; }
  .kbx-qa:hover{ border-color:var(--brand); color:var(--brand); }
  .kbx-starcard{ flex:none; background:#FFF6E0; border:1px solid #F6D98A; border-radius:10px;
    padding:7px 12px; text-align:center; min-width:96px; }
  /* Erweiterte Aktionen (Excel/Fächer/Freigeben/Umbenennen): nur Desktop sichtbar,
     mobil wandern sie ins "…"-Menü, damit die Kopfzeile nicht umbricht. */
  @media (max-width:760px){ .kbx-act.kbx-ext{ display:none; } }
  .kbx-fbrow{ display:flex; align-items:center; gap:8px; font-size:11.5px; margin-bottom:4px; }
  /* Fachname: NIE abschneiden – breitere Spalte, lange Namen brechen um. */
  .kbx-fbrow .kbx-fbname{ width:90px; flex:none; color:var(--muted); font-weight:600;
    white-space:normal; line-height:1.2; overflow-wrap:anywhere; hyphens:auto; }
  .kbx-fbtrack{ flex:1; height:7px; background:var(--paper); border-radius:99px; overflow:hidden; }
  .kbx-fbfill{ height:100%; border-radius:99px; }
  .kbx-fbpct{ width:34px; flex:none; text-align:right; font-weight:800; }

  /* ===== SCHÜLER-KACHELRASTER (Klassenansicht) ===== */
  .kb-stud-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr));
    gap:8px; margin-top:4px; }
  .kb-stud-tile{ display:flex; flex-direction:column; align-items:center; gap:5px;
    padding:11px 6px; border:1.5px solid var(--line); border-radius:13px; background:var(--card);
    cursor:pointer; text-align:center; transition:border-color .12s, transform .08s; }
  .kb-stud-tile:hover{ border-color:var(--brand); }
  .kb-stud-tile:active{ transform:scale(.97); }
  .kb-stud-ava{ width:42px; height:42px; border-radius:50%; color:#fff; font-weight:800;
    font-size:15px; display:flex; align-items:center; justify-content:center; flex:none; }
  .kb-stud-name{ font-weight:700; font-size:12.5px; line-height:1.15; max-width:100%;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .kb-stud-stat{ font-size:11px; color:var(--muted); line-height:1.2; }
  @media (max-width:480px){
    .kb-stud-grid{ grid-template-columns:repeat(auto-fill, minmax(82px, 1fr)); gap:6px; }
    .kb-stud-ava{ width:38px; height:38px; font-size:14px; }
    .kb-stud-name{ font-size:11.5px; }
  }

  /* ---- Klassenbericht-Modal: Akkordeons + Schüler-Auswahl ---- */
  .kbr-acc{ border:1px solid var(--line); border-radius:14px; overflow:hidden; margin-bottom:12px; background:var(--card); }
  /* Solange das Zeitraum-Menü offen ist: nicht abschneiden (overflow:hidden
     würde das Dropdown im kleinen Akkordeon kappen). */
  .kbr-acc.menu-open{ overflow:visible; }
  .kbr-acc.acc-zeit{ border-color:#D7E0FF; }
  .kbr-acc.acc-fach{ border-color:#FFE1C2; }
  .kbr-acc.acc-schueler{ border-color:#CFEBDD; }
  .kbr-acc-head{ display:flex; align-items:center; gap:10px; width:100%; border:none; background:transparent;
    padding:14px 16px; cursor:pointer; font-family:inherit; font-weight:700; font-size:14.5px; color:var(--ink); text-align:left; }
  .acc-zeit .kbr-acc-head{ background:#F3F6FF; }
  .acc-fach .kbr-acc-head{ background:#FFF6EE; }
  .acc-schueler .kbr-acc-head{ background:#F0FAF4; }
  .kbr-acc-head .kbr-chev{ margin-left:auto; transition:transform .18s ease; color:var(--muted); flex:none; }
  .kbr-acc.open .kbr-chev{ transform:rotate(180deg); }
  .kbr-acc-badge{ font-size:11.5px; font-weight:700; color:#fff; border-radius:999px; padding:2px 9px; flex:none; }
  .acc-zeit .kbr-acc-badge{ background:#3B62F6; }
  .acc-fach .kbr-acc-badge{ background:#E8890C; }
  .acc-schueler .kbr-acc-badge{ background:#17A05A; }
  .kbr-acc-body{ display:none; padding:14px 16px 16px; }
  .kbr-acc.open .kbr-acc-body{ display:block; }
  /* Zeitraum-Auswahl (Dropdown-Pill) */
  .kbr-zsel{ position:relative; z-index:1; }
  /* Menü offen -> ganzer Auswahlbereich über die Datumsfelder heben
     (native <input type=date> erzeugen sonst einen eigenen Stacking-
     Context und verdecken das Dropdown). */
  .kbr-zsel.menu-open{ z-index:60; }
  /* Solange das Zeitraum-Menü offen ist, werden die darunterliegenden Felder
     (Von/Bis-Datum, Eigener-Text) ausgeblendet. Native <input type=date>
     erzeugen sonst einen eigenen Stacking-Context und überdecken das Dropdown
     trotz hohem z-index. Beim Schließen werden sie sofort wieder sichtbar. */
  .kbr-menu-open-below #kbr-daterow,
  .kbr-menu-open-below #kbr-zfrei{ visibility:hidden; }
  .kbr-zpill{ display:inline-flex; align-items:center; gap:8px; border:1.5px solid var(--line); background:#fff;
    border-radius:999px; padding:9px 15px; font:inherit; font-weight:700; font-size:13.5px; color:var(--ink); cursor:pointer; }
  .kbr-zpill:hover{ border-color:var(--brand); }
  /* Kompakt: enge Zeilen + kleine Schrift, damit das Menü auch im kleinen
     Akkordeon-Bereich vollständig sichtbar bleibt. */
  .kbr-zmenu{ display:none; position:absolute; top:calc(100% + 4px); left:0; z-index:60; background:#fff;
    border:1px solid var(--line); border-radius:10px; box-shadow:0 12px 34px rgba(20,28,45,.16); padding:3px; min-width:170px; }
  .kbr-zmenu.open{ display:block; }
  .kbr-zopt{ display:block; width:100%; text-align:left; border:none; background:transparent; font:inherit; font-size:12.5px;
    padding:5px 9px; border-radius:7px; cursor:pointer; color:var(--ink); line-height:1.35; }
  .kbr-zopt:hover{ background:var(--brand-soft); }
  .kbr-zopt.sel{ background:var(--brand-soft); font-weight:700; }
  /* Schüler-Grid: 4 pro Reihe, responsiv kleiner, bei Enge untereinander */
  .kbr-stgrid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; }
  @media (max-width:560px){ .kbr-stgrid{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
  @media (max-width:420px){ .kbr-stgrid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
  .kbr-stchip{ display:flex; align-items:center; gap:7px; border:1.5px solid var(--line); border-radius:11px;
    padding:8px 9px; cursor:pointer; background:#fff; font-size:12.5px; color:var(--ink); min-width:0; transition:border-color .12s, background .12s; }
  .kbr-stchip:hover{ border-color:#9FB4E8; }
  .kbr-stchip.sel{ border-color:#17A05A; background:#F0FAF4; }
  .kbr-stchip .kbr-stname{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; min-width:0; }
  .kbr-stchip .kbr-stbox{ width:16px; height:16px; border-radius:5px; border:1.6px solid #C4CBD8; flex:none;
    display:flex; align-items:center; justify-content:center; }
  .kbr-stchip.sel .kbr-stbox{ background:#17A05A; border-color:#17A05A; }
  .kbr-stchip.sel .kbr-stbox svg{ display:block; }
  .kbr-stchip .kbr-stbox svg{ display:none; width:11px; height:11px; }

  /* Klassenüberblick + Fragen-Statistik: breite Ansicht nebeneinander, mobil untereinander */
  .kb-two-col{ display:grid; grid-template-columns:1fr; gap:10px; align-items:start; margin-bottom:10px; }
  .kb-two-col > div{ margin-bottom:0 !important; }
  @media (min-width:900px){ .kb-two-col{ grid-template-columns:repeat(2, minmax(0,1fr)); } }

  /* ===== BELOHNUNGSTAFEL (Sterne-System) ===== */
  #belohnung-ov{position:fixed;inset:0;z-index:600;background:rgba(20,28,48,.5);display:none;overflow-y:auto;padding:0;}
  #belohnung-ov.show{display:block;}
  .bel-sheet{max-width:1180px;margin:0 auto;min-height:100%;background:linear-gradient(160deg,#FFF9EC,#FFF3F6 60%,#F0F7FF);}
  .bel-top{position:sticky;top:0;z-index:2;background:rgba(255,255,255,.86);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);
    display:flex;align-items:center;gap:12px;padding:14px 18px;padding-top:calc(14px + env(safe-area-inset-top,0px));}
  .bel-top h2{margin:0;font-size:18px;font-weight:850;flex:1;}
  .bel-x{width:38px;height:38px;border-radius:11px;border:1px solid var(--line);background:var(--card);cursor:pointer;display:flex;align-items:center;justify-content:center;}
  .bel-x svg{width:18px;height:18px;stroke:var(--ink);fill:none;stroke-width:2;stroke-linecap:round;}
  .bel-body{padding:16px 16px 60px;}
  /* Pizza-Kasse: Pizza-Bild als Hintergrund links, große Sterne, Beutel-Spalte rechts */
  .bel-pizza{border-radius:18px;padding:18px;margin-bottom:16px;position:relative;overflow:hidden;box-shadow:0 8px 24px rgba(245,166,35,.22);
    background-image:url('/static/images/pizza.png'),linear-gradient(135deg,#FFE8B0,#FFD27A);
    background-repeat:no-repeat,no-repeat;background-position:left 7% center,center;background-size:130px auto,cover;
    min-height:170px;}
  .bel-pizza.party{background-image:url('/static/images/pizza.png'),linear-gradient(135deg,#B6F7C1,#7BE0A0);}
  .bel-pizza h3{margin:0 0 4px;font-size:16px;font-weight:850;color:#7a4a00;}
  .bel-pizza .bp-stars{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;}
  .bel-pizza .bp-stars svg{width:38px;height:38px;filter:drop-shadow(0 2px 4px rgba(122,74,0,.25));}
  .bel-pizza-main{display:flex;align-items:center;gap:12px;padding:8px 52px 8px 190px;min-height:150px;}
  .bel-beutel-col{display:flex;flex-direction:column;gap:7px;align-items:stretch;flex:none;}
  .bel-beutel-btn{display:flex;align-items:center;gap:9px;border-radius:12px;padding:5px 11px;cursor:pointer;font:inherit;font-weight:800;font-size:12.5px;background:rgba(255,255,255,.82);}
  .bel-beutel-btn:hover{background:#fff;}
  .bel-beutel-btn svg{width:15px;height:15px;fill:#F5A623;stroke:#E6A700;stroke-width:1;flex:none;}
  .bel-ico-btn{position:absolute;width:42px;height:42px;border-radius:12px;border:1px solid rgba(122,74,0,.28);background:rgba(255,255,255,.78);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;z-index:2;}
  .bel-ico-btn:hover{background:#fff;}
  .bel-ico-btn svg{width:24px;height:24px;stroke:#7a4a00;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  @media (max-width:600px){
    .bel-pizza{background-size:88px auto,cover;background-position:left 12px center,center;}
    .bel-pizza-main{padding:8px 8px 8px 104px;}
    .bel-pizza .bp-stars svg{width:28px;height:28px;}
  }
  .bel-legend{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;align-items:center;}
  .bel-beutel{display:inline-flex;align-items:center;gap:6px;background:var(--card);border:1.5px solid var(--line);border-radius:12px;padding:7px 12px;font-size:13px;font-weight:800;}
  .bel-beutel svg{width:20px;height:20px;}
  .bel-cfg-btn{margin-left:auto;border:1px solid var(--line);background:var(--card);border-radius:10px;padding:7px 12px;font:inherit;font-weight:700;font-size:12.5px;cursor:pointer;color:var(--brand);}
  .bel-row{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:11px 13px;margin-bottom:9px;box-shadow:0 1px 3px rgba(20,30,60,.04);}
  .bel-ava{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;flex:none;font-size:16px;}
  .bel-name{font-weight:800;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .bel-sub{font-size:11.5px;color:var(--muted);margin-top:1px;}
  .bel-starbig{display:inline-flex;align-items:center;gap:5px;font-weight:900;font-size:20px;color:#E6A700;}
  .bel-starbig svg{width:22px;height:22px;fill:#F5A623;stroke:#E6A700;stroke-width:1;}
  .bel-pm{display:flex;gap:6px;flex:none;}
  .bel-pm button{width:38px;height:38px;border-radius:11px;border:1.5px solid var(--line);background:var(--card);font-size:20px;font-weight:800;cursor:pointer;line-height:1;color:var(--ink);}
  .bel-pm button.plus{border-color:var(--ok);color:var(--ok);background:var(--ok-soft,#E4F6EC);}
  .bel-pm button.minus{border-color:var(--bad);color:var(--bad);}
  .bel-badge{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;font-weight:800;border-radius:999px;padding:1px 8px;margin-left:6px;}
  /* Sterne-Akkordeon unter jeder Schülerzeile */
  .bel-acc{border:1px solid var(--line);border-top:none;border-radius:0 0 14px 14px;background:var(--paper);padding:2px 14px 10px;}
  .bel-acc .bel-starbig svg{width:16px;height:16px;}
  /* Schüler als 4er-Kachel-Raster (statt langer Zeilenliste). Klick auf eine
     Karte öffnet ein Popup mit den Sterne-Details (früherer Akkordeon-Inhalt). */
  .bel-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
  @media(max-width:900px){.bel-grid{grid-template-columns:repeat(3,1fr);}}
  @media(max-width:640px){.bel-grid{grid-template-columns:repeat(2,1fr);}}
  @media(max-width:380px){.bel-grid{grid-template-columns:1fr;}}
  .bel-card{display:flex;flex-direction:column;min-width:0;text-align:left;
    background:var(--card);border:1px solid var(--line);border-radius:13px;padding:9px 11px 8px;cursor:pointer;
    box-shadow:0 1px 3px rgba(20,30,60,.04);transition:border-color .12s,box-shadow .12s,transform .08s;}
  .bel-card:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(46,91,255,.08);}
  .bel-card:active{transform:scale(.985);}
  .bel-card .bel-name{font-size:13.5px;}
  .bel-card .bel-starbig{font-size:16px;}
  .bel-card .bel-starbig svg{width:17px;height:17px;}
  .bel-pm.bel-pm-sm button{width:29px;height:29px;border-radius:9px;font-size:16px;}
  /* Raster (Runden x Schüler) */
  .bel-raster-wrap{margin-top:18px;overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--card);}
  .bel-raster{border-collapse:collapse;min-width:100%;font-size:12.5px;}
  .bel-raster th,.bel-raster td{border:1px solid var(--line);padding:7px 9px;text-align:center;white-space:nowrap;}
  .bel-raster th.n,.bel-raster td.n{position:sticky;left:0;background:var(--card);text-align:left;font-weight:700;z-index:1;}
  /* Vertikale Schülernamen im Raster-Popup (30er-Klassen bleiben kompakt) */
  .bel-raster th.vert{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;max-height:140px;height:120px;padding:8px 4px;font-size:11.5px;font-weight:700;text-align:left;vertical-align:bottom;}
  .bel-raster thead th{background:var(--paper);font-weight:800;}
  .bel-raster .cell-on{color:#F5A623;font-size:15px;}
  .bel-raster .cell-off{color:var(--line);}

  /* KI-Klassenanalyse: aufklappbare Detail-Abschnitte */
  .kb-ana details{ border:1px solid var(--line); border-radius:11px; background:var(--card); margin-bottom:8px; overflow:hidden; }
  .kb-ana summary{ cursor:pointer; padding:10px 13px; font-weight:700; font-size:13px; list-style:none; display:flex; align-items:center; gap:8px; user-select:none; }
  .kb-ana summary::-webkit-details-marker{ display:none; }
  .kb-ana summary .ana-chev{ margin-left:auto; transition:transform .15s; color:var(--muted); flex:none; }
  .kb-ana details[open] summary .ana-chev{ transform:rotate(90deg); }
  .kb-ana .ana-inner{ padding:2px 13px 12px; border-top:1px solid var(--line); }
  .kb-ana .ana-item{ background:var(--paper); border-radius:10px; padding:9px 11px; margin-top:8px; font-size:12.5px; line-height:1.5; }
     Dezent, kurz, ohne den Lernfluss zu stören. Respektiert reduzierte Bewegung. */
  @keyframes ssShake{ 0%,100%{transform:translateX(0);} 20%{transform:translateX(-7px);}
    40%{transform:translateX(6px);} 60%{transform:translateX(-4px);} 80%{transform:translateX(3px);} }
  @keyframes ssGlow{ 0%{box-shadow:0 0 0 0 rgba(21,160,90,0);} 30%{box-shadow:0 0 0 4px rgba(21,160,90,.28);}
    100%{box-shadow:0 0 0 0 rgba(21,160,90,0);} }
  @keyframes ssPop{ 0%{transform:scale(.7);opacity:0;} 50%{transform:scale(1.15);opacity:1;} 100%{transform:scale(1);opacity:1;} }
  @keyframes ssConfettiFall{ 0%{transform:translateY(-12vh) rotate(0);opacity:1;}
    100%{transform:translateY(105vh) rotate(540deg);opacity:.9;} }
  .ss-shake{ animation:ssShake .4s ease; }
  .ss-glow{ animation:ssGlow .7s ease; }
  /* Streak-Badge (3+ richtig in Folge) */
  #ss-streak{ position:fixed; top:14px; left:50%; transform:translateX(-50%); z-index:8000;
    display:none; align-items:center; gap:7px; padding:7px 15px; border-radius:999px;
    background:linear-gradient(95deg,#F5A623,#E0552E); color:#fff; font-weight:800; font-size:14px;
    box-shadow:0 6px 20px rgba(224,85,46,.35); pointer-events:none; }
  #ss-streak.show{ display:inline-flex; animation:ssPop .45s ease; }
  /* Bonus-Variante: Regenbogen-Verlauf + Schimmer-Lauf (3er-Serie -> +1 Stern) */
  #ss-streak.bonus{ background:linear-gradient(95deg,#F5A623,#E0552E,#9C27B0,#2E5BFF,#15A05A);
    background-size:300% 100%; animation:ssPop .45s ease, ssRainbowSlide 1.8s linear infinite; }
  @keyframes ssRainbowSlide{ 0%{background-position:0% 0;} 100%{background-position:300% 0;} }
  /* Goldener Rahmen ums Quiz bei aktivem Streak */
  #screen-quiz.ss-onfire{ box-shadow:0 0 0 3px rgba(245,166,35,.55),0 0 26px rgba(245,166,35,.32); }
  .ss-confetti-piece{ position:fixed; top:0; width:9px; height:14px; z-index:7999;
    pointer-events:none; will-change:transform; animation:ssConfettiFall linear forwards; }
  /* Funken der Bonus-Explosion (ssSparkleBurst) */
  .ss-sparkle{ position:fixed; width:10px; height:10px; border-radius:50%; z-index:8001;
    pointer-events:none; will-change:transform,opacity;
    animation:ssSparkleFly 1.1s cubic-bezier(.2,.7,.3,1) forwards; }
  .ss-sparkle.star-shape{ border-radius:0;
    clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); }
  @keyframes ssSparkleFly{
    0%{ transform:translate(-50%,-50%) scale(.4) rotate(0deg); opacity:1; }
    70%{ opacity:1; }
    100%{ transform:translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1.15) rotate(240deg); opacity:0; } }
  /* 🏆 "Neuer Rekord"-Banner (Berichts-Screen) */
  #ss-rekord{ position:fixed; top:16px; left:50%; transform:translateX(-50%) scale(.7); z-index:8002;
    display:none; align-items:center; gap:12px; padding:12px 20px; border-radius:16px;
    background:linear-gradient(120deg,#B8860B,#F5A623 45%,#FFD54F); color:#3a2a00;
    font-weight:800; font-size:15px; box-shadow:0 10px 32px rgba(245,166,35,.5); pointer-events:none;
    opacity:0; transition:opacity .35s, transform .35s cubic-bezier(.2,.9,.3,1.4); }
  #ss-rekord.show{ display:inline-flex; opacity:1; transform:translateX(-50%) scale(1); }
  #ss-rekord .rk-cup{ font-size:30px; filter:drop-shadow(0 2px 4px rgba(122,74,0,.4)); animation:rkWobble 1.1s ease infinite; }
  #ss-rekord .rk-sub{ display:block; font-weight:600; font-size:12.5px; opacity:.85; margin-top:2px; }
  @keyframes rkWobble{ 0%,100%{transform:rotate(-8deg) scale(1);} 50%{transform:rotate(8deg) scale(1.12);} }
  @media (prefers-reduced-motion: reduce){ #ss-rekord .rk-cup{ animation:none; } }
  /* Sterne-Anzeige leuchtet kurz in Regenbogenfarben beim Bonus */
  .q-stars.rainbow{ animation:qStarsRainbow 1.8s ease; }
  @keyframes qStarsRainbow{
    0%{ box-shadow:0 0 0 0 rgba(245,166,35,0); }
    25%{ box-shadow:0 0 14px 4px rgba(245,166,35,.65); }
    50%{ box-shadow:0 0 14px 4px rgba(156,39,176,.55); }
    75%{ box-shadow:0 0 14px 4px rgba(46,91,255,.55); }
    100%{ box-shadow:0 0 0 0 rgba(21,160,90,0); } }
  @media (prefers-reduced-motion: reduce){
    .ss-shake,.ss-glow,#ss-streak.show{ animation:none !important; }
    .ss-confetti-piece,.ss-sparkle{ display:none !important; }
    #ss-streak.bonus{ animation:none !important; }
    .q-stars.rainbow{ animation:none !important; }
    #screen-quiz.ss-onfire{ box-shadow:none; }
  }
  .opt:disabled{cursor:default;}
  /* Antwort-Feedback für Eingabefelder (Lueckentext/Rechnen/Offen/Zuordnung).
     Tema-bewusst: funktioniert in Hell- UND Dunkelmodus, Text bleibt lesbar. */
  .ans-ok{border-color:var(--ok)!important;border-width:2px!important;color:var(--ink)!important;
    background:var(--ok-soft)!important;background:color-mix(in srgb, var(--ok) 16%, var(--card))!important;}
  .ans-bad{border-color:var(--bad)!important;border-width:2px!important;color:var(--ink)!important;
    background:var(--bad-soft)!important;background:color-mix(in srgb, var(--bad) 16%, var(--card))!important;}
  .matchrow{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
  .matchrow .lhs{flex:1;font-weight:600;font-size:15px;} .matchrow .rhs{flex:1;}
  .matchrow .arrow{color:var(--muted);font-weight:800;}
  .explain{font-size:13.5px;color:var(--muted);background:var(--paper);border-radius:11px;padding:12px 14px;margin-top:4px;}
  .explain b{color:var(--ink);}
  .ring{display:block;margin:4px auto 10px;}
  .scorelabel{text-align:center;font-size:14px;color:var(--muted);margin:0 0 18px;font-weight:600;}
  .resitem{display:flex;gap:12px;padding:13px 0;border-top:1px solid var(--line);font-size:14px;}
  .resitem:first-of-type{border-top:none;}
  .resitem .mark{width:24px;height:24px;border-radius:7px;flex:none;display:grid;place-items:center;font-size:14px;color:#fff;}
  .mark.y{background:var(--ok); } .mark.n{background:var(--bad);}
  .footernote{text-align:center;font-size:12.5px;color:var(--muted);margin-top:32px;line-height:1.6;border-top:1px solid var(--line);padding-top:16px;}
  .qr-box{text-align:center;margin:20px 0;padding:15px;background:#fff;border:1px solid var(--line);border-radius:12px;}
  .qr-box img{margin-top:10px;border:1px solid var(--line);padding:5px;background:#fff;}
  /* Gekürzter Teilen-Link mit Kopier-Button */
  .share-link-wrap{display:flex;align-items:center;gap:8px;justify-content:center;margin-bottom:12px;}
  .share-link-short{font-weight:700;color:var(--brand);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:62%;direction:rtl;text-align:left;}
  .mini-btn.share-copy{flex:none;display:inline-flex;align-items:center;gap:5px;}
  /* Minimal-Icon-Buttons (nebeneinander) */
  .icon-row{display:flex;gap:10px;margin-top:18px;}
  .lern-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
  @media(max-width:520px){
    .lern-grid{grid-template-columns:repeat(3,1fr);gap:7px;}
    .lern-btn{padding:11px 9px;align-items:center;text-align:center;}
    .lern-btn span{font-size:12.5px;}
    .lern-btn small{display:none;}
  }
  .lern-btn{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:13px 14px;border:1.5px solid var(--line);border-radius:14px;background:var(--card);color:var(--ink);font-family:inherit;cursor:pointer;text-align:left;transition:border-color .15s,background .15s,transform .08s;}
  .lern-btn:hover{border-color:var(--brand);background:var(--brand-soft);transform:translateY(-1px);}
  .lern-btn svg{width:22px;height:22px;fill:none;stroke:var(--brand);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;margin-bottom:4px;}
  .lern-btn span{font-weight:700;font-size:14px;}
  .lern-btn small{color:var(--muted);font-size:11.5px;}
  .icon-btn{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 8px;border:1.5px solid var(--line);border-radius:14px;background:var(--card);color:var(--ink);font-family:inherit;font-weight:700;font-size:13.5px;cursor:pointer;transition:transform .08s ease,border-color .15s ease,background .15s ease;}
  .sq-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:64px;padding:9px 4px;border:1.5px solid var(--line);border-radius:13px;background:var(--card);color:var(--brand);font-family:inherit;font-weight:600;font-size:11.5px;line-height:1.15;text-align:center;cursor:pointer;transition:transform .08s ease,border-color .15s ease,background .15s ease;}
  .sq-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  .sq-btn:hover{transform:translateY(-1px);background:var(--brand-soft);}
  .sq-btn:active{transform:scale(.96);}
  @media(max-width:430px){ .sq-btn{font-size:10px;padding:8px 2px;gap:3px;min-height:58px;} .sq-btn svg{width:18px;height:18px;} }

  /* ===== QR-Seite (share) & Ergebnisse: Vollbild ohne Kopfzeile ===== */
  body[data-screen="share"] .topbar, body[data-screen="share"] .app-topbar,
  body[data-screen="results"] .topbar, body[data-screen="results"] .app-topbar{ display:none !important; }
  /* Logo-Kopf auf Editor-Seite ausblenden (aufgeräumter Fokus) */
  body[data-screen="editor"] .topbar{ display:none !important; }

  /* ===== LADE-BILDSCHIRM: weicher, farbig wechselnder Blur-Hintergrund =====
     Kein Kasten, kein Popup. Nur: fließende Punkte + EIN schwarzer Satz mittig. */
  body[data-screen="loading"] .topbar,
  body[data-screen="loading"] .app-topbar,
  body[data-screen="loading"] #main-nav{ display:none !important; }
  body[data-screen="loading"] .wrap{ max-width:none; padding:0; }
  /* Vollflächiger Farbverlauf – deckt den GANZEN Bildschirm (auch ganz unten). */
  body[data-screen="loading"]{ background:#EAF0FF; }
  body[data-screen="loading"]::before{
    content:""; position:fixed; inset:-15%; z-index:0; pointer-events:none;
    background:
      radial-gradient(38% 40% at 22% 22%, rgba(46,91,255,.32), transparent 62%),
      radial-gradient(40% 42% at 82% 24%, rgba(122,90,248,.30), transparent 64%),
      radial-gradient(46% 44% at 20% 66%, rgba(21,160,90,.26), transparent 64%),
      radial-gradient(48% 46% at 82% 72%, rgba(245,166,35,.26), transparent 64%),
      radial-gradient(60% 40% at 50% 100%, rgba(122,90,248,.22), transparent 70%),
      linear-gradient(160deg,#EEF1FB 0%,#F1EFF9 45%,#EAF6F0 100%);
    filter:blur(60px) saturate(1.06);
    animation:ldBg 16s ease-in-out infinite alternate;
  }
  @keyframes ldBg{
    0%{ transform:translate(-3%,-2%) scale(1.08); }
    50%{ transform:translate(3%,2%) scale(1.14); }
    100%{ transform:translate(-2%,3%) scale(1.09); }
  }
  #screen-loading{ position:relative; z-index:1; min-height:100dvh; display:flex; align-items:center; justify-content:center;
    background:transparent; border:none; box-shadow:none; padding:24px; margin:0; }
  .load-center{ display:flex; flex-direction:column; align-items:center; gap:22px; text-align:center; max-width:min(90vw,760px); }
  #screen-loading .ld-dots{ margin:0; }
  /* Ruhigere Typografie (v2.72.0): 30 px waren fuer eine Wartemeldung eine
     Ansage. Der Vollbild-Screen bleibt fuer die Schueler-/Boot-Fluesse, aber
     er muss nicht schreien - die Lehrkraft-Erstellung laeuft ohnehin in der
     kompakten Karte (.ss-lade). */
  .load-oneline{ font-size:clamp(15px,2.4vw,21px); font-weight:850; letter-spacing:-.02em; line-height:1.3;
    color:var(--ink); text-align:center; white-space:nowrap; max-width:96vw;
    min-height:1.4em; display:flex; align-items:center; justify-content:center;
    opacity:0; transform:translateY(10px); transition:opacity .6s ease,transform .6s ease; }
  .load-oneline.show{ opacity:1; transform:none; }
  /* ===== LADEKARTE (v2.72.0) ===============================================
     Ersetzt fuer die Lehrkraft-Erstellung den Vollbild-Lade-Screen: das
     Formular bleibt sichtbar (nur abgedunkelt), die Karte steht darueber.
     Warum, steht ausfuehrlich im Block "LADEKARTE + FERTIG-BAND" in
     static/js/index-app.js. Der Vollbild-Screen darunter bleibt fuer die
     Schueler-Fluesse bestehen - dort gibt es keine Seite im Hintergrund,
     eine schwebende Karte ueber Leere waere schlechter. */
  .ss-lade{ position:fixed; inset:0; z-index:9000; display:flex; align-items:center; justify-content:center;
    background:rgba(245,247,251,.72); backdrop-filter:blur(2px); padding:20px; }
  .ss-lade-karte{ background:#fff; border:1px solid var(--line); border-radius:20px; padding:22px 22px 12px;
    width:min(92vw,336px); text-align:center; box-shadow:0 16px 44px rgba(27,34,48,.16); }
  .ss-lade .ld-dots{ margin:0 0 15px; }
  .ss-lade-titel{ font-size:16px; font-weight:800; color:var(--ink); line-height:1.3; letter-spacing:-.01em; }
  .ss-lade-best{ font-size:12.5px; color:var(--muted); margin-top:5px; line-height:1.4; }
  /* Zwischenstand: eine Zeile, zwei Rollen. Links die rotierende Meldung
     (Beiwerk, deshalb blass), rechts die gemessene Sekundenzahl - eine feste
     Breite und Tabellenziffern, damit die Zeile beim Hochzaehlen nicht
     springt. */
  .ss-lade-stand{ display:flex; align-items:baseline; justify-content:center; gap:8px;
    margin-top:14px; min-height:1.5em; }
  .ss-lade-rot{ font-size:12px; color:var(--muted); opacity:0; transition:opacity .5s ease;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ss-lade-rot.show{ opacity:.8; }
  .ss-lade-zeit{ font-size:12px; color:var(--muted); opacity:.55; flex:none;
    font-variant-numeric:tabular-nums; }
  .ss-lade-fuss{ border-top:1px solid var(--line); margin-top:13px; padding-top:8px;
    display:flex; align-items:center; justify-content:center; gap:9px; flex-wrap:wrap; }
  .ss-lade-hg{ background:none; border:0; padding:4px 8px; font:inherit; font-size:12.5px; font-weight:700;
    color:var(--brand); cursor:pointer; border-radius:8px; }
  .ss-lade-hg:hover{ background:rgba(46,91,255,.08); }
  .ss-lade-hinw{ font-size:11px; color:var(--muted); opacity:.7; }

  /* ===== FERTIG-PILLE =====================================================
     VORBILD: die iOS-Verbindungsmeldung ("AirPods · Verbunden"), die oben
     mittig als schwebende, milchige Kapsel einfaehrt (Wunsch Murat
     30.07.2026 mit Screenshot: "aynisi yani transperenzliginden tut yazi
     tipi herseyine kadar"). Bis 2.72.0 war das hier ein vollbreites,
     kraeftig blaues Band - technisch dasselbe, optisch das Gegenteil von
     zurueckhaltend.

     WAS DIESE OPTIK AUSMACHT - die vier Dinge, ohne die es "billig" aussieht:
       1. VOLLE RUNDUNG (border-radius:999px) und eine Breite, die sich dem
          Inhalt anpasst - keine Leiste, eine Kapsel.
       2. ECHTE MILCHIGKEIT: halbdurchsichtiger Grund PLUS backdrop-filter mit
          blur UND saturate. Das saturate ist der Trick, an dem es sonst
          scheitert: ohne es wirkt der Hintergrund hinter der Kapsel grau
          statt lebendig durchscheinend.
       3. Ein hauchduenner heller Innenrand (inset-Schatten) - so sitzt die
          Kapsel auf dem Bild statt darin zu kleben.
       4. SYSTEMSCHRIFT, nicht die App-Schrift Inter. Die Meldung soll wie
          eine Meldung des Geraets wirken; deshalb hier bewusst -apple-system
          zuerst (auf Apple-Geraeten "SF Pro"), damit sie sich einreiht.
     Fallback ohne backdrop-filter (aeltere Browser): der Grund ist dann
     schlicht deckender - die Kapsel bleibt lesbar, nur ohne Milchglas.

     Die GANZE Kapsel ist der Knopf - wie beim Vorbild. Deshalb gibt es keinen
     eigenen "Ansehen"-Button mehr. Ein Schliessen-X gibt es weiterhin nicht;
     warum, steht bei ssFertigZeigen in index-app.js. */
  .ss-fertig{ position:fixed; z-index:9100; top:calc(9px + env(safe-area-inset-top));
    left:50%; display:flex; align-items:center; gap:11px;
    max-width:min(90vw,330px); padding:8px 20px 8px 11px; border-radius:999px; border:0;
    background:rgba(247,247,250,.70);
    -webkit-backdrop-filter:blur(26px) saturate(180%); backdrop-filter:blur(26px) saturate(180%);
    box-shadow:0 10px 30px rgba(0,0,0,.20), inset 0 0 0 .5px rgba(255,255,255,.62);
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",system-ui,Roboto,sans-serif;
    color:#1c1c1e; text-align:left; cursor:pointer; opacity:0;
    transform:translateX(-50%) translateY(-150%);
    transition:transform .46s cubic-bezier(.28,1.12,.4,1), opacity .28s ease; }
  .ss-fertig.da{ opacity:1; transform:translateX(-50%) translateY(0); }
  .ss-fertig:active{ transform:translateX(-50%) translateY(0) scale(.975); }
  .ss-fertig-ic{ display:inline-flex; align-items:center; justify-content:center; flex:none;
    width:27px; height:27px; border-radius:50%; background:#30B14A; color:#fff;
    font-size:14px; font-weight:700; line-height:1; }
  .ss-fertig.fehler .ss-fertig-ic{ background:#E0463E; }
  /* display:block ist hier KEIN Schoenheitsfehler-Fix, sondern der Kern des
     Aufbaus: beide Zeilen sind <span>, also von Haus aus inline - ohne diese
     Angabe stehen Titel und Nebenzeile NEBENEINANDER statt untereinander
     (gemeldet 30.07.2026). Wer die Kapsel umbaut, laesst sie stehen. */
  .ss-fertig-txtbox{ min-width:0; }
  .ss-fertig-txt{ display:block; font-size:14px; font-weight:600; letter-spacing:-.01em;
    line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ss-fertig-det{ display:block; font-size:12.5px; color:#6b6b70; line-height:1.25;
    margin-top:1px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  @media (prefers-color-scheme: dark){
    .ss-fertig{ background:rgba(44,44,48,.72); color:#f2f2f5;
      box-shadow:0 10px 30px rgba(0,0,0,.44), inset 0 0 0 .5px rgba(255,255,255,.14); }
    .ss-fertig-det{ color:#a9a9b0; }
  }
  @supports not ((backdrop-filter:blur(2px)) or (-webkit-backdrop-filter:blur(2px))){
    .ss-fertig{ background:rgba(247,247,250,.97); }
    @media (prefers-color-scheme: dark){ .ss-fertig{ background:rgba(44,44,48,.97); } }
  }
  @media (prefers-reduced-motion: reduce){
    .ss-fertig{ transition:opacity .2s ease; transform:translateX(-50%) translateY(0); }
    .ss-lade-rot{ transition:none; }
  }

  #screen-loading #load-title{ font-size:clamp(18px,2.6vw,23px); color:var(--ink); margin:0; }
  #screen-loading #load-sub{ color:var(--muted); margin:6px 0 0; }
  @media (prefers-reduced-motion: reduce){ body[data-screen="loading"]::before{ animation:none; } .load-oneline{ transition:opacity .2s; } }
  body[data-screen="share"] .wrap, body[data-screen="results"] .wrap{
    padding-top:max(calc(10px + env(safe-area-inset-top)), 14px);
  }

  /* QR-Hero: großer, freundlicher QR-Block */
  .qr-hero{position:relative;text-align:center;margin:14px 0 16px;padding:24px 16px 20px;border-radius:20px;
    background:linear-gradient(160deg,#F4F7FF 0%,#FDF6EF 55%,#F1FBF4 100%);
    border:1px solid var(--line);overflow:hidden;}
  .qr-hero::before{content:"";position:absolute;top:0;left:0;right:0;height:5px;
    background:linear-gradient(90deg,#2E5BFF,#7A5AF8,#15A05A,#F5A623);}
  .qr-hero .qh-dot{position:absolute;border-radius:50%;opacity:.14;pointer-events:none;}
  .qr-hero .qh-frame{display:inline-block;background:#fff;padding:14px;border-radius:18px;
    box-shadow:0 10px 30px rgba(46,91,255,.12), 0 2px 8px rgba(0,0,0,.05);}
  .qr-hero .qh-frame img{display:block;width:min(64vw,320px);height:auto;border:none;padding:0;margin:0;border-radius:6px;}
  .qr-hero .qh-scanhint{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:12px;
    font-size:13px;font-weight:600;color:var(--muted);}
  .qr-hero .qh-scanhint svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .qr-hero .share-link-wrap{justify-content:center;}
  .qr-copy-corner{position:absolute;top:12px;right:12px;z-index:3;display:inline-flex;align-items:center;justify-content:center;gap:6px;
    height:38px;min-width:38px;padding:0 10px;background:var(--card,#fff);border:1px solid var(--line);border-radius:11px;
    color:var(--ink);cursor:pointer;font-size:12.5px;font-weight:700;box-shadow:0 2px 8px rgba(20,30,60,.08);transition:all .15s;}
  .qr-copy-corner:hover{border-color:var(--brand);color:var(--brand);}
  .qr-copy-corner svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;}
  .qr-copy-corner.copied{border-color:var(--ok,#22a06b);color:var(--ok,#22a06b);}
  html[data-theme="dark"] .qr-copy-corner{background:#232633;border-color:#39415A;}
  html[data-theme="dark"] .qr-hero{background:linear-gradient(160deg,#1E2433 0%,#232633 55%,#1F2B26 100%);border-color:#39415A;}
  @media (prefers-color-scheme: dark){
    html:not([data-theme="light"]) .qr-hero{background:linear-gradient(160deg,#1E2433 0%,#232633 55%,#1F2B26 100%);border-color:#39415A;}
  }

  /* Aktionsleiste auf der QR-Seite: Kacheln bleiben IMMER nebeneinander */
  .share-actionbar{display:flex;gap:8px;margin-top:16px;}
  .share-actionbar .sq-btn{flex:1;min-width:0;padding:9px 2px;}
  .share-actionbar .sq-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;}
  .share-actionbar .sq-btn.active{background:var(--brand-soft,#EEF3FF);border-color:var(--brand);}
  @media(max-width:520px){
    .share-actionbar{gap:5px;}
    .share-actionbar .sq-btn{font-size:9px;min-height:52px;padding:7px 1px;gap:2px;border-radius:10px;}
    .share-actionbar .sq-btn svg{width:16px;height:16px;}
  }

  /* QR-Satelliten: bunte Orbit-Buttons, fest am QR-Rahmen verankert.
     Der Orbit (weißer Rahmen + Satelliten) sitzt IMMER exakt mittig im Hero
     und skaliert mit der Bildschirmbreite mit. */
  .qr-hero.with-sats{padding:22px 12px 18px;}
  .qh-orbit{display:inline-flex;flex-direction:column;align-items:center;}
  .qh-orbit-main{display:flex;align-items:center;justify-content:center;gap:22px;}
  .qh-sat-col{display:flex;flex-direction:column;justify-content:center;gap:34px;}
  .qh-bg{position:fixed;inset:0;z-index:-1;background-position:center top;background-repeat:repeat;background-size:480px auto;opacity:.16;pointer-events:none;}
  .qr-sat{z-index:4;display:flex;flex-direction:column;align-items:center;gap:5px;width:64px;padding:0;background:none;border:none;cursor:pointer;font-family:inherit;}
  .qr-sat-dot{position:relative;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--card,#fff);border:1.5px solid var(--line);box-shadow:0 3px 12px rgba(20,30,60,.12);color:var(--sat,#5A6172);transition:transform .1s ease,border-color .15s ease,background .15s ease;}
  .qr-sat-dot svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  .qr-sat-lbl{max-width:70px;font-size:10.5px;font-weight:700;line-height:1.15;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .qr-sat:hover .qr-sat-dot{transform:translateY(-1px) scale(1.05);border-color:var(--sat);}
  .qr-sat:active .qr-sat-dot{transform:scale(.94);}
  .qr-sat.on .qr-sat-dot{background:var(--sat-soft,#EEF3FF);border-color:var(--sat);}
  .qr-sat.on .qr-sat-lbl{color:var(--sat);}
  .qr-sat.active .qr-sat-dot{box-shadow:0 0 0 3px var(--sat-soft,#EEF3FF),0 3px 12px rgba(20,30,60,.12);border-color:var(--sat);}
  .qr-sat-count{position:absolute;top:-5px;right:-7px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--sat,#15A05A);color:#fff;font-size:10.5px;font-weight:800;display:flex;align-items:center;justify-content:center;}
  /* Leicht organische Höhen: die beiden Seitensatelliten sind vertikal versetzt */
  .qh-sat-left{margin-top:-14px;} .qh-sat-right{margin-top:22px;}
  .qr-sat-bottom{margin-top:16px;width:88px;}
  .qr-sat-bottom .qr-sat-lbl{max-width:88px;}
  html[data-theme="dark"] .qr-sat-dot{background:#232633;border-color:#39415A;}
  @media(max-width:600px){
    .qr-hero.with-sats .qh-frame img{width:min(52vw,230px);}
    .qh-orbit-main{gap:14px;}
    .qh-sat-col{gap:26px;}
  }
  @media(max-width:430px){
    .qr-hero.with-sats{padding:16px 6px 16px;}
    .qr-hero.with-sats .qh-frame img{width:min(46vw,182px);}
    .qh-orbit-main{gap:10px;}
    .qh-sat-col{gap:20px;}
    .qr-sat{width:56px;}
    .qr-sat-dot{width:40px;height:40px;}
    .qr-sat-dot svg{width:18px;height:18px;}
    .qr-sat-lbl{font-size:9.5px;max-width:56px;}
  }

  /* Ergebnisse als Popup (Modal) auf der Teilen-Seite */
  .erg-modal-card{max-width:660px;width:100%;padding:16px 18px 18px;}
  .erg-modal-card #screen-results{display:block;}
  .erg-modal-card .res-topbar{margin-top:0;position:sticky;top:0;background:var(--card,#fff);z-index:2;padding-bottom:6px;}
  html[data-theme="dark"] .erg-modal-card .res-topbar{background:#232633;}

  /* Ergebnisse: schlanke Kopfleiste (Apple-artig) */
  .res-topbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 14px;}
  .res-back{display:flex;align-items:center;justify-content:center;width:38px;height:38px;flex:none;
    border:1px solid var(--line);border-radius:50%;background:var(--card,#fff);color:var(--ink);cursor:pointer;
    transition:background .15s ease, transform .08s ease;}
  .res-back svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
  .res-back:hover{background:var(--brand-soft,#EEF3FF);}
  .res-back:active{transform:scale(.94);}
  .res-top-actions{display:flex;gap:8px;}
  .res-sq{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:64px;min-height:56px;
    padding:7px 2px;border:1.5px solid var(--line);border-radius:12px;background:var(--card,#fff);color:var(--brand);
    font-family:inherit;font-weight:600;font-size:10.5px;line-height:1.1;cursor:pointer;
    transition:transform .08s ease,border-color .15s ease,background .15s ease;}
  .res-sq svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  .res-sq:hover{transform:translateY(-1px);background:var(--brand-soft,#EEF3FF);}
  .res-sq:active{transform:scale(.95);}
  @media(max-width:430px){ .res-sq{width:56px;min-height:52px;font-size:9.5px;} .res-sq svg{width:16px;height:16px;} }

  /* Verlauf-Banner (wenn ein alter Tag angezeigt wird) */
  .res-verlauf-banner{display:flex;align-items:center;gap:8px;background:#FFF7E8;border:1px solid #F0D9A8;
    color:#8A6116;border-radius:12px;padding:9px 12px;font-size:13px;font-weight:600;margin:0 0 12px;}
  .res-verlauf-banner button{margin-left:auto;flex:none;border:none;background:transparent;color:inherit;
    font-weight:800;font-size:12.5px;cursor:pointer;text-decoration:underline;font-family:inherit;}

  /* Verlauf-Popup Zeilen */
  .vh-row{display:flex;align-items:center;gap:10px;padding:11px 2px;border-bottom:1px solid var(--line);}
  .vh-row:last-child{border-bottom:none;}
  .vh-date{font-weight:700;font-size:14px;}
  .vh-meta{font-size:12px;color:var(--muted);margin-top:1px;}
  .vh-acts{display:flex;gap:6px;margin-left:auto;flex:none;}
  .vh-act{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border:1px solid var(--line);
    border-radius:10px;background:var(--card,#fff);color:var(--brand);cursor:pointer;transition:background .15s ease;}
  .vh-act svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .vh-act:hover{background:var(--brand-soft,#EEF3FF);}
  .icon-btn:hover{border-color:var(--brand);background:var(--brand-soft);}
  .icon-btn:active{transform:scale(.97);}
  .icon-btn svg{width:22px;height:22px;fill:none;stroke:var(--brand);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .timer-badge{font-size:13px;font-weight:700;color:var(--amber);background:#FEF6E9;padding:4px 10px;border-radius:8px;}
  .countdown-badge{font-size:13px;font-weight:700;color:#1d4ed8;background:#E8EEFF;padding:4px 10px;border-radius:8px;font-variant-numeric:tabular-nums;}
  .countdown-badge.warn{color:#E2483D;background:#FDECEA;}
  /* ALTER Browser-Tab-Look (Chrome-Lasche mit SVG-Silhouette) – auf Wunsch
     ausgemustert, aber als Kommentar aufgehoben (vielleicht spaeter wieder).
     Gehoert zusammen mit drawTabShape() in index-app.js (dort ebenfalls
     stillgelegt). Zum Reaktivieren: diesen Block einkommentieren, den neuen
     Pill-Block darunter entfernen und drawTabShape() wieder scharf schalten.
  .tabs{display:flex;justify-content:center;align-items:flex-end;gap:18px;margin-bottom:18px;border-bottom:2px solid rgba(109,91,255,.85);box-shadow:none;}
  .tab-btn{position:relative;flex:none;padding:11px 20px 12px;background:none;border:none;margin-bottom:-2px;font-weight:700;font-size:14px;color:var(--muted);opacity:.55;cursor:pointer;transition:opacity .18s,color .18s;font-family:inherit;box-shadow:none;}
  .tab-btn:hover{opacity:.85;color:var(--ink);}
  .tab-btn.active{opacity:1;color:#6D5BFF;background:none;box-shadow:none;z-index:1;}
  .tab-btn .tab-shape{position:absolute;left:-14px;top:0;width:calc(100% + 28px);height:100%;display:none;pointer-events:none;z-index:-1;overflow:visible;}
  .tab-btn.active .tab-shape{display:block;}
  @media(max-width:560px){
    .tabs{gap:8px;}
    .tab-btn{padding:9px 10px 10px;font-size:12.5px;}
  }
  */
  /* NEU: Material-Tabs im Sidebar-Nav-Stil - ruhige Pills. Hover hebt sanft
     hervor, der aktive Tab bekommt die brand-soft-Fuellung wie ein aktiver
     Nav-Eintrag. Die .tab-shape-SVGs bleiben im Markup, werden aber nicht
     mehr gezeichnet (drawTabShape ist stillgelegt). */
  .tabs{display:flex;justify-content:center;align-items:center;gap:8px;margin-bottom:18px;}
  .tab-btn{position:relative;flex:none;padding:9px 18px;background:none;border:none;border-radius:11px;
    font-weight:700;font-size:14px;color:var(--muted);cursor:pointer;font-family:inherit;
    transition:background .15s ease,color .15s ease;}
  .tab-btn:hover{background:rgba(127,127,127,.10);color:var(--ink);}
  .tab-btn.active{background:var(--brand-soft);color:var(--brand);}
  .tab-btn .tab-shape{display:none !important;}
  @media(max-width:560px){
    .tabs{gap:5px;}
    .tab-btn{padding:8px 11px;font-size:12.5px;}
  }
  /* Fach/Thema/Klasse/Anzahl: vier Boxen, Label klein IN der Box (mobil 2×2) */
  .fach-pick-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
  @media(max-width:640px){ .fach-pick-row{grid-template-columns:1fr 1fr;} }
  .fpk{display:block;position:relative;border:1.5px solid var(--line);border-radius:12px;background:var(--card);padding:8px 12px 7px;cursor:pointer;transition:border-color .15s,box-shadow .15s;min-width:0;}
  .fpk:focus-within{border-color:#6D5BFF;box-shadow:0 0 0 3px rgba(109,91,255,.14);}
  .fpk>span{display:block;font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:3px;}
  .fpk select,.fpk input{width:100%;border:none !important;background:transparent !important;padding:1px 0 !important;margin:0;font:inherit;font-size:14.5px;font-weight:600;color:var(--ink);appearance:none;-webkit-appearance:none;box-sizing:border-box;border-radius:0;}
  .fpk select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A8194' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;background-repeat:no-repeat !important;background-position:right 0 center !important;background-size:15px !important;padding-right:20px !important;cursor:pointer;}
  .fpk select:focus,.fpk input:focus{outline:none;box-shadow:none;}
  .res-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line);}
  .res-row:first-of-type{border-top:none;}
  .res-rank{width:28px;height:28px;border-radius:8px;flex:none;display:grid;place-items:center;font-size:12px;font-weight:800;color:#fff;}
  .res-avg{display:flex;justify-content:space-between;font-weight:700;font-size:15px;border-top:2px solid var(--line);margin-top:12px;padding-top:12px;}
/* EKLENEN YENİ KODLAR BURADA BAŞLIYOR */
  .main-logo {
    height: 52px;
    width: auto;
    flex: none;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  .main-logo:hover {
    transform: scale(1.03); 
  }

  /* === HEADER: Anmelden-Button + Avatar-Dropdown === */
  .anmelden-btn {
    appearance:none; border:none; cursor:pointer;
    font-family:inherit; font-weight:700; font-size:14px;
    color:#fff; padding:10px 20px; border-radius:999px;
    background: rgba(46, 91, 255, 0.92);
    box-shadow: 0 2px 10px rgba(46,91,255,0.25);
    transition: background .15s ease, transform .1s ease;
  }
  .anmelden-btn:hover { background: rgba(30, 63, 204, 1); }
  .anmelden-btn:active { transform: scale(0.97); }

  .avatar-wrap { position: relative; }
  /* === POSTFACH: Zarf-Button im Header (links neben dem Avatar) === */
  #authbar{ display:flex; align-items:center; gap:8px; }
  .pf-btn{ position:relative; appearance:none; border:none; cursor:pointer; width:40px; height:40px;
    border-radius:50%; background:rgba(127,127,127,0.08); display:flex; align-items:center;
    justify-content:center; color:var(--ink); flex:none;
    transition:background .15s ease, transform .1s ease; }
  .pf-btn:hover{ background:rgba(127,127,127,0.16); }
  .pf-btn:active{ transform:scale(.94); }
  /* Sanftes, SELTENES Zarf-Wackeln bei Ungelesenem (Klasse "hat-neu",
     pfBadgeSync in index-app.js): pro 11s-Zyklus bewegt sich der Umschlag nur
     in den ersten ~0,9s (kleine Rotation mit weichem Ausklang), danach Ruhe -
     praesent, aber nie nervoes. Nur das SVG dreht (der rote Zaehler bleibt
     still), :active-Scale des Buttons bleibt unberuehrt. */
  .pf-btn.hat-neu svg{ animation:pfZarfWackeln 11s ease-in-out infinite; transform-origin:50% 22%; }
  @keyframes pfZarfWackeln{
    0%{ transform:rotate(0); }
    2%{ transform:rotate(-9deg); }
    4%{ transform:rotate(7deg); }
    6%{ transform:rotate(-4deg); }
    8%{ transform:rotate(2deg); }
    9.5%{ transform:rotate(0); }
    100%{ transform:rotate(0); }
  }
  @media (prefers-reduced-motion: reduce){ .pf-btn.hat-neu svg{ animation:none; } }
  .pf-btn svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2;
    stroke-linecap:round; stroke-linejoin:round; }
  /* --- Nachrichten-Zentrale: Vollbild-Screen (kein Popup), WhatsApp-artig ---
     Desktop: Karte mit Liste (links) + Chat (rechts) im Inhaltsbereich.
     Mobil (<=720px): Shell liegt fix ueber allem, Liste <-> Chat gleiten. */
  .pf-shell{ background:var(--card); border:1.5px solid var(--line); border-radius:22px;
    box-shadow:var(--shadow); display:flex; overflow:hidden; position:relative;
    height:calc(var(--vh100) - 175px); min-height:460px; }
  .pf-left{ width:340px; flex:none; border-right:1px solid var(--line);
    display:flex; flex-direction:column; min-height:0; background:var(--card); }
  .pf-right{ flex:1; display:flex; flex-direction:column; min-width:0; min-height:0; background:var(--paper); }
  .pf-shell.chat .pf-right{ animation:pfEin .22s ease; }
  @keyframes pfEin{ from{ opacity:0; transform:translateX(14px); } to{ opacity:1; transform:none; } }
  .pf-mobiletop{ display:none; }
  /* Suche + runder Plus-Knopf */
  .pf-searchrow{ display:flex; align-items:center; gap:9px; padding:14px 14px 8px; }
  .pf-search{ flex:1; display:flex; align-items:center; gap:8px; background:var(--paper);
    border:1.5px solid var(--line); border-radius:999px; padding:8px 14px; min-width:0;
    transition:border-color .18s ease, background .18s ease; }
  .pf-search:focus-within{ border-color:var(--brand); background:var(--card); }
  .pf-search svg{ width:15px; height:15px; flex:none; fill:none; stroke:var(--muted);
    stroke-width:2; stroke-linecap:round; }
  .pf-search input{ flex:1; border:none; background:transparent; font:inherit; font-size:14px;
    outline:none; color:var(--ink); min-width:0; padding:0; }
  .pf-plus{ width:40px; height:40px; border-radius:50%; border:none; background:var(--brand); color:#fff;
    display:flex; align-items:center; justify-content:center; cursor:pointer; flex:none;
    box-shadow:0 4px 14px rgba(46,91,255,.32);
    transition:transform .18s cubic-bezier(.34,1.56,.64,1), background .15s ease; }
  .pf-plus:hover{ background:var(--brand-dk); transform:scale(1.07); }
  .pf-plus:active{ transform:scale(.92); }
  .pf-plus svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; }
  /* Kleine Filter-Chips (Alle / Ungelesen / Gruppen / Assistent) */
  .pf-filters{ display:flex; gap:6px; padding:2px 14px 10px; flex-wrap:wrap; }
  .pf-fchip{ appearance:none; font:inherit; font-size:11.5px; font-weight:700; border-radius:999px;
    padding:4.5px 12px; background:var(--card); border:1px solid var(--line); color:var(--muted);
    cursor:pointer; display:inline-flex; align-items:center; gap:5px;
    transition:color .15s ease, border-color .15s ease, background .15s ease; }
  .pf-fchip:hover{ border-color:var(--brand); color:var(--brand); }
  .pf-fchip.on{ background:var(--brand-soft); border-color:var(--brand); color:var(--brand); }
  .pf-dot{ width:6px; height:6px; border-radius:50%; background:var(--bad); display:inline-block; }
  .pf-lhead{ display:flex; align-items:center; gap:8px; padding:8px 12px;
    border-bottom:1px solid var(--line); flex:none; }
  .pf-convs{ overflow-y:auto; flex:1; padding:2px 8px 14px; }
  .pf-leer{ color:var(--muted); font-size:13px; padding:26px 14px; text-align:center; line-height:1.6; }
  .pf-conv{ display:flex; align-items:center; gap:11px; padding:10px; border-radius:16px;
    cursor:pointer; transition:background .14s ease; position:relative; }
  .pf-conv:hover{ background:rgba(127,127,127,.07); }
  .pf-conv.active{ background:var(--brand-soft); }
  .pf-conv-check{ width:16px; height:16px; flex:none; accent-color:var(--brand); cursor:pointer;
    opacity:.25; transition:opacity .15s ease; }
  .pf-conv:hover .pf-conv-check, .pf-conv-check:checked{ opacity:1; }
  @media (hover:none){ .pf-conv-check{ opacity:.45; } }
  .pf-conv-main{ flex:1; min-width:0; }
  .pf-conv-name{ font-weight:800; font-size:14px; overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap; display:flex; align-items:center; gap:6px; }
  .pf-gtag{ font-size:9px; font-weight:800; letter-spacing:.5px; text-transform:uppercase;
    color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:1px 5px;
    background:var(--card); flex:none; }
  .pf-conv-prev{ font-size:12.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap; margin-top:2px; }
  .pf-conv-meta{ display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex:none; }
  .pf-conv-date{ font-size:10.5px; color:var(--muted); }
  .pf-conv-date.neu{ color:var(--brand); font-weight:700; }
  .pf-conv-unread{ min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--brand);
    color:#fff; font-size:10.5px; font-weight:800; display:flex; align-items:center; justify-content:center; }
  /* Gruppen-Avatar: zwei ueberlappende runde Mini-Avatare */
  .pf-gava{ position:relative; flex:none; display:inline-block; }
  .pf-gava .g1,.pf-gava .g2{ position:absolute; border-radius:50%; color:#fff; font-weight:800;
    display:flex; align-items:center; justify-content:center; border:2px solid var(--card); }
  .pf-gava .g1{ left:0; top:0; z-index:1; }
  .pf-gava .g2{ right:0; bottom:0; z-index:2; }
  /* Chat-Kopf: klickbarer Titel -> Details/Einstellungen */
  .pf-chead{ display:flex; align-items:center; gap:6px; padding:9px 12px;
    border-bottom:1px solid var(--line); flex:none; min-height:58px; box-sizing:border-box;
    background:var(--card); }
  .pf-chead-id{ display:flex; align-items:center; gap:10px; min-width:0; cursor:pointer;
    border-radius:14px; padding:4px 10px 4px 4px; transition:background .15s ease; }
  .pf-chead-id:hover{ background:rgba(127,127,127,.08); }
  .pf-chead-tx{ min-width:0; display:flex; flex-direction:column; }
  .pf-chead-tx b{ font-size:14px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pf-chead-tx span{ font-size:11px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  /* Gruener Punkt vor "gerade aktiv" (pfAktivText, index-app.js). */
  .pf-live{ display:inline-block; width:7px; height:7px; border-radius:50%;
    background:var(--ok,#1E9E52); margin-right:5px; vertical-align:1px; }
  .pf-asst-ava{ width:38px; height:38px; border-radius:50%; flex:none; display:flex; align-items:center;
    justify-content:center; background:linear-gradient(135deg,#2E5BFF,#7A5AF8); color:#fff; }
  .pf-asst-ava.big{ width:76px; height:76px; }
  .pf-msgs{ flex:1; overflow-y:auto; padding:14px 14px 6px; background:var(--paper); min-height:0;
    overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
  .pf-mrow{ display:flex; gap:8px; margin-bottom:12px; align-items:flex-end; }
  .pf-mrow.me{ justify-content:flex-end; }
  .pf-mcol{ max-width:min(78%,460px); display:flex; flex-direction:column; }
  .pf-mrow.me .pf-mcol{ align-items:flex-end; }
  /* Chat-Blasen (2026-07-21 ueberarbeitet): empfangene Blase warmes Weiss,
     eigene Blase ein RUHIGES, etwas entsaettigtes Indigo-Blau (kein greller
     Neon-Ton mehr – der wirkte "billig"). Farbe zentral als --pf-sent, damit
     alle abhaengigen Toene (Zitat, Haken) dazu passen. */
  .pf-bubble{ padding:9px 13px; border-radius:18px; font-size:13.5px; line-height:1.5;
    white-space:pre-wrap; word-break:break-word; background:var(--card);
    border:1px solid var(--line); border-bottom-left-radius:6px;
    box-shadow:0 1px 2px rgba(27,34,48,.04); }
  .pf-mrow.me .pf-bubble{ background:var(--pf-sent-bg,#E6EAFF); border-color:#D6DDFB;
    color:var(--pf-sent-ink,#2B3358); box-shadow:0 1px 2px rgba(80,99,214,.10);
    border-bottom-left-radius:18px; border-bottom-right-radius:6px; }
  /* Deep-Link-Button in Systemnachrichten (z. B. "Gespräch öffnen"). */
  .pf-deeplink{ display:inline-flex; align-items:center; margin-top:9px; padding:8px 14px;
    background:var(--brand); color:#fff; border:none; border-radius:11px; cursor:pointer;
    font:inherit; font-size:13px; font-weight:700; line-height:1; transition:filter .15s ease; }
  .pf-deeplink:hover{ filter:brightness(1.06); }
  .pf-mtime{ font-size:10px; color:var(--muted); margin-top:3px; padding:0 4px; }
  .pf-bubble img{ max-width:220px; max-height:220px; border-radius:12px; display:block; cursor:pointer; }
  .pf-pdfchip{ display:flex; align-items:center; gap:7px; cursor:pointer; font-weight:700; font-size:12.5px; }
  /* Composer im Claude-Stil (2026-07-21): KEINE weisse Leiste + Trennlinie mehr,
     sondern EINE weiche, abgerundete Box, die frei ueber dem Chat schwebt.
     .pf-comp ist nur noch der transparente Rahmen (Abstand rundum), die
     eigentliche Box ist .pf-compbar. */
  .pf-comp{ display:flex; flex-direction:column; gap:6px; padding:8px 10px 10px;
    border-top:none; flex:none; background:transparent;
    position:relative; /* Anker fuer den @Mention-Picker (.pf-mention-menue) */ }
  .pf-compbar{ display:flex; align-items:flex-end; gap:6px; position:relative;
    background:var(--card); border:1px solid var(--line); border-radius:24px;
    box-shadow:0 2px 14px rgba(27,34,48,.09); padding:5px 6px 5px 8px;
    transition:border-color .18s ease, box-shadow .18s ease; }
  .pf-compbar:focus-within{ border-color:var(--brand);
    box-shadow:0 3px 18px rgba(46,91,255,.16); }
  .pf-comp textarea{ flex:1; resize:none; border:none; border-radius:0;
    padding:9px 4px; font-size:13.5px; font-family:inherit; background:transparent; color:var(--ink);
    max-height:120px; box-sizing:border-box; min-height:38px; outline:none; }
  .pf-comp textarea:focus{ border:none; background:transparent; }
  /* Knoepfe in der Box dezent, damit die Box ruhig wirkt (Anhaengen "+" links). */
  .pf-compbar .pf-icobtn{ background:transparent; color:var(--muted);
    box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .pf-compbar .pf-icobtn:hover{ background:rgba(127,127,127,.12); color:var(--ink); }
  /* Senden: KEIN blauer Kreis mehr – nur das dunkle Flieger-Symbol (Wunsch:
     "mavi arkaplani kaldir, ucak siyah kalsin"). */
  .pf-compbar .pf-icobtn.send{ background:transparent; color:var(--ink);
    box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .pf-compbar .pf-icobtn.send:hover{ background:rgba(127,127,127,.12); }
  .pf-icobtn{ appearance:none; border:none; cursor:pointer; width:38px; height:38px; flex:none;
    border-radius:50%; background:rgba(127,127,127,.08); color:var(--ink);
    display:flex; align-items:center; justify-content:center;
    transition:background .15s ease, transform .12s ease; }
  .pf-icobtn:hover{ background:rgba(127,127,127,.16); }
  .pf-icobtn:active{ transform:scale(.9); }
  .pf-icobtn.send{ background:var(--brand); color:#fff; }
  .pf-icobtn.send:hover{ background:var(--brand-dk); }
  .pf-icobtn svg{ width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2;
    stroke-linecap:round; stroke-linejoin:round; }
  .pf-back{ display:none; }
  /* Assistent-Bereich (nutzt die bekannten .asst-* Klassen) */
  .pf-asst{ flex:1; display:flex; flex-direction:column; min-height:0; }
  .pf-asst.hidden{ display:none; }
  /* Info-/Einstellungs-Blatt (Klick auf den Chat-Kopf) */
  .pf-info{ position:absolute; inset:0; background:rgba(15,20,35,.38); z-index:30;
    display:flex; align-items:center; justify-content:center; padding:18px; animation:pfFade .18s ease; }
  .pf-info.hidden{ display:none; }
  .pf-info-card{ position:relative; width:min(360px,100%); background:var(--card); border-radius:22px;
    box-shadow:0 18px 50px rgba(27,34,48,.25); padding:26px 20px 14px;
    animation:pfPop .2s cubic-bezier(.34,1.4,.64,1); }
  .pf-info-x{ position:absolute; top:10px; right:10px; }
  .pf-info-head{ display:flex; flex-direction:column; align-items:center; text-align:center;
    gap:9px; margin-bottom:16px; padding:0 6px; }
  .pf-info-head b{ font-size:16.5px; }
  .pf-info-head span{ font-size:12.5px; color:var(--muted); line-height:1.55; }
  .pf-info-acts{ display:flex; flex-direction:column; gap:4px; }
  .pf-info-act{ display:flex; align-items:center; gap:11px; width:100%; text-align:left; background:none;
    border:none; font:inherit; font-size:13.5px; font-weight:700; color:var(--ink); cursor:pointer;
    padding:11px 12px; border-radius:14px; transition:background .14s ease; }
  .pf-info-act:hover{ background:var(--paper); }
  .pf-info-act.rot{ color:var(--bad); }
  .pf-info-act svg{ flex:none; }
  /* Neue Gruppe / Gruppen-Einstellungen */
  .pf-cico{ width:40px; height:40px; border-radius:50%; background:var(--brand-soft); color:var(--brand);
    display:flex; align-items:center; justify-content:center; flex:none; }
  .pf-conv.pick{ cursor:pointer; }
  .pf-conv.pick .pf-conv-check{ opacity:1; }
  /* ===== "Neue Gruppe" im WhatsApp-Stil (2026-07): schmale mittige Karte,
     Avatar + Unterstrich-Namensfeld, schlanke Mitgliederliste, EIN kompakter
     Knopf. Mobil (<=720px, s. Media-Block unten) volle Breite. ===== */
  .pf-gn{ display:flex; flex-direction:column; gap:4px; width:100%; max-width:400px;
    margin:6px auto 0; background:var(--card); border:1.5px solid var(--line);
    border-radius:20px; padding:20px 18px 16px; box-sizing:border-box; }
  .pf-gn-kopf{ display:flex; align-items:center; gap:12px; margin-bottom:10px; }
  .pf-gn-ava{ width:52px; height:52px; border-radius:50%; flex:none; display:flex;
    align-items:center; justify-content:center; background:var(--brand-soft); color:var(--brand); }
  .pf-gn-kopf input[type="text"]{ flex:1; min-width:0; border:none !important;
    border-bottom:2px solid var(--line) !important; border-radius:0 !important;
    padding:8px 2px !important; font-size:16px; font-weight:600; background:transparent; }
  .pf-gn-kopf input[type="text"]:focus{ border-bottom-color:var(--brand) !important; outline:none; }
  .pf-gn-liste{ max-height:46vh; overflow-y:auto; margin:0 -6px; }
  .pf-gn .pf-conv{ padding:8px 10px; }
  .pf-gn .pf-gn-go{ align-self:center; margin-top:14px; padding:10px 26px; border-radius:999px; }
  .pf-gn input[type="text"]{ border:1.5px solid var(--line); border-radius:14px; padding:11px 14px;
    font:inherit; font-size:14.5px; background:var(--card); outline:none; margin-bottom:8px;
    transition:border-color .18s ease; }
  .pf-gn input[type="text"]:focus{ border-color:var(--brand); }
  .pf-gn-hint{ font-size:12.5px; font-weight:700; color:var(--muted); margin:2px 0 4px; }
  .pf-gn-go{ margin-top:12px; }
  .pf-gn-err{ color:var(--bad); font-size:12.5px; min-height:16px; margin-top:6px; }
  .pf-gm-list{ max-height:260px; overflow-y:auto; margin-bottom:10px; }
  .pf-gm{ display:flex; align-items:center; gap:10px; padding:7px 6px; border-radius:12px; }
  .pf-gm.pick{ cursor:pointer; }
  .pf-gm.pick:hover{ background:var(--paper); }
  .pf-gm-n{ flex:1; min-width:0; font-weight:700; font-size:13.5px; display:flex; align-items:center;
    gap:6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pf-gm-x{ width:30px; height:30px; }
  .pf-gm-x svg{ width:14px; height:14px; }
  /* Blaettern: aeltere Nachrichten */
  .pf-mehr-btn{ align-self:center; display:block; margin:0 auto 12px; appearance:none; border:1px solid var(--line);
    background:var(--card); color:var(--brand); font:inherit; font-size:12.5px; font-weight:700;
    border-radius:999px; padding:7px 16px; cursor:pointer; transition:border-color .15s ease, background .15s ease; }
  .pf-mehr-btn:hover{ border-color:var(--brand); background:var(--brand-soft); }
  .pf-mehr-btn:disabled{ opacity:.5; cursor:default; }
  @keyframes pfFade{ from{ opacity:0; } to{ opacity:1; } }
  @keyframes pfPop{ from{ opacity:0; transform:scale(.92); } to{ opacity:1; transform:none; } }

  /* ===== CHAT-FUNKTIONEN (2026-07): Antworten, Haken, Reaktionen, @Mentions,
     Suche im Chat, Pin/Stumm. JS-Gegenstuecke: pfMsgsRender/pfMsgMenue/
     pfReaktToggle/pfMentionTippen/pfChatSucheToggle/pfMarkToggle (index-app.js),
     Server: /api/postfach/reaktion|markierung|suche (app.py). ===== */
  /* Zitat-Block oben in der Blase (denormalisierte Vorschau vom Server). */
  .pf-quote{ border-left:3px solid var(--pf-sent,#5063D6); background:rgba(80,99,214,.09);
    border-radius:8px; padding:5px 9px; margin-bottom:6px; font-size:12px;
    color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  /* Zitat INNERHALB der eigenen (Pastell-)Blase: dunkler Text auf hellem Grund
     (die Blase ist jetzt pastell, nicht mehr kraeftig blau -> dunkel = lesbar). */
  .pf-mrow.me .pf-quote{ border-left-color:var(--pf-sent,#5063D6);
    background:rgba(80,99,214,.12); color:var(--pf-sent-ink,#2B3358); }
  /* Haken neben der Uhrzeit: EIN Haken, zwei Zustaende (2026-07).
     grau = gesendet/zugestellt · gruen = die andere Seite hat gelesen. */
  .pf-ticks{ display:inline-flex; margin-left:4px; color:var(--muted); vertical-align:-2px; }
  .pf-ticks.gelesen{ color:var(--ok,#1E9E52); }
  /* Alt-Klasse aus 2.x: falls irgendwo noch "blau" gerendert wird, sieht es
     wie der neue Gelesen-Zustand aus, statt unsichtbar zu bleiben. */
  .pf-ticks.blau{ color:var(--ok,#1E9E52); }
  .pf-ticks svg{ width:14px; height:14px; fill:none; stroke:currentColor;
    stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
  /* Reaktions-Chips unter der Blase; eigene Reaktion = blauer Rand. */
  .pf-reakt{ display:flex; gap:4px; flex-wrap:wrap; margin-top:3px; }
  .pf-rchip{ appearance:none; border:1px solid var(--line); background:var(--card);
    border-radius:999px; padding:1.5px 8px; font-size:13px; cursor:pointer; line-height:1.5; }
  .pf-rchip b{ font-size:11px; color:var(--muted); font-weight:700; }
  .pf-rchip.mir{ border-color:var(--brand); background:var(--brand-soft); }
  /* ⌄-Knopf an der Blase (Antworten/Reagieren): dezent, auf Beruehr-Geraeten
     immer leicht sichtbar, mit Maus erst beim Hover. */
  /* Menue-Knopf an der Blase: NUR ein schlichtes Pfeil-/Chevron-Symbol, KEINE
     (halbtransparente) Kreisflaeche mehr (wirkte "aufgeklebt"). */
  .pf-mact{ position:absolute; top:3px; right:5px; width:16px; height:16px; border:none;
    border-radius:0; background:transparent; color:var(--muted); cursor:pointer;
    display:flex; align-items:center; justify-content:center; opacity:.55;
    box-shadow:none; padding:0; transition:opacity .15s ease; }
  .pf-mrow.me .pf-mact{ color:var(--pf-sent,#5063D6); }
  .pf-bubble{ position:relative; }
  .pf-bubble:hover .pf-mact{ opacity:1; }
  @media (hover:none){ .pf-mact{ opacity:.6; } }
  .pf-mact svg{ width:14px; height:14px; fill:none; stroke:currentColor;
    stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
  /* Kontextmenue an der Blase: Emoji-Leiste + "Antworten". */
  #pf-msg-menue{ position:absolute; z-index:70; background:var(--card);
    border:1.5px solid var(--line); border-radius:14px; box-shadow:0 10px 28px rgba(0,0,0,.16);
    padding:7px; min-width:230px; animation:pfPop .14s ease; }
  .pf-mm-emojis{ display:flex; gap:2px; justify-content:space-between; margin-bottom:5px; }
  .pf-mm-emoji{ appearance:none; border:none; background:none; font-size:19px;
    padding:4px 6px; border-radius:9px; cursor:pointer; }
  .pf-mm-emoji:hover{ background:var(--paper); }
  .pf-mm-act{ display:flex; align-items:center; gap:8px; width:100%; border:none;
    background:none; padding:8px 9px; border-radius:9px; cursor:pointer; font:inherit;
    font-size:13px; font-weight:600; color:var(--ink); }
  .pf-mm-act:hover{ background:var(--paper); }
  /* Reply-Leiste ueber dem Composer. */
  .pf-reply-prev{ display:flex; align-items:center; gap:8px; padding:6px 9px;
    border-left:3px solid var(--brand); background:var(--brand-soft); border-radius:10px; }
  .pf-reply-tx{ flex:1; min-width:0; font-size:12.5px; color:var(--muted);
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  /* @Mention-Hervorhebung im Text + Picker ueber dem Composer. */
  .pf-mention{ color:var(--brand); font-weight:700; }
  .pf-mrow.erwaehnt .pf-bubble{ box-shadow:inset 0 0 0 1.5px var(--brand-soft),
    0 0 0 1.5px rgba(46,91,255,.25); }
  .pf-mention-menue{ position:absolute; bottom:100%; left:12px; right:12px; z-index:65;
    background:var(--card); border:1.5px solid var(--line); border-radius:14px;
    box-shadow:0 -6px 24px rgba(0,0,0,.12); padding:5px; max-height:220px; overflow-y:auto; }
  .pf-mention-row{ display:flex; align-items:center; gap:9px; width:100%; border:none;
    background:none; padding:7px 9px; border-radius:9px; cursor:pointer; font:inherit;
    font-size:13.5px; font-weight:600; text-align:left; }
  .pf-mention-row:hover{ background:var(--paper); }
  /* Suche INNERHALB der Konversation (unter dem Chat-Kopf). */
  #pf-csuche{ display:flex; align-items:center; gap:7px; padding:8px 12px;
    border-bottom:1px solid var(--line); background:var(--card); position:relative; flex:none; }
  #pf-csuche-erg{ position:absolute; top:100%; left:10px; right:10px; z-index:75;
    background:var(--card); border:1.5px solid var(--line); border-radius:0 0 14px 14px;
    box-shadow:0 12px 28px rgba(0,0,0,.14); max-height:300px; overflow-y:auto; }
  #pf-csuche-erg:empty{ display:none; }
  .pf-cs-row{ display:flex; flex-direction:column; gap:2px; width:100%; border:none;
    background:none; padding:9px 12px; cursor:pointer; font:inherit; text-align:left;
    border-bottom:1px solid var(--line); }
  .pf-cs-row:last-child{ border-bottom:none; }
  .pf-cs-row:hover{ background:var(--paper); }
  .pf-cs-meta{ font-size:11px; font-weight:700; color:var(--muted); }
  .pf-cs-tx{ font-size:12.5px; color:var(--ink); overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap; }
  .pf-cs-leer{ padding:10px 12px; font-size:12.5px; color:var(--muted); }
  /* Suchtreffer kurz hervorheben. */
  .pf-bubble.pf-blink{ animation:pfBlink 1.5s ease; }
  @keyframes pfBlink{ 0%,60%{ box-shadow:0 0 0 2.5px var(--brand); } 100%{ box-shadow:none; } }
  /* Listen-Status: Pin/Stumm-Icons, @-Markierung, stummer (grauer) Zaehler. */
  .pf-conv-ico{ display:inline-flex; color:var(--muted); }
  .pf-conv-at{ min-width:18px; height:18px; border-radius:9px; background:var(--brand);
    color:#fff; font-size:11px; font-weight:800; display:inline-flex; align-items:center;
    justify-content:center; padding:0 4px; }
  .pf-conv-unread.stumm{ background:var(--muted); }
  @media (max-width:720px){
    /* Shell liegt fix ueber der App (eigener Mini-Kopf mit Zurueck-Pfeil).
       WICHTIG (Fix 2026-07-21): EXPLIZITE Hoehe statt nur inset:0. Grund: die
       Shell ist zugleich ein Flex-Container (display:flex aus der Basisregel).
       Bei `position:fixed` + `display:flex` + `height:auto` streckt iOS/Safari
       die Box NICHT zwischen top:0 und bottom:0 – sie fiel auf CONTENT-Hoehe
       zusammen: nur Kopf/Suche/eine Konversationszeile sichtbar, darunter grau
       (die eigentliche Beschwerde „Nachrichten wird abgeschnitten"). Desktop-
       Browser strecken korrekt, iOS nicht. Mit fester Hoehe (var(--vh100) =
       gemessene sichtbare Hoehe, dvh als Fallback) füllt die Shell zuverlässig
       den Bildschirm; die Liste (.pf-convs, flex:1) scrollt dann intern.
       pfViewportApply (index-app.js) überschreibt die Höhe nur bei OFFENER
       Tastatur mit dem kleineren visualViewport-Wert. */
    /* iOS-SICHERER VOLLBILD-OVERLAY (Neuaufbau 2026-07-21):
       Die Shell ist NICHT mehr display:flex. Grund: Bei position:fixed +
       display:flex + height:auto streckt iOS/Safari die Box nicht zwischen
       top:0 und bottom:0 -> sie fiel auf Content-Hoehe zusammen (Liste
       abgeschnitten, darunter grau). Ein NICHT-Flex fixed-Element mit inset:0
       fuellt den Viewport dagegen zuverlaessig. Die eigentlichen Spalten
       (.pf-left / .pf-right) liegen ABSOLUT mit inset:0 IM Overlay - absolute
       Fuellung ist auf iOS robust (kein Flex-Auto-Hoehen-Problem). Sie sind
       selbst Flex-Spalten (display:flex;flex-direction:column aus der Basis),
       damit die Liste (.pf-convs, flex:1) intern scrollt.
       height per JS (pfViewportApply) zusaetzlich als konkreter px-Wert -
       Guertel und Hosentraeger. */
    .pf-shell{ position:fixed; inset:0; z-index:9000; min-height:0;
      height:100dvh; /* ueberschreibt die Basisregel height:calc(vh-175px);
        JS (pfViewportApply) setzt zusaetzlich eine exakte px-Hoehe */
      display:block; border:none; border-radius:0; }
    .pf-left, .pf-right{ position:absolute; inset:0; width:auto; height:auto;
      min-height:0; border-right:none; }
    .pf-mobiletop{ display:flex; align-items:center; gap:8px;
      padding:calc(8px + env(safe-area-inset-top)) 12px 2px; }
    .pf-mtitle{ font-weight:800; font-size:17px; }
    .pf-chead{ padding-top:calc(9px + env(safe-area-inset-top));
      min-height:calc(58px + env(safe-area-inset-top)); }
    /* 16px verhindert den automatischen iOS-Zoom beim Fokussieren */
    .pf-comp textarea{ font-size:16px; }
    /* Eingabebox moeglichst weit unten "anlehnen": nur die Safe-Area (Home-
     Indicator) als Abstand, kein extra Luft (Wunsch: unten angelehnt). */
    .pf-comp{ padding:6px 8px calc(6px + env(safe-area-inset-bottom)); }
    .pf-search input{ font-size:16px; }
    .asst-input input{ font-size:16px; }
    .asst-input{ padding-bottom:calc(11px + env(safe-area-inset-bottom)); }
    .pf-left{ width:100%; border-right:none; }
    .pf-right{ display:none; }
    /* "Neue Gruppe": mobil volle Breite, Karte ohne Rahmen (WhatsApp-Feeling). */
    .pf-gn{ max-width:none; border:none; border-radius:0; padding:10px 6px; margin:0; }
    .pf-gn-liste{ max-height:none; }
    .pf-shell.chat .pf-left{ display:none; }
    .pf-shell.chat .pf-right{ display:flex; }
    .pf-back{ display:flex; }
    .pf-info{ align-items:flex-end; padding:0; }
    .pf-info-card{ width:100%; border-radius:26px 26px 0 0; animation:pfUp .22s ease;
      padding-bottom:calc(14px + env(safe-area-inset-bottom)); }
    @keyframes pfUp{ from{ transform:translateY(46px); opacity:.4; } to{ transform:none; opacity:1; } }
  }
  /* Roter Benachrichtigungs-Punkt am Profil (offene Meldungen) */
  .avatar-badge{ position:absolute; top:-3px; right:-3px; min-width:18px; height:18px; padding:0 4px;
    background:#e23; color:#fff; font-size:10.5px; font-weight:800; text-align:center;
    border-radius:9px; border:2px solid var(--bg,#fff); box-sizing:border-box; pointer-events:none;
    display:flex; align-items:center; justify-content:center; line-height:1; }
  .am-alert{ display:flex; align-items:center; gap:8px; margin:2px 6px 6px; padding:9px 11px;
    background:rgba(226,51,51,.08); border:1px solid rgba(226,51,51,.25); border-radius:10px;
    color:#c41e1e; font-size:13px; font-weight:600; cursor:pointer; width:calc(100% - 12px); text-align:left; }
  .am-alert:hover{ background:rgba(226,51,51,.14); }
  .avatar-btn {
    display:flex; align-items:center; gap:7px;
    appearance:none; border:none; cursor:pointer; background:transparent;
    padding:3px; border-radius:999px;
    transition: background .15s ease;
  }
  .avatar-btn:hover { background: rgba(127,127,127,0.10); }
  .avatar-circle {
    width:40px; height:40px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-weight:700; font-size:15px; letter-spacing:.3px;
    box-shadow: 0 2px 8px rgba(27,34,48,0.18);
    user-select:none;
  }
  .avatar-caret { width:10px; height:10px; flex:none; transition: transform .2s ease; color: var(--muted); }
  .avatar-btn.open .avatar-caret { transform: rotate(180deg); }

  /* Schul-Kapsel (aktive Schule): Logo + voller Schulname (2 Zeilen) + Profil. */
  .avatar-wrap.with-school{ display:flex; align-items:center; gap:10px;
    background:var(--card); border:1px solid var(--line); border-radius:999px;
    padding:4px 6px 4px 10px; box-shadow:var(--shadow); }
  .avatar-wrap.with-school .avatar-btn{ padding:0; }
  .avatar-wrap.with-school .avatar-btn:hover{ background:transparent; }
  .av-school{ display:flex; align-items:center; gap:9px; min-width:0; }
  .av-school-logo{ width:32px; height:32px; border-radius:50%; flex:none;
    background-color:transparent; background-size:cover; background-repeat:no-repeat; background-position:center;
    padding:0;
    border:none; display:flex; align-items:center; justify-content:center; overflow:hidden; }
  .av-school-logo--brand{ background-color:var(--brand); border:none; box-shadow:0 2px 6px rgba(46,91,255,.28); }
  .av-school-logo svg{ width:18px; height:18px; fill:none; stroke:#fff; stroke-width:2;
    stroke-linecap:round; stroke-linejoin:round; }
  .av-school-name{ font-size:11.5px; font-weight:600; line-height:1.2; color:var(--ink);
    letter-spacing:-.01em; max-width:150px;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .av-school-div{ width:1px; height:28px; background:var(--line); flex:none; }
  @media (max-width:640px){
    .av-school, .av-school-div{ display:none; }
    .avatar-wrap.with-school{ background:transparent; border:none; box-shadow:none; padding:3px; }
  }

  /* z-index 500, NICHT 50 (Fehler 01.08.2026): das Profilmenue haengt in der
     Kopfzeile, die haftende Aufgaben-Leiste (.dash-toolbar) steht mit z-index 50
     WEITER UNTEN im Dokument. Bei gleichem z-index gewinnt das spaetere Element -
     also lag die Leiste ueber dem geoeffneten Menue und schnitt es durch.
     Wer hier eine Zahl aendert: sie muss ueber allen haftenden Leisten der
     Screens (50/60/80) und unter den Overlays/Modalen (>=4000) bleiben. */
  .avatar-menu {
    position:absolute; top:52px; right:0; z-index:500;
    min-width:250px; padding:7px;
    background: var(--card);
    border:1px solid var(--line); border-radius:16px;
    box-shadow: 0 16px 40px rgba(27,34,48,0.16);
    opacity:0; transform: translateY(-6px) scale(0.98);
    pointer-events:none; transition: opacity .15s ease, transform .15s ease;
  }
  .avatar-menu.open { opacity:1; transform: translateY(0) scale(1); pointer-events:auto; }
  /* Apple-klarer Kopf: Foto + Name + eine ruhige, dezente Unterzeile */
  .avatar-menu .am-head {
    display:flex; align-items:center; gap:11px;
    padding:9px 10px 12px; margin:2px 2px 6px;
    border-bottom:1px solid var(--line);
  }
  .avatar-menu .am-avatar {
    width:42px; height:42px; border-radius:50%; flex:none;
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-weight:700; font-size:15px; letter-spacing:.3px;
    box-shadow: 0 2px 8px rgba(27,34,48,0.16); user-select:none;
  }
  .avatar-menu .am-head-tx { min-width:0; }
  .avatar-menu .am-name { font-weight:700; font-size:15px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .avatar-menu .am-sub { font-size:12.5px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .avatar-menu button {
    display:flex; align-items:center; gap:10px; width:100%;
    appearance:none; border:none; background:transparent; cursor:pointer;
    font-family:inherit; font-size:14.5px; font-weight:600; color:var(--ink);
    text-align:left; padding:11px 12px; border-radius:9px;
    transition: background .12s ease;
  }
  .avatar-menu button:hover { background: rgba(127,127,127,0.10); }
  .avatar-menu button.am-logout { color: var(--bad); }
  .avatar-menu button.am-logout:hover { background: rgba(216, 64, 64, 0.10); }
  /* Unterstützen: farblich hervorgehoben (Herz-Rot), damit es auffällt */
  .avatar-menu button.am-support { color:#E0463E; font-weight:700; }
  .avatar-menu button.am-support .am-ico { color:#E0463E; }
  .avatar-menu button.am-support:hover { background: rgba(224,70,62,0.10); }
  .avatar-menu .am-divider { height:1px; background:var(--line); margin:6px 4px; }
  .avatar-menu .am-label { font-size:10.5px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); padding:8px 10px 3px; }
  .avatar-menu button svg.am-ico { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; opacity:.85; }
  .avatar-menu .am-section { padding:8px 12px 4px; font-size:11px; color:var(--muted); font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
  /* === Konto verwalten: ANTON-Stil Liste + Profilkarte === */
  .kp-card{display:flex;align-items:center;gap:16px;padding:18px;border:1.5px solid var(--line);border-radius:16px;margin-bottom:18px;background:linear-gradient(180deg,var(--brand-soft,rgba(46,91,255,.05)),var(--card));}
  .kp-photo{width:72px;height:72px;border-radius:50%;flex:none;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;color:#fff;position:relative;overflow:hidden;}
  .kp-photo .kp-edit{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.45);color:#fff;font-size:10px;text-align:center;padding:2px 0;font-weight:700;}
  .kp-meta{min-width:0;}
  .kp-name{font-weight:800;font-size:18px;color:var(--ink);word-break:break-word;}
  .kp-mail{font-size:13px;color:var(--muted);word-break:break-word;margin-top:2px;}
  .kp-photo-actions{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap;}
  .krow{display:flex;align-items:center;gap:4px;justify-content:space-between;cursor:pointer;padding:16px 4px;border-bottom:1px solid var(--line);user-select:none;}
  .krow:last-child{border-bottom:none;}
  .krow:hover{background:rgba(127,127,127,.04);}
  .krow-main{min-width:0;}
  .krow-title{font-weight:700;font-size:15.5px;color:var(--ink);}
  .krow-sub{font-size:13px;color:var(--muted);margin-top:2px;}
  .krow-arr{width:18px;height:18px;flex:none;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s;}
  .krow.open .krow-arr{transform:rotate(90deg);}
  .krow-body{overflow:hidden;max-height:0;transition:max-height .2s ease;}
  .krow-body.open{max-height:none;padding:6px 4px 14px;}
  /* === Einstellungen (ANTON-Stil): Kopfzeile + Navigations-Liste + Unterseiten === */
  /* Auf dem Einstellungen-Screen: die alte Kopfzeile KOMPLETT ausblenden – nicht
     nur Logo/Begrüßung. Sonst bleibt die leere Leiste (min-height 48px + margin)
     als großer Freiraum über "Einstellungen" stehen. */
  body[data-screen="konto"] .topbar{display:none !important;}

  /* SSO-Invite-Bildschirm (neuer Lehrer per Google/IServ): ruhiger, zentrierter
     Kopf – nur ein großes, mittiges Logo statt der Begrüßungszeile. */
  body[data-screen="sso-invite"] .topbar{
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 26px 0 30px;
  }
  body[data-screen="sso-invite"] .topbar .greeting,
  body[data-screen="sso-invite"] .topbar #authbar-fallback{ display: none !important; }
  body[data-screen="sso-invite"] .main-logo{ height: 88px; cursor: default; }
  body[data-screen="sso-invite"] .app-topbar{ display: none !important; }
  /* Leere App-Kopfzeile (kein Seitentitel für Konto) reserviert sonst Platz –
     ausblenden, damit der Einstellungen-Inhalt bündig oben beginnt. */
  /* AUSNAHME (Faz 7, 2026-07-20): In der App-Shell BRAUCHT die Kopfzeile ihren
     Platz - dort steht links "Einstellungen" und rechts das Profil, genau wie
     im Cockpit. Nur OHNE Seitenleiste (Vollbild-Fallback) bleibt sie weg. */
  body[data-screen="konto"]:not(.has-sidebar) .app-topbar{display:none !important;}
  /* Oberen Innenabstand des Panels kürzen, damit die Liste weiter oben startet. */
  body[data-screen="konto"]:not(.has-sidebar) .wrap{padding-top:max(calc(12px + env(safe-area-inset-top)), 18px) !important;}
  .kset-head{margin:-2px 0 6px;}
  .kset-row1{display:flex;align-items:center;gap:10px;padding:2px 0;}
  .kset-x{appearance:none;border:none;background:transparent;cursor:pointer;padding:4px;margin-left:-4px;border-radius:8px;display:flex;align-items:center;color:var(--ink);}
  .kset-x:hover{background:rgba(127,127,127,.08);}
  .kset-x svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;}
  .kset-title{font-weight:800;font-size:17px;color:var(--ink);}
  .kset-head.sub .kset-row1 .kset-title{font-weight:600;font-size:14.5px;color:var(--muted);}
  .kset-head.sub .kset-x{color:var(--muted);}
  .kset-row2{display:flex;align-items:center;gap:10px;padding:6px 0 2px;cursor:pointer;user-select:none;}
  .kset-row2:hover .kset-title2{color:var(--brand);}
  .kset-back{display:flex;align-items:center;padding:4px;margin-left:-4px;border-radius:8px;color:var(--ink);}
  .kset-row2:hover .kset-back{background:rgba(127,127,127,.08);}
  .kset-back svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
  .kset-title2{font-weight:800;font-size:17px;color:var(--ink);}
  /* Navigations-Zeile: Titel links, Wert + Chevron rechts */
  .knav{display:flex;align-items:center;gap:10px;justify-content:space-between;cursor:pointer;padding:16px 4px;border-bottom:1px solid var(--line);user-select:none;}
  .knav:hover{background:rgba(127,127,127,.04);}
  .knav-main{min-width:0;flex:1;}
  .knav-title{font-weight:700;font-size:15.5px;color:var(--ink);}
  .knav-sub{font-size:13px;color:var(--muted);margin-top:2px;}
  /* Graue Versionszeile ganz unten in den Einstellungen (kein Knopf). */
  .konto-vfuss{ text-align:center; color:var(--muted); font-size:12.5px;
    padding:22px 0 30px; letter-spacing:.01em; user-select:none; }
  .knav-val{font-size:14px;color:var(--muted);text-align:right;max-width:46%;flex:none;line-height:1.45;}
  .knav-val .kv-badge{display:inline-flex;align-items:center;gap:6px;}
  .knav-arr{width:18px;height:18px;flex:none;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* Einstellungen im Apple-Account-Stil: gruppierte Karten + Icon-Kacheln.
     Gehoert zu kontoMainMenu()/kontoRowIco() in index-app.js. */
  /* PWA-Desktop (window-controls-overlay, manifest display_override):
     Die Titelleiste ist weg - dieser unsichtbare Streifen oben macht das
     Fenster wieder ZIEHBAR (Drag-Regionen muss die App selbst definieren).
     Er deckt nur die Titelbar-Zone ab (~30px, graue Randflaeche) und
     schluckt dort Klicks - Inhalte liegen tiefer. */
  @media (display-mode: window-controls-overlay){
    body::before{
      content:""; position:fixed; z-index:9990;
      left:env(titlebar-area-x, 0); top:env(titlebar-area-y, 0);
      width:env(titlebar-area-width, 100%); height:env(titlebar-area-height, 30px);
      -webkit-app-region:drag; app-region:drag;
    }
  }
  .kgroup{border:1px solid var(--line);border-radius:16px;overflow:hidden;margin:0 0 14px;background:var(--card,#fff);}
  .kgroup .knav{border-bottom:1px solid var(--line);padding:12px 14px;}
  .kgroup .knav:last-child{border-bottom:none;}
  .kico{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex:none;color:#fff;}
  .kico svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .kprof{display:flex;align-items:center;gap:14px;padding:16px 14px;cursor:pointer;user-select:none;}
  .kprof:hover{background:rgba(127,127,127,.04);}
  .kprof-ava{width:58px;height:58px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;font-size:20px;background-size:cover;background-position:center;}
  .kprof-name{font-weight:800;font-size:17px;color:var(--ink);}
  .kprof-sub{font-size:12.5px;color:var(--muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  /* Sprachversion: Auswahl-Liste wie ANTON */
  .klang{display:block;padding:12px 4px;border-bottom:1px solid var(--line);cursor:pointer;user-select:none;}
  .klang:last-child{border-bottom:none;}
  .klang-h{display:flex;align-items:center;gap:9px;font-weight:700;font-size:15px;color:var(--ink);}
  .klang-h input{width:17px;height:17px;accent-color:var(--brand);margin:0;cursor:pointer;}
  .klang-d{font-size:12.5px;color:var(--muted);margin:3px 0 0 26px;line-height:1.5;}
  /* Umschalter (Ja/Nein) */
  .kswitch{position:relative;width:44px;height:26px;flex:none;}
  .kswitch input{opacity:0;width:0;height:0;}
  .kswitch .ksl{position:absolute;inset:0;background:var(--line);border-radius:999px;cursor:pointer;transition:background .15s;}
  .kswitch .ksl:before{content:"";position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .15s;box-shadow:0 1px 3px rgba(0,0,0,.25);}
  .kswitch input:checked + .ksl{background:var(--brand);}
  .kswitch input:checked + .ksl:before{transform:translateX(18px);}
  /* Animationen reduzieren */
  html.reduce-motion *, html.reduce-motion *:before, html.reduce-motion *:after{animation:none !important;transition:none !important;}
  /* Google-Translate-Leiste verstecken (Übersetzung läuft im Hintergrund) */
  .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame{display:none !important;}
  body{top:0 !important;}
  .goog-text-highlight{background:none !important;box-shadow:none !important;}
  #google_translate_element{display:none;}
  /* Zahnrad-Button neben dem Avatar */
  .gear-btn { appearance:none; border:none; cursor:pointer; background:transparent; padding:6px; border-radius:999px; color:var(--muted); display:flex; align-items:center; transition: background .15s ease, color .15s ease; }
  .gear-btn:hover { background: rgba(127,127,127,0.10); color:var(--ink); }
  .gear-btn svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  /* Rollen-Badges (wie die kleinen Status-Badges, abgerundet) */
  .role-badge{display:inline-block;font-size:11px;font-weight:800;padding:3px 10px;border-radius:999px;letter-spacing:.02em;}
  .role-teacher{background:var(--ok-soft);color:var(--ok);}
  .role-admin{background:var(--brand-soft);color:var(--brand-dk);}

  /* iPad Tarzı Cam Efektli Butonlar */
  .btn {
    background: rgba(46, 91, 255, 0.75) !important; 
    backdrop-filter: blur(12px) !important;          
    -webkit-backdrop-filter: blur(12px) !important;  
    border: 1px solid rgba(255, 255, 255, 0.2) !important; 
    box-shadow: 0 4px 16px rgba(27, 34, 48, 0.08) !important;
  }
  .btn:hover { background: rgba(30, 63, 204, 0.85) !important; }
  
  .btn.ghost {
    background: rgba(255, 255, 255, 0.4) !important; 
    color: var(--brand) !important;
    border: 1px solid rgba(46, 91, 255, 0.2) !important;
  }
  .btn.ghost:hover { background: rgba(46, 91, 255, 0.1) !important; }
  
  .btn.ok { background: rgba(21, 160, 90, 0.75) !important; }
  .btn.ok:hover { background: rgba(14, 122, 67, 0.85) !important; }
  
  .btn.sub { background: rgba(27, 34, 48, 0.75) !important; }
  /* EKLENEN YENİ KODLAR BURADA BİTİYOR */
  
  /* Cihaz karanlık moddaysa bu renkler devreye girer (auto / Standard) */
  @media (prefers-color-scheme: dark) {    
  /* Die weisse Notkachel hinter .main-logo ist entfallen (v2.100.3) - im
     Dunkelmodus wird jetzt das BILD getauscht (Block "LOGO IM DUNKELMODUS"
     am Dateiende). Ein weisses Rechteck in einer dunklen Oberflaeche war
     lesbar, aber sichtbar eine Notloesung. */
    /* DIE FLAECHENFARBE MUSS DEM DUNKELMODUS FOLGEN (Fund 03.08.2026).
       `html[data-flaeche="stein"]` & Co. setzen `--shell-bg` auf einen festen
       HELLEN Wert - ohne Ruecksicht auf den Dunkelmodus. Fuer die AUSDRUECKLICHE
       Wahl gab es das schon (`html[data-theme="dark"]{--shell-bg:...!important}`),
       fuer den AUTOMATISCHEN Dunkelmodus nicht. Wer also eine Flaeche gewaehlt
       hatte und dessen Telefon nachts umschaltet, bekam eine helle Grundflaeche
       unter dunklen Karten - und seit v2.100.3 waere darauf ausserdem das helle
       Logo der Seitenleiste unsichtbar gewesen.
       Das ist kein Zusatz zum Logo-Umbau, sondern ein alter Widerspruch:
       automatisch und ausdruecklich dunkel muessen dasselbe tun. */
    html:not([data-theme="light"])[data-flaeche]{ --shell-bg: var(--paper); }

    html:not([data-theme="light"]) {
      --paper: #121620; 
      --card: #1B2230; 
      --ink: #F1F2F6; 
      --muted: #A0ABC0; 
      --line: #2D3748;
      --brand-soft: #1A2754;
      --ok-soft: #133A24;
      --bad-soft: #4D1F1C;
      --amber-soft: #3A2E14; --amber-line: #5A4A1E;
      --shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    /* Beyaz olarak sabitlenmiş arkaplanları karanlık moda uyarlama */
    html:not([data-theme="light"]) input[type=text], html:not([data-theme="light"]) input[type=number],
    html:not([data-theme="light"]) input[type=password], html:not([data-theme="light"]) textarea,
    html:not([data-theme="light"]) select,
    html:not([data-theme="light"]) .seg button, html:not([data-theme="light"]) .opt,
    html:not([data-theme="light"]) .qr-box img {
      background: var(--card);
      color: var(--ink);
    }
    
    html:not([data-theme="light"]) .drop {
      background: var(--paper);
    }
    
    html:not([data-theme="light"]) .opt .k {
      background: var(--paper);
    }
    /* Fokus-Fix (Auto-Dark): kein weißer Hintergrund/unsichtbarer Rahmen beim Antippen. */
    html:not([data-theme="light"]) input[type=text]:focus, html:not([data-theme="light"]) input[type=number]:focus,
    html:not([data-theme="light"]) input[type=password]:focus, html:not([data-theme="light"]) textarea:focus,
    html:not([data-theme="light"]) select:focus {
      background: var(--card); color: var(--ink);
      border-color: var(--brand);
      box-shadow: 0 0 0 2px rgba(46,91,255,0.35);
    }
    html:not([data-theme="light"]) input::placeholder, html:not([data-theme="light"]) textarea::placeholder { color: var(--muted); }
    html:not([data-theme="light"]) input:-webkit-autofill, html:not([data-theme="light"]) textarea:-webkit-autofill {
      -webkit-text-fill-color: var(--ink);
      -webkit-box-shadow: 0 0 0 1000px var(--card) inset;
      caret-color: var(--ink);
    }
  }

  /* Manuell erzwungener Dark Mode (Profil-Einstellung), unabhängig vom Gerät */
  html[data-theme="dark"] {
    --paper: #121620;
    --card: #1B2230;
    --ink: #F1F2F6;
    --muted: #A0ABC0;
    --line: #2D3748;
    --brand-soft: #1A2754;
    --ok-soft: #133A24;
    --bad-soft: #4D1F1C;
    --amber-soft: #3A2E14; --amber-line: #5A4A1E;
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  html[data-theme="dark"] input[type=text], html[data-theme="dark"] input[type=number],
  html[data-theme="dark"] input[type=password], html[data-theme="dark"] textarea,
  html[data-theme="dark"] select, html[data-theme="dark"] .seg button,
  html[data-theme="dark"] .opt, html[data-theme="dark"] .qr-box img {
    background: var(--card); color: var(--ink);
  }
  html[data-theme="dark"] .drop, html[data-theme="dark"] .opt .k { background: var(--paper); }
  html[data-theme="dark"] .mini-btn { background: var(--card); }
  /* Fokus-Fix (Dark): kein weißer Hintergrund/unsichtbarer Rahmen beim Antippen.
     Hintergrund bleibt dunkel, Rahmen wird klar sichtbar, Text bleibt hell. */
  html[data-theme="dark"] input[type=text]:focus, html[data-theme="dark"] input[type=number]:focus,
  html[data-theme="dark"] input[type=password]:focus, html[data-theme="dark"] textarea:focus,
  html[data-theme="dark"] select:focus {
    background: var(--card); color: var(--ink);
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(46,91,255,0.35);
  }
  html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: var(--muted); }
  html[data-theme="dark"] input:-webkit-autofill, html[data-theme="dark"] textarea:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--card) inset;
    caret-color: var(--ink);
  }
  /* EKLENEN YENİ KODLAR BURADA BİTİYOR */

  /* ===== GECE MODU DÜZELTMELERİ: sabit #fff/açık renkler dark'a uyarlanır =====
     Hem otomatik (prefers-color-scheme) hem manuel (data-theme=dark) için. */
  html[data-theme="dark"] .btn.ghost,
  html[data-theme="dark"] .seg button,
  html[data-theme="dark"] .opt,
  html[data-theme="dark"] .qr-box,
  html[data-theme="dark"] .qr-box img,
  html[data-theme="dark"] .modal-card,
  html[data-theme="dark"] .mini-btn,
  html[data-theme="dark"] .iconbtn-square,
  html[data-theme="dark"] .icon-act,
  html[data-theme="dark"] .kebab-btn,
  html[data-theme="dark"] .card,
  html[data-theme="dark"] .nav button,
  html[data-theme="dark"] .main-nav button.on,
  html[data-theme="dark"] .nav-dd > button.on{
    background: var(--card) !important;
    color: var(--ink);
    border-color: var(--line);
  }
  html[data-theme="dark"] .btn.ghost{ color: var(--brand); }
  html[data-theme="dark"] .mini-btn,
  html[data-theme="dark"] .iconbtn-square{ color: var(--brand); }
  html[data-theme="dark"] .icon-act,
  html[data-theme="dark"] .kebab-btn,
  html[data-theme="dark"] .seg button{ color: var(--muted); }
  html[data-theme="dark"] .main-nav{ background: #0E1220; }
  html[data-theme="dark"] .main-nav button.on{ box-shadow: 0 1px 4px rgba(0,0,0,.4); }
  html[data-theme="dark"] .main-nav button{ color: var(--muted); }
  html[data-theme="dark"] .tb-close{ background: var(--card); color: var(--ink); }
  html[data-theme="dark"] .nav button{ border-color: var(--line); }
  html[data-theme="dark"] .iconbtn-square:hover,
  html[data-theme="dark"] .icon-act:hover,
  html[data-theme="dark"] .mini-btn:hover,
  html[data-theme="dark"] .kebab-btn:hover{ background: rgba(255,255,255,.06); }

  @media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .btn.ghost,
    html:not([data-theme="light"]) .seg button,
    html:not([data-theme="light"]) .opt,
    html:not([data-theme="light"]) .qr-box,
    html:not([data-theme="light"]) .qr-box img,
    html:not([data-theme="light"]) .modal-card,
    html:not([data-theme="light"]) .mini-btn,
    html:not([data-theme="light"]) .iconbtn-square,
    html:not([data-theme="light"]) .icon-act,
    html:not([data-theme="light"]) .kebab-btn,
    html:not([data-theme="light"]) .card,
    html:not([data-theme="light"]) .nav button,
    html:not([data-theme="light"]) .main-nav button.on,
    html:not([data-theme="light"]) .nav-dd > button.on{
      background: var(--card) !important;
      color: var(--ink);
      border-color: var(--line);
    }
    html:not([data-theme="light"]) .btn.ghost{ color: var(--brand); }
    html:not([data-theme="light"]) .mini-btn,
    html:not([data-theme="light"]) .iconbtn-square{ color: var(--brand); }
    html:not([data-theme="light"]) .icon-act,
    html:not([data-theme="light"]) .kebab-btn,
    html:not([data-theme="light"]) .seg button{ color: var(--muted); }
    html:not([data-theme="light"]) .main-nav{ background: #0E1220; }
    html:not([data-theme="light"]) .main-nav button.on{ box-shadow: 0 1px 4px rgba(0,0,0,.4); }
    html:not([data-theme="light"]) .main-nav button{ color: var(--muted); }
    html:not([data-theme="light"]) .tb-close{ background: var(--card); color: var(--ink); }
    html:not([data-theme="light"]) .nav button{ border-color: var(--line); }
    html:not([data-theme="light"]) .iconbtn-square:hover,
    html:not([data-theme="light"]) .icon-act:hover,
    html:not([data-theme="light"]) .mini-btn:hover,
    html:not([data-theme="light"]) .kebab-btn:hover{ background: rgba(255,255,255,.06); }
  }

  .authbar{display:flex;justify-content:center;align-items:center;gap:16px;font-size:13.5px;font-weight:600;margin:-6px 0 16px;flex-wrap:wrap;}
  /* Login: Passwort-Auge, Angemeldet bleiben, Passwort vergessen */
  .pw-wrap{position:relative;display:flex;align-items:center;}
  .pw-wrap input{flex:1;padding-right:46px;}
  .pw-eye{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:var(--muted);padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;}
  .pw-eye:hover{color:var(--ink);background:rgba(127,127,127,0.10);}
  .pw-eye svg{width:20px;height:20px;}
  .auth-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-2px 0 16px;flex-wrap:wrap;}
  .remember-me{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13.5px;color:var(--ink);font-weight:600;user-select:none;}
  .remember-me input{width:17px;height:17px;cursor:pointer;accent-color:var(--brand);margin:0;}
  .forgot-link{font-size:13.5px;color:var(--brand);font-weight:600;cursor:pointer;text-decoration:none;}
  .forgot-link:hover{text-decoration:underline;}
  /* SSO Buttons */
  .sso-divider{display:flex;align-items:center;gap:12px;margin:18px 0 14px;color:var(--muted);font-size:12.5px;}
  .sso-divider::before,.sso-divider::after{content:"";flex:1;height:1px;background:var(--line);}
  /* --- Login im WebUntis-Stil: linke Info-Spalte (grau) + weiße Login-Spalte --- */
  body[data-screen="auth"] .topbar{display:none !important;}
  body[data-screen="auth"] .app-topbar{display:none !important;}
  body[data-screen="auth"] .wrap{max-width:none;padding:0;}
  body[data-screen="auth"]{background:#fff;}
  body[data-screen="auth"] #feedback-fab{display:none !important;}
  .auth-shell{display:flex;min-height:100dvh;}
  .auth-side{flex:1 1 auto;min-width:0;background:linear-gradient(168deg,#F1F3F8 0%,#E7EAF2 60%,#E2E6F0 100%);padding:clamp(24px,4.5vh,56px) clamp(20px,3.5vw,46px) clamp(20px,4vh,46px);display:none;flex-direction:column;align-items:center;position:relative;overflow:hidden;}
  @media(min-width:880px){ .auth-side{display:flex;} }
  .auth-side-date{align-self:flex-start;font-size:13.5px;color:var(--muted);font-weight:700;letter-spacing:.01em;position:relative;z-index:1;}
  .auth-fact{margin:auto 0;max-width:min(360px,92%);width:100%;position:relative;z-index:1;}
  /* Kreide-Doodles: Formeln, Fachbegriffe & Skizzen erscheinen weich, werden
     "geschrieben" und verblassen wieder – JS-gesteuert, rein GPU-Animation. */
  .auth-chalk{position:absolute;inset:0;pointer-events:none;z-index:0;font-family:"Chalkboard SE","Comic Sans MS","Segoe Print",cursive;color:#3D4668;}
  .auth-chalk span,.auth-chalk div{position:absolute;white-space:nowrap;opacity:0;transform:translateY(10px) rotate(var(--rot,0deg));transition:opacity 1.8s ease,transform 1.8s ease;will-change:opacity,transform;}
  .auth-chalk .on{opacity:var(--o,.12);transform:translateY(0) rotate(var(--rot,0deg));}
  .auth-chalk svg{display:block;width:100%;height:auto;}
  @media (prefers-reduced-motion: reduce){ .auth-chalk span,.auth-chalk div{transition:opacity .4s ease;transform:none;} }
  .af-card{background:#fff;border-radius:18px;padding:22px 22px 20px;box-shadow:0 10px 34px rgba(30,41,80,.09);position:relative;}
  .af-h{font-size:15px;font-weight:800;color:var(--ink);margin-bottom:14px;}
  .auth-fact-problem{font-size:13px;color:var(--ink);line-height:1.55;font-weight:650;}
  .auth-fact-solution{margin-top:10px;font-size:12.5px;color:var(--muted);line-height:1.55;border-left:3px solid var(--brand);padding-left:12px;border-radius:0;}
  /* A: Chat-Stil */
  .af-row{display:flex;gap:8px;align-items:flex-end;margin-bottom:10px;}
  .af-row.r{justify-content:flex-end;}
  .af-ava{width:30px;height:30px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-size:16px;background:#F1F3F8;}
  .af-bub{padding:9px 12px;font-size:12.5px;line-height:1.5;max-width:82%;}
  .af-bub-l{background:#F1F3F8;border-radius:14px 14px 14px 4px;color:var(--ink);}
  .af-bub-r{background:var(--brand,#2E5BFF);border-radius:14px 14px 4px 14px;color:#fff;}
  .af-pill{display:inline-block;background:#fff;border:1.5px dashed var(--brand,#2E5BFF);border-radius:999px;padding:7px 14px;font-size:11.5px;font-weight:600;color:var(--brand,#2E5BFF);line-height:1.4;}
  /* B: Sticker + Chips */
  .af-sticker{position:absolute;top:-16px;left:18px;width:38px;height:38px;border-radius:12px;background:#FAC775;display:flex;align-items:center;justify-content:center;font-size:20px;transform:rotate(-6deg);box-shadow:0 4px 10px rgba(30,41,80,.12);}
  .af-chip{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.05em;border-radius:999px;padding:2px 9px;}
  .af-sec{margin-bottom:10px;}
  .af-sec div{font-size:12.5px;line-height:1.5;margin-top:5px;}
  /* C: Zettel + Post-it */
  .af-paper{transform:rotate(-1deg);border-radius:4px;border:1px solid #E3E5ED;}
  .af-tape{position:absolute;top:-9px;left:50%;transform:translateX(-50%) rotate(2deg);width:76px;height:18px;background:#CECBF6;opacity:.75;}
  .af-postit{background:#FAEEDA;padding:10px 12px;margin:14px -2px 0 10px;transform:rotate(1.5deg);font-size:11.5px;line-height:1.5;color:#633806;font-weight:600;}
  /* D: Emoji groß + Konfetti */
  .af-dot{position:absolute;border-radius:50%;}
  .af-bige{font-size:34px;line-height:1;margin-bottom:10px;}
  .af-sol{font-size:12.5px;line-height:1.55;color:#0F6E56;background:#E1F5EE;border-radius:8px;padding:9px 11px;margin:10px 0;}
  .af-tip{font-size:12px;color:var(--brand,#2E5BFF);font-weight:700;line-height:1.5;}
  .auth-main{flex:0 0 auto;width:480px;max-width:100%;margin:0 auto;background:#fff;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:44px 20px 76px;box-sizing:border-box;}
  .auth-box{width:100%;max-width:320px;}
  .auth-brand-logo{display:block;margin:0 auto;height:150px;width:auto;}
  .auth-mode{display:flex;justify-content:center;gap:26px;margin:26px 0 26px;}
  /* Weiche Übergänge beim Tab-Wechsel: Felder klappen sanft auf/zu statt hart umzuspringen. */
  .auth-box #auth-name-field,.auth-box #auth-invite-field,.auth-box #auth-consent-field,.auth-box #auth-login-extras{
    overflow:hidden;max-height:230px;opacity:1;transition:max-height .3s ease,opacity .22s ease,margin .3s ease;}
  .auth-box #auth-consent-field{max-height:300px;}
  .auth-box #auth-name-field.hidden,.auth-box #auth-invite-field.hidden,.auth-box #auth-consent-field.hidden,.auth-box #auth-login-extras.hidden{
    display:block !important;max-height:0;opacity:0;margin:0;pointer-events:none;}
  .auth-mode-btn{border:0;background:none;cursor:pointer;font-family:inherit;font-size:21px;font-weight:800;letter-spacing:-.01em;color:var(--muted);opacity:.4;padding:2px 4px;transition:opacity .15s,color .15s,text-shadow .15s;}
  .auth-mode-btn.active{color:var(--ink);opacity:1;text-shadow:0 0 14px rgba(46,91,255,.55),0 0 34px rgba(46,91,255,.28);}
  .auth-box .field{margin-bottom:12px;}
  .auth-box .field input[type="text"],.auth-box .field input[type="password"],.auth-box .field input[type="email"]{
    width:100%;background:#F4F5F8;border:1.5px solid transparent;border-radius:10px;padding:15px 14px;font:inherit;font-size:15px;color:var(--ink);box-sizing:border-box;}
  .auth-box .field input:focus{outline:none;border-color:var(--brand);background:#fff;}
  .auth-box .field input::placeholder{color:#8A90A0;font-weight:600;}
  #auth-submit:disabled{opacity:.45;cursor:default;pointer-events:none;}
  .auth-forgot-row{text-align:center;margin-top:14px;}
  .sso-row{display:flex;justify-content:center;align-items:center;gap:28px;}
  .sso-logo{border:0;background:none;cursor:pointer;padding:6px;display:inline-flex;align-items:center;justify-content:center;transition:transform .12s;}
  .sso-logo:hover{transform:scale(1.12);}
  .sso-logo img,.sso-logo svg{height:34px;width:auto;object-fit:contain;}
  #sso-google svg{height:28px;width:28px;}
  #sso-iserv img{height:38px;}
  #sso-moodle img{height:34px;}
  .auth-footer{position:absolute;bottom:0;left:0;right:0;padding:16px 8px;font-size:12px;color:var(--muted);text-align:center;}
  .auth-footer a{color:var(--muted);text-decoration:none;margin:0 8px;}
  .auth-footer a:hover{color:var(--ink);text-decoration:underline;}
  .sso-btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);border-radius:12px;font-family:inherit;font-weight:700;font-size:14.5px;cursor:pointer;margin-bottom:10px;transition:background .12s,border-color .12s;}
  .sso-btn:hover{background:rgba(127,127,127,0.05);border-color:rgba(127,127,127,0.3);}
  .sso-btn svg{flex:none;}
  /* ===== ADMINISTRATION: Sekmeli panel ===== */
  /* Admin = Arbeitsbereich des Betreibers: volle Breite (statt 720px),
     eigener schlanker Kopf. Beim Verlassen (data-screen wechselt) ist
     automatisch wieder alles normal. */
  body[data-screen="admin"] .topbar{display:none;}
  body[data-screen="admin"] .wrap{max-width:1560px;}
  .adm-header{position:relative;display:flex;align-items:center;justify-content:center;gap:14px;margin:4px 0 2px;min-height:34px;}
  .adm-header h1{font-size:23px;font-weight:850;margin:0;letter-spacing:.01em;color:var(--ink);text-align:center;}
  .adm-title span{display:inline-block;}
  .adm-header .back-link{margin:0;position:absolute;left:0;top:50%;transform:translateY(-50%);}
  .adm-tabs{display:flex;gap:2px;background:var(--paper);border:1px solid var(--line);border-radius:13px;padding:4px;margin:14px 0 18px;width:100%;}
  .adm-tab{flex:1 1 0;min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:none;background:none;cursor:pointer;font-family:inherit;font-weight:700;font-size:10px;color:var(--muted);padding:8px 2px;border-radius:10px;transition:background .12s,color .12s;overflow:hidden;}
  .adm-tab span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .adm-tab svg{width:18px;height:18px;flex:none;}
  .adm-tab svg{width:20px;height:20px;}
  .adm-tab:hover{color:var(--ink);}
  .adm-tab.active{background:var(--card);color:var(--brand);box-shadow:0 1px 4px rgba(27,34,48,.10);}
  .adm-tab-badge{position:absolute;top:3px;right:50%;transform:translateX(18px);background:var(--brand);color:#fff;font-size:10px;font-weight:800;min-width:16px;height:16px;line-height:16px;text-align:center;border-radius:8px;padding:0 4px;}
  .adm-tab-badge.red{background:var(--bad);}
  .adm-pane{}
  /* Übersichts-Dashboard: Kachel-Raster */
  /* ===== Admin: linke Seitennavigation (statt Tabs oben) ===== */
  .adm-layout{display:flex;gap:20px;align-items:flex-start;margin-top:14px;}
  /* Linke Navigation im Stil der App-Navigationsleiste (main-nav): weiche Pillen,
     aktiver Eintrag als weiße Pille mit Schatten. */
  .adm-side{flex:none;width:216px;position:sticky;top:14px;display:flex;flex-direction:column;gap:4px;
    background:#EEF1F6;border-radius:14px;padding:6px;}
  html[data-theme="dark"] .adm-side{background:rgba(127,127,127,.12);}
  @media (prefers-color-scheme: dark){ html:not([data-theme="light"]) .adm-side{background:rgba(127,127,127,.12);} }
  .adm-side .adm-group{display:none;}
  .adm-side .adm-tab{flex:none;width:100%;flex-direction:row;justify-content:flex-start;gap:11px;
    font-size:13.5px;font-weight:700;padding:11px 12px;text-align:left;border-radius:10px;color:var(--muted);
    transition:background .14s,color .14s,box-shadow .14s;}
  .adm-side .adm-tab span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .adm-side .adm-tab svg{width:18px;height:18px;}
  .adm-side .adm-tab:hover:not(.active){color:var(--ink);}
  .adm-side .adm-tab.active{background:#fff;color:var(--ink);box-shadow:0 1px 4px rgba(27,34,48,.10);}
  html[data-theme="dark"] .adm-side .adm-tab.active{background:#283042;color:var(--ink);}
  @media (prefers-color-scheme: dark){ html:not([data-theme="light"]) .adm-side .adm-tab.active{background:#283042;color:var(--ink);} }
  .adm-side .adm-tab-badge{position:static;transform:none;margin-left:auto;}
  /* Rechte Fläche: feste Höhe -> Navigation und weißes Blatt bleiben stehen,
     NUR der Inhalt rechts scrollt in sich. Kein Springen mehr beim Blättern. */
  .adm-main{flex:1;min-width:0;min-height:0;}
  @media (min-width:761px){
    /* Das weiße Blatt hat eine FESTE Höhe (ganzer Bildschirm minus Rand) und
       ändert sich nie – egal welches Menü. Kein Seiten-Scrollbalken. Kopf und
       Navigation bleiben stehen; NUR die rechte Fläche scrollt in sich. */
    body[data-screen="admin"]{overflow:hidden;}
    /* Diese beiden Regeln gelten nur noch im Vollbild-Fallback OHNE
       Seitenleiste. In der App-Shell (Faz 7) bestimmt die generische
       Shell-Regel Breite und Hoehe - sonst kaempfen zwei feste Hoehen
       gegeneinander und das Panel ragt unten aus dem Bild. */
    body[data-screen="admin"]:not(.has-sidebar) .wrap{max-width:1560px;padding-top:20px;padding-bottom:20px;}
    body:not(.has-sidebar) #screen-admin > .card{height:calc(var(--vh100) - 40px);margin:0;display:flex;flex-direction:column;overflow:hidden;}
    #screen-admin > .card > .adm-header{flex:none;}
    .adm-layout{flex:1;min-height:0;overflow:hidden;margin-top:14px;}
    .adm-side{position:static;top:auto;align-self:flex-start;}
    .adm-main{height:100%;overflow-y:auto;padding-right:6px;}
    .adm-main::-webkit-scrollbar{width:5px;}
    .adm-main::-webkit-scrollbar-thumb{background:rgba(127,127,127,.22);border-radius:8px;}
    .adm-main::-webkit-scrollbar-track{background:transparent;}

    /* ===== ADMIN IN DER APP-SHELL (Faz 7, 2026-07-20) ====================
       Regel wie ueberall (ARCHITEKTUR.md): Kopfzeile oben fest (links Titel,
       rechts Profil - die gemeinsame .app-topbar), darunter das Panel exakt
       so hoch wie die Seitenleiste, gescrollt wird NUR innen.
       Der eigene Admin-Kopf (Zurueck-Link + regenbogenfarbener Titel) faellt
       damit weg: der Titel steht jetzt in der Kopfzeile (PAGE_TITLES.admin),
       zurueck fuehrt die normale Navigation. (Das Ausblenden des eigenen
       Kopfes steht bewusst AUSSERHALB dieser Media Query - auch mobil traegt
       die gemeinsame Kopfzeile den Titel.) */
    body.has-sidebar[data-screen="admin"] #screen-admin > .card{
      height:100%; margin:0; display:flex; flex-direction:column; overflow:hidden;
    }
    body.has-sidebar[data-screen="admin"] .adm-layout{margin-top:0;}
  }

  /* Eigener Admin-Kopf (Zurueck + Regenbogen-Titel) entfaellt in der Shell -
     der Titel steht in der gemeinsamen Kopfzeile (PAGE_TITLES.admin). */
  body.has-sidebar[data-screen="admin"] .adm-header{display:none;}

  /* Die Section selbst darf NICHT mitscrollen (sonst zwei Scrollbalken):
     die generische Shell-Regel macht sie scrollbar - hier zuruecknehmen,
     weil INNEN schon .adm-main scrollt. Gilt fuer beide Seiten. */
  body.has-sidebar[data-screen="admin"] .wrap > #screen-admin,
  body.has-sidebar[data-screen="konto"] .wrap > #screen-konto{
    overflow:hidden; display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="konto"] #screen-konto > .card{
    flex:1 1 auto; min-height:0; display:flex; flex-direction:column; margin:0;
  }
  /* Einstellungen: die Inhaltsflaeche scrollt, der Kopf bleibt stehen. */
  body.has-sidebar[data-screen="konto"] #konto-head{flex:none;}
  body.has-sidebar[data-screen="konto"] #konto-content{
    flex:1 1 auto; min-height:0; overflow-y:auto; scrollbar-width:none;
  }
  body.has-sidebar[data-screen="konto"] #konto-content::-webkit-scrollbar{display:none;}
  /* ADMIN MOBIL SCROLL-FIX (2026-07-21, korrigiert): Mobil/Tablet-Hochkant gilt
     die FESTE App-Shell (@media max-width:899.98px, Zeile ~4481): .wrap hat
     feste Hoehe + overflow:hidden, und die generische Regel macht die aktive
     section zum Innen-Scroll (overflow-y:auto). NUR fuer Admin gewann aber die
     globale Regel #screen-admin{overflow:hidden} (hoehere Spezifitaet durch die
     ID) -> die Section scrollte NICHT, und .adm-main scrollt erst ab 761px ->
     auf dem Handy war NICHTS scrollbar (Inhalt unten abgeschnitten). Loesung:
     die Admin-Section SELBST zum Innen-Scroll machen (wie jede andere App-Seite),
     die Innenstruktur (.card/.adm-layout/.adm-main) natuerlich fliessen lassen.
     Frueherer Versuch "overflow:visible/Body-Scroll" scheiterte, weil .wrap
     (overflow:hidden, feste Hoehe) den ueberlaufenden Inhalt abschnitt. */
  @media (max-width:899.98px){
    body.has-sidebar[data-screen="admin"] .wrap > #screen-admin{
      overflow-y:auto; -webkit-overflow-scrolling:touch;
      flex:1 1 auto; min-height:0; display:block;
      padding-bottom:calc(16px + env(safe-area-inset-bottom, 0px)); }
    body.has-sidebar[data-screen="admin"] #screen-admin > .card{
      height:auto; overflow:visible; display:block; }
    body.has-sidebar[data-screen="admin"] .adm-layout{ height:auto; overflow:visible; }
    body.has-sidebar[data-screen="admin"] .adm-main{ height:auto; overflow:visible; }
  }
  @media (max-width:760px){
    .adm-layout{flex-direction:column;gap:12px;}
    .adm-side{position:static;width:100%;flex-direction:row;flex-wrap:wrap;}
    .adm-side .adm-tab{width:auto;flex:1 1 auto;justify-content:center;}
    .adm-main{min-height:0;}
    /* Mobil-Overflow-Fixes (Bugreport iPhone):
       1) Lehrkraefte-Tabelle ist breiter als der Schirm -> sie scrollt jetzt
          INTERN horizontal statt die ganze Seite aufzuziehen.
       2) Moodle-Tab: lange URLs/Client-IDs sind EIN Wort -> ohne Umbruch
          dehnten sie Karte + Seite. Jetzt duerfen sie ueberall brechen. */
    .adm-main{min-width:0;max-width:100%;}
    .adm-pane{min-width:0;}
    .adm-tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
    .adm-tbl{min-width:560px;}
    #admpane-moodle{overflow-wrap:anywhere;word-break:break-word;}
    #admpane-moodle code{white-space:normal;}
  }
  /* ===== Admin: Inline-Detailansicht (statt Popup) mit Tabs ===== */
  .ad-detail{}
  .ad-dtop{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px;}
  .ad-back{flex:none;display:inline-flex;align-items:center;gap:6px;background:var(--paper);border:1px solid var(--line);
    color:var(--ink);font:inherit;font-weight:700;font-size:13px;padding:8px 13px;border-radius:10px;cursor:pointer;transition:background .14s,border-color .14s;}
  .ad-back:hover{border-color:var(--brand);color:var(--brand);}
  .ad-back svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
  .ad-dhead{display:flex;align-items:center;gap:13px;flex:1;min-width:200px;}
  .ad-davatar{width:46px;height:46px;border-radius:13px;flex:none;display:flex;align-items:center;justify-content:center;
    background:var(--brand);color:#fff;font-weight:800;font-size:19px;overflow:hidden;}
  .ad-davatar svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  .ad-dname{font-weight:800;font-size:18px;color:var(--ink);line-height:1.2;display:flex;align-items:center;flex-wrap:wrap;gap:6px;}
  .ad-dsub{font-size:12.5px;color:var(--muted);margin-top:2px;}
  .ad-dactions{flex:none;display:flex;gap:6px;align-items:center;margin-left:auto;}
  .ad-iaction{display:inline-flex;align-items:center;gap:6px;background:var(--paper);border:1px solid var(--line);
    color:var(--ink);font:inherit;font-weight:700;font-size:12.5px;padding:8px 12px;border-radius:9px;cursor:pointer;transition:background .14s,border-color .14s,color .14s;}
  .ad-iaction svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ad-iaction:hover{border-color:var(--brand);color:var(--brand);}
  .ad-iaction.primary{background:#DBEAFE;border-color:transparent;color:#1E40AF;}
  .ad-iaction.primary:hover{background:#c9ddfb;color:#1E40AF;}
  .ad-iaction.danger{color:var(--bad);}
  .ad-iaction.danger:hover{border-color:var(--bad);color:var(--bad);}
  /* Tab-Leiste innerhalb einer Detailansicht */
  .ad-tabs{display:flex;gap:4px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:16px;}
  .ad-tab{border:none;background:none;font:inherit;font-weight:700;font-size:13px;color:var(--muted);
    padding:9px 14px;border-radius:9px 9px 0 0;cursor:pointer;position:relative;top:1px;
    border-bottom:2px solid transparent;transition:color .14s,border-color .14s;}
  .ad-tab:hover{color:var(--ink);}
  .ad-tab.active{color:var(--brand);border-bottom-color:var(--brand);}
  .ad-tabpanel{display:none;}
  .ad-tabpanel.active{display:block;}
  .ad-svg{width:16px;height:16px;flex:none;}
  /* Profilblock unter der Aktionszeile */
  .ad-profile{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:6px 0 16px;}
  .ad-pava{width:72px;height:72px;border-radius:18px;flex:none;display:flex;align-items:center;justify-content:center;
    background:var(--brand);color:#fff;font-weight:800;font-size:30px;overflow:hidden;}
  .ad-pava img{width:100%;height:100%;object-fit:cover;}
  /* E-Akte: großes Ordner-Icon ohne grauen Hintergrund */
  .ad-pava.ad-pava-icon{background:transparent;color:var(--brand);width:64px;height:64px;}
  .ad-pava.ad-pava-icon svg{width:56px;height:56px;stroke-width:1.5;}
  .ad-pinfo{min-width:0;flex:1;}
  .ad-pname{font-weight:800;font-size:20px;color:var(--ink);line-height:1.15;display:flex;align-items:center;flex-wrap:wrap;gap:7px;}
  .ad-pmeta{font-size:13px;color:var(--muted);margin-top:3px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .ad-school{display:flex;align-items:center;gap:11px;flex:none;background:var(--paper);border:1px solid var(--line);border-radius:13px;padding:10px 14px;min-width:210px;}
  .ad-school-logo{width:38px;height:38px;border-radius:10px;flex:none;display:flex;align-items:center;justify-content:center;background:transparent;color:var(--muted);overflow:hidden;}
  .ad-school-logo img{width:100%;height:100%;object-fit:contain;}
  .ad-school-n{font-weight:800;font-size:14px;color:var(--ink);line-height:1.2;}
  .ad-school-s{font-size:11.5px;color:var(--muted);margin-top:1px;}
  /* Kompaktes Kachel-Raster für die Übersicht (statt langer Liste) */
  .ad-ovgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;}
  @media (max-width:820px){ .ad-ovgrid{grid-template-columns:1fr;} }
  .ad-obox{background:var(--paper);border:1px solid var(--line);border-radius:13px;padding:13px 15px;}
  .ad-obox.span2{grid-column:1 / -1;}
  .ad-obox h5{margin:0 0 9px;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);}
  /* Admin-Freigaben: Zeile mit Schalter */
  .ad-permrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;margin-bottom:7px;background:var(--card);}
  .ad-permrow .ap-l{min-width:0;}
  .ad-permrow .ap-t{font-weight:700;font-size:13.5px;color:var(--ink);}
  .ad-permrow .ap-d{font-size:11.5px;color:var(--muted);margin-top:1px;}
  .ad-permrow.off{opacity:.55;}
  /* Schalter (iOS-Stil) */
  .ad-switch{position:relative;flex:none;width:42px;height:24px;border-radius:99px;background:var(--line);border:none;cursor:pointer;transition:background .16s;padding:0;}
  .ad-switch::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .16s;}
  .ad-switch.on{background:var(--brand);}
  .ad-switch.on::after{transform:translateX(18px);}
  .ad-switch:disabled{cursor:not-allowed;opacity:.5;}
  /* Toolbar: Suche + Filter + Aktion nebeneinander */
  .adm-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:2px;}
  .adm-filter{padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:var(--paper);font:inherit;font-size:13.5px;color:var(--ink);cursor:pointer;min-width:150px;}
  /* Modernes Tabellen-Layout (Lehrkräfte-Liste) */
  .adm-tbl{width:100%;border-collapse:separate;border-spacing:0;font-size:13.5px;}
  .adm-tbl thead th{text-align:left;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);padding:9px 12px;border-bottom:1px solid var(--line);white-space:nowrap;}
  .adm-tbl tbody td{padding:9px 12px;border-bottom:1px solid var(--line);vertical-align:middle;color:var(--ink);}
  .adm-tbl tbody tr{cursor:pointer;transition:background .12s;}
  .adm-tbl tbody tr:hover{background:var(--paper);}
  .adm-tbl tbody tr:last-child td{border-bottom:none;}
  .adm-trow-user{display:flex;align-items:center;gap:11px;min-width:0;}
  .adm-tavatar{position:relative;width:36px;height:36px;border-radius:50%;flex:none;overflow:hidden;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px;color:#fff;background:linear-gradient(135deg,#2E5BFF,#7c5cf6);}
  .adm-tavatar img{width:100%;height:100%;object-fit:cover;}
  .adm-tonline{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;background:#15A05A;border:2px solid var(--card);}
  .adm-tname{font-weight:700;color:var(--ink);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .adm-temail{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .adm-tnum{text-align:right;font-variant-numeric:tabular-nums;}
  .adm-tbl-wrap{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--card);}
  /* E-Akte: Dossier-Bausteine */
  .akte-sec{background:var(--paper);border-radius:13px;padding:12px 14px;margin-top:10px;}
  .akte-sec h4{margin:0 0 8px;font-size:12px;font-weight:800;color:var(--muted);letter-spacing:.04em;text-transform:uppercase;}
  .akte-kv{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:3px 0;}
  .akte-kv span{color:var(--muted);}
  .akte-doc{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:8px 2px;border-bottom:1px solid var(--line);font-size:13px;}
  .akte-doc:last-child{border-bottom:none;}
  .akte-badge{border-radius:6px;padding:1px 7px;font-size:10.5px;font-weight:800;background:var(--brand-soft,#DBEAFE);color:var(--brand-dk,#1E40AF);flex:none;}
  .akte-badge.rot{background:#FEE2E2;color:#B91C1C;}
  .akte-badge.grau{background:var(--line);color:var(--muted);}
  .akte-badge.gruen{background:#DCFCE7;color:#15803D;}
  .adm-ovgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;margin-top:14px;}
  .adm-ovgrid2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px;}
  @media (max-width:820px){ .adm-ovgrid2{grid-template-columns:1fr;} }
  .adm-box{background:var(--paper);border-radius:13px;padding:14px;min-width:0;}
  .adm-box h4{margin:0 0 10px;font-size:12.5px;font-weight:700;color:var(--muted);letter-spacing:.02em;}
  .adm-box-click{cursor:pointer;border:1px solid transparent;transition:border-color .12s,transform .12s;}
  .adm-box-click:hover{border-color:var(--brand);transform:translateY(-1px);}
  .adm-chip-row{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px;}
  .adm-chip{border:1px solid var(--line);background:var(--card);color:var(--muted);border-radius:99px;
    padding:4px 11px;font-family:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:all .12s;}
  .adm-chip.on{background:var(--brand);border-color:var(--brand);color:#fff;}
  .adm-kindbar{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:12.5px;}
  .adm-kindbar .kb-l{width:86px;flex:none;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .adm-kindbar .kb-track{display:block;flex:1;height:8px;background:var(--line);border-radius:5px;overflow:hidden;}
  .adm-kindbar .kb-fill{display:block;height:100%;background:var(--brand);border-radius:5px;}
  .adm-kindbar .kb-n{width:44px;flex:none;text-align:right;font-weight:700;color:var(--muted);font-size:12px;}
  .adm-schooltab{width:100%;border-collapse:collapse;font-size:13px;}
  .adm-schooltab th{text-align:left;font-size:11px;color:var(--muted);font-weight:700;padding:4px 8px;border-bottom:1px solid var(--line);}
  .adm-schooltab td{padding:7px 8px;border-bottom:1px solid var(--line);}
  .adm-schooltab tr:last-child td{border-bottom:none;}
  .adm-schooltab .num{text-align:right;font-weight:700;}
  .adm-online-row{display:flex;align-items:center;gap:8px;padding:5px 0;font-size:13px;border-bottom:1px solid var(--line);}
  .adm-online-row:last-child{border-bottom:none;}
  .adm-online-dot{width:8px;height:8px;border-radius:50%;background:#15A05A;flex:none;animation:tmblink 1.4s infinite;}
  /* Schul-Karten-Raster */
  .sch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;}
  @media (min-width:1200px){ .sch-grid{grid-template-columns:repeat(4,1fr);} }
  .sch-card{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:12px;cursor:pointer;
    display:flex;flex-direction:column;gap:7px;min-width:0;transition:border-color .12s,transform .12s;}
  .sch-card:hover{border-color:var(--brand);transform:translateY(-1px);}
  @keyframes admfade{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:none;}}
  .adm-search{display:flex;align-items:center;gap:9px;background:var(--paper);border:1px solid var(--line);border-radius:11px;padding:0 12px;margin-top:4px;}
  .adm-search svg{width:18px;height:18px;color:var(--muted);flex:none;}
  .adm-search input{flex:1;border:none;background:none;padding:11px 0;font:inherit;color:var(--ink);outline:none;}
  /* Lehrkräfte: kompaktes Karten-Raster (max. 6 pro Zeile) mit Seiten-Navigation
     statt Scroll-im-Scroll. */
  /* Lehrkräfte werden jetzt als Tabelle gezeigt (siehe .adm-tbl). */
  .adm-ucard{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:12px;
    cursor:pointer;min-width:0;display:flex;flex-direction:column;gap:7px;transition:border-color .12s,transform .12s;}
  .adm-ucard:hover{border-color:var(--brand);transform:translateY(-1px);}
  .adm-ucard .uc-top{display:flex;align-items:center;gap:8px;min-width:0;}
  .adm-ucard .uc-ava{width:34px;height:34px;border-radius:10px;flex:none;display:flex;align-items:center;
    justify-content:center;font-weight:800;font-size:15px;color:#fff;background:linear-gradient(135deg,#2E5BFF,#7c5cf6);position:relative;}
  .adm-ucard .uc-online{position:absolute;right:-2px;bottom:-2px;width:10px;height:10px;border-radius:50%;
    background:#15A05A;border:2px solid var(--paper);}
  .adm-ucard .uc-name{font-weight:700;font-size:13px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-width:0;}
  .adm-ucard .uc-school{font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .adm-ucard .uc-badges{display:flex;gap:4px;flex-wrap:wrap;}
  .adm-ucard .uc-badge{font-size:9px;font-weight:800;border-radius:5px;padding:1px 6px;letter-spacing:.02em;}
  .adm-ucard .uc-usage{font-size:10.5px;color:var(--muted);display:flex;gap:7px;flex-wrap:wrap;}
  .adm-ucard .uc-usage b{color:var(--ink);font-weight:800;}
  #admin-users .adm-upage{grid-column:1/-1;}
  /* Segment-Schalter für Feature-Zustand: An / Schule (erben) / Aus */
  .tm-tri{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;flex:none;}
  .tm-tri button{border:none;background:var(--card);color:var(--muted);font-family:inherit;font-size:11px;
    font-weight:700;padding:5px 9px;cursor:pointer;border-right:1px solid var(--line);}
  .tm-tri button:last-child{border-right:none;}
  .tm-tri button.on-an{background:#15A05A;color:#fff;}
  .tm-tri button.on-std{background:var(--brand);color:#fff;}
  .tm-tri button.on-aus{background:#E5484D;color:#fff;}
  /* Aufklappbarer Abschnittskopf (z. B. „Neue Schule anlegen") */
  .adm-collapse-head{display:flex;align-items:center;gap:10px;width:100%;text-align:left;cursor:pointer;
    background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:10px 0 0;
    font-family:inherit;font-size:14px;font-weight:700;color:var(--ink);transition:background .12s,border-color .12s;}
  .adm-collapse-head:hover{border-color:var(--brand);background:var(--card);}
  .adm-collapse-head .acl-plus{width:18px;height:18px;color:var(--brand);flex:none;}
  .adm-collapse-head span{flex:1;}
  .adm-collapse-head .acl-chev{width:18px;height:18px;color:var(--muted);flex:none;transition:transform .18s;}
  .adm-collapse-head[aria-expanded="true"] .acl-chev{transform:rotate(90deg);}
  .adm-collapse-head[aria-expanded="true"] .acl-plus{display:none;}
  .adm-reqbanner{background:linear-gradient(135deg,rgba(46,91,255,.10),rgba(124,92,246,.10));border:1px solid rgba(46,91,255,.25);border-radius:13px;padding:13px 15px;margin-bottom:14px;}
  .adm-reqbanner .rb-title{font-weight:700;font-size:14px;color:var(--ink);display:flex;align-items:center;gap:8px;}
  html[data-theme="dark"] .adm-tab.active{background:#283042;}
  @media (prefers-color-scheme: dark){ html:not([data-theme="light"]) .adm-tab.active{background:#283042;} }
  .adm-acc{border:1px solid var(--line);border-radius:12px;overflow:hidden;}
  .adm-acc-head{width:100%;display:flex;align-items:center;justify-content:space-between;background:var(--card);border:none;padding:13px 15px;cursor:pointer;font-family:inherit;font-weight:700;font-size:14.5px;color:var(--ink);}
  .adm-acc-head:hover{background:rgba(127,127,127,0.04);}
  .adm-acc-arr{width:18px;height:18px;transition:transform .2s;color:var(--muted);}
  .adm-acc-arr.open{transform:rotate(90deg);}
  .adm-acc-body{padding:4px 15px 12px;border-top:1px solid var(--line);}
  /* Lehrkraft-Detail Modal */
  .tm-bg{position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;align-items:flex-start;justify-content:center;z-index:10000;padding:20px;overflow-y:auto;}
  .tm-bg.show{display:flex;}
  .tm-card{background:var(--card);border-radius:18px;width:100%;max-width:440px;padding:22px;box-shadow:0 24px 60px rgba(0,0,0,.32);position:relative;margin:auto;animation:tmpop .18s ease;}
  /* Breites Lehrkraft-Detail: zwei Spalten auf Desktop */
  .tm-card--wide{max-width:940px;}
  .tm-cols{display:grid;grid-template-columns:1fr 1fr;gap:0 30px;align-items:start;}
  @media (max-width:760px){ .tm-cols{grid-template-columns:1fr;} }
  @keyframes tmpop{from{opacity:0;transform:translateY(10px) scale(.98);}to{opacity:1;transform:none;}}
  .tm-loading{text-align:center;color:var(--muted);padding:40px;}
  .tm-close{position:absolute;top:14px;right:14px;background:rgba(127,127,127,0.12);border:none;width:30px;height:30px;border-radius:50%;cursor:pointer;font-size:15px;color:var(--ink);line-height:1;}
  .tm-close:hover{background:rgba(127,127,127,0.22);}
  .tm-head{display:flex;align-items:center;gap:13px;margin-bottom:18px;padding-right:30px;}
  .tm-avatar{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#2E5BFF,#7c5cf6);color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;flex:none;}
  .tm-name{font-size:17px;font-weight:800;color:var(--ink);}
  .tm-email{font-size:12.5px;color:var(--muted);margin-bottom:3px;}
  .tm-online{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:700;color:#15A05A;}
  .tm-dot{width:8px;height:8px;border-radius:50%;background:#15A05A;animation:tmblink 1.4s infinite;}
  @keyframes tmblink{0%,100%{opacity:1;}50%{opacity:.35;}}
  .tm-offline{font-size:11.5px;color:var(--muted);}
  .tm-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:16px;}
  .tm-stat{background:var(--paper);border-radius:11px;padding:11px 8px;text-align:center;}
  .tm-stat-lbl{font-size:10.5px;color:var(--muted);line-height:1.2;margin-bottom:3px;}
  .tm-stat-val{font-size:22px;font-weight:800;color:var(--ink);}
  .tm-section{border-top:1px solid var(--line);padding-top:13px;margin-top:13px;}
  .tm-sec-title{font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:10px;}
  .tm-kv{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:5px 0;font-size:13.5px;color:var(--ink);}
  .tm-kv b{font-weight:700;}
  .tm-muted{font-size:12.5px;color:var(--muted);font-style:italic;margin-top:4px;}
  .tm-fav{margin-top:8px;font-size:13px;color:var(--ink);background:rgba(224,153,46,0.10);padding:8px 11px;border-radius:9px;}
  .tm-chart{display:flex;align-items:flex-end;gap:5px;height:80px;}
  .tm-bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;height:100%;justify-content:flex-end;}
  .tm-bar-wrap{width:100%;height:62px;display:flex;align-items:flex-end;}
  .tm-bar{width:100%;background:linear-gradient(180deg,#2E5BFF,#7c5cf6);border-radius:5px 5px 0 0;min-height:4px;}
  .tm-bar-lbl{font-size:9px;color:var(--muted);}
  .main-nav{display:flex;align-items:center;gap:6px;background:#EEF1F6;border-radius:14px;padding:5px;margin:0 0 20px;overflow:visible;}
  /* Tabs füllen die Leiste gleichmäßig (kein Links-Stau) und schrumpfen gleich mit. */
  .nav-scroll{flex:1;min-width:0;display:flex;gap:4px;padding:1px;}
  .main-nav button{flex:1 1 0;min-width:0;border:none;background:transparent;font-family:inherit;font-weight:700;font-size:12.5px;color:var(--muted);cursor:pointer;padding:10px 8px;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;transition:background .14s,color .14s,box-shadow .14s;}
  .main-nav button.on{background:#fff;color:var(--ink);box-shadow:0 1px 4px rgba(27,34,48,.10);}
  .main-nav button:hover:not(.on){color:var(--ink);}
  .main-nav button span{overflow:hidden;text-overflow:ellipsis;}
  @media(max-width:620px){
    .main-nav{gap:3px;padding:4px;}
    .main-nav button{padding:9px 6px;font-size:11px;gap:5px;border-radius:9px;}
    .main-nav button svg{width:18px;height:18px;}
    .main-nav button.on{box-shadow:0 1px 5px rgba(27,34,48,.14);}
    /* Platz sparen: nur der aktive Tab zeigt Text, der Rest nur Icon */
    .main-nav .nav-scroll button:not(.on) span{display:none;}
  }
  @media(max-width:380px){
    .main-nav .nav-scroll button.on span{font-size:10.5px;}
    .main-nav button{padding:8px 5px;}
  }
  /* Desktop: Tabs nicht mehr über die volle Breite strecken, sondern als
     kompaktes, zentriertes Cluster (Canva/Notion-Stil). Mobil bleibt wie bisher. */
  @media(min-width:900px){
    .main-nav .nav-scroll{justify-content:center;gap:6px;}
    .main-nav .nav-scroll button{flex:0 0 auto;padding:10px 22px;}
    .main-nav .nav-scroll .nav-icon-only{padding:10px 14px;gap:7px;}
  }
  /* Cockpit-Textlabel: nur ab Desktop (≥900px), sonst nur Icon */
  .main-nav .nav-ck-label{display:none;font-family:inherit;font-weight:700;font-size:12.5px;}
  @media(min-width:900px){ .main-nav .nav-ck-label{display:inline;} }
  /* Extra-Tabs (Klassenarbeiten/Kurse/Fächer): standardmäßig aus,
     erst auf breiten Desktops (≥1150px) in der Leiste sichtbar. */
  .main-nav .nav-scroll .nav-extra{display:none;}
  @media(min-width:1150px){
    .main-nav .nav-scroll .nav-extra{display:flex;flex:0 0 auto;padding:10px 18px;}
    /* Doppelung vermeiden: identische Einträge im Werkzeuge-Menü ausblenden */
    .nav-more-menu .nm-extra,.nav-more-menu .nm-extra-div{display:none;}
  }
  .main-nav button svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .main-nav .nav-plus{flex:0 0 auto;width:42px;padding:10px 0;border:none;background:transparent;color:var(--muted);cursor:pointer;border-radius:10px;display:flex;align-items:center;justify-content:center;transition:background .14s,color .14s;}
  .main-nav .nav-plus:hover{background:#fff;color:var(--ink);}
  .main-nav .nav-plus svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* Cockpit: nur Icon (Text gespart), verhält sich wie ein normaler Tab */
  .main-nav .nav-icon-only{flex:0 0 auto;border:none;background:transparent;cursor:pointer;color:var(--muted);
    padding:10px;border-radius:10px;display:flex;align-items:center;justify-content:center;transition:background .14s,color .14s,box-shadow .14s;}
  .main-nav .nav-icon-only:hover:not(.on){color:var(--ink);}
  .main-nav .nav-icon-only.on{background:#fff;color:var(--ink);box-shadow:0 1px 4px rgba(27,34,48,.10);}
  .main-nav .nav-icon-only svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* "Werkzeuge"-Trigger: schlicht wie die anderen Tabs (kein Rahmen, nicht "aktiv") */
  .main-nav .nav-werkzeuge{width:auto;gap:3px;padding:10px;border:none;background:transparent;color:var(--muted);border-radius:10px;}
  .main-nav .nav-werkzeuge:hover{background:#fff;color:var(--ink);}
  .main-nav .nav-werkzeuge svg:first-child{width:19px;height:19px;}
  .main-nav .nav-werkzeuge .nw-caret{width:13px;height:13px;transition:transform .18s;}
  .main-nav .nav-werkzeuge.dd-open{background:#fff;color:var(--ink);}
  .main-nav .nav-werkzeuge.dd-open .nw-caret{transform:rotate(180deg);}
  @media(max-width:560px){
    .main-nav .nav-icon-only{padding:9px;}
    .main-nav .nav-werkzeuge{padding:9px 8px;}
  }
  /* ===== COCKPIT ===== */
  .cockpit-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:18px;}
  @media(max-width:560px){
    .cockpit-actions{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:10px;padding-bottom:6px;
      -ms-overflow-style:none;scrollbar-width:none;scroll-snap-type:x proximity;cursor:grab;}
    .cockpit-actions::-webkit-scrollbar{display:none;}
    .cockpit-actions.dragging-scroll{cursor:grabbing;}
    .cockpit-act{flex:0 0 auto;width:172px;scroll-snap-align:start;}
  }
  .cockpit-act{appearance:none;text-align:left;border:1.5px solid var(--line);background:var(--card);border-radius:16px;
    padding:16px;cursor:pointer;font-family:inherit;display:flex;flex-direction:column;gap:4px;transition:border-color .12s,transform .08s,box-shadow .12s;}
  .cockpit-act:hover{border-color:var(--brand);box-shadow:0 4px 16px rgba(46,91,255,.08);}
  .cockpit-act:active{transform:scale(.985);}
  .cockpit-act .ca-ico{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:6px;}
  .cockpit-act .ca-ico svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .cockpit-act .ca-t{font-weight:800;font-size:15px;color:var(--ink);}
  .cockpit-act .ca-s{font-size:12.5px;color:var(--muted);}
  /* === Werkzeug-Launcher (Variante A) === */
  #cockpit-launcher{margin-bottom:20px;}
  .lx-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:11px;}
  .lx-card{appearance:none;text-align:left;border:1.5px solid var(--line);background:var(--card);border-radius:16px;
    padding:13px;cursor:pointer;font-family:inherit;display:flex;flex-direction:column;gap:3px;min-width:0;
    transition:border-color .12s,transform .08s,box-shadow .14s;}
  .lx-card:hover{border-color:var(--brand);box-shadow:0 6px 18px rgba(46,91,255,.10);transform:translateY(-1px);}
  .lx-card:active{transform:scale(.98);}
  .lx-ico{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;margin-bottom:5px;}
  .lx-ico svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .lx-t{font-weight:800;font-size:14.5px;color:var(--ink);line-height:1.2;
    overflow-wrap:anywhere;word-break:break-word;hyphens:auto;}
  .lx-s{font-size:12px;color:var(--muted);line-height:1.3;}
  .lx-phase-h{font-size:11.5px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;
    margin:16px 0 9px;padding-left:2px;}
  .lx-grid-phase{grid-template-columns:repeat(5,1fr);}
  .lx-toggle{margin-top:11px;width:100%;display:flex;align-items:center;justify-content:center;gap:8px;
    border:1.5px solid var(--line);background:var(--card);border-radius:13px;padding:11px;cursor:pointer;
    font-family:inherit;font-weight:700;font-size:13.5px;color:var(--muted);transition:border-color .12s,color .12s,background .12s;}
  .lx-toggle:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-soft);}
  .lx-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
  .lx-toggle .lx-count{font-size:12px;font-weight:700;color:var(--muted);opacity:.65;}
  /* Mobil: 4 in einer Reihe – kompakt (Icon + kurzes Label). NACH den Basisregeln, damit es greift. */
  @media(max-width:560px){
    .lx-grid{grid-template-columns:repeat(4,1fr);gap:7px;}
    .lx-grid-phase{grid-template-columns:repeat(5,1fr);gap:5px;}
    .lx-card{padding:10px 4px;align-items:center;text-align:center;gap:4px;border-radius:13px;}
    .lx-ico{width:32px;height:32px;margin-bottom:1px;border-radius:9px;}
    .lx-ico svg{width:17px;height:17px;}
    /* Voller Name, bricht bei Bedarf auf 2 Zeilen um – kein Abschneiden */
    .lx-t{font-size:10px;line-height:1.1;text-align:center;width:100%;}
    .lx-s{display:none;}
    .lx-toggle{padding:10px;font-size:12.5px;border-radius:12px;}
    .lx-grid-phase .lx-ico{width:28px;height:28px;}
    .lx-grid-phase .lx-ico svg{width:15px;height:15px;}
    .lx-grid-phase .lx-t{font-size:9px;}
  }
  @media(max-width:380px){
    .lx-grid{gap:5px;}
    .lx-card{padding:9px 3px;}
    .lx-ico{width:30px;height:30px;}
    .lx-ico svg{width:16px;height:16px;}
    .lx-t{font-size:9.5px;}
    .lx-grid-phase .lx-t{font-size:8.5px;}
  }
  .cockpit-status{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px;padding:13px 15px;
    border:1.5px solid var(--line);border-radius:14px;background:linear-gradient(180deg,var(--brand-soft),var(--card));}
  .cockpit-status .cs-usage{flex:1;min-width:180px;display:flex;flex-direction:column;gap:6px;}
  .cockpit-status .cs-usage-h{font-size:11.5px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:1px;}
  .cockpit-status .cs-row{display:flex;align-items:center;gap:10px;}
  .cockpit-status .cs-row-l{flex:none;width:84px;font-size:12.5px;font-weight:700;color:var(--ink);}
  .cockpit-status .cs-row-bar{flex:1;min-width:50px;}
  .cockpit-status .cs-row-r{flex:none;font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap;min-width:48px;text-align:right;}
  .cockpit-status .cs-row-r b{color:var(--ink);}
  .cockpit-status .cs-inf{font-size:15px;font-weight:800;color:var(--ok,#15A05A);}
  /* Reflexion: Einstiegsbutton im Ergebnis + Vollbild-Overlay */
  .rfx-entry-btn{display:flex;align-items:center;gap:12px;width:100%;text-align:left;cursor:pointer;font-family:inherit;
    background:linear-gradient(135deg,#6D5BFF,#8B6CFF);color:#fff;border:none;border-radius:16px;padding:15px 18px;
    box-shadow:0 8px 22px rgba(109,91,255,.28);transition:transform .12s,box-shadow .12s;}
  .rfx-entry-btn:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(109,91,255,.34);}
  .rfx-overlay{position:fixed;inset:0;z-index:10050;background:rgba(20,22,35,.55);backdrop-filter:blur(6px);
    display:flex;align-items:center;justify-content:center;padding:18px;animation:rfxFade .2s ease;}
  @keyframes rfxFade{from{opacity:0;}to{opacity:1;}}
  .rfx-card{background:var(--card,#fff);border-radius:26px;max-width:430px;width:100%;padding:28px 24px 22px;
    box-shadow:0 30px 70px rgba(0,0,0,.35);max-height:92vh;overflow-y:auto;animation:rfxPopIn .28s cubic-bezier(.2,.9,.3,1.2);text-align:center;}
  @keyframes rfxPopIn{from{opacity:0;transform:scale(.9) translateY(14px);}to{opacity:1;transform:none;}}
  .rfx-emoji{font-size:46px;line-height:1;margin-bottom:6px;}
  .rfx-pop{animation:rfxPop .5s cubic-bezier(.2,.9,.3,1.4);}
  @keyframes rfxPop{0%{transform:scale(0);}60%{transform:scale(1.25);}100%{transform:scale(1);}}
  .rfx-title{font-size:23px;font-weight:800;margin:0 0 4px;color:var(--ink,#1B2230);}
  .rfx-sub{font-size:14px;color:var(--muted,#6A7384);margin:0 0 18px;}
  .rfx-q{font-size:14.5px;font-weight:800;color:var(--ink,#1B2230);text-align:left;margin:14px 2px 9px;}
  .rfx-opts{display:flex;gap:9px;}
  .rfx-opt{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;font-family:inherit;
    background:var(--paper,#F5F7FB);border:2px solid transparent;border-radius:16px;padding:13px 6px;
    font-size:12px;font-weight:700;color:var(--ink,#1B2230);transition:transform .1s,border-color .12s,background .12s;}
  .rfx-opt:hover{transform:translateY(-2px);}
  .rfx-opt-emo{font-size:27px;line-height:1;}
  .rfx-opt.sel{border-color:var(--brand,#2E5BFF);background:var(--brand-soft,#EEF1FB);}
  .rfx-textlink{background:none;border:none;color:var(--brand,#2E5BFF);font-family:inherit;font-size:13px;font-weight:700;
    cursor:pointer;margin:18px auto 0;display:block;}
  .rfx-text{width:100%;margin-top:10px;border:1.5px solid var(--line,#E4E7EE);border-radius:12px;padding:11px;
    font-family:inherit;font-size:14px;resize:vertical;min-height:64px;box-sizing:border-box;}
  .rfx-send{width:100%;margin-top:18px;background:var(--brand,#2E5BFF);color:#fff;border:none;border-radius:14px;
    padding:14px;font-family:inherit;font-size:16px;font-weight:800;cursor:pointer;transition:filter .12s;}
  .rfx-send:hover{filter:brightness(1.06);}
  .rfx-skip{width:100%;margin-top:8px;background:none;border:none;color:var(--muted,#6A7384);font-family:inherit;
    font-size:13.5px;font-weight:600;cursor:pointer;padding:8px;}
  .cockpit-status .cs-utext{font-size:13.5px;font-weight:600;color:var(--ink);}
  .cockpit-status .cs-bar{height:7px;border-radius:99px;background:rgba(127,127,127,.16);overflow:hidden;}
  .cockpit-status .cs-bar-fill{height:100%;border-radius:99px;transition:width .3s;}
  .cockpit-status .cs-ubadge{font-weight:800;font-size:13px;padding:2px 10px;border-radius:99px;}
  .cockpit-status .cs-ubadge.ok{background:var(--ok-soft,#E3F7EC);color:var(--ok,#15A05A);}
  .cockpit-status .cs-school{display:inline-flex;align-items:center;gap:7px;font-weight:700;font-size:13px;color:var(--ok,#15A05A);
    background:var(--ok-soft,#E3F7EC);padding:7px 13px;border-radius:99px;white-space:nowrap;}
  .cockpit-status .cs-dot{width:8px;height:8px;border-radius:50%;background:var(--ok,#15A05A);}
  .cockpit-h{font-weight:800;font-size:15px;color:var(--ink);margin:4px 0 10px;}
  /* Genug Innen-/Außenabstand, damit die unteren Kartenränder nie
     abgeschnitten wirken (1.5px-Border + Schatten brauchen Platz). */
  .cockpit-recent{display:flex;gap:11px;overflow-x:auto;align-items:stretch;padding:2px 2px 16px;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none;margin-bottom:30px;}
  .cockpit-recent::-webkit-scrollbar{display:none;}
  .recent-card{appearance:none;flex:0 0 auto;width:186px;text-align:left;border:1.5px solid var(--line);background:var(--card);
    border-radius:13px;padding:12px 13px 11px;cursor:pointer;font-family:inherit;position:relative;overflow:hidden;
    display:flex;flex-direction:column;gap:5px;transition:border-color .12s,transform .08s,box-shadow .12s;}
  .recent-card:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(46,91,255,.08);}
  .recent-card:active{transform:scale(.98);}
  .recent-card .rc-bar{position:absolute;top:0;left:0;right:0;height:4px;}
  .recent-card .rc-fach{align-self:flex-start;font-size:11px;font-weight:800;padding:2px 8px;border-radius:99px;margin-top:4px;}
  .recent-card .rc-title{font-weight:700;font-size:14px;color:var(--ink);line-height:1.25;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .recent-card .rc-meta{font-size:12px;color:var(--muted);margin-top:auto;}
  .cockpit-tipp{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:14px;
    background:var(--amber-soft,#FFF6E6);border:1.5px solid var(--amber-line,#FFE3B0);}
  .cockpit-tipp .ct-ico{flex:none;width:34px;height:34px;border-radius:10px;background:var(--amber,#F5A623);
    display:flex;align-items:center;justify-content:center;}
  .cockpit-tipp .ct-ico svg{width:19px;height:19px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .cockpit-tipp .ct-h{font-weight:800;font-size:13px;color:var(--ink);margin-bottom:2px;}
  .cockpit-tipp .ct-b{font-size:13px;color:var(--ink);opacity:.85;line-height:1.45;}
  /* ===== Cockpit: Unterstützen-Karte (dezent, freundlich, nicht aufdringlich) ===== */
  .ck-support{display:flex;gap:13px;align-items:center;padding:15px 17px;border-radius:14px;
    background:#FFF1F0;border:1.5px solid #FBD5D2;margin:2px 0 4px;}
  .ck-support .cks-ico{flex:none;width:38px;height:38px;border-radius:11px;background:#E0463E;
    display:flex;align-items:center;justify-content:center;}
  .ck-support .cks-ico svg{width:21px;height:21px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ck-support .cks-txt{flex:1;min-width:0;}
  .ck-support .cks-h{font-weight:800;font-size:13.5px;color:var(--ink);margin-bottom:2px;}
  .ck-support .cks-b{font-size:12.5px;color:var(--ink);opacity:.82;line-height:1.45;}
  .ck-support .cks-btn{flex:none;border:none;cursor:pointer;font-family:inherit;font-weight:800;
    font-size:13px;color:#fff;background:#E0463E;border-radius:10px;padding:10px 16px;white-space:nowrap;
    transition:background .14s,transform .06s;}
  .ck-support .cks-btn:hover{background:#C93A32;}
  .ck-support .cks-btn:active{transform:scale(.97);}
  @media(max-width:560px){
    .ck-support{flex-wrap:wrap;}
    .ck-support .cks-btn{width:100%;}
  }
  /* ===== LERNHILFE (Schüler-Chat) ===== */
  .lh-card{display:flex;flex-direction:column;height:calc(var(--vh100) - 150px);min-height:440px;max-height:760px;padding:0;overflow:hidden;max-width:560px;margin:0 auto;width:100%;}
  /* Vollbild-Modus (mobil & Schüler): Karte füllt den sichtbaren Bereich,
     dvh reagiert auf die eingeblendete Tastatur -> Eingabe bleibt sichtbar. */
  body.lh-fullscreen #screen-lernhilfe{position:fixed;left:0;right:0;top:0;z-index:7000;padding:0;margin:0;max-width:none;background:var(--bg,#F4F6FB);display:flex;height:var(--lh-vh,100dvh);}
  body.lh-fullscreen #screen-lernhilfe .lh-card{height:var(--lh-vh,100dvh);max-height:none;min-height:0;width:100%;border-radius:0;border:none;flex:1;}
  body.lh-fullscreen .topbar,body.lh-fullscreen #main-nav,body.lh-fullscreen #feedback-fab{display:none !important;}
  .lh-head{display:flex;align-items:center;gap:11px;padding:14px 16px;background:var(--card);}
  body.lh-fullscreen .lh-head{padding-top:calc(14px + env(safe-area-inset-top));}
  .lh-bot-ava{flex:none;width:42px;height:42px;border-radius:13px;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;}
  .lh-bot-ava svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .lh-bot-name{font-weight:800;font-size:16px;color:var(--ink);}
  .lh-bot-sub{font-size:12px;color:var(--muted);}
  .lh-hist-btn{flex:none;width:38px;height:38px;border-radius:11px;border:1.5px solid var(--line);background:var(--card);color:var(--muted);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:border-color .12s,color .12s;}
  .lh-hist-btn:hover{border-color:var(--brand);color:var(--brand);}
  .lh-hist-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .lh-messages{flex:1;overflow-y:auto;padding:20px 16px 8px;display:flex;flex-direction:column;gap:16px;}
  body.lh-fullscreen .lh-messages{max-width:620px;width:100%;margin:0 auto;padding-left:16px;padding-right:16px;}
  body.lh-fullscreen .lh-inputbar{max-width:620px;width:100%;margin:0 auto;}
  .lh-msg{max-width:82%;padding:10px 14px;border-radius:18px;font-size:14px;line-height:1.55;white-space:pre-wrap;word-wrap:break-word;}
  /* Bot: balonsuz, düz metin (wie ChatGPT/Claude) – kein Hintergrund, kein Rahmen. */
  .lh-msg.bot{align-self:flex-start;max-width:100%;width:100%;background:transparent;color:var(--ink);border:none;padding:2px 2px 6px;border-radius:0;font-size:14.5px;}
  .lh-char-label{font-size:11px;font-weight:800;color:var(--brand);margin-bottom:5px;opacity:.9;}
  /* Schüler: weiche Sprechblase mit gleichmäßig runden Ecken. */
  .lh-msg.me{align-self:flex-end;background:var(--brand);color:#fff;border-radius:20px;}
  .lh-msg.typing{align-self:flex-start;max-width:100%;background:transparent;color:var(--muted);font-style:italic;border:none;padding:2px;}
  .lh-inputbar{display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));align-items:flex-end;background:var(--card);}
  .lh-inwrap{flex:1;display:flex;align-items:flex-end;gap:6px;border:1.5px solid var(--line);border-radius:24px;background:var(--card);padding:5px 6px 5px 8px;transition:border-color .12s,box-shadow .12s;box-shadow:0 1px 2px rgba(0,0,0,.04);}
  .lh-inwrap:focus-within{border-color:var(--ink);box-shadow:0 2px 10px rgba(0,0,0,.06);}
  /* font-size:16px verhindert das automatische Zoomen von iOS Safari beim Fokus. */
  .lh-inputbar textarea{flex:1;border:none;outline:none;resize:none;background:transparent;font:inherit;font-size:16px;line-height:1.4;color:var(--ink);padding:7px 0;max-height:120px;min-height:22px;}
  .lh-cam-btn{flex:none;width:38px;height:38px;border:none;border-radius:50%;background:transparent;color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color .12s,background .12s;}
  .lh-cam-btn:hover{color:var(--brand);background:var(--brand-soft,#EEF1FB);}
  .lh-cam-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .lh-send-btn{flex:none;width:38px;height:38px;border:none;border-radius:50%;background:var(--ink);color:var(--card);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .08s,opacity .12s;}
  .lh-send-btn:hover{opacity:.85;}
  .lh-send-btn:active{transform:scale(.92);}
  .lh-send-btn:disabled{opacity:.4;cursor:default;}
  .lh-send-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .lh-note{text-align:center;font-size:11px;color:var(--muted);padding:0 14px 8px;}
  /* Quiz-Ergebnis: Hilfe-holen-Karte */
  #report-hilfe-card .rh-ico{width:48px;height:48px;border-radius:14px;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;margin:0 auto 10px;}
  .r-acc-toggle{appearance:none;width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--card,#fff);border:1.5px solid var(--line);border-radius:12px;padding:12px 15px;font:inherit;font-size:14.5px;font-weight:700;color:var(--ink);cursor:pointer;margin:4px 0 0;transition:border-color .12s;}
  .r-acc-toggle:hover{border-color:var(--brand);}
  .r-acc-toggle .r-acc-chev{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s;}
  .r-acc-toggle[aria-expanded="true"] .r-acc-chev{transform:rotate(180deg);}
  .ring-pct{fill:var(--ink);}
  #toast-wrap{position:fixed;left:0;right:0;bottom:calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:8px;z-index:99999;pointer-events:none;padding:0 16px;}
  /* RUHIGER, NICHT LAUTER (Wunsch Murat 05.08.2026: „siyah background
     üstünde beyaz yazi … adam gibi minimal bir sekilde yap").
     Ein schwarzer Kasten mit weisser Schrift ist die Optik einer WARNUNG -
     die meisten Meldungen sind aber nur eine Auskunft. Jetzt eine Karte in
     den Farben der App: heller Grund, normale Schrift, feine Linie. Die
     Bedeutungsfarben `ok`/`bad` bleiben unveraendert - dort IST die Farbe
     die Aussage. */
  /* TEXT MITTIG IM KASTEN (Wunsch Murat 05.08.2026). Eine Meldung ist EIN
     Satz, keine Liste - linksbuendig sah sie mit dem Umbruch aus wie ein
     angefangener Absatz. `text-align:center` reicht dafuer nicht allein: der
     Kasten ist ein Flex-Behaelter, deshalb zentriert `justify-content` auch
     die Zeile mitsamt Symbol. */
  .toast{pointer-events:auto;max-width:440px;width:fit-content;background:var(--card);color:var(--ink);font-size:13.5px;font-weight:600;padding:11px 15px;border-radius:12px;border:1px solid var(--line);box-shadow:0 6px 22px rgba(16,24,40,.13);display:flex;align-items:center;justify-content:center;text-align:center;gap:9px;opacity:0;transform:translateY(12px);transition:opacity .22s,transform .22s;}
  .toast.show{opacity:1;transform:translateY(0);}
  /* Jede Meldung laesst sich wegtippen (v2.146.0) – wer gelesen hat, soll
     nicht warten muessen. Der Zeiger sagt das, bevor man es probiert. */
  .toast{cursor:pointer;}
  .toast:hover{transform:translateY(-1px);}
  .toast.ok{background:var(--ok,#15A05A);color:#fff;border-color:transparent;}
  .toast.bad{background:var(--bad,#C0392B);color:#fff;border-color:transparent;}
  .toast svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;}
  .report-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
  .ra-card{appearance:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:20px 12px;border:1.5px solid var(--line);border-radius:16px;background:var(--card);color:var(--ink);font:inherit;font-size:14.5px;font-weight:700;cursor:pointer;transition:border-color .12s,box-shadow .12s,transform .08s;}
  .ra-card:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(46,91,255,.10);}
  .ra-card:active{transform:scale(.97);}
  .ra-card svg{width:26px;height:26px;fill:none;stroke:var(--brand);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* Farbliche Hervorhebung der Aktionen im Lernbericht */
  .ra-card.ra-share{background:#EAF7EF;border-color:#15A05A;color:#0E7C44;}
  .ra-card.ra-share svg{stroke:#15A05A;}
  .ra-card.ra-share:hover{border-color:#0E7C44;box-shadow:0 4px 14px rgba(21,160,90,.16);}
  .ra-card.ra-pdf{background:#EAF0FF;border-color:#2E5BFF;color:#1B3FCC;}
  .ra-card.ra-pdf svg{stroke:#2E5BFF;}
  .ra-card.ra-pdf:hover{border-color:#1B3FCC;box-shadow:0 4px 14px rgba(46,91,255,.16);}
  .ra-card.ra-spiel{background:linear-gradient(135deg,#15A05A,#1EC16E);border-color:#13934F;color:#fff;}
  .ra-card.ra-spiel svg{stroke:#fff;}
  .ra-card.ra-spiel:hover{box-shadow:0 6px 16px rgba(21,160,90,.28);}
  .ring-frac{fill:var(--muted);}
  .ring-track{stroke:var(--line);}
  .r-acc-body{margin-top:12px;}
  .shape-tb{appearance:none;border:1.5px solid var(--line);background:var(--card);color:var(--ink);border-radius:10px;padding:8px 12px;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;transition:all .12s;}
  .shape-tb:hover{border-color:var(--brand);}
  .shape-tb.on{background:var(--brand);color:#fff;border-color:var(--brand);}
  #shape-fields label{font-size:13px;color:var(--muted);display:block;margin-bottom:3px;}
  #shape-fields input[type=number],#shape-fields input[type=text]{width:100%;padding:9px 11px;border:1.5px solid var(--line);border-radius:9px;font:inherit;background:var(--card);color:var(--text);box-sizing:border-box;}
  #report-hilfe-card .rh-ico svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  #report-hilfe-card .rh-head{font-weight:800;font-size:16px;color:var(--ink);margin-bottom:4px;}
  #report-hilfe-card .rh-sub{font-size:13.5px;color:var(--muted);line-height:1.5;margin-bottom:6px;}
  /* ===== LERNHILFE Lehrer-Panel ===== */
  .lhl-wrap{display:grid;grid-template-columns:300px 1fr;gap:14px;margin-top:14px;align-items:start;}
  @media(max-width:680px){ .lhl-wrap{grid-template-columns:1fr;} }
  .lhl-list{display:flex;flex-direction:column;gap:6px;max-height:600px;overflow-y:auto;}
  .lhl-kid{display:flex;align-items:center;gap:10px;text-align:left;border:1.5px solid var(--line);background:var(--card);
    border-radius:12px;padding:10px 12px;cursor:pointer;font-family:inherit;transition:border-color .12s,background .12s;}
  .lhl-kid:hover{border-color:var(--brand);}
  .lhl-kid.active{border-color:var(--brand);background:var(--brand-soft);}
  .lhl-kid-alert{border-color:#E5484D55;background:#FDECEC55;}
  .lhl-kid-alert:hover{border-color:#E5484D;}
  .lhl-alert-dot{margin-left:6px;font-size:12px;}
  .lhl-kid-ava{flex:none;width:36px;height:36px;border-radius:50%;background:var(--brand);color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;}
  .lhl-kid-info{min-width:0;}
  .lhl-kid-name{font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .lhl-kid-kl{font-weight:600;font-size:11px;color:var(--muted);}
  .lhl-kid-sub{font-size:12px;color:var(--muted);}
  .lhl-detail{border:1.5px solid var(--line);border-radius:14px;padding:16px;min-height:240px;max-height:600px;overflow-y:auto;background:var(--card);}
  .lhl-empty{color:var(--muted);font-size:14px;text-align:center;padding:50px 14px;line-height:1.6;}
  .lhl-profil{border:1.5px solid var(--line);border-radius:12px;padding:14px;margin-bottom:16px;background:linear-gradient(180deg,var(--brand-soft),var(--card));}
  .lhl-profil-empty{color:var(--muted);font-size:13px;text-align:center;background:none;}
  .lhl-profil-h{display:flex;align-items:center;gap:7px;font-weight:800;font-size:14px;color:var(--ink);margin-bottom:10px;}
  .lhl-profil-h svg{width:18px;height:18px;fill:var(--amber,#F5A623);stroke:none;}
  .lhl-notiz{font-size:13.5px;color:var(--ink);background:var(--card);border-radius:9px;padding:10px 12px;margin-bottom:12px;line-height:1.5;border:1px solid var(--line);}
  .lhl-prow{display:flex;gap:10px;align-items:flex-start;padding:5px 0;font-size:13px;}
  .lhl-plabel{flex:0 0 120px;color:var(--muted);font-weight:600;}
  .lhl-chip{display:inline-block;background:var(--brand)14;color:var(--brand);font-size:12px;font-weight:700;padding:2px 9px;border-radius:99px;margin:2px 3px 2px 0;}
  .lhl-muted{color:var(--muted);}
  .lhl-disclaimer{font-size:11px;color:var(--muted);margin-top:10px;font-style:italic;}
  .lhl-convo-h{font-weight:800;font-size:13.5px;color:var(--ink);margin-bottom:8px;}
  .lhl-convo{display:flex;flex-direction:column;gap:8px;}
  .lhl-msg{max-width:85%;padding:9px 13px;border-radius:14px;font-size:13.5px;line-height:1.45;white-space:pre-wrap;word-wrap:break-word;}
  .lhl-msg.bot{align-self:flex-start;background:#EEF1F6;color:var(--ink);border-bottom-left-radius:4px;}
  .lhl-msg.me{align-self:flex-end;background:var(--brand);color:#fff;border-bottom-right-radius:4px;}
  .lhl-msg-char{font-size:10.5px;font-weight:800;color:var(--brand);margin-bottom:2px;opacity:.9;}
  /* Lernbot-Verlauf: Auswahl & Löschen */
  .lhl-listbar{display:flex;align-items:center;gap:6px;padding:2px 2px 8px;border-bottom:1px solid var(--line);margin-bottom:4px;}
  .lhl-tbtn{appearance:none;border:1px solid var(--line);background:var(--card);color:var(--ink);font-family:inherit;
    font-size:12px;font-weight:700;padding:5px 10px;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;transition:background .12s,border-color .12s,color .12s;}
  .lhl-tbtn:hover{border-color:var(--brand);color:var(--brand);}
  .lhl-tbtn.danger{color:#B42318;border-color:#E5484D55;}
  .lhl-tbtn.danger:hover{background:#FDECEC;border-color:#E5484D;color:#B42318;}
  .lhl-tbtn:disabled{opacity:.45;cursor:not-allowed;border-color:var(--line);color:var(--muted);background:var(--card);}
  .lhl-check{flex:none;width:20px;height:20px;border-radius:6px;border:2px solid var(--line);background:var(--card);
    display:flex;align-items:center;justify-content:center;transition:background .12s,border-color .12s;}
  .lhl-check.on{background:var(--brand);border-color:var(--brand);}
  .lhl-check svg{width:13px;height:13px;}
  .lhl-kid-sel{border-color:var(--brand);background:var(--brand-soft);}
  .lhl-kid-del{flex:none;width:30px;height:30px;border:none;background:transparent;color:var(--muted);border-radius:8px;
    cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .12s,background .12s,color .12s;}
  .lhl-kid:hover .lhl-kid-del{opacity:1;}
  .lhl-kid-del:hover{background:#FDECEC;color:#B42318;}
  .lhl-kid-del svg{width:16px;height:16px;}
  .lhl-convo-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;flex-wrap:wrap;}
  .lhl-convo-tools{display:flex;gap:6px;align-items:center;}
  .lhl-msgrow{display:flex;align-items:flex-start;gap:8px;}
  .lhl-msgrow.bot{justify-content:flex-start;}
  .lhl-msgrow.me{justify-content:flex-end;}
  .lhl-msgrow .lhl-msg{align-self:auto;}
  .lhl-msgrow.me .lhl-msg-del{order:-1;}
  .lhl-msgrow.selectable{border-radius:12px;padding:4px;margin:-4px;transition:background .12s;}
  .lhl-msgrow.selectable:hover{background:rgba(127,127,127,.06);}
  .lhl-msgrow.sel{background:var(--brand-soft);}
  .lhl-msg-del{flex:none;align-self:center;width:28px;height:28px;border:none;background:transparent;color:var(--muted);
    border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .12s,background .12s,color .12s;}
  .lhl-msgrow:hover .lhl-msg-del{opacity:1;}
  .lhl-msg-del:hover{background:#FDECEC;color:#B42318;}
  .lhl-msg-del svg{width:15px;height:15px;}
  /* Löschkonzept: Countdown + Papierkorb */
  .lhl-retention-note{font-size:11.5px;color:var(--muted);background:var(--paper);border-radius:9px;padding:7px 11px;margin-bottom:10px;line-height:1.45;}

  /* --- Förderempfehlung --- */
  /* Breit wie die Fehlzeitenbriefe (nutzt das ganze Panel). */
  .foerder-card{max-width:none;margin:0 auto;}
  .foerder-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:14px;}
  /* Knopfreihe im Kopf der Werkzeug-Seiten (Foerderempfehlung,
     Fehlzeitenbriefe, Blauer Brief). Bis v2.99.7 stand hier achtmal dasselbe
     `style="display:flex;gap:8px;flex-wrap:wrap;"` inline im JavaScript -
     und Inline schlaegt jedes Stylesheet. Damit war die Reihe von aussen
     nicht mehr zu beeinflussen; genau daran scheiterte der Versuch, sie auf
     dem Telefon in EINER Zeile zu halten. Jetzt EINE Klasse, EINE Stelle. */
  .fo-btnreihe{display:flex;gap:8px;flex-wrap:wrap;}
  /* Zwei Beschriftungen je Knopf, eine sichtbar (Muster wie .dtb-lang).
     GRUNDREGEL: der ausgeschriebene Text. Auf dem Telefon tauscht der
     640px-Block gegen die Kurzform - siehe dort. */
  .fo-lang{display:inline;}
  .fo-kurz{display:none;}
  .foerder-listbtn{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--line);background:#fff;border-radius:10px;padding:8px 13px;font:inherit;font-size:13px;font-weight:600;color:var(--ink);cursor:pointer;flex:none;}
  .foerder-listbtn:hover{border-color:var(--brand);}
  .foerder-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px 14px;margin-bottom:14px;}
  .fo-field{display:flex;flex-direction:column;gap:4px;}
  .fo-lbl{font-size:12px;color:var(--muted);font-weight:600;}
  .fo-in{width:100%;box-sizing:border-box;padding:9px 11px;border:1.5px solid var(--line);border-radius:9px;font:inherit;font-size:14px;background:#fff;color:var(--ink);}
  .fo-in:focus{outline:none;border-color:var(--brand);}
  /* Select soll exakt so hoch sein wie die Text-Inputs (sonst wirkt "Fach" gedrückt). */
  select.fo-in{height:40px;line-height:1.2;-webkit-appearance:none;-moz-appearance:none;appearance:none;
    padding-right:32px;cursor:pointer;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat:no-repeat;background-position:right 10px center;}
  input.fo-in{height:40px;}
  textarea.fo-in{resize:vertical;min-height:44px;}
  /* Kombi-Karte: Kästchen + zugehöriges Feld. Aktiv = hervorgehoben. */
  .fo-pair{display:flex;flex-direction:column;gap:9px;border:1.5px solid var(--line);border-radius:11px;padding:11px 13px;background:var(--card,#fff);transition:border-color .15s,background .15s;}
  .fo-pair.on{border-color:var(--brand);background:var(--brand-soft,#EEF4FF);}
  .fo-pair-head{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;color:var(--ink);cursor:pointer;}
  .fo-pair-head input{width:18px;height:18px;flex:none;cursor:pointer;}
  .fo-pair-in:disabled{background:#F1F3F5;color:#AAB0B6;cursor:not-allowed;border-style:dashed;}
  /* Blauer Brief: Fächer als anklickbare Chips (Mehrfachauswahl). Gleiche
     Farbsprache wie .fo-pair, nur kompakt - es sind bis zu 18 Kästchen. */
  .bb-fach{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--line);
    border-radius:999px;padding:5px 12px 5px 9px;font-size:13px;cursor:pointer;
    background:var(--card,#fff);user-select:none;transition:border-color .15s,background .15s;}
  .bb-fach.on{border-color:var(--brand);background:var(--brand-soft,#EEF4FF);font-weight:600;}
  .bb-fach input{width:15px;height:15px;flex:none;cursor:pointer;margin:0;}
  .bb-fachwrap{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px;}
  .bb-faecher-info{font-size:12.5px;color:var(--ink,#1B2230);margin:0 0 12px;}
  /* Aufklappbarer Abschnitt: eigener Kasten mit Kopfzeile. Das Auf-/Zuklappen
     läuft ohne Neuzeichnen (Übergang auf max-height), damit es weich wirkt
     und der Cursor im Feld bleibt. */
  .bb-box{border:1px solid var(--line);border-radius:12px;background:var(--card,#fff);
    margin:0 0 10px;overflow:hidden;}
  .bb-box-h{display:flex;align-items:center;gap:9px;width:100%;background:var(--paper);
    border:none;border-bottom:1px solid var(--line);padding:10px 13px;font:inherit;
    font-size:13px;font-weight:700;color:var(--ink);cursor:pointer;text-align:left;}
  .bb-box-h>span{flex:none;}
  .bb-box-h>i{flex:1;font-size:12px;font-weight:400;color:var(--muted);font-style:normal;}
  .bb-box-c{flex:none;color:var(--muted);transition:transform .22s ease;}
  .bb-box.zu .bb-box-h{border-bottom-color:transparent;}
  .bb-box.zu .bb-box-c{transform:rotate(-90deg);}
  .bb-box-body{max-height:1600px;opacity:1;overflow:hidden;
    transition:max-height .28s ease, opacity .18s ease;}
  .bb-box.zu .bb-box-body{max-height:0;opacity:0;}
  .bb-box-inner{padding:12px 13px 4px;}
  .bb-box-inner .foerder-grid:last-child{margin-bottom:8px;}
  .bb-hint{font-size:12px;color:var(--muted);line-height:1.5;background:var(--paper);
    border:1px solid var(--line);border-radius:10px;padding:8px 11px;margin:0 0 12px;}
  .bb-lbl-klein{font-weight:400;color:var(--muted);}
  /* Kästchen-Reihe: drei kurze Optionen nebeneinander statt drei leere
     Label-Zeilen im Raster (das riss das Formular unnötig auseinander). */
  .bb-ckrow{display:flex;flex-wrap:wrap;gap:8px 18px;margin:2px 0 12px;}
  .bb-ckrow label{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;cursor:pointer;}
  .bb-ckrow input{width:17px;height:17px;flex:none;cursor:pointer;margin:0;}
  .bb-bem-in{min-height:52px;}
  .bb-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:14px;
    padding-top:12px;border-top:1px solid var(--line);}
  .bb-seiten{font-size:12px;color:var(--muted);margin-left:auto;}
  .bb-seiten.warn{color:#B0533A;font-weight:600;}
  .bb-status{font-size:12.5px;color:#1D9E75;font-weight:600;}
  /* Schnellerfassung: EINE Klasse, viele Briefe. Bewusst breit und quer -
     die Lehrkraft soll alle Kinder gleichzeitig sehen, nicht acht Formulare
     nacheinander. Kopfzeile und Tabellenkopf bleiben stehen, nur die Zeilen
     scrollen. */
  .bb-blitz{color:#B8860B;}
  .bbs-ov{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9800;
    display:flex;align-items:center;justify-content:center;padding:18px;}
  .bbs-box{background:var(--card,#fff);border-radius:16px;width:min(1500px,97vw);
    max-height:92vh;display:flex;flex-direction:column;overflow:hidden;
    box-shadow:0 24px 60px rgba(0,0,0,.35);}
  .bbs-kopf{display:flex;align-items:center;gap:12px;padding:12px 16px;
    border-bottom:1px solid var(--line);background:var(--paper);flex-wrap:wrap;}
  .bbs-titel{display:flex;flex-direction:column;gap:2px;margin-right:auto;}
  .bbs-titel b{font-size:15px;}
  .bbs-titel span{font-size:12px;color:var(--muted);}
  .bbs-klasse{max-width:230px;}
  .bbs-akt{display:flex;align-items:center;gap:8px;}
  .bbs-x{border:none;background:transparent;font-size:18px;line-height:1;cursor:pointer;
    color:var(--muted);padding:6px 8px;}
  .bbs-scroll{overflow:auto;flex:1;}
  .bbs-tab{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;}
  .bbs-tab th{position:sticky;top:0;z-index:2;background:var(--card,#fff);text-align:left;
    font-size:11.5px;font-weight:700;color:var(--muted);padding:8px 6px;
    border-bottom:1px solid var(--line);white-space:nowrap;}
  .bbs-tab td{padding:4px 6px;border-bottom:1px solid var(--line);vertical-align:middle;}
  .bbs-tab tr:hover td{background:rgba(127,127,127,.04);}
  .bbs-nr{color:var(--muted);font-size:11.5px;width:26px;text-align:right;}
  .bbs-in{width:100%;box-sizing:border-box;padding:6px 8px;border:1.5px solid var(--line);
    border-radius:8px;font:inherit;font-size:13px;background:#fff;color:var(--ink);height:34px;}
  .bbs-in:focus{outline:none;border-color:var(--brand);}
  /* "Übernommen" als FARBE statt Text: grüner Balken links an der Zeile.
     Der frühere Zusatztext machte die Tabelle unruhig und breiter. */
  .vws-zeile>td:first-child{border-left:3px solid transparent;}
  .vws-zeile.ok>td:first-child{border-left-color:#1D9E75;}
  .vws-zeile.ok .bbs-nr{color:#1D9E75;font-weight:700;}
  .vws-zeile.laedt>td:first-child{border-left-color:var(--line);}
  .vws-zeile.laedt .bbs-in{opacity:.6;}
  /* Roter Rand = in dieser Zeile fehlt eine Pflichtangabe. Lieber vorher
     sehen als 20 Dokumente mit Leerlinien drucken. */
  .vws-zeile.luecke>td:first-child{border-left-color:#E24B4A;}
  .vws-zeile.luecke .bbs-nr{color:#C0392B;font-weight:700;}
  .vws-luecke{font-size:12px;font-weight:700;color:#C0392B;
    background:#FCEBEB;border-radius:999px;padding:4px 11px;}
  /* Förderung: Fach + Bausteine direkt im Schnellerfassungs-Fenster.
     Eigene Klassen (vws-fo-*), damit sie nicht mit dem Formular dahinter
     kollidieren - dort heißen sie fo-*. */
  .vws-fo{border-bottom:1px solid var(--line);background:var(--paper);padding:10px 16px;}
  .vws-fo-zeile{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
  .vws-fo-lbl{font-size:12px;font-weight:700;color:var(--muted);}
  .vws-fo-ck{display:inline-flex;align-items:center;gap:8px;font-size:13px;cursor:pointer;}
  .vws-fo-ck input{width:17px;height:17px;cursor:pointer;margin:0;}
  .vws-fo-info{font-size:11.5px;color:var(--muted);}
  .vws-fo-hint{font-size:12.5px;color:var(--muted);margin-top:8px;line-height:1.5;}
  .vws-fo-baust{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px;}
  @media(max-width:820px){ .vws-fo-baust{grid-template-columns:1fr;} }
  .vws-fo-acc{border:1px solid var(--line);border-radius:10px;background:var(--card,#fff);overflow:hidden;}
  .vws-fo-acc-h{display:flex;align-items:center;gap:9px;width:100%;border:none;background:transparent;
    padding:8px 11px;font:inherit;font-size:13px;cursor:pointer;text-align:left;color:var(--ink);}
  .vws-fo-acc-h b{flex:none;font-weight:700;}
  .vws-fo-acc-h span{flex:1;color:var(--muted);font-size:12px;}
  .vws-fo-acc-h svg{flex:none;color:var(--muted);transition:transform .2s;}
  .vws-fo-acc.offen .vws-fo-acc-h svg{transform:rotate(180deg);}
  .vws-fo-acc-b{display:none;max-height:190px;overflow:auto;padding:0 8px 8px;}
  .vws-fo-acc.offen .vws-fo-acc-b{display:block;}
  .vws-fo-item{display:flex;align-items:flex-start;gap:8px;padding:5px 6px;border-radius:8px;
    font-size:12.5px;line-height:1.45;cursor:pointer;}
  .vws-fo-item:hover{background:rgba(127,127,127,.06);}
  .vws-fo-item.on{background:var(--brand-soft,#EEF4FF);}
  .vws-fo-item input{width:16px;height:16px;flex:none;margin-top:2px;cursor:pointer;}
  /* "Geht hier nicht"-Fenster statt alert (ein alert sieht aus wie ein Fehler) */
  .vws-sperre{display:flex;flex-direction:column;align-items:center;gap:12px;
    padding:26px 24px 28px;text-align:center;color:var(--ink);}
  .vws-sperre svg{color:var(--muted);}
  .vws-sperre p{margin:0;font-size:14px;line-height:1.6;max-width:460px;color:var(--muted);}
  .bbs-check{display:flex;align-items:center;justify-content:center;height:34px;cursor:pointer;}
  .bbs-check input{width:18px;height:18px;cursor:pointer;margin:0;}
  .bbs-tag{display:inline-block;margin-left:6px;font-size:10.5px;color:#1D9E75;}
  .bbs-weg button{border:none;background:transparent;color:var(--muted);cursor:pointer;padding:4px;}
  .bbs-weg button:hover{color:#C0392B;}
  .bbs-fuss{display:flex;align-items:center;gap:14px;padding:10px 16px;
    border-top:1px solid var(--line);background:var(--paper);flex-wrap:wrap;}
  .bbs-plus{display:inline-flex;align-items:center;gap:6px;border:1.5px dashed var(--line);
    background:#fff;border-radius:9px;padding:7px 13px;font:inherit;font-size:13px;cursor:pointer;}
  .bbs-plus:hover{border-color:var(--brand);color:var(--brand);}
  .bbs-hinweis{font-size:11.5px;color:var(--muted);line-height:1.45;flex:1;min-width:220px;}
  /* Aufbewahrungs-Warnung in "Meine Aufgaben": auffällig, aber nicht
     alarmistisch. Rot erst, wenn es wirklich knapp wird (<= 7 Tage). */
  .vw-ablauf{display:flex;align-items:center;gap:12px;margin:0 0 14px;padding:12px 14px;
    border:1.5px solid #EF9F27;background:#FAEEDA;border-radius:12px;color:#633806;}
  .vw-ablauf.rot{border-color:#E24B4A;background:#FCEBEB;color:#791F1F;}
  .vw-ablauf-ico{flex:none;display:flex;}
  .vw-ablauf-txt{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;font-size:13.5px;}
  .vw-ablauf-txt span{font-size:12px;opacity:.85;}
  .vw-ablauf-btn{flex:none;border:1.5px solid currentColor;background:#fff;color:inherit;
    border-radius:9px;padding:8px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;}
  .vw-ablauf-btn:hover{background:rgba(0,0,0,.04);}
  .vw-abl-modal{max-width:760px;width:100%;}
  .vw-abl-body{padding:16px;overflow-y:auto;max-height:70vh;}
  .vw-abl-info{font-size:13px;color:var(--muted);line-height:1.6;margin:0 0 14px;}
  .vw-abl-grp{border:1px solid var(--line);border-radius:12px;margin-bottom:12px;overflow:hidden;}
  .vw-abl-grp-h{display:flex;align-items:center;gap:10px;padding:10px 13px;background:var(--paper);
    border-bottom:1px solid var(--line);font-size:13.5px;}
  .vw-abl-grp-h span{color:var(--muted);font-size:12.5px;margin-right:auto;}
  .vw-abl-list{list-style:none;margin:0;padding:4px 13px 10px;}
  .vw-abl-list li{display:flex;align-items:center;gap:10px;padding:5px 0;font-size:13px;
    border-bottom:1px solid var(--line);}
  .vw-abl-list li:last-child{border-bottom:none;}
  .vw-abl-list li>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .vw-abl-list li>span i{color:var(--muted);font-style:normal;font-size:12px;}
  .vw-abl-list li>b{flex:none;color:var(--muted);font-weight:600;font-size:12.5px;}
  .vw-abl-list li>b.rot{color:#C0392B;}
  .vw-abl-mehr{color:var(--muted);font-size:12px;}
  .vw-sig-modal{max-width:520px;width:100%;}
  .vw-sig-erkl{font-size:13px;line-height:1.6;background:var(--paper);border:1px solid var(--line);
    border-radius:10px;padding:11px 13px;margin:0 0 12px;}
  .vw-sig-ck{display:flex;align-items:flex-start;gap:9px;font-size:13.5px;cursor:pointer;line-height:1.5;}
  .vw-sig-ck input{width:18px;height:18px;flex:none;margin-top:1px;cursor:pointer;}
  .vw-sig-konto{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5;}
  .vw-sig-fehler{display:none;margin-top:10px;font-size:13px;color:#C0392B;line-height:1.5;}
  /* Kind-Auswahl (Klasse -> Kind), gemeinsam für Förderung/Fehlzeiten/Brief */
  .vw-pick{margin-bottom:10px;}
  .vw-link{background:none;border:none;padding:0;font:inherit;font-size:12.5px;
    color:var(--brand);cursor:pointer;text-decoration:underline;}
  .fo-hint{font-size:13px;color:var(--muted);background:var(--paper);border-radius:9px;padding:12px 14px;margin:6px 0;}
  .fo-baust-hint{font-size:12.5px;color:var(--muted);margin:6px 0 10px;line-height:1.45;}
  .fo-block{margin:12px 0;}
  .fo-block-h{display:block;font-size:12px;color:var(--muted);font-weight:600;margin-bottom:5px;}
  .fo-acc{border:1px solid var(--line);border-radius:11px;margin-bottom:10px;overflow:hidden;}
  .fo-acc-head{display:flex;align-items:center;gap:10px;width:100%;background:var(--paper);border:none;padding:11px 14px;font:inherit;font-size:14px;font-weight:700;color:var(--ink);cursor:pointer;text-align:left;}
  .fo-acc-head>span:first-child{flex:1;}
  .fo-acc-count{font-size:12px;font-weight:600;color:var(--brand);background:#fff;border-radius:999px;padding:2px 9px;flex:none;}
  .fo-acc-caret{transition:transform .18s;flex:none;color:var(--muted);}
  .fo-acc.collapsed .fo-acc-caret{transform:rotate(-90deg);}
  .fo-acc-body{display:none;max-height:340px;overflow-y:auto;padding:6px;}
  .fo-acc-body.open{display:block;}
  .fo-grp{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);padding:8px 8px 3px;}
  .fo-item{display:flex;gap:9px;align-items:flex-start;padding:7px 9px;border-radius:8px;cursor:pointer;font-size:13px;line-height:1.4;}
  .fo-item:hover{background:var(--paper);}
  .fo-item.on{background:color-mix(in srgb, var(--brand) 12%, #fff);}
  .fo-item input{margin-top:2px;flex:none;width:16px;height:16px;accent-color:var(--brand);}
  .fo-actions{margin-top:16px;}
  .fo-pagewarn{font-size:13px;border-radius:10px;padding:10px 13px;margin-bottom:10px;line-height:1.45;}
  .fo-pagewarn.warn{background:#FFF7ED;border:1.5px solid #E09629;color:#9A4B12;}
  .fo-btnrow{display:flex;gap:10px;flex-wrap:wrap;}
  .fo-haftung{margin-top:12px;font-size:11.5px;line-height:1.5;color:var(--muted);border-top:1px solid var(--line);padding-top:10px;}
  .fo-btn{display:inline-flex;align-items:center;gap:7px;background:var(--brand);color:#fff;border:none;border-radius:10px;padding:11px 18px;font:inherit;font-size:14px;font-weight:700;cursor:pointer;}
  .fo-btn:hover{filter:brightness(1.06);}
  .fo-btn.ghost{background:#fff;color:var(--ink);border:1.5px solid var(--line);}
  .fo-btn.ghost:hover{border-color:var(--brand);filter:none;}
  .fo-modal-ov{position:fixed;inset:0;background:rgba(15,20,35,.5);z-index:9400;display:flex;align-items:center;justify-content:center;padding:18px;}
  .fo-modal{background:#fff;border-radius:14px;max-width:520px;width:100%;max-height:80vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.3);}
  .fo-modal-h{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line);font-size:15px;}
  .fo-modal-x{border:none;background:transparent;font-size:18px;cursor:pointer;color:var(--muted);}
  .fo-list{overflow-y:auto;padding:8px;}
  .fo-list-row{display:flex;align-items:center;gap:8px;padding:4px;border-radius:9px;}
  .fo-list-row:hover{background:var(--paper);}
  .fo-list-main{flex:1;cursor:pointer;padding:8px 10px;}
  .fo-list-name{font-weight:600;font-size:14px;color:var(--ink);}
  .fo-list-meta{font-size:12px;color:var(--muted);margin-top:2px;}
  .fo-kind{display:inline-block;font-size:10px;font-weight:700;padding:1px 7px;border-radius:999px;vertical-align:middle;margin-left:4px;letter-spacing:.02em;}
  .fo-kind.einzel{background:#EEF2FF;color:#4457C7;}
  .fo-kind.sammel{background:#E8F5E9;color:#2E7D32;}
  .fo-segwrap{display:inline-flex;background:var(--paper);border:1.5px solid var(--line);border-radius:11px;padding:3px;gap:3px;}
  .fo-seg{display:flex;flex-direction:column;align-items:flex-start;gap:0;border:none;background:transparent;cursor:pointer;padding:6px 14px;border-radius:8px;color:var(--muted);transition:all .12s;}
  .fo-seg .fo-seg-t{font-size:14px;font-weight:600;line-height:1.15;}
  .fo-seg .fo-seg-s{font-size:11px;opacity:.75;line-height:1.1;}
  .fo-seg.on{background:var(--brand);color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.12);}
  .fo-seg.on .fo-seg-s{opacity:.9;}
  .fo-darst{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:4px 0 14px;padding:10px 12px;background:var(--paper);border-radius:10px;}
  .fo-darst-lbl{font-size:13px;font-weight:600;color:var(--muted);margin-right:2px;}
  .fo-radio{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;padding:5px 11px;border:1.5px solid var(--line);border-radius:9px;background:#fff;cursor:pointer;}
  .fo-radio.on{border-color:var(--brand);background:#EEF2FF;color:var(--brand);font-weight:600;}
  .fo-radio input{accent-color:var(--brand);}
  .fo-fachcard{border:1.5px solid var(--line);border-radius:12px;margin-bottom:12px;overflow:hidden;}
  .fo-fachcard-h{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:10px 12px;background:var(--paper);flex-wrap:wrap;}
  .fo-fachcard-t{font-size:15px;font-weight:700;color:var(--ink);display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .fo-fachcard-cnt{font-size:11px;font-weight:600;color:var(--brand);background:#EEF2FF;padding:2px 8px;border-radius:999px;}
  .fo-fachcard-tools{display:flex;align-items:center;gap:8px;}
  .fo-fachsel{height:36px;min-width:160px;font-size:13px;padding:6px 28px 6px 10px;}
  .fo-fachdel{border:none;background:transparent;color:var(--muted);cursor:pointer;padding:7px;border-radius:8px;flex:none;}
  .fo-fachdel:hover{background:#FDECEC;color:#E5484D;}
  .fo-fachcard-b{padding:12px;}
  .fo-addfach{display:inline-flex;align-items:center;gap:6px;border:1.5px dashed var(--line);background:#fff;color:var(--brand);font-weight:600;font-size:14px;padding:10px 16px;border-radius:10px;cursor:pointer;width:100%;justify-content:center;margin-bottom:4px;}
  .fo-addfach:hover{border-color:var(--brand);background:#EEF2FF;}
  .fo-list-del{border:none;background:transparent;color:var(--muted);cursor:pointer;padding:8px;border-radius:8px;flex:none;}
  .fo-list-del:hover{background:#FDECEC;color:#E5484D;}
  .fo-dsgvo{display:flex;gap:8px;align-items:flex-start;margin:12px 14px 4px;padding:10px 12px;background:#FFF8E6;border:1px solid #F3E0A8;border-radius:10px;font-size:12px;line-height:1.45;color:#6B5A1E;}
  .fo-tage{flex:none;font-size:11px;font-weight:600;padding:3px 8px;border-radius:999px;background:var(--paper);color:var(--muted);white-space:nowrap;}
  .fo-tage.warn{background:#FFF3E0;color:#B4690E;}
  .fo-tage.crit{background:#FDECEC;color:#E5484D;}
  @media(max-width:640px){ .foerder-grid{grid-template-columns:1fr;} }
  /* Fehlzeiten nutzt die volle Breite (Hintergrundseite ist breit, das Panel
     war bisher schmal). Nur auf diesem Screen aufweiten. */
  body[data-screen="fehlzeiten"] .wrap,
  body[data-screen="blauerbrief"] .wrap{max-width:1240px;}
  body[data-screen="fehlzeiten"] .foerder-card,
  body[data-screen="blauerbrief"] .foerder-card{max-width:none;}
  /* Ab 1000px 3 Spalten (statt 2) -> die Kopf-Felder brauchen weniger Höhe,
     wirkt aufgeräumter. Gilt für Förderempfehlung, Fehlzeiten, Blauen Brief. */
  @media(min-width:1000px){
    body[data-screen="fehlzeiten"] .foerder-grid,
    body[data-screen="blauerbrief"] .foerder-grid,
    body[data-screen="foerder"] .foerder-grid{grid-template-columns:repeat(3,1fr);}
    /* Die Kind-Auswahl bleibt zweispaltig: Klasse und Kind gehören optisch
       zusammen, ein drittes leeres Feld daneben verwirrt. */
    body[data-screen="fehlzeiten"] .foerder-grid.vw-pick,
    body[data-screen="blauerbrief"] .foerder-grid.vw-pick,
    body[data-screen="foerder"] .foerder-grid.vw-pick{grid-template-columns:repeat(2,1fr);max-width:660px;}
  }
  /* Blauer Brief: enger als die Fehlzeiten (dort sind es lange Formulare mit
     wenigen Feldern, hier viele kurze) - weniger Luft zwischen den Zeilen. */
  body[data-screen="blauerbrief"] .foerder-grid{gap:8px 12px;margin-bottom:8px;}
  .lhl-msgwrap{display:flex;flex-direction:column;gap:3px;min-width:0;max-width:85%;}
  .lhl-msgrow.me .lhl-msgwrap{align-items:flex-end;}
  .lhl-msgwrap .lhl-msg{max-width:100%;}
  .lhl-cd{font-size:10px;font-weight:700;color:var(--muted);background:rgba(127,127,127,.10);border-radius:6px;padding:1px 7px;align-self:flex-start;white-space:nowrap;}
  .lhl-msgrow.me .lhl-cd{align-self:flex-end;}
  .lhl-cd.soon{color:#B42318;background:#FDECEC;}
  .lhl-trash{margin-top:16px;border:1px solid var(--line);border-radius:13px;overflow:hidden;}
  .lhl-trash-head{display:flex;align-items:center;gap:8px;padding:11px 13px;cursor:pointer;color:var(--ink);background:var(--paper);font-size:13.5px;user-select:none;}
  .lhl-trash-head:hover{background:rgba(127,127,127,.06);}
  .lhl-trash-badge{background:var(--muted);color:#fff;border-radius:20px;font-size:11px;font-weight:800;padding:1px 8px;min-width:20px;text-align:center;}
  .lhl-trash-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:10px 13px 4px;}
  .lhl-trash-list{padding:8px 13px 13px;}
  /* Cockpit Assistent-Hinweis */
  .cockpit-assist-btn{appearance:none;width:100%;text-align:left;display:flex;align-items:center;gap:11px;
    border:1.5px solid var(--ok,#15A05A);background:var(--ok-soft,#E3F7EC);border-radius:14px;padding:13px 15px;
    cursor:pointer;font-family:inherit;margin-bottom:18px;transition:transform .08s,box-shadow .12s;}
  .cockpit-assist-btn:hover{box-shadow:0 4px 14px rgba(21,160,90,.14);}
  .cockpit-assist-btn:active{transform:scale(.99);}
  .cockpit-assist-btn .ca2-ico{flex:none;width:34px;height:34px;border-radius:10px;background:var(--ok,#15A05A);display:flex;align-items:center;justify-content:center;}
  .cockpit-assist-btn .ca2-ico svg{width:19px;height:19px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .cockpit-assist-btn .ca2-txt{flex:1;font-size:13.5px;color:var(--ink);}
  .cockpit-assist-btn .ca2-arr{flex:none;color:var(--ok,#15A05A);font-size:20px;font-weight:700;}
  /* Cockpit Mosaik (Podium links groß, rechts gestapelt) */
  /* Mobil: gestapelt (eine Spalte). Tablet: 2 Spalten. */
  .cockpit-mosaic{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:18px;align-items:stretch;}
  @media(min-width:620px) and (max-width:899.98px){ .cockpit-mosaic{grid-template-columns:1fr 1fr;} }
  /* Desktop: die drei Karten (Beste Schüler · Klassen-Check · Aktivität)
     gleich breit UND gleich hoch nebeneinander. */
  @media(min-width:900px){
    .cockpit-mosaic{align-items:stretch;}
    .cockpit-mosaic.ck-cols-3{grid-template-columns:repeat(3,minmax(0,1fr));}
    .cockpit-mosaic.ck-cols-2{grid-template-columns:repeat(2,minmax(0,1fr));}
    .cockpit-mosaic.ck-cols-1{grid-template-columns:minmax(0,420px);}
    .cm-podium .podium{max-width:100%;margin:0 auto;}
  }
  /* Desktop: Nutzungszeilen nebeneinander statt drei kurzer Zeilen in der Leere. */
  @media(min-width:900px){
    .cockpit-status .cs-usage{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:26px;row-gap:6px;}
    .cockpit-status .cs-usage-h{flex:0 0 100%;margin-bottom:2px;}
    .cockpit-status .cs-row{flex:1;min-width:170px;}
  }
  .cm-col{display:flex;flex-direction:column;gap:12px;min-width:0;}
  .cm-card{border:1.5px solid var(--line);border-radius:16px;padding:11px 14px;background:var(--card);min-width:0;overflow:hidden;}
  /* Sterne- & Fächer-Ranking: Karte als Spalte, Liste füllt die Resthöhe. */
  .cm-activity,.cm-fachrank{display:flex;flex-direction:column;}
  .ck-slist{flex:1;min-height:0;max-height:300px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;}
  .ck-slist::-webkit-scrollbar{width:5px;}
  .ck-slist::-webkit-scrollbar-thumb{background:var(--line);border-radius:99px;}
  .ck-slist::-webkit-scrollbar-track{background:transparent;}
  .cm-h{font-weight:800;font-size:15px;color:var(--ink);margin-bottom:8px;}
  .pod-classbar{display:flex;gap:6px;overflow-x:auto;padding-bottom:8px;margin-bottom:4px;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
  .pod-classbar::-webkit-scrollbar{display:none;}
  .pod-chip{flex:none;padding:5px 12px;border-radius:999px;border:1.5px solid var(--line);background:var(--card);color:var(--muted);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;white-space:nowrap;transition:all .12s;}
  .pod-chip:hover{border-color:var(--brand);}
  .pod-chip.on{background:var(--brand);border-color:var(--brand);color:#fff;}
  .cm-podium{background:linear-gradient(180deg,var(--amber-soft,#FFFBF0),var(--card));}
  /* Podium */
  .podium{display:flex;align-items:flex-end;justify-content:center;gap:6px;padding-top:8px;max-width:300px;margin:0 auto;}
  .pod-col{display:flex;flex-direction:column;align-items:center;gap:5px;width:auto;min-width:0;flex:1;max-width:96px;}
  .pod-ava{position:relative;display:flex;align-items:center;justify-content:center;flex:none;}
  /* Emoji wächst/schrumpft mit der Kartenbreite (responsive) – groß & präsent. */
  .pod-emoji{font-size:clamp(38px,6vw,50px);line-height:1;filter:drop-shadow(0 2px 3px rgba(0,0,0,.12));}
  .pod-rank{position:absolute;bottom:-2px;left:-9px;width:24px;height:24px;border-radius:50%;color:#fff;font-size:13px;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid var(--card);}
  .pod-name{font-size:14px;font-weight:750;color:var(--ink);text-align:center;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pod-pct{font-size:14px;font-weight:800;color:var(--muted);}
  .pod-stand{width:100%;max-width:84px;border:1.5px solid;border-radius:11px 11px 0 0;display:flex;align-items:flex-start;justify-content:center;padding-top:8px;font-weight:900;font-size:18px;}
  /* Zeit gespart */
  .cm-saved{background:linear-gradient(180deg,#F0F4FF,var(--card));}
  .saved-row{display:flex;align-items:center;gap:12px;}
  .saved-ico{flex:none;width:40px;height:40px;border-radius:12px;background:var(--brand);display:flex;align-items:center;justify-content:center;}
  .saved-ico svg{width:22px;height:22px;fill:#fff;stroke:none;}
  .saved-big{font-size:24px;font-weight:900;color:var(--ink);line-height:1.1;}
  .saved-big span{font-size:14px;font-weight:700;color:var(--muted);}
  .saved-sub{font-size:12px;color:var(--muted);margin-top:2px;}
  /* ===== Cockpit v2: Heute-Briefing, To-do, Klassen-Gesundheit, Skeleton ===== */
  .ck-hello{font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
    font-weight:800;letter-spacing:-.02em;color:var(--ink);line-height:1.15;
    font-size:clamp(22px,3.4vw,30px);margin:0 0 16px;}
  .ck-brief{position:relative;display:flex;align-items:flex-start;gap:12px;padding:14px 16px;margin-bottom:14px;
    border:1.5px solid var(--line);border-radius:16px;background:linear-gradient(135deg,var(--brand-soft,#EEF1FB),var(--card));}
  .ck-brief .ckb-ico{flex:none;width:40px;height:40px;border-radius:12px;background:var(--brand,#2E5BFF);
    display:flex;align-items:center;justify-content:center;}
  .ck-brief .ckb-ico svg{width:21px;height:21px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ck-brief .ckb-date{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:2px;}
  .ck-brief .ckb-line{font-size:14px;font-weight:600;color:var(--ink);line-height:1.45;}
  .ck-brief .ckb-line b{font-weight:800;}
  .ck-brief .ckb-saved{font-size:12px;color:var(--muted);margin-top:3px;}
  .ck-brief .ckb-gear{position:absolute;top:9px;right:9px;width:28px;height:28px;border:none;background:transparent;
    color:var(--muted);cursor:pointer;border-radius:8px;display:flex;align-items:center;justify-content:center;padding:0;}
  .ck-brief .ckb-gear:hover{background:rgba(127,127,127,.12);color:var(--ink);}
  .ck-brief .ckb-gear svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* ===== Kompakte Übersicht: 4 kleine Kacheln (2×2) + Schul-Badge ===== */
  .ck-quick{display:flex;gap:12px;align-items:stretch;margin-bottom:14px;}
  /* Kopfbereich: links Briefing + Kacheln, rechts das grosse Schul-Logo
     (rein dekorativ, wie ein Hintergrund – nicht klickbar). */
  .ck-top{display:flex;gap:12px;align-items:stretch;margin-bottom:14px;}
  .ck-top-left{flex:1;min-width:0;display:flex;flex-direction:column;gap:12px;}
  .ck-top-left .ck-brief{margin-bottom:0;}
  .ck-top-left .ck-quick{margin-bottom:0;flex:1;}
  /* Linkes Panel: neue Abgaben – groß & klar, mit Klassen-Aufschlüsselung */
  .ck-abg{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-start;gap:7px;
    border:1.5px solid var(--line);border-radius:14px;padding:13px 16px;
    background:var(--card);}
  /* "Heute zu erledigen": klickbare Aufgaben-Zeilen mit Deep-Links */
  .ckt-list{display:flex;flex-direction:column;gap:4px;}
  .ckt-item{display:flex;align-items:center;gap:10px;padding:8px 9px;border-radius:11px;cursor:pointer;
    transition:background .12s;}
  .ckt-item:hover{background:var(--paper,#F4F5F9);}
  .ckt-item .ckt-ico{flex:none;width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;}
  .ckt-item .ckt-ico svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ckt-item .ckt-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;}
  .ckt-item .ckt-tx b{font-size:13.5px;font-weight:800;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .ckt-item .ckt-tx small{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .ckt-item .ckt-arr{flex:none;width:15px;height:15px;fill:none;stroke:var(--muted);stroke-width:2.2;
    stroke-linecap:round;stroke-linejoin:round;opacity:.6;}
  .ckt-empty{font-size:13.5px;color:var(--muted);padding:8px 2px;}
  .ck-abg.click{cursor:pointer;transition:border-color .12s,box-shadow .12s;}
  .ck-abg.click:hover{border-color:var(--ok,#15A05A);box-shadow:0 3px 12px rgba(21,160,90,.12);}
  .ck-abg .cka-h{font-size:11.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);
    display:flex;align-items:center;gap:6px;}
  .ck-abg .cka-big{font-size:30px;font-weight:900;line-height:1;}
  .ck-abg .cka-big small{font-size:13px;font-weight:800;color:var(--muted);margin-left:7px;}
  .ck-abg .cka-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:1px;}
  .ck-abg .cka-chip{font-size:12px;font-weight:700;color:var(--ink);background:rgba(21,160,90,.13);
    border-radius:99px;padding:2px 9px;white-space:nowrap;}
  .ck-abg .cka-empty{font-size:12.5px;font-weight:600;color:var(--muted);}
  /* Mittleres Panel: 3 Nutzungszeilen (mit Text) untereinander */
  .ck-usage{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:9px;
    border:1.5px solid var(--line);border-radius:14px;padding:12px 14px;background:var(--card);}
  /* Rechtes Panel: grosses Schul-Logo – rein dekorativ (kein Button, kein Hover,
     kein Klick), wirkt wie Hintergrund. Erstreckt sich ueber Briefing + Kacheln. */
  /* Ohne graue Box: das Logo steht frei auf dem weissen Hintergrund und ist
     deutlich groesser. Kein Schulname darunter (steht schon oben rechts). */
  .ck-school{flex:none;width:216px;display:flex;flex-direction:column;align-items:center;justify-content:center;
    background:transparent;padding:8px;text-align:center;user-select:none;pointer-events:none;}
  .ck-school .cks-logo{width:172px;height:172px;border-radius:22px;object-fit:contain;flex:none;
    display:flex;align-items:center;justify-content:center;}
  .ck-school .cks-name{display:none;}
  .ck-urow{display:flex;align-items:center;gap:9px;}
  .ck-urow .cku-ico{flex:none;width:26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;}
  .ck-urow .cku-ico svg{width:15px;height:15px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
  .ck-urow .cku-lbl{flex:1;font-size:13px;font-weight:700;color:var(--ink);min-width:0;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .ck-urow .cku-val{flex:none;font-size:14px;font-weight:900;color:var(--ink);}
  .ck-urow .cku-val .inf{color:var(--ok,#15A05A);}
  .ck-urow-link{display:block;margin:-2px 0 3px 31px;font-size:11.5px;font-weight:700;
    color:var(--brand);text-decoration:none;}
  .ck-urow-link:hover{text-decoration:underline;}
  .st-ki-box{margin:0 0 12px;padding:10px;border:1px solid rgba(22,133,106,.25);
    border-radius:12px;background:rgba(22,133,106,.055);}
  .st-ki-box>b{display:block;margin-bottom:8px;font-size:13px;color:#126b57;}
  .st-niveau{position:absolute;right:5px;top:3px;font-size:8pt;font-weight:800;color:#6b7280;}
  .st-selbst{display:flex;gap:9px;flex-wrap:wrap;margin-top:2mm;padding-top:1.5mm;
    border-top:.2mm solid #d1d5db;font-size:7pt;color:#4b5563;}
  .st-mathefeld{width:100%;height:100%;box-sizing:border-box;overflow:hidden;
    color:#222;font-size:9pt;display:flex;align-items:center;justify-content:center;}
  .st-mauer>div{display:flex;justify-content:center;margin-top:-.2mm;}
  .st-mauer span{display:flex;width:12mm;height:9mm;align-items:center;justify-content:center;
    border:.3mm solid #555;margin-left:-.3mm;background:#fff;clip-path:polygon(10% 0,90% 0,100% 100%,0 100%);}
  .st-rechenpaeckchen{display:block;padding:1mm 3mm;columns:2;column-gap:7mm;}
  .st-reihe{height:7mm;white-space:nowrap;break-inside:avoid;}
  .st-reihe b{display:inline-block;min-width:13mm;border-bottom:.25mm solid #555;}
  .st-vergleich{display:grid;grid-template-columns:1fr 12mm 1fr;align-items:center;text-align:center;
    width:100%;height:8mm;}
  .st-vergleich b{height:6mm;border:.25mm solid #777;border-radius:1mm;}
  .st-zstrahl{position:relative;width:92%;height:20mm;}
  .st-zstrahl>i{position:absolute;left:0;right:0;top:8mm;border-top:.4mm solid #333;}
  .st-zstrahl>span{position:absolute;top:6mm;transform:translateX(-50%);text-align:center;}
  .st-zstrahl>span b{display:block;height:5mm;border-left:.3mm solid #333;}
  .st-zstrahl>span em{font-style:normal;font-size:7pt;display:block;min-width:8mm;}
  .st-uhr{position:relative;width:34mm;height:34mm;border:.5mm solid #333;border-radius:50%;}
  .st-uhr:after{content:"";position:absolute;width:1.5mm;height:1.5mm;background:#333;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%);}
  .st-uhr i,.st-uhr b{position:absolute;left:50%;bottom:50%;width:.5mm;background:#333;transform-origin:50% 100%;}
  .st-uhr i{height:10mm}.st-uhr b{height:14mm}.st-uhr span{position:absolute;left:50%;top:1mm;transform:translateX(-50%);font-size:7pt;}
  .st-digital{font:700 14pt ui-monospace,monospace;margin-left:4mm;border:.3mm solid #555;padding:2mm 3mm;}
  .st-zfeld{display:grid;border-left:.25mm solid #777;border-top:.25mm solid #777;width:100%;height:100%;}
  .st-zfeld.n10{grid-template-columns:repeat(5,1fr)}.st-zfeld.n20{grid-template-columns:repeat(10,1fr)}.st-zfeld.n100{grid-template-columns:repeat(10,1fr)}
  .st-zfeld span{display:flex;align-items:center;justify-content:center;border-right:.25mm solid #777;border-bottom:.25mm solid #777;font-size:7pt;}
  .st-zfeld span.mark{background:#ddd;font-weight:800;}
  .st-haus{width:42mm;text-align:center}.st-haus .dach{padding:3mm;border:.4mm solid #444;clip-path:polygon(50% 0,100% 100%,0 100%);background:#eee;font-weight:800;}
  .st-haus>div:not(.dach){display:grid;grid-template-columns:1fr 1fr;border:.3mm solid #555;border-top:0;}
  .st-haus>div:not(.dach) span{padding:1mm}.st-haus>div:not(.dach) span+span{border-left:.3mm solid #555;}
  .st-rechentabelle table{border-collapse:collapse;width:100%;height:100%;table-layout:fixed;}
  .st-rechentabelle th,.st-rechentabelle td{border:.3mm solid #555;text-align:center;padding:1mm;}
  .st-rechentabelle th{background:#eee;}
  .st-p4{width:100%;height:100%;box-sizing:border-box;overflow:hidden;display:flex;
    align-items:center;justify-content:center;color:#222;font-size:9pt;}
  .st-pfeile{display:grid;grid-template-columns:18mm 1fr 18mm;align-items:center;gap:2mm;width:100%;}
  .st-pfeile span,.st-pfeile b{border:.3mm solid #555;min-height:7mm;display:flex;align-items:center;justify-content:center;}
  .st-pfeile i{text-align:center;font-style:normal;font-size:8pt;}
  .st-kette{display:flex;align-items:center;width:95%;}.st-kette span{border:.3mm solid #555;padding:2mm 3mm;border-radius:50%;}.st-kette i{flex:1;border-top:.3mm solid #555;text-align:center;font-style:normal;}
  .st-rad{position:relative;width:42mm;height:42mm;border:.4mm solid #555;border-radius:50%;}.st-rad>b{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:15pt}.st-rad>span{position:absolute;left:50%;top:50%;transform-origin:0 0}.st-rad em,.st-rad i{display:block;font-style:normal;transform:rotate(var(--r,0deg));min-width:10mm;text-align:center}.st-rad i{border-bottom:.3mm solid #555;min-height:5mm}
  .st-dreieck{position:relative;width:48mm;height:40mm;clip-path:polygon(50% 0,100% 100%,0 100%);border-bottom:.5mm solid #555}.st-dreieck span{position:absolute;border:.3mm solid #555;border-radius:50%;padding:2mm;background:#fff}.st-dreieck span:nth-child(1){left:50%;top:1mm}.st-dreieck span:nth-child(2){left:2mm;bottom:1mm}.st-dreieck span:nth-child(3){right:2mm;bottom:1mm}.st-dreieck b{position:absolute;left:12mm;right:12mm;bottom:2mm;text-align:center}
  .st-magisch{display:grid;width:100%;height:100%;}.st-magisch.n3{grid-template-columns:repeat(3,1fr)}.st-magisch.n4{grid-template-columns:repeat(4,1fr)}.st-magisch.n5{grid-template-columns:repeat(5,1fr)}.st-magisch span{display:flex;align-items:center;justify-content:center;border:.25mm solid #555;}
  .st-schrift{display:grid;grid-template-columns:1fr;min-width:32mm;text-align:right;margin:2mm;border-bottom:.4mm solid #333}.st-schrift b{min-height:7mm}.st-schrift small{grid-column:1;font-size:7pt;color:#555}
  .st-geobrett{display:grid;width:90%;height:90%;}.st-geobrett.n3{grid-template-columns:repeat(3,1fr)}.st-geobrett.n4{grid-template-columns:repeat(4,1fr)}.st-geobrett.n5{grid-template-columns:repeat(5,1fr)}.st-geobrett.n6{grid-template-columns:repeat(6,1fr)}.st-geobrett i{width:2mm;height:2mm;border-radius:50%;background:#555;align-self:center;justify-self:center}.st-geobrett i.an{width:3mm;height:3mm;background:#16856a}
  .st-malifant{display:grid;grid-template-columns:1fr 1fr;gap:2mm 7mm;width:90%;}.st-malifant span{white-space:nowrap}.st-malifant b{display:inline-block;min-width:9mm;border-bottom:.25mm solid #555}
  .st-diagramm{display:flex;align-items:flex-end;gap:3mm;width:92%;height:90%;border-left:.3mm solid #444;border-bottom:.3mm solid #444}.st-diagramm>div{height:100%;flex:1;display:flex;flex-direction:column-reverse;align-items:center}.st-diagramm i{width:70%;background:#9ca3af}.st-diagramm span,.st-diagramm b{font-size:7pt}.st-diagramm.kreis{border:0;border-radius:50%;background:conic-gradient(#777 0 35%,#aaa 35% 70%,#ddd 70%)}
  .st-wortliste{display:grid;grid-template-columns:1fr 1fr;gap:3mm 8mm;width:95%;}.st-wortliste span{border-bottom:.25mm solid #777;padding:1mm}.st-silben{display:flex;flex-wrap:wrap;gap:5mm}.st-silben>span{display:flex;align-items:flex-end}.st-silben i{font-style:normal;padding:1mm}.st-silben i.f1{background:#ddd}.st-silben b{font-size:6pt;margin-left:1mm;color:#555}.st-such{display:grid;width:100%;height:85%;}.st-such span{display:flex;align-items:center;justify-content:center;border:.15mm solid #bbb;font-size:7pt}.st-wortsuche{flex-direction:column}.st-wortsuche small{font-size:6pt;margin-top:1mm}.st-fachtext{display:block;padding:2mm 3mm}.st-fachtext h3{margin:0 0 2mm}.st-fachtext p{line-height:1.45;margin:0 0 3mm}.st-fachtext b{display:block;border-top:.25mm solid #aaa;padding-top:2mm}
  @media(max-width:720px){ .ck-quick{flex-direction:column;} .ck-top{flex-direction:column;}
    .ck-school{width:auto;flex-direction:row;justify-content:center;padding:8px 0;}
    .ck-school .cks-logo{width:76px;height:76px;border-radius:16px;} }
  .ck-todo{margin-bottom:16px;}
  .ck-todo .ckt-h{font-weight:800;font-size:13.5px;color:var(--ink);margin:0 0 8px;}
  .ckt-row{display:flex;gap:9px;flex-wrap:wrap;}
  .ck-todo-item{appearance:none;flex:1 1 260px;min-width:0;display:flex;align-items:center;gap:11px;text-align:left;
    padding:11px 13px;border:1.5px solid var(--line);border-radius:13px;background:var(--card);
    font:inherit;cursor:pointer;transition:border-color .12s,box-shadow .12s;}
  .ck-todo-item:hover{border-color:var(--brand);box-shadow:0 3px 12px rgba(46,91,255,.08);}
  .ck-todo-item:active{transform:scale(.995);}
  .ck-todo-item .cti-ico{flex:none;width:32px;height:32px;border-radius:9px;display:flex;align-items:center;justify-content:center;}
  .ck-todo-item .cti-ico svg{width:17px;height:17px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ck-todo-item .cti-txt{flex:1;font-size:13.5px;color:var(--ink);min-width:0;}
  .ck-todo-item .cti-txt b{font-weight:800;}
  .ck-todo-item .cti-arr{flex:none;color:var(--muted);font-size:18px;font-weight:700;}
  /* Klassen-Gesundheit */
  .cm-health{background:linear-gradient(180deg,#F0FBF4,var(--card));}
  .ckh-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid rgba(127,127,127,.1);}
  .ckh-row:last-child{border-bottom:none;}
  .ckh-name{flex:1;font-size:13.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
  .ckh-avg{flex:none;font-size:13.5px;font-weight:800;color:var(--ink);}
  .ckh-delta{flex:none;font-size:11.5px;font-weight:800;padding:1px 7px;border-radius:99px;}
  .ckh-delta.up{color:var(--ok,#15A05A);background:var(--ok-soft,#E3F7EC);}
  .ckh-delta.down{color:var(--bad,#E0463E);background:rgba(224,70,62,.1);}
  .ckh-delta.flat{color:var(--muted);background:rgba(127,127,127,.1);}
  .ckh-risk{display:flex;align-items:center;gap:7px;margin-top:9px;padding:8px 10px;border-radius:10px;
    background:rgba(224,70,62,.07);border:1px solid rgba(224,70,62,.2);cursor:pointer;}
  .ckh-risk svg{flex:none;width:15px;height:15px;fill:none;stroke:var(--bad,#E0463E);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ckh-risk span{font-size:12px;color:var(--ink);line-height:1.35;}
  .ckh-risk b{color:var(--bad,#E0463E);font-weight:800;}
  /* ===== Cockpit v3 "Kopfzeile": Header + KPI-Reihe + Hauptspalte/Rail ===== */
  .ck2-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;position:relative;}
  .ck2-head .ckb-date{font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin-bottom:2px;}
  .ck2-head .ckb-line{font-size:14.5px;font-weight:600;color:var(--ink);line-height:1.4;}
  .ck2-head .ckb-line b{font-weight:800;}
  .ck2-head .ckb-saved{font-size:12px;color:var(--muted);margin-top:2px;}
  .ck2-head .ckb-gear{width:30px;height:30px;border:1px solid var(--line);background:var(--card);color:var(--muted);
    cursor:pointer;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0;}
  .ck2-head .ckb-gear:hover{color:var(--ink);border-color:var(--ink);}
  .ck2-head .ckb-gear svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ck2-tools{display:flex;align-items:center;gap:9px;flex:none;}
  .ck2-stamp{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:650;color:var(--muted);white-space:nowrap;}
  .ck2-stamp .live{width:6px;height:6px;border-radius:50%;background:var(--ok,#15A05A);animation:ck2pulse 2.2s infinite;}
  @keyframes ck2pulse{0%,100%{opacity:1;}50%{opacity:.3;}}
  .ck2-refresh{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--card);
    border-radius:9px;padding:5px 11px;font:inherit;font-size:12px;font-weight:650;color:var(--muted);cursor:pointer;transition:border-color .12s,color .12s;}
  .ck2-refresh:hover{border-color:var(--brand);color:var(--brand);}
  .ck2-refresh svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ck2-refresh.busy svg{animation:ck2spin .8s linear infinite;}
  @keyframes ck2spin{to{transform:rotate(360deg);}}
  /* KPI-Kacheln: kleinere Mindestbreite (118 statt 148), damit alle 5 auf
     Tablet-Hochkant in EINER Reihe bleiben statt 4+1 mit einsamem Umbruch. */
  .ck2-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:10px;margin-bottom:14px;}
  .ck2-kpi{display:flex;align-items:center;gap:11px;background:var(--card);border:1.5px solid var(--line);border-radius:14px;padding:11px 14px;min-width:0;}
  .ck2-kpi .k-ico{flex:none;width:32px;height:32px;border-radius:9px;display:flex;align-items:center;justify-content:center;}
  .ck2-kpi .k-ico svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ck2-kpi .k-v{display:block;font-size:19px;font-weight:800;line-height:1.05;font-variant-numeric:tabular-nums;letter-spacing:-.01em;color:var(--ink);}
  .ck2-kpi .k-v .inf{color:var(--ok,#15A05A);}
  .ck2-kpi .k-l{display:block;font-size:11px;font-weight:650;color:var(--muted);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  /* Schmale Screens (Handy/kleines Tablet): die 5 KPI-Kacheln bleiben als
     KOMPAKTE Reihe stehen (Überblick!), statt zu grossen 2x2-Klötzen zu werden.
     Kompaktstil: Icon oben, Zahl, Mini-Label – alles zentriert. */
  @media (max-width:640px){
    .ck2-kpis{ grid-template-columns:repeat(5,1fr); gap:6px; }
    .ck2-kpi{ flex-direction:column; align-items:center; text-align:center; gap:4px; padding:8px 4px; }
    .ck2-kpi .k-ico{ width:26px; height:26px; }
    .ck2-kpi .k-v{ font-size:16px; }
    .ck2-kpi .k-l{ font-size:9.5px; white-space:normal; line-height:1.15;
      /* Sicherheitsnetz: ein einzelnes langes Wort wird umbrochen statt ueber
         den Rand geschoben. Sichtbar wurde das bei "Hausaufgaben" auf 402px. */
      overflow-wrap:anywhere; hyphens:auto; }
    /* Kurze Beschriftung zeigen, lange verbergen (Gegenstueck: kpi() in
       index-app.js schreibt beide ins HTML). Auf 402px bleiben je Kachel rund
       72px - "Ungelesene Nachrichten" passt da auch in 9px nicht. */
    .ck2-kpi .k-lang{ display:none; }
    .ck2-kpi .k-kurz{ display:inline; }

    /* Kopfzeile des Cockpits: die Werkzeuge (Stand, Aktualisieren, Zahnrad)
       fielen unter den Text und kosteten eine ganze Zeile. Jetzt stehen sie
       RECHTS DANEBEN und untereinander - der Text behaelt den breiten Teil.
       Das Wort "Aktualisieren" entfaellt dabei; das Pfeilsymbol ist auf
       Handys eindeutig genug und spart die Haelfte der Breite. */
    .ck2-head{ flex-wrap:nowrap; gap:8px; }
    .ck2-head > :first-child{ min-width:0; }
    .ck2-tools{ flex-direction:column; align-items:flex-end; gap:6px; }
    .ck2-stamp{ font-size:10.5px; }
    .ck2-refresh{ padding:6px 8px; gap:0; }
    .ck2-refresh .lbl{ display:none; }
    .ck2-refresh svg{ width:15px; height:15px; }
  }
  /* Ab hier wieder die lange Beschriftung (Standard fuer Tablet und Desktop). */
  .ck2-kpi .k-kurz{ display:none; }
  .ck2-grid{display:grid;grid-template-columns:minmax(0,1fr) 272px;gap:14px;align-items:start;}
  @media(max-width:919.98px){ .ck2-grid{grid-template-columns:1fr;} }
  /* Tablet-Hochkant (z. B. iPad 8, ~810px), cockpit-SPEZIFISCH: die Rail lag
     als volle Breite UNTEREINANDER (Schul-Kachel riesig quer). Jetzt
     nebeneinander: Schul-Kachel + Tageskontingente teilen sich eine Reihe,
     "Zuletzt bearbeitet" (Liste) darunter über die volle Breite. (Die seitlichen
     Lücken/720px-Kappe sind schon global für alle App-Seiten gelöst, siehe
     @media (max-width:899.98px) weiter unten.)
     Prefix body[data-screen="cockpit"] NUR wegen Specificity: die Basis-Regeln
     für .ck2-rail stehen weiter unten im Quelltext und würden sonst (gleiche
     Specificity, spätere Quelle) gewinnen. */
  @media (min-width:620px) and (max-width:919.98px){
    body[data-screen="cockpit"] .ck2-rail{ flex-direction:row; flex-wrap:wrap; align-items:flex-start; gap:12px; }
    /* Tablet-Zwischenbreite: die Kachel steht neben den anderen Rail-Karten.
       Kein Polster mehr (das Bild fuellt randlos, s. .ck2-logoBox oben). */
    body[data-screen="cockpit"] .ck2-rail .ck2-logoBox{ flex:1 1 210px; padding:0; }
    body[data-screen="cockpit"] .ck2-rail .ck2-railcard:not(.ck2-rec){ flex:1 1 240px; }
    body[data-screen="cockpit"] .ck2-rail .ck2-rec{ flex:1 1 100%; }
  }
  .ck2-main{min-width:0;display:flex;flex-direction:column;gap:14px;}
  .ck2-rail{display:flex;flex-direction:column;gap:12px;min-width:0;}
  .ck2-card{background:var(--card);border:1.5px solid var(--line);border-radius:16px;overflow:hidden;}
  .ck2-card .c-h{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:12px 16px 9px;}
  .ck2-card .c-h b{font-size:14px;font-weight:800;letter-spacing:-.01em;color:var(--ink);}
  .ck2-card .c-sub{font-size:12px;color:var(--muted);font-weight:650;}
  /* To-do-Zeilen */
  .ck2-todo .t-row{display:flex;align-items:center;gap:12px;padding:10px 16px;border-top:1px solid rgba(127,127,127,.1);cursor:pointer;transition:background .1s;}
  .ck2-todo .t-row:hover{background:var(--paper,#F4F5F9);}
  .ck2-todo .t-ico{flex:none;width:31px;height:31px;border-radius:9px;display:flex;align-items:center;justify-content:center;}
  .ck2-todo .t-ico svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .ck2-todo .t-tx{flex:1;min-width:0;}
  .ck2-todo .t-tx b{display:block;font-size:13.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ck2-todo .t-tx small{display:block;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px;}
  .ck2-due{font-size:11px;font-weight:750;border-radius:99px;padding:2px 9px;flex:none;}
  .ck2-due.today{background:rgba(224,70,62,.1);color:var(--bad,#E0463E);}
  .ck2-due.soon{background:var(--amber-soft,#FFF6E3);color:#B45309;}
  .ck2-due.later{background:rgba(127,127,127,.1);color:var(--muted);}
  .ck2-chev{flex:none;width:14px;height:14px;fill:none;stroke:var(--muted);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;opacity:.6;}
  .ck2-empty{font-size:13px;color:var(--muted);padding:12px 16px;border-top:1px solid rgba(127,127,127,.1);}
  /* Gruppen-Ueberschrift in der Karte "Meine Aufgaben" (v2.58.0):
     trennt Handlung von Kenntnisnahme. Ohne sie sieht eine Tagesbilanz
     aus wie eine unbewertete Abgabe. */
  .ck2-todo .ck2-grp{font-size:10.5px;font-weight:800;color:var(--muted);
    text-transform:uppercase;letter-spacing:.06em;padding:11px 16px 4px;
    border-top:1px solid rgba(127,127,127,.1);}
  /* Klassen-Check als Tabelle */
  .ck2-tblwrap{overflow-x:auto;scrollbar-width:thin;}
  .ck2-tbl{width:100%;border-collapse:collapse;font-size:13px;min-width:520px;}
  .ck2-tbl th{text-align:left;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);
    padding:8px 16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);white-space:nowrap;background:var(--paper,#F7F8FA);}
  .ck2-tbl td{padding:10px 16px;border-bottom:1px solid rgba(127,127,127,.1);white-space:nowrap;vertical-align:middle;font-variant-numeric:tabular-nums;}
  .ck2-tbl tr:last-child td{border-bottom:none;}
  .ck2-tbl tbody tr{cursor:pointer;}
  .ck2-tbl tbody tr:hover td{background:var(--paper,#F4F5F9);}
  .ck2-dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex:none;}
  .ck2-bar{display:inline-block;width:100%;min-width:64px;height:6px;border-radius:99px;background:rgba(127,127,127,.14);overflow:hidden;vertical-align:middle;}
  .ck2-bar i{display:block;height:100%;border-radius:99px;}
  .ck2-legend{display:flex;gap:11px;font-size:11px;font-weight:650;color:var(--muted);flex-wrap:wrap;align-items:center;}
  .ck2-legend span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;}
  /* Rechte Rail */
  /* Schul-Kachel (Umbau 2026-07): Das Bild fuellt die Kachel RANDLOS aus –
     vorher sass ein 185px-Quadrat mit Rahmen und Polster darin, was wie ein
     Platzhalter aussah. Der Schulverwaltungs-Knopf liegt als farbige Leiste
     AUF dem unteren Bildrand (position:absolute), damit Bild und Knopf eine
     Einheit sind und der Einstieg im ruhigen Cockpit auffaellt.
     HOEHE (Feinschliff 29.07.2026, Wunsch Murat): 16/9 statt 1/1. Quadratisch
     war das Foto der groesste Block der rechten Rail und schob
     „Tageskontingente" und „Zuletzt bearbeitet" nach unten – fuer ein Bild,
     das nur Einstieg ist und keine Information traegt. Ein Schulgebaeude ist
     ausserdem von Natur aus liegend: der quadratische Zuschnitt schnitt per
     object-fit:cover links und rechts mehr Motiv weg als 16/9.
     MIT WEM: renderCockpitStatus() in static/js/index-app.js. */
  .ck2-logoBox{position:relative;padding:0;overflow:hidden;border:0;
    aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;}
  .ck2-logoBox .cks-logo{width:100%;height:100%;border-radius:0;object-fit:cover;
    display:flex;align-items:center;justify-content:center;margin:0;font-size:52px;}
  /* Ohne Knopf (keine Schule / kein Schuladmin) bleibt es ein reines Bild. */
  .ck2-logoBox.hat-admin .cks-logo{padding-bottom:0;}
  /* Schulverwaltungs-Knopf: Glas-Leiste AUF dem unteren Bildrand.
     VORHER (bis 2.66.0) ein deckender Blau-Verlauf mit hartem Schlagschatten
     nach oben. Der Balken schnitt das Foto unten hart ab, der Schatten legte
     einen grauen Streifen darueber – zwei Fremdkoerper in einer Kachel, die
     eigentlich ein Bild ist.
     JETZT ein nach unten dichter werdender Tintenschleier: oben durchsichtig,
     unten .84 Deckung. Das Foto laeuft sichtbar bis zum Rand weiter, die
     weisse Schrift steht trotzdem auf genug Deckung, und die Haarlinie oben
     trennt Bild und Knopf ohne Kante. Die Markenfarbe ist nicht weg, sie ist
     nur in den Hover gewandert: erst bei Beruehrung wird die Leiste blau –
     der Knopf bleibt erkennbar ein Knopf, ohne dauerhaft zu schreien.
     WARUM DER VERLAUF UND NICHT NUR backdrop-filter: Browser ohne
     Unterstuetzung (aeltere Android-WebViews) zeigen dann gar keine Deckung
     und die weisse Schrift verschwindet auf hellem Putz. Der Verlauf traegt
     die Lesbarkeit allein, die Unschaerfe ist Zugabe. */
  .ck2-logoBox .cks-admin{position:absolute;left:0;right:0;bottom:0;z-index:2;
    display:flex;align-items:center;justify-content:center;gap:8px;
    padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px));
    border:0;border-top:1px solid rgba(255,255,255,.18);
    background:linear-gradient(180deg, rgba(17,24,45,0) 0%, rgba(17,24,45,.52) 34%, rgba(17,24,45,.84) 100%);
    -webkit-backdrop-filter:blur(7px) saturate(1.15);backdrop-filter:blur(7px) saturate(1.15);
    color:#fff;font:inherit;font-size:13.5px;font-weight:750;letter-spacing:-.01em;line-height:1;
    cursor:pointer;width:100%;text-align:center;
    text-shadow:0 1px 2px rgba(0,0,0,.35);transition:background .18s;}
  .ck2-logoBox .cks-admin span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ck2-logoBox .cks-admin svg{flex:none;opacity:.92;}
  .ck2-logoBox .cks-admin .cks-admin-chev{opacity:.72;transition:transform .18s, opacity .18s;}
  .ck2-logoBox .cks-admin:hover{
    background:linear-gradient(180deg, rgba(17,24,45,.22) 0%, rgba(46,91,255,.62) 45%, rgba(46,91,255,.92) 100%);}
  .ck2-logoBox .cks-admin:hover .cks-admin-chev{transform:translateX(2px);opacity:1;}
  .ck2-logoBox .cks-admin:focus-visible{outline:2px solid #fff;outline-offset:-4px;}
  /* ===== STUFENWAHL DER DIFFERENZIERUNG (v2.67.0) =========================
     Drei Schalter in der Druckreihenfolge leicht -> schwer. Der Stern ist die
     Hauptsache und steht deshalb gross und zuerst; das Wort darunter ist nur
     die Lesehilfe fuer die Lehrkraft (auf dem Kinderblatt erscheint es NIE,
     siehe abNiveauSternHtml). Das echte Auswahlfeld ist ein RADIO und liegt
     unsichtbar, aber fokussierbar in der Karte - Tastaturbedienung bleibt
     damit vollstaendig (Pfeiltasten wechseln die Stufe), :focus-within
     zeichnet den Rahmen. Der Zustand haengt an der Klasse .an, die nivStufe()
     setzt - NICHT an :has(), damit auch aeltere Browser die Auswahl zeigen.
     GENAU EINE Stufe ist aktiv, ★★ eingeschlossen: ein Kind bekommt EIN
     Blatt, zwei gleichzeitig gewaehlte Stufen waeren ein Widerspruch
     (gemeldet 30.07.2026). Dass ★★ nichts erzeugt, sagt der Knopf - nicht
     eine Karte, die sich nicht anklicken laesst und dadurch kaputt aussieht.
     MIT WEM: templates/index.html (#niv-body), nivStufe()/nivBtnText() und
     matNiveauErzeugen() in static/js/index-app.js. */
  .niv-stufen{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:11px;}
  .niv-stufe{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    padding:9px 6px;border:1.5px solid var(--line);border-radius:11px;background:var(--card);
    cursor:pointer;text-align:center;transition:border-color .15s, background .15s;}
  .niv-stufe input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none;}
  .niv-stufe .niv-st{font-size:15px;line-height:1.1;letter-spacing:1px;color:var(--ink);white-space:nowrap;}
  .niv-stufe .niv-nm{font-size:11.5px;font-weight:650;color:var(--muted);}
  .niv-stufe:hover{border-color:var(--brand);}
  .niv-stufe:focus-within{outline:2px solid var(--brand);outline-offset:2px;}
  .niv-stufe.an{border-color:var(--brand);background:rgba(46,91,255,.08);}
  .niv-stufe.an .niv-st{color:var(--brand);}
  .niv-stufe.an .niv-nm{color:var(--brand);}
  .niv-stufe input[type="radio"]{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none;}
  .ck2-railcard{padding:13px 15px;}
  /* Tageskontingente: bewusst leise – graue Icons, keine Farbflaechen, kein Fett */
  .ck2-railcard .ck-urow .cku-ico{background:transparent !important;color:var(--muted);width:22px;height:22px;}
  .ck2-railcard .ck-urow .cku-ico svg{stroke:currentColor;width:15px;height:15px;}
  .ck2-railcard .ck-urow .cku-lbl{font-weight:500;color:var(--ink);}
  .ck2-railcard .ck-urow .cku-val{font-weight:600;font-size:13px;}
  .ck2-railcard .h-mini{font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:6px;}
  .ck2-rec .r-row{display:flex;align-items:center;gap:9px;padding:7px 2px;border:none;border-bottom:1px solid rgba(127,127,127,.1);
    cursor:pointer;background:none;width:100%;text-align:left;font:inherit;}
  .ck2-rec .r-row:last-child{border-bottom:none;}
  .ck2-rec .r-row .r-dot{flex:none;width:9px;height:9px;border-radius:3px;}
  .ck2-rec .r-row b{flex:1;min-width:0;font-size:13px;font-weight:500;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .1s;}
  .ck2-rec .r-row:hover b{color:var(--brand);}
  .ck2-rec .r-row small{font-size:11px;color:var(--muted);flex:none;}
  /* ===== Klassen-Check v2: breiter Zwei-Spalten-Block (visuell, Ampel) ===== */
  .ck-classcheck{border:1.5px solid var(--line);border-radius:16px;background:var(--card);padding:14px 16px;margin-bottom:18px;}
  .ck-classcheck .cc-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px;}
  .ck-classcheck .cc-title{font-weight:800;font-size:14px;color:var(--ink);display:flex;align-items:center;gap:8px;}
  .ck-classcheck .cc-legend{display:flex;gap:10px;font-size:11px;font-weight:700;color:var(--muted);flex-wrap:wrap;}
  .ck-classcheck .cc-legend span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;}
  .cc-grid{display:grid;grid-template-columns:1fr;gap:12px;}
  @media(min-width:760px){ .cc-grid{grid-template-columns:1.25fr 1fr;} }
  .cc-pane{border:1px solid var(--line);border-radius:13px;padding:11px 13px;background:var(--paper,#f7f8fb);min-width:0;}
  .cc-pane-h{font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:8px;}
  .cc-class{display:flex;align-items:center;gap:9px;padding:8px 0;border-bottom:1px solid rgba(127,127,127,.1);}
  .cc-class:last-child{border-bottom:none;}
  .cc-emoji{flex:none;font-size:15px;line-height:1;}
  .cc-dot{flex:none;display:inline-block;width:10px;height:10px;border-radius:50%;vertical-align:middle;}
  .cc-legend .cc-dot{width:8px;height:8px;margin-right:3px;}
  /* Name fest, Balken fuellt die Zeile: keine leere Flaeche mehr rechts. */
  .cc-cname{flex:0 1 auto;max-width:42%;font-size:13.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
  .cc-bar{flex:1;min-width:60px;height:7px;border-radius:99px;background:rgba(127,127,127,.16);overflow:hidden;}
  .cc-bar-fill{height:100%;border-radius:99px;transition:width .3s;}
  .cc-avg{flex:none;width:38px;text-align:right;font-size:13px;font-weight:800;color:var(--ink);}
  .cc-delta{flex:none;font-size:11px;font-weight:800;padding:1px 6px;border-radius:99px;min-width:46px;text-align:center;}
  .cc-delta.up{color:var(--ok,#15A05A);background:var(--ok-soft,#E3F7EC);}
  .cc-delta.down{color:var(--bad,#E0463E);background:rgba(224,70,62,.1);}
  .cc-delta.flat{color:var(--muted);background:rgba(127,127,127,.1);}
  .cc-risk{display:flex;align-items:center;gap:9px;padding:7px 0;border-bottom:1px solid rgba(127,127,127,.1);cursor:pointer;transition:background .12s;}
  .cc-risk:last-child{border-bottom:none;}
  .cc-risk:hover{background:rgba(224,70,62,.05);}
  .cc-risk-ava{flex:none;width:26px;height:26px;border-radius:8px;background:rgba(224,70,62,.12);display:flex;align-items:center;justify-content:center;font-size:14px;}
  .cc-risk-name{flex:0 1 auto;max-width:46%;font-size:13px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;line-height:1.25;}
  .cc-risk-name small{display:block;font-weight:600;color:var(--muted);font-size:11px;}
  .cc-risk-bar{flex:1;min-width:50px;height:6px;border-radius:99px;background:rgba(127,127,127,.14);overflow:hidden;}
  .cc-risk-bar i{display:block;height:100%;border-radius:99px;background:var(--bad,#E0463E);}
  .cc-risk-pct{flex:none;font-size:12.5px;font-weight:800;color:var(--bad,#E0463E);white-space:nowrap;}
  .cc-empty{color:var(--muted);font-size:12.5px;padding:10px 2px;}
  .cc-allok{display:flex;align-items:flex-start;gap:8px;color:var(--ok,#15A05A);font-size:13px;font-weight:700;padding:8px 2px;line-height:1.4;}
  /* Skeleton-Loader (grauer Puls statt "Wird geladen...") */
  @keyframes ckSkelPulse{0%,100%{opacity:.55;}50%{opacity:1;}}
  .ck-skel{border-radius:10px;background:rgba(127,127,127,.14);animation:ckSkelPulse 1.3s ease-in-out infinite;}
  .ck-skel-line{height:13px;margin:7px 0;}
  .ck-skel-card{height:118px;border-radius:16px;}
  /* Widget-Einstellungen (Popup) */
  #ck-prefs-pop{position:absolute;top:40px;right:9px;min-width:200px;background:var(--card,#fff);
    border:1.5px solid var(--line);border-radius:13px;box-shadow:0 12px 30px rgba(27,34,48,.18);padding:7px;z-index:80;}
  #ck-prefs-pop .ckp-h{font-size:10.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);padding:6px 9px 4px;}
  #ck-prefs-pop label{display:flex;align-items:center;gap:9px;padding:8px 9px;border-radius:8px;font-size:13px;font-weight:600;color:var(--ink);cursor:pointer;}
  #ck-prefs-pop label:hover{background:var(--paper,#f3f4f6);}
  #ck-prefs-pop input[type=checkbox]{accent-color:var(--brand,#2E5BFF);width:15px;height:15px;}
  .nav-more-menu{position:absolute;top:calc(100% + 8px);right:0;min-width:240px;max-width:min(88vw,300px);background:var(--card,#fff);border:1.5px solid var(--line);border-radius:14px;box-shadow:0 12px 34px rgba(27,34,48,.16);padding:6px;z-index:60;display:none;}
  @media(max-width:560px){
    .nav-more-menu{position:fixed;left:12px;right:12px;top:118px;min-width:0;max-width:none;width:auto;}
  }
  .nav-more-menu.open{display:block;}
  .nav-more-menu .nm-label{font-size:10.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);padding:8px 10px 4px;}
  .nav-more-menu button{display:flex;align-items:center;gap:12px;width:100%;text-align:left;justify-content:flex-start;background:none;border:none;padding:11px 12px;border-radius:9px;font-size:14.5px;font-weight:600;color:var(--ink);cursor:pointer;font-family:inherit;}
  .nav-more-menu button:hover{background:var(--paper,#f3f4f6);}
  .nav-more-menu button svg{width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:var(--muted);}
  .nav-more-menu button span{flex:1;}
  .nav-more-menu .km-divider{height:1px;background:var(--line);margin:5px 10px;}
  .plan-dots{border:none;background:transparent;color:var(--muted);cursor:pointer;padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;}
  .plan-dots:hover{background:var(--paper,#f3f4f6);color:var(--ink);}
  .plan-menu{position:absolute;top:calc(100% + 4px);right:0;min-width:184px;background:var(--card,#fff);border:1.5px solid var(--line);border-radius:12px;box-shadow:0 10px 28px rgba(27,34,48,.16);padding:5px;z-index:40;display:none;}
  .plan-menu.open{display:block;}
  .plan-menu button{display:block;width:100%;text-align:left;background:none;border:none;padding:10px 12px;border-radius:8px;font-size:13.5px;font-weight:600;color:var(--ink);cursor:pointer;font-family:inherit;}
  .plan-menu button:hover{background:var(--paper,#f3f4f6);}
  .plan-menu button.pm-del{color:var(--bad);}
  .sup-card .sup-body{display:none;}
  .sup-card.open .sup-body{display:block;}
  .sup-card.open .sup-chev{transform:rotate(180deg);}
  .sup-act{background:var(--paper,#f3f4f6);border:1px solid var(--line);color:var(--ink);border-radius:8px;padding:6px 11px;font-size:12.5px;font-weight:600;cursor:pointer;font-family:inherit;}
  .sup-act:hover{background:var(--card,#fff);}
  .sup-act.sup-del{color:var(--bad);margin-left:auto;}
  /* SchlauStart-Assistent (Chat-Widget) */
  .asst-messages{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--paper,#f6f7f9);}
  .asst-msg{max-width:82%;padding:9px 13px;border-radius:14px;font-size:13.5px;line-height:1.5;white-space:pre-wrap;word-break:break-word;}
  .asst-msg.bot{align-self:flex-start;background:var(--card,#fff);border:1px solid var(--line);border-bottom-left-radius:4px;}
  .asst-msg.user{align-self:flex-end;background:#2E5BFF;color:#fff;border-bottom-right-radius:4px;}
  .asst-msg.sensibel{background:#FFF4E0;border:1px solid #F5C26B;color:#7A4F00;}
  .asst-typing{align-self:flex-start;color:var(--muted);font-size:13px;padding:4px 6px;}
  .asst-quick{display:flex;flex-direction:column;gap:7px;padding:4px 14px 12px;background:var(--paper,#f6f7f9);}
  .asst-quick button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:var(--card,#fff);border:1.5px solid var(--line,#E4E7EE);color:var(--ink,#1B2230);border-radius:14px;padding:11px 14px;font-size:13.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:border-color .14s ease,background .14s ease,transform .12s ease;}
  .asst-quick button:hover{background:var(--brand-soft,#EEF1FB);border-color:var(--brand,#2E5BFF);}
  .asst-quick button:active{transform:scale(.985);}
  .asst-quick .asst-choice{gap:11px;}
  .asst-cico{width:34px;height:34px;border-radius:50%;background:var(--brand-soft,#E9EEFF);color:var(--brand,#2E5BFF);display:flex;align-items:center;justify-content:center;flex:none;}
  .asst-ctx{flex:1;min-width:0;display:flex;flex-direction:column;}
  .asst-ctx b{font-size:13.5px;font-weight:800;}
  .asst-ctx i{font-style:normal;font-size:11.5px;color:var(--muted);margin-top:1px;}
  .asst-choice > svg{color:var(--muted);flex:none;}
  .asst-input{display:flex;gap:8px;padding:11px;border-top:1px solid var(--line);flex:none;background:var(--card,#fff);}
  .asst-input input{flex:1;border:1.5px solid var(--line);border-radius:22px;padding:9px 14px;font:inherit;font-size:13.5px;outline:none;}
  .asst-input input:focus{border-color:var(--brand,#2E5BFF);}
  .asst-input button{background:var(--brand,#2E5BFF);color:#fff;border:none;width:40px;height:40px;border-radius:50%;cursor:pointer;flex:none;display:flex;align-items:center;justify-content:center;transition:background .15s ease,transform .12s ease;}
  .asst-input button:hover{background:var(--brand-dk,#1E3FCC);}
  .asst-input button:active{transform:scale(.9);}
  #asst-send svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .asst-input button:disabled{opacity:.5;cursor:default;}
  .asst-attach{background:none !important;border:1.5px solid var(--line) !important;color:var(--muted) !important;
    width:40px;height:40px;border-radius:50% !important;cursor:pointer;flex:none;display:flex;align-items:center;justify-content:center;padding:0;transition:border-color .12s,color .12s;}
  .asst-attach:hover{border-color:var(--brand) !important;color:var(--brand) !important;}
  .asst-attach svg{width:18px;height:18px;}
  .asst-shot-preview{display:flex;align-items:center;gap:9px;padding:8px 11px;border-top:1px solid var(--line);background:var(--paper,#F5F7FB);flex:none;}
  .asst-shot-preview img{width:46px;height:46px;object-fit:cover;border-radius:8px;border:1px solid var(--line);}
  .asst-shot-preview span{font-size:12.5px;color:var(--muted);font-weight:600;flex:1;}
  .asst-shot-preview button{background:none;border:none;color:var(--muted);font-size:16px;cursor:pointer;width:26px;height:26px;border-radius:50%;flex:none;}
  .asst-shot-preview button:hover{background:rgba(127,127,127,.12);color:var(--bad);}
  .nav-dd{position:relative;flex:1;min-width:0;display:flex;}
  .nav-dd > button{width:100%;border:none;background:transparent;font-family:inherit;font-weight:700;font-size:12px;color:var(--muted);cursor:pointer;padding:9px 4px;border-radius:9px;display:flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;}
  .nav-dd > button.on{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08);}
  .nav-dd > button svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .nav-dd > button .dd-caret{width:11px;height:11px;}
  .nav-dd-menu{position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%);z-index:60;min-width:210px;padding:6px;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(27,34,48,0.18);display:none;}
  .nav-dd-menu.open{display:block;}
  .nav-dd-menu button{display:flex;align-items:center;gap:10px;width:100%;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;color:var(--ink);text-align:left;padding:10px 11px;border-radius:8px;white-space:nowrap;}
  .nav-dd-menu button:hover{background:rgba(127,127,127,0.10);}
  .nav-dd-menu button svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* Apple-Style Pull-to-Refresh: weicher Kreisbogen, der sich beim Ziehen füllt */
  /* ===== LADEANZEIGE IM SYSTEM-STIL (v2.42.8) ==========================
     Vorher: ein dicker Ring, der sich blau fuellte und beim Ausloesen GRUEN
     wurde. Auf dem Geraet sah das wie ein Fortschrittsbalken aus einer anderen
     App aus - Apple faerbt hier nichts ein, sondern zeigt den bekannten Kranz
     aus 12 Speichen in neutralem Grau (Rueckmeldung 2026-07-26).
     Beim Ziehen erscheinen die Speichen der Reihe nach (Fortschritt), beim
     Laden laufen sie im Kreis heller/dunkler - genau das Systemverhalten.
     Farbe: #8E8E93 = iOS-Systemgrau, bewusst NICHT var(--brand). */
  #ptr-indicator{position:fixed;top:0;left:50%;width:34px;height:34px;z-index:9999;opacity:0;pointer-events:none;transform:translate(-50%,-46px);transition:opacity .18s ease;}
  #ptr-indicator.visible{opacity:1;}
  #ptr-indicator svg{width:34px;height:34px;display:block;}
  #ptr-indicator .ptr-sp{fill:#8E8E93;opacity:0;transition:opacity .08s linear;}
  #ptr-indicator.spin .ptr-sp{opacity:1;animation:ptr-fade 1.05s linear infinite;transition:none;}
  @keyframes ptr-fade{0%{opacity:1;}100%{opacity:.12;}}
  .modal-overlay{position:fixed;inset:0;background:rgba(20,28,42,.45);z-index:10000;display:flex;align-items:center;justify-content:center;padding:18px;}
  /* Defektes LaTeX vom Modell NICHT als rote "Math input error"-Box zeigen.
     Wir blenden die Fehlerausgabe komplett aus (die Luecke bleibt einfach leer). */
  mjx-merror, .MathJax_Error, mjx-merror>*{ color:transparent!important; background:none!important;
    border:none!important; box-shadow:none!important; font-size:0!important; }
  .modal-overlay.hidden{display:none;}
  .modal-card{background:#fff;border-radius:18px;width:100%;max-width:440px;max-height:82vh;overflow-y:auto;padding:20px;box-shadow:0 12px 40px rgba(0,0,0,.25);animation:modalpop .16s ease;}
  @keyframes modalpop{from{transform:scale(.96);opacity:.6;}to{transform:scale(1);opacity:1;}}
  .modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:12px;}
  .modal-head h3{margin:0;font-size:18px;}
  .modal-x{background:none;border:none;font-size:26px;line-height:1;color:var(--muted);cursor:pointer;padding:0 4px;}
  .am-cls-head{display:flex;align-items:center;gap:9px;cursor:pointer;padding:12px;border:1px solid var(--line);border-radius:11px;margin-bottom:8px;font-weight:700;user-select:none;}
  .am-cls-head:hover{background:var(--paper);}
  .am-cls-body{margin:-4px 0 10px;padding-left:6px;}
  .am-stud{display:block;width:100%;text-align:left;background:var(--paper);border:1px solid var(--line);border-radius:9px;padding:10px 12px;margin-bottom:6px;font:inherit;font-weight:600;cursor:pointer;}
  .am-stud:hover{background:#E8EEFF;border-color:var(--brand);}
  .am-stud-new{display:flex;align-items:center;color:var(--brand);font-weight:700;background:#EEF3FF;border:1px dashed var(--brand);}
  .am-stud-new:hover{background:#E0E9FF;}
  /* Nicht-zugeordnet Popup (Klassenbuch) */
  .kbu-item{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:13px;margin-bottom:9px;background:var(--paper);transition:box-shadow .15s ease;}
  .kbu-item:hover{box-shadow:0 4px 14px rgba(15,20,40,.08);}
  .kbu-ava{flex:none;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;color:#fff;}
  .kbu-meta{font-size:12px;color:var(--muted);margin-top:2px;display:flex;gap:10px;flex-wrap:wrap;}
  .kbu-del{appearance:none;border:none;background:none;cursor:pointer;padding:7px;border-radius:9px;color:var(--muted);display:flex;}
  .kbu-del:hover{background:rgba(220,60,60,.12);color:var(--bad,#D33C3C);}
  .authbar a{color:var(--brand);text-decoration:none;cursor:pointer;}
  .authbar a:hover{text-decoration:underline;}
  .authbar span{color:var(--muted);}
  .dash-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-top:1px solid var(--line);flex-wrap:wrap;}
  .dash-row:first-of-type{border-top:none;}
  .dash-info{flex:1;min-width:170px;}
  .dash-title{font-weight:700;font-size:15px;word-break:break-word;}
  .dash-meta{font-size:12.5px;color:var(--muted);}
  .dash-actions{display:flex;gap:8px;flex-wrap:wrap;}
  .kb-row{display:flex;align-items:center;gap:14px;padding:16px 15px;border:1px solid var(--line);border-radius:14px;margin-bottom:11px;cursor:pointer;transition:background .12s,border-color .12s;}
  .kb-row:hover{background:var(--paper);border-color:var(--brand);}
  .kb-ava{width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:17px;flex:0 0 auto;}
  .kb-attempt{display:flex;align-items:center;gap:10px;padding:7px 10px;background:var(--paper);border-radius:10px;margin-bottom:5px;}
  .mini-btn{appearance:none;border:1.5px solid var(--line);background:#fff;color:var(--brand);font-family:inherit;font-weight:700;font-size:12.5px;padding:8px 12px;border-radius:10px;cursor:pointer;}
  .mini-btn:hover{border-color:var(--brand);background:var(--brand-soft);}
  .mini-btn.danger{color:var(--bad);}
  .mini-btn.danger:hover{border-color:var(--bad);background:var(--bad-soft);}
  /* Quadratischer Icon-Button (z. B. + Neues Quiz) */
  .iconbtn-square{appearance:none;flex:none;width:42px;height:42px;border:1.5px solid var(--line);background:#fff;color:var(--brand);border-radius:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:border-color .12s,background .12s;}
  .iconbtn-square:hover{border-color:var(--brand);background:var(--brand-soft);}
  .iconbtn-square svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
  /* "Neue Aufgabe"-Button im Aufgaben-Kopf: kompakt, rechtsbündig, mit Label */
  .dash-new-btn{appearance:none;flex:none;display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border:1.5px solid var(--brand);background:var(--brand);color:#fff;border-radius:11px;font-family:inherit;font-weight:700;font-size:13.5px;cursor:pointer;transition:transform .08s ease,filter .15s ease;}
  .dash-new-btn:hover{filter:brightness(1.05);}
  .dash-new-btn:active{transform:scale(.97);}
  .dash-new-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;}
  @media (max-width:380px){ .dash-new-btn span{display:none;} .dash-new-btn{padding:9px 11px;} }
  /* ===== AUFGABEN-TOOLBAR: alles in einer Zeile (Nutzung · Suche · +) ===== */
  .dash-toolbar{display:flex;align-items:center;gap:9px;margin-top:12px;}
  .usage-mini{flex:none;display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:11px;
    background:linear-gradient(180deg,var(--brand-soft),var(--card));border:1px solid var(--line);
    font-size:12.5px;font-weight:800;color:var(--ink);white-space:nowrap;cursor:default;}
  .usage-mini .um-dot{width:7px;height:7px;border-radius:50%;background:var(--brand);flex:none;}
  .usage-mini .um-val{color:var(--muted);font-weight:700;}
  .usage-mini.um-clickable{cursor:pointer;transition:border-color .12s;}
  .usage-mini.um-clickable:hover{border-color:var(--brand);}
  /* Die Suche ist auf JEDER Breite ein Lupensymbol (2.91.0). Bis dahin war
     sie am Desktop das breiteste Element der Zeile (~300px) und zugleich das
     am seltensten benutzte - breit war sie nur, weil der "Neu"-Knopf darin
     sass. Seit der eigenstaendig davorsteht, gibt es keinen Grund mehr dafuer;
     der frei gewordene Platz traegt jetzt den Klassen-Filter.
     Ein Tipp setzt `such-offen` auf die Leiste (dashSucheAuf): dann blendet
     die Suche alles andere aus und nimmt die ganze Zeile - kein Umbruch,
     keine Sprungstelle. */
  .dash-search-inline{flex:none;width:40px;min-width:0;display:flex;align-items:center;
    justify-content:center;gap:7px;padding:0;height:40px;overflow:hidden;
    border:1.5px solid var(--line);border-radius:11px;background:var(--card);}
  .dash-search-inline:hover{border-color:var(--brand);}
  .dash-search-inline input,.dash-search-inline .dsi-clear{display:none;}
  .dash-toolbar.such-offen .dtb-drop,
  .dash-toolbar.such-offen .dtb-seg,
  .dash-toolbar.such-offen .dtb-zone-mob,
  .dash-toolbar.such-offen .dtb-neu{display:none;}
  .dash-toolbar.such-offen .dash-search-inline{flex:1;width:auto;padding:0 10px;
    justify-content:flex-start;}
  .dash-toolbar.such-offen .dash-search-inline input{display:block;}
  /* Das Kreuz ist da, SOLANGE die Suche offen ist - auch bei leerem Feld.
     Vorher haing es an "hat schon jemand etwas eingegeben" (JS setzte
     style.display), und bei leerem Feld gab es damit keinen Weg zurueck. */
  .dash-toolbar.such-offen .dash-search-inline .dsi-clear{display:flex;
    align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;}
  .dash-toolbar.such-offen .dash-search-inline .dsi-clear:hover{background:var(--paper);color:var(--ink);}
  /* Eingeklappt, aber es wird gesucht: die Lupe traegt die Markenfarbe.
     Sonst filtert die Liste, ohne dass man sieht warum - der schlimmste
     Zustand einer Suche, die sich wegklappen laesst. */
  .dash-search-inline.hat-text{border-color:var(--brand);background:var(--brand-soft);}
  .dash-search-inline.hat-text .dsi-ico{stroke:var(--brand-dk,var(--brand));}
  /* "Neu" als eigener Knopf ganz vorn - auf jeder Breite derselbe Ort und
     dieselbe Form. Es ist die einzige HANDLUNG dieser Zeile; alles andere
     filtert nur, deshalb steht es abgesetzt und gefuellt. */
  .dtb-neu{flex:none;width:40px;height:40px;display:inline-flex;align-items:center;
    justify-content:center;border-radius:12px;cursor:pointer;padding:0;font:inherit;
    transition:box-shadow .15s,transform .08s,background .15s;}
  .dtb-neu svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.8;
    stroke-linecap:round;stroke-linejoin:round;}
  .dtb-neu:active{transform:scale(.95);}
  .dash-search-inline .dsi-ico{width:18px;height:18px;flex:none;fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .dash-toolbar.such-offen .dash-search-inline .dsi-ico{width:16px;height:16px;stroke:var(--muted);}
  .dash-search-inline input{flex:1;min-width:0;border:none;background:transparent;font:inherit;font-size:14px;color:var(--text);outline:none;}
  .dash-search-inline .dsi-clear{display:none;border:0;background:transparent;font-size:18px;line-height:1;color:var(--muted);cursor:pointer;padding:2px 4px;flex:none;}
  .dash-plus{flex:none;width:40px;height:40px;border:1.5px solid var(--brand);background:var(--brand);color:#fff;
    border-radius:11px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:filter .15s,transform .08s;}
  .dash-plus:hover{filter:brightness(1.06);}
  .dash-plus:active{transform:scale(.95);}
  .dash-plus svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;}
  @media (max-width:420px){ .usage-mini .um-label{display:none;} .usage-mini{padding:8px 10px;} }

  /* ===== AUFGABEN-KOPFZEILE (2.82.0) =====================================
     WIE ES FUNKTIONIERT: eine Zeile mit vier Gruppen - Fach-Auswahl,
     Thema-Auswahl, Suchfeld mit eingebautem "Neu", und rechts die Ansicht
     (Aktiv / Archiv / Papierkorb). Gebaut wird sie in dashToolbar()
     (static/js/index-app.js), die Panels haengen an .dtb-drop.
     WARUM Auswahlfelder statt der frueheren Kachelgitter: ein Fach hat
     unbegrenzt viele Themen. Das Kachelgitter wuchs waagerecht, wurde am
     rechten Rand abgeschnitten und musste per fitThemaText je Kachel anders
     gross geschrieben werden - nebeneinander stehende Kacheln in
     verschiedenen Schriftgroessen lesen sich wie ein Fehler. Ein Auswahlfeld
     ist bei 15 wie bei 60 Themen exakt gleich hoch.
     ACHTUNG: fitThemaText und .dft-tile bleiben im Code - die Boerse und die
     Kurse benutzen sie weiterhin. Nur die Aufgabenseite nicht mehr. */
  /* Die Kopfzeile bleibt beim Scrollen stehen (2.83.0, Wunsch Murat 31.07.):
     sie ist die einzige Steuerung der Seite - wer bei Aufgabe 30 das Fach
     wechseln will, soll nicht erst nach oben zurueckrollen muessen. `sticky`
     statt `fixed`: fixed nimmt das Element aus dem Fluss, dann springt die
     Liste beim Anheften um die Hoehe der Leiste nach oben. */
  .dash-toolbar{position:sticky;top:0;z-index:50;background:var(--card);
    padding:10px 0;margin-top:2px;}
  .dash-toolbar::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
    background:var(--line);opacity:0;transition:opacity .15s;}
  .dash-toolbar.haftet::after{opacity:1;}
  .dtb-drop{position:relative;flex:none;}
  .dtb-btn{appearance:none;display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 12px;
    border:1.5px solid var(--line);border-radius:11px;background:var(--card);color:var(--ink);
    font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;white-space:nowrap;max-width:210px;
    transition:border-color .12s;}
  .dtb-btn:hover{border-color:var(--brand);}
  /* Waehrend der Suche treten die Filter zur Seite - sie bleiben klickbar
     (ein Klick beendet die Suche), sehen aber nicht mehr nach "gilt gerade"
     aus. Ohne dieses Zeichen stuende unter "Mathematik" eine Biologie-Aufgabe,
     ohne dass irgendetwas den Grund verraet. */
  .dtb-btn.aus{opacity:.45;border-style:dashed;}
  .dtb-btn.aus:hover{opacity:.75;}
  /* Trefferzeile der Suche: sie ist der einzige Ort, an dem steht, dass
     gerade ueber alle Faecher gesucht wird. */
  #dash-subtitle{font-size:12.5px;color:var(--muted);font-weight:600;margin:10px 2px 0;}
  .dtb-btn .dtb-lbl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  /* Zwei Beschriftungen, eine sichtbar. GRUNDREGEL (Tablet/Computer): der
     lange, echte Wert. Auf dem Telefon tauscht der 640px-Block sie gegen den
     Kategorienamen („Fach", „Thema") - siehe dort. */
  .dtb-lang{display:inline;}
  .dtb-kurz{display:none;}
  .dtb-btn .dtb-cnt{color:var(--muted);font-weight:700;flex:none;}
  .dtb-btn svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:2.2;
    stroke-linecap:round;stroke-linejoin:round;transition:transform .15s;}
  .dtb-btn.offen svg.dtb-chev{transform:rotate(180deg);}
  .dtb-panel{display:none;position:absolute;top:46px;left:0;z-index:60;width:250px;padding:6px;
    background:var(--card);border:1.5px solid var(--line);border-radius:13px;
    box-shadow:0 10px 30px rgba(0,0,0,.13);}
  .dtb-panel.offen{display:block;}
  .dtb-panel-wide{width:284px;}
  /* Klassenstufen sind kurz und wenige - ein schmales Panel reicht, ein
     breites saehe leer aus. */
  .dtb-panel-klasse{width:186px;}
  .dtb-such{width:100%;height:34px;padding:0 10px;margin-bottom:6px;border:1.5px solid var(--line);
    border-radius:9px;background:var(--paper);font:inherit;font-size:13.5px;color:var(--ink);outline:none;}
  .dtb-such:focus{border-color:var(--brand);}
  .dtb-liste{max-height:262px;overflow-y:auto;}
  .dtb-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;
    border-radius:9px;font-size:13.5px;cursor:pointer;color:var(--ink);}
  .dtb-item:hover{background:var(--paper);}
  .dtb-item.sel{background:var(--brand-soft);color:var(--brand-dk);font-weight:700;}
  .dtb-item .dtb-nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
  .dtb-item .dtb-n{color:var(--muted);font-weight:700;flex:none;font-size:12.5px;}
  .dtb-item .dtb-stift{opacity:0;flex:none;width:15px;height:15px;fill:none;stroke:var(--muted);
    stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .dtb-item:hover .dtb-stift{opacity:.8;}
  /* Trennt die festen Oberthemen von dem, was jemand selbst geschrieben hat.
     Ohne diese Zeile stuenden beide gemischt untereinander - dann ist der
     Unterschied unsichtbar, und der Katalog haette keinen Sinn. */
  .dtb-grp{font-size:10.5px;font-weight:800;color:var(--muted);padding:10px 10px 4px;
    margin-top:4px;border-top:1px solid var(--line);}
  .dtb-fuss{margin-top:6px;padding-top:6px;border-top:1px solid var(--line);}
  .dtb-fuss .dtb-item{color:var(--muted);font-weight:600;}
  /* Suchfeld: "Neu" sitzt IM Feld am rechten Rand (statt als eigener Knopf
     daneben) - eine Gruppe weniger in einer ohnehin vollen Zeile. */
  /* Glas-Optik (2.83.0): halbdurchsichtiger Verlauf + Unschaerfe dahinter,
     eine helle Innenkante oben und ein farbiger Schatten darunter. Das ist
     KEINE Dekoration um ihrer selbst willen - die beiden wichtigsten Knoepfe
     der Seite ("Neu" und "Teilen") heben sich damit von den grauen
     Umrandungen ringsum ab, ohne lauter zu werden. `backdrop-filter` faellt
     auf aelteren Browsern still weg; dann bleibt der Verlauf, und der traegt
     allein. */
  /* --flaeche-akzent wird von applyShellFarbe() gesetzt und ist die GESAETTIGTE
     Fassung der gewaehlten Flaechenfarbe (gleicher Farbton, dunkel genug fuer
     weisse Schrift). Ohne Wahl bleibt es der Markenton. So passen die Knoepfe
     zur Umgebung, ohne dass irgendwo eine zweite Farbe gepflegt werden muss.
     Der Verlauf ist eine WEISSE Aufhellung UEBER der Vollfarbe - dadurch
     funktioniert er mit jedem Farbton, ohne dass man je Farbe ein eigenes
     rgba() braeuchte. */
  .ss-glas{background:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,0)),
      var(--flaeche-akzent,var(--brand));
    border:1px solid rgba(255,255,255,.30);color:#fff;
    -webkit-backdrop-filter:blur(10px) saturate(1.5);backdrop-filter:blur(10px) saturate(1.5);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.38),0 4px 14px rgba(0,0,0,.14);}
  .ss-glas:hover{background:linear-gradient(180deg,rgba(255,255,255,.32),rgba(255,255,255,.04)),
      var(--flaeche-akzent,var(--brand));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 6px 18px rgba(0,0,0,.18);}
  .ss-glas:active{transform:scale(.97);}
  /* Ansicht-Umschalter. Archiv und Papierkorb sind seit 2.82.0 KEINE eigenen
     Seiten mehr, sondern derselbe Bildschirm mit einer anderen Menge - deshalb
     ein Segment und kein Link nach unten. */
  /* `margin-left:auto` ist die Federung der Zeile: es sammelt den freien
     Platz VOR dem Segment. Seit die Suche ueberall ein 40px-Symbol ist, gibt
     es kein dehnbares Element mehr - ohne diese Zeile klumpt alles links und
     rechts bleibt eine leere Flaeche. Ein automatischer Rand VERTEILT nur den
     Rest; `flex-grow` an einem Element mit eigener Inhaltsbreite wuerde die
     Zeile stattdessen aufblaehen und den Nachbarn Breite wegnehmen (der
     Fehler aus 2.90.2). */
  .dtb-seg{flex:none;margin-left:auto;display:flex;gap:2px;padding:2px;border:1.5px solid var(--line);
    border-radius:11px;background:var(--paper);}
  .dtb-seg button{appearance:none;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 11px;
    border:0;background:transparent;border-radius:8px;font:inherit;font-size:12.5px;font-weight:600;
    color:var(--muted);cursor:pointer;white-space:nowrap;transition:background .12s,color .12s;}
  .dtb-seg button:hover{color:var(--ink);}
  /* Rueckmeldung Murat 31.07.2026: "anlasilmiyor neyin aktif oldugu". Ein
     zarter Farbton reicht nicht, wenn drei Knoepfe nebeneinander stehen und
     zwei davon auch noch Symbole tragen. Die aktive Wahl ist jetzt GEFUELLT -
     derselbe Unterschied wie zwischen Papier und Stift, nicht zwei Grautoene. */
  .dtb-seg button.an{background:linear-gradient(180deg,rgba(255,255,255,.20),rgba(255,255,255,0)),
      var(--flaeche-akzent,var(--brand));
    color:#fff;font-weight:700;border:1px solid rgba(255,255,255,.28);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 2px 8px rgba(0,0,0,.16);}
  .dtb-seg button.an .seg-n{color:#fff;opacity:.78;}
  .dtb-seg button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;
    stroke-linecap:round;stroke-linejoin:round;}
  .dtb-seg .seg-n{color:var(--muted);font-weight:700;}
  /* Ansicht als EIN Auswahlfeld - nur am Telefon sichtbar (Regel im Block
     max-width:900px). Am Desktop bleibt das Dreier-Segment: dort ist Platz,
     und ein Segment zeigt alle drei Mengen samt Zahlen auf einen Blick. */
  .dtb-zone-mob{display:none;margin-left:auto;}
  .dtb-zone-btn{gap:6px;padding:0 9px;}
  /* currentColor, NICHT die Flaechenfarbe: das Feld steht neben Fach und Thema
     und soll wie sie aussehen. Ausserdem waechst der Akzent sonst unbemerkt
     ueber seine Liste hinaus (qa/unit/test_flaeche_akzent.py). */
  .dtb-btn .dtb-zico{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;
    stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* Rechtsbuendig aufklappen: das Feld steht ganz rechts in der Leiste - ein
     linksbuendiges Panel liefe aus dem Bild. */
  .dtb-panel-zone{width:196px;left:auto;right:0;}
  .dtb-panel-zone .dtb-item{gap:9px;}
  .dtb-panel-zone .dtb-item .dtb-nm{flex:1;}
  .dtb-panel-zone .dtb-item .dtb-zico{width:16px;height:16px;flex:none;fill:none;
    stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.75;}
  /* Ab 1180px wird die Zeile eng. NACHGEBEN sollen die beiden Auswahlfelder:
     ihre Beschriftung kuerzt sich mit "…", und was dort abgeschnitten wird,
     steht eine Zeile spaeter ohnehin in jedem Listeneintrag.
     NICHT nachgeben soll das Ansicht-Segment - seine Woerter SIND die Namen
     der drei Bereiche, und ein halber Knopf am rechten Rand sieht aus wie ein
     Rand, nicht wie "hier geht es weiter".
     Bis 2.90.0 war es genau andersherum (die Woerter des Segments fielen ab
     1180px weg, die Felder blieben breit). Rueckmeldung Murat 01.08.2026:
     "o güzel dügmelerden kesme asla, textleri de ciksin tablet boyutunda". */
  @media (max-width:1180px){
    .dtb-drop{flex:0 1 auto;min-width:66px;}
    .dtb-btn{max-width:100%;padding:0 10px;}
    .dtb-seg{flex:none;}
    .dtb-seg button{padding:0 10px;}
  }

  /* ===== LISTE + KARTE ================================================== */
  .dash-split{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;
    align-items:start;margin-top:14px;}
  /* Beim Scrollen soll die LISTE laufen, nicht die Karte (Wunsch Murat
     31.07.2026). `top` ist die Hoehe der haftenden Kopfzeile (40px Knopf +
     2x10px Polster) plus etwas Luft - mit dem alten top:12px rutschte die
     Karte unter die Leiste und ihr Titel verschwand. */
  .dash-detail{position:sticky;top:72px;}
  /* ===== LISTE ALS TABELLE (2.83.0) ======================================
     WARUM SPALTEN: die Zeile trug frueher ALLES in einer grauen Unterzeile
     (Fach · Thema · Klasse · Datum). Das liest sich als Fliesstext - man kann
     zwei Zeilen nicht vergleichen und schon gar nicht danach sortieren.
     Jetzt: Klassenstufe und Erstelldatum sind eigene, sortierbare Spalten;
     unter dem Titel bleibt nur der PFAD (Fach › Thema) - er sagt, WO die
     Aufgabe liegt, und wiederholt nichts, was rechts schon in einer Spalte
     steht. Das Fach braucht keine eigene Spalte: es ist oben in der Leiste
     bereits gewaehlt und in JEDER Zeile dasselbe.
     Am Telefon (<=900px) faellt alles bis auf den Titel weg; dort wandern
     Klasse und Datum zurueck in die Unterzeile (.dq-m-mob) - eine Tabelle mit
     vier Spalten waere auf 380px Breite unlesbar.
     Gebaut in dashListe() (static/js/index-app.js), sortiert dashSortieren(). */
  .dq-kopf,.dq-row{display:grid;grid-template-columns:minmax(0,1fr) 76px 116px 74px;gap:10px;}
  .dq-kopf{padding:0 10px 7px;font-size:11.5px;color:var(--muted);font-weight:700;
    border-bottom:1px solid var(--line);}
  .dq-kopf .dq-r{text-align:right;}
  .dq-kopf .dq-c{text-align:center;}
  /* Sortierbare Ueberschrift: dasselbe Muster wie .mtl-th-sort im Team-Board -
     Klick sortiert, erneuter Klick dreht um, der Pfeil zeigt den Zustand. */
  .dq-kopf .dq-th{cursor:pointer;user-select:none;border-radius:6px;padding:2px 4px;margin:-2px -4px;
    transition:color .12s,background .12s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .dq-kopf .dq-th:hover{color:var(--ink);background:var(--paper);}
  .dq-kopf .dq-th.an{color:var(--brand-dk);}
  .dq-kopf .dq-pf{font-size:9px;opacity:.9;}
  .dq-row{align-items:center;padding:10px;border-bottom:1px solid var(--line);border-radius:10px;
    cursor:pointer;transition:background .1s;}
  .dq-row:hover{background:var(--paper);}
  .dq-row.sel{background:var(--brand-soft);}
  .dq-row .dq-t{font-size:13.5px;font-weight:600;color:var(--ink);overflow:hidden;
    text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;gap:6px;}
  .dq-row.sel .dq-t{color:var(--brand-dk);}
  .dq-row .dq-m{font-size:11.5px;color:var(--muted);margin-top:3px;overflow:hidden;
    text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;gap:5px;}
  /* Pfad Fach › Thema: das Trennzeichen ist bewusst blasser als der Text -
     es strukturiert, ohne selbst gelesen zu werden. */
  .dq-row .dq-m .dq-sep{opacity:.5;font-size:12px;line-height:1;flex:none;}
  .dq-row .dq-m .dq-th2{overflow:hidden;text-overflow:ellipsis;}
  .dq-row .dq-m-mob{display:none;}
  .dq-row .dq-k,.dq-row .dq-d{font-size:12.5px;color:var(--muted);text-align:center;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .dq-row .dq-k{font-weight:700;color:var(--ink);}
  .dq-row .dq-d small{display:block;font-size:11px;opacity:.75;margin-top:1px;}
  .dq-row .dq-f{font-size:13px;color:var(--muted);text-align:right;font-weight:600;}
  .dq-row .dq-ico{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:2;
    stroke-linecap:round;stroke-linejoin:round;}
  .dq-leer{color:var(--muted);font-size:13.5px;padding:26px 10px;text-align:center;line-height:1.55;}
  /* ===== BÖRSE (2.94.0) ==================================================
     Dieselbe Bauform wie die Aufgabenliste, nur andere Spalten: in einer
     FREMDEN Sammlung tragen "von wem" und "wie oft schon kopiert" die
     Information, die auf der eigenen Seite "Abgaben" traegt. Der Name des
     Autors braucht mehr Platz als eine Zahl - deshalb ein eigenes Raster
     statt der geerbten Breiten. */
  #boerse-list .dq-kopf,#boerse-list .dq-row{grid-template-columns:minmax(0,1fr) 66px 132px 74px;}
  #boerse-list .dq-row .dq-d{font-weight:600;color:var(--ink);}
  /* Lautlesezeit ist die EINE Ausnahme: Buecher bleiben Karten, weil das
     Titelbild bei einem Buch die eigentliche Information ist. Dann gibt es
     nichts auszuwaehlen - die Karte rechts faellt weg und die Liste bekommt
     die ganze Breite. */
  .dash-split.nur-liste{grid-template-columns:minmax(0,1fr);}
  .dash-split.nur-liste .dash-detail{display:none;}
  .dqd-card{border:1.5px solid var(--line);border-radius:14px;background:var(--card);padding:16px;}
  .dqd-t{font-size:16px;font-weight:800;line-height:1.3;color:var(--ink);}
  .dqd-m{font-size:12.5px;color:var(--muted);margin-top:4px;}
  .dqd-warn{font-size:12px;color:var(--bad);margin-top:7px;font-weight:600;}
  .dqd-akt{display:flex;gap:7px;margin:14px 0;}
  .dqd-haupt{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:40px;
    border-radius:12px;font:inherit;font-size:13.5px;font-weight:700;cursor:pointer;
    transition:box-shadow .15s,transform .08s,background .15s;}
  /* Grau = eine Rueckhol-Aktion (Archiv, Papierkorb). Die darf NICHT wie der
     taegliche Hauptknopf aussehen, sonst klickt man sie versehentlich. */
  .dqd-haupt.grau{background:var(--card);color:var(--ink);border:1.5px solid var(--line);
    box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;}
  .dqd-haupt.grau:hover{border-color:var(--brand);background:var(--paper);box-shadow:none;}
  .dqd-haupt svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;
    stroke-linecap:round;stroke-linejoin:round;}
  .dqd-ico{flex:none;width:38px;height:38px;border:1.5px solid var(--line);background:var(--card);
    border-radius:11px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--ink);
    transition:border-color .12s;}
  .dqd-ico:hover{border-color:var(--brand);}
  .dqd-ico.rot{color:var(--bad);}
  .dqd-ico svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;
    stroke-linecap:round;stroke-linejoin:round;}
  .dqd-link{font-size:13px;color:var(--brand);font-weight:600;cursor:pointer;display:inline-flex;
    align-items:center;gap:5px;margin-bottom:12px;}
  .dqd-link:hover{text-decoration:underline;}
  .dqd-boerse{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;
    color:var(--ok);margin-top:6px;}
  .dqd-boerse svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;
    stroke-linecap:round;stroke-linejoin:round;}
  /* Angaben als LISTE, nicht als Kachelgitter (Rueckmeldung Murat 01.08.2026:
     "heryer kutu kutu olmus"). Auf einem Bildschirm, auf dem schon zwei Karten
     uebereinander stehen, ergaenzt ein drittes Kaestchenraster nichts - es
     zerlegt nur dieselbe Information in noch mehr Rahmen. Zeilen mit einer
     hauchduennen Trennlinie: Beschriftung links gedaempft, Wert rechts
     betont. Das Auge liest die Werte in EINER Spalte untereinander. */
  .dqd-ang{border-top:1px solid var(--line);margin-top:13px;padding-top:4px;}
  .dqd-ang-k{display:flex;align-items:baseline;justify-content:space-between;gap:14px;
    padding:9px 2px;border-bottom:1px solid var(--line);}
  .dqd-ang-k:last-child{border-bottom:none;}
  .dqd-ang-l{font-size:12.5px;color:var(--muted);flex:none;}
  .dqd-ang-w{font-size:13.5px;font-weight:700;color:var(--ink);text-align:right;
    min-width:0;word-break:break-word;}
  .dqd-fr-h{font-size:11.5px;color:var(--muted);font-weight:700;border-top:1px solid var(--line);
    padding-top:11px;}
  .dqd-fr{font-size:12.5px;line-height:1.5;color:var(--ink);margin-top:8px;display:flex;gap:8px;}
  .dqd-fr .dqd-nr{color:var(--muted);flex:none;font-weight:700;}
  .dqd-mehr{font-size:12.5px;color:var(--muted);margin-top:10px;}
  /* Zweite Karte unter der ersten: was sich zu dieser Aufgabe herunterladen
     laesst (Wunsch Murat 31.07.2026). BEWUSST eine eigene Karte und keine
     Zeile in der ersten: oben steht, WAS die Aufgabe ist, hier WAS man damit
     macht. Die Formate werden erst beim Klick erzeugt - dafuer muss die
     Aufgabe einmal geladen werden, und das passiert nur auf ausdrueckliche
     Anforderung, nicht bei jeder Auswahl in der Liste. */
  .dqd-dl{border:1.5px solid var(--line);border-radius:14px;background:var(--card);padding:14px 16px;
    margin-top:12px;}
  .dqd-dl-h{font-size:11.5px;color:var(--muted);font-weight:700;margin-bottom:10px;}
  .dqd-dl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;}
  .dqd-dl-btn{appearance:none;display:inline-flex;align-items:center;gap:8px;padding:9px 11px;
    border:1.5px solid var(--line);background:var(--card);border-radius:11px;font:inherit;
    font-size:12.5px;font-weight:600;color:var(--ink);cursor:pointer;text-align:left;
    transition:border-color .12s,background .12s;}
  .dqd-dl-btn:hover{border-color:var(--brand);background:var(--paper);}
  .dqd-dl-btn:disabled{opacity:.55;cursor:progress;}
  .dqd-dl-btn svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;
    stroke-linecap:round;stroke-linejoin:round;color:var(--brand);}
  .dqd-dl-hinweis{font-size:11.5px;color:var(--muted);margin-top:9px;line-height:1.45;}
  .dqd-zurueck{display:none;align-items:center;gap:7px;font-size:13.5px;font-weight:700;color:var(--brand);
    cursor:pointer;padding:4px 2px 12px;}
  .dqd-zurueck svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.4;
    stroke-linecap:round;stroke-linejoin:round;}
  /* Karte ohne Auswahl (Desktop): dezenter Platzhalter statt leerer Flaeche. */
  .dqd-platz{border:1.5px dashed var(--line);border-radius:14px;padding:30px 18px;text-align:center;
    color:var(--muted);font-size:13px;line-height:1.55;}

  /* ===== TELEFON: EINE Spalte, Karte statt Liste ========================
     KEIN Umbruch nach unten (Wunsch Murat 31.07.2026): die Karte erscheint
     nicht UNTER der Liste, sondern AN IHRER STELLE - mit einem Zurueck-Knopf.
     Deshalb schaltet .detail-offen die Liste hart ab, statt das Raster nur
     einspaltig zu machen. */
  /* ===== DESKTOP: LISTE SCROLLT, KARTE STEHT ============================
     Wunsch Murat 01.08.2026 ("sagdaki kutular sabit kalsin"). position:sticky
     reichte dafuer NICHT: sobald Angaben- und Herunterladen-Karte zusammen
     hoeher sind als der Bildschirm, klebt eine sticky-Box nicht mehr, sondern
     scrollt mit. Deshalb bekommt der Aufgaben-Screen hier dieselbe feste
     Bauform wie das Cockpit: der Screen selbst scrollt NICHT (overflow:hidden),
     stattdessen scrollt jede Spalte fuer sich. Ergebnis: die Kopfzeile und die
     Karte rechts bleiben immer an ihrem Platz, egal wie lang die Liste ist.
     Gilt nur ab 901px - am Telefon gibt es ohnehin nur EINE Spalte. */
  @media (min-width:901px){
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse{
      overflow:hidden;display:flex;flex-direction:column;}
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard > .card,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse > .card{
      flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard .dash-split,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse .dash-split{
      flex:1 1 auto;min-height:0;align-items:stretch;}
    /* Beide Spalten scrollen intern und OHNE sichtbaren Balken - wie ueberall
       in der App-Shell (sonst stehen zwei Balken nebeneinander). */
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard #dash-list,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse #boerse-list,
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard .dash-detail,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse .dash-detail{
      min-height:0;overflow-y:auto;scrollbar-width:none;overscroll-behavior-y:contain;}
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard #dash-list::-webkit-scrollbar,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse #boerse-list::-webkit-scrollbar,
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard .dash-detail::-webkit-scrollbar,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse .dash-detail::-webkit-scrollbar{
      display:none;}
    /* In dieser Bauform haftet nichts mehr - die Leiste steht ohnehin fest. */
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard .dash-detail,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse .dash-detail{position:static;}
    body.has-sidebar:not(.lh-fullscreen) #screen-dashboard .dq-kopf,
    body.has-sidebar:not(.lh-fullscreen) #screen-boerse .dq-kopf{
      position:sticky;top:0;z-index:2;background:var(--card);padding-top:6px;}
  }

  @media (max-width:900px){
    .dash-split{grid-template-columns:minmax(0,1fr);gap:0;}
    .dash-detail{position:static;}
    /* Eine Spalte: nur der Titel + die Unterzeile. Klasse, Erstellt und
       Abgaben verschwinden als Spalten und stehen (Klasse/Datum) hinten in
       der Unterzeile - siehe Kommentar bei .dq-kopf. */
    /* #boerse-list MUSS hier mitstehen (2.94.2): die Boersen-Regel traegt eine
       ID und schlaegt damit jede Klassen-Regel - egal, wo sie steht. Ohne
       diese Zeile behielt die Boerse am Telefon ihre vier Spalten, die drei
       hinteren waren per display:none unsichtbar, ihre Breite aber weiterhin
       reserviert: der Titel bekam noch ein Drittel der Zeile und stand
       abgeschnitten da. */
    .dq-kopf,.dq-row,
    #boerse-list .dq-kopf,#boerse-list .dq-row{grid-template-columns:minmax(0,1fr);gap:0;}
    .dq-kopf .dq-c,.dq-kopf .dq-r,
    .dq-row .dq-k,.dq-row .dq-d,.dq-row .dq-f{display:none;}
    .dq-row .dq-m-mob{display:block;flex:none;}
    .dash-split .dash-detail{display:none;}
    .dash-split.detail-offen #dash-list,
    .dash-split.detail-offen #boerse-list{display:none;}
    .dash-split.detail-offen .dash-detail{display:block;}
    .dash-split.detail-offen .dqd-zurueck{display:inline-flex;}
    /* EINE Zeile am Telefon UND auf dem Tablet (Wunsch Murat 31.07.2026:
       "tek sira olabiliyosa mükemmel"). Dafuer schrumpfen hier nur noch die
       Auswahlfelder - Lupe, "Neu" und das Segment sehen aus wie am Desktop.
       Das Ansicht-Segment BLEIBT hier mit seinen Woertern stehen; erst unter
       700px (echtes Telefon) wird daraus ein Auswahlfeld. */
    .dtb-btn{padding:0 9px;font-size:12.5px;gap:5px;}
    .dash-toolbar{flex-wrap:nowrap;gap:6px;}
    /* AUFKLAPPEN OHNE DIE SEITE ZU VERBREITERN (2.94.2, Rueckmeldung Murat:
       "acilan menü saga kayiyor, sayfanin tamamini büyütüp saga kaydiriyor").
       Die Panels waren `position:absolute; left:0` AM KNOPF und 250px breit.
       Beim dritten Feld (Klasse) beginnt der Knopf schon rechts - das Panel
       ragte damit ueber den Bildschirmrand hinaus, und der Browser machte die
       ganze Seite breiter, statt es umzuhaengen.
       Jetzt haengt das Panel am WERKZEUGBALKEN (die Felder geben dafuer ihren
       eigenen Bezugsrahmen ab) und nimmt dessen volle Breite ein: es kann
       nicht mehr herausragen, egal welches Feld man tippt. Nebenbei ist damit
       auch mehr Platz fuer die Namen - vorher kuerzten sie mit "…". */
    .dash-toolbar .dtb-drop{position:static;}
    .dash-toolbar .dtb-panel{left:0;right:0;top:52px;width:auto;max-width:none;}
  }

  /* ===== NUR ECHTES TELEFON (<=700px): Ansicht als Auswahlfeld ==========
     WARUM 700 und nicht 900 (Korrektur 2.90.1, Rueckmeldung Murat
     01.08.2026: "tablette de o dügmeye yapmissin ... tablete sigiyodu"):
     Auf dem Tablet ist Platz fuer die drei Knoepfe MIT ihren Woertern - dort
     ein einzelnes Auswahlfeld zu zeigen nimmt Information weg, die
     hineinpasst. Zu eng wird es erst darunter: bei 700px braucht die Zeile
     mit Segment, beiden Feldern, Lupe und "Neu" rund 660px, und das ist die
     Grenze, unter der es nicht mehr aufgeht.
     Damit auch dort nichts abgeschnitten wird, geben die beiden
     Auswahlfelder nach: sie teilen sich den Rest der Zeile (flex:1 1 0) und
     kuerzen ihre Beschriftung mit "…". Alles andere ist flex:none - so
     bestimmt die Bildschirmbreite, wie breit die drei Filter sind, statt
     dass die Leiste ueber den Rand hinauswaechst. */
  @media (max-width:700px){
    .dtb-seg{display:none;}
    .dtb-zone-mob{display:block;flex:none;margin-left:0;}
    /* Hier teilen sich die drei Filter den Rest der Zeile - eine Federung am
       Segment braucht es nicht, weil es hier gar kein Segment mehr gibt. */
    .dash-toolbar .dtb-drop:not(.dtb-zone-mob){flex:1 1 0;min-width:54px;}
    /* Beim Klassen-Filter faellt das Wort weg: "Klasse 7" wird zu "7",
       "Alle Klassen" zu "Klassen". Die Zahl ist das Unterscheidende - das
       Wort davor ist auf 54px Breite Ballast. */
    .dtb-kl-w{display:none;}
  }
  /* ===== FACH-KACHELN (quadratisch, Icon oben, Name unten) ===== */
  .fach-tile{appearance:none;flex:none;scroll-snap-align:start;width:104px;height:96px;padding:12px 8px 10px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
    border:1.5px solid var(--line);background:var(--card);border-radius:15px;cursor:pointer;-webkit-user-select:none;user-select:none;
    font-family:inherit;transition:border-color .12s,background .12s,transform .08s,box-shadow .12s;position:relative;}
  .fach-tile:hover{border-color:var(--brand);}
  .fach-tile:active{transform:scale(.96);}
  .fach-tile .ft-ico{width:38px;height:38px;border-radius:11px;flex:none;display:flex;align-items:center;justify-content:center;}
  .fach-tile .ft-ico svg{width:22px;height:22px;fill:none;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;}
  .fach-tile .ft-name{font-weight:700;font-size:12.5px;color:var(--ink);text-align:center;line-height:1.15;
    max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .fach-tile .ft-cnt{position:absolute;top:7px;right:8px;font-size:10.5px;font-weight:800;
    padding:1px 6px;border-radius:99px;background:rgba(127,127,127,.14);color:var(--muted);}
  .fach-tile.active{color:#fff;border-color:transparent;box-shadow:0 5px 16px rgba(46,91,255,.2);}
  .fach-tile.active .ft-ico{background:rgba(255,255,255,.22)!important;}
  .fach-tile.active .ft-ico svg{stroke:#fff!important;}
  .fach-tile.active .ft-name{color:#fff;}
  .fach-tile.active .ft-cnt{background:rgba(255,255,255,.26);color:#fff;}
  .fach-tile.add-tile,.fach-tile.manage-tile{border-style:dashed;color:var(--muted);}
  .fach-tile.add-tile:hover,.fach-tile.manage-tile:hover{color:var(--brand);border-color:var(--brand);}
  .fach-tile.add-tile .ft-ico svg,.fach-tile.manage-tile .ft-ico svg{stroke:currentColor;}
  .fach-tile.manage-tile{border-style:solid;}
  .fach-tile.kb-tile{width:104px;height:104px;padding:9px 7px 8px;gap:5px;justify-content:center;}
  .fach-tile.kb-tile .kb-cname{font-size:22px;font-weight:800;line-height:1.05;-webkit-line-clamp:2;}
  .fach-tile.kb-tile .ft-ico{width:30px;height:30px;}
  .fach-tile.kb-tile .ft-ico svg{width:18px;height:18px;}
  .fach-tile.kb-tile .ft-name{font-size:12px;line-height:1.1;-webkit-line-clamp:2;}
  .fach-tile.kb-tile .ft-zeit{display:block;font-weight:600;font-size:8.5px;opacity:.65;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:88px;}
  /* Kleinere Klassen-Kacheln (Unterrichtsfächer): kompakter als Fach-Kacheln */
  .fach-tile.sm-tile{width:76px;height:72px;padding:8px 6px 7px;gap:5px;}
  .fach-tile.sm-tile .ft-ico{width:28px;height:28px;border-radius:9px;}
  .fach-tile.sm-tile .ft-ico svg{width:16px;height:16px;}
  .fach-tile.sm-tile .ft-name{font-size:11px;line-height:1.1;}
  .fach-tile.sm-tile .ft-cnt{top:5px;right:6px;font-size:9.5px;padding:1px 5px;}
  /* Zahnrad in der Kachel-Ecke (öffnet Verwalten-Menü) */
  .ft-gear{position:absolute;top:4px;left:5px;width:20px;height:20px;border:none;background:rgba(127,127,127,.10);
    border-radius:6px;cursor:pointer;color:var(--muted);display:flex;align-items:center;justify-content:center;padding:0;z-index:2;
    transition:background .12s,color .12s,transform .15s;}
  .ft-gear:hover{background:rgba(46,91,255,.14);color:var(--brand);transform:rotate(35deg);}
  .ft-gear svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .fach-tile.active .ft-gear{background:rgba(255,255,255,.22);color:#fff;}
  /* Runder Icon-Button für Zeilenaktionen (Umbenennen, Löschen, Excel, PDF, Würfel) */
  .icon-act{appearance:none;flex:none;width:42px;height:42px;border:1.5px solid var(--line);background:#fff;color:var(--muted);border-radius:11px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:border-color .12s,background .12s,color .12s;}
  .icon-act:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-soft);}
  .icon-act.danger:hover{border-color:var(--bad);color:var(--bad);background:var(--bad-soft);}
  .icon-act svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .kb-actions-row{-ms-overflow-style:none;scrollbar-width:none;}
  .kb-actions-row::-webkit-scrollbar{display:none;}
  .kb-actions-row .mini-btn{flex:none;white-space:nowrap;}
  /* Zurück-Link (einheitlich) */
  .back-link{display:flex;align-items:center;gap:5px;cursor:pointer;color:var(--muted);font-size:14px;font-weight:600;margin-bottom:14px;text-decoration:none;width:fit-content;}
  .back-link svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .back-link:hover{color:var(--brand);}
  /* Kebab-Menü (⋯) für Quiz-Zeilen */
  .kebab-wrap{position:relative;}
  .kebab-btn{appearance:none;width:34px;height:34px;border:1.5px solid var(--line);background:#fff;color:var(--muted);border-radius:9px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:border-color .12s,background .12s;}
  .kebab-btn:hover{border-color:var(--brand);background:var(--brand-soft);color:var(--brand);}
  .kebab-btn svg{width:18px;height:18px;fill:currentColor;}
  .kebab-menu{position:absolute;top:40px;right:0;z-index:40;min-width:190px;padding:6px;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(27,34,48,0.16);display:none;}
  .kebab-menu.open{display:block;}
  .kebab-menu button{display:flex;align-items:center;gap:10px;width:100%;appearance:none;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;color:var(--ink);text-align:left;padding:10px 11px;border-radius:8px;transition:background .12s;}
  .kebab-menu button:hover{background:rgba(127,127,127,0.10);}
  .kebab-menu button.danger{color:var(--bad);}
  .kebab-menu button.danger:hover{background:var(--bad-soft);}
  .kebab-menu button svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  .kebab-menu .km-divider{height:1px;background:var(--line);margin:5px 4px;}
  /* Gruppen-Ueberschrift im Menue (2.82.0). Die Eintraege stehen seit dem
     Umbau nach ABSICHT sortiert - Inhalt, Ordnung, Teilen, Ablage - statt als
     eine Liste, in der "In Papierkorb" dasselbe Gewicht hatte wie der
     taegliche Handgriff. Gebaut in dashKebabGruppen (index-app.js). */
  .kebab-menu .km-grp{font-size:11px;font-weight:800;letter-spacing:.02em;color:var(--muted);
    padding:9px 11px 4px;text-transform:none;}
  .kebab-menu .km-grp:first-child{padding-top:4px;}
  /* Karten-Grid (Börse) */
  .card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;}

  /* ===== KURS-LISTE: kompakte Zeile mit Icon-Aktionen ===== */
  .kurs-row{display:flex;align-items:center;gap:12px;border:1.5px solid var(--line);border-radius:13px;padding:12px 14px;margin-bottom:9px;transition:border-color .12s,box-shadow .12s;}
  .kurs-row:hover{border-color:var(--brand);box-shadow:0 3px 12px rgba(0,0,0,.05);}
  .kurs-row .kurs-main{flex:1;min-width:0;cursor:pointer;}
  .kurs-row .kurs-title{font-weight:800;font-size:15px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .kurs-row .kurs-sub{font-size:12.5px;color:var(--muted);margin-top:3px;}
  .kurs-acts{display:flex;align-items:center;gap:4px;flex:none;}
  .kurs-iact{appearance:none;background:none;border:none;padding:7px;border-radius:9px;color:var(--muted);cursor:pointer;
             display:inline-flex;align-items:center;justify-content:center;transition:color .12s,background .12s;}
  .kurs-iact:hover{color:var(--brand);background:rgba(127,127,127,.08);}
  .kurs-iact.danger:hover{color:var(--bad);background:var(--bad-soft,#FDECEA);}
  .kurs-iact svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  /* Aufklappbare Abschnitte im Kurs-Editor */
  .ke-fold{border:1.5px solid var(--line);border-radius:13px;margin-bottom:12px;overflow:hidden;}
  .ke-fold>summary{list-style:none;cursor:pointer;padding:13px 15px;font-weight:800;font-size:14.5px;color:var(--ink);
                   display:flex;align-items:center;justify-content:space-between;user-select:none;}
  .ke-fold>summary::-webkit-details-marker{display:none;}
  .ke-fold>summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);
                          transform:rotate(-45deg);transition:transform .15s;margin-left:8px;flex:none;}
  .ke-fold[open]>summary::after{transform:rotate(45deg);}
  .ke-fold>summary+*{padding:0 15px;}
  .ke-fold[open]>summary{border-bottom:1px solid var(--line);}

  /* ===== DASHBOARD THEMA-AUSWAHL (horizontale kleine Kacheln) ===== */
  .dft-zone{border-radius:16px;padding:10px 12px 4px;margin:8px 0 4px;transition:background .2s;}
  .dft-row{display:flex;align-items:center;gap:8px;margin-bottom:4px;}
  .dft-label{font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);flex:none;}
  .dft-scroll{display:flex;gap:9px;overflow-x:auto;padding:4px 2px 10px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;touch-action:pan-x;overscroll-behavior-x:contain;}
  .dft-scroll::-webkit-scrollbar{height:6px;}
  .dft-scroll::-webkit-scrollbar-thumb{background:rgba(127,127,127,.25);border-radius:99px;}
  /* Thema-Kachel: quadratisch, kleiner als die Fach-Kachel (104px -> 76px) */
  .dft-tile{appearance:none;flex:none;scroll-snap-align:start;width:76px;height:76px;border-radius:14px;border:1.5px solid var(--line);
            cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
            transition:transform .12s,box-shadow .15s,border-color .15s;position:relative;padding:6px;}
  .dft-tile:hover{transform:translateY(-2px);box-shadow:0 5px 13px rgba(0,0,0,.07);}
  .dft-tile:active{transform:scale(.96);}
  .dft-tile .dft-nm{font-weight:800;font-size:11px;text-align:center;line-height:1.15;
                    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-width:66px;}
  .dft-tile .dft-ct{position:absolute;top:5px;right:5px;font-size:9.5px;font-weight:800;min-width:15px;height:15px;
                    padding:0 4px;border-radius:99px;display:flex;align-items:center;justify-content:center;}
  .dft-tile .dft-edit{position:absolute;bottom:3px;right:4px;font-size:10px;line-height:1;opacity:0;transition:opacity .15s;cursor:pointer;}
  .dft-tile:hover .dft-edit{opacity:.55;}
  .dft-tile .dft-edit:hover{opacity:1;}
  .dft-tile.active{border-color:transparent;color:#fff;}
  .dft-tile.active .dft-nm{color:#fff;}
  /* "Verwalten" = nur ein Zahnrad: kein Hintergrund, kein Rahmen, kein Text */
  .dft-gear{appearance:none;background:none;border:none;padding:6px;margin:0;cursor:pointer;color:var(--muted);
            display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:10px;transition:color .15s,transform .15s;}
  .dft-gear:hover{color:var(--brand);transform:rotate(35deg);}
  .dft-gear svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  .dft-empty{color:var(--muted);font-size:13px;padding:10px 2px;}
  .quiz-card{border:1.5px solid var(--line);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px;background:var(--card);transition:border-color .12s,box-shadow .12s;}
  .quiz-card:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(46,91,255,0.08);}
  .quiz-card .qc-fach{display:inline-block;font-size:11px;font-weight:700;padding:3px 9px;border-radius:99px;background:var(--brand-soft);color:var(--brand-dk);width:fit-content;}
  .quiz-card .qc-title{font-weight:700;font-size:15px;line-height:1.3;}
  .quiz-card .qc-meta{font-size:12px;color:var(--muted);}
  /* Archiv-Akkordeon */
  .arch-head{display:flex;align-items:center;gap:8px;cursor:pointer;color:var(--muted);font-weight:700;font-size:13.5px;padding:12px 2px;user-select:none;margin-top:8px;border-top:1px solid var(--line);}
  .arch-head:hover{color:var(--brand);}
  .arch-head svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s;}
  .arch-head.open svg{transform:rotate(90deg);}
  /* Nutzungs-Karte (Free-Plan-Stil) */
  .usage-plan{border:1px solid var(--line);border-radius:16px;padding:16px 18px;background:linear-gradient(180deg,var(--brand-soft),var(--card));margin-bottom:4px;}
  .usage-plan .up-month{font-size:11.5px;font-weight:800;color:#fff;background:#1f2733;padding:4px 11px;border-radius:999px;}
  .usage-plan .up-track{height:9px;border-radius:999px;background:rgba(127,127,127,.18);overflow:hidden;}
  .usage-plan .up-track i{display:block;height:100%;border-radius:999px;transition:width .4s ease, background .3s ease;}
  /* === ERWEITERTE OPTIONEN === */
  /* =====================================================================
     MATERIAL-RESKIN (paddy-Einstieg 2026-07, docs/PLAN_GAST_START.md)
     Scoped auf #screen-upload – leakt NICHT in andere Screens.
     Teil 1: Kreide-Hintergrund + bunte Begruessung. Der Rest (Eingabe-
     kasten, Chips, Karten) folgt in eigenen Bloecken.
     ===================================================================== */
  /* Kein weisser Karten-Look mehr – der Inhalt schwebt auf dem Seitengrund
     (wie im Entwurf), dadurch werden auch die Kreide-Formeln sichtbar. Inhalt
     VERTIKAL MITTIG statt oben angeklebt. */
  #screen-upload.card{background:transparent;border:0;box-shadow:none;padding:16px 20px;margin:0;}
  /* align-items:center + width:100% an den Kindern: deterministisch – jedes
     Kind fuellt bis zu seiner max-width, egal welche Flex-Vorgaben die Shell
     mitbringt (der "alles klebt schmal in der Mitte"-Fix). */
  #screen-upload{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;
    min-height:calc(var(--vh100,100vh) - 150px);}
  /* Gast (ohne Seitenleiste): die globale .wrap-Kappe (720/1100px) fuer den
     Material-Screen anheben – der Entwurf ist breit und luftig. */
  body[data-screen="upload"]:not(.has-sidebar) .wrap{max-width:1240px;}
  /* Die alte, separate „Erweiterte Optionen"-Leiste entfaellt – das Zahnrad im
     Kasten oeffnet die Optionen. */
  #screen-upload > .adv-toggle{display:none;}
  /* Gast-Ansicht: obere Leiste (Logo, Begruessung, Anmelden) ausblenden – der
     Kasten begruesst selbst. Eingeloggt ist die .topbar ohnehin aus. */
  body[data-screen="upload"] .topbar{display:none !important;}
  /* Inhalt ueber die Kreide heben; die Kreide-Ebene bleibt ganz hinten. */
  #screen-upload > *{position:relative;z-index:1;}
  #screen-upload > .mat-chalk{z-index:0;}
  /* .mat-chalk erbt die komplette Optik von .auth-chalk (Font, Fade, Rotation);
     hier nur die Verortung als Vollflaechen-Hintergrund der Karte. */
  .mat-chalk{position:absolute;inset:0;border-radius:inherit;overflow:hidden;}
  /* Die alte schlichte "Material"-Ueberschrift weicht der bunten Begruessung. */
  #screen-upload > .screen-h2-dup{display:none;}
  .mat-greeting{font-size:29px;font-weight:500;letter-spacing:-.02em;line-height:1.25;
    text-align:center;margin:6px 0 22px;color:var(--ink);min-height:1.4em;}
  @media(max-width:720px){ .mat-greeting{font-size:22px;margin-bottom:16px;} }
  /* 2026-07: Fuer angemeldete Lehrkraefte steht die Begruessung OBEN in der
     App-Kopfzeile (setPageTitle, NAV_ACTIVE==="home") – sie ersetzt dort den
     frueheren Titel "Material bereitstellen". Das grosse H1 in der Karte
     entfaellt damit; es bleibt nur fuer GAESTE, die keine Seitenleiste und
     damit keine Kopfzeile haben. Spart eine komplette Ueberschriften-Zeile. */
  body.has-sidebar #screen-upload > .mat-greeting{display:none;}

  /* ===== Teil 2: paddy-Eingabekasten (komposit) – 1:1 aus dem Entwurf ===== */
  #screen-upload .komposit{position:relative;width:100%;max-width:1000px;margin:0 auto;}
  #screen-upload .notiz{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:10px;
    background:var(--brand-soft,#EEF2FF);border:1px solid rgba(46,91,255,.12);border-radius:16px;
    padding:10px 22px 24px;font-size:12.5px;}
  #screen-upload .notiz .l{display:inline-flex;align-items:center;gap:8px;color:#1B3FCC;font-weight:600;}
  #screen-upload .notiz .ring{width:12px;height:12px;border-radius:50%;border:2.5px solid var(--brand,#2E5BFF);flex:none;box-shadow:0 0 0 3px rgba(46,91,255,.14);}
  #screen-upload .notiz a{color:var(--brand,#2E5BFF);font-weight:700;text-decoration:none;white-space:nowrap;}
  #screen-upload .box{position:relative;z-index:2;margin-top:-14px;background:var(--card,#fff);
    border:1px solid var(--line);border-radius:16px;
    box-shadow:0 1px 2px rgba(16,24,40,.04),0 10px 30px rgba(16,24,40,.10),0 0 0 4px rgba(46,91,255,.05);}
  html[data-theme="dark"] #screen-upload .box{background:var(--paper,#1b2230);}
  /* Quell-Tabs versteckt: das +-Menue ersetzt sie. */
  #screen-upload .tabs.matcompat{display:none;}
  /* Textfeld als randloses "feld" oben im Kasten. */
  #screen-upload .box .field{border:0;padding:0;}
  #screen-upload textarea.mat-feld{width:100%;border:0;background:transparent;resize:none;
    padding:20px 20px 4px;font:inherit;font-size:15px;color:var(--ink);min-height:86px;line-height:1.5;}
  #screen-upload textarea.mat-feld:focus{outline:none;box-shadow:none;}
  #screen-upload #tab-file-content,#screen-upload #tab-yt-content{padding:14px 16px 2px;}
  #screen-upload .leiste{display:flex;align-items:center;gap:6px;padding:10px 12px 12px;position:relative;}
  #screen-upload .ikbtn{width:40px;height:40px;flex:none;border:0;background:transparent;border-radius:11px;cursor:pointer;color:var(--sub,#475569);display:flex;align-items:center;justify-content:center;transition:all .2s;}
  #screen-upload .ikbtn:hover,#screen-upload .ikbtn.aktiv{background:var(--brand-soft,#EEF2FF);color:var(--brand,#2E5BFF);}
  #screen-upload .ikbtn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  #screen-upload .leiste .spacer{margin-left:auto;}
  #screen-upload .senden{width:44px;height:44px;flex:none;border:0;border-radius:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;
    background:linear-gradient(180deg,#5B7BFF,#2E5BFF 55%,#1B3FCC);box-shadow:0 3px 10px rgba(46,91,255,.34),inset 0 1px 0 rgba(255,255,255,.3);transition:transform .2s;}
  #screen-upload .senden:hover{transform:translateY(-1px);}
  #screen-upload .senden:disabled{opacity:.5;box-shadow:none;cursor:not-allowed;transform:none;}
  #screen-upload .senden svg{width:20px;height:20px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;}
  #screen-upload .pop{position:absolute;z-index:20;background:var(--card,#fff);border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 28px rgba(16,24,40,.12),0 40px 90px rgba(16,24,40,.20);}
  #screen-upload .pop.pop-add{left:10px;bottom:60px;width:290px;padding:7px;}
  #screen-upload .pop-add .zeile{display:flex;align-items:center;gap:12px;padding:12px;border-radius:11px;cursor:pointer;font-size:14px;font-weight:600;color:var(--ink);transition:background .18s;}
  #screen-upload .pop-add .zeile:hover{background:var(--brand-soft,#EEF2FF);}
  #screen-upload .pop-add .zeile .ic{width:36px;height:36px;border-radius:10px;background:var(--brand-soft,#EEF2FF);display:flex;align-items:center;justify-content:center;flex:none;}
  #screen-upload .pop-add .zeile .ic svg{width:18px;height:18px;fill:none;stroke:var(--brand,#2E5BFF);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  #screen-upload .pop-add .zeile small{display:block;font-size:11.5px;font-weight:500;color:var(--muted);margin-top:1px;}

  /* ===== Teil 3: Beispiel-Fächer-Chips + Karten ===== */
  #screen-upload .faczeile{width:100%;max-width:1000px;margin:18px auto 10px;font-size:13.5px;color:var(--sub,#475569);font-weight:500;text-align:left;}
  #screen-upload .faecher{width:100%;max-width:1000px;margin:0 auto;display:flex;flex-wrap:wrap;gap:9px;padding:2px;}
  #screen-upload .fach{display:inline-flex;align-items:center;gap:8px;flex:none;font:inherit;font-size:13.5px;font-weight:600;color:#3A4152;background:var(--card,#fff);border:1px solid var(--line);border-radius:11px;padding:10px 16px;cursor:pointer;box-shadow:0 1px 2px rgba(16,24,40,.05);transition:all .2s;white-space:nowrap;}
  #screen-upload .fach:hover{border-color:#C7D2FE;}
  #screen-upload .fach.on{background:var(--brand-soft,#EEF2FF);border-color:#B9C7FF;color:#1B3FCC;}
  #screen-upload .fach .fic{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;}
  #screen-upload .karten{width:100%;max-width:1000px;margin:12px auto 0;display:grid;grid-template-columns:repeat(3,1fr);gap:12px;}
  @media(max-width:720px){ #screen-upload .karten{grid-template-columns:1fr;} }
  /* Kompakter seit 2026-07 (Wunsch Murat): die Karten sind Beispiele, kein
     Hauptinhalt – sie sollen den Eingabekasten nicht nach oben draengen.
     Vorher 17px Polsterung / 120px Mindesthoehe / 13px Innenabstand. */
  #screen-upload .karte{background:var(--card,#fff);border:1px solid var(--line);border-radius:15px;padding:13px 14px;box-shadow:0 1px 2px rgba(16,24,40,.05);cursor:pointer;transition:all .22s;display:flex;flex-direction:column;gap:9px;min-height:0;}
  #screen-upload .karte:hover{border-color:#C7D2FE;box-shadow:0 10px 30px rgba(16,24,40,.10);transform:translateY(-3px);}
  #screen-upload .karte .ktop{display:flex;align-items:center;justify-content:space-between;}
  #screen-upload .k-ic{width:32px;height:32px;border-radius:9px;background:var(--brand-soft,#EEF2FF);display:flex;align-items:center;justify-content:center;}
  #screen-upload .k-ic svg{width:17px;height:17px;fill:none;stroke:var(--brand,#2E5BFF);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  #screen-upload .einsetzen{width:28px;height:28px;border-radius:8px;color:var(--muted);display:flex;align-items:center;justify-content:center;transition:all .18s;}
  #screen-upload .karte:hover .einsetzen{background:var(--brand-soft,#EEF2FF);color:var(--brand,#2E5BFF);}
  #screen-upload .einsetzen svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  #screen-upload .karte .kp{font-size:13.5px;color:var(--ink);line-height:1.35;flex:1;font-weight:600;}
  #screen-upload .karte .meta{display:block;font-size:11.5px;color:var(--muted);font-weight:600;margin-top:2px;}
  /* Alt-Gast-Chips dauerhaft aus (Fächer/Karten ersetzen sie). */
  #screen-upload > #gast-chips{display:none !important;}

  /* ===== Material-Einstieg auf dem HANDY kompakt (2026-07) =====
     Vorher: Kontingent-Streifen umbrach auf 3 Zeilen, Eingabekasten + Schrift
     riesig, Faecher untereinander, Karten als eine hohe Spalte -> man sah kaum
     etwas ohne langes Scrollen. Jetzt: kleinere Schrift, Faecher als EINE
     wischbare Zeile, Karten nebeneinander (wischbar). */
  @media(max-width:720px){
    #screen-upload .mat-greeting{font-size:18px;margin:2px 0 12px;line-height:1.2;}
    #screen-upload .notiz{padding:8px 13px 16px;font-size:11px;border-radius:13px;gap:8px;}
    #screen-upload .notiz .l{gap:6px;line-height:1.3;}
    #screen-upload .notiz .ring{width:10px;height:10px;border-width:2px;box-shadow:0 0 0 2px rgba(46,91,255,.14);}
    #screen-upload .notiz a{font-size:11px;}
    #screen-upload .box{margin-top:-9px;border-radius:14px;}
    #screen-upload textarea.mat-feld{font-size:14px;min-height:58px;padding:14px 14px 2px;}
    #screen-upload .leiste{padding:8px 10px 10px;gap:4px;}
    #screen-upload .ikbtn{width:36px;height:36px;}
    #screen-upload .ikbtn svg{width:18px;height:18px;}
    #screen-upload .senden{width:40px;height:40px;}
    #screen-upload .faczeile{font-size:12.5px;margin:16px auto 8px;}
    /* Faecher: EINE Zeile, horizontal wischbar (kein Umbruch mehr). */
    #screen-upload .faecher{flex-wrap:nowrap;overflow-x:auto;gap:7px;padding:2px 2px 6px;
      scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
    #screen-upload .faecher::-webkit-scrollbar{display:none;}
    #screen-upload .fach{scroll-snap-align:start;font-size:12.5px;padding:8px 12px;gap:6px;}
    #screen-upload .fach .fic{width:15px;height:15px;}
    /* Karten: nebeneinander + wischbar, kleiner. */
    #screen-upload .karten{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:10px;margin-top:12px;
      padding-bottom:6px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
    #screen-upload .karten::-webkit-scrollbar{display:none;}
    #screen-upload .karte{flex:0 0 47%;min-height:0;padding:12px;gap:9px;border-radius:13px;scroll-snap-align:start;}
    #screen-upload .k-ic{width:32px;height:32px;border-radius:9px;}
    #screen-upload .k-ic svg{width:16px;height:16px;}
    #screen-upload .einsetzen{width:24px;height:24px;}
    #screen-upload .karte .kp{font-size:12.5px;}
    #screen-upload .karte .meta{font-size:10.5px;margin-top:2px;}
  }

  /* --- Teil 4: Erweiterte Optionen als zentriertes Modal --- */
  .mat-ovl{position:fixed;inset:0;z-index:4000;background:rgba(15,23,42,.42);
    -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
    display:none;align-items:center;justify-content:center;padding:24px;}
  .mat-ovl.auf{display:flex;animation:matFadein .26s ease;}
  @keyframes matFadein{from{opacity:0;}to{opacity:1;}}
  .mat-modal{width:100%;max-width:900px;max-height:min(88vh,calc(var(--vh100,100vh) - 48px));
    background:var(--card);
    border-radius:20px;box-shadow:0 12px 28px rgba(16,24,40,.12),0 40px 90px rgba(16,24,40,.24);
    display:flex;flex-direction:column;overflow:hidden;}
  .mat-modal-kopf{display:flex;align-items:center;justify-content:space-between;
    padding:16px 20px;border-bottom:1px solid var(--hair,var(--line));
    background:linear-gradient(180deg,rgba(46,91,255,.04),transparent);}
  .mat-modal-kopf b{font-size:16px;font-weight:800;display:inline-flex;align-items:center;gap:9px;color:var(--ink);}
  .mat-modal-kopf b svg{width:19px;height:19px;color:var(--brand,#2E5BFF);}
  .mat-modal-x{width:34px;height:34px;border:0;background:transparent;border-radius:9px;
    cursor:pointer;color:var(--muted);display:flex;align-items:center;justify-content:center;}
  .mat-modal-x:hover{background:var(--hair,var(--line));color:var(--ink);}
  .mat-modal-x svg{width:19px;height:19px;}
  /* Panel-Inhalt in ZWEI Spalten (wie im Entwurf) -> breit, luftig, wenig
     Scrollen. Gruppen brechen nicht mitten durch (break-inside:avoid). */
  .mat-modal-body{overflow-y:auto;padding:16px 18px 18px;}
  /* Im Modal traegt das Panel keinen eigenen Rahmen/Hintergrund mehr. */
  .mat-modal-body > #advanced-options{border:0;background:transparent;padding:0;margin:0;}
  /* NEUES LAYOUT (Konzept B, 2026-07): Karten-Raster statt Zeitungs-Spalten
     (column-count). Jede Gruppe ist eine Karte; Fach&Umfang und Lernspiele
     laufen ueber die volle Breite, der Rest teilt sich in zwei Spalten -> quer
     verteilt und niedrig statt einer langen Kolonne. Mobil (<=720px) wird das
     Raster einspaltig und die Gruppen klappen wie ein Akkordeon zu (JS
     matAdvAccordionInit haengt die .mat-group-bd + Pfeil ein). */
  .mat-modal-body #advanced-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start;}
  .mat-modal-body #advanced-options > .mat-group{margin:0;border-top:0;padding:13px 15px 14px;
    background:var(--card);border:1px solid var(--line);border-radius:14px;}
  .mat-modal-body #advanced-options > .mat-group:first-of-type{grid-column:1 / -1;}
  .mat-modal-body #advanced-options > .ls-acc{grid-column:1 / -1;margin:2px 0 0;}
  /* Fach/Thema/Klasse/Anzahl: ueber die volle Breite jetzt 4 nebeneinander. */
  .mat-modal-body .fach-pick-row{grid-template-columns:repeat(4,1fr);}
  @media(max-width:720px){
    .mat-modal-body #advanced-options{grid-template-columns:1fr;gap:9px;}
    .mat-modal-body .fach-pick-row{grid-template-columns:1fr 1fr;}
  }
  .mat-modal-foot{padding:14px 20px;border-top:1px solid var(--hair,var(--line));
    display:flex;justify-content:flex-end;}
  .mat-modal-ok{border:0;background:linear-gradient(180deg,#5B7BFF,#2E5BFF 60%,#1B3FCC);
    color:#fff;font:inherit;font-weight:700;border-radius:11px;padding:11px 26px;cursor:pointer;
    box-shadow:0 3px 10px rgba(46,91,255,.30);}
  .mat-modal-ok:hover{transform:translateY(-1px);}

  .adv-toggle{display:flex;align-items:center;justify-content:center;gap:9px;font-size:14px;font-weight:750;color:var(--ink);cursor:pointer;padding:13px 16px;user-select:none;margin-top:4px;margin-bottom:10px;border:2px solid transparent;border-radius:14px;background:linear-gradient(var(--card),var(--card)) padding-box,linear-gradient(105deg,#2E5BFF,#6D5BFF,#9A4BFF) border-box;transition:box-shadow .15s,color .15s;}
  .adv-toggle:hover{color:#6D5BFF;box-shadow:0 6px 18px rgba(109,91,255,.18);}
  .adv-arrow{display:inline-flex;transition:transform .18s ease;color:#6D5BFF;}
  .adv-arrow svg{width:20px;height:20px;}
  .adv-arrow.open{transform:rotate(90deg);}
  .adv-panel{border:1px solid var(--line);border-radius:14px;padding:16px 16px 6px;margin-bottom:16px;background:rgba(127,127,127,0.03);}
  /* Material: sanfte Gruppierung der erweiterten Optionen */
  .mat-group{padding:14px 0 4px;border-top:1px solid var(--line);}
  .mat-group:first-of-type{border-top:0;padding-top:2px;}
  .mat-group-ttl{font-size:13.5px;font-weight:800;color:var(--text);margin:0 0 11px;letter-spacing:.01em;display:flex;align-items:center;gap:9px;}
  /* Icon je Gruppe: als CSS-Maske (Farbe = Marke), kein Markup-Eingriff noetig.
     Reihenfolge im DOM: 1 Fach · 2 Zielgruppe · 3 Aufgaben · 4 Lesetext · 5 Bild. */
  .mat-group-ttl::before{content:"";width:18px;height:18px;flex:none;background:#534AB7;
    -webkit-mask:var(--grp-ico) center/contain no-repeat;mask:var(--grp-ico) center/contain no-repeat;}
  .mat-group:nth-of-type(1){--grp-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H19v15H6.5A2.5 2.5 0 0 0 4 20.5z'/%3E%3Cpath d='M8 3v15'/%3E%3C/svg%3E");}
  .mat-group:nth-of-type(2){--grp-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3.5 20a5.5 5.5 0 0 1 11 0'/%3E%3Cpath d='M16 6a3 3 0 0 1 0 6'/%3E%3Cpath d='M18.5 20a5.5 5.5 0 0 0-3-4.9'/%3E%3C/svg%3E");}
  .mat-group:nth-of-type(3){--grp-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h10M4 12h10M4 18h6'/%3E%3Cpath d='M16 16l2 2 4-4'/%3E%3C/svg%3E");}
  .mat-group:nth-of-type(4){--grp-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l5 5v13H6z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 13h6M9 17h6'/%3E%3C/svg%3E");}
  .mat-group:nth-of-type(5){--grp-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5-8 8'/%3E%3C/svg%3E");}
  .mat-group-sub{font-size:12px;color:var(--muted);margin:0 0 12px;line-height:1.45;}

  /* ===== (i)-Symbol mit Kurz-Erklaerung (2026-07) =====
     Ersetzt die frueheren Erklaerabsaetze (.mat-group-sub) im Fenster
     "Erweiterte Optionen". Regel aus CLAUDE.md: an einem Bedienelement steht
     hoechstens EIN Satz, alles Weitere gehoert ins Handbuch. Der Satz erscheint
     bei :hover (Maus) UND :focus (Tastatur + Antippen auf dem Handy, weil das
     Element tabindex="0" hat). Reines CSS – kein JS, kein externes Tooltip. */
  /* GEMELDET 29.07.2026: "das i sieht komisch aus". Ursache war die
     Kombination aus fester line-height (12px) in einem 15-px-Kreis und
     font-style:italic - der Buchstabe stand je nach Schriftgroesse der
     Umgebung leicht ausserhalb der Mitte und wirkte wie ein Fleck. Jetzt
     zentriert inline-flex das Zeichen unabhaengig von der Schriftgroesse,
     der Kreis ist eine Spur groesser und das Kursiv ist weg. */
  .ss-info{flex:none;width:16px;height:16px;border-radius:50%;border:1.4px solid var(--muted);
    box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
    vertical-align:middle;color:var(--muted);font-size:10.5px;font-weight:800;line-height:1;
    font-family:Georgia,"Times New Roman",serif;
    text-align:center;cursor:help;position:relative;opacity:.75;transition:opacity .15s,color .15s,border-color .15s;}
  .ss-info:hover,.ss-info:focus{opacity:1;color:var(--brand);border-color:var(--brand);outline:none;}
  /* WICHTIG – NICHT wieder ein eigenes ::after-Tooltip hier einbauen!
     Es gab bis 2.59.1 genau das, und dadurch erschien die Erklaerung DOPPELT:
     die App hat seit laengerem einen zentralen "Sofort-Tooltip" (index-app.js,
     ein einziges <div class="ss-tipbox"> am <body>, das auf JEDES Element mit
     [data-tip] reagiert). Ein zweites CSS-Tooltip auf demselben Attribut ist
     immer eine Dopplung. Das Aussehen wird deshalb unten bei .ss-tipbox
     gepflegt, nicht hier. (Rueckmeldung Murat 29.07.2026)
     qa/unit/test_tooltip_einfach.py nagelt das fest. */

  /* ===== Der zentrale Sofort-Tooltip (gilt fuer ALLE [data-tip]-Elemente) =====
     Auf Wunsch Murat 29.07.2026 hell: weisser Grund, schwarze Schrift, feine
     Linie + Schatten, damit er sich vom Hintergrund abhebt. Im dunklen Design
     waere weiss ein Blitz - dort dieselbe Form in Karten-Optik. Die Groessen
     (max-width, Position) setzt weiterhin das JS, weil sie am Viewport haengen. */
  .ss-tipbox{position:fixed;z-index:9999;display:none;pointer-events:none;
    max-width:280px;padding:7px 11px;border-radius:9px;
    background:#fff;color:#12161F;border:1px solid rgba(16,24,40,.10);
    font-size:12px;font-weight:600;line-height:1.45;
    box-shadow:0 8px 24px rgba(16,24,40,.16),0 1px 3px rgba(16,24,40,.08);}
  html[data-theme="dark"] .ss-tipbox{background:var(--card,#1b2230);color:var(--ink,#e8ecf5);
    border-color:rgba(255,255,255,.14);box-shadow:0 8px 24px rgba(0,0,0,.45);}

  /* ===== Akkordeon der Optionen-Gruppen =====
     Bis 2026-07 nur auf dem Handy (<=720px). Jetzt ueberall: das Fenster war
     auf dem Desktop ueber zwei Bildschirmhoehen lang, obwohl "Zielgruppe &
     Sprache" und "Aufgaben" fast immer auf den Voreinstellungen bleiben.
     Zugeklappt zeigt die Titelzeile rechts eine Kurz-Zusammenfassung
     (.mat-grp-sum, gefuellt von matGrpSummary() in index-app.js), damit man
     den aktuellen Stand sieht, ohne aufzuklappen.
     .mat-group-bd wird zur Laufzeit von matAdvAccordionInit() eingehaengt. */
  .mat-grp-chev{flex:none;color:var(--muted);display:none;}
  .mat-grp-sum{margin-left:auto;flex:none;max-width:52%;font-size:11.5px;font-weight:650;
    color:var(--muted);letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    display:none;}
  .mat-modal-body #advanced-options > .mat-group.collapsed > .mat-group-ttl > .mat-grp-sum{display:block;}
  .mat-modal-body #advanced-options > .mat-group > .mat-group-ttl{cursor:pointer;margin-bottom:0;}
  .mat-modal-body #advanced-options > .mat-group:not(.collapsed) > .mat-group-ttl{margin-bottom:11px;}
  .mat-modal-body #advanced-options > .mat-group.collapsed > .mat-group-bd{display:none;}
  .mat-modal-body #advanced-options > .mat-group > .mat-group-ttl > .mat-grp-chev{display:inline-flex;transition:transform .18s ease;}
  /* Ohne Zusammenfassung schiebt der Pfeil selbst nach rechts. */
  .mat-modal-body #advanced-options > .mat-group > .mat-group-ttl > .mat-grp-sum + .mat-grp-chev{margin-left:8px;}
  .mat-modal-body #advanced-options > .mat-group:not(.collapsed) > .mat-group-ttl > .mat-grp-chev{margin-left:auto;}
  .mat-group.collapsed .mat-grp-chev{transform:rotate(0deg);}
  .mat-group:not(.collapsed) .mat-grp-chev{transform:rotate(90deg);}
  .mat-modal-body #advanced-options > .mat-group.collapsed{padding-bottom:12px;}
  /* ===== Aufgabentyp „Reihenfolge" (v2.61.0) =====
     Sortiert wird mit Hoch/Runter-Knoepfen, NICHT per Ziehen: Drag&Drop ist auf
     Tablets die fehleranfaelligste Geste (Seite scrollen vs. Karte ziehen), und
     ein grosser Teil der Klassen arbeitet am Tablet. Die Knoepfe sind mit 34px
     bewusst fingerfreundlich. */
  .reihe-liste{display:flex;flex-direction:column;gap:8px;}
  .reihe-zeile{display:flex;align-items:center;gap:10px;padding:11px 12px;
    border:1.5px solid var(--line);border-radius:12px;background:var(--card);
    transition:border-color .15s,background .15s;}
  .reihe-nr{flex:none;width:24px;height:24px;border-radius:50%;background:var(--brand-soft,#EEF2FF);
    color:var(--brand);font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;}
  .reihe-tx{flex:1;min-width:0;font-size:14.5px;line-height:1.35;color:var(--ink);}
  .reihe-btns{flex:none;display:flex;gap:4px;}
  .reihe-b{width:34px;height:34px;border:1.5px solid var(--line);border-radius:9px;background:var(--card);
    color:var(--sub,#475569);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;}
  .reihe-b:hover:not(:disabled){border-color:var(--brand);color:var(--brand);}
  .reihe-b:disabled{opacity:.3;cursor:default;}
  .reihe-zeile.ans-ok{border-color:var(--ok);background:var(--ok-soft);}
  .reihe-zeile.ans-bad{border-color:var(--bad);background:var(--bad-soft);}

  /* ===== Aufgabentyp „Tabelle" (v2.61.0) =====
     Auf schmalen Bildschirmen darf die Tabelle waagerecht gewischt werden –
     Umbrechen wuerde die Spaltenzuordnung zerstoeren, und genau die IST die
     Aufgabe. */
  .tab-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  table.tab-quiz{border-collapse:collapse;width:100%;min-width:320px;font-size:14px;}
  table.tab-quiz th,table.tab-quiz td{border:1px solid var(--line);padding:8px 10px;text-align:left;vertical-align:middle;}
  table.tab-quiz thead th{background:var(--brand-soft,#EEF2FF);color:var(--brand);font-size:12.5px;font-weight:800;}
  table.tab-quiz tbody th{background:rgba(127,127,127,.05);font-weight:700;font-size:13.5px;white-space:nowrap;}
  table.tab-quiz td.tab-fix{color:var(--muted);}
  input.tab-in{width:100%;min-width:90px;border:1.5px solid var(--line);border-radius:8px;
    padding:7px 9px;font:inherit;font-size:14px;background:var(--card);color:var(--ink);}
  input.tab-in:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(46,91,255,.14);}
  input.tab-in.ans-ok{border-color:var(--ok);background:var(--ok-soft);}
  input.tab-in.ans-bad{border-color:var(--bad);background:var(--bad-soft);}

  .vis-seg-wrap{margin-top:2px;}
  .vis-note{font-size:12px;color:var(--muted);margin:8px 0 2px;line-height:1.45;display:none;}
  .vis-note.on{display:block;}
  /* ===== Lernspiele (Premium) Akkordeon ===== */
  .ls-acc{margin:18px 0 6px;border-radius:16px;padding:2px;
    background:linear-gradient(135deg,#7A5AF8 0%,#2E5BFF 45%,#00B3A6 100%);
    box-shadow:0 6px 22px rgba(90,60,248,.14);}
  .ls-acc-inner{background:var(--card);border-radius:14px;overflow:hidden;}
  .ls-acc-head{display:flex;align-items:center;gap:11px;padding:15px 16px;cursor:pointer;user-select:none;}
  .ls-acc-ico{flex:none;width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;
    background:linear-gradient(135deg,#7A5AF8,#2E5BFF);color:#fff;}
  .ls-acc-ttl{font-weight:800;font-size:15px;letter-spacing:-.2px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .ls-acc-sub{font-size:12px;color:var(--muted);margin-top:2px;}
  .ls-pill{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:800;letter-spacing:.4px;
    text-transform:uppercase;padding:3px 9px;border-radius:99px;color:#fff;
    background:linear-gradient(135deg,#7A5AF8,#2E5BFF);}
  .ls-acc-arrow{margin-left:auto;flex:none;color:var(--muted);transition:transform .18s ease;}
  .ls-acc-arrow.open{transform:rotate(90deg);}
  .ls-acc-body{padding:4px 16px 16px;}
  .ls-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:6px 0 4px;}
  @media(min-width:620px){.ls-grid{grid-template-columns:repeat(3,1fr);}}
  .ls-tile{position:relative;border:1.5px solid var(--line);border-radius:13px;padding:13px 11px;cursor:pointer;
    background:var(--card);transition:border-color .14s,background .14s,transform .08s;text-align:center;}
  .ls-tile:hover{border-color:#7A5AF8;background:rgba(122,90,248,.05);}
  .ls-tile:active{transform:scale(.98);}
  .ls-tile.on{border-color:#7A5AF8;background:linear-gradient(135deg,rgba(122,90,248,.12),rgba(46,91,255,.08));
    box-shadow:0 0 0 3px rgba(122,90,248,.15);}
  .ls-tile-ico{width:26px;height:26px;margin:0 auto 7px;color:#7A5AF8;}
  .ls-tile.on .ls-tile-ico{color:#5A3CF8;}
  .ls-tile-name{font-size:12.5px;font-weight:700;color:var(--ink);line-height:1.2;}
  .ls-tile-desc{font-size:10.5px;color:var(--muted);margin-top:3px;line-height:1.25;}
  .ls-tile-check{position:absolute;top:7px;right:7px;width:17px;height:17px;border-radius:50%;
    background:#7A5AF8;color:#fff;display:none;align-items:center;justify-content:center;}
  .ls-tile.on .ls-tile-check{display:flex;}
  .ls-diff-wrap{margin-top:12px;}
  /* Escape-Room: Themen-Auswahl (fachunabhängige Story-Verpackung) */
  .esc-theme-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:6px;}
  @media(min-width:620px){.esc-theme-grid{grid-template-columns:repeat(5,1fr);}}
  .esc-theme{position:relative;border:1.5px solid var(--line);border-radius:11px;padding:10px 6px 9px;cursor:pointer;
    text-align:center;background:var(--card);transition:border-color .14s,background .14s,transform .08s;}
  .esc-theme:hover{transform:translateY(-1px);}
  .esc-theme .et-emoji{font-size:22px;line-height:1;display:block;margin-bottom:5px;}
  .esc-theme .et-name{font-size:11px;font-weight:700;line-height:1.25;}
  .esc-theme.on{border-color:#7A5AF8;background:rgba(122,90,248,.08);box-shadow:0 0 0 1px #7A5AF8 inset;}
  .ls-diff-lbl{font-size:12px;font-weight:700;color:var(--muted);display:block;margin-bottom:6px;}
  .ls-hint{font-size:12px;color:var(--muted);background:rgba(122,90,248,.07);border:1px solid rgba(122,90,248,.18);
    border-radius:10px;padding:10px 12px;margin-top:12px;line-height:1.4;display:flex;gap:8px;align-items:flex-start;}
  .ls-hint svg{flex:none;color:#7A5AF8;margin-top:1px;}
  .ls-locked{opacity:.45;pointer-events:none;filter:grayscale(.3);}
  .ls-lockbadge{display:none;font-size:11px;font-weight:700;color:#7A5AF8;background:rgba(122,90,248,.1);
    border-radius:8px;padding:6px 10px;margin-top:10px;align-items:center;gap:6px;}
  body.ls-active .ls-lockbadge{display:inline-flex;}
  .acc-head{display:flex;align-items:center;gap:9px;cursor:pointer;user-select:none;}
  .acc-head h3{margin:0;}
  .acc-arrow{display:inline-block;transition:transform .18s ease;font-size:13px;color:var(--muted);flex:0 0 auto;}
  .acc-arrow.open{transform:rotate(90deg);}
  .acc-body{margin-top:14px;}
  .acc-body.hidden{display:none;}

  /* Aufgaben-Quelle: Icon-Kacheln */
  .ex-src-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;
    background:#fff;border:1.5px solid var(--line);border-radius:12px;padding:14px 8px;cursor:pointer;
    color:var(--ink,#1a2233);font:inherit;text-align:center;line-height:1.2;transition:border-color .15s,background .15s,transform .1s;}
  .ex-src-tile:hover{border-color:var(--brand);background:var(--brand-soft,#F0F4FF);}
  .ex-src-tile:active{transform:scale(.97);}
  .ex-src-tile svg{width:24px;height:24px;color:var(--brand);}
  .ex-src-tile span{font-size:12px;font-weight:600;}

  /* === EDITOR === */
  .ed-card{border:1.5px solid var(--line);border-radius:14px;padding:14px;margin-bottom:14px;}
  .ed-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:12.5px;color:var(--muted);font-weight:700;}
  .ed-del{color:var(--bad);cursor:pointer;font-weight:700;text-decoration:none;}
  /* Frage-Akkordeon im Editor: zugeklappt zeigt nur den Kopf, Klick öffnet den Body */
  .ed-card .ed-head{cursor:pointer;user-select:none;margin-bottom:0;gap:8px;}
  .ed-head-main{display:flex;align-items:center;gap:8px;min-width:0;flex:1;}
  .ed-chev{width:16px;height:16px;flex:none;fill:none;stroke:var(--muted);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s;}
  .ed-card:not(.ed-collapsed) .ed-chev{transform:rotate(90deg);}
  .ed-head-no{color:var(--ink);font-weight:800;flex:none;}
  .ed-head-type{flex:none;font-size:10.5px;font-weight:700;padding:2px 7px;border-radius:99px;background:var(--brand-soft);color:var(--brand-dk);}
  .ed-head-prev{font-weight:500;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
  .ed-del{flex:none;font-size:14px;padding:2px 6px;border-radius:8px;}
  .ed-del:hover{background:var(--bad-soft,rgba(216,64,64,.1));}
  .ed-body{margin-top:12px;}
  .ed-card.ed-collapsed .ed-body{display:none;}
  .ed-card.ed-collapsed{padding-bottom:14px;}
  .ed-del:hover{text-decoration:underline;}
  .ed-card textarea{min-height:54px;margin-bottom:10px;}
  .ed-card input[type=text]{margin-bottom:0;}
  /* Abbildungs-Buttons (Funktionsgraph · Figur · Eigenes Bild): gleiche Größe,
     Icon + Label, dezent bis Hover. */
  .ed-abb-btn{flex:1 1 0;min-width:130px;display:inline-flex;align-items:center;justify-content:center;gap:7px;
    font-size:13px;padding:10px 12px;color:var(--brand);border:1px solid var(--line);border-radius:10px;
    background:var(--card);font-weight:600;cursor:pointer;transition:border-color .12s,background .12s,box-shadow .12s;}
  .ed-abb-btn:hover{border-color:var(--brand);background:var(--brand-soft,#EEF2FF);box-shadow:0 2px 8px rgba(46,91,255,.1);}
  .ed-abb-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none;}
  .ed-meta{display:flex;gap:14px;margin-top:10px;padding-top:10px;border-top:1px dashed var(--line);}
  .ed-meta label{display:flex;flex-direction:column;gap:4px;font-size:11.5px;color:var(--muted);font-weight:700;}
  .ed-meta select,.ed-meta input{padding:7px 9px;border:1px solid var(--line);border-radius:8px;font-size:13px;font-family:inherit;}
  .ed-meta input[type=number]{width:80px;}
  .ed-optrow{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
  .ed-optrow input[type=text]{flex:1;}
  .ed-optrow input[type=radio],.ed-optrow input[type=checkbox]{width:18px;height:18px;flex-shrink:0;accent-color:var(--ok);}
  /* Aufgabentypen als kompakte Chips (2026-07, Konzept B): statt grosser
     Kaestchen kleine Pillen, die umbrechen – spart Hoehe, passt zum Karten-Look.
     Die native Checkbox wird versteckt, ein Haekchen-Kreis zeigt die Auswahl. */
  .typ-grid{display:flex;flex-wrap:wrap;gap:6px;}
  .typ-row{display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-size:12.5px;font-weight:700;
    color:var(--sub,#475569);border:1.5px solid var(--line);border-radius:20px;padding:6px 12px 6px 9px;
    background:var(--card);white-space:nowrap;transition:border-color .12s,background .12s,color .12s;}
  .typ-row:hover{border-color:#C7D2FE;}
  .typ-row:has(input:checked){border-color:#B9C7FF;background:var(--brand-soft,#EEF1FB);color:#1B3FCC;}
  .typ-row input[type=checkbox]{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none;}
  .typ-row::before{content:"";width:16px;height:16px;flex:none;border-radius:50%;
    border:1.6px solid var(--line);background:transparent;transition:all .12s;}
  .typ-row:has(input:checked)::before{border-color:var(--brand,#2E5BFF);
    background:var(--brand,#2E5BFF) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;}
  .typ-row:has(input:focus-visible){box-shadow:0 0 0 3px rgba(46,91,255,.18);}
  .ed-hint{font-size:11.5px;color:var(--muted);margin:2px 0 8px;}
  .ed-pair{display:flex;align-items:center;gap:8px;margin-bottom:8px;}
  .ed-pair input[type=text]{flex:1;}
  .ed-pair .ed-pairdel{color:var(--bad);cursor:pointer;font-weight:700;flex-shrink:0;}
  .ed-erk{margin-top:6px;}
  @media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .mini-btn{background:var(--card);}
  }

  /* ===== UNTERRICHTSFÄCHER-MANAGER (Dateimanager) ===== */
  .uf-bar{display:flex;align-items:center;gap:12px;margin:4px 0 20px;flex-wrap:wrap;}
  .uf-back{display:inline-flex;align-items:center;gap:5px;border:none;background:rgba(127,127,127,0.10);border-radius:10px;padding:8px 14px 8px 11px;cursor:pointer;font-weight:600;font-family:inherit;font-size:14px;color:var(--ink);}
  .uf-back:hover{background:rgba(127,127,127,0.18);}
  .uf-back svg{width:16px;height:16px;}
  /* pfad: mavi/mor badge stili */
  .uf-pfad{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(135deg,rgba(59,130,246,0.12),rgba(139,92,246,0.12));border:1px solid rgba(124,92,246,0.25);padding:6px 13px;border-radius:999px;}
  .uf-crumb-item{font-size:13px;font-weight:700;color:#6d5dd3;letter-spacing:.01em;}
  .uf-crumb-sep{color:#9b8fd6;font-size:13px;}
  .uf-trashrow{position:absolute;top:12px;right:12px;margin:0;z-index:5;}
  .uf-trashbtn{display:inline-flex;align-items:center;gap:5px;border:none;background:none;cursor:pointer;padding:6px;color:var(--muted);font-family:inherit;}
  .uf-trashbtn:hover{color:var(--ink);}
  .uf-trashbtn svg{width:18px;height:18px;}
  .uf-trashbtn .ubadge{background:var(--bad);color:#fff;border-radius:10px;padding:1px 8px;font-size:11.5px;font-weight:700;}
  /* 2'li kare grid — ortalanmış */
  .uf-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:520px;margin:0 auto;}
  .uf-card{position:relative;border:1px solid var(--line);border-radius:18px;background:var(--card);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;padding:26px 16px;text-align:center;transition:transform .12s,box-shadow .12s,border-color .12s;}
  .uf-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(27,34,48,0.10);border-color:rgba(127,127,127,0.25);}
  .uf-ico{width:54px;height:54px;border-radius:15px;display:flex;align-items:center;justify-content:center;}
  .uf-ico svg{width:30px;height:30px;}
  .uf-card .lbl{font-weight:700;font-size:15px;line-height:1.25;color:var(--ink);}
  .uf-cnt{font-size:11.5px;color:var(--muted);}
  .uf-card-add{border-style:dashed;border-color:rgba(124,92,246,0.4);background:rgba(124,92,246,0.03);}
  .uf-card-add:hover{background:rgba(124,92,246,0.07);}
  .uf-ico-add{background:rgba(124,92,246,0.10);color:#7c5cf6;}
  .uf-ico-add svg{width:26px;height:26px;}
  .uf-lbl-add{color:#7c5cf6;font-size:14px;}
  .uf-draghandle{position:absolute;top:9px;left:9px;color:var(--muted);opacity:0;cursor:grab;transition:opacity .12s;}
  .uf-card:hover .uf-draghandle{opacity:.45;}
  .uf-draghandle svg{width:18px;height:18px;}
  .uf-cardmenu{position:absolute;top:9px;right:9px;color:var(--muted);opacity:0;cursor:pointer;transition:opacity .12s;padding:2px;}
  .uf-card:hover .uf-cardmenu{opacity:.55;}
  .uf-cardmenu:hover{opacity:1;}
  .uf-cardmenu svg{width:18px;height:18px;}
  .uf-dragging{opacity:.4;}
  /* Pop menü */
  .uf-popmenu{position:absolute;z-index:10000;background:var(--card);border:1px solid var(--line);border-radius:11px;box-shadow:0 12px 30px rgba(0,0,0,.16);padding:5px;min-width:150px;}
  .uf-popmenu button{display:block;width:100%;text-align:left;border:none;background:none;padding:9px 12px;border-radius:8px;cursor:pointer;font-family:inherit;font-size:13.5px;color:var(--ink);}
  .uf-popmenu button:hover{background:rgba(127,127,127,0.10);}
  .uf-popmenu button.danger{color:var(--bad);}
  /* Akordeon (Börse fach-acc) */
  .uf-acc-ico{width:34px;height:34px;border-radius:10px;background:rgba(127,127,127,0.10);display:flex;align-items:center;justify-content:center;color:var(--muted);flex:none;}
  .uf-acc-ico svg{width:19px;height:19px;}
  .uf-acc-drag{position:static;opacity:.35;flex:none;}
  .fach-acc:hover .uf-acc-drag{opacity:.6;}
  .uf-foldacts{display:flex;gap:1px;margin-right:6px;opacity:0;transition:opacity .12s;}
  .fach-acc-head:hover .uf-foldacts{opacity:1;}
  /* Dosya satırı — numaralı */
  .uf-list{display:flex;flex-direction:column;gap:8px;}
  .uf-item{display:flex;align-items:center;gap:6px;padding:4px 6px 4px 4px;border-radius:11px;transition:background .12s;}
  .uf-item:hover{background:rgba(127,127,127,0.05);}
  .uf-item.is-hidden{opacity:.5;}
  .uf-itemdrag{color:var(--muted);opacity:0;cursor:grab;flex:none;display:flex;}
  .uf-item:hover .uf-itemdrag{opacity:.4;}
  .uf-itemdrag svg{width:16px;height:16px;}
  .uf-item-link{flex:1;display:flex;align-items:center;gap:11px;text-decoration:none;color:inherit;padding:8px 6px;min-width:0;}
  .uf-num{width:24px;height:24px;border-radius:7px;background:linear-gradient(135deg,#3B82F6,#7c5cf6);color:#fff;font-size:12.5px;font-weight:700;display:flex;align-items:center;justify-content:center;flex:none;}
  /* Titel: EINZEILIG mit Ellipsis – nie mehr Buchstabe-für-Buchstabe umbrechen,
     wenn es auf dem Handy eng wird. */
  .uf-item-link .ttl{flex:1;min-width:0;font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:normal;}
  .uf-item .tag{font-size:10.5px;color:#b8860b;border:1px solid #e3c07a;border-radius:6px;padding:1px 7px;flex:none;}
  .uf-item .acts{display:flex;gap:1px;flex:none;}
  /* Schmale Screens: Aktionen kompakter, Typ-Tag weglassen (Platz für den Titel). */
  @media (max-width:560px){
    .uf-item{flex-wrap:nowrap;}
    .uf-item .tag{display:none;}
    .uf-item-link{gap:8px;padding:8px 2px;}
    .uf-item .acts .uf-act svg{width:15px;height:15px;}
  }
  .uf-act{border:none;background:transparent;cursor:pointer;padding:7px;border-radius:8px;color:var(--muted);display:flex;}
  .uf-act svg{width:17px;height:17px;}
  .uf-act:hover{background:rgba(127,127,127,0.15);color:var(--ink);}
  .uf-empty{color:var(--muted);font-style:italic;padding:14px;text-align:center;font-size:13.5px;}
  .uf-addbtn{margin-top:10px;display:flex;align-items:center;justify-content:center;gap:7px;border:1px dashed var(--brand);color:var(--brand);background:none;border-radius:11px;padding:11px;cursor:pointer;font-weight:700;font-family:inherit;font-size:13.5px;width:100%;}
  .uf-addbtn svg{width:16px;height:16px;}
  .uf-addbtn:hover{background:rgba(99,102,241,0.06);}
  .uf-addbtn-folder{border-color:rgba(124,92,246,0.45);color:#7c5cf6;margin-top:14px;}
  .uf-addbtn-folder:hover{background:rgba(124,92,246,0.06);}
  .uf-addbtn.uf-danger{border-color:var(--bad);color:var(--bad);margin-top:16px;}
  .uf-addbtn.uf-danger:hover{background:rgba(216,64,64,0.06);}
  .uf-locked{text-align:center;padding:60px 20px;}
  .uf-lock-ico{color:var(--muted);opacity:.6;display:flex;justify-content:center;margin-bottom:4px;}
  .uf-lock-ico svg{width:54px;height:54px;}
  .uf-locked h2{margin:14px 0 6px;color:var(--ink);}
  .uf-locked p{color:var(--muted);}
  .uf-locked button{margin-top:18px;padding:11px 24px;border:none;border-radius:10px;background:var(--brand);color:#fff;font-weight:700;cursor:pointer;font-family:inherit;}
  .uf-modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px;}
  .uf-modal{background:var(--card);border-radius:16px;padding:24px;width:100%;max-width:440px;box-shadow:0 20px 50px rgba(0,0,0,.3);}
  .uf-modal h3{margin:0 0 16px;color:var(--ink);}
  .uf-modal label{display:block;font-size:12.5px;font-weight:700;margin:12px 0 5px;color:var(--muted);}
  .uf-modal input,.uf-modal .uf-sel{width:100%;box-sizing:border-box;padding:11px 13px;border:1px solid var(--line);border-radius:10px;font-size:15px;background:var(--bg);color:var(--ink);font-family:inherit;}
  .uf-modal .row{display:flex;gap:10px;margin-top:22px;}
  .uf-modal .row button{flex:1;padding:11px;border:none;border-radius:10px;font-weight:700;cursor:pointer;font-family:inherit;font-size:14px;}
  .uf-modal .ok{background:var(--brand);color:#fff;}
  .uf-modal .cancel{background:rgba(127,127,127,0.12);color:var(--ink);}
  .uf-modal .hint{font-size:12px;color:var(--muted);margin-top:6px;}
  /* ===== HIER STAND DIE ZWEITE LANDING-PAGE (entfernt in v2.100.1) =====
     Rund 290 Zeilen `.lp-*` fuer einen Marketing-Bildschirm INNERHALB der
     App (`templates/teile/screen-landing.html`), der bei `/login` ohne
     Sitzung erschien. Damit gab es SchlauStart zweimal als Startseite, mit
     verschiedenen Versprechen (`in Minuten` gegen `in Sekunden`) und zwei
     handgepflegten Werkzeuglisten. `/login` zeigt jetzt die Anmeldung,
     die Startseite ist `templates/landing.html` - und nur die.
     Wer hier wieder Marketing einbauen will: es gehoert nach landing.html. */


/* Infotext-Boxen (Schueler-Ansicht) */
.it-wrap .it-p{margin:0 0 8px;}
.it-box{border-radius:10px;padding:10px 13px;margin:9px 0;border-left:4px solid;}
.it-box-t{font-weight:700;font-size:13px;margin-bottom:3px;}
.it-merk{background:#EEF3FF;border-color:#2E5BFF;}
.it-formel{background:#F3FBF6;border-color:#15A05A;text-align:center;font-size:16px;}
.it-bsp{background:#FFF9EC;border-color:#E2A100;}
.it-wichtig{background:#FFF1EE;border-color:#E0552E;}
.it-step{display:block;padding-left:10px;}
.it-mark{background:linear-gradient(180deg,transparent 12%,#FFE873 12%,#FFE873 90%,transparent 90%);padding:0 3px;border-radius:3px;color:inherit;}

/* ===== DESKTOP-LAYOUT (>=1024px): einheitliche Breite fuer ALLE Screens =====
   Mobil/Tablet-Hochformat (<1024px) bleibt zu 100% unveraendert - alle
   Regeln liegen in Media Queries. Eine Breite fuer alle Seiten, damit die
   Ansicht beim Seitenwechsel nicht springt. */
@media (min-width:1024px){
  .wrap{ max-width:1100px; }

  /* Quiz-Karten (Dashboard + Boerse): mehr Spalten statt breiter Karten */
  .card-grid{
    grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  }
  /* Schueler-Kacheln (Klassenbuch): mehr Luft, groessere Klick-Ziele */
  .kb-stud-grid{
    grid-template-columns:repeat(auto-fill,minmax(112px,1fr));
    gap:10px;
  }
  /* Lernbot-Historie: breitere Kinder-Liste neben dem Gespraech.
     Hoehe folgt dem Bildschirm statt fester 600px-Boxen ("ince uzun"-Fix). */
  .lhl-wrap{
    grid-template-columns:360px 1fr;
  }
  .lhl-list, .lhl-detail{
    max-height:calc(var(--vh100) - 300px);
    min-height:480px;
  }
}
/* Grosse Monitore: eine Stufe weiter, weiterhin einheitlich */
@media (min-width:1440px){
  .wrap{ max-width:1240px; }
}

/* DAS BLATT-STUDIO BEKOMMT DIE GANZE BREITE (Murat 07.08.2026: „sagdaki
   beyaz yer var ya biraz daha genisletilebilir").

   Nicht das PAPIER wird groesser - das bleibt A4 bei 100 %, sonst luegt die
   Vorschau ueber die wirkliche Groesse. Groesser wird die SEITE um das
   Papier herum: die einheitlichen 1100/1240 px sind fuer Text gedacht, und
   1240 px reichen fuer 794 px Papier plus rechte Eigenschaftsspalte (die in
   Stufe 1.3 dazukommt) nicht aus. Dieselbe Ausnahme, die admin (1560) und
   blauerbrief (1240) schon haben - der Weg ist also vorgezeichnet. */
/* Unten KEIN Polster:  bringt sonst 80 px Luft mit, und unter der
   Seitenleiste stand ein leerer weisser Streifen, der nach einem Fehler
   aussah (Murat 07.08.2026). Das Studio rechnet seine Hoehe selbst. */
/* Unten KEIN Polster: `.wrap` bringt sonst rund 80 px Luft mit, und unter
   der Seitenleiste stand ein leerer weisser Streifen, der nach einem
   Fehler aussah (Rueckmeldung Murat 07.08.2026). Das Studio rechnet
   seine Hoehe selbst und braucht die Luft nicht. */
/* ===== DAS STUDIO HAT EINE EIGENE SHELL ================================
   GEMESSEN, nicht geraten (Konsole, 07.08.2026 – der dritte Anlauf war der
   erste mit Zahlen):

     SECTION#screen-blaetter | overflow:auto | h:0  scrollH:320 | scrollt
     DIV.wrap                | overflow:hidden| h:138 scrollH:463 | scrollt

   Damit war klar, was drei Runden lang unklar war: **nicht die Seite rollte,
   sondern die Section selbst.** Die generische Shell-Regel gibt jeder
   `.wrap > section[id^="screen-"]` ein `overflow-y:auto` – richtig für
   Textseiten, falsch für ein Werkzeug, dessen Spalten an den Rändern kleben
   sollen. Rollt die Section, wandert ALLES mit: Werkzeugkästen, Lineale,
   Seitenleiste.

   Cockpit, Unterrichtsfächer, Lautlesezeit und die Nachrichten-Zentrale sind
   aus genau diesem Grund schon ausgenommen. Das Studio gehört dazu – deshalb
   steht `blaetter` jetzt in derselben `:not()`-Kette und bekommt hier seine
   eigene Shell.

   KEINE MAGISCHE ZAHL MEHR: die Höhe kommt aus `--vh100` (die App rechnet
   sie selbst, weil `100vh` auf iOS lügt), und darunter reicht `flex` sie
   weiter. `#st-wirt` braucht deshalb kein `calc(100vh - …)` – der Wert war
   ohnehin falsch, weil `.wrap` schon begrenzt war. */
body[data-screen="blaetter"].has-sidebar .wrap{
  height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
  max-height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
  overflow:hidden; display:flex; flex-direction:column;
}
body[data-screen="blaetter"].has-sidebar .app-topbar{ flex:none; }
body[data-screen="blaetter"] #screen-blaetter{
  flex:1 1 auto; min-height:0; overflow:hidden; display:flex;
  flex-direction:column;
}
body[data-screen="blaetter"] #blaetter-content{
  flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
}
body[data-screen="blaetter"]{ overflow:hidden; }
/* DIE WERKZEUGSPALTEN GEHEN BIS AN DIE KARTENKANTE (Murat 07.08.2026:
   „soldaki aracin solunda, sagdakinin saginda bosluklar var - o bosluklara
   dogru araclari büyüt").

   NICHT ueber ein kleineres `.wrap`-Polster: dieselbe Zahl haelt auch die
   Kopfzeile („‹ Regal", Name, Speichern) vom Rand fern, und die soll dort
   bleiben, wo sie ist. Stattdessen steht das Mass EINMAL als `--bl-pad`,
   und `#st-wirt` zieht sich mit einem negativen Rand genau darum wieder
   hinaus (AB_ST_CSS). Zwei Zahlen, die sich aufheben muessen, gehoeren
   nicht an zwei Orte. */
body[data-screen="blaetter"]{ --bl-pad:12px; }
body[data-screen="blaetter"] .wrap{ max-width:none;
  padding-left:var(--bl-pad); padding-right:var(--bl-pad);
  padding-bottom:10px; }
/* DIE SEITENLEISTE SITZT 1 MM UEBER DER KARTENKANTE (Murat 07.08.2026:
   „o alttaki sayfa bari icerikleri sayfanin kenarina indir, hemen 1 mm
   üstünde olsun").

   WARUM DIESE ZEILE UEBERHAUPT NOETIG IST - und warum die drei Zeilen
   darueber NICHT gereicht haben: `body.has-sidebar:not(.lh-fullscreen)
   .wrap` setzt weiter unten (im 900px-Block) die KURZFORM
   `padding:20px … 32px`. Sie hat dieselbe Gewichtung (0,3,1) wie die
   blaetter-Regel und steht SPAETER in der Datei - also gewann sie, und
   unter der Seitenleiste blieben 32 px weisser Streifen stehen. Genau
   das Bild, das nach einem Fehler aussieht. `:not(.lh-fullscreen)` hebt
   die Gewichtung hier auf (0,4,1); damit entscheidet nicht mehr die
   Reihenfolge. 4 px sind bei 96 dpi 1,06 mm. */
body[data-screen="blaetter"].has-sidebar:not(.lh-fullscreen) .wrap{
  padding-bottom:4px;
  padding-left:var(--bl-pad); padding-right:var(--bl-pad);
}

/* =====================================================================
   SEITENLEISTE (Sidebar) + neue Kopfzeile — ersetzt die alte Top-Nav.
   Idee: linke, aufklappbare Spalte (Icons, eingeklappt mit Mini-Label),
   Inhalt bleibt mittig; oben nur Seitentitel + Postfach/Profil rechts.
   Mobil: Sidebar wird zur Schublade (Drawer), oben links per Menü-Icon.
   ===================================================================== */
:root{
  --sb-w-collapsed: 84px;   /* eingeklappt: Icon + kleines Label            */
  --sb-w-open: 248px;       /* ausgeklappt: Icon + Text (etwas breiter)     */
  --sb-gap: 14px;           /* Abstand Sidebar <-> Inhaltskarte             */
}

/* Dynamische Viewport-Höhe: --vh100 = tatsächlich SICHTBARE Bildschirmhöhe.
   Problem: im Browser (Safari/Chrome auf Tablet/Handy) zählt 100vh die GRÖSSTE
   Höhe – so als wäre die Adressleiste ausgeblendet. Die App-Shells (Cockpit,
   Nachrichten, Lautlesezeit …) wurden dadurch höher als der sichtbare Bereich
   und ragten unten heraus -> genau die 10-Zoll-Tablet-Beschwerde. Als installierte
   App (kein Browser-Chrome) passte 100vh dagegen exakt. 100dvh = aktuell sichtbare
   Höhe -> passt in BEIDEN Fällen. Fallback bleibt 100vh, falls dvh fehlt (alte
   Android-WebViews / Safari < 15.4): dort läuft exakt das bisherige Verhalten,
   also KEIN Risiko/Regression. Überall statt 100vh: var(--vh100). */
:root{ --vh100: 100vh; }
@supports (height: 100dvh){ :root{ --vh100: 100dvh; } }
/* Nachtrag Rotationsfix: 100dvh meldet auf iOS direkt nach dem Drehen kurzzeitig
   noch den ALTEN Wert. Sobald JS die echte Hoehe gemessen hat (siehe
   ssSyncViewport() in index.html), setzt es --vh100-js; das gewinnt dann. */
:root{ --vh100-js: 0px; }
@supports (height: 100dvh){
  :root:not([data-vh-ready]){ --vh100: 100dvh; }
}
:root[data-vh-ready]{ --vh100: var(--vh100-js); }

/* ===== SICHERHEITSNETZ (2026-07-26) =====================================
   Beschwerde aus der installierten App (iOS-PWA): "mal ist es ganzer
   Bildschirm, mal ist es unten abgeschnitten" – unzuverlaessig, mal so, mal so.

   URSACHE: `--vh100-js` ist ein FESTER Pixelwert und wurde als GROESSTE je
   beobachtete Hoehe gefuehrt. Ein einziger zu grosser Messwert (z. B. wenn
   `visualViewport` kurz fehlte und der Fallback `innerHeight` einsprang, der
   den Bereich hinter Statusleiste und Home-Indicator mitzaehlt) blieb dann
   fuer die ganze Sitzung stehen – das Panel war hoeher als der Bildschirm,
   der untere Rand lag ausserhalb. Beim naechsten Start passte es zufaellig
   wieder, daher das wechselhafte Bild.

   LOESUNG: beide Quellen gegeneinander deckeln. `min()` ist in BEIDE
   Fehlerrichtungen richtig:
     · JS-Wert zu GROSS (der Fehler oben)      -> 100dvh gewinnt.
     · 100dvh veraltet nach dem Drehen (der
       Grund, aus dem es den JS-Wert gibt)     -> der kleinere JS-Wert gewinnt.
   Die Tastatur stoert dabei nicht: `dvh` beruecksichtigt nur die dynamische
   Browser-Oberflaeche, NICHT die Bildschirmtastatur.
   Ohne `dvh` (iOS < 15.4) bleibt es bei der Zeile darueber – dort greift
   weiterhin allein der JS-Wert, wie bisher. */
@supports (height: 100dvh){
  :root[data-vh-ready]{ --vh100: min(var(--vh100-js), 100dvh); }
}

/* Die aufklappbare Leiste ist im Grundzustand versteckt (Landing/Schüler/
   Vollbild-Screens). Sichtbar wird sie erst, wenn renderSidebar() sie füllt. */
#app-sidebar{ display:none; }
#sb-overlay{ display:none; }

/* ---------- DESKTOP / TABLET quer (>= 900px): zwei bündige Spalten ---------- */
@media (min-width:900px){
  /* Body wird zum Flex-Container: Sidebar links, Inhalt rechts – aneinander,
     gleiche Höhe. Das Paar (Leiste + Panel) hat eine feste Maximalbreite und
     wird IMMER mittig gehalten (margin:auto) – links wie rechts gleich viel
     Luft, egal wie breit der Bildschirm ist. */
  body.has-sidebar:not(.lh-fullscreen){
    display:flex; align-items:stretch; gap:var(--sb-gap);
    /* Breiter + randnäher: Tablet nutzt fast die volle Breite, große Monitore
       bekommen mehr Lesefläche. Oben respektieren wir die iOS-Statusleiste
       (PWA auf dem Homescreen); ALLE Höhenrechnungen nutzen dieselben
       Variablen, damit unten exakt derselbe Rand bleibt wie oben/seitlich. */
    --shell-top:max(16px, env(safe-area-inset-top));
    /* etwas mehr Luft unten (Wunsch: Panel unten ein Stück "runter"). */
    --shell-bot:max(26px, env(safe-area-inset-bottom));
    padding:var(--shell-top) clamp(12px, 1.4vw, 22px) var(--shell-bot);
    min-height:var(--vh100);
    /* Breiter (2026-07): auf 13-Zoll-Tablets/grossen Monitoren blieb bei 1560px
       links/rechts viel Luft ungenutzt. 1760px nutzt die Fläche besser, ohne dass
       Zeilen unangenehm lang werden; auf 10-Zoll-Tablets greift die Kappe eh nicht
       (dort füllt der Inhalt schon fast randlos). */
    max-width:1760px; margin:0 auto;
  }
  /* Das Inhaltspanel darf die volle Restbreite nutzen (die alten .wrap-Kappen
     bei 1100/1240px gelten nur noch für Seiten OHNE Seitenleiste). */
  body.has-sidebar:not(.lh-fullscreen) .wrap{ max-width:none; }
  /* 2026-07 (Wunsch Murat, Vorbild Gmail): Die Leiste ist KEINE eigene weisse
     Karte mehr, sondern Teil der Flaeche dahinter – weiss ist nur noch das
     Inhaltspanel rechts. Dadurch wirkt die Seite ruhiger und der Blick landet
     dort, wo gearbeitet wird. Konkret entfallen background, border und
     box-shadow; Breite, Position und Innenabstand bleiben unveraendert.
     ACHTUNG: Mobil bleibt die Leiste eine Schublade ueber dem Inhalt und MUSS
     dort undurchsichtig sein – siehe die Regel bei @media(max-width:899.98px). */
  body.has-sidebar:not(.lh-fullscreen) #app-sidebar{
    display:flex; flex-direction:column; flex:none;
    position:sticky; top:var(--shell-top,16px); align-self:flex-start;
    height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    width:var(--sb-w-collapsed);
    background:transparent; border:none;
    border-radius:22px; box-shadow:none;
    padding:14px 8px; overflow:hidden;
    transition:width .22s cubic-bezier(.4,0,.2,1), padding .22s cubic-bezier(.4,0,.2,1);
  }
  body.has-sidebar.sb-open:not(.lh-fullscreen) #app-sidebar{
    width:var(--sb-w-open); padding:14px;
  }

  /* Inhaltsspalte = EIN großes weißes Panel, bündig mit der Leiste:
     gleicher oberer Rand, füllt die Restbreite, wächst mit dem Inhalt.
     Oben sitzt die Kopfzeile (Titel/Begrüßung + Profil), darunter der Screen. */
  body.has-sidebar:not(.lh-fullscreen) .wrap{
    flex:1 1 auto; min-width:0; margin:0;
    background:var(--card); border:1px solid var(--line);
    border-radius:22px; box-shadow:var(--shadow);
    /* Innenabstand skaliert mit: Tablet kompakter, Desktop großzügig. */
    padding:20px clamp(18px, 2vw, 28px) 32px;
    align-self:flex-start;
    min-height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
  }
  /* Material-Einstieg: WIRKLICH mittig im weißen Panel (v2.30.4).
     VORHER: #screen-upload rechnete mit `min-height:calc(var(--vh100) - 150px)`.
     Die 150 px waren geraten und decken den echten Overhead nicht ab
     (--shell-top + --shell-bot + 20/32 px Panel-Padding + Kopfzeile mit
     Titel/Profil). Der Screen wurde also HÖHER als der freie Bereich, das
     Panel wuchs über einen Bildschirm hinaus und der Inhalt saß sichtbar zu
     tief – „dikeyde ortalanmamış".
     JETZT: dasselbe Muster wie beim Cockpit – Panel ist genau einen Bildschirm
     hoch, die Kopfzeile bleibt oben stehen (flex:none), #screen-upload nimmt
     den Rest (flex:1) und zentriert sich darin über sein vorhandenes
     `justify-content:center`. Reicht der Platz auf kleinen Laptops nicht,
     scrollt NUR der Screen (ohne sichtbaren Balken), nichts wird abgeschnitten.
     Mobil/<900px bleibt unberührt. */
  body.has-sidebar[data-screen="upload"]:not(.lh-fullscreen) .wrap{
    height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    min-height:0; max-height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    overflow:hidden;
    display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="upload"]:not(.lh-fullscreen) .app-topbar{
    flex:none;
  }
  body.has-sidebar[data-screen="upload"]:not(.lh-fullscreen) #screen-upload{
    flex:1 1 auto; min-height:0; overflow-y:auto;
    scrollbar-width:none;
  }
  body.has-sidebar[data-screen="upload"]:not(.lh-fullscreen) #screen-upload::-webkit-scrollbar{
    display:none;
  }
  /* Cockpit = feste App-Shell (wie Unterrichtsfächer, der Nutzer-Referenz):
     Panel ist GENAU einen Bildschirm hoch, die Kopfzeile (Titel/Postfach/Profil)
     bleibt oben STEHEN, NUR der Inhalt scrollt im Panel – und zwar OHNE sichtbaren
     Scrollbalken (der störte im weißen Panel). Ergebnis: stabile Höhe (nicht mal
     kurz, mal lang), Leiste + Panel immer auf gleicher Höhe, Kopf immer sichtbar. */
  body.has-sidebar[data-screen="cockpit"]:not(.lh-fullscreen) .wrap{
    height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    min-height:0; max-height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    overflow:hidden;
    display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="cockpit"]:not(.lh-fullscreen) #screen-cockpit,
  body.has-sidebar[data-screen="cockpit"]:not(.lh-fullscreen) #screen-cockpit > .card{
    flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
  }
  /* Inhaltsbereich scrollt intern; Scrollbalken ausgeblendet (wie das uf-Portal). */
  body.has-sidebar[data-screen="cockpit"]:not(.lh-fullscreen) #cockpit-content{
    flex:1 1 auto; min-height:0; overflow-y:auto;
    scrollbar-width:none;
    display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="cockpit"]:not(.lh-fullscreen) #cockpit-content::-webkit-scrollbar{ display:none; }
  body.has-sidebar[data-screen="cockpit"]:not(.lh-fullscreen) #cockpit-fit{
    width:100%;
  }

  /* ===== GENERISCHE feste App-Shell für ALLE übrigen Nav-Seiten =====
     (Material, Aufgaben, Klassenbuch, Pinnwände, Kurse, Planung, Klassenarbeiten,
     Förderung, Fehlzeiten, Dateien …). Gleiches Muster wie Cockpit: die Kopfzeile
     bleibt oben (flex:none), die AKTIVE Screen-Section scrollt intern OHNE
     sichtbaren Balken, Panel-Höhe bleibt stabil (ein Bildschirm), Leiste + Panel
     bündig. Ausgenommen die Screens mit EIGENER Shell (cockpit, unterrichtsfaecher,
     lautlesezeit) und die Nachrichten-Zentrale (eigene .pf-shell). Die verborgenen
     Sections sind display:none -> die generische Regel trifft nur die sichtbare. */
  body.has-sidebar:not(.lh-fullscreen):not([data-screen="cockpit"]):not([data-screen="unterrichtsfaecher"]):not([data-screen="lautlesezeit"]):not([data-screen="nachrichten"]):not([data-screen="blaetter"]) .wrap{
    height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    max-height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    overflow:hidden; display:flex; flex-direction:column;
  }
  body.has-sidebar:not(.lh-fullscreen):not([data-screen="cockpit"]):not([data-screen="unterrichtsfaecher"]):not([data-screen="lautlesezeit"]):not([data-screen="nachrichten"]):not([data-screen="blaetter"]) .app-topbar{
    flex:none;
  }
  body.has-sidebar:not(.lh-fullscreen):not([data-screen="cockpit"]):not([data-screen="unterrichtsfaecher"]):not([data-screen="lautlesezeit"]):not([data-screen="nachrichten"]):not([data-screen="blaetter"]) .wrap > section[id^="screen-"]{
    flex:1 1 auto; min-height:0; overflow-y:auto; scrollbar-width:none;
    overscroll-behavior-y:none;   /* siehe Begruendung im mobilen Zweig */
  }
  body.has-sidebar:not(.lh-fullscreen):not([data-screen="cockpit"]):not([data-screen="unterrichtsfaecher"]):not([data-screen="lautlesezeit"]):not([data-screen="nachrichten"]):not([data-screen="blaetter"]) .wrap > section[id^="screen-"]::-webkit-scrollbar{ display:none; }

  /* Lautlesezeit = feste App-Shell wie Cockpit: Seite und Nav scrollen NICHT,
     nur der Kapiteltext im iframe scrollt. */
  body.has-sidebar[data-screen="lautlesezeit"]:not(.lh-fullscreen) .wrap{
    height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    min-height:0; max-height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    overflow:hidden;
    display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="lautlesezeit"]:not(.lh-fullscreen) .app-topbar{
    flex:none;
  }
  body.has-sidebar[data-screen="lautlesezeit"]:not(.lh-fullscreen) #screen-lautlesezeit{
    flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="lautlesezeit"]:not(.lh-fullscreen) #screen-lautlesezeit.hidden{
    display:none;
  }
  body.has-sidebar[data-screen="lautlesezeit"]:not(.lh-fullscreen) #ll-frame{
    flex:1 1 auto; min-height:0; height:auto !important;
  }

  /* Unterrichtsfächer = ebenfalls feste App-Shell: NUR das eingebettete Portal
     scrollt, nie die äußere Seite (sonst zwei Scrollbalken nebeneinander). */
  body.has-sidebar[data-screen="unterrichtsfaecher"]:not(.lh-fullscreen) .wrap{
    height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    min-height:0; max-height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    overflow:hidden;
    display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="unterrichtsfaecher"]:not(.lh-fullscreen) .app-topbar{
    flex:none;
  }
  body.has-sidebar[data-screen="unterrichtsfaecher"]:not(.lh-fullscreen) #screen-unterrichtsfaecher{
    flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="unterrichtsfaecher"]:not(.lh-fullscreen) #screen-unterrichtsfaecher.hidden{
    display:none;
  }
  body.has-sidebar[data-screen="unterrichtsfaecher"]:not(.lh-fullscreen) #uf-frame{
    flex:1 1 auto; min-height:0; height:auto !important;
  }

  /* Nachrichten-Zentrale = ebenfalls feste App-Shell (Kernregel: Leiste + Panel
     sind IMMER exakt gleich hoch, egal welcher Screen). Vorher war "nachrichten"
     von den Shell-Regeln ausgenommen und die .pf-shell hatte eine starre Hoehe
     calc(vh - 175px): stimmte die 175px-Annahme nicht mit Topbar + Panel-Padding
     ueberein, wurde .wrap hoeher als der Viewport, die Seite scrollte und die
     sticky Leiste stand versetzt zum Panel ("oben verrutscht"). Jetzt: Panel
     exakt ein Bildschirm hoch (wie Cockpit), Kopfzeile fix, die pf-shell fuellt
     den Rest per Flex (height:auto statt calc). Mobil (<=720px) bleibt die
     pf-shell ein position:fixed-Overlay – diese Regeln greifen nur >=900px. */
  body.has-sidebar[data-screen="nachrichten"]:not(.lh-fullscreen) .wrap{
    height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    min-height:0; max-height:calc(var(--vh100) - var(--shell-top,16px) - var(--shell-bot,16px));
    overflow:hidden;
    display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="nachrichten"]:not(.lh-fullscreen) .app-topbar{
    flex:none;
  }
  body.has-sidebar[data-screen="nachrichten"]:not(.lh-fullscreen) #screen-nachrichten{
    flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
  }
  body.has-sidebar[data-screen="nachrichten"]:not(.lh-fullscreen) #screen-nachrichten.hidden{
    display:none;
  }
  body.has-sidebar[data-screen="nachrichten"]:not(.lh-fullscreen) #pf-shell{
    flex:1 1 auto; min-height:0; height:auto;
  }

  /* Screens innerhalb des Panels: keine eigene weiße Karte mehr (sonst
     Weiß-auf-Weiß). Rahmen/Schatten/Hintergrund entfernen, Panel trägt alles. */
  body.has-sidebar:not(.lh-fullscreen) .wrap > section.card,
  body.has-sidebar:not(.lh-fullscreen) .wrap > section > .card{
    background:transparent; border:none; box-shadow:none;
    border-radius:0; padding:0; margin:0;
  }

  /* Die Kopfzeile bündig oben im Panel, mit dünner Trennlinie zum Inhalt. */
  body.has-sidebar:not(.lh-fullscreen) .app-topbar{
    margin:0 0 20px; padding-bottom:16px; border-bottom:1px solid var(--line);
  }
}
@media (min-width:1440px){
  body.has-sidebar:not(.lh-fullscreen) .wrap{ padding:24px 30px 36px; }
}

/* ---------- Sidebar-Innenleben (shared) ---------- */
#app-sidebar .sb-top{
  display:flex; align-items:center; gap:6px;
  padding:2px 4px 12px; margin-bottom:6px;
  border-bottom:1px solid var(--line);
}
#app-sidebar .sb-logo{ height:24px; width:auto; flex:none; cursor:pointer; transition:opacity .18s ease; }
/* Eingeklappt: logo.png (kompakt). Aufgeklappt: logo2.png (volle Wortmarke). */
#app-sidebar .sb-logo-mark{ height:26px; object-fit:contain; max-width:100%; }
body:not(.sb-open) #app-sidebar .sb-logo-full{ display:none; }
body.sb-open #app-sidebar .sb-logo-mark{ display:none; }
/* Aufgeklappt: Wortmarke (logo2) mittig statt linksbündig. */
body.sb-open #app-sidebar .sb-logo-full{ margin:0 auto; height:30px; }
#app-sidebar .sb-toggle{
  margin-left:auto; appearance:none; border:none; cursor:pointer;
  width:28px; height:28px; border-radius:8px; flex:none;
  background:rgba(127,127,127,.08); color:var(--muted);
  display:flex; align-items:center; justify-content:center;
  transition:background .14s,color .14s;
}
#app-sidebar .sb-toggle:hover{ background:rgba(127,127,127,.16); color:var(--ink); }
#app-sidebar .sb-toggle svg{ width:16px; height:16px; fill:none; stroke:currentColor;
  stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; transition:transform .22s; }
body.sb-open #app-sidebar .sb-toggle svg{ transform:rotate(180deg); }
/* Eingeklappt (schmal): Logo-Marke + Pfeil bleiben nebeneinander, mittig,
   ohne umzuspringen (Wunsch: Pfeil klebt am Logo). */
body:not(.sb-open) #app-sidebar .sb-top{ padding:2px 2px 12px; gap:3px; justify-content:center; }
body:not(.sb-open) #app-sidebar .sb-toggle{ margin-left:2px; }
body:not(.sb-open) #app-sidebar .sb-logo-mark{ height:22px; }

/* Scrollbereich mit den Einträgen */
#app-sidebar .sb-scroll{ flex:1; overflow-y:auto; overflow-x:hidden; margin:2px -4px; padding:2px 4px;
  scrollbar-width:none; display:flex; flex-direction:column; }
#app-sidebar .sb-scroll::-webkit-scrollbar{ display:none; }
#app-sidebar .sb-scroll .sb-item{ flex:none; }
/* Unterstützen: Teil der Liste, sitzt unten (margin-top:auto), scrollt aber mit. */
#app-sidebar .sb-scroll .sb-support{ margin-top:auto; }
#app-sidebar .sb-bottom{ flex:none; padding-top:8px; margin-top:4px; border-top:1px solid var(--line); }
/* Update-Zeile: ruhig (Claude-Stil). Kleiner blauer Punkt am Icon signalisiert
   "es gibt was Neues", ohne die ganze Zeile einzufaerben. Beschreibung bleibt
   dauerhaft sichtbar (kein Hover noetig), damit klar ist: Klick = neu laden. */
#app-sidebar .sb-update{ color:var(--ink); }
#app-sidebar .sb-update .sb-ico{ position:relative; color:#2E5BFF; }
#app-sidebar .sb-update .sb-ico::after{
  content:""; position:absolute; top:3px; right:3px; width:7px; height:7px;
  border-radius:50%; background:#2E5BFF; box-shadow:0 0 0 2px var(--card);
}
#app-sidebar .sb-update:hover{ background:rgba(46,91,255,.10); color:var(--ink); }
#app-sidebar .sb-update:hover .sb-ico{ background:transparent; }
#app-sidebar .sb-update:hover .sb-ico svg{ stroke:#2E5BFF; animation:none; }
body.sb-open #app-sidebar .sb-update .sb-desc{ max-height:15px; opacity:1; }
/* Kurze Bildschirme: Navigation kompakter, damit ALLE Knöpfe sichtbar bleiben
   (Inhalte skalieren, nichts verschwindet). */
@media (max-height:880px){
  #app-sidebar .sb-item{ padding:7px 8px; margin:1px 0; gap:10px; }
  body:not(.sb-open) #app-sidebar .sb-item{ padding:6px 3px; gap:3px; }
  body:not(.sb-open) #app-sidebar .sb-item .sb-label{ font-size:9px; }
  #app-sidebar .sb-group{ padding:8px 8px 3px 10px; font-size:9.5px; }
  body:not(.sb-open) #app-sidebar .sb-group{ padding:6px 12px 2px; }
  #app-sidebar .sb-item svg{ width:17px; height:17px; }
}
@media (max-height:740px){
  #app-sidebar .sb-item{ padding:5px 8px; }
  body:not(.sb-open) #app-sidebar .sb-item{ padding:4px 2px; }
  body:not(.sb-open) #app-sidebar .sb-item .sb-label{ font-size:8.5px; }
  #app-sidebar .sb-item svg{ width:15px; height:15px; }
}
#app-sidebar .sb-support{ position:relative; overflow:hidden; color:#7C5CFF; }
#app-sidebar .sb-support svg{ stroke:#7C5CFF; }
#app-sidebar .sb-support:hover{ background:rgba(124,92,255,.10); }
/* Sanfter Schein hinter dem Text (Markenfarbe, sehr dezent) – kein Lauflicht. */
#app-sidebar .sb-support::after{
  content:""; position:absolute; top:50%; left:50%; width:130px; height:36px;
  transform:translate(-50%,-50%); border-radius:999px; pointer-events:none;
  background:radial-gradient(ellipse at center, rgba(46,91,255,.16), transparent 70%);
  opacity:0; animation:sbGlowSoft 8s ease-in-out infinite;
}
@keyframes sbGlowSoft{ 0%,60%,100%{opacity:0;} 75%{opacity:1;} 90%{opacity:.35;} }
@media (prefers-reduced-motion: reduce){ #app-sidebar .sb-support::after{ animation:none; } }

/* Gruppen-Überschrift ("Werkzeuge" usw.) — klein, informativ, nicht laut */
#app-sidebar .sb-group{
  font-size:10.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted); opacity:.75; padding:14px 8px 6px 10px; white-space:nowrap;
}
#app-sidebar .sb-group + .sb-item{ margin-top:0; }
body:not(.sb-open) #app-sidebar .sb-group{
  /* eingeklappt: als dünne Trennlinie statt Text */
  font-size:0; padding:10px 12px 4px; position:relative;
}
body:not(.sb-open) #app-sidebar .sb-group::after{
  content:""; display:block; height:1px; background:var(--line);
}

/* Aufklappbare Menü-Bereiche (Unterricht / Planen & Prüfen / Werkzeuge).
   Verhalten wie macOS-Seitenleisten: Kopf klickbar, Pfeil dreht sich,
   Zustand bleibt (localStorage). Eingeklappte (schmale) Leiste: Kopf wird
   zur Trennlinie, Einträge bleiben IMMER sichtbar (sonst käme man nicht ran). */
#app-sidebar .sb-sec-h{
  appearance:none; border:none; background:transparent; cursor:pointer; font-family:inherit;
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:6px;
  font-size:10.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted); opacity:.8; padding:14px 8px 6px 10px; white-space:nowrap;
  border-radius:8px;
}
#app-sidebar .sb-sec-h:hover{ color:var(--ink); opacity:1; }
#app-sidebar .sb-sec-h svg{
  width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:2.2;
  stroke-linecap:round; stroke-linejoin:round; transition:transform .18s; flex:none;
}
#app-sidebar .sb-sec.closed .sb-sec-h svg{ transform:rotate(-90deg); }
body.sb-open #app-sidebar .sb-sec.closed .sb-sec-items{ display:none; }
body:not(.sb-open) #app-sidebar .sb-sec-h{
  font-size:0; padding:10px 12px 4px; cursor:default; pointer-events:none;
}
body:not(.sb-open) #app-sidebar .sb-sec-h::after{
  content:""; display:block; height:1px; background:var(--line); width:100%;
}
body:not(.sb-open) #app-sidebar .sb-sec-h svg{ display:none; }

/* Einträge */
#app-sidebar .sb-item{
  appearance:none; border:none; background:transparent; cursor:pointer;
  font-family:inherit; color:var(--muted); width:100%;
  display:flex; align-items:center; gap:11px;
  padding:6px 10px; border-radius:11px; margin:1px 0;
  text-align:left; transition:background .13s,color .13s;
}
#app-sidebar .sb-item:hover{ background:rgba(127,127,127,.08); color:var(--ink); }
#app-sidebar .sb-item.on{ background:var(--brand-soft); color:var(--brand); font-weight:700; }
#app-sidebar .sb-item svg{ width:21px; height:21px; flex:none; fill:none; stroke:currentColor;
  stroke-width:1.85; stroke-linecap:round; stroke-linejoin:round; }
#app-sidebar .sb-item .sb-label{
  font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden;
  opacity:1; transition:opacity .16s;
}
#app-sidebar .sb-item.on .sb-label{ font-weight:700; }
/* Standard (offen / Drawer): volle Beschriftung; kurze ausgeblendet. */
#app-sidebar .sb-item .sb-label-short{ display:none; }

/* ---- Konfetti-Pop (Hover): Icon-Badge färbt sich, wackelt kurz, zwei
   Farbpunkte fliegen davon; unter dem Namen klappt eine Mini-Beschreibung auf. */
#app-sidebar .sb-ico{
  position:relative; width:34px; height:32px; flex:none; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  transition:background .18s;
}
#app-sidebar .sb-item:hover .sb-ico{ background:var(--sbc,#7F77DD); }
#app-sidebar .sb-item:hover .sb-ico svg{ stroke:#fff; animation:sbWob .5s ease; }
#app-sidebar .sb-ico .pp{
  position:absolute; right:-2px; top:-2px; width:5px; height:5px; border-radius:50%;
  background:var(--sbc,#7F77DD); opacity:0; transform:scale(0); pointer-events:none;
}
#app-sidebar .sb-ico .pp2{ right:auto; left:-3px; top:auto; bottom:-1px; width:4px; height:4px; }
#app-sidebar .sb-item:hover .sb-ico .pp{ animation:sbPop .6s ease forwards; }
#app-sidebar .sb-item:hover .sb-ico .pp2{ animation:sbPop .6s ease .12s forwards; }
@keyframes sbWob{
  0%{transform:rotate(0) scale(1)} 35%{transform:rotate(8deg) scale(1.15)}
  70%{transform:rotate(-6deg) scale(1.05)} 100%{transform:rotate(0) scale(1.08)}
}
@keyframes sbPop{
  0%{opacity:0; transform:scale(0) translate(0,0)}
  40%{opacity:1; transform:scale(1) translate(2px,-4px)}
  100%{opacity:0; transform:scale(.4) translate(5px,-10px)}
}
#app-sidebar .sb-item .sb-desc{
  display:block; font-size:10.5px; font-weight:500; color:var(--muted);
  max-height:0; opacity:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  transition:max-height .2s ease, opacity .2s ease; letter-spacing:0;
}
body.sb-open #app-sidebar .sb-item:hover .sb-desc{ max-height:15px; opacity:1; }
body:not(.sb-open) #app-sidebar .sb-ico{ width:30px; height:26px; border-radius:8px; }
@media (prefers-reduced-motion: reduce){
  #app-sidebar .sb-item:hover .sb-ico svg,
  #app-sidebar .sb-item:hover .sb-ico .pp,
  #app-sidebar .sb-item:hover .sb-ico .pp2{ animation:none; }
}

/* eingeklappt: Icon oben, Mini-Label darunter (kleine, nette Beschriftung) */
body:not(.sb-open) #app-sidebar .sb-item{
  flex-direction:column; gap:4px; padding:9px 3px; border-radius:14px;
}
body:not(.sb-open) #app-sidebar .sb-item .sb-label-full{ display:none; }
body:not(.sb-open) #app-sidebar .sb-item .sb-label-short{ display:block; }
body:not(.sb-open) #app-sidebar .sb-item .sb-label{
  font-size:9.5px; font-weight:600; line-height:1.05; width:100%;
  text-align:center; letter-spacing:-.015em;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* ---------- Neue Kopfzeile (App-Topbar): Titel links, Postfach/Profil rechts ---------- */
.app-topbar{ display:none; }
body.has-sidebar:not(.lh-fullscreen) .app-topbar{
  display:flex; align-items:center; gap:14px; margin:2px 0 20px; min-height:44px;
}
.app-topbar .at-menu{ /* nur mobil sichtbar */ display:none; }
.app-topbar .at-title{
  flex:1 1 auto; min-width:0;
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  font-weight:800; letter-spacing:-.02em; color:var(--ink);
  font-size:clamp(19px,3vw,26px); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
/* Dezente Kennzahlen NEBEN dem Seitentitel (z. B. Pinnwand-Hub:
   "3 Pinnwände · 1 Ordner · 1 freigegeben"). Wird von pwhRender() gesetzt,
   setPageTitle() raeumt beim Screenwechsel via textContent automatisch auf. */
.at-title .at-title-meta{
  margin-left:12px; font-size:12.5px; font-weight:650; letter-spacing:0;
  color:var(--muted); vertical-align:2px; white-space:nowrap;
}
@media(max-width:600px){ .at-title .at-title-meta{ display:none; } }
/* Cockpit-Begrüßung als Kopfzeilen-Titel: NIE zweizeilig (Wunsch 2026-07) –
   eine Zeile, kürzt bei Bedarf mit … und bleibt neben dem Profilbild. Gilt
   zentral fuer alle Seiten (setPageTitle setzt denselben #page-title). */
.app-topbar .at-title.at-title-hello{
  font-size:clamp(19px,3vw,30px); line-height:1.15;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
body.has-sidebar:not(.lh-fullscreen) .app-topbar:has(.at-title-hello){
  align-items:center;
}
.app-topbar #authbar{ flex:none; }

/* Die alte Kopfzeile (Logo + Greeting + authbar) wird ersetzt, sobald die
   Sidebar aktiv ist. */
body.has-sidebar .topbar{ display:none; }
/* Doppelte Seitentitel: steht der Name schon oben in der App-Kopfzeile,
   blenden wir die identische Überschrift in der Karte aus. */
body.has-sidebar .screen-h2-dup{ display:none; }

/* ---------- MOBIL (< 900px): Sidebar als Schublade ---------- */
@media (max-width:899.98px){
  body.has-sidebar:not(.lh-fullscreen) .app-topbar{
    display:flex; margin:4px 0 16px; min-height:40px;
  }
  /* Seitliche Lücken auf Tablet-Hochkant (z. B. iPad 8, ~810px) für ALLE
     App-Seiten weg: die globale .wrap-Kappe (720px, Zeile ~28) ließ den Inhalt
     mittig kleben. Ab 900px hebt die Zwei-Spalten-Regel die Kappe schon auf –
     hier machen wir es fürs schmalere Fenster GLEICH, damit Cockpit, Material,
     Klassenbuch, Pinnwand … einheitlich die Breite nutzen (nur echte App-Shell-
     Seiten; Landing/Auth/Konto haben kein .has-sidebar und behalten 720px). */
  body.has-sidebar:not(.lh-fullscreen) .wrap{ max-width:none; }

  /* ===== FESTE App-Shell auch mobil + Tablet-Hochkant (iPad 8) =====
     Weisses Panel bleibt STEHEN, der Inhalt scrollt DARIN – Kopf oben fix, unten
     gefüllt. WICHTIG (der Fehler beim letzten Mal): die Ränder respektieren die
     Safe-Area (Notch/Statusleiste), damit das Panel oben NICHT unter die
     Statusleiste rutscht und oben genauso viel Luft bleibt wie unten.
     - Im Browser ist env(safe-area-inset-*) = 0 -> 10px Rand ringsum.
     - Als installierte App (Notch) -> Rand = Notch-Höhe, Panel sitzt sauber darunter.
     Ausnahme: Nachrichten + iframe-Portale (eigene Vollflächen). */
  body.has-sidebar:not(.lh-fullscreen):not([data-screen="unterrichtsfaecher"]):not([data-screen="lautlesezeit"]):not([data-screen="nachrichten"]) .wrap{
    /* ===== GLEICH GROSSE LUECKE oben wie unten =====
       Vorher: --m-top = safe-area-top (47px auf iPhone 12 Pro Max),
               --m-bot = safe-area-bottom (34px).
       Der obere Bereich wird aber von der STATUSLEISTE (Uhr/Akku) gefuellt –
       sichtbar grau blieb dort also ~0px, unten dagegen volle 34px. Genau das
       war die "unten ist eine Luecke"-Beschwerde: die Zahlen waren gesetzt,
       aber der SICHTBARE Abstand war ungleich.
       Jetzt: --gap ist die sichtbare graue Luecke und gilt oben wie unten
       identisch. Oben kommt die Statusleisten-Hoehe zusaetzlich dazu (sonst
       laege das Panel unter der Uhr), unten NICHT – dadurch ist der graue
       Rand ober- und unterhalb des Panels exakt gleich breit.
       Der Home-Indicator liegt dann auf dem weissen Panel; damit Inhalt nicht
       darunter rutscht, federt die Scroll-Section unten ab (siehe unten). */
    /* 10px -> 7px (Rueckmeldung Murat 02.08.2026: "oben frisst es Flaeche").
       WAS DABEI ZU HOLEN IST, und was nicht - am iPhone 17 nachgerechnet:
           Dynamic Island endet   ~48px
           safe-area-inset-top     62px   <- 14px gehoeren iOS, nicht uns
           --gap                   10px   <- NUR das ist unser Anteil
           Panel beginnt           72px
       Die 14px Reserve setzt das Betriebssystem; wer sie anfasst, schiebt das
       Panel unter Uhr und Akku. Verhandelbar ist allein --gap, und der gilt
       oben wie unten GLEICH - die Symmetrie ist kein Zufall, sondern die
       Behebung der alten Beschwerde "unten ist eine Luecke" (siehe oben).
       Deshalb 7px statt 4px: das kostet 3px Flaeche und haelt den Rahmen
       ringsum gleich breit. */
    --gap: 7px;
    --m-top: calc(env(safe-area-inset-top, 0px) + var(--gap));
    --m-bot: var(--gap);
    --m-side: max(var(--gap), env(safe-area-inset-left, 0px));

    /* ===== KEINE HOEHENRECHNUNG MEHR (2026-07-26) =========================
       Vorher: `height: calc(var(--vh100) - …)`. Damit haengt die Panel-Hoehe
       an einer GEMESSENEN Zahl - und jede Abweichung zwischen dem, was das
       Geraet meldet, und dem, was es wirklich anzeigt, wird sofort als
       abgeschnittener oder zu kurzer Bildschirm sichtbar. Genau das war die
       wiederkehrende, nicht reproduzierbare Beschwerde.

       Jetzt: das Panel ist `position:fixed` und an ALLEN VIER SEITEN
       angeschlagen. Ein so verankertes Element fuellt den Layout-Viewport
       exakt aus - ohne dass irgendjemand seine Hoehe kennen muss. Es gibt
       nichts mehr zu messen, zu runden oder zu deckeln: was der Viewport ist,
       ist das Panel. Rechnet das Geraet anders als erwartet, waechst oder
       schrumpft das Panel einfach mit.
       (Die Seite selbst scrollt ohnehin nicht - gescrollt wird die
       Screen-Section IM Panel, siehe weiter unten.) */
    position: fixed;
    top: var(--m-top); bottom: var(--m-bot);
    left: var(--m-side); right: var(--m-side);
    margin: 0;
    width: auto; max-width: none; height: auto; max-height: none;
    box-sizing: border-box;
    overflow: hidden;
    display: flex; flex-direction: column;
    background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 16px 16px 0;

    /* ===== Ecken-Rundung: geraetetypisch OHNE Geraete-Abfrage =====
       Kein CSS/JS kann den echten Eckenradius des Bildschirms auslesen – weder
       fuer iPhone 6 (eckig) noch iPhone 17 (stark gerundet) noch die hunderten
       Android-Geraete. Fest verdrahtete Werte waeren also auf der Mehrheit der
       Geraete falsch.
       Trick: env(safe-area-inset-*) ist der einzige verfuegbare Indikator.
       Geraete MIT gerundetem Display/Home-Indicator melden dort Werte > 0
       (iPhone X..17: unten 34px), eckige Geraete (iPhone 6/SE, iPad, Android
       mit Tasten, Desktop) melden 0. Wir rechnen daraus einen weichen Radius –
       je runder das Geraet, desto runder das Panel – und deckeln oben und unten
       per clamp(), damit nichts entgleist.
       Unten bewusst runder als oben (dort ist die Geraeterundung am staerksten
       sichtbar, oben ueberdeckt die Statusleiste einen Teil).
       WICHTIG – Fallback zuerst: clamp() gibt es erst ab iOS 13.4. Auf aelteren
       Geraeten (iPhone 6 bleibt bei iOS 12) wird die zweite Zeile als ungueltig
       verworfen und die feste 24px-Regel bleibt stehen. Kein eckiges Panel. */
       NACHGESCHAERFT 02.08.2026, mit zwei Aenderungen:

       (a) ALLE VIER Ecken haengen jetzt an safe-area-inset-BOTTOM, auch die
           oberen. Vorher richteten sich die oberen nach -TOP, und der Wert ist
           je nach Betriebsart verschieden: als installierte PWA meldet iOS
           oben 0 (die Statusleiste liegt dort ausserhalb der WebView), in der
           Capacitor-App dagegen 62. Dieselbe Seite hatte damit auf demselben
           Geraet unterschiedlich runde obere Ecken - PWA 20px, App 30px.
           -bottom meldet in BEIDEN Betriebsarten denselben Wert (34px) und ist
           damit der verlaesslichere Anzeiger fuer "dieses Geraet hat einen
           gerundeten Bildschirm".

       (b) Die Obergrenzen waren zu niedrig. Ein iPhone hat rund 55px
           Eckenradius; das Panel sitzt --gap davon entfernt, passend waeren
           also etwa 45px. Gedeckelt war bei 30/34 - sichtbar eckiger als das
           Geraet. Jetzt ~40 oben und ~47 unten (bei -bottom = 34px).
           Unten bleibt runder als oben: dort ist die Geraeterundung am
           staerksten sichtbar, oben ueberdeckt die Statusleiste einen Teil. */
    border-radius: 24px;
    border-radius:
      clamp(20px, calc(16px + env(safe-area-inset-bottom, 0px) * 0.70), 42px)
      clamp(20px, calc(16px + env(safe-area-inset-bottom, 0px) * 0.70), 42px)
      clamp(22px, calc(18px + env(safe-area-inset-bottom, 0px) * 0.85), 47px)
      clamp(22px, calc(18px + env(safe-area-inset-bottom, 0px) * 0.85), 47px);
  }
  /* Kopfzeile bleibt oben (flex:none) mit dünner Trennlinie, klar getrennt vom
     Inhalt (kein Ineinanderlaufen mehr). */
  body.has-sidebar:not(.lh-fullscreen):not([data-screen="unterrichtsfaecher"]):not([data-screen="lautlesezeit"]):not([data-screen="nachrichten"]) .app-topbar{
    flex: none; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
  }
  /* Die aktive Screen-Section ist der interne Scroll-Bereich (Balken ausgeblendet). */
  body.has-sidebar:not(.lh-fullscreen):not([data-screen="unterrichtsfaecher"]):not([data-screen="lautlesezeit"]):not([data-screen="nachrichten"]) .wrap > section[id^="screen-"]{
    /* Unten federt die Safe-Area ab: das Panel reicht jetzt bis dicht an den
       Bildschirmrand, der Home-Indicator liegt also DARUEBER. Diese Reserve
       sorgt dafuer, dass die letzte Zeile trotzdem frei lesbar/tippbar bleibt. */
    flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none;
    /* KEIN eigenes Gummiband (v2.42.8): Beim Pull-to-Refresh schiebt unser
       Skript das ganze Panel nach unten. Ohne diese Zeile federt iOS die
       Liste ZUSAETZLICH im Panel durch - Kopfzeile und Inhalt wandern dann
       getrennt voneinander, es sieht aus wie zwei Bewegungen uebereinander
       (Rueckmeldung 2026-07-26). Jetzt bewegt sich nur das Panel. */
    overscroll-behavior-y: none;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  body.has-sidebar:not(.lh-fullscreen):not([data-screen="unterrichtsfaecher"]):not([data-screen="lautlesezeit"]):not([data-screen="nachrichten"]) .wrap > section[id^="screen-"]::-webkit-scrollbar{ display: none; }

  /* ---- AUSNAHME: Einstellungen und Admin scrollen NICHT selbst (v2.99.2) ---
     BEFUND Murat 02.08.2026: "einstellungen a özel altta o bos yer duruyo" -
     unter der Liste klaffte eine Luecke, die zu nichts gehoerte.

     URSACHE: Die Regel darueber gibt JEDER Screen-Section ein Polster von
     16px + Safe-Area (rund 50px am iPhone). Das ist richtig, SOLANGE die
     Section selbst scrollt - dann ist es die Reserve, in die die letzte Zeile
     hineinlaufen darf. Genau diese beiden Bildschirme scrollen aber nicht
     selbst: `#screen-konto` und `#screen-admin` stehen weiter oben auf
     `overflow:hidden`, weil INNEN `#konto-content` bzw. `.adm-main` scrollt
     (sonst gaebe es zwei Balken). Fuer sie ist das Polster deshalb kein
     Auslauf, sondern eine tote Flaeche am unteren Panelrand, die niemand je
     fuellen kann - unabhaengig davon, wie weit man scrollt.

     KORREKTUR MEINERSEITS: In v2.99.0 stand hier die Vermutung, der Inhalt
     sei ABGESCHNITTEN, und `#konto-content` bekam zusaetzliches Polster.
     Das war die falsche Richtung - es hat die Luecke vergroessert. Die
     Reserve gehoert an den Ort, der wirklich scrollt, und nur einmal.

     WARUM HIER UND NICHT IM 640px-Block: die Luecke entsteht durch diese
     Regel, und die gilt ab 899.98px abwaerts. Auf dem Tablet im Hochformat
     ist sie genauso da. Ein Fix nur fuer 640px waere kein Fix, sondern eine
     zweite Wahrheit. */
  body.has-sidebar[data-screen="konto"] .wrap > #screen-konto,
  body.has-sidebar[data-screen="admin"] .wrap > #screen-admin{
    padding-bottom: 0;
  }
  body.has-sidebar[data-screen="konto"] #konto-content{
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  /* Innere weisse Karten neutralisieren (Panel trägt das Weiss). */
  body.has-sidebar:not(.lh-fullscreen) .wrap > section.card,
  body.has-sidebar:not(.lh-fullscreen) .wrap > section > .card{
    background: transparent; border: none; box-shadow: none; border-radius: 0; padding: 0; margin: 0;
  }

  .app-topbar .at-menu{
    display:flex; align-items:center; justify-content:center; flex:none;
    width:40px; height:40px; border-radius:12px; cursor:pointer;
    appearance:none; border:none; background:rgba(127,127,127,.08); color:var(--ink);
  }
  .app-topbar .at-menu:hover{ background:rgba(127,127,127,.16); }
  .app-topbar .at-menu svg{ width:21px; height:21px; fill:none; stroke:currentColor;
    stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  .app-topbar .at-title{ font-size:clamp(17px,5vw,21px); }
  /* Begrüßung mobil ebenfalls einzeilig halten (sonst kürzt sie neben dem
     Profilbild nicht, weil die Zwei-Klassen-Regel groesser bleibt). */
  .app-topbar .at-title.at-title-hello{ font-size:clamp(16px,4.6vw,22px); }

  /* Drawer + Overlay */
  body.has-sidebar #app-sidebar{
    display:flex; flex-direction:column; position:fixed; top:0; bottom:0; left:0; z-index:9500;
    width:min(84vw,300px); background:var(--card);
    border:none; border-right:1px solid var(--line); border-radius:0 20px 20px 0;
    box-shadow:0 12px 40px rgba(27,34,48,.22);
    padding:calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
    transform:translateX(-104%); transition:transform .26s cubic-bezier(.4,0,.2,1);
    overflow:hidden;
  }
  body.has-sidebar.drawer-open #app-sidebar{ transform:translateX(0); }
  #sb-overlay{
    display:block;
    position:fixed; inset:0; z-index:9400; background:rgba(0,0,0,.42);
    opacity:0; pointer-events:none; transition:opacity .22s;
  }
  body.drawer-open #sb-overlay{ opacity:1; pointer-events:auto; }

  /* Im Drawer immer die volle (ausgeklappte) Darstellung — Text sichtbar. */
  body.has-sidebar #app-sidebar .sb-item{ flex-direction:row; gap:12px; padding:11px 12px; }
  body.has-sidebar #app-sidebar .sb-item .sb-label{ font-size:15px; }
  body.has-sidebar #app-sidebar .sb-item .sb-label-full{ display:block; }
  body.has-sidebar #app-sidebar .sb-item .sb-label-short{ display:none; }
  body.has-sidebar #app-sidebar .sb-group{ font-size:10.5px; padding:16px 10px 6px; }
  body.has-sidebar #app-sidebar .sb-group::after{ display:none; }
  body.has-sidebar #app-sidebar .sb-toggle{ display:none; }
  body.has-sidebar #app-sidebar .sb-top{ flex-direction:row; gap:10px; padding:2px 4px 12px; }
  body.has-sidebar #app-sidebar .sb-logo-mark{ display:none; }
  body.has-sidebar #app-sidebar .sb-logo-full{ display:block; }
  body.has-sidebar .wrap{ padding-left:calc(16px + env(safe-area-inset-left)); }

  /* Profilkopf im Drawer (Foto + Name), oben — Tap öffnet Konto verwalten. */
  #app-sidebar .sb-profile{
    display:flex; align-items:center; gap:11px; width:100%;
    appearance:none; border:none; background:transparent; cursor:pointer;
    padding:10px 8px; border-radius:14px; text-align:left; margin-bottom:4px;
    transition:background .13s;
  }
  #app-sidebar .sb-profile:hover{ background:rgba(127,127,127,.08); }
  #app-sidebar .sb-prof-av{ width:44px; height:44px; border-radius:50%; flex:none;
    display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700;
    font-size:16px; background-size:cover; background-position:center; }
  /* display:block, damit Name und Schule UNTEREINANDER stehen (sonst kleben
     sie in einer Zeile zusammen: "AdminFrida-Levy-…"). */
  #app-sidebar .sb-prof-name{ display:block; font-weight:700; font-size:15px; color:var(--ink); line-height:1.15;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #app-sidebar .sb-prof-sub{ display:block; font-size:12px; color:var(--muted); margin-top:2px;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}
/* Desktop: Profil-Kopf im Drawer nicht anzeigen (dort sitzt Profil oben rechts). */
@media (min-width:900px){ #app-sidebar .sb-profile{ display:none; } }

/* ===== PINNWÄNDE: Ordner-Übersicht (App-Tab) ===== */
.pwh-toolbar{display:flex;align-items:stretch;gap:8px;margin-bottom:18px;flex-wrap:nowrap;}
/* Suche + Buttons alle exakt 40px hoch (box-sizing), damit nichts heraussteht. */
.pwh-search{display:flex;align-items:center;gap:8px;flex:1;min-width:0;height:40px;box-sizing:border-box;background:var(--paper,#F4F6FA);border:1.5px solid var(--line);border-radius:10px;padding:0 12px;color:var(--muted);}
.pwh-search input{flex:1;min-width:0;border:none;outline:none;background:transparent;font:inherit;font-size:14px;color:var(--ink);}
.pwh-search-x{border:none;background:transparent;color:var(--muted);cursor:pointer;font-size:14px;flex:none;}
.pwh-tbtn{flex:none;height:40px;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--line);background:#fff;color:var(--ink);border-radius:10px;padding:0 14px;font:inherit;font-size:13.5px;font-weight:700;cursor:pointer;white-space:nowrap;}
.pwh-tbtn.primary{background:var(--brand,#2E5BFF);border-color:var(--brand,#2E5BFF);color:#fff;}
.pwh-tbtn.danger{border-color:#F1A9A9;background:#FDECEC;color:#B42318;}
.pwh-tbtn:hover{filter:brightness(.97);}
@media(max-width:560px){ .pwh-tbtn-tx{display:none;} .pwh-tbtn{padding:8px 10px;} }
.pwh-trash-h{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:4px 0 6px;}
.pwh-trash-row{display:flex;align-items:center;gap:9px;padding:8px 2px;border-bottom:1px solid var(--line);}
.pwh-trash-name{flex:1;min-width:0;font-size:13.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pwh-restore{flex:none;border:1.5px solid var(--brand,#2E5BFF);background:#fff;color:var(--brand,#2E5BFF);border-radius:9px;padding:5px 11px;font:inherit;font-size:12px;font-weight:700;cursor:pointer;}
.pwh-restore:hover{background:var(--brand-soft,#E9EEFF);}
.pwh-purge{flex:none;border:1.5px solid #F1A9A9;background:#FDECEC;color:#B42318;border-radius:9px;padding:5px 8px;cursor:pointer;display:inline-flex;align-items:center;}
.pwh-crumb{display:flex;align-items:center;gap:8px;margin-bottom:16px;font-size:14px;color:var(--muted);}
.pwh-home{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:#fff;border-radius:9px;width:32px;height:32px;cursor:pointer;color:var(--ink);}
.pwh-home:hover{border-color:var(--brand);color:var(--brand);}
.pwh-sec-h{font-size:16px;font-weight:850;color:var(--ink);margin:0 0 10px;}
.pwh-hint{color:var(--muted);font-size:14px;padding:12px 2px;}
.pwh-newitem{display:flex;align-items:center;gap:9px;width:100%;border:none;background:transparent;font:inherit;font-size:14px;font-weight:600;color:var(--ink);padding:9px 11px;border-radius:9px;cursor:pointer;text-align:left;}
.pwh-newitem:hover{background:var(--brand-soft,#E9EEFF);}
/* FESTE Kartenbreite (240px) + linksbündig: Karten ändern ihre Größe NIE,
   egal wie viele es sind. Ordner und Pinnwände nutzen dieselbe Breite -> Spalten
   sind bündig untereinander (stabil, kein Springen beim Hinzufügen). */
.pwh-fgrid{display:grid;grid-template-columns:repeat(auto-fill,240px);justify-content:start;gap:13px;}
.pwh-folder{background:#fff;border:1.5px solid var(--line);border-left:5px solid var(--fc,#2E5BFF);border-radius:14px;padding:13px 15px;cursor:pointer;transition:transform .12s,box-shadow .12s;}
.pwh-folder:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(20,30,60,.13);}
.pwh-folder-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:8px;}
.pwh-fmenu{border:none;background:transparent;color:var(--muted);cursor:pointer;padding:2px;border-radius:6px;opacity:.6;}
.pwh-fmenu:hover{opacity:1;background:rgba(127,127,127,.1);}
.pwh-folder-name{font-weight:850;font-size:15.5px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pwh-folder-meta{font-size:12.5px;color:var(--muted);font-weight:700;margin-top:3px;}
.pwh-bgrid{display:grid;grid-template-columns:repeat(auto-fill,240px);justify-content:start;gap:13px;}
.pwh-board{position:relative;overflow:hidden;background:var(--sf,#E9EEFF);border:1.5px solid var(--line);border-top:4px solid var(--ac,#2E5BFF);border-radius:14px;padding:14px 15px;cursor:pointer;transition:transform .12s,box-shadow .12s;min-height:92px;}
.pwh-board::after{content:"";position:absolute;top:-20px;right:-20px;width:70px;height:70px;border-radius:50%;background:var(--ac,#2E5BFF);opacity:.16;pointer-events:none;}
.pwh-board:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(20,30,60,.13);}
.pwh-board-title,.pwh-board-desc,.pwh-board-meta,.pwh-board-open,.pwh-bmenu{position:relative;z-index:1;}
.pwh-bmenu{position:absolute;top:8px;right:8px;z-index:5;border:none;background:rgba(255,255,255,.9);color:var(--ink);cursor:pointer;padding:5px;border-radius:8px;opacity:.7;line-height:0;box-shadow:0 1px 4px rgba(20,30,60,.12);transition:opacity .12s,background .12s,box-shadow .12s;}
.pwh-board:hover .pwh-bmenu{opacity:1;}
.pwh-bmenu:hover{background:#fff;box-shadow:0 3px 10px rgba(20,30,60,.2);}
.pwh-board-title{font-weight:850;font-size:15.5px;color:var(--ink);margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:22px;}
.pwh-board-desc{font-size:12.5px;color:var(--ink);opacity:.72;margin-bottom:5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.pwh-board-meta{font-size:12.5px;color:var(--ink);opacity:.65;font-weight:700;}
.pwh-lbl{display:block;font-weight:700;font-size:13px;color:var(--ink);margin:12px 0 6px;}
.pwh-in{width:100%;box-sizing:border-box;padding:10px 12px;border:1.5px solid var(--line);border-radius:10px;font:inherit;font-size:14.5px;color:var(--ink);resize:vertical;}
.pwh-seg-row{display:flex;gap:6px;}
.pwh-seg{flex:1;border:1.5px solid var(--line);background:#fff;border-radius:9px;padding:8px;font:inherit;font-size:13.5px;font-weight:700;color:var(--muted);cursor:pointer;}
.pwh-seg.on{background:var(--brand,#2E5BFF);border-color:var(--brand,#2E5BFF);color:#fff;}
.pwh-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;font-size:13.5px;color:var(--ink);cursor:pointer;}
.pwh-toggle span{flex:1;}
.pwh-toggle input{width:20px;height:20px;flex:none;cursor:pointer;}
.pwh-board-open{font-size:12px;color:var(--brand);font-weight:700;margin-top:8px;opacity:0;transition:opacity .12s;}
.pwh-board:hover .pwh-board-open{opacity:1;}
.pwh-sw-row{display:flex;flex-wrap:wrap;gap:9px;}
.pwh-sw{width:30px;height:30px;border-radius:50%;border:2px solid transparent;cursor:pointer;padding:0;}
.pwh-sw.on{border-color:var(--ink);box-shadow:0 0 0 2px #fff inset;}
.pwh-pop{position:absolute;background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:0 12px 34px rgba(15,23,42,.2);padding:5px;min-width:190px;z-index:80;}
.pwh-pop button{display:block;width:100%;border:none;background:transparent;font:inherit;font-size:13.5px;color:var(--ink);padding:9px 11px;border-radius:8px;cursor:pointer;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pwh-pop button:hover{background:var(--brand-soft,#E9EEFF);}
.pwh-pop button.danger{color:#D9534F;}
.pwh-pop button.danger:hover{background:#FDECEC;}
.pwh-pop-lbl{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:6px 11px 3px;}
.pwh-pop-div{height:1px;background:var(--line);margin:5px 0;}

/* =====================================================================
   SCHULSEITE (#screen-schule) – Umbau 2026-07
   WIE: Alle Blöcke der Schulseite haben jetzt echte Klassen statt
   Inline-Styles. Grund: die Inline-Grids (`ss-head-grid`, das alte
   Bewertungs-Panel) hatten KEINE Media Query – unter 400px blieben sie
   zweispaltig und die Kennzahlen-Kacheln rutschten aus dem Bild
   ("mobilde kutucuklar kaymış", Murat 2026-07). Regel für diese Datei:
   jedes mehrspaltige Grid der Schulseite bricht unter 760px auf eine
   Spalte, jeder Text darf umbrechen (overflow-wrap), nichts wird
   abgeschnitten.
   MIT WEM: schulseiteHtml() / ssFunktionenHtml() / ssBewertungHtml() /
   svRender() / svTabelleRender() in static/js/index-app.js.
   Breite: in der App-Shell KEINE eigene Kappe – die Seite füllt das
   Inhaltspanel wie Cockpit/Klassenbuch auch (body.has-sidebar .wrap
   ist max-width:none). Nur der Vollbild-Fallback kappt bei 1240px.
   ===================================================================== */
.ss-wrap{margin:0 auto;padding:6px clamp(14px,1.6vw,24px) 48px;}
.ss-wrap.ss-solo{max-width:1240px;padding:34px 22px 90px;}

/* ---- Reiterleiste: mittig, waagerecht scrollbar statt gequetscht ---- */
.ss-tabs{max-width:820px;margin-left:auto;margin-right:auto;overflow-x:auto;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;}
.ss-tabs::-webkit-scrollbar{display:none;}
.ss-tabs .adm-tab{flex:1 1 auto;min-width:max-content;padding-left:12px;padding-right:12px;font-size:12.5px;}
.ss-tabs .adm-tab span{white-space:nowrap;}

/* ---- Kopfkarte: Identität links, Kennzahlen rechts ---- */
.ss-head{background:var(--card);border:1px solid var(--line);border-radius:22px;
  box-shadow:var(--shadow);padding:22px 24px;margin-bottom:6px;
  display:grid;grid-template-columns:minmax(220px,.85fr) minmax(320px,2fr);gap:22px;align-items:center;}
.ss-ident{display:flex;align-items:center;gap:16px;min-width:0;}
.ss-logo{width:84px;height:84px;flex:none;border-radius:22px;border:1px solid var(--line);
  box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;
  background:var(--brand) center/contain no-repeat content-box;cursor:pointer;}
.ss-chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;}
.ss-chip{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;
  padding:5px 12px;border-radius:20px;overflow-wrap:anywhere;}
.ss-chip.ok{background:var(--ok-soft);color:#0F7A43;}
.ss-chip.warn{background:var(--amber-soft);color:#B4690E;}
.ss-chip.star{background:#FFF7E3;color:#8A6100;}
.ss-chip.plain{background:transparent;color:var(--muted);font-weight:600;padding-left:0;}
.ss-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:10px;min-width:0;}
.ss-stat{border:1px solid var(--line);border-radius:16px;padding:13px 10px;text-align:center;min-width:0;}
.ss-stat b{display:block;font-size:22px;font-weight:800;letter-spacing:-.02em;line-height:1.15;}
.ss-stat span{display:block;font-size:11.5px;color:var(--muted);margin-top:3px;line-height:1.35;overflow-wrap:anywhere;}
.ss-stat i{display:inline-flex;width:32px;height:32px;border-radius:11px;align-items:center;justify-content:center;margin-bottom:7px;}

/* ---- Abschnittsüberschrift mit optionalem Textknopf rechts ---- */
.ss-sec{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin:26px 2px 12px;}
.ss-sec b{font-size:17px;letter-spacing:-.01em;}
.ss-sec .ss-sub{font-size:13px;color:var(--muted);}
.ss-sec .ss-lnk{margin-left:auto;background:none;border:0;padding:0;font:inherit;font-size:13px;
  font-weight:700;color:var(--brand);cursor:pointer;}
.ss-sec .ss-lnk:hover{text-decoration:underline;}

/* ---- Funktionen ---- */
.ss-fgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;}

/* ---- Kollegium: kompakte Karte statt Farbpanel ---- */
.ss-kol{background:var(--card);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);
  padding:16px 20px;display:flex;align-items:center;gap:18px;flex-wrap:wrap;}
.ss-kol-num{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;}
.ss-kol-meta{min-width:0;}
.ss-kol-meta .s{font-size:12.5px;color:var(--muted);margin-top:4px;overflow-wrap:anywhere;}
.ss-kol-sp{flex:1 1 0;min-width:0;}
.ss-btn{border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:12px;
  padding:9px 16px;font:inherit;font-size:13.5px;font-weight:650;cursor:pointer;white-space:nowrap;}
.ss-btn:hover{border-color:var(--brand);color:var(--brand);}
.ss-btn.pri{background:var(--brand);border-color:var(--brand);color:#fff;}
.ss-btn.pri:hover{background:var(--brand-dk);color:#fff;}
.ss-bewgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-top:12px;}

/* =====================================================================
   SCHÜLERVERZEICHNIS – EINE Werkzeugleiste (2026-07)
   Vorher standen drei dauerhaft aufgeklappte Blöcke über der Tabelle
   (Klasse anlegen · Filter · Aktionen) – zusammen fast ein halber
   Bildschirm, bevor man das erste Kind sah. Jetzt: Suche links, aktive
   Filter als Chips, rechts zwei Aufklapp-Menüs. Zustand liegt in
   SV_MENU (index-app.js), damit ein Neuzeichnen das Menü nicht schließt.
   ===================================================================== */
.sv-tbar{background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);
  padding:10px 12px;margin-bottom:12px;display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.sv-search{flex:1 1 240px;min-width:0;display:flex;align-items:center;gap:8px;
  border:1px solid var(--line);border-radius:12px;padding:7px 12px;background:var(--paper);}
.sv-search input{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:13.5px;color:var(--ink);outline:none;}
.sv-tbar-sp{flex:1 1 0;min-width:0;}
.sv-fchips{display:flex;gap:7px;flex-wrap:wrap;align-items:center;min-width:0;}
.sv-fchip{display:inline-flex;align-items:center;gap:7px;background:var(--brand-soft);color:var(--brand-dk);
  border-radius:20px;padding:5px 8px 5px 12px;font-size:12.5px;font-weight:650;max-width:100%;}
.sv-fchip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sv-fchip button{flex:none;border:0;background:rgba(46,91,255,.16);color:var(--brand-dk);
  width:18px;height:18px;border-radius:50%;font:inherit;font-size:11px;line-height:1;cursor:pointer;}
.sv-menuwrap{position:relative;}
.sv-menu{position:absolute;right:0;top:calc(100% + 7px);z-index:60;width:270px;max-width:min(300px,88vw);
  background:var(--card);border:1px solid var(--line);border-radius:16px;
  box-shadow:0 14px 38px rgba(27,34,48,.18);padding:8px;}
.sv-menu h4{margin:9px 10px 5px;font-size:11px;font-weight:750;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;}
.sv-menu button, .sv-menu a{display:flex;width:100%;align-items:center;gap:10px;background:none;border:0;
  border-radius:10px;padding:9px 10px;font:inherit;font-size:13.5px;font-weight:600;color:var(--ink);
  text-align:left;text-decoration:none;cursor:pointer;}
.sv-menu button:hover, .sv-menu a:hover{background:var(--brand-soft);color:var(--brand-dk);}
.sv-menu button svg, .sv-menu a svg{flex:none;opacity:.7;}
.sv-menu hr{border:0;border-top:1px solid var(--line);margin:7px 4px;}
.sv-menu label{display:block;margin:9px 10px 4px;font-size:11.5px;font-weight:700;color:var(--muted);}
.sv-menu select{display:block;width:calc(100% - 20px);margin:0 10px 8px;padding:8px 10px;
  border:1px solid var(--line);border-radius:10px;font:inherit;font-size:13px;
  background:var(--card);color:var(--ink);}
.sv-menu .sv-neu-zeile{display:flex;gap:6px;margin:0 10px 8px;}
.sv-menu .sv-neu-zeile select{margin:0;flex:1;width:auto;}
.sv-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;
  padding:0 5px;border-radius:9px;background:var(--brand);color:#fff;font-size:11px;font-weight:800;}

/* ---- Tabelle (Desktop) ---- */
.sv-tab{background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden;}
.sv-row{display:grid;grid-template-columns:minmax(150px,2.2fr) minmax(74px,.8fr) 96px minmax(96px,1fr);
  gap:10px;padding:11px 16px;align-items:center;border-bottom:1px solid var(--line);font-size:13.5px;}
.sv-row:last-child{border-bottom:0;}
.sv-row.head{background:var(--paper);font-size:11.5px;font-weight:750;color:var(--muted);
  text-transform:uppercase;letter-spacing:.04em;}
.sv-row.klick{cursor:pointer;}
.sv-row.klick:hover{background:var(--brand-soft);}
.sv-row .nm{font-weight:700;min-width:0;overflow-wrap:anywhere;}
.sv-row .sv-zelle{min-width:0;color:var(--muted);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sv-row .pin{font-variant-numeric:tabular-nums;letter-spacing:.08em;font-weight:700;}
.sv-mark{border-radius:6px;padding:1px 7px;font-size:10.5px;font-weight:800;white-space:nowrap;}
.sv-mark.dop{background:#F6D7D5;color:#B4322F;}
.sv-mark.abg{background:#FEF3E7;color:#8A5B0E;}

/* ---- Mobil (<=760px): alles einspaltig, Tabelle wird zur Kartenliste ---- */
@media (max-width:760px){
  .ss-wrap{padding:4px 14px 44px;}
  .ss-head{grid-template-columns:1fr;gap:16px;padding:16px;border-radius:18px;}
  .ss-ident{gap:13px;}
  .ss-logo{width:60px;height:60px;border-radius:17px;}
  .ss-stats{grid-template-columns:repeat(2,minmax(0,1fr));}
  .ss-stat b{font-size:19px;}
  .ss-fgrid{grid-template-columns:1fr;}
  .ss-bewgrid{grid-template-columns:1fr;}
  .ss-kol{padding:15px 16px;gap:14px;}
  .ss-kol-sp{display:none;}
  .ss-kol .ss-btn{flex:1 1 100%;}
  .ss-sec{margin-top:22px;}
  .ss-tabs{margin-left:0;margin-right:0;}

  .sv-search{flex:1 1 100%;}
  .sv-tbar-sp{display:none;}
  .sv-menuwrap{flex:1 1 calc(50% - 5px);min-width:0;}
  .sv-menuwrap > .ss-btn{width:100%;justify-content:center;display:flex;align-items:center;gap:7px;}
  .sv-menu{left:0;right:auto;}
  /* Tabelle -> Karten: vier Spalten passen auf 360px nicht ohne Abschneiden. */
  .sv-tab{background:transparent;border:0;box-shadow:none;overflow:visible;}
  .sv-row.head{display:none;}
  .sv-row{display:block;background:var(--card);border:1px solid var(--line);border-radius:14px;
    box-shadow:var(--shadow);padding:13px 15px;margin-bottom:9px;}
  /* display:block ist PFLICHT: `.sv-row` wird hier zum Block, `.nm` blieb aber
     ein Inline-Element – dadurch klebte das erste Feld direkt am Namen
     ("Elif ÖztürkKlasse: 5a"). Befund Murat 02.08.2026. */
  .sv-row .nm{display:block;font-size:15px;white-space:normal;}
  .sv-row .sv-zelle{display:inline-flex;align-items:center;gap:6px;margin:8px 10px 0 0;
    font-size:12.5px;color:var(--muted);}
  .sv-row .sv-zelle::before{content:attr(data-lbl);font-weight:700;color:var(--muted);opacity:.75;}
}

/* ---- Fenster der Schulverwaltung (Lehrkraft-Konto, Einsammeln) -----------
   EIN Rahmen fuer alle Popups dieses Bereichs, damit sie sich gleich anfuehlen
   und mobil gleich brechen. Hoehe folgt dem sichtbaren Bereich (--vh100, siehe
   ARCHITEKTUR §4b: NIE 100vh hart setzen). */
.sv-modal-bg{position:fixed;inset:0;z-index:434;background:rgba(15,20,35,.45);
  display:flex;align-items:center;justify-content:center;padding:16px;}
.sv-modal{background:var(--card);border-radius:20px;box-shadow:0 20px 60px rgba(0,0,0,.3);
  width:100%;max-width:520px;max-height:calc(var(--vh100) - 60px);
  display:flex;flex-direction:column;overflow:hidden;}
.sv-modal-breit{max-width:760px;}
.sv-modal-h{display:flex;align-items:flex-start;gap:12px;padding:16px 18px 13px;
  border-bottom:1px solid var(--line);flex:none;}
.sv-modal-h b{font-size:16.5px;letter-spacing:-.01em;overflow-wrap:anywhere;}
.sv-modal-x{flex:none;border:1px solid var(--line);background:var(--card);border-radius:10px;
  padding:6px 11px;font:inherit;font-size:13px;color:var(--muted);cursor:pointer;}
.sv-modal-x:hover{border-color:var(--brand);color:var(--brand);}
.sv-modal > div:not(.sv-modal-h){min-height:0;}
.sv-modal > div[style*="overflow:auto"]{flex:1;}
/* Schlüssel-Wert-Zeilen im Konto-Fenster */
.sv-kv{display:flex;align-items:baseline;gap:12px;padding:8px 0;border-bottom:1px solid var(--line);
  font-size:13.5px;flex-wrap:wrap;}
.sv-kv span{flex:1;min-width:120px;color:var(--muted);}
.sv-kv b{font-weight:700;text-align:right;overflow-wrap:anywhere;}
.sv-kv-h{font-size:11px;font-weight:750;color:var(--muted);text-transform:uppercase;
  letter-spacing:.06em;margin:16px 0 2px;}
.sv-kv-h:first-child{margin-top:0;}
@media (max-width:760px){
  .sv-modal-bg{padding:10px;align-items:flex-end;}
  .sv-modal{max-height:calc(var(--vh100) - 40px);border-radius:18px;}
  .sv-kv b{text-align:left;}
}

/* ---- „Hab ich gesehen": Knopf an abgeleiteten To-do-Zeilen (v2.42.0) ------
   Cockpit-Karte (.t-row) und Seite "Meine Aufgaben" (.mtl-table). Dezent, bis
   die Zeile berührt wird – der Knopf soll nicht wie die Hauptaktion aussehen,
   die Hauptaktion ist der Deep-Link der Zeile.

   Seit v2.53.0 trägt er im Cockpit das WORT „Gesehen" statt nur einen Haken:
   ein nackter Haken liest sich wie „erledigt", und das ist er nicht – er
   blendet die Zeile bis zur nächsten Änderung aus. Der Knopf bleibt trotzdem
   ruhig (Umriss, kein Farbfeld), damit der Deep-Link die Hauptaktion bleibt.
   MIT WEM: todoAusblenden() in index-app.js, mtHeuteHtml() in index-aufgaben.js. */
.t-row .t-weg, .mtl-table .mtl-weg{
  flex:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;
  min-height:28px;padding:0 10px;border:1px solid var(--line);border-radius:99px;
  background:var(--card);color:var(--muted);cursor:pointer;
  font:650 12px/1 inherit;white-space:nowrap;
  opacity:.55;transition:opacity .14s,border-color .14s,color .14s,background .14s;}
.mtl-table .mtl-weg{width:28px;padding:0;border-radius:9px;}
.t-row .t-weg svg, .mtl-table .mtl-weg svg{width:14px;height:14px;flex:none;fill:none;
  stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;}
.t-row:hover .t-weg, .mtl-table tr:hover .mtl-weg{opacity:1;}
.t-row .t-weg:hover, .mtl-table .mtl-weg:hover{
  opacity:1;border-color:var(--ok);color:var(--ok);background:var(--ok-soft);}
.t-row .t-weg:focus-visible, .mtl-table .mtl-weg:focus-visible{
  opacity:1;outline:2px solid var(--brand);outline-offset:2px;}
.mtl-table td.mtl-chev{white-space:nowrap;}
.mtl-table td.mtl-chev .mtl-weg{margin-right:8px;vertical-align:middle;}
/* Touch-Geräte kennen kein Hover – dort dauerhaft sichtbar. */
@media (hover:none){
  .t-row .t-weg, .mtl-table .mtl-weg{opacity:1;}
}

/* ---- "Verwalten": Schubfach von rechts (v2.56.0) -------------------------
   Ersetzt das "…"-Menue der Klassen-Kopfzeile. WARUM ein Schubfach und kein
   Menue: ein Menue ist eine Spalte ohne Platz - keine Ueberschriften, kein
   Raum fuer den einen erklaerenden Satz je Eintrag. Das Schubfach laesst die
   Schuelertabelle stehen (ein Aufklapp-Bereich haette sie nach unten
   geschoben) und legt sich nicht auf einen bestehenden Dialog.
   Auf schmalen Geraeten wird daraus ein Blatt von UNTEN - dort ist ein
   seitliches Schubfach entweder zu schmal oder deckt alles zu.
   MIT WEM: kbVerwaltenOeffnen()/kbVerwaltenSchliessen() in index-app.js. */
.kbv-ov{position:fixed;inset:0;z-index:9600;background:rgba(20,24,35,0);
  display:flex;justify-content:flex-end;transition:background .18s ease;}
.kbv-ov.auf{background:rgba(20,24,35,.34);}
.kbv{width:min(420px,92vw);max-height:100%;overflow-y:auto;background:var(--card,#fff);
  border-left:1px solid var(--line);box-shadow:-18px 0 48px rgba(20,30,60,.16);
  transform:translateX(100%);transition:transform .2s cubic-bezier(.22,.61,.36,1);}
.kbv-ov.auf .kbv{transform:translateX(0);}
.kbv-kopf{position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;gap:10px;
  padding:16px 18px 12px;background:var(--card,#fff);border-bottom:1px solid var(--line);}
.kbv-kopf b{display:block;font-size:15px;font-weight:800;color:var(--ink);letter-spacing:-.01em;}
.kbv-kopf small{display:block;margin-top:2px;font-size:12px;color:var(--muted);}
.kbv-zu{flex:none;margin-left:auto;width:30px;height:30px;border:1px solid var(--line);
  border-radius:9px;background:var(--card);color:var(--muted);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;}
.kbv-zu:hover{border-color:var(--ink);color:var(--ink);}
.kbv-zu svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;}
.kbv-body{padding:10px 12px 22px;}
.kbv-grp + .kbv-grp{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);}
.kbv-grp-t{font-size:11px;font-weight:800;color:var(--muted);text-transform:uppercase;
  letter-spacing:.06em;padding:2px 6px 7px;}
.kbv-item{display:flex;align-items:flex-start;gap:11px;width:100%;box-sizing:border-box;
  border:1px solid transparent;border-radius:11px;background:none;font:inherit;text-align:left;
  padding:9px 10px;cursor:pointer;transition:background .12s,border-color .12s;}
.kbv-item:hover{background:var(--paper,#F4F5F9);border-color:var(--line);}
.kbv-item:focus-visible{outline:2px solid var(--brand);outline-offset:1px;}
.kbv-ico{flex:none;width:30px;height:30px;border-radius:9px;background:var(--paper,#F4F5F9);
  color:var(--ink);display:inline-flex;align-items:center;justify-content:center;}
.kbv-ico svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round;}
.kbv-tx{flex:1;min-width:0;}
.kbv-tx b{display:block;font-size:13.5px;font-weight:700;color:var(--ink);}
.kbv-tx small{display:block;margin-top:1px;font-size:11.5px;color:var(--muted);line-height:1.45;}
/* Die eine unumkehrbare Aktion sieht auch so aus - aber erst beim Zeigen,
   damit die Liste nicht dauerhaft nach Warnung aussieht. */
.kbv-item.gefahr .kbv-tx b{color:var(--bad,#E0463E);}
.kbv-item.gefahr:hover{background:rgba(224,70,62,.07);border-color:rgba(224,70,62,.35);}
.kbv-item.gefahr .kbv-ico{color:var(--bad,#E0463E);}
/* "Verwalten" traegt als einziger Knopf der Zeile immer seine Beschriftung -
   er ist die Tuer, nicht eine Aktion unter vielen. */
.kbx-act.kbx-verw .kbx-actlbl{max-width:110px;opacity:1;margin-left:6px;}
.kbx-act.kbx-verw{border-color:var(--line);color:var(--ink);}
.kbx-act.kbx-verw:hover,.kbx-act.kbx-verw:focus-visible{border-color:var(--ink);
  color:var(--ink);box-shadow:0 0 0 1px var(--ink) inset;}
@media (max-width:640px){
  .kbv-ov{align-items:flex-end;justify-content:center;}
  /* DAS BLATT WAR IN SAFARI NICHT ZU SCHLIESSEN (Befund Murat 05.08.2026:
     „mobilde verwalten acinca o en üst kisim x in oldugu yukari kayiyor
     kapatamiyorum … safariden girince böyle ama pwa da sikinti yok").
     URSACHE - und der PWA-Hinweis ist der Beweis: Hier stand `86vh`. `vh`
     misst in mobilem Safari gegen den GROSSEN Bildschirm, den OHNE die
     eingeblendeten Browserleisten. Die Huelle `.kbv-ov` ist dagegen mit
     `position:fixed; inset:0` am sichtbaren Bereich verankert und damit
     kleiner. Das Blatt haengt unten an (`align-items:flex-end`), also schob
     jedes zu viel gemessene Pixel seinen KOPF nach oben aus der Huelle heraus
     - und mit ihm das X. In der PWA gibt es keine Leisten, dort ist `vh`
     zufaellig richtig; deshalb trat es nur im Browser auf.
     LOESUNG NACH DER HAUSREGEL (ARCHITEKTUR §4b, qa/unit/test_viewport_hoehe):
     bildschirmhohe Flaechen MESSEN nicht, sie sind verankert. 86 % beziehen
     sich auf die Huelle, die bereits an allen vier Seiten haengt - damit gibt
     es gar keine Geraetehoehe mehr, die falsch sein koennte. Kein `vh`, kein
     `dvh`, keine Rechnung. */
  .kbv{width:100%;max-height:86%;border-left:0;
    border-top:1px solid var(--line);
    border-radius:18px 18px 0 0;transform:translateY(100%);}
  .kbv-ov.auf .kbv{transform:translateY(0);}
}

/* ---- Filter-Leiste „neue Abgaben" im Klassenbuch (v2.53.0) ---------------
   Steht ÜBER der Klassentabelle, wenn man über einen Deep-Link aus „Meine
   Aufgaben" bzw. dem Cockpit gekommen ist. Sie ist PFLICHT, sobald gefiltert
   wird: eine Tabelle, in der ohne Ansage vier von sieben Kindern fehlen,
   sieht aus wie ein Datenverlust, nicht wie ein Filter.
   MIT WEM: kbxClassTable()/kbNeuFilterAus() in index-app.js. */
.kbx-tablewrap .kbx-neubar{display:flex;align-items:center;gap:10px;margin:0 0 10px;
  padding:9px 14px;border:1px solid var(--ok,#15A05A);border-radius:12px;
  background:var(--ok-soft,rgba(21,160,90,.08));}
.kbx-tablewrap .kbx-neubar svg{flex:none;width:16px;height:16px;fill:none;stroke:var(--ok,#15A05A);
  stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
.kbx-tablewrap .kbx-neubar span{flex:1;min-width:0;font-size:13px;color:var(--ink);}
.kbx-tablewrap .kbx-neubar b{font-weight:750;}
.kbx-tablewrap .kbx-neubar button{flex:none;border:1px solid var(--line);border-radius:99px;
  background:var(--card);color:var(--ink);cursor:pointer;padding:5px 12px;font:650 12px inherit;}
.kbx-tablewrap .kbx-neubar button:hover{border-color:var(--ink);}
.kbx-tablewrap .kbx-neubar button:focus-visible{outline:2px solid var(--brand);outline-offset:2px;}

/* ---- Rückgängig-Zeile nach dem Ausblenden (v2.53.0) ----------------------
   Erscheint unter der Kopfzeile der Karte "Meine Aufgaben", sobald eine Zeile
   ausgeblendet wurde. Sie ist der EINE Satz, der erklärt, was gerade passiert
   ist – deshalb steht sonst nirgends in der Karte ein Erklärabsatz.
   MIT WEM: renderTodo()/todoRueckgaengig() in index-app.js. */
.ck2-todo .ck2-undo{display:flex;align-items:center;gap:9px;padding:9px 16px;
  border-top:1px solid rgba(127,127,127,.1);background:var(--paper,#F4F5F9);}
.ck2-todo .ck2-undo svg{flex:none;width:15px;height:15px;fill:none;stroke:var(--muted);
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.ck2-todo .ck2-undo span{flex:1;min-width:0;font-size:12px;color:var(--muted);}
.ck2-todo .ck2-undo button{flex:none;border:0;background:none;cursor:pointer;padding:2px 4px;
  color:var(--brand);font:700 12px inherit;text-decoration:underline;text-underline-offset:2px;}
.ck2-todo .ck2-undo button:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:6px;}

/* ---- Zwei Einstiege in "Meine Aufgaben" (v2.53.0) ------------------------
   Vorher hing die volle Ansicht an einem kleinen Pillen-Knopf rechts oben.
   Jetzt sind die ganze Kopfzeile und eine breite Fußzeile der Weg dorthin;
   ein eigener Menüpunkt kam bewusst nicht in Frage (Namenskollision mit
   "Aufgaben" = Material im Seitenmenü).
   MIT WEM: renderTodo() in index-app.js, openMeineAufgaben() in
   index-aufgaben.js. */
.ck2-todo .ck2-todo-head{justify-content:flex-start;cursor:pointer;
  border-radius:14px 14px 0 0;transition:background .12s;}
.ck2-todo .ck2-todo-head:hover{background:var(--paper,#F4F5F9);}
.ck2-todo .ck2-todo-head:focus-visible{outline:2px solid var(--brand);outline-offset:-2px;}
.ck2-todo .ck2-todo-hico{flex:none;width:16px;height:16px;fill:none;stroke:var(--brand);
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.ck2-todo .ck2-todo-hchev{margin-left:auto;}
.ck2-todo .ck2-todo-foot{display:flex;width:100%;align-items:center;justify-content:center;gap:7px;
  padding:11px 16px;border:0;border-top:1px solid rgba(127,127,127,.1);
  background:var(--paper,#F4F5F9);color:var(--brand);cursor:pointer;
  font:700 13px inherit;transition:background .12s;}
.ck2-todo .ck2-todo-foot:hover{background:var(--brand-soft,rgba(0,113,227,.1));}
.ck2-todo .ck2-todo-foot:focus-visible{outline:2px solid var(--brand);outline-offset:-2px;}
.ck2-todo .ck2-todo-foot svg{width:15px;height:15px;fill:none;stroke:currentColor;
  stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}

/* ---- Aufbewahrungs-Fenster: ein Satz + aufklappbares „i" ------------------
   Vorher stand dort ein fünfzeiliger Absatz, den niemand liest, und es gab
   NUR „verlängern" – wer die Unterlagen nicht mehr braucht, hatte keinen Weg
   (Entscheidung Murat 2026-07). */
.vw-i{margin-left:7px;width:19px;height:19px;border-radius:50%;border:1.5px solid var(--line);
  background:var(--card);color:var(--muted);font:700 12px/1 inherit;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;vertical-align:baseline;padding:0;}
.vw-i:hover, .vw-i.on{border-color:var(--brand);color:var(--brand);background:var(--brand-soft);}
.vw-abl-mehr-info{font-size:12.5px;line-height:1.6;color:var(--muted);
  background:var(--paper);border-radius:11px;padding:11px 13px;margin:0 0 12px;}
.vw-abl-mehr-info[hidden]{display:none;}
.vw-abl-grp-h .vw-abl-ok{border-color:var(--line);color:var(--muted);}
.vw-abl-grp-h .vw-abl-ok:hover{border-color:var(--ink);color:var(--ink);}

/* ===========================================================================
   AUSWAHLFELD (static/js/index-auswahl.js)
   Ein Eingabefeld, das sich wie ein <select> öffnet, aber Tippen erlaubt.
   Anlass: Rückmeldung Murat 27.07.2026 – das Thema-Feld war ein <datalist>
   und sah neben dem Fach-<select> aus wie ein totes Textfeld.
   Der Pfeil ist DERSELBE wie in `.fpk select` (gleiches SVG, gleiche Größe),
   damit beide Felder nebeneinander nicht zu unterscheiden sind.
=========================================================================== */
.ss-aus{position:relative;display:block;width:100%;}
.ss-aus>input{width:100%;padding-right:20px !important;cursor:pointer;}
/* Der Pfeil ist ein eigener Knopf statt eines Hintergrundbildes: so ist er
   auch dann anklickbar, wenn das Feld schon Text enthält. */
.ss-aus-pfeil{position:absolute;right:0;top:50%;transform:translateY(-50%);
  width:20px;height:20px;padding:0;border:none;background:transparent;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A8194' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:center;background-size:15px;
  transition:transform .15s;}
.ss-aus-auf .ss-aus-pfeil{transform:translateY(-50%) rotate(180deg);}
/* Die Liste hängt an <body> (das Optionen-Fenster scrollt und würde sie
   abschneiden), deshalb feste Positionierung und ein hoher z-Index. */
.ss-aus-panel{position:fixed;z-index:9000;overflow-y:auto;background:var(--card,#fff);
  border:1.5px solid var(--line);border-radius:12px;
  box-shadow:0 12px 30px rgba(15,20,35,.16);padding:5px;}
.ss-aus-opt{padding:8px 10px;border-radius:8px;font-size:14.5px;font-weight:600;
  color:var(--ink);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ss-aus-opt:hover,.ss-aus-akt{background:rgba(109,91,255,.10);color:#4B3FD8;}
.ss-aus-leer{padding:9px 10px;font-size:13px;color:var(--muted);}

/* ===== Akzent aus der Flaechenfarbe (2.87.0) ==============================
   WORUM ES GEHT: waehlt die Lehrkraft eine Flaechenfarbe, sollen die
   Bedienelemente dazu passen – ein blauer Knopf auf einer Salbei-Flaeche sieht
   aus wie ein Fremdkoerper. Die drei Toene kommen aus `ssAkzentSetzen()`
   (index-app.js) und haben denselben Farbton wie die Flaeche:
     --flaeche-akzent       Fuellung, traegt weisse Schrift (Kontrast gerechnet)
     --flaeche-akzent-soft  Hauch hinter einem aktiven Eintrag
     --flaeche-akzent-ink   Schrift auf diesem Hauch

   DIESER ABSCHNITT IST DIE VOLLSTAENDIGE LISTE. Wer den Akzent an einer
   weiteren Stelle haben will, traegt sie HIER ein – nicht verstreut im
   Stylesheet. `qa/unit/test_flaeche_akzent.py` zaehlt die Regeln und schlaegt
   an, wenn die Liste hier und der Test auseinanderlaufen.

   WAS BEWUSST NICHT DAZUGEHOERT und auch nicht dazukommen soll:
   - `--brand` selbst (353 Stellen: Links, Fokusringe, Diagramme, Balken).
   - Die BEDEUTUNGSFARBEN `--ok` (gruen = richtig), `--bad` (rot = falsch),
     `--amber` (Hinweis). Ein gruener Akzent, der neben einem gruenen
     „richtig" steht, macht die Rueckmeldung mehrdeutig – und die ist der Kern
     einer Lern-App. Deshalb bleiben `.btn.ok`, `.btn.sub` und `.btn.ghost`
     ausgenommen.
   - Alles im dunklen Design: `ssAkzentSetzen()` loescht die Variablen dort,
     die Regeln fallen dann auf `var(--brand)` zurueck.

   DER FALLBACK IST DIE SICHERUNG: ohne gewaehlte Farbe (oder bei einem zu
   blassen Wunschton) sind die Variablen nicht gesetzt und jede Regel hier
   liefert exakt den Markenton – also genau das Bild von vorher. */

/* 1) Der Hauptknopf. Ausgenommen sind die drei Sonderfassungen: `ghost` ist
      weiss umrandet, `sub` ist bewusst tintenfarben, `ok` traegt die
      Bedeutungsfarbe Gruen. */
.btn:not(.ghost):not(.sub):not(.ok){ background:var(--flaeche-akzent,var(--brand)); }
/* Der dunklere Hover-Ton entsteht als schwarze Auflage UEBER der Fuellfarbe.
   So funktioniert er mit jedem Farbton, ohne dass je Farbe ein zweiter Wert
   gepflegt werden muesste (dasselbe Prinzip wie die helle Auflage bei
   .ss-glas, nur andersherum). */
.btn:not(.ghost):not(.sub):not(.ok):hover{
  background:linear-gradient(rgba(0,0,0,.13),rgba(0,0,0,.13)),var(--flaeche-akzent,var(--brand-dk));}
/* 2) Aktives Segment im Umschalter. */
.seg button.on{ background:var(--flaeche-akzent,var(--brand)); }
/* 3) Eingeschalteter Schalter (Bedienungshilfen, Einstellungen). */
.kswitch input:checked + .ksl{ background:var(--flaeche-akzent,var(--brand)); }
/* 4) Aktiver Eintrag der Seitenleiste. Hier ist die Flaeche ein Hauch und die
      Schrift traegt die Farbe – deshalb die beiden anderen Variablen. */
#app-sidebar .sb-item.on{
  background:var(--flaeche-akzent-soft,var(--brand-soft));
  color:var(--flaeche-akzent-ink,var(--brand));}
/* 5) ZEIGEN UND STRUKTUR IN LISTEN (v2.143.0, Wunsch Murat 05.08.2026:
      „arkaplanim mor ya … o renkte olsa. bunu klasiklestirmek lazim tüm site
      icin"). Das Grau beim Ueberfahren war neutral, aber es war auch fremd:
      Wer sich Lavendel eingestellt hat, bekam ein Blaugrau.

      ZWEI STAERKEN, WEIL ES ZWEI AUSSAGEN SIND – das ist die Regel, an der
      sich kuenftige Zeilen hier orientieren sollen:
        -soft  (0.88)   „hier zeigt die Maus hin" bzw. „das ist ausgewaehlt"
        -hauch (0.965)  reine STRUKTUR, behauptet nichts (Zebra)
      Ein Streifenmuster in Auswahlstaerke laese sich, als waere die halbe
      Liste markiert.

      DIE `:not()` SIND KEIN SCHMUCK: Dieser Abschnitt steht am Dateiende,
      also NACH `.kbx-row:hover td` und `.kbx-row.open td` (~Zeile 615). Ohne
      die Ausnahmen wuerde das Zebra beide ueberstimmen – auf jeder zweiten
      Zeile gaebe es dann weder Hover- noch Aufklapp-Anzeige. Die Wirkung
      haengt hier also NICHT an der Reihenfolge, sondern steht im Selektor.

      Der Rueckfall haelt beides unveraendert, wenn keine Farbe gewaehlt ist –
      und im dunklen Design, wo `ssAkzentSetzen()` die Variablen loescht. */
.kbx-row.kbx-zebra:not(.open):not(:hover) td{
  background:var(--flaeche-akzent-hauch,#FAFBFE);}
.kbx-row:hover td{ background:var(--flaeche-akzent-soft,var(--paper)); }
.kbx-addbtn:hover{ color:var(--flaeche-akzent-ink,var(--brand));
  background:var(--flaeche-akzent-soft,var(--paper)); }
.kbv-item:hover{ background:var(--flaeche-akzent-soft,var(--paper,#F4F5F9)); }
/* 6) Halbjahr-Waehler (v2.144.0): "Gesamt" im aktiven Zustand und der mobile
      Kasten sind AUSGEWAEHLT-Flaechen - also -soft, nicht -hauch. */
.kbz-ges.an{ background:var(--flaeche-akzent-soft,var(--brand-soft));
  color:var(--flaeche-akzent-ink,var(--brand)); }
.kbz-kbtn{ background:var(--flaeche-akzent-soft,var(--brand-soft));
  color:var(--flaeche-akzent-ink,var(--brand)); }

/* ===== HINWEIS: RECHTSTEXTE GEAENDERT (v2.98.0) ============================
   Gegenstueck zu consentDialog() in index-app.js.

   BEWUSST KEIN SPERR-OVERLAY: keine Flaeche ueber der ganzen Seite, kein
   `pointer-events` auf dem Hintergrund. Der Hinweis sitzt unten rechts wie
   eine Meldung und laesst die Arbeit weiterlaufen. Eine Zustimmung, die man
   nur durch Wegklicken loswird, waere nach Art. 7 Abs. 4 DSGVO keine
   freiwillige - und wer zwischen zwei Stunden schnell etwas nachschlagen
   will, darf daran nicht haengenbleiben.

   Auf schmalen Schirmen legt er sich ueber die volle Breite an den unteren
   Rand und haelt `safe-area-inset-bottom` frei, damit er nicht unter dem
   Home-Indicator klebt. */
#consent-neu{ position:fixed; z-index:9600; right:18px; bottom:18px; max-width:420px; }
#consent-neu .cn-box{
  background:var(--card,#fff); border:1px solid var(--line); border-radius:16px;
  box-shadow:0 12px 34px rgba(16,24,40,.16); padding:16px 18px 14px;
  animation:cnAuf .22s ease; }
@keyframes cnAuf{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
#consent-neu .cn-kopf{ display:flex; align-items:center; gap:9px; margin-bottom:8px; }
#consent-neu .cn-kopf svg{ width:20px; height:20px; flex:none; stroke:#157347; fill:none;
  stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
#consent-neu .cn-kopf b{ font-size:14.5px; font-weight:800; color:var(--ink); flex:1; min-width:0; }
#consent-neu .cn-zu{ appearance:none; border:0; background:transparent; cursor:pointer;
  padding:4px; color:var(--muted); flex:none; border-radius:8px; }
#consent-neu .cn-zu:hover{ background:var(--line); color:var(--ink); }
#consent-neu .cn-zu svg{ width:16px; height:16px; stroke:currentColor; fill:none;
  stroke-width:2.2; stroke-linecap:round; }
#consent-neu p{ margin:0 0 9px; font-size:13.5px; line-height:1.5; color:var(--muted); }
#consent-neu .cn-links{ font-size:13px; }
#consent-neu .cn-links a{ color:var(--brand); font-weight:700; text-decoration:none; }
#consent-neu .cn-links a:hover{ text-decoration:underline; }
#consent-neu .cn-fuss{ display:flex; gap:8px; justify-content:flex-end; margin-top:12px; }
#consent-neu .cn-fuss button{ appearance:none; font-family:inherit; font-weight:700;
  font-size:13px; padding:8px 14px; border-radius:10px; cursor:pointer; }
#consent-neu .cn-spaeter{ border:1px solid var(--line); background:#fff; color:var(--muted); }
#consent-neu .cn-spaeter:hover{ background:var(--line); color:var(--ink); }
#consent-neu .cn-ok{ border:0; background:var(--flaeche-akzent,var(--brand)); color:#fff; }
#consent-neu .cn-ok:disabled{ opacity:.6; cursor:default; }
@media (max-width:640px){
  #consent-neu{ right:10px; left:10px; bottom:calc(10px + env(safe-area-inset-bottom, 0px)); max-width:none; }
  #consent-neu .cn-fuss button{ flex:1; }
}

/* ===========================================================================
   ANSICHT-FENSTER (#ss-fenster) – Ersatz fuer window.open (v2.99.0)
   ---------------------------------------------------------------------------
   WOZU: Arbeitsblatt-Vorschau, Karteikarten, Datentabelle, Mindmap und die
   Druckansichten oeffnen seit jeher ein ZWEITES Fenster
   (`window.open("","_blank")` + `document.write`). Genau das gibt es in einer
   WKWebView (Store-App) und in der installierten PWA NICHT: `window.open`
   liefert dort `null`, und der bestehende Code zeigte daraufhin nur noch
   „Pop-up wurde blockiert" – auf dem Handy war damit KEINE dieser Ansichten
   erreichbar (Befund Murat 02.08.2026).

   LOESUNG: dieselben Generatoren schreiben in ein <iframe>, das als
   Vollbild-Blatt ueber der App liegt. Kein Umbau an den Generatoren – die
   Umleitung passiert zentral in `ssFensterOeffnen()` (index-app.js), das
   dasselbe Muster benutzt wie das laengst bewaehrte `ltiRunEmbedded()`.

   MIT WEM: index-app.js (`ssFensterOeffnen`, `ssFensterZu`,
   `window.open`-Huelle), templates/index.html (#ss-fenster).
   Absicherung: qa/unit/test_mobil_fenster.py.
=========================================================================== */
#ss-fenster{ position:fixed; inset:0; z-index:9800; display:none;
  flex-direction:column; background:var(--card,#fff); }
#ss-fenster.auf{ display:flex; }
#ss-fenster .ssf-kopf{
  flex:none; display:flex; align-items:center; gap:10px;
  padding:calc(9px + env(safe-area-inset-top, 0px)) 12px 9px;
  border-bottom:1px solid var(--line); background:var(--card);
}
#ss-fenster .ssf-titel{ flex:1; min-width:0; font-size:15px; font-weight:800; color:var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#ss-fenster .ssf-btn{
  flex:none; appearance:none; border:1px solid var(--line); background:var(--card);
  color:var(--ink); border-radius:10px; height:36px; padding:0 12px; cursor:pointer;
  font:700 13px inherit; display:inline-flex; align-items:center; gap:6px;
}
#ss-fenster .ssf-btn:hover{ border-color:var(--brand); color:var(--brand); }
#ss-fenster .ssf-btn svg{ width:16px; height:16px; fill:none; stroke:currentColor;
  stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
#ss-fenster iframe{ flex:1 1 auto; width:100%; border:0; display:block; background:#fff; }
/* Beim Drucken soll NUR das Blatt kommen, nicht die App dahinter. */
@media print{
  body.ss-fenster-auf > *:not(#ss-fenster){ display:none !important; }
  #ss-fenster{ position:static; }
  #ss-fenster .ssf-kopf{ display:none; }
}

/* ===========================================================================
   SCHMALE SCHIRME – Sammelkorrekturen 02.08.2026 (v2.99.0)
   ---------------------------------------------------------------------------
   ALLES HIER STEHT BEWUSST IN @media (max-width:640px): die Grundregeln
   bleiben unangetastet (CLAUDE.md, „schmal aendern heisst SCHMAL aendern").
   Tablet und Computer sehen exakt aus wie vorher.
=========================================================================== */
@media (max-width:640px){

  /* --- 1) Seitenmenue: Unterlaengen wurden abgeschnitten -------------------
     URSACHE: `.sb-label` traegt `overflow:hidden`, und die eingeklappte
     Fassung (`body:not(.sb-open)`) setzt `line-height:1.05`. Auf dem Handy
     ist die Leiste eine SCHUBLADE – dort greift `body.sb-open` nie, also galt
     die 1.05 weiter, waehrend die Schrift auf 15px hochgesetzt wurde. Ergebnis:
     das „g" in „Aufgaben" lag unterhalb der Zeilenbox und wurde weggeschnitten.
     Aus demselben Grund standen die Beschriftungen mittig statt links: die
     eingeklappte Fassung setzt `text-align:center; width:100%`, und auch das
     nahm die Schublade mit. */
  body.has-sidebar #app-sidebar .sb-item .sb-label{
    line-height:1.4; text-align:left; width:auto; letter-spacing:normal;
    overflow:visible;
  }
  body.has-sidebar #app-sidebar .sb-item{ padding:10px 12px; margin:2px 0; }

  /* --- 2) Cockpit: „Schulverwaltung" senkrecht mittig ----------------------
     Die Leiste hatte unten `env(safe-area-inset-bottom)` als Polster. Sie sitzt
     aber MITTEN auf der Seite (auf dem Schulbild), nicht am Bildschirmrand –
     dort ist die Safe-Area schlicht die falsche Groesse. Auf dem iPhone kamen
     so 12px oben gegen 46px unten, und die Schrift stand sichtbar zu hoch. */
  .ck2-logoBox .cks-admin{ padding:12px 14px; }

  /* --- 3) Aufgaben/Boerse: Filter wieder lesbar ---------------------------
     Vorher teilten sich Fach, Thema und Klasse den Rest EINER Zeile, in der
     ausserdem „Neu", die Lupe und die Ansicht sitzen – uebrig blieben rund
     60px je Feld, also „P. 4", „A…", „K…". Zwei Massnahmen:
       (a) kleinere Schrift/Polster (Wunsch: „mobilde kücük olsun ama yazi
           boyutu kücülsün"),
       (b) auf der AUFGABEN-Seite bekommen die drei Filter eine eigene Zeile.
     Der Umbruch entsteht ueber ein leeres Flex-Element (::before) mit voller
     Breite – so bleibt die Reihenfolge im HTML unveraendert. */
  .dash-toolbar{ gap:6px; }
  .dash-toolbar .dtb-btn{ font-size:11.5px; height:36px; padding:0 8px; gap:5px; }
  .dash-toolbar .dtb-btn svg{ width:13px; height:13px; }

  /* EINE Zeile, fuenf Elemente (v2.99.7, Wunsch Murat 02.08.2026:
     „arti en solda olsun, yanlarina 3 box, en sagda güzel bi svg").
     Reihenfolge: [+] [Fach] [Thema] [Klasse] [Ansicht]

     WAS DAFUER WEICHEN MUSSTE - und wohin es gegangen ist: die Lupe. Sie ist
     von allen Elementen das am seltensten gebrauchte und braucht doch die
     Breite eines ganzen Filters. Sie ist nicht geloescht, sondern in das
     Ansicht-Feld gezogen (erster Eintrag „Durchsuchen…", siehe
     dashToolbarZone in index-app.js); ein Tipp dort oeffnet dieselbe
     Suchzeile wie vorher.

     Der Umbruch aus v2.99.0 (`::before` mit voller Breite) ist damit
     hinfaellig und wird ausdruecklich zurueckgenommen - sonst bliebe eine
     leere zweite Zeile stehen. */
  /* KATEGORIENAME STATT VERSTUEMMELTEM WERT (v2.99.9).
     „Physik" wurde auf 390px zu „Phy… 4", „Alle Themen" zu „Alle T…". Ein
     abgeschnittenes Wort sagt weniger als der Kategoriename - und „Klassen"
     machte es schon immer so (Rueckmeldung Murat 03.08.2026: „digeri süper
     zaten"). Beide Texte stehen im HTML, hier wird getauscht; die Zahl
     daneben bleibt, denn sie ist das, was sich aendert. */
  .dtb-lang{ display:none; }
  .dtb-kurz{ display:inline; }
  /* Gleiche Breite fuer die drei Felder - sonst bestimmt die Wortlaenge das
     Bild und die Zeile wirkt schief (Wunsch fuer die Boerse: „o boxlari
     mobil icin esit yay o satira"). */
  #dash-toolbar > .dtb-drop:not(.dtb-zone-mob),
  #boerse-toolbar > .dtb-drop{ flex:1 1 0; min-width:0; }
  #dash-toolbar, #boerse-toolbar{ flex-wrap:nowrap; column-gap:6px; }
  #dash-toolbar::before{ content:none; }
  #dash-toolbar > .dtb-neu{ order:1; flex:none; }
  #dash-toolbar > .dtb-drop:not(.dtb-zone-mob),
  #boerse-toolbar > .dtb-drop:not(.dtb-zone-mob){ order:2; flex:1 1 0; min-width:0; }
  #dash-toolbar > .dtb-zone-mob{ order:3; flex:none; margin-left:0; }
  /* Die Lupe ist umgezogen (siehe oben) - in der Leiste hat sie keinen Platz
     mehr. Sobald die Suche offen ist, gilt der bestehende `.such-offen`-Block
     und sie nimmt die ganze Zeile ein; deshalb NUR im geschlossenen Zustand
     ausblenden. */
  .dash-toolbar:not(.such-offen) > .dash-search-inline{ display:none; }
  /* Nur am Telefon: der Sucheintrag im Ansicht-Feld. Ab 641px steht die Lupe
     wieder in der Leiste, und zwei Wege waeren verwirrend. */
  .dtb-trenn{ height:1px; background:var(--line); margin:4px 6px; }
  /* Das Ansicht-Feld ganz rechts: nur Symbol, kein Text - so bleibt fuer die
     drei Filter die maximale Breite. */
  #dash-toolbar .dtb-zone-btn{ padding:0 8px; gap:4px; }
  #dash-toolbar .dtb-zone-btn .dtb-cnt{ display:none; }
  /* Das Panel haengt am Werkzeugbalken (siehe <=899px-Block). */
  #dash-toolbar .dtb-panel, #boerse-toolbar .dtb-panel{ top:calc(100% + 4px); }

  /* --- 4) Einstellungen: die Luecke unten ---------------------------------
     Hier stand bis v2.99.2 ein zusaetzliches Polster fuer `#konto-content`.
     Es beruhte auf einer falschen Vermutung (der Inhalt sei abgeschnitten)
     und hat die Luecke groesser gemacht statt kleiner. Die wirkliche Ursache
     - das Polster der generischen Screen-Regel an einer Section, die gar
     nicht scrollt - ist jetzt an ihrer Quelle behoben (siehe Block
     "AUSNAHME: Einstellungen und Admin scrollen NICHT selbst" im
     899.98px-Abschnitt). Hier gehoert deshalb nichts mehr hin. */

  /* --- 5) Schuelerverzeichnis: kompakte Zeilen statt Kaesten --------------
     ZWEI Dinge waren falsch. Erstens klebte der Name am ersten Feld
     („Elif ÖztürkKlasse: 5a"), weil `.sv-row` zwar auf `display:block`
     umgestellt wurde, `.nm` aber ein Inline-Element blieb. Zweitens ist ein
     Kasten je Kind auf dem Handy sehr viel Flaeche fuer sehr wenig Inhalt –
     bei 13 Kindern scrollt man ohne Not (Wunsch Murat: „kompakt olsun,
     satir satir"). Jetzt: Name in Zeile eins, die Angaben klein darunter,
     getrennt durch eine Haarlinie. */
  .sv-tab{ background:var(--card); border:1px solid var(--line);
    border-radius:14px; box-shadow:var(--shadow); overflow:hidden; }
  .sv-row{ display:block; background:transparent; border:0; border-radius:0;
    box-shadow:none; padding:9px 13px; margin:0;
    border-bottom:1px solid rgba(127,127,127,.14); }
  .sv-row:last-child{ border-bottom:0; }
  .sv-row .nm{ display:block; font-size:14px; line-height:1.3; white-space:normal; }
  .sv-row .sv-zelle{ display:inline; margin:0 9px 0 0; font-size:11.5px; line-height:1.5; }
  .sv-row .sv-zelle:empty{ display:none; }
  .sv-row .sv-zelle::before{ content:attr(data-lbl); font-weight:700; opacity:.7; }

  /* --- 6) Pinnwand-Uebersicht (Hub) in der App-Shell ---------------------- */
  .pwh-toolbar{ flex-wrap:wrap; row-gap:8px; }

  /* --- 8) Klassenbuch: EINE Zeile (v2.99.7) -------------------------------
     Wunsch: „en solda sinif secme boxu, sagindada o bilgiseyini kaldir,
     boxun yanina menüleri ekle. tek sira."
     `.kbx-head` steht auf `flex-wrap:wrap`; auf 390px passten Chip,
     Kennzahlen und sechs Icon-Knoepfe nie in eine Zeile, also brach es um.
     Die Kennzahlen („6 Schüler · Ø 80%") sind das, was hier am wenigsten
     traegt - die Zahl steht ohnehin in der Tabelle darunter. Sie fallen weg,
     der Rest bleibt in einer Zeile und darf waagerecht geschoben werden,
     falls eine Klasse einmal mehr Knoepfe hat. */
  .kbx-head{ flex-wrap:nowrap; gap:6px; overflow-x:auto; scrollbar-width:none;
    touch-action:pan-x; overscroll-behavior-x:contain; }
  .kbx-head::-webkit-scrollbar{ display:none; }
  .kbx-head .kbx-kpi{ display:none; }
  .kbx-head-ck{ flex:none; flex-wrap:nowrap; }
  .kbx-acts{ flex:none; flex-wrap:nowrap; }
  /* HIER TAUSCHEN DIE BEIDEN FASSUNGEN (v2.144.0): Band aus, Kasten an. Vier
     Reiter nebeneinander passen auf 360 px nicht - und was nicht passt, muesste
     waagerecht weggeschoben werden, also unsichtbar sein. */
  .kbz-band{ display:none; }
  .kbz-kasten{ display:flex; flex:none; }
  /* Die Unterrichts-Aktionen stehen jetzt im Schubfach (Wunsch Murat
     05.08.2026) - hier macht der Platz sie unmoeglich. "Bewerten" und
     "Verwalten" bleiben: die eine Handlung, die man mitten im Unterricht
     braucht, und die Tuer zu allem Uebrigen. */
  .kbx-act.kbx-nurbreit{ display:none; }
  .kbv-grp.kbv-nurschmal{ display:block; }
  /* „Verwalten" behaelt sein Wort - es ist der einzige Knopf, dessen Symbol
     allein nicht selbsterklaerend ist. */
  .kbx-act .kbx-actlbl{ display:none; }
  .kbx-verw .kbx-actlbl{ display:inline; }

  /* --- 9) Werkzeug-Koepfe: SCHRUMPFEN statt schieben (v2.99.8) ------------
     Betrifft Foerderempfehlung, Fehlzeitenbriefe und Blauer Brief.

     WAS IN v2.99.7 FALSCH WAR - und es war die Idee, nicht die Umsetzung:
     Aus „die drei Knoepfe sollen nebeneinander bleiben" wurde eine
     waagerecht SCHIEBBARE Kopfzeile. Damit lagen ausserdem die
     Modus-Reiter („Stufe 1/2/3", „Einzelfach/Sammel") und die
     Funktionsknoepfe in DERSELBEN Schiebespur - zwei Dinge, die nichts
     miteinander zu tun haben. Rueckmeldung Murat: „sayfalarca saga kaydirsin
     insanlar" und „o ne ucube gibi". Beides berechtigt.

     EINE KOPFZEILE SCHIEBT MAN NICHT. Wenn drei Knoepfe nicht passen, macht
     man die Knoepfe kleiner - nicht die Zeile laenger. Deshalb hier:
       - `.foerder-head` darf wieder UMBRECHEN. Reiter oben, Knoepfe darunter:
         zwei ruhige Zeilen, jede in sich vollstaendig.
       - NUR `.fo-btnreihe` bleibt zusammen (`nowrap`) - das war der
         urspruengliche Wunsch, und mehr war es nie.
       - Damit die drei auch wirklich passen, werden sie kompakt: 12px
         statt 13px, engeres Polster, kleinere Symbole. Gerechnet auf 390px:
         „Schnellerfassung" ~112px + „Kopf & Logos" ~92px + „Gespeichert"
         ~86px + 2x7px Abstand = ~304px. Passt mit Rand.
     KEIN `overflow-x` mehr, KEIN `touch-action` - eine Kopfzeile, die sich
     schieben laesst, ist genau der Fehler von vorher. */
  .foerder-head{ flex-wrap:wrap; gap:9px; }
  .fo-btnreihe{ flex-wrap:nowrap; gap:6px; min-width:0; }
  /* `flex:0 0 auto` UND `white-space:nowrap` gehoeren ZUSAMMEN.
     In v2.99.8 stand hier `flex:0 1 auto; min-width:0` - damit durften die
     Knoepfe unter ihre Inhaltsbreite schrumpfen, und „Kopf & Logos" brach
     MITTEN IM KNOPF auf zwei Zeilen um. Das sah schlimmer aus als das
     Problem davor (Befund Murat 03.08.2026). Ein Knopf schrumpft nicht, er
     wird kleiner GESETZT - darum die kleineren Schriftgroessen darunter. */
  .fo-btnreihe > *{ flex:0 0 auto; white-space:nowrap; }
  .foerder-listbtn{ padding:6px 9px; font-size:12px; gap:4px; white-space:nowrap; }
  .foerder-listbtn svg{ width:13px; height:13px; }
  .fo-seg{ padding:6px 11px; font-size:12px; white-space:nowrap; }
  /* KURZE BESCHRIFTUNGEN - der letzte fehlende Schritt (v2.99.10).
     In v2.99.9 passten die drei Knoepfe rechnerisch (~304px), aber eben nur
     rechnerisch: je nach Schrift und Geraet fehlten ein paar Pixel, die Reihe
     ragte hinaus, und weil sie `nowrap` ist, schob sie die GANZE Seite nach
     rechts - sichtbar am angeschnittenen Rand links. Ein Layout, das auf zwei
     Pixel genau aufgeht, ist keines.
     „Schnellerfassung" -> „Schnell", „Kopf & Logos" -> „Kopf",
     „Gespeichert" -> „Liste". Zusammen rund 200px statt 300 - jetzt ist Luft
     da, statt dass es gerade eben reicht. Der ausgeschriebene Text steht
     weiterhin im `title` und ab 641px wieder im Knopf. */
  .fo-lang{ display:none; }
  .fo-kurz{ display:inline; }
  /* Sicherheitsnetz: sollte doch einmal etwas hinausragen, schneidet der Kopf
     es ab, statt die ganze Seite zu verschieben. */
  .foerder-head{ max-width:100%; overflow-x:clip; }

  /* --- 7) PWA-Statusleiste: ZURUECKGENOMMEN (v2.99.3) ---------------------
     Hier stand in v2.99.2 der Versuch, das weisse Panel oben bis an die
     Statusleiste zu schieben (`--m-top:0`, eckige obere Ecken).

     WARUM ES WIEDER WEG IST - und was die Messung dazu gezeigt hat:
     Die eingebaute Diagnose meldete auf dem iPhone 428x926 Bildschirm, aber
     nur 428x879 Innenraum und `safe-area oben 0`. Die 47px Unterschied sind
     die Statusleiste, und sie liegt AUSSERHALB der WebView. Die Seite kann
     sie also gar nicht einfaerben - `--m-top:0` hat nur den eigenen 7px-Rand
     gefressen und damit die Rundung und die Symmetrie zerstoert, ohne den
     fremden Streifen loszuwerden. Ergebnis: schlechter als vorher.

     Der Wunsch dahinter ("der Streifen soll die Flaechenfarbe tragen") ist
     mit `default` grundsaetzlich nicht erfuellbar; iOS zeichnet dort seine
     eigene helle Flaeche. Der EINZIGE Weg waere
     `apple-mobile-web-app-status-bar-style: black-translucent` - dann waechst
     die WebView ueber die volle Hoehe und unsere Flaeche traegt den Streifen
     wirklich. Der Preis ist hart: iOS zwingt Uhr, Netz und Akku dann auf
     WEISS. Auf einer hellen Flaechenfarbe sind sie unlesbar. Das lohnt sich
     nur, wenn die Flaechenfarbe dauerhaft DUNKEL ist - siehe ARCHITEKTUR.md
     §4c 2.99.3. Bis dahin bleibt das Panel so, wie es war: gerundet, mit
     gleichem Rand oben und unten. */
}

/* =====================================================================
   LOGO IM DUNKELMODUS (v2.100.3)
   ---------------------------------------------------------------------
   DER BEFUND (Murat 03.08.2026): "logo karanlik modda böyle oluyo" - die
   Wortmarke verschwand auf dunklem Grund. Kein Wunder: `logo.png` ist zu
   80 % durchsichtig und die Schrift schwarz.

   WAS VORHER DA WAR und hiermit ERSETZT wird: eine weisse Kachel hinter
   `.main-logo` (background-color:#fff, padding, Schatten). Das machte die
   Schrift zwar lesbar, legte aber ein weisses Rechteck mitten in eine
   dunkle Oberflaeche - eine Notloesung, die man sieht. Jetzt wird das BILD
   getauscht: `logo-hell.png` / `logo2-hell.png` sind dieselben Dateien mit
   weisser Schrift; die Farbflaechen (rot, gelb, gruen, blau) bleiben
   unveraendert, weil beim Erzeugen nur Pixel umgefaerbt wurden, die dunkel
   UND gering gesaettigt sind.

   WARUM `content:url()` UND NICHT ZWEI <img> IM HTML:
   Fuer TEXT gilt in diesem Projekt die Regel "beide Fassungen ins HTML, das
   CSS blendet eine aus" (CLAUDE.md) - dort geht es darum, dass niemand beim
   Drehen des Geraets neu rechnen muss. Bei einem Bild waere dieselbe Loesung
   ein zweiter Download und ein zweites Element an sechs Stellen. `content`
   auf einem <img> koennen alle heutigen Browser (Chrome, Safari, Firefox ab
   118); und wenn es doch einmal nicht greift, steht dort das schwarze Logo -
   also genau der Zustand von vorher, kein neuer Schaden. Ein Fehlschlag, der
   auf den Ausgangszustand zurueckfaellt, ist die richtige Art zu scheitern.

   BEIDE WEGE MUESSEN ABGEDECKT SEIN: `prefers-color-scheme` (Geraet steht
   auf dunkel, Nutzer hat in SchlauStart nichts eingestellt) UND
   `data-theme="dark"` (Nutzer hat es ausdruecklich gewaehlt). Umgekehrt
   gewinnt `data-theme="light"` ueber die Geraeteeinstellung - deshalb das
   `html:not([data-theme="light"])`.
   Abgesichert: qa/unit/test_seiten_icons.py.
===================================================================== */
@media (prefers-color-scheme: dark){
  html:not([data-theme="light"]) img.logo-tausch-marke{
    content: url("/static/images/logo-hell.png");
  }
  html:not([data-theme="light"]) img.logo-tausch-wort{
    content: url("/static/images/logo2-hell.png");
  }
}
html[data-theme="dark"] img.logo-tausch-marke{
  content: url("/static/images/logo-hell.png");
}
html[data-theme="dark"] img.logo-tausch-wort{
  content: url("/static/images/logo2-hell.png");
}


/* ===== ELTERNSPRECHTAG (v2.104.0) ==========================================
   Aufbau: static/js/index-app.js (ST-Block) · Hülle: templates/index.html
   (#screen-sprechtag) · Plan: docs/PLAN_ELTERNSPRECHTAG.md

   UMBAU 2c – WARUM HIER KEINE `.card` MEHR VORKOMMT:
   Der Inhalt saß bis 2.103.0 in einer eigenen weißen Karte INNERHALB des
   weißen Panels. Zwei Rahmen um dieselbe Sache, doppelter Innenabstand,
   und der Seitentitel stand irgendwo in der Mitte des Bildschirms
   („sayfa içinde sayfa", Befund Murat 03.08.2026). Jetzt schreibt der
   Screen direkt ins Panel; gegliedert wird mit `.st-block` – einer
   Überschrift und einer Trennlinie, nicht mit einem zweiten Kasten.

   DER TITEL LEBT IN DER APP-KOPFZEILE (#st-tb neben #page-title), wie beim
   Klassenbuch und beim Kalender. Dort stehen auch die Aktionen: „+" für
   einen neuen Sprechtag, Papierkorb, Verlauf. Aktionen zwischen den Daten
   sind Aktionen, die man beim Scrollen verliert.

   DIE TABELLE IST EIN WERKZEUG, KEINE ANZEIGE. Am Sprechtag wird darin
   getippt und geklickt, oft im Stehen. Deshalb große Klickflächen bei „Da?",
   ruhige Zeilen, und Eingabefelder, die erst beim Hineinklicken wie
   Eingabefelder aussehen – sonst flimmert eine Liste aus 24 umrandeten
   Kästen.

   SCHMAL (max-width:640px): NUR dort wird verändert (CLAUDE.md). Die Tabelle
   wird waagerecht schiebbar statt umgebrochen – eine Terminliste, deren
   Zeilen sich in Blöcke auflösen, verliert genau die Eigenschaft, für die
   man sie ansieht: dass die Uhrzeiten untereinander stehen. */

/* --- Kopfzeile + Aktionsleiste ------------------------------------------
   In die APP-KOPFZEILE gehoeren nur Titel und Klasse. Die Aktionsknoepfe
   standen dort einen Versuch lang und haben Postfach und Profil zur Seite
   gedrueckt (Befund Murat 03.08.2026) - der Platz in der Kopfzeile gehoert
   der App, nicht einer einzelnen Seite. Sie sitzen jetzt rechts auf der
   Zeile des Zurueck-Links: ueber dem Inhalt, den sie betreffen, und ohne
   etwas zu verschieben. */
/* FLEX:1 IST HIER KEIN SCHOENHEITSFEHLER, SONDERN DER GRUND, WARUM DAS PROFIL
   RECHTS STEHT (Befund Murat 04.08.2026: "profil ve mesajlar kismi sola
   kayiyor"). `.app-topbar:has(#st-tb) .at-title{flex:0 0 auto}` nimmt dem
   Titel die Dehnung, damit der Klassen-Chip daneben passt. Nimmt sie danach
   NIEMAND auf, schrumpfen Titel und Chip auf ihren Textbedarf, und #authbar
   (flex:none) klebt direkt dahinter - mitten auf dem Bildschirm. Beim
   Klassenbuch faellt das nicht auf, weil #kbx-tb genau dieses flex:1 hat.
   Wer die Zeile hier entfernt, holt den Fehler zurueck. */
#st-tb{ display:flex; align-items:center; gap:7px; margin-left:12px;
  flex:1 1 auto; min-width:0; }
.app-topbar:has(#st-tb) .at-title{ flex:0 0 auto; }
#st-tb .st-tb-klasse{ font-size:13px; color:var(--muted); font-weight:600;
  padding:4px 11px; border:1.5px solid var(--line); border-radius:999px;
  white-space:nowrap; }
/* Die Leiste traegt LINKS die Tagesreiter und RECHTS die Aktionen. Der
   Zurueck-Link stand hier bis 2.105.0 als Text ("Klassenbuch") - er sagte,
   WOHER man kam, und nahm dafuer die ganze linke Haelfte. Zurueck ist jetzt
   der erste Knopf in der Aktionsleiste (Wunsch Murat 04.08.2026). */
#screen-sprechtag .st-leiste{ display:flex; align-items:center; position:relative;
  justify-content:space-between; gap:12px; margin:0 0 14px; flex-wrap:wrap; }
#screen-sprechtag .st-links{ display:flex; align-items:center; gap:10px; flex:0 1 auto; min-width:0; }
/* Was NEBEN dem Zurueck-Knopf steht (v2.148.0): Halbjahr-Reiter bzw. die
   Angabe, fuer welche Klasse geplant wird. Beides sagt, woran man arbeitet -
   es gehoert zur Verortung, nicht in den Inhalt. Auf schmalen Schirmen darf
   es waagerecht geschoben werden, aber NIE umbrechen: die Zeile ist der
   Ausgang, und ein Ausgang, der zweizeilig wird, verschiebt alles darunter. */
#screen-sprechtag .st-links .fn-stufen{ margin:0; flex-wrap:nowrap; }
#screen-sprechtag .st-kopf-info{ font-size:12.5px; color:var(--muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
#screen-sprechtag .st-kopf-info b{ color:var(--ink); font-weight:700; }
/* Die Knopfreihe am Formularende mittig (Wunsch Murat 05.08.2026). */
#screen-sprechtag .st-knopfreihe.mitte{ justify-content:center; }
#screen-sprechtag #st-aktionen{ display:flex; align-items:center; gap:7px;
  margin-left:auto; flex-wrap:wrap; }
#screen-sprechtag .st-tb-b{ width:34px; height:34px; display:grid; place-items:center;
  border:1.5px solid var(--line); border-radius:10px; background:var(--card);
  color:var(--muted); cursor:pointer; padding:0; transition:all .12s; }
#screen-sprechtag .st-tb-b svg{ width:17px; height:17px; fill:none; stroke:currentColor;
  stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#screen-sprechtag .st-tb-b:hover{ border-color:#7B4FBF; color:#7B4FBF; }
#screen-sprechtag .st-tb-b.st-tb-zurueck{ margin-right:5px; }

/* --- Tagesreiter ---------------------------------------------------------
   EIN SPRECHTAG KANN MEHRERE TAGE HABEN, und bis 2.104.0 standen alle Termine
   beider Tage in EINER Liste untereinander (Befund Murat 04.08.2026: "iki gün
   sectim ... bir sacmalik oldu"). 36 Zeilen, in denen das Datum als kleine
   Zeile ueber jeder Uhrzeit mitlief - man sah nicht mehr, wo der Montag
   aufhoert. Jetzt ist jeder Tag ein Reiter; sichtbar ist immer genau ein Tag,
   und die Zeit-Spalte braucht dann nur noch die Uhrzeit.
   BEI EINEM EINZIGEN TAG wird gar kein Reiter gezeichnet - ein Reiter, den
   man nicht wechseln kann, ist nur ein Etikett. */
#screen-sprechtag .st-reiter{ display:flex; align-items:center; gap:6px;
  flex:1 1 auto; min-width:0; overflow-x:auto; scrollbar-width:none; }
#screen-sprechtag .st-reiter::-webkit-scrollbar{ display:none; }
#screen-sprechtag .st-reiter-b{ display:inline-flex; align-items:baseline; gap:7px;
  padding:7px 14px; border:1.5px solid var(--line); border-radius:999px;
  background:var(--card); color:var(--muted); font:inherit; font-size:13px;
  font-weight:600; cursor:pointer; white-space:nowrap; transition:all .12s; }
#screen-sprechtag .st-reiter-b small{ font-size:11.5px; font-weight:600; opacity:.8; }
#screen-sprechtag .st-reiter-b:hover{ border-color:#7B4FBF; color:#7B4FBF; }
#screen-sprechtag .st-reiter-b.an{ border-color:#7B4FBF; background:rgba(123,79,191,.10);
  color:#7B4FBF; }

/* --- Grundelemente ------------------------------------------------------- */
#screen-sprechtag .st-unter{ font-size:13.5px; color:var(--muted); margin:0 0 14px; }
#screen-sprechtag .st-laedt{ font-size:14px; color:var(--muted); }
#screen-sprechtag .st-fehler{ font-size:14px; color:var(--bad); }
#screen-sprechtag .st-leer{ font-size:13.5px; color:var(--muted); margin:10px 0; }
#screen-sprechtag .st-fuss{ font-size:12.5px; color:var(--muted); margin:12px 0 0; line-height:1.5; }
#screen-sprechtag .st-strich{ color:var(--muted); }
#screen-sprechtag .btn.st-klein{ margin:0; padding:7px 13px; font-size:13px; }
#screen-sprechtag .btn.st-gefahr{ color:var(--bad); }
/* Gliederung OHNE zweiten Kasten: Überschrift + Linie. */
#screen-sprechtag .st-block{ padding:0 0 18px; margin-bottom:18px;
  border-bottom:1px solid var(--line); }
#screen-sprechtag .st-block:last-of-type{ border-bottom:0; }
#screen-sprechtag .st-block-t{ font-size:11.5px; font-weight:700; color:var(--muted);
  text-transform:uppercase; letter-spacing:.5px; margin-bottom:11px; }
/* Die leere Seite steht MITTIG, der Knopf mittig darunter (Wunsch Murat
   04.08.2026). Links geklebt sah sie aus wie ein abgeschnittener Inhalt und
   nicht wie das, was sie ist: eine Einladung, das Erste anzulegen. */
#screen-sprechtag .st-leerseite{ max-width:480px; margin:min(11vh, 96px) auto 0;
  padding:0; text-align:center; }
#screen-sprechtag .st-leerseite p{ font-size:14px; color:var(--muted); line-height:1.6;
  margin:0 0 10px; }
#screen-sprechtag .st-leerseite p b{ color:var(--text); font-size:15.5px; }
#screen-sprechtag .st-leerseite .btn{ margin:16px auto 0; max-width:300px; }

/* --- Übersichtskarten ----------------------------------------------------
   `max-width:640px` liess die Liste auf einem 27-Zoll-Schirm als schmale
   Spalte links kleben, waehrend rechts zwei Drittel weiss blieben (Befund
   Murat 04.08.2026: "tüm sayfalar sola dayali"). Ein Raster, das sich selbst
   in Spalten teilt, fuellt die Breite ohne die Karten zu verzerren: 320px ist
   die Breite, ab der Datum, Zeitraum und Zaehler nebeneinander lesbar
   bleiben. */
#screen-sprechtag .st-karten{ display:grid; gap:10px;
  grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); }
/* DIE KARTE BEANTWORTET DIE FRAGE, DIE MAN BEIM DRAUFSCHAUEN HAT.
   Vorher: drei graue Zeilen in derselben Groesse - Datum, Uhrzeit und
   Belegung sahen gleich wichtig aus, also sah man keins davon. Jetzt traegt
   der Wochentag das Gewicht (danach sucht man), und die Belegung ist ein
   Balken: eine Zahl sagt "7 von 12", ein Balken sagt es, ohne dass man
   rechnet. */
#screen-sprechtag .st-karte{ position:relative; border:1.5px solid var(--line);
  border-radius:15px; background:var(--card); transition:border-color .15s,
  box-shadow .15s; }
#screen-sprechtag .st-karte:hover{ border-color:#7B4FBF;
  box-shadow:0 6px 20px rgba(123,79,191,.13); }
#screen-sprechtag .st-k-flaeche{ display:block; width:100%; text-align:left;
  padding:16px 17px 15px; background:none; border:0; font:inherit;
  color:var(--text); cursor:pointer; }
#screen-sprechtag .st-k-kopf{ font-size:13px; font-weight:700; color:var(--muted);
  text-transform:uppercase; letter-spacing:.4px; margin-bottom:9px;
  padding-right:30px; }
#screen-sprechtag .st-k-zeiten{ display:flex; flex-wrap:wrap; gap:6px 18px;
  margin-bottom:12px; }
#screen-sprechtag .st-k-tag{ display:block; }
#screen-sprechtag .st-k-tag b{ display:block; font-size:16.5px; font-weight:700;
  letter-spacing:-.2px; }
#screen-sprechtag .st-k-tag span{ font-size:13px; color:var(--muted);
  font-variant-numeric:tabular-nums; }
#screen-sprechtag .st-k-balken{ height:6px; border-radius:999px;
  background:var(--line); overflow:hidden; margin-bottom:9px; }
#screen-sprechtag .st-k-balken i{ display:block; height:100%; border-radius:999px;
  background:#7B4FBF; transition:width .25s; }
#screen-sprechtag .st-k-zahlen{ display:flex; flex-wrap:wrap; gap:4px 14px;
  font-size:12.5px; color:var(--muted); }
#screen-sprechtag .st-k-zahlen b{ color:var(--text); font-size:13.5px; }
/* Der Loeschknopf liegt UEBER der Flaeche und stoppt den Klick - sonst
   oeffnete er den Sprechtag, den er wegraeumen soll. */
#screen-sprechtag .st-k-menue{ position:absolute; top:10px; right:10px; z-index:2;
  width:28px; height:28px; display:grid; place-items:center; border:0;
  border-radius:8px; background:transparent; color:var(--muted); cursor:pointer;
  padding:0; opacity:0; transition:opacity .12s, background .12s; }
#screen-sprechtag .st-karte:hover .st-k-menue,
#screen-sprechtag .st-k-menue:focus{ opacity:1; }
#screen-sprechtag .st-k-menue:hover{ background:rgba(192,57,43,.12); color:var(--bad); }
#screen-sprechtag .st-k-menue svg{ width:15px; height:15px; fill:none;
  stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#screen-sprechtag .st-karte.fertig{ background:rgba(21,160,90,.05);
  border-color:rgba(21,160,90,.3); }
#screen-sprechtag .st-karte-tage{ display:inline-block; margin-left:7px; padding:1px 8px;
  border-radius:999px; background:rgba(123,79,191,.12); color:#7B4FBF;
  font-size:11px; font-weight:700; letter-spacing:0; text-transform:none; }
#screen-sprechtag .st-karte-fertig{ display:inline-block; margin-left:7px; padding:1px 9px;
  border-radius:999px; background:rgba(21,160,90,.14); color:#15A05A;
  font-size:11px; font-weight:700; letter-spacing:0; text-transform:none; }

/* Abschluss-Bereich unter der Tabelle. Der grosse Knopf ist der ABSCHLUSS -
   die richtige Geste fuer einen gelungenen Tag; das Zurueckziehen bleibt
   daneben und sieht auch danach aus. */
/* MITTIG (Wunsch Murat 05.08.2026: "alttaki butonlari ortala sola dayali
   olmasin"). Linksbuendig sahen die beiden Knoepfe aus wie der Anfang einer
   weiteren Zeile der Tabelle darueber - sie sind aber der ABSCHLUSS der
   Seite. `justify-content:center` gilt nicht fuer die abgeschlossene
   Fassung: dort steht links eine Meldung und rechts ein Knopf, und die
   gehoert ueber die volle Breite. */
#screen-sprechtag .st-abschluss{ display:flex; flex-wrap:wrap; gap:10px;
  align-items:center; justify-content:center; margin-top:22px; padding-top:18px;
  border-top:1px solid var(--line); }
#screen-sprechtag .st-abschluss:has(.st-abschluss-fertig){ justify-content:flex-start; }
#screen-sprechtag .st-abschluss .btn{ width:auto; margin:0; padding:11px 22px; }
#screen-sprechtag .st-abschluss-fertig{ display:flex; align-items:center; gap:11px;
  flex:1 1 320px; padding:11px 14px; border-radius:12px;
  background:rgba(21,160,90,.09); border:1.5px solid rgba(21,160,90,.3); }
#screen-sprechtag .st-abschluss-fertig svg{ width:20px; height:20px; flex:none;
  fill:none; stroke:#15A05A; stroke-width:2.6; stroke-linecap:round;
  stroke-linejoin:round; }
#screen-sprechtag .st-abschluss-fertig div{ flex:1 1 auto; }
#screen-sprechtag .st-abschluss-fertig b{ display:block; font-size:14px; }
#screen-sprechtag .st-abschluss-fertig small{ font-size:12.5px; color:var(--muted); }

/* --- Formular ------------------------------------------------------------
   Die feste Kappe von 680px war auf breiten Schirmen eine halb leere Seite.
   `auto-fit` legt so viele Spalten nebeneinander, wie bei 250px Mindestbreite
   hineinpassen - am Computer drei, auf dem Tablet zwei, am Telefon eine. Die
   Zeitzeilen behalten eine Kappe: fuenf Uhrzeit-Felder ueber 1600px gezogen
   sind kein Formular mehr, sondern eine Landebahn. */
#screen-sprechtag .st-form{ display:grid; gap:11px 13px;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); max-width:1100px; }
#screen-sprechtag .st-form label{ display:block; font-size:12.5px; color:var(--muted);
  margin-bottom:4px; }
#screen-sprechtag .st-tagkopf,
#screen-sprechtag .st-tagzeile{ display:grid;
  grid-template-columns:1.5fr 1fr 1fr 1fr 1fr 30px; gap:7px; align-items:center;
  max-width:820px; }
#screen-sprechtag .st-tagkopf{ font-size:11px; font-weight:700; color:var(--muted);
  text-transform:uppercase; letter-spacing:.4px; margin-bottom:5px; }
#screen-sprechtag .st-tagzeile{ margin-bottom:7px; }
/* `min-width:0` IST HIER DER GANZE FEHLER GEWESEN (Befund Murat 05.08.2026:
   "Sprechtag planen kismi tam sigmamis ekrana saga dogru büyümüs").
   Rasterelemente haben von sich aus `min-width:auto`, also die Breite ihres
   Inhalts. Ein `<input type="date">` meldet auf iOS eine Mindestbreite von
   deutlich ueber 200px - zwei davon nebeneinander sprengen ein 360px-Telefon,
   und zwar nicht das Feld, sondern die ganze SEITE: sie wird waagerecht
   schiebbar, und alles andere rutscht mit. `min-width:0` erlaubt dem Feld zu
   schrumpfen; `max-width:100%` faengt Safari zusaetzlich ab, das die
   Mindestbreite mancher Datumsfelder auch dann noch durchsetzt. */
#screen-sprechtag .st-tagzeile > *{ min-width:0; max-width:100%; }
#screen-sprechtag .st-form > *{ min-width:0; }
#screen-sprechtag .st-tf{ display:block; min-width:0; }
#screen-sprechtag .st-tf > span{ display:none; }
#screen-sprechtag .st-tagzeile input{ width:100%; min-width:0; padding:8px 9px;
  border:1.5px solid var(--line);
  border-radius:9px; font:inherit; font-size:13.5px; background:var(--card); color:var(--text); }
#screen-sprechtag .st-mehr{ background:none; border:0; padding:4px 0; font:inherit;
  font-size:13px; font-weight:600; color:#7B4FBF; cursor:pointer; }
/* HIER STANDEN DIE ZWEI MODUS-KARTEN (.st-modus / .st-modus-w). Sie sind
   weg, weil die Frage weg ist: Eltern sehen jetzt IMMER die freien Uhrzeiten
   und darunter den Ausweg "keine passt mir" (v2.123.0, §4c). Die Regeln
   stehen nicht mehr hier - auch nicht auskommentiert, sonst kommen sie beim
   naechsten Aufraeumen zurueck. */
#screen-sprechtag .st-vorschau{ font-size:13.5px; margin-bottom:4px; }
#screen-sprechtag .st-warn{ margin-top:9px; padding:9px 11px; border-radius:10px;
  background:rgba(245,166,35,.14); font-size:13px; line-height:1.5; max-width:820px; }
#screen-sprechtag .st-warn-rot{ color:var(--bad); }
#screen-sprechtag .st-knopfreihe{ display:flex; gap:8px; margin-top:16px; max-width:520px; }
#screen-sprechtag .st-knopfreihe.mitte{ max-width:none; justify-content:center; }
#screen-sprechtag .st-knopfreihe .btn,
#st-kind-ov .st-knopfreihe .btn,
#st-notiz-ov .st-knopfreihe .btn{ flex:1; margin:0; }

/* --- Zahlen-Chips = Filter -----------------------------------------------
   Eine Zahl, die man anklicken kann, spart die Suche danach: „3 ohne Mail"
   → Klick → genau diese drei.

   SIE STEHEN JETZT IN EINEM AUSKLAPP-FENSTER hinter dem Trichter-Symbol
   (Wunsch Murat 04.08.2026). Als offene Zeile nahmen sechs Chips die volle
   Breite ueber der Tabelle weg - jeden Tag, obwohl gefiltert selten wird.
   Der Trichter traegt die aktive Zahl als Punkt, damit ein gesetzter Filter
   nicht unsichtbar wird: eine Liste, die etwas verschweigt, ohne es zu
   sagen, ist die schlimmste Art von Liste. */
#st-leit-ov .st-leit-liste{ display:grid; gap:6px; margin-bottom:6px; }
#st-leit-ov .st-leit-z{ display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:10px 12px; border:1.5px solid var(--line); border-radius:11px; }
#st-leit-ov .st-leit-z b{ display:block; font-size:14px; }
#st-leit-ov .st-leit-z small{ font-size:12px; color:var(--muted); }
#st-leit-ov .st-leit-lab{ display:block; font-size:12.5px; color:var(--muted);
  margin:12px 0 4px; }
#st-leit-ov .st-leit-info{ margin-top:14px; padding:11px 13px; border-radius:11px;
  background:rgba(123,79,191,.08); font-size:12.5px; line-height:1.55; }
#st-leit-ov .versteckt{ display:none; }
#screen-sprechtag .st-filterhalter{ position:relative; display:inline-flex;
  align-items:center; }
#screen-sprechtag .st-tb-b.an{ border-color:#7B4FBF; color:#7B4FBF;
  background:rgba(123,79,191,.10); }
/* DIE ZAHL LIEGT IM KNOPF, nicht darueber: ein absolut gesetzter Punkt am
   oberen Rand haengt ausserhalb der Leiste und wird vom naechsten Elternteil
   mit `overflow` abgeschnitten - genau das passierte am Status-Knopf
   (Befund Murat 04.08.2026, "balon kesilmis"). Was innen liegt, kann nichts
   abschneiden. */
#screen-sprechtag .st-tb-zahl{ display:inline-grid; place-items:center;
  min-width:19px; height:19px; padding:0 5px; margin-left:2px;
  border-radius:999px; background:#7B4FBF; color:#fff; font-size:11px;
  font-weight:700; line-height:1; }
#screen-sprechtag .st-filterpunkt{ position:absolute; top:-4px; right:-4px;
  min-width:17px; height:17px; padding:0 4px; border-radius:999px;
  background:#7B4FBF; color:#fff; font-size:10.5px; font-weight:700;
  line-height:17px; text-align:center; pointer-events:none; }
#screen-sprechtag .st-filterbox{ position:absolute; top:calc(100% + 7px); right:0;
  z-index:40; min-width:250px; padding:11px; border:1.5px solid var(--line);
  border-radius:13px; background:var(--card);
  box-shadow:0 14px 34px rgba(0,0,0,.16); }
#screen-sprechtag .st-filterbox .st-chips{ flex-direction:column; align-items:stretch;
  margin:0; gap:5px; }
#screen-sprechtag .st-filterbox .st-chip{ justify-content:space-between; border-radius:9px; }
#screen-sprechtag .st-chips{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom:12px; }
#screen-sprechtag .st-chip{ --chip:var(--muted); display:inline-flex; align-items:center; gap:5px;
  padding:5px 11px; border:1.5px solid var(--line); border-radius:999px;
  background:var(--card); color:var(--muted); font:inherit; font-size:12.5px;
  cursor:pointer; transition:border-color .15s, color .15s; }
#screen-sprechtag .st-chip b{ color:var(--chip); font-size:13.5px; }
#screen-sprechtag .st-chip:hover{ border-color:var(--chip); }
#screen-sprechtag .st-chip.aktiv{ border-color:var(--chip); color:var(--text); font-weight:600; }
#screen-sprechtag .st-chip.still{ cursor:default; }
#screen-sprechtag .st-chip.still:hover{ border-color:var(--line); }

/* --- Elternlink + Wunschzeiten -------------------------------------------
   EINE ZEILE, FARBIG, MIT EINEM KNOPF, DEN MAN TRIFFT (Befund Murat
   04.08.2026). Vorher: ein gestrichelter Kasten in Seitenbreite, die Adresse
   umbrochen ueber zwei Zeilen (`word-break:break-all`), daneben ein 13px
   kleiner Geisterknopf. Die Adresse ist das, was die Lehrkraft weitergibt -
   sie ist der Inhalt dieser Zeile, nicht ihre Fussnote.
   `overflow:hidden` + `text-overflow:ellipsis` statt Umbruch: lieber hinten
   abgeschnitten als zweizeilig, denn kopiert wird ohnehin der volle Wert. */
/* DAS BAND: Adresse + vier Vorlagen in EINER Reihe.
   Sie gehoeren zusammen, weil sie dasselbe sind - das, was aus dieser Seite
   HERAUSGEHT und bei der Familie ankommt. Die Adresse ist breiter (flex:3),
   weil sie einen WERT traegt, den man lesen muss; die Kacheln tragen nur
   ihren Namen. */
#screen-sprechtag .st-band{ display:flex; flex-wrap:wrap; gap:10px;
  align-items:stretch; margin-bottom:6px; }
#screen-sprechtag .st-bandnotiz{ font-size:12px; color:var(--muted);
  margin:0 0 14px; }
#screen-sprechtag .st-dokkachel{ flex:1 1 150px; min-width:0; display:flex;
  flex-direction:column; align-items:flex-start; gap:2px; text-align:left;
  padding:11px 13px; border:1.5px solid var(--line); border-radius:13px;
  background:var(--card); color:var(--text); font:inherit; cursor:pointer;
  transition:border-color .15s, background .15s; }
#screen-sprechtag .st-dokkachel:hover{ border-color:#7B4FBF;
  background:rgba(123,79,191,.05); }
#screen-sprechtag .st-dokkachel svg{ width:18px; height:18px; fill:none;
  stroke:#7B4FBF; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;
  margin-bottom:3px; }
#screen-sprechtag .st-dokkachel b{ font-size:13.5px; }
#screen-sprechtag .st-dokkachel small{ font-size:11.5px; color:var(--muted);
  line-height:1.35; }
#screen-sprechtag .st-dokkachel.aus{ opacity:.5; cursor:default; }
#screen-sprechtag .st-dokkachel.aus:hover{ border-color:var(--line);
  background:var(--card); }

#screen-sprechtag .st-link{ flex:3 1 300px; min-width:0;
  display:flex; gap:12px; align-items:center;
  padding:10px 10px 10px 15px; margin-bottom:0; border-radius:13px;
  border:1.5px solid rgba(123,79,191,.35); background:rgba(123,79,191,.08); }
#screen-sprechtag .st-link-txt{ flex:1 1 auto; min-width:0; }
#screen-sprechtag .st-link b{ display:block; font-size:10.5px; color:#7B4FBF;
  text-transform:uppercase; letter-spacing:.5px; }
#screen-sprechtag .st-link code{ display:block; font-size:15px; font-weight:700;
  color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  letter-spacing:.2px; }
#screen-sprechtag .st-link .st-kopier{ flex:0 0 auto; display:inline-flex;
  align-items:center; gap:7px; padding:0 18px; height:40px; border:0;
  border-radius:10px; background:#7B4FBF; color:#fff; font:inherit; font-size:14px;
  font-weight:700; cursor:pointer; transition:filter .12s; }
#screen-sprechtag .st-link .st-kopier:hover{ filter:brightness(1.08); }
#screen-sprechtag .st-link .st-kopier svg{ width:17px; height:17px; fill:none;
  stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
/* --- Status-Fenster ------------------------------------------------------
   Drei Namenslisten standen als Fliesstext quer ueber der Seite. Zwanzig
   Namen mit Komma sind kein Verzeichnis, sondern ein Absatz - man liest ihn
   nicht, man sucht darin. Als Plaettchen ist jeder Name ein eigenes Ding und
   auf einen Blick zaehlbar. */
#st-status-ov .st-w-zeile{ padding:6px 0; border-bottom:1px solid var(--line); font-size:13.5px; }
#st-status-ov .st-w-zeile:last-child{ border-bottom:0; }
#st-status-ov .st-w-zeile b{ margin-right:9px; }
#st-status-ov .st-w-zeile span{ color:var(--muted); }
#st-status-ov .st-w-zeile small{ display:block; color:var(--muted); font-style:italic; }
#st-status-ov .st-statuszahlen{ display:grid;
  grid-template-columns:repeat(auto-fit, minmax(90px, 1fr)); gap:9px;
  margin-bottom:18px; }
#st-status-ov .st-statuszahlen div{ padding:11px 12px; border-radius:12px;
  border:1.5px solid var(--line); text-align:center; }
#st-status-ov .st-statuszahlen b{ display:block; font-size:21px; line-height:1.2; }
#st-status-ov .st-statuszahlen span{ font-size:11.5px; color:var(--muted); }
#st-status-ov .st-statusblock{ padding-bottom:16px; margin-bottom:16px;
  border-bottom:1px solid var(--line); }
#st-status-ov .st-statusblock:last-child{ border-bottom:0; margin-bottom:0;
  padding-bottom:0; }
#st-status-ov .st-block-t{ font-size:11.5px; font-weight:700; color:var(--muted);
  text-transform:uppercase; letter-spacing:.5px; margin-bottom:10px; }
#st-status-ov .st-zaehl{ display:inline-block; margin-left:6px; padding:1px 8px;
  border-radius:999px; background:rgba(123,79,191,.12); color:#7B4FBF;
  font-size:11px; letter-spacing:0; }
#st-status-ov .st-namen{ display:flex; flex-wrap:wrap; gap:6px; }
#st-status-ov .st-name{ padding:5px 12px; border-radius:999px;
  border:1.5px solid var(--line); font-size:13px; background:var(--card); }
#st-status-ov .st-leer{ font-size:13.5px; color:var(--muted); margin:0; }
#st-status-ov .btn.st-klein{ margin:0; padding:8px 14px; font-size:13px;
  width:auto; display:inline-block; }

/* --- Blaue Briefe aus den Fachnoten --------------------------------------
   Eine Vorschlagsliste, keine Entscheidung: Jede Zeile ist abwaehlbar, und
   die betroffenen Faecher stehen NEBEN dem Namen - sonst muesste die
   Lehrkraft zum Raster zurueck, um zu sehen, warum ein Kind dabei ist. */
#fn-bb-ov .fn-bb-hj{ font-weight:600; color:var(--muted); font-size:12.5px;
  margin-left:7px; }
#fn-bb-ov .fn-bb-alle{ display:flex; align-items:center; gap:8px;
  flex-wrap:wrap; margin-bottom:12px; }
#fn-bb-ov .fn-bb-alle small{ color:var(--muted); font-size:11.5px;
  font-style:italic; }
#fn-bb-ov .fn-bb-liste{ max-height:46vh; overflow-y:auto; }
#fn-bb-ov .fn-bb-zeile{ display:flex; align-items:flex-start; gap:10px;
  padding:9px 2px; border-bottom:1px solid var(--line); cursor:pointer; }
#fn-bb-ov .fn-bb-zeile:last-child{ border-bottom:0; }
#fn-bb-ov .fn-bb-zeile input{ flex:0 0 auto; width:18px; height:18px;
  margin-top:2px; accent-color:#7B4FBF; cursor:pointer; }
#fn-bb-ov .fn-bb-name{ flex:0 0 34%; font-weight:700; font-size:13.5px;
  word-break:break-word; }
#fn-bb-ov .fn-bb-faecher{ flex:1 1 auto; display:flex; flex-wrap:wrap; gap:5px; }
#fn-bb-ov .fn-bb-fach{ padding:2px 9px; border-radius:999px; font-size:12px;
  background:rgba(220,53,69,.10); color:#B3202F; white-space:nowrap; }
#fn-bb-ov .fn-bb-fach b{ font-weight:800; }
#fn-bb-ov .fn-bb-fuss{ display:flex; justify-content:flex-end; gap:9px;
  margin-top:16px; }
#fn-bb-ov .fn-bb-fuss .btn{ width:auto; margin:0; padding:10px 18px;
  font-size:14px; }
/* Auf dem Telefon steht der Name UEBER den Faechern - nebeneinander bleiben
   von jedem Fach zwei Buchstaben uebrig. */
@media (max-width:640px){
  #fn-bb-ov .fn-bb-zeile{ flex-wrap:wrap; }
  #fn-bb-ov .fn-bb-name{ flex:1 1 auto; }
  #fn-bb-ov .fn-bb-faecher{ flex:1 1 100%; padding-left:28px; }
  #fn-bb-ov .fn-bb-fuss .btn{ flex:1 1 auto; }
}

/* --- Tabelle ------------------------------------------------------------- */
#screen-sprechtag .st-tabwrap{ overflow-x:auto; }
#screen-sprechtag .st-tab{ width:100%; border-collapse:collapse; font-size:13.5px; }
#screen-sprechtag .st-tab th{ text-align:left; font-size:11px; font-weight:700;
  text-transform:uppercase; letter-spacing:.4px; color:var(--muted);
  padding:0 8px 8px; border-bottom:1.5px solid var(--line); white-space:nowrap; }
#screen-sprechtag .st-tab td{ padding:6px 8px; border-bottom:1px solid var(--line);
  vertical-align:middle; }
#screen-sprechtag .st-tab tr:hover td{ background:rgba(123,79,191,.05); }
#screen-sprechtag .st-leerzeile td{ opacity:.55; }
/* Sortierbare Spaltenköpfe. Der Pfeil steht IMMER im Kopf (blass, wenn diese
   Spalte gerade nicht sortiert) - ein Pfeil, der erst beim Klicken erscheint,
   verraet vorher nicht, dass man klicken kann. */
#screen-sprechtag .st-tab th.st-sortbar{ padding:0; }
#screen-sprechtag .st-sortb{ display:inline-flex; align-items:center; gap:5px;
  width:100%; padding:0 8px 8px; background:none; border:0; font:inherit;
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px;
  color:var(--muted); cursor:pointer; }
#screen-sprechtag .st-sortb:hover{ color:#7B4FBF; }
#screen-sprechtag .st-sortb svg{ width:11px; height:11px; fill:none; stroke:currentColor;
  stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; opacity:.28; }
#screen-sprechtag .st-sortb.an{ color:#7B4FBF; }
#screen-sprechtag .st-sortb.an svg{ opacity:1; }
#screen-sprechtag .st-c-zeit{ width:74px; font-weight:700; font-variant-numeric:tabular-nums; }
#screen-sprechtag .st-c-zeit small{ display:block; font-weight:600; font-size:10.5px;
  color:var(--muted); }
#screen-sprechtag .st-c-kind{ min-width:150px; }
#screen-sprechtag .st-c-eltern{ min-width:140px; }
#screen-sprechtag .st-c-anw{ width:62px; }
#screen-sprechtag .st-c-mail{ min-width:190px; }
#screen-sprechtag .st-c-code{ width:104px; }
#screen-sprechtag .st-c-notiz{ min-width:180px; }
#screen-sprechtag .st-c-weg{ width:34px; }

/* Anwesenheit: EIN Kästchen, drei Aussagen (Wunsch Murat 04.08.2026).
   Vorher waren es zwei Knöpfe („war da" / „nicht erschienen") - also zwei
   Klickziele fuer eine Frage, und der Zustand „noch nicht erfasst" sah aus
   wie „nicht erschienen". Jetzt gilt:
     angehakt              → Zeile gruen  (die Familie war da)
     leer, Zeit laeuft     → Zeile neutral (noch offen)
     leer, Zeit ist vorbei → Zeile rot     (nicht erschienen)
   Das Rot entsteht also aus der UHR, nicht aus einem zweiten Klick - genau
   deshalb muss niemand am Ende des Tages 24 Zeilen nacharbeiten. Gespeichert
   wird weiterhin nur „ja" oder leer; „nicht erschienen" ist eine Ableitung
   und keine Eingabe. */
#screen-sprechtag .st-da{ display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border:2px solid var(--line); border-radius:9px;
  background:var(--card); color:transparent; cursor:pointer; padding:0;
  transition:all .12s; }
#screen-sprechtag .st-da svg{ width:16px; height:16px; fill:none; stroke:currentColor;
  stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
#screen-sprechtag .st-da:hover{ border-color:#15A05A; color:rgba(21,160,90,.45); }
#screen-sprechtag .st-da.an{ background:#15A05A; border-color:#15A05A; color:#fff; }
#screen-sprechtag tr.st-z-da td{ background:rgba(21,160,90,.09); }
#screen-sprechtag tr.st-z-da:hover td{ background:rgba(21,160,90,.15); }
#screen-sprechtag tr.st-z-weg td{ background:rgba(192,57,43,.09); }
#screen-sprechtag tr.st-z-weg:hover td{ background:rgba(192,57,43,.15); }
#screen-sprechtag tr.st-z-weg .st-da{ border-color:rgba(192,57,43,.55); }

#screen-sprechtag .st-kind{ background:none; border:0; padding:0; font:inherit;
  font-weight:600; color:var(--text); cursor:pointer; text-align:left;
  border-bottom:1px dashed var(--line); }
#screen-sprechtag .st-kind:hover{ border-bottom-color:currentColor; }
#screen-sprechtag .st-fb{ margin-right:3px; }
#screen-sprechtag .st-sel{ width:100%; padding:5px 7px; border:1.5px solid var(--line);
  border-radius:8px; font:inherit; font-size:13px; background:var(--card); color:var(--text); }
/* Eingabefelder in der Tabelle: unauffällig, bis man hineinklickt. 24 umrandete
   Kästen untereinander machen die Liste unlesbar. */
#screen-sprechtag .st-in{ width:100%; padding:5px 7px; border:1.5px solid transparent;
  border-radius:8px; font:inherit; font-size:13px; background:transparent; color:var(--text); }
#screen-sprechtag .st-in::placeholder{ color:var(--muted); opacity:.6; }
#screen-sprechtag .st-in:hover{ border-color:var(--line); }
#screen-sprechtag .st-in:focus{ border-color:#7B4FBF; background:var(--card); outline:none; }
/* Der Code hat eine EIGENE Spalte (Wunsch Murat 04.08.2026: "email ve code
   ayri ayri"). Er gehoert dem KIND (students.eltern_code), die Adresse gehoert
   dem TERMIN - zwei verschiedene Dinge in einer Zelle sahen aus wie eins, und
   wer die Adresse leerte, meinte manchmal den Code. Ein Klick kopiert ihn. */
#screen-sprechtag .st-code{ display:inline-flex; align-items:center; gap:6px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12.5px;
  letter-spacing:1px; padding:4px 9px; border:0; border-radius:7px;
  background:rgba(123,79,191,.12); color:#7B4FBF; font-weight:700;
  cursor:pointer; transition:background .12s; }
#screen-sprechtag .st-code:hover{ background:rgba(123,79,191,.22); }
#screen-sprechtag .st-code svg{ width:12px; height:12px; fill:none; stroke:currentColor;
  stroke-width:2; stroke-linecap:round; stroke-linejoin:round; opacity:.7; }
/* Absprachen: die Zelle zeigt den Anfang und öffnet den Dialog. */
#screen-sprechtag .st-notizbtn{ width:100%; text-align:left; background:none;
  border:1.5px solid transparent; border-radius:8px; padding:5px 7px; font:inherit;
  font-size:13px; color:var(--text); cursor:pointer; }
#screen-sprechtag .st-notizbtn:hover{ border-color:var(--line); }
#screen-sprechtag .st-notiz-leer{ color:var(--muted); opacity:.6; }
#screen-sprechtag .st-x{ width:26px; height:26px; display:grid; place-items:center;
  border:0; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; padding:0; }
#screen-sprechtag .st-x svg{ width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:2.4; }
#screen-sprechtag .st-x:hover{ background:rgba(192,57,43,.12); color:var(--bad); }
#screen-sprechtag .st-pk-zeile{ display:flex; gap:12px; align-items:center;
  justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--line);
  max-width:640px; }
#screen-sprechtag .st-pk-zeile small{ display:block; font-size:12.5px; color:var(--muted); margin-top:2px; }

/* --- Notiz-Dialog -------------------------------------------------------- */
#st-notiz-ov .st-unter{ font-size:13px; color:var(--muted); margin:0 0 12px; }
#st-notiz-ov .st-notiz-feld{ width:100%; padding:12px 13px; border:1.5px solid var(--line);
  border-radius:11px; font:inherit; font-size:14.5px; line-height:1.6;
  background:var(--card); color:var(--text); resize:vertical; }
#st-notiz-ov .st-notiz-feld:focus{ border-color:#7B4FBF; outline:none; }
#st-notiz-ov .st-anh-liste{ display:flex; flex-wrap:wrap; gap:9px; margin-top:12px; }
#st-notiz-ov .st-anh{ position:relative; width:96px; }
#st-notiz-ov .st-anh a{ display:block; text-decoration:none; color:var(--text); }
#st-notiz-ov .st-anh img{ width:96px; height:72px; object-fit:cover; border-radius:9px;
  border:1.5px solid var(--line); display:block; }
#st-notiz-ov .st-anh-ico{ width:96px; height:72px; display:grid; place-items:center;
  border-radius:9px; border:1.5px solid var(--line); background:var(--card);
  font-size:12px; font-weight:700; color:var(--muted); }
#st-notiz-ov .st-anh-n{ display:block; font-size:11px; color:var(--muted); margin-top:3px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#st-notiz-ov .st-anh .st-x{ position:absolute; top:3px; right:3px; width:22px; height:22px;
  background:rgba(255,255,255,.9); border-radius:6px; }
#st-notiz-ov .st-anh .st-x svg{ width:12px; height:12px; fill:none; stroke:currentColor;
  stroke-width:2.6; }
#st-notiz-ov .st-anh-knoepfe{ display:flex; gap:8px; margin-top:13px; }
#st-notiz-ov .st-anh-knoepfe .btn{ margin:0; cursor:pointer; }
#st-notiz-ov .st-notiz-hinweis{ font-size:12px; color:var(--muted); margin-top:9px;
  line-height:1.5; }
#st-notiz-ov .versteckt{ display:none; }

/* --- Kind-Pop-up --------------------------------------------------------- */
#st-kind-ov .st-tl{ display:grid; grid-template-columns:78px 1fr auto; gap:10px;
  padding:7px 0; border-bottom:1px solid var(--line); font-size:13px; align-items:baseline; }
#st-kind-ov .st-tl-d{ color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
#st-kind-ov .st-tl-t small{ color:var(--muted); }
#st-kind-ov .st-tl-w{ font-weight:700; }
#st-kind-ov .st-leer{ font-size:13.5px; color:var(--muted); margin:10px 0; }

@media (max-width:640px){
  /* Die Aktionen bleiben oben, der Klassen-Chip weicht - er wiederholt, was
     schon auf der Seite steht, und nimmt dem Titel die Breite. */
  #st-tb .st-tb-klasse{ display:none; }
  /* DER TITEL DARF SCHMAL SCHRUMPFEN (Befund Murat 05.08.2026: "profil
     resmini kaydirmis safa"). Breit ist `flex:0 0 auto` richtig - der Titel
     soll dort nicht gestaucht werden. Schmal schob "Noten der
     Fachlehrkräfte" genau deshalb den Avatar aus dem Bild: Was nicht
     schrumpfen darf, draengt alles andere hinaus. Hier also schrumpfen und
     notfalls kuerzen - der Avatar ist ein Bedienelement, der Titel eine
     Beschriftung. */
  .app-topbar:has(#st-tb) .at-title{ flex:1 1 auto; min-width:0;
    font-size:clamp(15px,4.3vw,19px); overflow:hidden;
    text-overflow:ellipsis; white-space:nowrap; }
  #screen-sprechtag .st-form{ grid-template-columns:1fr; }
  #screen-sprechtag .st-tagkopf{ display:none; }
  #screen-sprechtag .st-tagzeile{ grid-template-columns:1fr 1fr; gap:7px 8px;
    padding-bottom:9px; margin-bottom:9px; border-bottom:1px solid var(--line); }
  /* Der Kopf mit den Spaltennamen ist weg - also traegt jedes Feld seinen
     eigenen. Ohne das standen dort zwei leere Kaesten, von denen niemand
     wusste, dass es die Pause ist. */
  #screen-sprechtag .st-tf > span{ display:block; font-size:11px; font-weight:600;
    color:var(--muted); margin-bottom:3px; }
  #screen-sprechtag .st-tf:first-child{ grid-column:1 / -1; }
  /* Auf einen Blick statt dreimal scrollen: enger gesetzt, aber nicht kleiner
     angefasst - die Felder behalten ihre 44px Hoehe. */
  #screen-sprechtag .st-block{ padding-bottom:14px; margin-bottom:14px; }
  #screen-sprechtag .st-form{ gap:9px; }
  /* Waagerecht schieben statt umbrechen – die Uhrzeiten müssen untereinander
     bleiben, sonst ist es keine Terminliste mehr. 860 statt 740: seit 2d hat
     der Elterncode eine eigene Spalte. */
  #screen-sprechtag .st-tab{ min-width:860px; }
  #screen-sprechtag .st-knopfreihe{ max-width:none; }
  /* Eine Karte je Zeile: zwei nebeneinander waeren auf 360px zwei Streifen,
     in denen weder Datum noch Zeitraum ganz hineinpasst. */
  #screen-sprechtag .st-karten{ grid-template-columns:1fr; }
  /* ZURUECK UND DIE AKTIONEN STEHEN AUF EINER ZEILE (Befund Murat
     05.08.2026: "mobilde o zurück ile o menüler ayni sirada olmali").
     Vorher stand der Pfeil allein auf einer Zeile und die Knoepfe darunter -
     zwei Zeilen fuer eine Leiste, und die obere war zu 90 Prozent leer.
     Die TAGESREITER brechen statt dessen um: sie sind die einzigen, die
     beliebig breit werden koennen, und `order:3` schiebt sie unter die
     Knoepfe. `flex-basis:100%` erzwingt den Umbruch, ohne dass die Leiste
     selbst die Richtung wechselt - der Pfeil bleibt also links, die Aktionen
     bleiben rechts. */
  #screen-sprechtag .st-leiste{ flex-direction:row; align-items:center;
    flex-wrap:wrap; gap:8px; }
  #screen-sprechtag .st-links{ order:1; }
  #screen-sprechtag #st-aktionen{ order:2; margin-left:auto;
    justify-content:flex-end; }
  #screen-sprechtag .st-reiter{ order:3; flex:1 1 100%; margin:0 -4px;
    padding:0 4px; }
  #screen-sprechtag .st-reiter:empty{ display:none; }
  /* Die Adresse: Knopf unter die Zeile, sonst bleibt fuer sie selbst nichts.
     Und die vier Vorlagen zu zweit nebeneinander - einspaltig waeren es vier
     halbleere Streifen, vierspaltig passt kein Wort hinein. */
  #screen-sprechtag .st-link{ flex:1 1 100%; flex-wrap:wrap; padding:12px 13px; }
  #screen-sprechtag .st-link .st-kopier{ width:100%; justify-content:center; }
  #screen-sprechtag .st-dokkachel{ flex:1 1 calc(50% - 5px); }
  /* Ohne Zeiger gibt es kein hover - der Loeschknopf der Karte und der Text
     im Status-Knopf muessen dauerhaft sichtbar bleiben. */
  #screen-sprechtag .st-k-menue{ opacity:1; }
  #screen-sprechtag .st-abschluss .btn{ width:100%; }
  #st-status-ov .st-statuszahlen{ grid-template-columns:repeat(2, 1fr); }
  /* Der Halter ist nur 34px breit - ein `width:100%` waere hier 34px. Deshalb
     wird er schmal auf `static` gesetzt: dann haengt das Fenster an der
     LEISTE (die relativ ist) und darf ueber die ganze Breite gehen. */
  #screen-sprechtag .st-filterhalter{ position:static; }
  #screen-sprechtag .st-filterbox{ left:0; right:0; top:calc(100% + 4px);
    width:auto; min-width:0; }
  /* Ohne Zeiger gibt es kein "hover" - das Löschkreuz der Fachspalte muss
     dauerhaft sichtbar sein, sonst ist es auf dem Telefon gar nicht da. */
  #screen-sprechtag .fn-fachweg{ opacity:1; }
}

/* --- Tablet (641–1024px): die Stelle, an der bisher NICHTS stand ----------
   Zwischen Telefon und Computer lag eine Luecke: die Seite bekam die
   Desktop-Regeln, hatte aber nicht die Breite dafuer. Auf einem iPad hoch
   standen Reiter, Dokumente-Knopf und Filter in einer Zeile, die nicht
   aufging. Hier bricht die Leiste um, ohne dass am Telefon (oben) oder am
   Computer (Grundregeln) etwas kippt. */
@media (min-width:641px) and (max-width:1024px){
  #screen-sprechtag .st-leiste{ align-items:flex-start; }
  #screen-sprechtag #st-aktionen{ justify-content:flex-end; }
  #screen-sprechtag .st-reiter{ flex:1 1 100%; order:2; }
  #screen-sprechtag #st-aktionen{ flex:1 1 100%; order:1; }
  #screen-sprechtag .st-karten{ grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); }
  #screen-sprechtag .st-tabwrap{ overflow-x:auto; }
  #screen-sprechtag .st-tab{ min-width:820px; }
}

/* Mail-Zustand je Termin (Faz 2b). Bewusst "gesendet", nicht "zugestellt":
   die Annahme durch den Mailserver sagt nichts ueber Zustellung oder Lesen -
   und eine Lesebestaetigung gaebe es nur ueber Zaehlpixel, die hier nicht
   hineinkommen. */
/* EIN SYMBOL NEBEN DEM FELD, keine zweite Zeile darunter: das Text-Etikett
   ("⏱ geplant") machte jede Zeile mit Adresse um eine Zeilenhöhe größer -
   bei 36 Terminen eine halbe Bildschirmseite für eine Angabe, die man einmal
   nachschlägt. Die Erklärung steht im title. */
#screen-sprechtag .st-mailzelle{ display:flex; align-items:center; gap:5px; }
#screen-sprechtag .st-mailzelle .st-in{ flex:1 1 auto; min-width:0; }
#screen-sprechtag .st-mailz{ flex:0 0 auto; display:inline-grid; place-items:center;
  width:20px; height:20px; border-radius:6px; cursor:help; }
#screen-sprechtag .st-mailz svg{ width:13px; height:13px; fill:none;
  stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
#screen-sprechtag .st-mailz.ok{ background:#E6F7EF; color:#15A05A; }
#screen-sprechtag .st-mailz.bad{ background:rgba(192,57,43,.12); color:#C0392B; }
#screen-sprechtag .st-mailz.warte{ background:var(--card); color:var(--muted);
  border:1px solid var(--line); }

/* Dokumente-Knopf + Auswahl (Faz 2b). Der Knopf traegt als einziger in der
   Leiste einen TEXT: "Dokumente" ist keine Aktion, die man am Symbol errät,
   und sie ist der Grund, warum die Lehrkraft ueberhaupt hier ist, wenn der
   Sprechtag geplant steht. */
#screen-sprechtag .st-tb-b.breit{ width:auto; gap:6px; padding:0 12px;
  display:inline-flex; align-items:center; font:inherit; font-size:13px;
  font-weight:600; color:var(--text); }
#screen-sprechtag .st-tb-b.breit svg{ width:15px; height:15px; }
#st-dok-ov .st-unter{ font-size:13px; color:var(--muted); margin:0 0 14px; }
#st-dok-ov .st-dokbtn{ display:block; width:100%; text-align:left; padding:13px 15px;
  margin-bottom:9px; border:1.5px solid var(--line); border-radius:12px;
  background:var(--card); color:var(--text); font:inherit; cursor:pointer;
  transition:border-color .15s; }
#st-dok-ov .st-dokbtn:hover{ border-color:#7B4FBF; }
#st-dok-ov .st-dokbtn b{ display:block; font-size:14.5px; }
#st-dok-ov .st-dokbtn small{ display:block; font-size:12.5px; color:var(--muted);
  margin-top:2px; line-height:1.45; }
#st-dok-ov .st-dokbtn.aus{ opacity:.5; cursor:default; }
#st-dok-ov .st-dokbtn.aus:hover{ border-color:var(--line); }

@media (max-width:640px){
  /* Auf dem Telefon zaehlt die Breite: der Text weicht, das Symbol bleibt. */
  #screen-sprechtag .st-tb-b.breit span{ display:none; }
  #screen-sprechtag .st-tb-b.breit{ width:34px; padding:0; justify-content:center; }
}

/* ===== GESPRÄCHSPROTOKOLL (Faz 3, v2.107.0) ================================
   Zwei Spalten mit einer klaren Rollenverteilung: LINKS die Vergangenheit
   (nur lesen), RECHTS das Gespräch (schreiben). Im Gespräch soll niemand
   versehentlich eine Note ändern, während er auf sie zeigt.
   Schmal fallen die Spalten untereinander - auf dem Telefon nebeneinander
   waere beides unlesbar. */
#screen-sprechtag .st-notizzelle{ display:flex; align-items:center; gap:4px; }
#screen-sprechtag .st-notizzelle .st-notizbtn{ flex:1; }
#screen-sprechtag .st-protobtn{ width:26px; height:26px; display:grid; place-items:center;
  border:1.5px solid var(--line); border-radius:7px; background:var(--card);
  color:var(--muted); cursor:pointer; padding:0; flex:0 0 auto; }
#screen-sprechtag .st-protobtn svg{ width:13px; height:13px; fill:none; stroke:currentColor;
  stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#screen-sprechtag .st-protobtn:hover{ border-color:#7B4FBF; color:#7B4FBF; }

#st-proto-ov .st-unter{ font-size:13px; color:var(--muted); margin:0 0 14px; }
#st-proto-ov .stp-zwei{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
#st-proto-ov .stp-links{ max-height:52vh; overflow:auto; padding-right:6px; }
#st-proto-ov .stp-block{ margin-bottom:14px; }
#st-proto-ov .stp-t{ font-size:11px; font-weight:700; color:var(--muted);
  text-transform:uppercase; letter-spacing:.5px; margin-bottom:6px; }
#st-proto-ov .stp-chip{ display:inline-block; margin-left:6px; padding:1px 7px;
  border-radius:999px; background:rgba(123,79,191,.12); color:#7B4FBF;
  font-size:11px; letter-spacing:0; text-transform:none; }
#st-proto-ov .stp-z{ display:flex; align-items:baseline; gap:8px; padding:4px 0;
  border-bottom:1px solid var(--line); font-size:13px; }
#st-proto-ov .stp-z span{ flex:1; }
#st-proto-ov .stp-z small{ color:var(--muted); font-size:11.5px; }
#st-proto-ov .stp-z b{ font-variant-numeric:tabular-nums; }
#st-proto-ov .stp-leer{ font-size:13px; color:var(--muted); }
#st-proto-ov .stp-text{ font-size:13px; line-height:1.55; margin:0; }
#st-proto-ov .stp-rechts label{ display:block; font-size:12.5px; color:var(--muted);
  margin:10px 0 4px; }
#st-proto-ov .stp-rechts label:first-child{ margin-top:0; }
#st-proto-ov .stp-rechts textarea,
#st-proto-ov .stp-rechts input{ width:100%; padding:10px 12px; border:1.5px solid var(--line);
  border-radius:10px; font:inherit; font-size:14px; line-height:1.55;
  background:var(--card); color:var(--text); resize:vertical; }
#st-proto-ov .stp-rechts textarea:focus,
#st-proto-ov .stp-rechts input:focus{ border-color:#7B4FBF; outline:none; }
#st-proto-ov .stp-anw{ display:flex; gap:7px; }
#st-proto-ov .stp-anwb{ flex:1; padding:9px; border:1.5px solid var(--line);
  border-radius:10px; background:var(--card); color:var(--muted); font:inherit;
  font-size:13px; font-weight:600; cursor:pointer; }
#st-proto-ov .stp-anwb.an{ border-color:#15A05A; background:#EAF7F0; color:#15A05A; }
#st-proto-ov .stp-anwb:nth-child(2).an{ border-color:#C0392B;
  background:rgba(192,57,43,.1); color:#C0392B; }
#st-proto-ov .stp-warn{ padding:10px 12px; border-radius:10px; font-size:13px;
  background:rgba(245,166,35,.14); margin-bottom:12px; }
#st-proto-ov .stp-knoepfe{ display:flex; gap:8px; margin-top:16px; flex-wrap:wrap; }
#st-proto-ov .stp-knoepfe .btn{ flex:1; margin:0; min-width:130px; }
#st-proto-ov .versteckt{ display:none; }

/* Rückfrage vor dem Verschicken. Sie zeigt die ADRESSE gross und den TEXT
   vollstaendig - eine Einschaetzung ueber ein Kind, die an die falsche
   Familie geht, laesst sich durch nichts zurueckholen. */
#st-send-ov .st-send-an{ padding:12px 14px; border-radius:12px;
  background:rgba(123,79,191,.08); border:1.5px solid rgba(123,79,191,.3);
  margin-bottom:12px; }
#st-send-ov .st-send-an span{ display:block; font-size:10.5px; font-weight:700;
  letter-spacing:.5px; text-transform:uppercase; color:#7B4FBF; }
#st-send-ov .st-send-an b{ display:block; font-size:16px; word-break:break-all; }
#st-send-ov .st-send-an small{ display:block; font-size:12.5px; color:var(--muted);
  margin-top:2px; }
#st-send-ov .st-send-vor{ max-height:34vh; overflow:auto; padding:12px 14px;
  border:1.5px solid var(--line); border-radius:12px; font-size:13.5px;
  line-height:1.6; background:var(--card); }
#st-send-ov .st-send-warn{ font-size:12.5px; color:var(--muted); line-height:1.5;
  margin:10px 0 0; }
#st-send-ov .st-knopfreihe{ display:flex; gap:8px; margin-top:14px; }
#st-send-ov .st-knopfreihe .btn{ flex:1; margin:0; }

@media (max-width:640px){
  #st-proto-ov .stp-zwei{ grid-template-columns:1fr; }
  #st-proto-ov .stp-links{ max-height:30vh; }
  #st-proto-ov .stp-knoepfe .btn{ min-width:0; flex:1 1 45%; }
}

/* ===== FREMDNOTEN-RASTER (Faz 4, v2.108.0) =================================
   Vorbild ist die Praxis-Datei "Klasse 7a": Kinder x Faecher, Werte wie 4+,
   5-6, 2- E, n.b., /. Deshalb SCHMALE Spalten und mittige Zellen - es sind
   kurze Zeichen, keine Saetze. Der Kindername bleibt beim waagerechten
   Schieben stehen (position:sticky), sonst weiss man in Spalte 14 nicht
   mehr, wessen Note man tippt.

   DIE FARBE IST BEWUSST NICHT DIE DER EIGENEN NOTEN: Diese Werte gehoeren
   den Kolleginnen und fliessen in keinen Schnitt. Im Protokollbogen stehen
   sie als eigener Block mit dem Hinweis "nicht im Schnitt". */
/* DIE VIER WERKZEUGE LIEGEN OBEN RECHTS in der Aktionsleiste, nicht mehr als
   Knopfreihe ueber der Tabelle (Wunsch Murat 04.08.2026). Der Grund, warum
   sie dort so schlecht aussahen, war eine unsichtbare Kollision: `.btn` ist in
   dieser App `width:100%`, also nahm in einem flex-Behaelter jeder Knopf die
   volle Zeile - vier Knoepfe, vier Zeilen, quer ueber den Bildschirm. Statt
   die Breite zu flicken, gehoeren sie dorthin, wo beim Sprechtag auch alle
   anderen Aktionen stehen. `.fn-status` bleibt ueber der Tabelle: er meldet
   "nicht gespeichert" und muss dort stehen, wo getippt wird. */
#screen-sprechtag .fn-luecke{ padding:9px 12px; border-radius:10px; margin-bottom:10px;
  background:rgba(245,166,35,.14); font-size:13px; line-height:1.5; }
#screen-sprechtag .fn-status{ display:block; font-size:12.5px; color:var(--bad);
  margin-bottom:10px; min-height:16px; }
/* Welcher Faechersatz gilt. Eine Angabe, kein Umschalter - deshalb Fliesstext
   und kein Reiter. Der Knopf daneben repariert, er waehlt nicht. */
/* Das "i" neben den Halbjahren. Es traegt den einen Satz, der ueber der
   Tabelle zu sagen ist - vorher standen dort drei Zeilen Fliesstext, die auf
   dem Telefon den halben Bildschirm kosteten (CLAUDE.md: an einem
   Bedienelement hoechstens ein Satz, ein `title`-Tooltip ist erlaubt). */
#screen-sprechtag .fn-info{ flex:none; width:20px; height:20px; padding:0;
  border:1.5px solid var(--line); border-radius:999px; background:var(--card);
  color:var(--muted); font:inherit; font-size:12px; font-weight:800;
  font-style:italic; line-height:1; cursor:pointer; }
#screen-sprechtag .fn-info:hover{ border-color:var(--brand,#7B4FBF);
  color:var(--brand,#7B4FBF); }
#screen-sprechtag .fn-satz{ display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  font-size:12.5px; color:var(--muted); margin:0 0 12px; }
#screen-sprechtag .fn-satz b{ color:var(--text); }
#screen-sprechtag .fn-satz-b{ border:1.5px solid var(--line); background:transparent;
  color:var(--text); border-radius:999px; padding:3px 12px; font-size:12.5px;
  font-weight:700; cursor:pointer; }
#screen-sprechtag .fn-satz-b:hover{ border-color:var(--brand,#3B6FE0); }
/* Die Reiterzeile des Rasters. Der NAME stammt noch aus der Zeit, als hier
   der Fächersatz umgeschaltet wurde; heute trägt sie die beiden Halbjahre –
   der Satz ist keine Wahl mehr, sondern eine Angabe (.fn-satz oben). Sie
   sieht aus wie die Tagesreiter des Sprechtags und benutzt deren Regeln:
   dieselbe Geste, dieselbe Optik. */
#screen-sprechtag .fn-stufen{ display:flex; align-items:center; flex-wrap:wrap;
  gap:7px; margin:0 0 12px; }
#screen-sprechtag .fn-stufen > span{ font-size:11.5px; font-weight:700;
  color:var(--muted); text-transform:uppercase; letter-spacing:.5px;
  margin-right:3px; }
#screen-sprechtag .fn-status.ok{ color:#15A05A; }
#screen-sprechtag .fn-belege{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
#screen-sprechtag .fn-beleg{ display:flex; align-items:center; gap:4px; padding:4px 6px 4px 11px;
  border:1.5px solid var(--line); border-radius:999px; font-size:12.5px; }
#screen-sprechtag .fn-beleg a{ color:var(--text); text-decoration:none; }
#screen-sprechtag .fn-beleg a:hover{ text-decoration:underline; }
/* Notenfarben im Raster: 5 und schlechter rot, 1 und 2 gruen, alles andere
   schwarz. GEFAERBT WIRD DIE SCHRIFT, nicht die Zelle - ein Raster mit
   dreissig roten Kaesten sieht aus wie eine Katastrophe, auch wenn es zwei
   Fuenfen sind, und im Gespraech liest die Familie mit. Welche Note welche
   Farbe bekommt, entscheidet `fnNoteFarbe()` in index-app.js; hier steht nur,
   wie die drei Zustaende aussehen. */
#screen-sprechtag .fn-zelle.schlecht{ color:var(--bad); font-weight:700; }
#screen-sprechtag .fn-zelle.gut{ color:#15803D; font-weight:700; }
/* NOTENWAHL STATT TASTATUR - der Kasten, der auf schmalen Schirmen statt der
   Bildschirmtastatur aufgeht (siehe fnNotenwahlOeffnen in index-app.js).
   Er sitzt UNTEN am Rand: Dort ist der Daumen, und dort stand vorher die
   Tastatur - die Hand muss also nirgendwo hin. Die Karte ist bewusst niedrig,
   damit die Tabellenzeile darueber sichtbar bleibt; man soll sehen, in welche
   Zelle man gerade schreibt. */
.fn-wahl-ov{ position:fixed; inset:0; z-index:1200; background:rgba(15,18,26,.34);
  display:flex; align-items:flex-end; justify-content:center; }
.fn-wahl-karte{ width:100%; max-width:420px; background:var(--card);
  border-radius:18px 18px 0 0; padding:12px 12px calc(12px + env(safe-area-inset-bottom));
  box-shadow:0 -8px 30px rgba(0,0,0,.18); }
.fn-wahl-kopf{ display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.fn-wahl-kopf b{ font-size:15px; }
.fn-wahl-kopf span{ font-size:12.5px; color:var(--muted); }
.fn-wahl-kopf .modal-x{ margin-left:auto; }
.fn-wahl-reihe{ display:grid; grid-template-columns:repeat(3,1fr); gap:7px;
  margin-bottom:7px; }
.fn-wahl-b{ padding:12px 4px; border:1.5px solid var(--line); border-radius:11px;
  background:var(--card); color:var(--text); font:inherit; font-size:17px;
  font-weight:700; cursor:pointer; }
.fn-wahl-b.an{ border-color:var(--brand,#7B4FBF); background:rgba(123,79,191,.10); }
/* Dieselben Farben wie im Raster - wer im Kasten eine 5 waehlt, soll sie
   dort schon rot sehen. */
.fn-wahl-b.schlecht{ color:var(--bad); }
.fn-wahl-b.gut{ color:#15803D; }
.fn-wahl-leer{ display:block; }
.fn-wahl-fuss{ display:flex; gap:8px; margin-top:4px; }
.fn-wahl-weg{ flex:1; padding:12px; border:1.5px solid var(--line); border-radius:11px;
  background:var(--card); color:var(--muted); font:inherit; font-weight:700;
  cursor:pointer; }
.fn-wahl-ok{ flex:1; padding:12px; border:0; border-radius:11px;
  background:var(--brand,#7B4FBF); color:#fff; font:inherit; font-weight:700;
  cursor:pointer; }
#screen-sprechtag .fn-tabwrap{ overflow-x:auto; border:1px solid var(--line);
  border-radius:12px; }
#screen-sprechtag .fn-tab{ border-collapse:collapse; font-size:13px; width:100%; }
#screen-sprechtag .fn-tab th,
#screen-sprechtag .fn-tab td{ border:1px solid var(--line); padding:0; }
#screen-sprechtag .fn-tab thead th{ background:var(--card); padding:3px; }
#screen-sprechtag .fn-tab .fn-name{ position:sticky; left:0; z-index:2; background:var(--card);
  text-align:left; font-weight:600; padding:6px 10px; white-space:nowrap; min-width:150px; }
/* Fachspalte: Name + Löschkreuz. Ein Fach, das versehentlich entstanden ist
   (ein Klick auf "+ Fach" zu viel, eine Spalte aus einer fremden Tabelle),
   liess sich bis 2.104.0 nicht mehr entfernen - es blieb als leere Spalte
   stehen. Das Kreuz erscheint erst beim Zeigen auf die Spalte, damit die
   Kopfzeile ruhig bleibt; auf dem Telefon steht es dauerhaft (kein Zeiger). */
#screen-sprechtag .fn-fachkopf{ display:flex; align-items:center; gap:2px; padding:0 2px; }
#screen-sprechtag .fn-fach{ flex:1 1 auto; width:100%; min-width:64px; padding:5px 4px;
  border:0; background:transparent; font:inherit; font-size:12px; font-weight:700;
  text-align:center; color:var(--text); }
#screen-sprechtag .fn-fach:focus{ outline:2px solid #7B4FBF; outline-offset:-2px; }
#screen-sprechtag .fn-fachweg{ flex:0 0 auto; width:18px; height:18px; display:grid;
  place-items:center; border:0; border-radius:5px; background:transparent;
  color:var(--muted); cursor:pointer; padding:0; opacity:0; transition:opacity .12s; }
#screen-sprechtag .fn-fachkopf:hover .fn-fachweg,
#screen-sprechtag .fn-fachweg:focus{ opacity:1; }
#screen-sprechtag .fn-fachweg:hover{ background:rgba(192,57,43,.12); color:var(--bad); }
#screen-sprechtag .fn-fachweg svg{ width:11px; height:11px; fill:none; stroke:currentColor;
  stroke-width:2.6; stroke-linecap:round; }
#screen-sprechtag .fn-zelle{ width:100%; min-width:74px; padding:7px 4px; border:0;
  background:transparent; font:inherit; font-size:13.5px; text-align:center;
  color:var(--text); }
#screen-sprechtag .fn-zelle:focus{ outline:2px solid #7B4FBF; outline-offset:-2px;
  background:rgba(123,79,191,.06); }
/* Der Wert aus dem LETZTEN Halbjahr steht blass in derselben Zelle - nicht
   als zweites Eingabefeld: Vergangenheit wird nicht bearbeitet. Er ist der
   Grund, warum die Spalte zweimal im Jahr gefuellt wird. */
#screen-sprechtag .fn-zellbox{ display:flex; align-items:center; gap:3px;
  padding:0 3px; }
#screen-sprechtag .fn-alt{ flex:0 0 auto; font-size:11px; color:var(--muted);
  opacity:.75; cursor:help; }
#screen-sprechtag .fn-zellbox .fn-zelle{ flex:1 1 auto; min-width:44px; }
/* Entwicklung: zwei Halbjahre je Zelle. Der Pfeil erscheint NUR bei zwei
   einfachen Schulnoten - ein geratener Pfeil ist schlimmer als keiner. */
#screen-sprechtag .fn-etab td{ padding:6px 8px; text-align:center;
  white-space:nowrap; font-size:13px; }
#screen-sprechtag .fn-e-alt{ color:var(--muted); }
#screen-sprechtag .fn-e-zu{ color:var(--muted); margin:0 3px; font-size:11px; }
#screen-sprechtag .fn-e-neu{ font-weight:700; }
#screen-sprechtag .fn-e-leer{ color:var(--muted); opacity:.5; }
#screen-sprechtag .fn-pf{ margin-left:5px; font-size:10px; }
#screen-sprechtag .fn-pf.gut{ color:#15A05A; }
#screen-sprechtag .fn-pf.schlecht{ color:#C0392B; }
#screen-sprechtag .fn-pf.gleich{ color:var(--muted); }
#screen-sprechtag .fn-einfeld{ width:100%; padding:11px 12px; border:1.5px solid var(--line);
  border-radius:11px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12.5px; background:var(--card); color:var(--text); resize:vertical; }

/* Zuordnungsansicht - hier ist noch NICHTS gespeichert. */
#fn-ein-ov .st-unter{ font-size:13px; color:var(--muted); margin:0 0 12px; }
#fn-ein-ov .fn-hinweis{ padding:9px 11px; border-radius:10px; font-size:13px;
  background:rgba(245,166,35,.14); margin-bottom:10px; }
#fn-ein-ov .fn-tabwrap{ max-height:44vh; overflow:auto; }
#fn-ein-ov .fn-ptab{ width:100%; border-collapse:collapse; font-size:13px; }
#fn-ein-ov .fn-ptab th{ text-align:left; font-size:11px; font-weight:700; color:var(--muted);
  text-transform:uppercase; letter-spacing:.4px; padding:0 8px 7px;
  border-bottom:1.5px solid var(--line); position:sticky; top:0; background:var(--card); }
#fn-ein-ov .fn-ptab td{ padding:5px 8px; border-bottom:1px solid var(--line);
  vertical-align:middle; }
#fn-ein-ov .fn-zuord{ width:100%; padding:5px 7px; border:1.5px solid var(--line);
  border-radius:8px; font:inherit; font-size:13px; background:var(--card); color:var(--text); }
#fn-ein-ov .fn-noten{ font-size:12.5px; color:var(--muted); }
#fn-ein-ov .fn-noten b{ color:var(--text); }
#fn-ein-ov .fn-ok{ color:#15A05A; font-weight:700; }
#fn-ein-ov .fn-warn{ color:#D98324; font-size:11.5px; font-weight:700; }
#fn-ein-ov .fn-offen{ color:#C0392B; font-size:11.5px; font-weight:700; }
#fn-ein-ov .versteckt{ display:none; }

/* Fremdnoten im Protokollbogen: eigener Block, sichtbar getrennt. */
#st-proto-ov .stp-fremd{ padding:10px 12px; border:1.5px dashed var(--line);
  border-radius:11px; }
#st-proto-ov .stp-chip.grau{ background:var(--card); color:var(--muted);
  border:1px solid var(--line); }
#st-proto-ov .stp-hjnotiz{ font-size:11px; color:var(--muted); margin:0 0 6px; }
#st-proto-ov .stp-vorher{ color:var(--muted); font-weight:400; }
#st-proto-ov .stp-zu{ color:var(--muted); font-weight:400; margin:0 4px; font-size:11px; }

@media (max-width:640px){
  /* DAS NOTENRASTER AUF DEM TELEFON (Befund Murat 05.08.2026: "Noten der
     Fachlehrkräfte sayfasi mobilde cok kötü dagilmis").
     Es ist eine Tabelle mit bis zu vierzehn Spalten - sie kann schmal nicht
     "passen", sie kann nur SCHIEBBAR sein, und dann muss der Kindername
     stehen bleiben. Genau das war kaputt: der Name klebte zwar (sticky),
     hatte aber keinen eigenen Hintergrund mehr, sodass die Noten beim
     Schieben darunter durchliefen. */
  #screen-sprechtag .fn-tabwrap{ margin:0 -14px; border-radius:0;
    border-left:0; border-right:0; -webkit-overflow-scrolling:touch; }
  #screen-sprechtag .fn-tab .fn-name{ min-width:88px; max-width:88px;
    background:var(--card); box-shadow:1px 0 0 var(--line);
    font-size:11.5px; padding:4px 6px; white-space:normal; line-height:1.2; }
  #screen-sprechtag .fn-fach,
  #screen-sprechtag .fn-zelle{ min-width:46px; }
  #screen-sprechtag .fn-fach{ font-size:10px; padding:3px 2px; }
  /* KLEINER, ABER NICHT WINZIG (Befund Murat 05.08.2026: "tablo cok önemli,
     text boyutunu filan kücült"). 14 -> 13 px und schmalere Spalten bringen
     zwei Faecher mehr ins Bild, ohne dass eine Note zum Raten wird - und
     getippt wird hier ohnehin nicht mehr, sondern gewaehlt (.fn-wahl-ov). */
  #screen-sprechtag .fn-zelle{ font-size:13px; padding:3px 2px; }
  #screen-sprechtag .fn-tab th,
  #screen-sprechtag .fn-tab td{ padding:2px 3px; }
  /* Der alte Wert daneben braucht schmal keinen Platz - er steht darunter. */
  #screen-sprechtag .fn-zellbox{ flex-direction:column; gap:0; padding:2px; }
  #screen-sprechtag .fn-alt{ font-size:10px; line-height:1.2; }
  /* Die Reiterzeile schiebbar statt umbrechend: drei Halbjahre untereinander
     kosten drei Zeilen, die man jeden Tag sieht. */
  #screen-sprechtag .fn-stufen{ flex-wrap:nowrap; overflow-x:auto;
    scrollbar-width:none; margin:0 -14px 12px; padding:0 14px; }
  #screen-sprechtag .fn-stufen::-webkit-scrollbar{ display:none; }
  #screen-sprechtag .fn-stufen > span{ flex:none; font-size:10.5px;
    letter-spacing:.3px; }
  /* SCHMALER UND KLEINER (Befund Murat 05.08.2026: "halbjahr ve yanindaki
     tuslari daralt ve textleri kücült"). Zwei Halbjahre plus Beschriftung
     brauchten mehr als die Bildschirmbreite und schoben sich unter den
     Rand; jetzt passen sie nebeneinander. */
  #screen-sprechtag .fn-stufen{ gap:5px; margin-bottom:9px; }
  #screen-sprechtag .fn-stufen .st-reiter-b{ flex:none; padding:5px 10px;
    font-size:11.5px; gap:4px; }
  #screen-sprechtag .fn-stufen .st-reiter-b small{ font-size:10.5px; }
  /* Der Faechersatz-Hinweis darunter ist eine Angabe, kein Bedienelement -
     schmal darf er klein sein. */
  #screen-sprechtag .fn-satz{ font-size:11.5px; gap:6px; margin-bottom:9px; }
  #screen-sprechtag .fn-satz-b{ padding:2px 10px; font-size:11.5px; }
  /* Entwicklung: zwei Werte plus Pfeil je Zelle - schmal untereinander. */
  #screen-sprechtag .fn-etab td{ padding:5px 6px; font-size:12px; }
  #screen-sprechtag .fn-e-zu{ margin:0 2px; }
}

/* ---- Aufbewahrungs-Streifen im Klassenbuch (v2.137.0) -------------------
   Er sagt eine Frist an und stellt EINE Frage. Deshalb ruhig (bernstein),
   nicht rot: Rot ist in dieser App die Farbe des Unumkehrbaren, und hier ist
   noch gar nichts passiert. Erst wenn die Frist erreicht IST, wird er
   deutlicher (.akut) - aber immer noch nicht rot, denn auch dann loescht
   niemand von selbst. */
.kb-aufbew{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  border:1px solid #F0D08A; background:#FFFAEC; color:#5B4708;
  border-radius:13px; padding:12px 15px; margin:0 0 14px;
}
.kb-aufbew.akut{ border-color:#E3B25C; background:#FDF3DC; }
.kb-aufbew-tx{ flex:1; min-width:220px; }
.kb-aufbew-tx b{ display:block; font-size:13.5px; font-weight:700; }
.kb-aufbew-tx small{ display:block; font-size:12px; opacity:.85; margin-top:2px; line-height:1.45; }
.kb-aufbew-akt{ display:flex; gap:8px; flex-wrap:wrap; }
.kb-aufbew-akt .btn{ width:auto; margin:0; padding:8px 13px; font-size:12.5px; border-radius:10px; }
body.dark .kb-aufbew{ border-color:#6B5520; background:#2B2415; color:#F2DFA8; }
body.dark .kb-aufbew.akut{ border-color:#8A6C22; background:#352C18; }

/* Schmal: die Knoepfe unter den Text, sonst quetschen sie ihn auf zwei Woerter. */
@media (max-width:640px){
  .kb-aufbew{ flex-direction:column; align-items:stretch; gap:10px; }
  .kb-aufbew-akt{ display:grid; grid-template-columns:1fr 1fr; }
  .kb-aufbew-akt .btn{ width:100%; }
}

/* ---- Gesperrte Klasse (v2.138.0) ---------------------------------------
   Bewusst NICHT rot und bewusst nicht dramatisch: Es ist nichts verloren,
   und wer "gesperrt" liest und Schlimmes vermutet, macht im Zweifel etwas
   Unumkehrbares. Ruhiges Grau mit Schloss - eine Tuer, kein Alarm. */
.kb-gesperrt{
  border:1px solid var(--line,#e2e5ec); background:var(--card,#fff);
  border-radius:15px; padding:26px 22px; margin:6px 0 14px; text-align:center;
}
.kb-gesperrt-kopf{ display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:8px; }
.kb-gesperrt-kopf svg{ width:22px; height:22px; color:var(--muted,#6b7280); flex:none; }
.kb-gesperrt-kopf b{ font-size:15px; font-weight:800; }
.kb-gesperrt p{ margin:0 auto 16px; max-width:52ch; font-size:13px; color:var(--muted,#6b7280); line-height:1.55; }
.kb-gesperrt-akt{ display:flex; gap:9px; justify-content:center; flex-wrap:wrap; }
.kb-gesperrt-akt .btn{ width:auto; margin:0; padding:10px 16px; font-size:13px; border-radius:11px; }

@media (max-width:640px){
  .kb-gesperrt{ padding:20px 15px; }
  .kb-gesperrt-akt{ display:grid; grid-template-columns:1fr; width:100%; }
  .kb-gesperrt-akt .btn{ width:100%; }
}

/* ==========================================================================
   REGAL „MEINE ARBEITSBLÄTTER" (.bl-*) – Blatt-Studio, Aufgabe 0.3b
   docs/PLAN_BLATT_STUDIO.md §9, docs/PLAN_ARBEITSBLATT_EDITOR.md §12.3

   Gezeichnet von blaetterZeichnen() in static/js/blatt-studio.js in
   #blaetter-content (templates/index.html).

   DIE VORSCHAU IST GEZEICHNET, NICHT FOTOGRAFIERT. `.bl-blatt` ist ein
   weisses Rechteck im A4-Verhaeltnis (1:1.414 ueber aspect-ratio), darin ein
   Kopfbalken und ein paar graue Balken fuer die Bloecke. Ein echtes
   Miniaturbild gaebe es nur ueber html2canvas oder zwanzig <iframe> - beides
   in §4 F1 des Editor-Plans schon verworfen.
   ========================================================================== */
/* Zurueck-Link und Hauptaktion in EINER Zeile (Wunsch Murat 07.08.2026).
   Der eigene Ueberschriftsblock darueber ist entfallen: der Titel steht in
   der App-Kopfzeile (#page-title), und "Selbst gestaltete Blaetter und
   bearbeitete Fassungen" war genau der Erklaersatz, den CLAUDE.md aus der
   Oberflaeche verbannt - er stand ueber einer Seite, auf der man ohnehin
   sieht, was drinsteht. */
.bl-zeile{ display:flex; align-items:center; justify-content:space-between;
  gap:14px; flex-wrap:wrap; margin:0 0 14px; }
.bl-neu{ display:inline-flex; align-items:center; gap:7px; border:0;
  border-radius:10px; padding:9px 15px; font-size:13.5px; font-weight:700;
  cursor:pointer; background:var(--brand,#2E5BFF); color:#fff; }
.bl-neu:hover{ filter:brightness(1.06); }
.bl-neu svg{ fill:none; stroke:currentColor; stroke-width:2.4;
  stroke-linecap:round; }

.bl-laedt,.bl-leer{ padding:34px 20px; text-align:center;
  color:var(--muted,#5b6472); font-size:14px; }
.bl-leer b{ display:block; font-size:15px; color:var(--text,#1b2230);
  margin-bottom:5px; }
.bl-leer p{ margin:0; }

.bl-regal{ display:grid; gap:18px;
  grid-template-columns:repeat(auto-fill,190px); }
.bl-karte{ display:flex; flex-direction:column; position:relative; }

.bl-vorschau{ cursor:pointer; border-radius:10px; overflow:hidden;
  background:#eef1f6; border:1px solid var(--line,#e3e8f0); padding:9px;
  transition:border-color .12s, box-shadow .12s; }
.bl-vorschau:hover{ border-color:var(--brand,#2E5BFF);
  box-shadow:0 4px 14px rgba(20,30,50,.10); }
.bl-blatt{ position:relative; aspect-ratio:1 / 1.414; background:#fff;
  border-radius:3px; box-shadow:0 1px 3px rgba(20,30,50,.14);
  padding:11% 12%; display:flex; flex-direction:column; gap:7%; }
/* Querformat: dasselbe Blatt, gekippt. */
.bl-vorschau.quer .bl-blatt{ aspect-ratio:1.414 / 1; }
.bl-blatt.bl-real{ padding:0; display:block; overflow:hidden; }
.bl-real-page{ position:absolute; left:0; top:0; transform-origin:0 0;
  background:#fff; overflow:hidden; }
.bl-real-page .st-el{ position:absolute; box-sizing:border-box; overflow:hidden; }
.bl-fluss-real{ padding:10% 9%; gap:5%; }
.bl-fluss-kopf{ font-size:9px; font-weight:800; border-bottom:1px solid #d7dce6;
  padding-bottom:6%; margin-bottom:4%; overflow:hidden; white-space:nowrap; }
.bl-fluss-frage{ display:grid; grid-template-columns:12px 1fr; gap:3px; font-size:6px;
  line-height:1.35; border-bottom:1px solid #e3e8f0; padding:4% 0; }
.bl-fluss-frage span{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; }
.bl-kopfbalken{ display:block; height:9%; min-height:5px; border-radius:2px;
  background:var(--brand,#2E5BFF); opacity:.75; width:64%; }
.bl-blatt i{ display:block; height:6%; min-height:3px; border-radius:2px;
  background:#d7dce6; }
.bl-mehr{ position:absolute; right:6%; bottom:5%; font-style:normal;
  font-size:10px; font-weight:700; color:#8b93a5; }

.bl-info{ padding:8px 2px 0; }
.bl-name{ font-size:13.5px; font-weight:700; color:var(--text,#1b2230);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bl-meta{ display:flex; align-items:center; gap:7px; flex-wrap:wrap;
  margin-top:3px; font-size:11.5px; color:var(--muted,#8b93a5); }
/* Das Abzeichen ist die Bedingung fuer das GEMEINSAME Regal (§10 Frage 4):
   ohne es waeren Studio- und Editor-Blaetter nicht zu unterscheiden. */
.bl-abz{ font-size:10px; font-weight:800; letter-spacing:.03em;
  text-transform:uppercase; border-radius:5px; padding:2px 6px; }
.bl-abz.studio{ background:#EAF1FE; color:#1E3FCC; }
.bl-abz.fluss{ background:#F4F6FA; color:#5b6472; }

.bl-akt{ position:absolute; top:6px; right:6px; opacity:0; display:flex; gap:4px;
  transition:opacity .12s; }
.bl-karte:hover .bl-akt,.bl-akt:focus-within{ opacity:1; }
.bl-akt button{ border:0; background:rgba(255,255,255,.92); border-radius:7px;
  width:27px; height:27px; cursor:pointer; color:#b3261e; padding:0;
  box-shadow:0 1px 4px rgba(20,30,50,.16); }
.bl-akt svg{ fill:none; stroke:currentColor; stroke-width:2;
  stroke-linecap:round; }
.bl-akt .bl-bearb{ color:var(--brand,#2E5BFF); }

.bl-modal{ position:fixed; inset:0; z-index:10020; background:rgba(19,28,45,.48);
  display:grid; place-items:center; padding:20px; }
.bl-modal-k{ width:min(680px,calc(100vw - 32px)); max-height:min(760px,calc(100vh - 40px));
  overflow:auto; background:#fff; border-radius:18px; box-shadow:0 22px 70px rgba(20,30,50,.3);
  padding:20px; box-sizing:border-box; }
.bl-modal-kopf{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  margin-bottom:16px; }
.bl-modal-kopf>div{ display:flex; flex-direction:column; gap:3px; }
.bl-modal-kopf b{ font-size:20px; color:var(--text,#1b2230); }
.bl-modal-kopf span{ font-size:13px; color:var(--muted,#7b8494); }
.bl-modal-kopf>button{ border:0; background:#f1f4f9; border-radius:9px; width:32px;height:32px;
  font-size:21px; cursor:pointer; color:#5b6472; }
.bl-quellen{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.bl-quellen>button{ border:1px solid #e3e8f0; background:#fff; border-radius:13px; padding:15px;
  display:flex; align-items:center; gap:11px; text-align:left; cursor:pointer; color:#1b2230; }
.bl-quellen>button:hover{ border-color:#a9c0ff; background:#f4f7ff; }
.bl-quellen svg{ width:29px; height:29px; flex:0 0 auto; fill:none; stroke:#2E5BFF;
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.bl-quellen span{ display:flex; min-width:0; flex-direction:column; gap:3px; }
.bl-quellen b{ font-size:13px; }.bl-quellen small{ font-size:10px; line-height:1.3; color:#7b8494; }
#bl-quelle-liste{ margin-top:16px; }.bl-quell-titel{ font-size:12px; font-weight:800;
  color:#5b6472; text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
.bl-q-filter{ display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:10px;
  background:#f6f8fb; border:1px solid #e7ebf2; border-radius:12px; }
.bl-q-filter label{ display:flex; flex-direction:column; gap:5px; font-size:10px;
  font-weight:800; color:#697386; text-transform:uppercase; letter-spacing:.04em; }
.bl-q-filter select{ width:100%; min-width:0; border:1px solid #d7dde7; border-radius:8px;
  background:#fff; padding:8px; color:#1b2230; }.bl-q-filter select:disabled{ opacity:.55; }
.bl-q-auswahl{ margin-top:12px; }.bl-q-auswahl>b{ display:block; padding:0 6px 6px;
  font-size:10px; color:#697386; text-transform:uppercase; letter-spacing:.04em; }
.bl-quell-zeile,.bl-version{ width:100%; border:0; border-top:1px solid #eef1f6; background:#fff;
  padding:10px 6px; display:flex; justify-content:space-between; align-items:center; text-align:left;
  cursor:pointer; }.bl-quell-zeile:hover,.bl-version:hover{ background:#f7f9fc; }
.bl-quell-zeile span,.bl-version span{ display:flex; min-width:0; flex-direction:column; gap:2px; }
.bl-quell-zeile b,.bl-version b{ font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bl-quell-zeile small,.bl-version small{ font-size:10px; color:#8b93a3; }.bl-quell-zeile i,.bl-version i{ font-style:normal;
  font-size:10px; font-weight:700; color:#2E5BFF; }.bl-quell-laedt,.bl-quell-leer{ padding:18px;
  text-align:center; font-size:12px; color:#8b93a3; }

/* Große Aufgabenwahl: Die 244-px-Werkzeugspalte ist für Fach, Thema,
   Material, Fassung und echte Aufgabenvorschauen zu schmal. */
.st-aq-modal{ width:min(1120px,calc(100vw - 32px));
  height:min(760px,calc(100vh - 40px)); overflow:hidden;
  display:flex; flex-direction:column; }
.st-aq-modal>.bl-modal-kopf,.st-aq-modal>.st-aq-tabs,
.st-aq-modal>.st-aq-filter{ flex:0 0 auto; }
.st-aq-tabs{ display:flex; gap:7px; margin-bottom:10px; }
.st-aq-tabs button,.st-aq-wahl button{ border:1px solid #dce3ee; background:#fff;
  border-radius:9px; padding:8px 12px; font:700 11px inherit; color:#4d5666; cursor:pointer; }
.st-aq-tabs button.an{ background:#eaf1fe; border-color:#b9ccff; color:#1e3fcc; }
.st-aq-tabs button:last-child{ margin-left:auto; }
.st-aq-filter{ display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:10px;
  background:#f6f8fb; border:1px solid #e7ebf2; border-radius:12px; margin-bottom:10px; }
.st-aq-filter label,.st-aq-fassung{ display:flex; flex-direction:column; gap:4px;
  font-size:10px; font-weight:800; color:#6f7888; text-transform:uppercase; letter-spacing:.04em; }
.st-aq-filter select,.st-aq-fassung select{ min-width:0; border:1px solid #d7dde7;
  border-radius:8px; background:#fff; padding:8px; font:12px inherit; color:#1b2230; }
.st-aq-raster{ display:grid; grid-template-columns:minmax(220px,30%) 1fr; gap:12px;
  flex:1 1 auto; height:auto; min-height:0; overflow:hidden; }
.st-aq-quellen,.st-aq-vorschau{ min-height:0; overflow:auto; border:1px solid #e3e8f0;
  border-radius:12px; background:#fff; }
.st-aq-vorschau{ display:flex; flex-direction:column; overflow:hidden; }
.st-aq-schritt{ padding:9px 12px; font-size:10px; font-weight:800; color:#697386;
  text-transform:uppercase; letter-spacing:.04em; border-bottom:1px solid #edf0f5; }
.st-aq-quellen>button{ width:100%; border:0; border-bottom:1px solid #edf0f5;
  background:#fff; padding:11px 12px; display:flex; flex-direction:column; gap:3px;
  text-align:left; cursor:pointer; color:#1b2230; }
.st-aq-quellen>button:hover{ background:#f3f6fc; }
.st-aq-quellen b{ font-size:12px; }.st-aq-quellen small{ font-size:10px; color:#8b93a3; }
.st-aq-vkopf{ flex:0 0 auto; display:flex; align-items:flex-end;
  justify-content:space-between; gap:12px; padding:12px; background:#fff;
  border-bottom:1px solid #e7ebf2; }
.st-aq-vkopf>div{ display:flex; flex-direction:column; gap:2px; }
.st-aq-vkopf b{ font-size:14px; }.st-aq-vkopf small{ font-size:10px; color:#8b93a3; }
.st-aq-wahl{ display:flex; gap:6px; padding:8px 12px; background:#fafbfd; }
.st-aq-wahl button{ padding:6px 9px; font-size:9px; }
.st-aq-zusaetze{ flex:0 0 auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px; padding:8px 12px; border-bottom:1px solid #edf0f5; background:#fbfcff; }
.st-aq-zusatz{ min-width:0; display:grid; grid-template-columns:20px 1fr; gap:7px;
  padding:8px; border:1px solid #dfe6f1; border-radius:9px; background:#fff; cursor:pointer; }
.st-aq-zusatz input{ margin:2px 0 0; }.st-aq-zusatz span{ min-width:0; display:flex;
  flex-direction:column; gap:4px; }.st-aq-zusatz b{ font-size:10px; }
.st-aq-zusatz i{ max-height:56px; overflow:hidden; font-size:9px; line-height:1.3;
  color:#596273; font-style:normal; }.st-aq-zusatz img{ width:100%; height:56px;
  object-fit:contain; background:#f4f6fa; border-radius:6px; }
.st-aq-fragen{ flex:1 1 auto; min-height:0; overflow:auto; padding:6px 12px; }
.st-aq-frage{ display:grid; grid-template-columns:22px 1fr; gap:8px; align-items:start;
  padding:12px 4px; border-bottom:1px solid #edf0f5; cursor:pointer; }
.st-aq-frage:hover{ background:#fafcff; }.st-aq-frage>input{ margin:4px 0 0; width:16px; height:16px; }
.st-aq-frage>span{ min-width:0; font-size:11px; }
.st-aq-frage .frage{ margin:0; box-shadow:none; border:0; padding:0; }
.st-aq-fuss{ flex:0 0 auto; display:flex; align-items:center;
  justify-content:space-between; gap:12px; padding:10px 12px; background:rgba(255,255,255,.96);
  border-top:1px solid #dfe5ef; box-shadow:0 -6px 18px rgba(20,30,50,.06); }
.st-aq-fuss span{ font-size:11px; color:#6f7888; }.st-aq-fuss button{ border:0;
  border-radius:9px; background:#2e5bff; color:#fff; padding:9px 13px; font:800 11px inherit; cursor:pointer; }
.st-af-kurz{ display:flex; flex-direction:column; gap:6px; padding:4px 1px; }
.st-af-kurz b{ font-size:11px; text-transform:capitalize; }.st-af-kurz span{ font-size:10px;
  color:#7b8494; line-height:1.35; display:-webkit-box; -webkit-line-clamp:3;
  -webkit-box-orient:vertical; overflow:hidden; }
.st-af-kurz button{ border:1px solid #b9ccff; background:#eaf1fe; color:#1e3fcc;
  border-radius:8px; padding:8px; font:800 10px inherit; cursor:pointer; }
.st-af-modal{ width:min(760px,calc(100vw - 32px)); }
#st-af-inhalt{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
#st-af-inhalt>.st-ki-box{ grid-row:span 6; }
#st-af-inhalt .ab-ed-feld{ min-width:0; }
#st-af-inhalt textarea,#st-af-inhalt input,#st-af-inhalt select{ font-size:12px; }

/* Auf dem Telefon zwei Karten nebeneinander - eine waere eine lange Rolle,
   drei zu klein zum Treffen. Die Aktionen sind dort IMMER sichtbar: es gibt
   keinen Hover, an dem sie sonst haengen wuerden. */
@media (max-width:640px){
  .bl-regal{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .bl-neu{ width:100%; justify-content:center; }
  .bl-akt{ opacity:1; }
  .bl-quellen{ grid-template-columns:1fr; }
  .st-aq-modal{ overflow:hidden; }.st-aq-raster{ grid-template-columns:1fr;
    grid-template-rows:minmax(90px,28%) minmax(0,1fr); height:auto; }
  .st-aq-quellen{ max-height:none; }.st-aq-vorschau{ max-height:none; }
  .st-aq-tabs{ flex-wrap:wrap; }.st-aq-tabs button:last-child{ margin-left:0; }
  #st-af-inhalt{ grid-template-columns:1fr; }
}
