/* Kodály Staircase — app chrome (the score itself is attribute-styled SVG).
 *
 * V3 design system (docs/mockups/README.md, Runde 3): the ENTIRE color
 * world hangs off this block. Theme presets and the free accent picker
 * (js/theme.js) only ever set --accent / --accent-ink / --chrome /
 * --chrome-ink — every derivation happens here via color-mix. The
 * staircase step colors are deliberately NOT themed (didactic signal). */
/* Design-Leitbild Fassung 3 (30.07.2026): KEIN PAPIER. Bis v0.272 war
   die Wurzel eine warme Papierwelt — --bg #f6f2e8, --line #e4ddcc,
   --chrome #fffdf7, alles mit deutlichem Gelbanteil. Die neuen
   Oberflächen (Räume, Karten) hatten sich längst davon gelöst und
   arbeiteten mit #e9e8e4 und #26241f; sichtbar blieb das Beige vor
   allem in den Overlays, allen voran im Whiteboard.
   Die Werte hier ziehen die Wurzel auf dieselbe neutrale Reihe — damit
   gibt es EINE Linienfarbe für die ganze App statt zweier, die sich um
   ein paar Gelbpunkte unterscheiden. */
/* ⚠️⚠️ **Die `--t-*`-Farbtafel gehört ans :root** (seit v0.512). Sie
   wurde für die Schüler-Shell erfunden und stand deshalb NUR an
   `#ton-shell` und `body.se-on` — 209 Regeln im Blatt greifen aber
   darauf zu, viele davon in den Lehrer-Räumen. Und eine undefinierte
   Variable in einer KURZSCHRIFT macht die ganze Deklaration ungültig:
   aus `border: 1px solid var(--t-line)` wird `border: none`, lautlos.
   Gemessen am 20.08.2026 in den sechs Lehrer-Räumen: von 801 sichtbaren
   Elementen fehlten **62** ein Rahmen, den das Blatt ihnen zuschreibt —
   darunter die 17 Schalter unter „Mein Raum" (lasen sich wie
   Fließtext), die Lektionskarten samt ihren Marken und das Suchfeld des
   Modulraums. Die beiden alten Blöcke bleiben stehen; sie halten
   dieselben Werte und sind seither nur noch Wiederholung, aber
   Schüler-Shell und Editor sind nachgemessen unverändert (0 von 165).
   ⚠️ Wer eine `--t-*`-Variable ergänzt, ergänzt sie HIER. */
:root {
  --t-ink: #26241f;
  --t-muted: #827e76;
  --t-paper: #ffffff;
  --t-panel: #ffffff;
  --t-line: #e9e8e4;
  --t-bar: #f3f2ef;
  --t-barink: #6e6a62;
  --t-bgink: #827e76;
  --t-r: 18px;
  /* Auch am :root (Werte wie #ton-shell/body.se-on): die Erkundung
   * rendert im Lexikon-Popup, und das hängt am <body> — eine
   * undefinierte Variable in einer Kurzschrift macht die ganze
   * Deklaration ungültig (siehe infra.md, v0.512). */
  --t-elev: 0 1px 2px rgba(28, 27, 24, .05), 0 12px 26px -14px rgba(28, 27, 24, .18);
  --bounce: cubic-bezier(.34, 1.4, .5, 1);

  --bg: #f3f2ef;              /* neutrale helle Fläche, kein Papier */
  --panel: #ffffff;
  --ink: #26241f;
  --muted: #6e6a62;
  --line: #e9e8e4;
  --accent: #0b5c8d;          /* preset "Tinte" */
  --accent-ink: #ffffff;      /* text ON accent surfaces */
  --chrome: #ffffff;          /* chrome surface: Menüs, Overlays, Felder (dark in the teen theme) */
  --chrome-ink: #26241f;
  --accent-dark: color-mix(in srgb, var(--accent) 82%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--panel));
  --accent-line: color-mix(in srgb, var(--accent) 38%, var(--line));
  --accent-glow: color-mix(in srgb, var(--accent) 32%, transparent);
  /* ⚠️ Der Rollbalken folgt NICHT dem Akzent (Lars, 02.08.2026: „rosa
     scrollbars? → bitte blau"). Mit einem Kastanien-Konto wurde er im
     ganzen Haus rosa, auch im Schüler-Editor, der sonst blau ist — die
     Kontofarbe der Lehrkraft hat dort nichts zu suchen. */
  --scroll: color-mix(in srgb, #1668b3 42%, var(--line));
  --r: 14px;                  /* the one card radius */
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

/* Die alte Kopfleiste (.topbar) ist seit v0.506 abgerissen (Rückbau
 * Etappe 3). `.group` lebt weiter: die Preset-Gruppe aus dem Depot
 * (index.html) trägt sie, und die Spalte des Lehrer-Editors stylt
 * `.se-secbody .group` darauf auf. */
.group { display: flex; align-items: center; gap: 6px; }

button, select {
  font: inherit;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
button:hover, select:hover { border-color: var(--accent); }
button:disabled { opacity: 0.45; cursor: default; }
button:disabled:hover { border-color: var(--line); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--accent-dark); }
button.mini { padding: 2px 6px; border: none; background: transparent; font-size: 13px; }

label.inline { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
label.inline input { width: 58px; }
input[type="number"], input[type="text"] {
  font: inherit;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
input[type="number"] { width: 64px; }

/* ---------- layout ---------- */
.body-row { display: flex; flex: 1; min-height: 0; }

/* ⚠️ Die alte Optionsspalte `.sidebar` (samt #sb-resize, .applyall,
 * .range-row) ist seit v0.283 aus index.html verschwunden; ihre Regeln
 * sind in v0.503 gefallen, #grid-val mit der alten Kopfleiste in
 * v0.506 (die Raster-Anzeige der Leisten ist #se-rval). */
.hint { color: var(--muted); font-size: 12px; }

.track-list .trk {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  min-width: 0;
  flex-wrap: nowrap;   /* left group stays left, controls stay right */
  overflow: hidden;    /* a narrow sidebar must never paint over the score */
}
.track-list .trk span { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-list .trk > :not(.trk-name) { flex: none; }
.track-list input.trk-name {
  flex: 1 1 40px;      /* the only stretchy element in the row */
  min-width: 24px;
  font-size: 12.5px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
}
.track-list input.trk-name:hover, .track-list input.trk-name:focus { border-color: var(--line); background: #fff; }
.track-list input[type="color"] { width: 26px; height: 20px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; }
.track-list button.solo { padding: 0 4px; color: var(--muted); font-weight: 700; }
.track-list button.solo.on { color: #fff; background: var(--accent); border-radius: 4px; }
.track-list button.accflag.on { background: var(--accent); border-radius: 4px; }
/* voice lock (Vorlagen): ghosted until set; pupils see it but can't toggle */
.track-list button.lockflag { opacity: 0.4; }
.track-list button.lockflag.on { opacity: 1; background: var(--accent); border-radius: 4px; }
body.persona-teen .track-list button.lockflag { pointer-events: none; }
.trk .grip { cursor: grab; color: #a7adb8; user-select: none; flex: none; font-size: 11px; touch-action: none; }
/* Stumm-Knopf: Lautsprecher-Glyphe (Wellen ↔ Strich) wie im Editor-Mockup */
.trk .mute svg { display: block; }
.trk .mute .spk-x { display: none; }
.trk .mute.muted .spk-wave { display: none; }
.trk .mute.muted { opacity: .45; }
.trk-plus {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 2px 0;
  color: var(--muted);
  font-weight: 700;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: none;
}
.trk-plus:hover { color: var(--accent); border-color: var(--accent); }
/* compact toggle chips at the top of the sidebar */
.opt-adv-hidden { display: none !important; }
/* „Nur relevante Optionen zeigen": applyRelevance setzt die Klasse seit
 * jeher — die Regel dazu fehlte, der Schalter blendete nichts aus */
.opt-irrelevant { display: none !important; }

/* ⚠️ Die Kante des Suchfelds steht bei `.se-suchfeld` (ganz unten) und
 * gehört der HÜLLE; das Feld darin trägt `border: 0`. Hier standen bis
 * v0.340 die Reste der gelöschten Optionsspalte — `#opt-search` mit
 * eigener Kante, eigenem Radius und `position: absolute` für den
 * Löschknopf. Per ID-Spezifität gewannen sie gegen `.se-suchfeld input`
 * und malten die ZWEITE Umrandung, die Lars gesehen hat: ein 167 px
 * breites Feld mit Kante in einer 210 px breiten Hülle mit Kante.
 * `.search-wrap`, die zugehörige Hülle, gibt es im DOM gar nicht mehr. */
/* eine Löschtaste genügt — die eingebaute des Browsers bleibt weg */
#opt-search::-webkit-search-cancel-button { display: none; }
.opt-hidden { display: none !important; }
.trk.dragging { opacity: 0.45; }
/* Einfügemarke beim Umsortieren: 2px-Linie an der Kante, an der die
 * gehaltene Stimme landet — inset-Schatten, damit nichts springt */
.trk.drop-above { box-shadow: inset 0 2px 0 0 var(--accent); }
.trk.drop-below { box-shadow: inset 0 -2px 0 0 var(--accent); }
body.lz-on .se-col #track-list .trk.drop-above { box-shadow: inset 0 2px 0 0 #1668b3; }
body.lz-on .se-col #track-list .trk.drop-below { box-shadow: inset 0 -2px 0 0 #1668b3; }
#btn-acconly.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* library section */
.lib-inp {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
}
#lib-code {
  margin: 8px 0;
  padding: 10px;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--accent);
  background: #eef2f8;
  border-radius: 8px;
  user-select: all;
}

#ctx-menu {
  position: absolute;
  z-index: 40;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  padding: 4px;
  background: #fff;
  border: 1px solid #c3c9d4;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(20, 26, 40, 0.25);
}
#ctx-menu button {
  text-align: left;
  padding: 6px 10px;
  border: none;
  background: none;
  font-size: 12.5px;
  border-radius: 5px;
}
#ctx-menu button:hover:not(:disabled) { background: #eef2f8; }
#ctx-menu button:disabled { opacity: 0.4; }
/* zurückgestellt, nicht gesperrt: das Muster passt zu Taktart oder
   Tempo dieses Stücks nicht, lässt sich aber trotzdem wählen */
#ctx-menu button.ctx-dim { opacity: 0.5; font-style: italic; }

/* Band-Block in der Stimmenliste: kein Stimmen-Eintrag (keine Farbe,
   kein Name, keine Reihenfolge), sondern ein eigener kleiner Mischer —
   und zugleich die einzige Stelle, an der man SIEHT, dass sie läuft. */
/* `display: block` braucht die Spezifität der Shell-Regeln
   (`body.se-on .se-col #track-list .trk` setzt flex) — sonst quetscht
   der Schüler-Editor die vier Bandzeilen in eine. */
.trk.band-block,
body.se-on .se-col #track-list .trk.band-block,
body.lz-on .se-col #track-list .trk.band-block {
  display: block; border-top: 2px solid var(--line, #d5d9e0);
  padding-top: 6px; margin-top: 4px; overflow: visible;
}
.band-kopf { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; margin-bottom: 3px; }
.band-kopf button { margin-left: auto; }
.band-zeile { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.band-name { flex: 0 0 74px; font-size: 12px; opacity: 0.85; }
.band-zeile .mix { flex: 1 1 auto; }
.band-falt { width: 100%; margin-top: 5px; font-size: 12px; padding: 4px 0; }

#select-box {
  position: absolute;
  z-index: 25;
  border: 1.5px dashed #0f62d6;
  background: rgba(15, 98, 214, 0.08);
  pointer-events: none;
}
#lyric-input {
  position: absolute;
  z-index: 30;
  width: 90px;
  padding: 3px 6px;
  font-size: 12.5px;
  border: 1.5px solid var(--accent);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(20, 26, 40, 0.25);
}
/* in-place variant: sits directly on the lyric it edits */
#lyric-input.inplace {
  padding: 1px 3px;
  font-family: Verdana, Tahoma, 'DejaVu Sans', sans-serif;
  color: #3f4550;
  border: 1px solid var(--accent);
  border-radius: 3px;
  box-shadow: none;
}
.tab-add {
  flex: none;
  padding: 3px 10px;
  font-weight: 700;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f5f7fa;
  color: var(--muted);
}
.tab-add:hover { color: var(--accent); }
button.mini2 { padding: 2px 8px; font-size: 11.5px; margin-left: 4px; }
.track-list select.clef { padding: 1px 1px; font-size: 11.5px; width: 36px; flex: none; }
.track-list select.instr { padding: 1px 1px; font-size: 11px; width: 64px; flex: 0 1 64px; min-width: 34px; text-overflow: ellipsis; }
/* the mixer slider yields first when the sidebar gets narrow */
.track-list input.mix { width: 74px; flex: 0 1 74px; min-width: 30px; }

/* ---------- tabs ---------- */
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }

/* ---------- edit palette: stamps for repeats, fermata, dynamics ---------- */
#palette {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(30, 40, 60, .18);
}
#palette[hidden] { display: none; }
.pal-grip {
  cursor: grab;
  text-align: center;
  color: #9aa0aa;
  font-size: 13px;
  line-height: 1;
  padding-bottom: 2px;
  user-select: none;
  touch-action: none;
}
.pal-grip:active { cursor: grabbing; }
#palette button {
  width: 30px;
  height: 24px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 5px;
  background: none;
  cursor: pointer;
}
#palette button.pal-dyn { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 700; font-size: 12.5px; }
#palette button:hover { background: #eef2f8; }
#palette button.on { background: var(--accent, #2b6cb0); color: #fff; border-color: var(--accent, #2b6cb0); }
#score-scroll.stamping { cursor: copy; }
@media print { #palette { display: none; } }

/* M4: Tablet (grober Zeiger, > 700 px) — die Stempel-Palette dockt als
 * Werkzeugleiste unten an, Fingergrößen statt Mausgrößen. !important
 * schlägt die Inline-Position eines früheren Maus-Drags am ⠿-Grip. */
@media (pointer: coarse) and (min-width: 701px) {
  body:not(.se-on) #palette {
    position: fixed !important;
    left: 50% !important;
    top: auto !important;
    bottom: 14px;
    transform: translateX(-50%) !important;
    flex-direction: row;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(30, 40, 60, 0.25);
    z-index: 70;
  }
  body:not(.se-on) #palette .pal-grip { display: none; }
  #palette button { width: 48px; height: 44px; font-size: 21px; }
  #palette button.pal-dyn { font-size: 17px; }
  #dur-bar button { min-width: 46px; padding: 8px 10px; font-size: 17px; }

  /* GS-Bühne: Präsentationsmodus mit Fingergrößen — Tablet am Beamer */
  #perform-controls button { min-width: 60px; min-height: 54px; font-size: 24px; }
  #perform-exit { width: 54px; height: 54px; font-size: 22px; }
  #perform-progress { height: 26px; }
}
.tabbar {
  display: flex;
  gap: 4px;
  padding: 6px 10px 0;
  background: #e8ecf2;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  flex: none;
  /* no scrollbar covering the tabs — the mouse wheel scrolls instead */
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar.empty { display: none; }
.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  max-width: 210px;
  white-space: nowrap;
}
.tab span { overflow: hidden; text-overflow: ellipsis; }
.tab.active { background: #fff; color: var(--ink); font-weight: 600; }
.tab button {
  border: none; background: none; padding: 0 3px;
  font-size: 14px; line-height: 1; color: var(--muted); border-radius: 3px;
}
.tab button:hover { color: #b3261e; background: #f0e3e2; }

/* ---------- score area (paper pages) ---------- */
#score-scroll {
  flex: 1;
  overflow: auto;
  padding: 18px;
  /* the desk under the white sheets follows the theme */
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  position: relative;
}

/* ---------- drag editing ----------
 * Notes are grabbable everywhere; labels/lyrics never swallow the pointer
 * (no text cursor, no accidental text selection on syllables). */
#score-area svg text { user-select: none; -webkit-user-select: none; cursor: default; }
#score-area svg text:not([data-uid]):not([data-addvoice]):not([data-clef]):not([data-lyr]):not([data-dyn]):not([data-addbars]):not([data-meta]):not([data-hdr]):not([data-chord]) { pointer-events: none; }
/* Kopfzeilen-Segmente (Tonart, Tempo) sind Eigenschaften des Stücks und
 * werden dort angeklickt — die Kinder brauchen die Zeiger zurück */
#score-area svg [data-hdr] { cursor: pointer; }
#score-area svg [data-hdr] text, #score-area svg [data-hdr] path, #score-area svg [data-hdr] line, #score-area svg [data-hdr] circle { pointer-events: all; }
#score-area svg [data-hdr]:hover text { fill: var(--accent); }
#score-area svg [data-hdr]:hover path, #score-area svg [data-hdr]:hover circle { fill: var(--accent); }
#score-area svg [data-hdr]:hover line { stroke: var(--accent); }
/* placed items are grabbable / lyrics editable while editing */
#score-area.editing [data-rep], #score-area.editing [data-dyn] { cursor: grab; }
/* M4 Touch-Editor: Noten fangen die Geste (kein Scroll-Abbruch), leerer
 * Raum wischt weiter; Griffpunkte an den Blockkanten der Selektion */
#score-area.editing [data-uid] { touch-action: none; }
.note-grip {
  fill: var(--accent, #2b6cb0);
  stroke: #fff;
  stroke-width: 1.2;
  opacity: 0.9;
  cursor: ew-resize;
  touch-action: none;
}
#score-area.editing text[data-lyr] { cursor: text; }
#score-area svg text[data-addbars] { cursor: pointer; }
/* right-button hold: eraser sweep */
#score-scroll.erasing, #score-scroll.erasing * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cg transform='rotate(-45 11 11)'%3E%3Crect x='6' y='3' width='10' height='8' rx='2' fill='%23e07070' stroke='%23555'/%3E%3Crect x='6' y='11' width='10' height='7' rx='2' fill='%23fff' stroke='%23555'/%3E%3C/g%3E%3C/svg%3E") 4 18, not-allowed !important;
}
/* the little + that appears over a repeat end: adds 1./2. brackets */
#volta-plus {
  position: absolute;
  z-index: 25;
  width: 18px;
  height: 18px;
  padding: 0;
  line-height: 1;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--accent, #2b6cb0);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(20, 26, 40, 0.35);
}
#volta-plus:hover { transform: scale(1.15); }

/* ---------- library: pairing QR + phone send sheet ---------- */
#lib-qr { margin: 6px 0; text-align: center; cursor: zoom-in; }
#lib-qr svg { max-width: 150px; height: auto; border: 1px solid var(--line); border-radius: 6px; }
/* projection-sized QR popup: click the small QR to open, click to close */
#qr-pop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
/* ⚠️ So groß wie das Bild es hergibt: ein QR-Code an der Wand ist so gut
   wie seine kleinste Zelle, und 62vh ließen auf einem 16:9-Beamerbild
   ein Drittel der Höhe leer (gemessen: 670 von 1080 px). Der Kasten ist
   deshalb eine Spalte, die den Schirm ausfüllt, und das SVG SCHRUMPFT
   mit (`flex: 0 1 auto` + `min-height: 0`) — sonst schöbe die große
   Codezeile des Klassen-Fensters den Code unten heraus. */
#qr-pop { padding: 2vh 2vw; }
.qr-pop-box { text-align: center; display: flex; flex-direction: column;
  align-items: center; justify-content: center; max-height: 96vh; }
.qr-pop-box svg { width: min(78vh, 84vw); height: auto;
  flex: 0 1 auto; min-height: 0; }
.qr-pop-code {
  font-family: Consolas, monospace;
  font-size: min(11vh, 14vw);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #1a1a2b;
  margin-top: 1vh;
}
/* Was da verteilt wird, im Klartext — die Lehrkraft muss es lesen
   können, BEVOR dreißig Geräte darauf zeigen (Proxy-Konzept,
   „Praktisches"). Der Titel groß, die Adresse klein darunter. */
.qr-pop-titel { font-size: min(4.5vh, 5.5vw); font-weight: 600; color: #1a1a2b;
  margin-top: 1.4vh; max-width: 82vw; overflow-wrap: anywhere; }
.qr-pop-hint { color: #9aa0aa; font-size: min(3vh, 4vw); }
/* library manager */
#lib-mgr {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 26, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
#send-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 26, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ss-box {
  background: #fff;
  border-radius: 12px;
  padding: 18px 18px 14px;
  width: min(440px, 92vw);
  max-height: 86vh;
  overflow: auto;
  box-shadow: 0 8px 30px rgba(10, 14, 24, 0.4);
}
.ss-box h3 { margin: 0 0 6px; font-size: 17px; }
.ss-box h4 { margin: 14px 0 6px; font-size: 13px; color: #5a6170; }
.ss-code {
  font-family: Consolas, monospace;
  background: #eef2f8;
  padding: 2px 10px;
  border-radius: 6px;
  letter-spacing: 2px;
}
.ss-big {
  display: block;
  width: 100%;
  padding: 13px;
  margin: 10px 0 6px;
  font-size: 15.5px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--accent, #2b6cb0);
  color: #fff;
  cursor: pointer;
}
.ss-big.secondary { background: #eef2f8; color: #2a2a33; }
.ss-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin: 4px 0;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.ss-item:hover { background: #eef2f8; }
/* Speichern-Menü (Session B): „neu" hebt sich ab, das verbundene Stück
 * ist markiert — sonst rät man, welche der fünf Fassungen gemeint ist. */
/* Die eigenen Fassungen im Speichern-Dialog des Schüler-Editors
 * (Session B): nichts ausgewählt heißt „neu anlegen" — deshalb sind sie
 * ruhig und nur die gewählte hebt sich ab. */
.se-scmine { margin: 12px 0 0; }
.se-scmine label { display: block; font-size: 13px; color: #6b6b6b; margin-bottom: 5px; }
.se-scminelist { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow-y: auto; }
.se-mine { text-align: left; font: inherit; font-size: 14px; padding: 6px 10px;
  border: 1.5px solid #e2e0da; border-radius: 8px; background: #fff; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-mine:hover { background: #f5f4f0; }
.se-mine.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff);
  font-weight: 600; }
#ss-status { min-height: 18px; margin-top: 4px; }
#ss-status.error { color: #c0392b; }

/* ---------- personas (three-pathways pre-stage, docs/roadmap.md) ----------
 * Pure presentation gating: a body class hides existing chrome.
 * teen (Lernen): no teacher tools — packages, scanning, library
 * administration; joining a class stays. The engine underneath is
 * identical. (Die kids-Rolle „Entdecken" und ihre Kuratierung sind seit
 * v0.503 entfernt — Herleitung im Kopf von persona.js.) */
body.persona-teen #pk-open,
body.persona-teen #lib-scan,
body.persona-teen .lib-teacher,
body.persona-teen #lib-main {
  display: none !important;
}
/* staff-notation input is WIP: pupils edit on the staircase only — the
 * staff stays visible, its noteheads just go inert (Lars 2026-07-14) */
body.persona-teen svg circle[data-uid] {
  pointer-events: none;
}

/* ---------- Lehrgang (curriculum browser) ---------- */
/* all fullscreen popups share one overlay style */
#lg-pop,
#ex-pop,
#pk-pop,
#kat-pub,
#delv-pop {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(20, 26, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lg-box { width: min(600px, 94vw); }

/* ---------- shared catalog (katalog.js) ----------
   ⚠️ Nur noch das VERÖFFENTLICHEN-Fenster: die Stöber-Oberfläche ist mit
   v0.355 ausgebaut, gestöbert wird im Katalog-Ort der Bibliotheksleiste
   (eigene Regeln `.bib-kf*`). `.kat-badge` bleibt — die alte Stückliste
   in `#mm-pop` (library.js) trägt sie. */
.kat-pub-box { width: min(480px, 94vw); max-height: 88vh; overflow-y: auto; }
.kat-chips { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0; }
.kat-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f2f5fa;
  font-size: 11.5px;
  padding: 2px 9px;
  cursor: pointer;
}
.kat-chip:hover { background: #e4ebf5; }
.kat-chip.on { background: #0072B2; border-color: #0072B2; color: #fff; }
.kat-badge {
  font-size: 10.5px;
  background: #eef2f8;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 400;
}
.kat-f { display: block; margin: 8px 0; font-size: 12.5px; }
.kat-f input, .kat-f select { width: 100%; margin-top: 3px; padding: 5px 7px; font-size: 13px; box-sizing: border-box; }
.kat-visrow { display: flex; gap: 14px; }
#kp-declrow { font-size: 12px; line-height: 1.45; margin: 8px 0; }
#lg-stairs { display: flex; align-items: flex-end; gap: 3px; margin: 12px 0 12px; }
.lg-step {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 6px 6px 0 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 3px;
  position: relative;
}
.lg-step .lg-n { font-weight: 700; font-size: 14px; line-height: 1.2; }
.lg-step .lg-tag { font-size: 8.5px; opacity: 0.92; max-width: 100%; overflow: hidden; white-space: nowrap; }
.lg-step:hover { filter: brightness(1.15); }
.lg-step.sel { outline: 3px solid #1a1a2b; outline-offset: 1px; }
/* a step that already has songs gets a small dot at its foot */
.lg-step.has-songs::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
}
.lg-name { color: var(--ink) !important; font-size: 14.5px !important; }
.lg-neu { font-size: 13px; margin: 4px 0 8px; color: #3a3f4a; }
.lg-rel { font-size: 12.5px; margin: 0 0 8px; color: #3a3f4a; background: #eef2f8; border-radius: 6px; padding: 6px 9px; }
.lg-kann { font-size: 13px; background: #ecf7ec; border-radius: 6px; padding: 7px 9px; }
.lg-seq { float: right; font-size: 12px; max-width: 46%; }
.lg-count { font-size: 13px; font-weight: 700; color: #b8860b; margin-left: 8px; vertical-align: middle; }
/* the climbing star (T5 level-up moment) */
#lg-stairs { position: relative; }
.lg-climber {
  position: absolute;
  left: -30px;
  top: 40px;
  font-size: 22px;
  transition: left 0.3s ease, top 0.3s ease-out;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 2px 3px rgba(20, 26, 40, 0.35));
}
.lg-step.lg-pulse { animation: lg-pulse 0.5s ease-in-out 3; }
@keyframes lg-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); filter: brightness(1.3); }
}
.amb { margin: 4px 2px 6px; line-height: 1.6; }
.amb .mini2 { margin-left: 2px; }
.lg-flag { font-size: 11px; color: #5a6170; border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; margin-left: 3px; }
/* the pupil's own path (T3): star = achieved, amber dot = practiced */
.lg-step.lg-done::before {
  content: '⭐';
  position: absolute;
  top: -10px;
  right: -3px;
  font-size: 13px;
}
.lg-step.lg-some::before {
  content: '';
  position: absolute;
  top: -4px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d99a26;
}
.lg-mine {
  font-size: 12.5px;
  margin: 8px 0 0;
  background: #fff7e0;
  border-radius: 6px;
  padding: 6px 9px;
}
.pk-card { line-height: 1.5; }
.pk-meta { font-size: 12.5px; color: #5a6170; margin-bottom: 4px; }
.pk-ueb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.pk-stunde { margin: 5px 0; font-size: 13px; }
.pk-stunde summary { cursor: pointer; font-weight: 600; color: #3a3f4a; }
.pk-stunde ol { margin: 6px 0 4px 20px; padding: 0; }
.pk-stunde li { margin: 3px 0; }
#pk-songs .ss-item { padding: 8px 12px; }

#lg-songs { max-height: 264px; overflow-y: auto; }
#lg-songs .ss-item { padding: 8px 12px; }
.ex-box { width: min(640px, 94vw); position: relative; }
.ex-box h3 { padding-right: 32px; }
/* exercises close ONLY via the ✕ — stray clicks outside must not abort
 * a running round (Lars, Schülersicht 2026-07-14) */
.ex-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: #5a6170;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.ex-x:hover { background: #eef2f8; color: #1a1a2b; }
.ex-piece { font-weight: 400; font-size: 13px; color: #5a6170; }
#ex-status { min-height: 22px; font-size: 14px; margin: 4px 0 8px; }
.ex-foot { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 0; }
.ex-foot .spacer { flex: 1; }
#ex-score { font-size: 13px; color: #3a3f4a; font-weight: 600; }
/* mini strip: the melody as one scrolling line behind a fixed play line
 * (Lars 2026-07-14 — exercises must SHOW the music they play) */
.ex-strip {
  position: relative;
  overflow: hidden;
  margin: 6px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.ex-strip svg { display: block; }
.ex-stripline {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 1px;
  background: #e63946;
  opacity: 0.85;
  pointer-events: none;
}
/* ---------- Tonraum (js/tonraum.js) ----------
   Waagerechte Balken, feste Plätze, Lage = Tonhöhe.
   ⚠️ Seit v0.301 wird ABSOLUT positioniert statt gestapelt: die
   Alteration liegt auf der Naht zwischen zwei Zeilen und überlappt
   beide, das ginge im Fluss nicht. Alle Maße rechnet tonraum.js — hier
   steht nur, wie es aussieht, nicht wo es liegt. Die Zeitachse des
   Diktats liest weiterhin offsetTop und trifft dieselben Plätze. */
.tr { width: 100%; max-width: 1140px; margin: 6px auto 10px; display: flex; gap: 8px; }
/* ⚠️ KEIN Kasten (Lars, 01.08.2026): kein Rahmen, keine Rundung, kein
   eigener Hintergrund — die Balken liegen auf dem Papier, nicht in
   einer Schale. Die Maske lässt sie am Rand ins Nichts laufen, statt
   sie an einer Kante abzuschneiden; sie wirkt auf das Element und ist
   deshalb auf jedem Untergrund richtig. `--tr-mo`/`--tr-mu` setzt
   tonraum.js und nur an der Seite, an der wirklich mehr liegt. */
.tr-view {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
  --tr-mo: 0px; --tr-mu: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0,
    #000 var(--tr-mo), #000 calc(100% - var(--tr-mu)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0,
    #000 var(--tr-mo), #000 calc(100% - var(--tr-mu)), transparent 100%);
}
.tr-view::-webkit-scrollbar { display: none; }
.tr-in { position: relative; }
.tr-slot {
  position: absolute;
  display: flex;
  align-items: center;
  /* ⚠️ ZENTRIERT, nicht rechtsbündig: die Silbe steht mittig zwischen
     dem Ende der Alteration und dem Ende des Balkens, und tonraum.js
     schreibt diese Mitte als linken Innenabstand. Mit `flex-end` läge
     sie stattdessen am Rand (gemessen 92 % statt 86 %). */
  justify-content: center;
  gap: 10px;
  border: none;
  padding: 0 11px;
  font: inherit;
  color: #fff;
  text-align: right;
  transition: filter 0.14s, box-shadow 0.14s;
}
.tr-ton { font-weight: 800; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.13); cursor: pointer; }
button.tr-ton:hover { filter: brightness(1.09); }
button.tr-ton:disabled { cursor: default; }
/* leerer diatonischer Platz: gelernt, hier nur nicht gebraucht */
.tr-dia.tr-leer { border: 1.5px dashed rgba(0, 0, 0, 0.19); background: none; }
/* … und einer, den diese Stufe noch gar nicht kennt: noch blasser.
   Ein Platz, der leer ist, ist nicht dasselbe wie einer, den es nicht gibt. */
.tr-dia.tr-fern { border-style: dotted; border-color: rgba(0, 0, 0, 0.11); }
/* Alteration ohne Ton: unsichtbar. Auf der Naht ist nichts zu
   reservieren — die Zeilen rücken beim Freischalten nicht. */
.tr-chr.tr-leer { background: none; border: none; }
/* ⚠️ … außer dem Strich: eine geschlossene Alteration bleibt als
   schmale Marke auf ihrer Naht stehen, und NUR sie zeigt den Halbton,
   bevor er benannt wird (zwischen mi und fa liegt keine). */
.tr-chr.tr-zu {
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.13) 0 4px, transparent 4px 9px);
  background-size: auto 3px; background-repeat: no-repeat; background-position: center;
  border: none; border-radius: 0;
}
/* Zustände — die Marken liegen INNEN. Außen (outline/ring) überlappten
   sie die Nachbarbalken (Lars, 01.08.2026). */
.tr-anker { box-shadow: inset 0 0 0 3px #e0a020, inset 0 -2px 0 rgba(0, 0, 0, 0.13); }
.tr-lit { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.92), inset 0 0 0 6px rgba(31, 158, 106, 0.85), inset 0 -2px 0 rgba(0, 0, 0, 0.13); }
/* Höraufgabe: die Balken verraten nichts */
.tr-stumm .tr-lbl, .tr-stumm .tr-hz, .tr-stumm .tr-ntw { visibility: hidden; }
.tr-stumm .tr-anker .tr-lbl { visibility: visible; }
/* ⚠️ Silbe, Handzeichen und Notenbild stehen RECHTS: die Alteration
   belegt die linke Seite des Balkens, und die Kopplung in tonraum.js
   hält rechts genau so viel frei, wie hier gerade steht. */
.tr-lbl { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1; }
.tr-syll { display: block; }
.tr-pt { display: flex; gap: 3px; align-items: center; }
.tr-pt i { display: block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.tr-hz { opacity: 0.85; display: flex; }
.tr-hz .hsign { display: block; }
.tr-ntw { display: flex; opacity: 0.9; }
.tr-ntw svg { display: block; }
.tr-breit .tr-slot { padding: 0 13px; }
/* ---- die Leiste: Oktavsprung, Schieber ---- */
.tr-leiste { width: 26px; flex: none; display: none; flex-direction: column; gap: 5px; }
.tr-rollt .tr-leiste { display: flex; }
.tr-okt {
  height: 26px; flex: none; border-radius: 8px; padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12); background: var(--panel, #fff);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; font-size: 11px; font-weight: 900; line-height: 1; color: var(--muted, #827e76);
}
.tr-okt:hover:not(:disabled) { border-color: #1f9e6a; color: #1f9e6a; }
.tr-okt:disabled { opacity: 0.32; cursor: default; }
.tr-okt i { display: block; width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor; }
.tr-okt svg { display: block; width: 13px; height: 13px; }
.tr-spur { flex: 1; position: relative; background: rgba(0, 0, 0, 0.07); border-radius: 999px; }
.tr-greifer {
  position: absolute; left: 2px; right: 2px; border-radius: 999px; min-height: 22px;
  background: rgba(31, 158, 106, 0.55); cursor: grab; touch-action: none;
}
.tr-greifer:hover, .tr-greifer.tr-zieht { background: #1f9e6a; }
.tr-greifer.tr-zieht { cursor: grabbing; }

/* Rhythmus-Knöpfe tragen ab der mittleren Sprosse den NOTENWERT statt
   der Silbe (js/rhythmus.js `wertBild`) — dieselbe Gestalt wie im
   Taktbild, damit Vorrat und Bild nicht auseinanderlaufen. */
.ex-chip .rh-einzel, .ex-slot .rh-einzel { display: block; }
.rh-einzel .rh-gl { fill: currentColor; stroke: none; }
.rh-einzel .rh-kopf { fill: currentColor; }
.rh-einzel .rh-kopf.hohl { fill: none; stroke: currentColor; stroke-width: 1.6; }
.rh-einzel .rh-hals, .rh-einzel .rh-fahne { stroke: currentColor; stroke-width: 1.6; fill: none; }
.rh-einzel .rh-punkt { fill: currentColor; }
.rh-einzel .rh-box { fill: none; stroke: currentColor; stroke-width: 1.3; }
.rh-einzel .rh-silbe { fill: currentColor; font-size: 15px; font-weight: 700; }
/* Der Notenstreifen lässt sich von Hand rollen, wenn nichts spielt. */
.ex-strip { cursor: grab; touch-action: pan-y; }
.ex-strip.ex-strip-zieht { cursor: grabbing; }

.ex-tone {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 7px 7px 0 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding-top: 5px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 1px;
}
.ex-tone .hsign { display: block; flex: none; }
/* hand-sign reading: the row of signs to decode */
.ex-signrow { display: flex; gap: 10px; justify-content: center; margin: 6px 0 10px; flex-wrap: wrap; }
.ex-schip {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  color: #2a2f3a;
  background: #f4f6fa;
  line-height: 0;
}
.ex-schip.done { opacity: 0.25; }
/* Kann-Check series */
.ex-check {
  font-size: 12px;
  font-weight: 700;
  color: #2e7d32;
  background: #e6f4e6;
  border-radius: 8px;
  padding: 2px 8px;
  vertical-align: middle;
}
.ex-star {
  position: absolute;
  bottom: 6vh;
  animation: ex-rise 2.6s ease-out forwards;
  pointer-events: none;
}
@keyframes ex-rise {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-58vh) rotate(40deg); opacity: 0; }
}
.ex-tone:hover { filter: brightness(1.15); }
.ex-tone:disabled { cursor: default; }
.ex-tone.anchor { opacity: 0.75; }
.ex-tone.target { outline: 3px solid #1a1a2b; outline-offset: 1px; }
.ex-dots { display: flex; gap: 7px; justify-content: center; margin: 8px 0; flex-wrap: wrap; }
.ex-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #d7dce6;
  display: inline-block;
}
.ex-dot.hit { background: #2e9e44; }
.ex-dot.miss { background: #d05252; }
/* sing back (T5b): live pitch feedback */
.ex-singlive {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  min-height: 44px;
  color: #2b6cb0;
}
.ex-tone.live { outline: 3px solid #ffd54a; outline-offset: 1px; filter: brightness(1.18); }
.ex-tap {
  display: block;
  width: 100%;
  padding: 34px 10px;
  font-size: 19px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--accent, #2b6cb0);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.ex-measures { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.ex-measure {
  padding: 10px 8px;
  min-width: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f6fa;
  font-size: 13px;
  cursor: pointer;
}
.ex-measure.now { background: #dcebff; border-color: var(--accent, #2b6cb0); }
.ex-measure.picked { background: #ffe9c2; border-color: #d99a26; font-weight: 700; }
.ex-measure.was-wrong { background: #f6d3d3; border-color: #c05050; }
.ex-measure.was-wrong.ok { background: #d1eed6; border-color: #2e9e44; }
.ex-pick { line-height: 1.45; }
.ex-pick:disabled { opacity: 0.55; cursor: default; }
/* Wegwischspiel board: Buno tokens grouped by measure */
.ex-board {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 8px 0 4px;
  font-family: Consolas, monospace;
  font-size: 21px;
  line-height: 1.5;
}
.ex-bar { display: inline-flex; gap: 7px; }
.ex-token {
  min-width: 22px;
  text-align: center;
  border-bottom: 2px solid #b9c2d0;
  padding: 0 2px;
  border-radius: 3px;
}
.ex-token.wiped { color: transparent; }
.ex-token.now { background: #dcebff; }
.ex-token.wiped.now { background: #eef2f8; }
.ex-gaplabel { font-size: 14px; font-weight: 700; color: #3a3f4a; margin: 2px 0 4px; }
.ex-opt { display: block; font-size: 14px; margin: 10px 2px; }
.ex-opt select { margin-left: 6px; }
/* correct/incorrect flash on click targets */
@keyframes ex-okflash { 0% { box-shadow: 0 0 0 4px #2e9e44; } 100% { box-shadow: 0 0 0 0 rgba(46, 158, 68, 0); } }
@keyframes ex-badflash { 0% { box-shadow: 0 0 0 4px #d05252; } 50% { transform: translateX(-3px); } 100% { box-shadow: 0 0 0 0 rgba(208, 82, 82, 0); } }
.ex-ok { animation: ex-okflash 0.5s ease-out; }
.ex-bad { animation: ex-badflash 0.4s ease-out; }

/* level badge on tabs */
.lvl-badge {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--accent, #2b6cb0);
  border-radius: 8px;
  padding: 1px 6px;
  cursor: pointer;
  line-height: 1.4;
}
.lvl-badge:hover { filter: brightness(1.2); }
#score-area svg text[data-clef] { cursor: context-menu; }
#score-area svg text[data-addvoice] { cursor: pointer; }
#score-area svg text[data-addvoice]:hover { fill: var(--accent); }
#score-area [data-uid] { cursor: grab; }
/* selection: dashed blue — distinct from the solid red alteration outline.
 * NUR Treppen-Blöcke (rect): im Notensystem färbt sich allein der Kopf
 * (path.nh weiter unten), Hälse bleiben in Stimmfarbe */
#score-area rect.note-sel {
  stroke: #0f62d6 !important;
  stroke-width: 2.4px !important;
  stroke-dasharray: 5 3 !important;
  cursor: grab;
}
#score-area .note-sel.edge { cursor: ew-resize; }
/* echtes Notenbild: die Auswahl färbt NUR den Notenkopf blau (Lars,
 * v0.215) — Hals und Fähnchen tragen die uid fürs Greifen, bleiben
 * aber in Stimmfarbe; der Punktierungspunkt gehört optisch zum Kopf */
#score-area path.nh.note-sel { fill: #0f62d6 !important; stroke: none !important; }
#score-area line.note-sel { stroke-dasharray: none !important; }
#score-area circle.note-sel { fill: #0f62d6 !important; stroke: none !important; }
/* pages flow side by side */
#score-area {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
  width: max-content;
  min-width: 100%;
  justify-content: safe center;
}
#score-area .page { margin: 0; flex: none; }
#score-area .page svg {
  display: block;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 30, 60, 0.22);
}

.welcome {
  max-width: 560px;
  margin: 60px auto;
  padding: 26px 32px;
  color: var(--ink);
  line-height: 1.55;
}
.welcome-logo { display: block; height: 38px; margin-bottom: 14px; }
.welcome .demo-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.welcome .demo-row button { padding: 5px 12px; }

/* bottom-right view/format switcher (MuseScore-style) */
#app-version {
  flex: none;
  margin-left: 10px;
  font-size: 10.5px;
  color: #9aa0aa;
}
.view-switch {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex: none;
}
/* ---- Seitenformat: EIN Knopf, ein Menü (v0.376) ---- */
.vs-pagewrap { position: relative; display: inline-flex; }
#vs-page { min-width: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
#vs-page svg { display: block; }
.vs-pop {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 80;
  display: flex; flex-direction: column; gap: 2px; padding: 5px;
  min-width: 116px;
  border-radius: 11px; background: color-mix(in srgb, var(--panel, #fff) 96%, transparent);
  border: 1px solid var(--line, #e6e4df); box-shadow: 0 12px 30px -14px rgba(28, 27, 24, .45);
  backdrop-filter: blur(6px);
}
.vs-pop[hidden] { display: none; }
.vs-pop button {
  display: flex; align-items: center; gap: 7px; width: 100%;
  font: inherit; font-size: 12.5px; text-align: left; cursor: pointer;
  border: 0; background: none; border-radius: 8px; padding: 7px 10px; color: inherit;
}
.vs-pop button:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.vs-pop button.on { font-weight: 700; color: var(--accent, #2b6cb0); }
.view-switch select, .view-switch button {
  font-size: 11.5px;
  padding: 2px 5px;
}

/* ---------- status bar ---------- */
.statusbar {
  display: flex;
  align-items: center;
  gap: 14px;
  /* unten der sichere Rand: die Fußzeile ist im Noteneditor das
     unterste Element und läge sonst unter der Gestenleiste */
  padding: 5px 14px calc(5px + var(--sab, 0px));
  font-size: 12.5px;
  color: var(--muted);
  background: var(--panel);
  border-top: 1px solid var(--line);
  min-height: 26px;
  /* ⚠️⚠️ **Der Umbruch ist das SICHERHEITSNETZ, nicht die Lösung.**
   * Ohne ihn konnte die Zeile die ganze SEITE waagerecht überlaufen
   * lassen: im Lehrer-Editor bei 768 px maß das Dokument 885 px und
   * ließ sich 117 px zur Seite schieben (gemessen 20.08.2026). Der
   * Treiber war NICHT die Fußzeile als Ganzes, sondern EIN Kind —
   * `#cfg-view`, der Bildschirm-Zoom, den der Lehrer-Editor aus dem
   * Depot hierher adoptiert: `.view-switch` stand bei 657…885. Alle
   * Kinder außer `#status` sind `flex: none`, es gab also nichts
   * nachzugeben. Wer hier ein Element hinzufügt, prüft
   * `document.documentElement.scrollWidth` gegen `clientWidth` —
   * eine Fußzeile darf nie die Seite verschieben. */
  flex-wrap: wrap;
  row-gap: 4px;
}
.statusbar #status { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statusbar #status.error { color: #b3261e; font-weight: 600; }
.statusbar a { color: var(--muted); text-decoration: none; flex: none; }
.statusbar a:hover { color: var(--accent); text-decoration: underline; }

/* ⚠️ **In den Shells sind die beiden Verweise DOPPELT**: das
 * Marken-Menü führt „Über · Impressum" und „Problem melden" immer mit
 * (lehrer-shell.js `menuHTML` — ausdrücklich auch im Testmodus). Eng
 * wird es dort, wo die Fußzeile um die Breite der Menüspalte
 * eingerückt ist: bei 768 px bleiben der Lehrkraft 386 px für 507 px
 * Inhalt. Ohne die beiden Verweise sind es 288 px, und die Zeile bleibt
 * einzeilig, statt umzubrechen. Am breiten Schirm bleiben sie stehen. */
@media (max-width: 1100px) {
  body.se-on .statusbar #feedback-link,
  body.se-on .statusbar #about-link { display: none; }
}

/* ---------- export dialog ---------- */
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 22px;
  width: 430px;
  max-width: 92vw;
  /* der Browser gibt von sich aus `max-height: calc(100% - 2em - 6px)`;
     hier steht sie ausgeschrieben, damit die haftende Knopfzeile unten
     einen Anker hat, gegen den sie haften kann */
  max-height: calc(100% - 34px);
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(20, 30, 60, 0.25);
}
dialog::backdrop { background: rgba(20, 30, 60, 0.35); }
dialog h3 { margin: 0 0 12px; }
.exp-row { display: flex; align-items: baseline; gap: 14px; margin: 10px 0; }
.exp-row.exp-col { flex-direction: column; align-items: stretch; gap: 4px; }
.exp-row.disabled { opacity: 0.5; }
.exp-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); min-width: 62px; }
.exp-row label { display: inline-flex; align-items: center; gap: 5px; }
.exp-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.exp-voices { max-height: 150px; overflow-y: auto; padding-left: 14px; }
.exp-voices label { display: flex; padding: 2px 0; }
.exp-note { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.exp-folder {
  flex: 1;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ⚠️⚠️ **Die Knopfzeile HAFTET am unteren Rand des Dialogs.** Im
 * Handy-Querformat (844 × 390) ist der Export-Dialog 356 px hoch und
 * sein Inhalt 545 px: „Stapel", „Abbrechen" und „Aktuellen Tab
 * exportieren" lagen bei y = 501…545, also weit unter der Fensterkante
 * (gemessen 20.08.2026). Rollen ging, aber nichts zeigte es an — der
 * Dialog sah aus, als ließe er sich weder bestätigen noch schließen.
 * `position: sticky` löst genau das: der Inhalt rollt SICHTBAR unter der
 * Zeile durch, und Abbrechen ist nie weiter weg als ein Blick.
 * ⚠️ Die negativen Ränder sind Pflicht, keine Zierde: der Dialog
 * polstert mit `18px 22px`, ohne sie bliebe unten ein 18 px hoher
 * Streifen Inhalt unter der haftenden Zeile stehen und links und rechts
 * schiene der gerollte Text an ihr vorbei. */
dialog menu {
  display: flex; gap: 8px; padding: 0;
  position: sticky; bottom: -18px; z-index: 2;
  margin: 14px -22px -18px; padding: 12px 22px 18px;
  background: var(--panel, #fff);
  border-top: 1px solid var(--line, #e6e4df);
}
dialog menu .spacer { flex: 1; }
/* Die Kante trennt nur, wenn darüber wirklich noch etwas liegt; bei
   einem Dialog, der ganz ins Fenster passt, wäre sie ein Strich ohne
   Grund. `scroll-driven` gibt es hier nicht — der Rahmen bleibt, er
   kostet nichts und markiert die Zeile als Handlungsleiste. */

/* ---------- misc new controls ---------- */
input.short { width: 46px; }
input.mix { width: 40px; flex: none; }
button.wide { display: block; width: 100%; margin-top: 8px; }
.hl-swatch {
  display: inline-block;
  width: 13px; height: 13px;
  border-radius: 3px;
  flex: none;
}

/* ---------- fullscreen performance mode ---------- */
#perform-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #0e1016;
  overflow: hidden;
}
#perform-overlay[hidden] { display: none; }
#perform-strip {
  position: absolute;
  top: 12px;
  left: 0;
  transform: translateX(0);
  will-change: transform;
}
#perform-strip svg { display: block; border-radius: 6px; }
#perform-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: #e63946;
  opacity: 0.9;
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.8);
  pointer-events: none;
}
#perform-exit {
  position: absolute;
  top: 14px; right: 16px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 18px;
  border-radius: 8px;
  padding: 6px 12px;
}
#perform-exit:hover { background: rgba(255,255,255,0.28); }
/* ---------- Rückzug während der Wiedergabe (v0.521) ----------
 * Die Bühne setzt das Blatt IMMER auf die volle Fensterhöhe (Entscheid
 * Lars) — also muss die Leiste weichen, nicht das Blatt. `#perform-bar`
 * gibt es nicht: was zurücktritt, sind die Bedienknöpfe und das
 * Schließkreuz. Die Fortschrittsleiste bleibt (s. app.js).
 * ⚠️ `pointer-events: none` gehört DAZU: unsichtbar und trotzdem
 * klickfangend wäre schlimmer als sichtbar — der Griff aufs Blatt (der
 * die Wiedergabe hält und die Leiste zurückholt) ginge sonst an einen
 * Knopf, den niemand sieht. */
#perform-controls, #perform-exit { transition: opacity .45s ease; }
#perform-overlay.pf-ruhe #perform-controls,
#perform-overlay.pf-ruhe #perform-exit { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  #perform-controls, #perform-exit { transition: none; }
}
#perform-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  pointer-events: none;
}
/* ⚠️⚠️ **Mittig heißt nicht: passt.** Die Leiste ist seit jeher
 * `left: 50%` + `translateX(-50%)` — richtig zentriert, aber bei
 * Fingergrößen 602 px breit (Rechnermaß 454). In einem 390er Fenster
 * stand der ABSPIELKNOPF bei −57…−17, also vollständig außerhalb, und
 * rechts fielen Band und Senden ab (gemessen 20.08.2026). Zentrieren
 * verteilt negativen freien Platz nach BEIDEN Seiten — dieselbe Falle
 * wie beim Willkommensfenster in v0.511. `max-width` + Umbruch macht
 * aus einer zu breiten Zeile zwei, die passen.
 * ⚠️ `justify-content: center`, sonst stünde die zweite Zeile links und
 * die Leiste sähe aus wie abgerissen. */
#perform-controls {
  position: absolute;
  bottom: 30px;
  /* ⚠️ **`left: 50%` + `translateX(-50%)` war hier die zweite Falle**:
   * ein absolut gesetzter Kasten bekommt seine Schrumpfbreite aus dem
   * Platz von `left` bis zum rechten Rand — bei `left: 50%` also aus der
   * HALBEN Breite. Mit `max-width` allein fiel die Leiste im 390er
   * Fenster auf 195 px und stapelte sich vierzeilig 182 px hoch.
   * `left: 0; right: 0` + `width: fit-content` + `margin: auto`
   * zentriert genauso, lässt ihr aber die ganze Breite. */
  left: 0; right: 0;
  width: fit-content;
  max-width: calc(100% - 16px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}
#perform-controls button {
  background: rgba(14, 16, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}
#perform-controls button:hover { background: rgba(14, 16, 22, 0.95); }
#perform-controls .loopbtn { font-weight: 700; font-family: Georgia, serif; }
/* transient density-zoom badge — FIXED at the right so its appearance
 * never shifts the control bar (Lars) */
#perform-zoom-val {
  position: fixed;
  right: 18px;
  bottom: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 16, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  z-index: 6;
}
/* ---------- Bühne: Tafel für Koppeln/Senden (v0.324) ----------
   ⚠️ Sie liegt INNERHALB von #perform-overlay — im Vollbild zeigt der
   Browser nur Nachfahren des Vollbild-Elements, ein Popup am <body>
   wäre hier unsichtbar. Groß gesetzt: das ist der BEAMER, der Code muss
   aus der letzten Reihe lesbar sein. */
#perform-screen {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 7;
  min-width: 320px;
  max-width: min(520px, 92vw);
  padding: 26px 30px 24px;
  border-radius: 18px;
  background: rgba(14, 16, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  color: #fff;
  text-align: center;
}
#perform-screen[hidden] { display: none; }
#perform-screen h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; }
#perform-screen-x {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: rgba(255, 255, 255, 0.62);
  font-size: 19px; line-height: 1; cursor: pointer; padding: 4px 7px;
}
#perform-screen-x:hover { color: #fff; }
.pfs-hint { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.74); }
.pfs-row { display: flex; gap: 8px; margin-top: 14px; }
.pfs-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.08);
  color: #fff; font: inherit; font-size: 22px; font-weight: 700;
  letter-spacing: .12em; text-align: center; text-transform: uppercase; outline: none;
}
.pfs-row input:focus { border-color: #fff; }
.pfs-row button {
  padding: 10px 18px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.pfs-row button:hover { background: rgba(255, 255, 255, 0.28); }
.pfs-say { margin: 10px 0 0; font-size: 13.5px; min-height: 1.2em; color: #ffd166; }

.strip-loop {
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: #ffd166;
  opacity: 0.85;
  pointer-events: none;
}
.strip-loop.b { background: #06d6a0; }
#perform-controls button {
  background: rgba(14, 16, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 15px;
  border-radius: 8px;
  padding: 6px 13px;
}
#perform-controls button:hover { background: rgba(14, 16, 22, 0.97); }
#perform-controls #perform-wipe.on { background: #06d6a0; border-color: #06d6a0; color: #0b1220; }
#perform-controls #perform-band { opacity: 0.55; }
#perform-controls #perform-band.on { opacity: 1; background: #06d6a0; border-color: #06d6a0; }
#perform-tempo-box {
  display: inline-flex; align-items: center; gap: 4px;
  color: #fff; font-size: 15px;
  background: rgba(14, 16, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px; padding: 4px 8px;
}
#perform-tempo {
  width: 44px; font: inherit; text-align: center;
  background: transparent; color: #fff;
  border: none; outline: none;
  -moz-appearance: textfield; appearance: textfield;
}
/* graue Browser-Spinner raus — die Bühne bekommt minimalistische WEISSE
 * Pfeile auf dem transparenten/dunklen Grund (Lars) */
#perform-tempo::-webkit-inner-spin-button, #perform-tempo::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#perform-tempo-box .pf-spin { display: inline-flex; flex-direction: column; gap: 0; margin: 0 1px; }
#perform-tempo-box .pf-spin button {
  min-width: 0; width: 16px; height: 12px; padding: 0; border: none;
  background: transparent; color: rgba(255, 255, 255, 0.85);
  font-size: 7px; line-height: 12px; cursor: pointer;
}
#perform-tempo-box .pf-spin button:hover { color: #fff; background: rgba(255, 255, 255, 0.14); border-radius: 4px; }
#perform-tempo-box button { min-width: 0; padding: 2px 7px; border: none; }
/* Wegwischspiel: Noten lösen sich sanft auf (Loop-Wiederholung) */
.pf-wiped { opacity: 0 !important; transition: opacity 0.7s ease; }
/* das globale Marken-Menü rechts oben in der TAB-Leiste des Editors —
 * gleiche Stelle wie in den Raum-Kopfzeilen. Fixed, weil renderTabs()
 * die Leiste bei jedem Tab-Wechsel leert. */
/* ⚠️ `right: 14px` wie die Polsterung von `.lz-kopf` — mit 8 px stand
   die Marke im Editor 6 px weiter rechts als in allen anderen Räumen
   und sprang beim Raumwechsel (Lars, 02.08.2026; nachgemessen). */
#se-globalmenu { position: fixed; top: var(--sat, 0px); right: 14px; height: 40px; z-index: 61; display: flex; align-items: center; }
/* ---- Handy: die Reiter stapeln sich hinter einem Zähler (v0.377) ----
   Beide Elemente sind FEST positioniert und leben am Body — `#tab-bar`
   wird bei jedem Wechsel geleert, ein Kind darin überlebte das nicht.
   Sichtbar nur im Handy-Block weiter unten. */
#tab-mini, #tab-pop { display: none; }
/* ⚠️⚠️ **`[hidden]` wirkt nur über die BROWSER-Vorgabe `display: none`** —
   jede Autoren-Regel mit `display` schlägt sie. Der Handy-Block unten
   setzt `#tab-pop { display: flex }`, und damit war die Liste IMMER zu
   sehen: `pop.hidden = true` setzte die Eigenschaft, am Bild änderte sich
   nichts. Sie ließ sich nicht schließen und stand in jedem Raum (Lars,
   03.08.2026). ⚠️ Und der Prüfstand sah es nicht, weil er `!pop.hidden`
   abfragte statt der SICHTBARKEIT. Wer ein Element per Attribut versteckt
   und anderswo sein `display` setzt, braucht diese Zeile. */
#tab-pop[hidden] { display: none !important; }
#tab-pop {
  position: fixed; z-index: 80; flex-direction: column; gap: 2px; padding: 5px;
  min-width: 210px; max-width: min(340px, calc(100vw - 24px)); max-height: 62vh; overflow-y: auto;
  border-radius: 12px; background: color-mix(in srgb, var(--panel, #fff) 96%, transparent);
  border: 1px solid var(--line, #e6e4df); box-shadow: 0 14px 34px -14px rgba(28, 27, 24, .45);
  backdrop-filter: blur(6px);
}
.tp-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.tp-row:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.tp-row.on { background: color-mix(in srgb, var(--accent, #2b6cb0) 13%, transparent); font-weight: 700; }
.tp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.tp-x { flex: none; border: 0; background: none; font-size: 17px; line-height: 1; cursor: pointer; color: inherit; opacity: .55; padding: 2px 4px; }
.tp-x:hover { opacity: 1; }
.tp-leer { padding: 10px; font-size: 13px; opacity: .65; }
.tp-new { width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 13px;
  cursor: pointer; padding: 8px 10px; border-radius: 8px; color: var(--accent, #2b6cb0); }
.tp-new:hover { background: color-mix(in srgb, var(--accent, #2b6cb0) 10%, transparent); }
/* Knopf und Symbol in Originalgröße — wie in den Raum-Kopfzeilen */
/* die Tabs laufen nicht unters Menü */
:is(body.lz-on, body.persona-free).se-on #tab-bar { padding-right: 56px; }
/* Eintrag „Tastenkürzel" im ☰-Menü der Spalte */
.se-mmact { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: #26241f; cursor: pointer; text-align: left; }
.se-mmact:hover { border-color: #1668b3; color: #1668b3; }

/* Tastenkürzel-Popup */
#hk-pop {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 18, 12, .28);
  font-family: system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
}
#hk-pop .hk-box {
  background: #fff; border: 1px solid #e9e8e4; border-radius: 16px;
  padding: 16px 18px; width: min(420px, 92vw); max-height: 84vh; overflow-y: auto;
  box-shadow: 0 22px 60px -18px rgba(28, 27, 24, .4);
}
#hk-pop header { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
#hk-pop .hk-x { border: 0; background: none; font-size: 15px; color: #827e76; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
#hk-pop .hk-x:hover { background: rgba(28, 27, 24, .06); }
#hk-pop .hint { color: #a29c92; font-size: 12px; margin: 6px 0 12px; }
#hk-pop .hk-grp h4 { margin: 12px 0 5px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: #a29c92; }
#hk-pop .hk-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  border: 1.5px solid transparent; background: none; border-radius: 9px;
  padding: 6px 8px; font: inherit; font-size: 13px; color: #26241f; cursor: pointer; text-align: left;
}
#hk-pop .hk-row:hover { background: #f6f5f2; }
#hk-pop .hk-row.cap { border-color: #1668b3; background: color-mix(in srgb, #1668b3 7%, #fff); }
#hk-pop kbd {
  min-width: 34px; text-align: center; font: inherit; font-size: 12px; font-weight: 700;
  border: 1.5px solid #e9e8e4; border-bottom-width: 3px; border-radius: 7px;
  padding: 2px 7px; background: #fcfbf8; color: #6c675f;
}
#hk-pop .hk-row.cap kbd { border-color: #1668b3; color: #1668b3; }
#hk-pop menu { display: flex; justify-content: flex-end; margin: 14px 0 0; padding: 0; }
#hk-pop .hk-reset { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 10px; padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: #6c675f; }
#hk-pop .hk-reset:hover { border-color: #1668b3; color: #1668b3; }

/* Taktart-Dialog: Zähler-Feld + Nenner-Auswahl (2/4/8/16) */
#tempo-pop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(20,22,28,.35); }
#tempo-pop .tsp-box { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 260px; box-shadow: 0 12px 40px rgba(0,0,0,.22); }
#tempo-pop .tsp-row { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
#tempo-pop .tsp-row select { flex: 1; }
#tempo-pop .tsp-row input { width: 80px; }
#tempo-pop .tsp-slash { font-size: 17px; color: var(--t-muted); }
#tempo-pop .hint { font-size: 12px; color: var(--t-muted); margin: 6px 0 0; }
#tempo-pop menu { display: flex; gap: 8px; justify-content: flex-end; margin: 14px 0 0; padding: 0; }
/* Geschwindigkeit: eine VIERTELNOTE aus Bravura, Prozentzeichen
 * dahinter — „♩ 100 %" wie eine Tempoangabe im Notensatz. Bis v0.340
 * stand hier ▶, also dasselbe Zeichen wie der Play-Knopf daneben
 * (Lars, 02.08.2026). Gefüllt wird von `KS.spdIcons` (app.js); die
 * Höhe steht HIER, weil die drei Orte verschieden eng sind. */
.spd-ico, .se-num .se-spd { display: inline-flex; align-items: center; opacity: .72; }
.spd-ico svg { display: block; height: 15px; width: auto; }
.se-num .se-spd svg { display: block; height: 21px; width: auto; }
.se-num .se-pct { font-size: 12px; opacity: .7; }
.spd-pct { font-size: 11px; opacity: .7; margin-left: 1px; }

#tsig-pop {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 18, 12, 0.25);
}
#tsig-pop .tsp-box {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; min-width: 230px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}
#tsig-pop .tsp-row {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 4px; font-size: 22px;
}
#tsig-pop .tsp-row input { width: 64px; font-size: 18px; text-align: center; }
#tsig-pop .tsp-row select { font-size: 18px; }
#tsig-pop .tsp-slash { color: var(--muted); font-size: 24px; }
#tsig-pop menu { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 0; padding: 0; }

/* Zahlenfeld-Spinner: schlanke schwarze ▲▼ auf transparentem Grund
 * statt der grauen Browser-Pfeile (Bühne hat die weiße Variante) */
input.no-native-spin { -moz-appearance: textfield; appearance: textfield; }
input.no-native-spin::-webkit-inner-spin-button,
input.no-native-spin::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.num-spin { display: inline-flex; flex-direction: column; vertical-align: middle; margin-left: 1px; }
.num-spin button {
  border: none; background: transparent; padding: 0;
  width: 14px; height: 10px; min-width: 0;
  /* ⚠️ `min-height: 0` ist Pflicht: die Handy-Regel unten setzt
   * `button, select { min-height: 40px }` für Fingerziele, und
   * min-height schlägt height. Die beiden ▲▼ wurden dadurch 80 px
   * hoch und standen über und unter dem abgerundeten Viereck des
   * Tempofelds (36 px) — genau der Befund von Lars, 02.08.2026.
   * Sichtbar erst unter 700 px, deshalb sah es nach Umbruch aus. */
  min-height: 0;
  font-size: 6.5px; line-height: 10px; color: var(--ink, #26241f);
  opacity: 0.55; cursor: pointer;
}
/* Auf dem Handy dürfen sie größer sein — aber INNERHALB des Feldes:
 * zwei mal 15 px passen in die 36 px hohe Kapsel. */
@media (max-width: 700px) {
  .num-spin button { height: 15px; line-height: 15px; font-size: 8px; }
}
.num-spin button:hover { opacity: 1; background: rgba(0, 0, 0, 0.07); border-radius: 3px; }

#perform-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22px;
  background: rgba(255,255,255,0.10);
  cursor: pointer;
}
#perform-fill {
  height: 100%;
  width: 0;
  background: rgba(230, 57, 70, 0.75);
  pointer-events: none;
}
.loop-mark {
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: #ffd166;
  pointer-events: none;
}
.loop-mark.b { background: #06d6a0; }

/* ---------- print fallback ---------- */
@media print {
  .statusbar, .tabbar { display: none !important; }
  body { background: #fff; display: block; }
  .body-row, .main-col { display: block; }
  #score-scroll { overflow: visible; padding: 0; background: #fff; }
  #score-area .page { margin: 0; page-break-after: always; }
  #score-area .page svg { box-shadow: none; width: 100% !important; height: auto !important; }
}

/* ================================================================
   V3 skin (Runde 3, docs/mockups/): osu at daylight — full-fill
   accents with a soft glow, ONE radius, slanted accent cuts, bold
   section typography, themed scrollbars. Everything reads the
   :root variables, so presets/custom colors re-skin the whole app.
   ================================================================ */

/* themed scrollbars (webkit + firefox) */
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--scroll);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb:hover { background: #1668b3; }


/* capsules for everything you press, cards for everything that holds */
button, select { border-radius: 999px; transition: border-color 0.12s, box-shadow 0.12s, background 0.12s; }
input[type="number"], input[type="text"], input[type="search"], input[type="url"], input[type="password"] { border-radius: 10px; }
button.primary {
  color: var(--accent-ink);
  box-shadow: 0 2px 10px var(--accent-glow);
  font-weight: 700;
}
button.primary:hover { box-shadow: 0 3px 14px var(--accent-glow); }
.ss-big { border-radius: 999px; }

/* accent surfaces speak with --accent-ink (custom colors stay readable) */
.track-list button.solo.on, .track-list button.accflag.on, .track-list button.lockflag.on,
.kat-chip.on { color: var(--accent-ink); background: var(--accent); }

/* overlays: the one radius + a touch more air */
.ss-box { border-radius: var(--r); }

/* pills that pop on hover */
.chip, .kat-chip { transition: background 0.12s, color 0.12s, border-color 0.12s; }
.kat-chip:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* status line sits on the paper, not on a hairline */
#status { border-top: none; }

/* Der Themen-Wähler (theme-pop) ist mit der alten Kopfleiste gefallen
 * (v0.506) — Themen setzt nur noch KS.theme.set, gespeicherte Wahlen
 * (ks-theme) gelten weiter. */

/* ---------- first-visit landing + free edition (persona.js) ---------- */
#landing-pop {
  position: fixed;
  inset: 0;
  z-index: 120;
  /* opaque: the app must never shimmer through behind the landing */
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  display: flex;
  justify-content: center;
  /* ⚠️⚠️ **Mittig zentrieren, ohne oben abzuschneiden.** `align-items:
   * center` verteilt auch NEGATIVEN Freiraum: ist der Kasten höher als
   * das Fenster, ragt er oben UND unten gleich weit hinaus — und der
   * obere Teil ist nicht erreichbar, weil man nicht vor den Anfang
   * rollen kann. Gemessen am 20.08.2026 bei 844 × 390 (Handy quer):
   * Kasten 433 px hoch, oben 21 px und unten 21 px abgeschnitten, in
   * der Anmeldemaske 32/32 — der Schriftzug oben und „← Zurück" unten
   * waagerecht halbiert, genau Lars' Befund. `margin: auto` am Kind
   * zentriert genauso, wird bei zu wenig Platz aber zu 0: der Kasten
   * steht dann oben an und der Rest ist errollbar. */
  overflow-y: auto;
  padding: 16px;
}
/* landing gate (index.html head script): hide the app until the landing
 * decision is made — no flash of the program on first paint */
html.landing-gate body > *:not(#landing-pop) { visibility: hidden; }
/* Das Boot-Tor (html.boot-gate, v0.339–v0.505) ist mit der alten
   Kopfleiste gefallen: im statischen HTML steht keine Chrome mehr,
   die aufblitzen koennte. */
.ld-hint { color: var(--muted); font-size: 12.5px; margin: 6px 0; min-height: 16px; }
.ld-input {
  width: 100%;
  padding: 11px 12px;
  margin: 6px 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font: inherit;
  text-align: center;
}
.ld-input.ld-code {
  font-family: Consolas, monospace;
  font-size: 20px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.ld-back {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  margin-top: 10px;
  cursor: pointer;
}
.ld-back:hover { color: var(--accent); }
.ld-dl { display: inline-block; margin-top: 12px; color: var(--muted); font-size: 12.5px; text-decoration: none; border-bottom: 1px dotted var(--line); }
.ld-dl:hover { color: var(--accent); border-bottom-color: var(--accent); }
/* the Lehrerzimmer door is teacher chrome */
body.persona-teen #btn-lz,
body.persona-free #btn-lz { display: none !important; }
.landing-box {
  margin: auto;
  width: min(430px, 92vw);
  background: var(--panel);
  border-radius: var(--r);
  box-shadow: 0 18px 60px rgba(30, 24, 10, 0.25);
  padding: 26px 26px 20px;
  text-align: center;
}
.landing-logo { height: 44px; margin-bottom: 4px; }
.landing-tag { color: var(--muted); font-size: 13px; margin: 4px 0 16px; }
.landing-card {
  display: block;
  width: 100%;
  text-align: left;
  margin: 8px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.landing-card b { display: block; font-size: 15px; margin-bottom: 2px; }
.landing-card span { color: var(--muted); font-size: 12.5px; }
.landing-card:hover { border-color: var(--accent); box-shadow: 0 3px 14px var(--accent-glow); }
.landing-card.ghost { background: var(--accent-soft); }
/* ⚠️ `.landing-card` ist LINKSBÜNDIG, und zu Recht: die drei Türen
   tragen Überschrift UND Erklärung, da wäre Mittelachse falsch. Die
   beiden HANDLUNGEN unter einem Eingabefeld („Beitreten", „Link
   schicken") sind aber einzeilig und stehen zwischen lauter zentrierten
   Dingen — das Wort klebte links, während Feld, Hinweis und Zurück
   mittig standen (Lars, 05.08.2026). */
.landing-card.ld-tat { text-align: center; }
.landing-card.ld-tat b { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 0; }

/* free edition: core only — no sync, no sessions, no teacher chrome,
 * no persona switching (the landing is the only way out) */
body.persona-free #sec-library,
body.persona-free .grp-presets,
body.persona-free #pk-open { display: none !important; }
#free-hint {
  display: none;
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  box-shadow: 0 3px 14px var(--accent-glow);
}
body.persona-free #free-hint { display: block; }

/* progress matrix: cells are clickable for manual teacher entries */

/* ---------- Meine Musik (bibliothek-konzept.md) ---------- */
#mm-pop {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(20, 26, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
#mm-pop[hidden] { display: none; }
.mm-box { width: min(640px, 94vw); max-height: 88vh; overflow-y: auto; }
.mm-box h3 { display: flex; align-items: center; gap: 8px; }
.mm-tabs { display: flex; gap: 6px; margin: 6px 0 12px; padding: 0; }
.mm-tab {
  flex: 1;
  padding: 7px 10px;
  font-weight: 700;
  border-radius: 999px;
}
.mm-tab.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mm-panel .wide { margin: 4px 0; }
/* free plan: connected premium chrome disappears (beta: everyone premium) */
body.plan-free #mm-open, body.plan-free #lib-scan { display: none !important; }

/* ---------- E1: duration tool bar ---------- */
#dur-bar {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 5px 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  border-bottom: 1px solid var(--line);
}
#dur-bar[hidden] { display: none; }
#dur-bar button {
  min-width: 38px;
  padding: 3px 9px;
  font-size: 15px;
  line-height: 1.3;
}
#dur-bar button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dur-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }

/* Substimmen-Wahl (1, 2, …): schmale Ziffern-Chips, gewählte gefüllt */
.sub-pick { display: inline-flex; gap: 3px; }
#dur-bar .sub-pick button { min-width: 26px; padding: 3px 6px; font-size: 13px; font-weight: 700; }

/* ---------- M1: touch foundation (docs/mobile-app.md) ---------- */
@media (max-width: 700px) {
  /* M4: kein Notensatz auf Smartphone-Größe (Lars, 2026-07-16) —
   * Palette und Dauer-Leiste verschwinden komplett */
  #palette, #dur-bar { display: none !important; }

  /* ⚠️ Die Fußzeile war der Grund, warum die Seite auf Handybreite
   * WAAGERECHT überlief — gemessen, nicht vermutet: fünf Kinder ohne
   * Schrumpfrecht in einer `nowrap`-Zeile ergaben 502 px in 390.
   * Ausgeblendet fiel die Schüler-Persona von 484 auf 390 px.
   * ⚠️ Die beiden Verweise sind KEIN Verlust: „Problem melden" und
   * „Über · Impressum" stehen im Marken-Menü beider Shells. Die
   * Ansichts-Wahl bleibt — sie hat dort keinen zweiten Ort.
   * ⚠️ **Schrumpfen war die falsche Abhilfe** (v0.356): der KASTEN gab
   * nach, seine Kinder nicht — gemessen fielen die beiden Auswahlfelder
   * auf 12 px (unbedienbar) und der Knopf stand trotzdem bei 421 in
   * einem 390er Fenster. `flex-wrap` war damals verworfen, weil die
   * Fußzeile sonst zweizeilig über dem DOCK stünde; das Dock ist seit
   * v0.366 fort, und im Hochformat ist die Höhe der billigere Platz. */
  .statusbar #feedback-link, .statusbar #about-link { display: none; }
  /* ⚠️⚠️ **Die eigentliche Ursache saß woanders**, und sie ist dieselbe
   * Fehlerart wie 2026-08-02: `body.se-on .statusbar` rückt die Fußzeile
   * um die BREITE DER SEITENSPALTE ein (`--se-col`, Vorgabe 280 + 16).
   * Auf einem 390er Schirm blieben davon 94 px für alles — die beiden
   * Auswahlfelder fielen auf 12 px (unbedienbar) und der Knopf stand bei
   * 421. Auf dem Handy gibt es diese Spalte nicht, also auch den Einzug
   * nicht. Wer hier etwas misst: der Kasten, der ÜBERSTEHT, ist selten
   * der, der es verursacht. */
  /* ⚠️ Der Umbruch stand bis v0.512 HIER und gilt seit v0.513 für jede
     Breite — er ist das Sicherheitsnetz gegen eine Fußzeile, die die
     Seite verschiebt (Begründung an der Grundregel `.statusbar`). Bis
     v0.366 war `flex-wrap` verworfen, weil die Fußzeile zweizeilig über
     dem DOCK stünde — das ist fort, und im Hochformat ist Höhe der
     billigere Platz. */

  /* ⚠️ Der Willkommensbildschirm rechnete in 560 px und lief damit im
   * Notenbereich seitlich weg — die SEITE lief dadurch nicht über
   * (`#score-scroll` rollt), aber wer die App zum ersten Mal auf dem
   * Handy öffnet, bekam den Text angeschnitten und musste wischen.
   * ⚠️ Die Grenze muss vom FENSTER kommen, nicht vom Elter: `#score-area`
   * ist ein Flex-Container ohne eigene Breite, `max-width: 100%` löst
   * sich dort zirkulär auf — gemessen wuchs der Text damit auf eine
   * einzige Zeile von 1874 px, also viermal schlimmer als vorher. */
  .welcome { max-width: min(560px, calc(100vw - 32px)); margin: 24px auto; padding: 20px 16px; }

  /* touch targets + room for the dock */
  button, select { min-height: 40px; }
  .mini { min-height: 32px; }
  #score-scroll { padding: 8px; padding-bottom: 84px; }
  #dur-bar { overflow-x: auto; }
  #free-hint { bottom: 72px; }
}

/* M1 slice 2: the big overlays become bottom sheets on phones
 * ⚠️⚠️ **Die Landing gehört NICHT dazu** (Lars, 20.08.2026): ein
 * Blattschieber ist die richtige Form für eine Überlagerung, die etwas
 * FREILÄSST — man sieht, worüber sie liegt, und wischt sie fort. Hinter
 * der Landing liegt aber nichts: `html.landing-gate` verbirgt die ganze
 * App, bis die Rolle entschieden ist. Sie war die erste Begegnung mit
 * dem Programm und begann bei 396 von 844 px, also **auf 47 % der
 * Höhe** — oben ein halber leerer Schirm, unten „Auf Tablet oder Handy
 * installieren" ohne einen Punkt Abstand an der Kante (gemessen bei
 * 390 × 844). Sie ist eine SEITE und steht mittig wie am Rechner. */
@media (max-width: 700px) {
  #lg-pop, #ex-pop, #pk-pop, #kat-pub, #mm-pop {
    align-items: flex-end;
  }
  #lg-pop .ss-box, #ex-pop .ss-box, #pk-pop .ss-box,
  #kat-pub .ss-box, #mm-pop .ss-box {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: var(--r) var(--r) 0 0;
    animation: sheet-up 0.22s ease;
  }
  @keyframes sheet-up {
    from { transform: translateY(48px); opacity: 0.6; }
    to { transform: none; opacity: 1; }
  }
}

/* Schüler-Logins: Name · Code · Teilen (v0.420).
   ⚠️ Die Zeilenordnung von `.trk` hängt an `.track-list` und greift in
   diesem Fenster nicht — die Zeilen waren `display: block`, Name und
   Code klebten ohne Lücke aneinander und lasen sich wie ein
   abgeschnittener Name. Der Name bekommt den Platz (`flex: 1`) und
   kürzt erst, wenn er ihn wirklich überschreitet; der volle steht dann
   im `title`. */
#pl-list .pl-row { display: flex; align-items: center; gap: 10px; padding: 5px 2px; border-bottom: 1px solid #ececec; }
#pl-list .pl-row:last-of-type { border-bottom: none; }
.pl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-code { flex: none; font-family: Consolas, monospace; letter-spacing: 1px; }
#pl-list .pl-row .mini { flex: none; }
#pl-list .mini2 { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
/* Tondiktat + Melodienquiz (exercise.js) */
.ex-quizrow { display: flex; gap: 8px; align-items: center; margin: 10px 0; }

/* ---------- Kurs "Satz & Komposition" (kurs.js, Phase A/S1) ---------- */
#kurs-pop {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(20, 26, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kurs-box { width: min(560px, 94vw); }
.kurs-mod { margin: 8px 0; }
.kurs-mod summary { cursor: pointer; font-size: 14.5px; padding: 6px 0; }
.kurs-klst { margin-left: 8px; font-weight: 400; }
.kurs-werk { border-color: var(--accent); }
/* MIDI-Klavier: Live-Treppe (midi.js, Musikpraxis S1) */
#midi-panel {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 60;
  width: min(320px, calc(100vw - 28px));
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(10, 14, 24, 0.35);
  padding: 0 12px 10px;
}
#midi-panel header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 30px 8px 2px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
#midi-panel header .ex-x { top: 8px; right: -4px; }
.mi-live {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  font-size: 38px;
  font-weight: 700;
  color: var(--accent);
}
.mi-live .chrom { color: #c2542e; }
.ex-singlive.ex-wrong { color: #c2542e; }

/* Begleiten (Musikpraxis S3): Akkordkarten + Akkord-Knöpfe */
.ex-chordcards { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 64px; }
.ex-chordcard { display: flex; align-items: baseline; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 10px; }
.ex-chordcard b { font-size: 34px; color: var(--accent); }
.ex-chordcard span { font-size: 13px; color: #5a6170; }
.ex-chordcard.next { opacity: 0.65; }
.ex-chordcard.next b { font-size: 20px; }
.ex-chordcard.next i { font-size: 12px; color: #5a6170; font-style: normal; }
.ex-chordbtns { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.ex-chordbtns .ex-tone { height: 64px; min-width: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ex-chordbtns .ex-tone b { font-size: 20px; }
.ex-chordbtns .ex-tone span { font-size: 11.5px; opacity: 0.9; }
.mi-stairs { display: flex; align-items: flex-end; gap: 3px; min-height: 100px; }
.mi-stairs .ex-tone { font-size: 13px; }
.mi-stairs .ex-tone.live { outline: 3px solid var(--ink, #1a1a2b); outline-offset: 1px; }
.mi-sound { display: block; margin: 8px 0 2px; font-size: 12.5px; color: #5a6170; }
/* Übungsraum (#48): Abschluss-Zusammenfassung */
.ex-raumsum { text-align: center; padding: 8px 0 4px; }
.ex-raumsum h4 { margin: 4px 0 10px; font-size: 16px; }
.ex-raumsum p { margin: 3px 0; font-size: 14px; }
.ex-raumsum .hint { margin-top: 12px; }

/* Whiteboard S1 (js/whiteboard.js): Vollbild, Papier 1280x800 */
#wb-pop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--bg, #f3f2ef);
  display: flex;
  flex-direction: column;
}
/* ⚠️⚠️ **Die Kopfzeile bricht um, sonst ist das Board nicht zu
 * VERLASSEN.** Sie war `display: flex` ohne Umbruch und ohne Rollfeld:
 * im 390er Fenster maß sie 711 px, und was darüber hinausging, war
 * lautlos abgeschnitten — gemessen 20.08.2026 sieben Bedienelemente,
 * darunter „Neue Seite", „Stück anhängen", „PDF einfügen", „Freigeben",
 * „Meine Boards", „Im Konto speichern" UND das ✕ (`wb-close`, bei
 * x = 683…711). Ein Kind, das ein Board öffnet, kam auf dem Handy nicht
 * mehr heraus. Höhe ist hier der billige Platz: das Papier hat ein
 * festes Seitenverhältnis und ist bei 390 px Breite nur 231 px hoch —
 * in einer 785 px hohen Bühne. */
#wb-pop header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  row-gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
#wb-pop header .spacer { flex: 1; }
/* Seite vor/zurück bleibt beim Umbruch beisammen (s. whiteboard.js) */
.wb-nav { display: inline-flex; align-items: center; gap: 6px; flex: none; }
#wb-pop header .ex-x { position: static; }
/* ⚠️ Das Titelfeld gibt NACH, bevor die Zeile umbricht — 180 px fest
   waren fast die halbe Handybreite. */
#wb-title { flex: 1 1 150px; width: auto; min-width: 90px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel, #fff); color: inherit; }
/* ⚠️ **Fingergrößen** (Regel aus v0.511: das ZIEL ist nicht das BILD).
   Am Whiteboard sind die `.mini2` die HAUPTHANDLUNGEN der Lehrkraft
   (Seite vor/zurück, neue Seite, Stück, PDF, Freigeben, Liste,
   Speichern) — sie brauchen deshalb auch ihre 40 px BREITE und die
   größere Polsterung, nicht nur die Höhe. Die HÖHE kommt seit v0.521
   von der Hausregel (`button.mini2` am groben Zeiger über 700 px, s.
   Fingerziele weiter unten); diese Regel hier bleibt, weil sie mehr
   gibt als die Hausregel. Das Zeichen darin bleibt 15 px. */
@media (pointer: coarse) {
  #wb-pop header button.mini2 { min-width: 40px; min-height: 34px; padding: 4px 10px; }
  #wb-pop header .ex-x { min-width: 40px; min-height: 34px; }
}
/* ⚠️ Der Platz unten ist für die schwebende Palette reserviert und
   folgt ihrer GEMESSENEN Höhe (`--wb-toolsh`, ein ResizeObserver in
   whiteboard.js — dieselbe Bauart wie `--se-barh` im Editor, v0.513).
   Fest eingetragene 74 px stimmten, solange die Palette einzeilig war;
   auf dem Handy stapelt sie sich jetzt drei Zeilen hoch. */
#wb-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 10px 10px calc(24px + var(--wb-toolsh, 50px)); }
#wb-paper {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1280 / 800;
  width: min(100%, calc((100vh - 170px) * 1.6));
}
#wb-svg {
  width: 100%;
  height: 100%;
  display: block;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(20, 24, 38, 0.22);
  touch-action: none;
}
#wb-texts { position: absolute; inset: 0; pointer-events: none; }
/* Diagramme auf dem Board (W0, docs/whiteboard-diagramme.md §4): das
   eingebettete Bild schluckt keine Klicks — der Stift malt darüber wie
   über die Unterlage (Landkarten-Regel für dekoratives SVG). Der
   Auswahl-Zustand von W2 hebt das gezielt am Rahmen auf. */
#wb-svg .wb-diag { pointer-events: none; }
/* W2: NUR im Diagramm-Werkzeug fängt das Bild Klicks — dort sind
   Kästen und Rahmen die Bedienung; jedes andere Werkzeug malt weiter
   darüber. */
#wb-stage.wb-diagmodus .wb-diag { pointer-events: auto; }
.wb-drahmen { position: absolute; border: 1.5px dashed var(--accent, #2b6cb0);
  border-radius: 6px; pointer-events: none; }
.wb-dknopf { position: absolute; pointer-events: auto; width: 26px; height: 26px;
  padding: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line, #d5d0c8); border-radius: 50%;
  background: var(--card, #fff); color: inherit; cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 24, 38, 0.18); }
.wb-dweg { top: -13px; right: -13px; }
.wb-dstift { top: -13px; right: 20px; }
.wb-dplus { bottom: -13px; left: 50%; transform: translateX(-50%); }
/* W3: Ausgabewege links oben, Stufen-Vergabe daneben */
.wb-dkopie { top: -13px; left: -13px; }
.wb-dfolie { top: -13px; left: 20px; }
.wb-dstufen { top: -13px; left: 53px; }
.wb-dknopf.on { border-color: var(--accent, #2b6cb0);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #2b6cb0) 30%, transparent); }
.wb-dbadge { position: absolute; transform: translate(-45%, -45%);
  min-width: 20px; height: 20px; padding: 0 4px; display: flex;
  align-items: center; justify-content: center; border-radius: 999px;
  border: 1px solid var(--line, #d5d0c8); background: var(--card, #fff);
  font-size: 12px; font-weight: 700; color: var(--muted, #6b6560);
  pointer-events: none; }
.wb-dbadge.an { background: var(--accent, #2b6cb0);
  border-color: var(--accent, #2b6cb0); color: #fff; }
.wb-dgriff { position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 34px; border-radius: 7px; pointer-events: auto;
  border: 1px solid var(--line, #d5d0c8); background: var(--card, #fff);
  cursor: ew-resize; box-shadow: 0 2px 8px rgba(20, 24, 38, 0.18); }
#wb-dfeld { position: absolute; z-index: 6; width: min(340px, 60%);
  background: var(--card, #fff); border: 1px solid var(--line, #d5d0c8);
  border-radius: 10px; padding: 8px;
  box-shadow: 0 10px 30px rgba(20, 24, 38, 0.25); }
#wb-dfeld textarea { width: 100%; min-height: 120px; resize: vertical;
  font: 13px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  border: 1px solid var(--line, #d5d0c8); border-radius: 8px;
  padding: 6px 8px; background: var(--card, #fff); color: inherit; }
#wb-dfeld .hint { margin: 4px 0 6px; font-size: 0.72rem; }
#wb-dtitel { position: absolute; z-index: 6; background: var(--card, #fff);
  border: 1.5px solid var(--accent, #2b6cb0); border-radius: 4px;
  padding: 0.25em 0.35em; text-align: center; outline: none;
  overflow: hidden; line-height: 1.3; }
#wb-dtitel:empty::before { content: attr(data-ph); color: #9aa0aa; }
/* ---------- Textblatt (P5): Fluss statt Fläche ----------
   Zwei Spalten — der Text und, was jemand dazu zu sagen hat. Auf
   schmalen Geräten untereinander, damit der Text nicht zur Schlucht
   wird. */
.wb-fluss { flex: 1 1 auto; overflow: auto; display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem; gap: 1rem; padding: 1.2rem; }
@media (max-width: 780px) { .wb-fluss { grid-template-columns: 1fr; } }
.wb-ftext { grid-column: 1 / -1; width: 100%; min-height: 60vh; resize: vertical;
  font: 15px/1.65 ui-monospace, "SF Mono", Menlo, monospace;
  border: 1px solid var(--line, #e2ddd6); border-radius: 10px; padding: 1rem;
  background: var(--card, #fff); color: inherit; }
.wb-flesen { max-width: 42rem; font: 16px/1.7 Georgia, "Iowan Old Style", serif; }
.wb-fb { position: relative; border-radius: 8px; padding: .1rem .5rem; margin: 0 -.5rem;
  cursor: pointer; }
.wb-fb:hover { background: color-mix(in srgb, currentColor 6%, transparent); }
.wb-fb.an { background: color-mix(in srgb, #f0c040 35%, transparent); }
.wb-fb p { margin: .55rem 0; }
.wb-fmark { position: absolute; right: -1.9rem; top: .35rem; border: 0; background: none;
  font-size: .85rem; cursor: pointer; }
.wb-fkomm h4 { font-size: .85rem; margin: 0 0 .5rem; }
.wb-fk { border: 1px solid var(--line, #e2ddd6); border-radius: 10px; padding: .5rem .6rem;
  margin-bottom: .5rem; font-size: .85rem; cursor: pointer; }
.wb-fk .wo { color: var(--muted, #6b6560); font-size: .78rem; }
.wb-fk .was { margin: .2rem 0 .35rem; }
.wb-fk.ok { opacity: .5; }
.wb-fk.waise { border-style: dashed; }
.wb-text {
  pointer-events: auto;
  position: absolute;
  min-width: 40px;
  max-width: 46%;
  padding: 2px 8px 2px 20px;
  font-size: 2.4cqw;
  line-height: 1.35;
  border: 1.5px dashed transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  outline: none;
}
.wb-text:focus-within { border-color: var(--accent, #2b6cb0); background: #fff; }
.wb-text.b { font-weight: 700; }
.wb-text.i { font-style: italic; }
.wb-tbody { outline: none; display: inline-block; min-width: 30px; }
.wb-tbody:empty::before { content: attr(data-ph); color: #9aa0aa; }
.wb-tgrip { position: absolute; left: 2px; top: 2px; font-size: 60%; color: #9aa0aa; cursor: grab; }
#wb-textbar {
  position: absolute;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 4px;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(20, 24, 38, 0.2);
  z-index: 3;
}
#wb-textbar button { min-width: 30px; height: 28px; border: 1px solid transparent; border-radius: 5px; background: none; cursor: pointer; }
#wb-textbar button.on { background: var(--accent, #2b6cb0); color: #fff; }
/* ⚠️⚠️ **Dieselbe Falle wie bei der Bühnenleiste (v0.513):** `left: 50%`
 * + `translateX(-50%)` zentriert richtig, aber ein absolut gesetzter
 * Kasten schrumpft auf den Platz von `left` bis zum rechten Rand — also
 * auf die HALBE Breite; und ohne Umbruch schrumpft er gar nicht, sondern
 * ragt nach BEIDEN Seiten hinaus. Gemessen 20.08.2026 bei 390 px: die
 * Palette stand bei −185…575, war also 760 px breit — links fehlten
 * Stift, Marker und drei Farben, rechts Diagramm, Radierer, Laser und
 * Rückgängig. Neun von sechzehn Werkzeugen unerreichbar.
 * Der Weg ist `left: 0; right: 0` + `width: fit-content` + `margin: auto`
 * + `flex-wrap` + `justify-content: center`.
 * ⚠️ Hier wird GESTAPELT, nicht gerollt — anders als bei der
 * Editor-Leiste auf dem Handy: dort ist Höhe teuer (das Notenblatt füllt
 * den Schirm), hier ist sie billig (das Papier ist bei 390 px nur 231 px
 * hoch). Und eine Palette, in der man den Radierer erst herbeiwischen
 * muss, ist keine Palette. */
#wb-tools {
  position: fixed;
  left: 0; right: 0;
  bottom: 12px;
  width: fit-content;
  max-width: calc(100% - 16px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(30, 40, 60, 0.25);
  z-index: 96;
}
#wb-tools button {
  width: 44px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  font-size: 19px;
  cursor: pointer;
}
#wb-tools button.on { border-color: var(--accent, #2b6cb0); background: color-mix(in srgb, var(--accent, #2b6cb0) 12%, transparent); }
#wb-tools .wb-color { border-radius: 999px; width: 30px; height: 30px; align-self: center; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
#wb-tools .wb-color.on { box-shadow: 0 0 0 2.5px var(--accent, #2b6cb0); }
#wb-list {
  position: absolute;
  top: 54px;
  right: 14px;
  width: min(340px, calc(100vw - 28px));
  max-height: 70vh;
  overflow-y: auto;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(10, 14, 24, 0.3);
  padding: 10px 12px;
  z-index: 97;
}
.wb-item { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.wb-item .ss-item { flex: 1; }
/* Cowork C1: Live-Runden-Panel (links unten, wie das MIDI-Panel) */
#cw-panel {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 61;
  width: min(340px, calc(100vw - 28px));
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(10, 14, 24, 0.35);
  padding: 0 12px 10px;
}
#cw-panel header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 30px 8px 2px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
#cw-panel header .ex-x { top: 8px; right: -4px; }
#cw-panel select { max-width: 170px; }
#cw-panel .cw-h { margin: 10px 0 4px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
#cw-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.cw-chip { color: #fff; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; }
#cw-replay input[type="range"] { width: 100%; margin: 6px 0; }
#cw-sheets { max-height: 200px; overflow-y: auto; }
.cw-item { display: flex; gap: 4px; align-items: center; margin: 3px 0; }
.cw-item .ss-item { flex: 1; min-width: 0; }
body.persona-free #live-open { display: none !important; }

/* Whiteboard: Lehrkraft voll; teen sieht Klassen-Freigaben (read-only) */
body.persona-free #wb-open-btn { display: none !important; }
#wb-list label { display: block; margin: 6px 0; }
#wb-list select { max-width: 100%; }
#wb-slink { width: 100%; box-sizing: border-box; margin: 4px 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }

/* Lexikon: Redaktion + Sichtung (wiki-konzept.md W2) */
.lx-editbtn { float: right; }
.lx-etext {
  width: 100%;
  box-sizing: border-box;
  min-height: 220px;
  font: 13.5px/1.5 ui-monospace, monospace;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel, #fff);
  color: inherit;
  resize: vertical;
}
.lx-sicht { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.lx-sicht h5 { margin: 2px 0 6px; font-size: 14px; }
.lx-sicht .lx-old { opacity: 0.6; max-height: 130px; overflow-y: auto; }
.lx-sicht .lx-new { border-left: 3px solid var(--accent, #2b6cb0); padding-left: 10px; }
#lx-sicht-btn { display: block; margin: 0 0 10px; }
/* Lexikon: Stufen-Regler „einfacher ⟷ genauer" (wiki-konzept.md W1) */
.lx-bands { display: flex; gap: 6px; margin: 2px 0 10px; }
.lx-band {
  border: 1px solid var(--line);
  background: none;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  color: inherit;
}
.lx-band.on { background: var(--accent, #2b6cb0); border-color: var(--accent, #2b6cb0); color: #fff; }
.lx-band:disabled { opacity: 0.4; cursor: default; }
/* Sachanalyse: derselbe Platz, aber abgesetzt — keine Lesestufe */
.lx-bandsep { width: 1px; align-self: stretch; margin: 1px 4px; background: var(--t-line, #e9e8e4); }
.lx-band.lx-bandsach { font-style: italic; }
/* Der Didaktikreiter steht NEBEN der Sachanalyse und sieht aus wie sie
   — beide sind Lehrkraftfassungen und keine Lesestufe. Er ist bewusst
   nicht eigens hervorgehoben: er ist der seltenere Fall (9 von 105
   Artikeln), nicht der wichtigere. */
.lx-band.lx-banddid { font-style: italic; }
/* Die Klappe des Didaktikabschnitts (§5.0). Die Kurzfassung steht offen,
   der Langtext klappt auf — 998–1505 gegen 6059–12 427 Zeichen. Ein
   Artikel ohne Kurzfassung hat keine Klappe; dort steht der Langtext
   unmittelbar da. */
.wk-didaktik-kurz { margin-bottom: 4px; }
.wk-didaktik-kurz ul { margin: 0 0 2px; padding-left: 1.15em; }
.wk-didaktik-mehr > summary {
  cursor: pointer; font-size: 12.5px; color: var(--accent);
  padding: 5px 0; list-style-position: inside;
}
.wk-didaktik-mehr[open] > summary { margin-bottom: 2px; }
/* Die Gliederungsebene im Fließtext (Befund 8.2). Bewusst zurückhaltend:
   sie gliedert einen Abschnitt, sie eröffnet keinen Artikel. */
.wk-h { font-size: 13.5px; margin: 14px 0 4px; letter-spacing: .01em; }
/* Die Marke in der gefilterten Liste: zu welchem Grundschulartikel steht
   schon eine Methode? Ohne sie wären es 51 gleich aussehende Zeilen. */
.lx-didmark { font-style: normal; font-size: 10.5px; letter-spacing: .03em;
  padding: 1px 6px; border-radius: 999px; vertical-align: 2px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
/* Der Filter der Übersicht: ein Schalter, kein Knopf — deshalb trägt er
   im eingeschalteten Zustand die Akzentfläche und `aria-pressed`. */
.lx-gsfilter { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.lx-gsfilter.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }

/* Video-Sync (js/videosync.js): Panel rechts unten, 16:9-Rahmen */
#vs-panel {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  width: min(430px, calc(100vw - 28px));
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(10, 14, 24, 0.35);
  padding: 0 12px 10px;
}
#vs-panel header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 30px 8px 2px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
#vs-panel header .ex-x { top: 8px; right: -4px; }
.vs-frame { position: relative; padding-top: 56.25%; margin: 10px 0 6px; background: #000; border-radius: 8px; overflow: hidden; }
.vs-frame > div, .vs-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.vs-linkbox { text-align: center; padding: 12px 6px 6px; }
.vs-linkbox .vs-linkicon { font-size: 30px; margin-bottom: 2px; }
.vs-linkbox h4 { margin: 4px 0 6px; font-size: 15px; }
.vs-linkbox .hint { margin: 0 0 12px; }
.vs-linkbox label { display: block; text-align: left; font-size: 13px; font-weight: 600; }
.vs-linkbox input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0 10px;
  padding: 9px 11px;
  font-size: 14px;
  border: 1.5px solid var(--accent, #2b6cb0);
  border-radius: 8px;
  background: var(--panel, #fff);
  color: inherit;
}
.vs-linkbox .ss-big { width: 100%; }
.vs-err { color: #d05252; font-size: 13px; margin: 0 0 8px; text-align: left; }
.vs-consent { padding: 14px 6px 6px; text-align: center; }
.vs-consent p { font-size: 13px; color: #5a6170; margin: 0 0 10px; }
.vs-row { display: flex; gap: 8px; align-items: center; margin: 8px 0 2px; padding: 0; }
.vs-row input { flex: 1; min-width: 0; }
.vs-tap { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.vs-tap .ss-big { flex: 1; }

#mi-status .linkish {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* Musiktheorie-Lexikon (lexikon.js, #44) */
#lx-pop {
  position: fixed;
  inset: 0;
  z-index: 96;   /* über kurs-pop und Kurskarte: 📖 aus dem Hinweis heraus */
  background: rgba(20, 26, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lx-box { width: min(560px, 94vw); position: relative; }
#lx-body { max-height: 58vh; overflow-y: auto; }
.lx-h { margin: 10px 0 6px; font-size: 16px; }
.lx-text { font-size: 13.5px; line-height: 1.5; }
.lx-text p { margin: 8px 0; }
.lx-text ul, .lx-text ol { margin: 6px 0 6px 18px; padding: 0; }
.lx-link { color: var(--accent); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
/* Verweis auf einen Artikel, den es (noch) nicht gibt: sichtbar, aber
   nicht klickbar — ein Link, der nichts tut, ist schlimmer als keiner */
.lx-link.lx-off { color: var(--t-muted); cursor: default; text-decoration-style: dotted; }
/* Sachanalyse (Kontrakt §5): Lehrkraftfassung, zugeklappt */
.lx-sach, .wk-sach { margin: 10px 0 0; border-top: 1px solid var(--t-line); padding-top: 8px; }
.lx-sach > summary, .wk-sach > summary { cursor: pointer; font-size: 12.5px; color: var(--t-muted); }
.wk-sach-text { font-size: 13px; line-height: 1.55; }
/* Diagramm-Platzhalter (Kontrakt §6). Gezeichnet wird später; die
   Bildunterschrift steht schon, weil sie Inhalt ist. */
.wk-diag { margin: 12px 0; padding: 0; }
/* RAHMENLOS seit v0.533 (Entscheid Lars, zwei A/B-Ansichten): weder
 * Notensatz noch die gezeichneten Typen bekommen einen Kasten — wie im
 * Buchdruck steht die Abbildung frei im Text, die Bildunterschrift
 * begrenzt sie nach unten. `overflow-x` bleibt als Netz: was wider
 * Erwarten doch nicht paßt, scrollt, statt über die Seite zu ragen. */
.wk-diag .wk-diag-bild:not(:empty) {
  overflow-x: auto; text-align: center;
}
.wk-diag .wkd { display: inline-block; vertical-align: top; }
/* Solange kein Renderer da ist, bleibt der Kasten leer — dann soll er
   auch als Leerstelle zu sehen sein und nicht als lose Kursivzeile.
   ⚠️ OHNE Polster, wie der gefüllte Zustand: `renderAll` misst den
   INNENRAUM des noch LEEREN Kastens (v0.531) — hätte der leere ein
   Polster, bekäme die Engine weniger Platz gemeldet, als nach dem
   Füllen da ist. Der gestrichelte Rahmen bleibt (er ist das ganze
   Signal) und kostet die Messung 2 px — bewußt zu knapp statt zu
   weit. */
.wk-diag .wk-diag-bild:empty {
  display: block; min-height: 40px; border: 1px dashed var(--t-line);
  border-radius: 8px; opacity: 0.6;
}
.wk-diag > figcaption {
  font-size: 12px; color: var(--t-muted); margin-top: 4px; font-style: italic;
}
/* ---- typ: "bild" (Werkbank-Befund 2.20, seit v0.393) ----
   Stufe 2 ist das Bild selbst, Stufe 1 der gerahmte PLATZ dafür. Der
   gestrichelte Rahmen sagt „hier fehlt noch etwas, und das ist so
   gewollt" — dieselbe Sprache wie beim Stückbedarf; die Lehrkraft legt
   das Bild ein, das zu ihrer Klasse passt.
   ⚠️ Auf dem Materialblatt wird GEDRUCKT: der Platz braucht eine echte
   Mindesthöhe, sonst klebt man auf eine Linie. */
/* ---------- Facetten: dasselbe Bild mehrfach, ein Feld verändert ----
   Untereinander und LINKSBÜNDIG — nur so liegen gleich lange
   Ausschnitte auf derselben x-Achse (Bauplan §6.4). Gestreckt wird
   nicht: ein kürzerer Ausschnitt soll kürzer aussehen. */
.wkd-facetten { display: flex; flex-direction: column; gap: 14px; }
.wkd-facette { display: block; }
.wkd-facette-titel {
  font-size: 11.5px; font-weight: 600; opacity: 0.72; margin-bottom: 3px;
}

/* ---------- Gestufte Diagramme -------------------------------------
   Die Stufen selbst setzt js/wiki-layout.js als Inline-Stil; hier steht
   nur, dass die Fläche anfaßbar aussieht — und was beim DRUCKEN gilt.
   ⚠️ Auf Papier gibt es keine Stufen (Bauplan §8.3): dort steht alles
   da, sonst druckt jemand ein halbes Diagramm, ohne es zu merken. */
.wkd-stufen { outline: none; }
.wkd-stufen:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media print {
  .wkd-stufen [data-schritt] { display: unset !important; opacity: 1 !important; }
}

.wk-diag-img, .mt-diag-bild .wk-diag-img {
  max-width: 100%; height: auto; display: block; border-radius: 6px;
}
.wk-diag-img.wk-diag-halb { max-width: min(100%, 340px); }
/* Bildnachweis — im Wiki unter der Bildunterschrift, klein und ruhig:
 * er ist Pflichtangabe, nicht Aussage des Bildes. */
.wk-diag-nw { display: block; font-size: 11px; opacity: 0.7; margin-top: 2px; }
.wk-diag-bedarf {
  min-height: 96px; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 14px 16px; border-radius: 8px;
  border: 1.5px dashed var(--line); color: var(--t-muted);
  font-size: 12.5px; font-style: italic;
}
@media print {
  .wk-diag-bedarf { min-height: 130px; border-color: #999; color: #555; }
}
/* U1: Beanstandungen des Diagramm-Kontrakts — Bauart des Bedarfsplatzes,
 * aber unübersehbar als Fehler gefärbt, auch auf Papier: ein Blatt mit
 * kaputtem Diagramm soll nicht erst im Unterricht auffallen. */
.wk-diag-fehler, .wk-diag-fehler.wk-diag-bedarf {
  border-color: #b3261e; color: #b3261e; font-style: normal;
}
@media print {
  .wk-diag-fehler.wk-diag-bedarf { border-color: #b3261e; color: #b3261e; }
}
/* Abspielknopf am Notenbeispiel (Wiki-Kontrakt §6.5) */
.wk-diag-play {
  border: 0; background: none; color: var(--accent); cursor: pointer;
  font-size: 13px; line-height: 1; padding: 0 6px 0 0; font-style: normal;
}
.wk-diag-play:hover { opacity: 0.7; }
.wk-diag-play:focus-visible { outline: 2px solid var(--accent); border-radius: 3px; }
/* „Groß ansehen" steht in der Bildunterschrift, hinter dem Text — der
   Abspielknopf davor. Beide sind Zubehör des Bildes, nicht der Seite. */
.wk-diag-gross {
  border: 0; background: none; color: var(--accent); cursor: pointer;
  font-size: 12px; line-height: 1; padding: 2px 0 2px 8px; font-style: normal;
  min-height: 0;
}
.wk-diag-gross:hover { opacity: 0.7; }
.wk-diag-gross:focus-visible { outline: 2px solid var(--accent); border-radius: 3px; }
@media (pointer: coarse) { .wk-diag-gross { padding: 6px 0 6px 10px; } }

/* Die zweite Ansicht: dasselbe Diagramm, für den ganzen Schirm neu
   gezeichnet. Der Kasten geht bis an die sicheren Ränder; das Bild rollt
   darin, wenn „Originalgröße" gewählt ist. */
.wkd-gross {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0; background: var(--t-panel, #fff);
  color: var(--t-ink, #1a1a2b);
  display: flex; flex-direction: column;
}
.wkd-gross::backdrop { background: rgba(20, 18, 26, .55); }
.wkd-g-kopf {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: calc(8px + var(--sat, 0px)) 14px 8px;
  border-bottom: 1px solid var(--t-line, #e6e4df);
}
.wkd-g-titel {
  flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 800;
  color: var(--t-muted, #7a7a7a);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* ⚠️ Der Umschalter bekommt 40 px statt der 34 px der Hausregel
   (v0.521): er steht in der Kopfzeile der zweiten Ansicht, in einer
   Reihe mit dem 40er Schließkreuz daneben. */
.wkd-g-mass { flex: none; }
@media (pointer: coarse) { .wkd-g-mass { min-height: 40px; padding: 6px 12px; } }
.wkd-g-x {
  flex: none; width: 34px; height: 34px; min-height: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--t-line, #e6e4df); border-radius: 9px;
  background: var(--t-panel, #fff); color: var(--t-ink, #1a1a2b); cursor: pointer;
}
@media (pointer: coarse) { .wkd-g-x { width: 40px; height: 40px; } }
.wkd-g-feld {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  padding: 10px 12px calc(10px + var(--sab, 0px));
  display: flex; align-items: center; justify-content: center;
}
/* Rollt es, darf es nicht mehr mittig hängen — sonst ist der Anfang
   nicht erreichbar (dieselbe Falle wie bei der Landing, infra.md). */
.wkd-g-feld.wkd-g-original { display: block; }
.wkd-g-feld .wkd { max-width: 100%; height: auto; }
.wkd-g-feld.wkd-g-original .wkd { max-width: none; }
.wkd-g-hinweis {
  flex: none; padding: 6px 14px calc(8px + var(--sab, 0px));
  font-size: 12px; color: var(--t-muted, #7a7a7a);
  border-top: 1px solid var(--t-line, #e6e4df);
}
.lx-back { margin: 2px 0 4px; }

/* Modul-0-Wizard: Rhythmus legen → Töne klicken → Kleid anziehen */
#wiz-pop {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(20, 26, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wiz-box { width: min(620px, 94vw); position: relative; }
.wiz-len { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.wiz-blocks { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.wiz-block {
  min-width: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 22px;
  line-height: 1.1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.wiz-block span { font-size: 11.5px; color: #5a6170; }
.wiz-block:hover:not(:disabled) { border-color: var(--accent); }
.wiz-block:disabled { opacity: 0.35; cursor: default; }
.wiz-del { justify-content: center; font-size: 18px; }
.wiz-rail {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  min-height: 46px;
  margin: 10px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg, #fafbfd);
}
.wiz-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.wiz-slot.rest { opacity: 0.55; cursor: default; }
.wiz-slot.set { background: var(--accent); color: var(--accent-ink, #fff); border-color: var(--accent); }
.wiz-slot.cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.wiz-bar { width: 2px; height: 34px; background: var(--line); margin: 0 3px; }
.wiz-tones { display: flex; align-items: flex-end; gap: 4px; margin: 8px 0; min-height: 112px; }
.wiz-vorrat { display: block; margin: 4px 0; font-size: 12.5px; color: #5a6170; }
.wiz-tempo { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
#wz-hint { min-height: 18px; }

/* the course card: floats beside the score, guides the lesson */
#kurs-karte {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 88;   /* über der Schüler-Shell (80), unter Bibliothek (90) und Lexikon (96) */
  width: min(340px, calc(100vw - 28px));
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(10, 14, 24, 0.35);
}
#kurs-karte header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 40px 8px 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
#kurs-karte header .ex-x { top: 8px; right: 8px; }
#kurs-karte .kk-body { padding: 4px 14px; overflow-y: auto; font-size: 13.5px; line-height: 1.45; }
#kurs-karte .kk-body p { margin: 8px 0; }
#kurs-karte .kk-body ul, #kurs-karte .kk-body ol { margin: 6px 0 6px 18px; padding: 0; }
#kurs-karte footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--line);
}
#kurs-karte footer .spacer { flex: 1; }
.kk-ab { display: flex; gap: 8px; margin: 10px 0; }
.kk-check { margin: 10px 0 6px; }
.kk-hint {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  font-size: 12.5px;
  background: var(--bg, #fafbfd);
}
.kk-hint.info { border-left-color: #1f9e6a; }

/* ⚠️ Hier standen bis v0.503 zwei Friedhöfe: „manageable sections" und
 * „floating sections" (js/sections.js — die verschiebbaren Abschnitte
 * der alten Optionsspalte, Datei seit v0.283 gelöscht). Übrig ist nur
 * das Lösch-Bestätigungsfenster: */
.delv-box { width: min(420px, 92vw); }

/* ---------- Schüler-Shell (js/schueler-shell.js) ----------
 * EIN Design für alle Schüler:innen (Lars 2026-07-19: WEISS statt
 * Beige — Untergrund weiß/neutral, Akzente ausschließlich aus den
 * Logo-Farben; Anpassungen/Modi auf später verschoben — MVP).
 * Farb-Grammatik:
 * Rosa=Werkstatt · Grün=Übungen+Live · Bernstein=Klavierpraxis ·
 * Blau=System. Inhalte (Stück-Kacheln) und Reihe 3 bleiben neutral. */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/Nunito.woff2') format('woff2');
}
#ton-shell {
  /* Logo-Farben, feste Rollen */
  --rosa: #c65089;
  --gruen: #1f9e6a;
  --bernstein: #e0a020;
  --blau: #1668b3;
  /* helle Welt (Kacheln sind IMMER helles Papier — auch im Dunkelmodus) */
  --t-ink: #26241f;
  --t-muted: #827e76;
  --t-paper: #ffffff;
  --t-panel: #ffffff;
  --t-line: #e9e8e4;
  --t-bar: #f3f2ef;
  --t-bartop: color-mix(in srgb, var(--t-bar) 55%, #fff);
  --t-barink: #6e6a62;
  --t-bgink: #827e76;          /* Text direkt auf dem Hintergrund */
  --t-hov: rgba(255, 255, 255, .62);
  --t-r: 18px;
  --t-elev: 0 1px 2px rgba(28, 27, 24, .05), 0 12px 26px -14px rgba(28, 27, 24, .18);
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  color: var(--t-ink);
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  overflow-y: auto;
  /* ⚠️ Hier lagen zwei radiale Verläufe — Bernstein bei 82 % über dem
     oberen Rand, Rosa unten links. Genau das hat Lars gesehen und als
     „das rechte obere Viertel ist immer etwas vergilbter" gemeldet
     (02.08.2026), und genau das sollte weg. Eine Warnung dazu: die erste
     Messung sprach ihn frei, weil sie `backgroundColor` abfragte — ein
     `background-image` steht dort nicht drin. Gesehen hat es erst der
     Screenshot. */
  background: var(--t-paper);
}
/* Browser-Modell: bei Stück-/Bereichs-Tab bleibt NUR die Leiste stehen */
#ton-shell.bar { bottom: auto; overflow: visible; }
#ton-shell.bar .ton-body { display: none; }
body.ton-bar { padding-top: 50px; }
body.ton-has #tab-bar { display: none; }
body.ton-on { overflow: hidden; }
body.ton-on #free-hint, body.ton-bar #free-hint { display: none; }
#ton-shell [hidden] { display: none !important; }
/* :where() hält den Reset auf Element-Spezifität — Klassen gewinnen */
:where(#ton-shell) button { border: none; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: inherit; border-radius: 0; cursor: pointer; }
@keyframes tonPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .28; transform: scale(.72); } }

/* ---- Tab-Leiste ---- */
.ton-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  /* ⚠️ 40 px wie `#tab-bar` des Lehrer-Editors und wie `.lz-kopf` — beim
     Wechsel zwischen den Personas soll nichts springen (Lars, 02.08.2026:
     „viel höher … bitte auf die gleiche höhe verkleinern"). */
  min-height: 40px;
  background: linear-gradient(180deg, var(--t-bartop), var(--t-bar));
  padding: 0 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--t-ink) 10%, var(--t-bar));
  position: sticky;
  top: 0;
  z-index: 5;
}
.ton-tabrow { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ton-tabrow::-webkit-scrollbar { display: none; }
.ton-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 200px;
  /* ⚠️ Polsterung an die 40-px-Leiste angepasst: mit den früheren 13 px
     wäre der Tab höher als seine Leiste geworden. */
  padding: 7px 13px;
  border-radius: 11px;
  color: var(--t-barink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
  transition: background .14s ease, transform .12s ease;
}
.ton-tab:hover { background: var(--t-hov); transform: translateY(-1px); }
/* Umrandung farblos (Lars): Blau ist in dieser Oberfläche die
 * Systemaktion — ein Tab ist keine */
.ton-tab.active { background: var(--t-panel); color: var(--t-ink); box-shadow: 0 2px 6px rgba(28, 27, 24, .10), inset 0 0 0 1.5px color-mix(in srgb, var(--t-ink) 14%, transparent); }
.ton-tab .ton-dot { width: 9px; height: 9px; border-radius: 3px; background: color-mix(in srgb, var(--t-barink) 55%, var(--t-bar)); flex: none; }
.ton-tab .ton-tname { overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.ton-tab .ton-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: -5px -8px -5px -2px;
  border-radius: 8px;
  color: color-mix(in srgb, var(--t-barink) 70%, var(--t-bar));
  font-size: 16px;
  line-height: 1;
}
.ton-tab .ton-x:hover { color: var(--t-ink); background: rgba(0, 0, 0, .06); }
@media (pointer: coarse) {
  .ton-tab .ton-x { width: 34px; height: 34px; margin: -8px -10px -8px -2px; }
}
.ton-tab.active .ton-x:hover { color: var(--t-ink); }
.ton-tab .ton-brand { flex: none; }
.ton-newtab {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t-barink);
  flex: none;
  transition: background .14s ease, transform .12s ease;
}
.ton-newtab:hover { background: var(--t-hov); transform: translateY(-1px) rotate(90deg); }
.ton-flex { flex: 1; }

/* Menü — DIESELBE Marke wie in der Lehrkraft-Leiste (v0.421).
   ⚠️ Hier standen bis dahin vier absolut gesetzte Kästchen (`.ton-bars
   .b1/.b2/.b3/.bd`), die die Marke in CSS NACHBAUTEN: eigene Maße,
   eigene Farben, eigenes Verhalten — und sie färbte sich nur im
   OFFENEN Zustand, während sie bei der Lehrkraft schon beim Überfahren
   angeht. Zwei Zeichnungen derselben Sache. Jetzt `KS.marke` in beiden
   und ein Regelpaar für beide Zustände. */
.ton-menuwrap { position: relative; flex: none; }
.ton-menu { width: 36px; height: 36px; border-radius: 11px; padding: 0; display: flex; align-items: center; justify-content: center; transition: background .14s ease; }
.ton-menu:hover { background: var(--t-hov); }
.ton-drop {
  position: absolute;
  top: 44px;
  right: 0;
  width: 244px;
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-radius: 16px;
  box-shadow: 0 10px 34px -8px rgba(28, 27, 24, .28), 0 3px 8px rgba(28, 27, 24, .10);
  padding: 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ton-di { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px; font-size: 14.5px; font-weight: 700; color: var(--t-ink); transition: background .12s ease; }
.ton-di:hover { background: #f3f3f1; }
.ton-di svg { flex: none; }
.ton-dinfo { cursor: default; }
.ton-dinfo:hover { background: none; }
.ton-dinfo span { display: flex; flex-direction: column; line-height: 1.25; }
.ton-dinfo small { color: var(--t-muted); }
.ton-dsep { height: 1px; background: var(--t-line); margin: 6px 10px; display: block; }
.ton-dout { color: #c6415f; }
.ton-dout:hover { background: color-mix(in srgb, #c6415f 9%, #fff); }
a.ton-di { text-decoration: none; }
.ton-dver { display: block; padding: 2px 11px 4px; font-size: 12px; font-weight: 700; color: var(--t-muted); }

/* ---- Inhalt ---- */
.ton-body {
  flex: 1;
  padding: 26px 34px 38px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
}
.ton-search {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--t-panel);
  border: 1.5px solid var(--t-line);
  border-radius: var(--t-r);
  padding: 0 18px;
  height: 60px;
  font-weight: 600;
  box-shadow: var(--t-elev);
  transition: border-color .14s ease, box-shadow .14s ease;
  margin-bottom: 4px;
  color: var(--t-muted);
}
.ton-search:focus-within { border-color: var(--blau); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blau) 20%, transparent); }
.ton-search input { flex: 1; color: var(--t-ink); height: 100%; border: none; outline: none; background: none; font: inherit; font-size: 16px; border-radius: 0; padding: 0; }
.ton-search input::placeholder { color: #a3a099; }
.ton-search kbd { font-size: 12px; font-weight: 800; color: var(--t-muted); border: 1.5px solid var(--t-line); border-bottom-width: 3px; border-radius: 8px; padding: 3px 9px; background: #fff; font-family: inherit; }
.ton-results {
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-radius: var(--t-r);
  box-shadow: var(--t-elev);
  padding: 7px;
  margin-top: -14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ton-res { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: background .12s ease; text-align: left; }
.ton-res:hover { background: #f3f3f1; }
.ton-res span { color: var(--t-muted); font-size: 12.5px; }

/* ---- Kachelzeile ---- */
.ton-row { display: flex; gap: 16px; align-items: stretch; min-width: 0; }
/* Luft oben/unten: overflow-x macht die y-Achse zwangsweise zum
 * Scrollbereich — ohne Polster schnitt er den Hover-Lift der Kacheln ab,
 * die Stücke verschwanden scheinbar hinter der Suchleiste (Lars) */
.ton-scroll { display: flex; align-items: flex-start; gap: 16px; overflow-x: auto; padding: 10px 2px 12px; margin: -10px -2px -4px; flex: 1; min-width: 0; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--t-bgink) 45%, var(--t-paper)) transparent; }
.ton-scroll::-webkit-scrollbar { height: 9px; }
.ton-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--t-bgink) 45%, var(--t-paper)); border-radius: 8px; border: 2px solid var(--t-paper); }
.ton-tile {
  display: flex;
  flex-direction: column;
  width: 176px;
  height: 176px;
  flex: none;
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-radius: var(--t-r);
  overflow: hidden;
  box-shadow: var(--t-elev);
  transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), box-shadow .16s ease, border-color .16s ease;
}
.ton-tile:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 18px 34px -12px rgba(28, 27, 24, .26); border-color: color-mix(in srgb, var(--t-ink) 16%, var(--t-line)); }
.ton-tile:active { transform: translateY(0) scale(.99); }
.ton-tile { position: relative; }
/* × oben rechts (nur Zuletzt-Stücke): nimmt das Stück aus der Ansicht */
.ton-tx {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 17px;
  font-weight: 700;
  color: var(--t-muted);
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--t-line);
  opacity: 0;
  transition: opacity .14s ease, color .14s ease, border-color .14s ease;
}
.ton-tile:hover .ton-tx { opacity: 1; }
.ton-tx:hover { color: var(--t-ink); border-color: color-mix(in srgb, var(--t-ink) 24%, var(--t-line)); }
@media (pointer: coarse) {
  .ton-tx { opacity: .55; width: 32px; height: 32px; }
}
.ton-fixed { align-items: center; justify-content: center; gap: 12px; }
/* eine Icon-Familie, zwei Kontexte: die Chips färben die Glyphen ein */
.ton-chip { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 18px; }
.ton-chip svg { width: 32px; height: 32px; }
.ton-lib .ton-chip { background: color-mix(in srgb, var(--blau) 14%, #fff); color: var(--blau); }
.ton-lib:hover { border-color: color-mix(in srgb, var(--blau) 34%, var(--t-line)); box-shadow: 0 18px 34px -12px color-mix(in srgb, var(--blau) 42%, transparent); }
.ton-tlabel { font-size: 14.5px; font-weight: 800; color: var(--t-ink); }
/* Neues Stück: die blaue Systemaktion */
.ton-new {
  background: color-mix(in srgb, var(--blau) 8%, #fff);
  border: 2px dashed color-mix(in srgb, var(--blau) 45%, var(--t-line));
  box-shadow: none;
}
.ton-new .ton-chip { background: var(--blau); color: #fff; box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--blau) 55%, transparent); }
.ton-new .ton-tlabel { color: color-mix(in srgb, var(--blau) 72%, var(--t-ink)); }
.ton-new:hover { border-style: solid; border-color: color-mix(in srgb, var(--blau) 62%, transparent); box-shadow: 0 18px 34px -12px color-mix(in srgb, var(--blau) 44%, transparent); }

/* Vorschau: neutraler Platzhalter (Notenlinien), Inhalte tragen keine
 * Bereichsfarbe — einziges Signal ist der grüne Live-Puls */
.ton-prev {
  position: relative;
  flex: 1;
  min-height: 0;
  background:
    radial-gradient(130% 100% at 50% -30%, rgba(28, 27, 24, .04), transparent 72%),
    #fbfbfa;
  border-bottom: 1px solid var(--t-line);
  overflow: hidden;
}
.ton-prev::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  top: 50%;
  height: 41px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(180deg, rgba(28, 27, 24, .10) 0, rgba(28, 27, 24, .10) 1px, transparent 1px, transparent 10px);
}
.ton-pulse {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 2;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--blau);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 26%, transparent);
  animation: tonPulse 1.5s ease-in-out infinite;
}
.ton-tmeta { padding: 9px 13px; display: block; }
.ton-ttitle { display: block; font-size: 14.5px; font-weight: 800; color: var(--t-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ton-tsub { display: block; font-size: 12.5px; font-weight: 700; color: var(--t-muted); margin-top: 1px; }
.ton-tsub.live { color: var(--blau); }
.ton-hint { display: flex; align-items: center; color: var(--t-bgink); font-size: 13.5px; font-weight: 600; padding: 0 6px; }

/* ---- Reihe 2: Bereichs-Karten mit Farb-Rolle + Progression ---- */
.ton-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ton-big {
  --fam: var(--t-muted);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  /* min-height statt height: die Fortschrittszeile („Level 1 von 10")
   * wurde bei mittleren Fensterbreiten unten abgeschnitten (Lars) */
  min-height: 176px;
  padding: 20px 22px;
  background:
    radial-gradient(120% 90% at 50% -20%, color-mix(in srgb, var(--fam) 12%, transparent), transparent 70%),
    color-mix(in srgb, var(--fam) 5%, var(--t-panel));
  border: 1px solid color-mix(in srgb, var(--fam) 22%, var(--t-line));
  border-radius: var(--t-r);
  box-shadow: var(--t-elev);
  overflow: hidden;
  transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), box-shadow .16s ease, border-color .16s ease;
}
.ton-f-werk { --fam: var(--rosa); }
/* Farbrollen-Tausch (Lars 2026-07-19): Übungen BERNSTEIN, Klavier GRÜN
 * (Grün teilt sich Klavierpraxis fortan mit den Live-Signalen) */
.ton-f-ueb { --fam: var(--bernstein); }
.ton-f-piano { --fam: var(--gruen); }
.ton-big:hover, .ton-small:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 20px 40px -14px color-mix(in srgb, var(--fam) 52%, transparent); border-color: color-mix(in srgb, var(--fam) 46%, var(--t-line)); }
.ton-big:active, .ton-small:active { transform: translateY(0) scale(.995); }
.ton-bico { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; background: color-mix(in srgb, var(--fam) 16%, #fff); color: var(--fam); flex: none; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fam) 22%, transparent); transition: transform .18s ease; }
.ton-bico svg { width: 30px; height: 30px; }
.ton-big:hover .ton-bico { transform: rotate(-6deg) scale(1.06); }
.ton-btitle { display: block; font-size: 20px; font-weight: 900; letter-spacing: -.015em; }
.ton-bsub { display: block; font-size: 13.5px; font-weight: 700; color: var(--t-muted); margin-top: 2px; }
/* Progression: Kapsel-Segmente des eigenen Wegs (kein Vergleich) */
.ton-prog { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 2px; }
.ton-segs { display: flex; gap: 4px; }
.ton-segs i { flex: none; width: 14px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--fam) 15%, #eee); }
.ton-segs i.on { background: var(--fam); }
.ton-plabel { font-size: 12.5px; font-weight: 700; color: var(--t-muted); }

/* ---- Reihe 3: Meta-Bereiche, ruhig/tintig ---- */
.ton-small {
  --fam: var(--t-muted);
  display: flex;
  align-items: center;
  gap: 15px;
  height: 88px;
  padding: 0 18px;
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-radius: var(--t-r);
  box-shadow: var(--t-elev);
  transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), box-shadow .16s ease, border-color .16s ease;
}
.ton-sico { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 15px; background: color-mix(in srgb, var(--t-muted) 14%, #fff); color: color-mix(in srgb, var(--t-muted) 55%, var(--t-ink)); flex: none; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--t-muted) 20%, transparent); }
.ton-stext { flex: 1; min-width: 0; }
.ton-stitle { display: block; font-size: 16px; font-weight: 800; color: var(--t-ink); }
.ton-ssub { display: block; font-size: 12.5px; font-weight: 700; color: var(--t-muted); margin-top: 2px; }
.ton-go { color: color-mix(in srgb, var(--t-muted) 60%, var(--t-panel)); flex: none; transition: transform .16s ease; }
.ton-small:hover .ton-go { transform: translate(3px, 0); }

/* Karten bleiben auch im Dunkelmodus helles Papier — nur ihre Tinte
 * auf dem Grund (Hint, Scrollbar) folgt dem Modus */

/* schmalere Bildschirme */
@media (max-width: 940px) {
  .ton-body { padding: 18px 16px 28px; }
  .ton-grid3 { grid-template-columns: 1fr 1fr; }
  .ton-big { min-height: 140px; }
}
@media (max-width: 620px) {
  .ton-grid3 { grid-template-columns: 1fr; }
  .ton-big { min-height: 0; padding: 16px 18px; flex-direction: row; text-align: left; justify-content: flex-start; }
  .ton-tile { width: 140px; height: 150px; }
  .ton-row { flex-wrap: wrap; }
  /* ⚠️⚠️ **`flex-wrap: wrap` bricht NICHTS um, solange ein Kind
   * `min-width: 0` trägt.** `.ton-scroll` ist `flex: 1; min-width: 0` —
   * es darf also beliebig schrumpfen und tut das lieber, als in die
   * nächste Zeile zu gehen. Gemessen im Hochformat: Bibliothek 140 +
   * Neues Stück 140 + Abstände = 317 von 381 px, für „Zuletzt" blieben
   * **73 px** — weniger als EINE Kachel (140), man sah einen Streifen
   * (Lars, 03.08.2026: „sehr schmal. mir fällt aber auch keine lösung
   * ein"). `flex-basis: 100%` zwingt die eigene Zeile.
   * ⚠️ Damit die Seite dabei nicht wächst, legen sich die beiden festen
   * Kacheln FLACH und teilen sich die erste Zeile — dieselbe Bewegung,
   * die `.ton-big` hier drüber schon macht: aus Turm wird Zeile. Netto
   * 158 → 226 px Höhe, dafür 73 → 358 px für die Stücke.
   * ⚠️ Nur schmal, nicht „Handy": im Querformat (844 px) bekommt der
   * Streifen 432 px und die Zeile bleibt richtig — dort ist die HÖHE
   * knapp, und zwei Zeilen wären der schlechtere Tausch. */
  .ton-recents { flex: 1 0 100%; }
  .ton-row .ton-fixed { flex: 1 1 0; width: auto; height: 62px;
    flex-direction: row; gap: 11px; }
  .ton-row .ton-fixed .ton-chip { width: 40px; height: 40px; border-radius: 13px; }
  .ton-row .ton-fixed .ton-chip svg { width: 22px; height: 22px; }
}

/* ---------- Bibliothek (js/bibliothek.js) ----------
 * Popup über der Landing (kein Tab) — Design docs/mockups/
 * popup-bibliothek.html. Weiße Welt wie die Schüler-Shell.
 * Linien-Leitlinie: Border immer sichtbar, Hover = Lift +
 * Border-Betonung, Auswahl/Drop-Ziel = blaue Border.
 * Blau = Systemaktion; Inhalte bleiben neutral/tintig. */
#bib-pop {
  --blau: #1668b3;
  --b-ink: #26241f;
  --b-muted: #827e76;
  --b-line: #e9e8e4;
  --b-r: 18px;
  --b-elev: 0 1px 2px rgba(28, 27, 24, .05), 0 12px 26px -14px rgba(28, 27, 24, .18);
  --b-bounce: cubic-bezier(.34, 1.4, .5, 1);
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(24, 22, 18, .46);
  backdrop-filter: blur(3px);
  color: var(--b-ink);
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
#bib-pop[hidden] { display: none; }
:where(#bib-pop) button { border: none; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: inherit; border-radius: 0; cursor: pointer; }
#bib-pop [hidden] { display: none !important; }
.bib-card {
  position: relative;
  width: min(1000px, 100%);
  height: min(660px, calc(100vh - 52px));
  background: #fff;
  border: 1.5px solid var(--b-line);
  border-radius: var(--b-r);
  box-shadow: 0 34px 90px -26px rgba(24, 22, 18, .62), 0 6px 18px rgba(24, 22, 18, .18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: bibRise .32s var(--b-bounce) both;
}
@keyframes bibRise { from { opacity: 0; transform: translateY(20px) scale(.97); } }

/* Kopf — kein Untertitel (Textminimum) */
.bib-head { display: flex; align-items: center; gap: 13px; padding: 15px 18px 15px 22px; border-bottom: 1.5px solid var(--b-line); }
.bib-hic { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; background: color-mix(in srgb, var(--blau) 14%, #fff); color: var(--blau); flex: none; }
.bib-hic svg { width: 24px; height: 24px; }
.bib-head h2 { margin: 0; flex: 1; font-size: 19px; font-weight: 900; letter-spacing: -.015em; }
.bib-q {
  width: min(260px, 38%);
  border: 1.5px solid var(--b-line);
  border-radius: 999px;
  padding: 7px 15px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: inherit;
  outline: none;
}
.bib-q:focus { border-color: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 14%, transparent); }
.bib-q::-webkit-search-cancel-button { -webkit-appearance: none; }
.bib-x { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; min-width: 38px; border-radius: 12px; color: var(--b-muted); font-size: 21px; line-height: 1; flex: none; transition: background .12s ease, color .12s ease; }
.bib-x:hover { background: #f3f3f1; color: var(--b-ink); }

/* Leiste (Favoriten/Zuletzt/Alle + Ordnerbaum, eine Ebene) */
.bib-body { flex: 1; display: flex; min-height: 0; }
/* Ordnerwahl aus der Tafel heraus — der Weg ohne Ziehen (v0.384). */
.bib-movepop { position: fixed; z-index: 96; display: flex; flex-direction: column; gap: 2px;
  padding: 5px; min-width: 190px; max-width: min(300px, calc(100vw - 20px)); max-height: 60vh;
  overflow-y: auto; border-radius: 12px; background: #fff;
  border: 1px solid var(--b-line, #e6e4df); box-shadow: 0 14px 34px -14px rgba(28,27,24,.45); }
.bib-movepop button { display: flex; align-items: center; gap: 8px; width: 100%; font: inherit;
  font-size: 13px; text-align: left; cursor: pointer; border: 0; background: none;
  border-radius: 8px; padding: 8px 11px; color: inherit; }
.bib-movepop button:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.bib-movepop button svg { width: 17px; height: 17px; flex: none; opacity: .7; }

/* Der Griff zur Orte-Leiste: nur auf dem Handy (Regel im Handy-Block). */
.bib-railbtn { display: none; flex: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1.5px solid var(--b-line); border-radius: 11px;
  background: #fff; color: inherit; cursor: pointer; }
.bib-railbtn svg { width: 19px; height: 19px; }
.bib-rail { width: 230px; flex: none; border-right: 1.5px solid var(--b-line); background: #fcfcfb; display: flex; flex-direction: column; padding: 12px; gap: 2px; overflow-y: auto; }
.bib-railh { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #b3afa6; padding: 8px 10px 6px; }
.bib-folder { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid transparent; font-size: 14.5px; font-weight: 800; color: var(--b-ink); transition: background .12s ease, border-color .12s ease; width: 100%; }
.bib-folder:hover { background: #f2f1ee; border-color: color-mix(in srgb, var(--b-ink) 14%, transparent); }
.bib-folder.on { background: color-mix(in srgb, var(--blau) 11%, #fff); border-color: color-mix(in srgb, var(--blau) 40%, transparent); }
.bib-folder.sub { margin-left: 20px; width: calc(100% - 20px); font-size: 14px; }
.bib-folder svg { width: 19px; height: 19px; flex: none; color: color-mix(in srgb, var(--b-muted) 70%, var(--b-ink)); }
.bib-folder.on svg { color: var(--blau); }
.bib-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bib-fcount { font-size: 12px; font-weight: 800; color: var(--b-muted); }
.bib-folder.on .bib-fcount { color: var(--blau); }
.bib-sep { height: 1.5px; background: var(--b-line); margin: 8px 6px; flex: none; }
.bib-newfolder { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid transparent; font-size: 14px; font-weight: 800; color: var(--blau); transition: background .12s ease, border-color .12s ease; }
.bib-newfolder:hover { background: color-mix(in srgb, var(--blau) 9%, #fff); border-color: color-mix(in srgb, var(--blau) 30%, transparent); }
.bib-newfolder svg { width: 18px; height: 18px; flex: none; }
.bib-nflabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Drop-Ziel beim Darüberziehen: Border wird deutlich + blau */
#bib-pop .dropover { background: color-mix(in srgb, var(--blau) 14%, #fff) !important; border-color: var(--blau) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 20%, transparent); }
/* ⚠️ Im Konto ist die Schrift der Bibliothek ruhig (v0.323) — das
 * Eingabefeld für einen Ordnernamen trug als einziges noch die große
 * Schülerschrift (14,5 px / 800). */
body.persona-teacher #bib-pop .bib-edit { font-size: 13.5px; font-weight: 600; }
.bib-edit { flex: 1; min-width: 0; font: inherit; font-size: 14.5px; font-weight: 800; border: none; outline: none; background: #fff; border-radius: 7px; padding: 3px 6px; box-shadow: inset 0 0 0 2px var(--blau); color: var(--b-ink); }

/* Inhalt */
.bib-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bib-toolbar { display: flex; align-items: center; gap: 10px; padding: 15px 20px 12px; }
.bib-toolbar h3 { margin: 0; font-size: 17px; font-weight: 900; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.bib-folren { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; color: var(--b-muted); transition: background .12s, color .12s; }
.bib-folren:hover { background: #f3f3f1; color: var(--b-ink); }
/* Das Suchfeld sitzt seit v0.326 IN der Werkzeugzeile: es wächst in die
   Lücke und schiebt die Aktionen an den rechten Rand. `width: auto`
   schlägt das `min(260px, 38%)` aus der Kopfzeilen-Zeit. */
.bib-toolbar h3 { flex: none; }
.bib-toolbar .bib-q { flex: 1 1 auto; width: auto; max-width: 380px; margin-right: auto; }
.bib-folren svg { width: 15px; height: 15px; }
/* Auswählen-Schalter: der Tablet-Weg — nur auf coarse pointer sichtbar
 * (am PC aktiviert das Rubber-Band den Modus automatisch) */
.bib-pick { display: none; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 11px; border: 1.5px solid var(--b-line); font-size: 13.5px; font-weight: 800; color: var(--b-ink); transition: background .12s ease, border-color .12s ease; }
.bib-pick:hover { background: #f6f5f2; border-color: color-mix(in srgb, var(--b-ink) 22%, var(--b-line)); }
.bib-pick.on { background: color-mix(in srgb, var(--blau) 12%, #fff); color: var(--blau); border-color: color-mix(in srgb, var(--blau) 45%, transparent); }
.bib-pick svg { width: 15px; height: 15px; }
@media (pointer: coarse) { .bib-pick { display: inline-flex; } }
/* Löschen: erscheint erst nach Markierung, bestätigt in zwei Schritten */
.bib-del { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 11px; border: 1.5px solid color-mix(in srgb, #c6415f 40%, transparent); font-size: 13.5px; font-weight: 800; color: #c6415f; transition: background .12s, border-color .12s; }
.bib-del:hover { background: color-mix(in srgb, #c6415f 8%, #fff); }
.bib-del.armed { background: #c6415f; border-color: #c6415f; color: #fff; }
.bib-del svg { width: 15px; height: 15px; }

.bib-gridwrap { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 20px; user-select: none; -webkit-user-select: none; }
/* Ordner-Kacheln der aktuellen Ebene (auch Drop-Ziele) */
.bib-subrow { display: flex; flex-wrap: wrap; gap: 12px; }
.bib-subrow:not(:empty) { margin-bottom: 14px; }
.bib-subtile { display: inline-flex; align-items: center; gap: 9px; padding: 10px 15px; border-radius: 13px; border: 1.5px solid var(--b-line); background: #fff; font-size: 14px; font-weight: 800; box-shadow: var(--b-elev); transition: transform .16s var(--b-bounce), border-color .14s ease, box-shadow .14s ease; }
.bib-subtile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--b-ink) 30%, var(--b-line)); }
.bib-subtile svg { width: 18px; height: 18px; color: color-mix(in srgb, var(--b-muted) 70%, var(--b-ink)); }

.bib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 15px; }

/* Stück-Karte — entrümpelt: die Vorschau trägt die Karte */
.bib-piece {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--b-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--b-elev);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .16s var(--b-bounce), box-shadow .16s ease, border-color .16s ease;
}
.bib-piece:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -14px rgba(28, 27, 24, .26); border-color: color-mix(in srgb, var(--b-ink) 32%, var(--b-line)); }
/* Touch: im Auswahl-Modus & auf gewählten Karten zieht der Finger die
 * Karte (sonst übernimmt der Browser das Scrollen und feuert
 * pointercancel — der Drag stirbt still); ohne Auswahl scrollt das
 * Grid normal. Kein Callout beim langen Drücken. */
.bib-card.picking .bib-piece, .bib-piece.sel { touch-action: none; }
.bib-piece { -webkit-touch-callout: none; }
.bib-piece.sel { border-color: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 22%, transparent); }
.bib-piece.dragsrc { opacity: .45; }
/* neutrale Notenlinien-Vorschau — wie die Landing-Kacheln */
.bib-prev { position: relative; height: 104px; background: radial-gradient(130% 100% at 50% -30%, rgba(28, 27, 24, .04), transparent 72%), #fbfbfa; border-bottom: 1.5px solid var(--b-line); }
.bib-prev::before { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; height: 41px; transform: translateY(-50%); background: repeating-linear-gradient(180deg, rgba(28, 27, 24, .10) 0, rgba(28, 27, 24, .10) 1px, transparent 1px, transparent 10px); }
/* Favoriten-Stern: Verweis-Toggle; blau = Systemaktion */
.bib-star { position: absolute; top: 6px; right: 6px; z-index: 3; width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #d5d2ca; transition: color .12s ease, background .12s ease; }
.bib-star:hover { background: rgba(28, 27, 24, .05); color: var(--b-muted); }
.bib-star.on { color: var(--blau); }
.bib-star svg { width: 17px; height: 17px; }
/* ⚠️ Am Finger ist der Stern zweierlei zu klein: er ist auf der Vorschau
 * kaum zu SEHEN (17 px helle Kontur auf hellem Papier) und kaum zu
 * TREFFEN (Lars, 03.08.2026). Nur für den groben Zeiger — an der Maus
 * stimmt das Maß. ⚠️ Er war dort ohnehin schon schief: `button, select
 * { min-height: 40px }` machte im Hochformat 30 × 40 daraus; mit
 * 40 × 40 ist er wieder quadratisch. Die flache Katalogzeile behält ihr
 * schlankes Maß — dort steht der Stern neben dem Titel, nicht auf einem
 * Bild. */
@media (pointer: coarse) {
  .bib-star { width: 40px; height: 40px; border-radius: 13px; }
  .bib-star svg { width: 23px; height: 23px; }
  #bib-grid .bib-kat .bib-star { width: 34px; height: 34px; }
  #bib-grid .bib-kat .bib-star svg { width: 20px; height: 20px; }
}
.bib-meta { padding: 9px 13px 11px; display: flex; flex-direction: column; gap: 1px; }
.bib-prow { display: flex; align-items: center; gap: 5px; min-width: 0; }
.bib-ptitle { font-size: 14.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Umbenennen: kleiner Bleistift direkt hinter dem Namen */
.bib-pencil { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; min-width: 24px; border-radius: 8px; color: var(--b-muted); opacity: 0; transition: opacity .12s, background .12s, color .12s; }
.bib-piece:hover .bib-pencil, .bib-pencil:focus-visible { opacity: 1; }
.bib-pencil:hover { background: #f3f3f1; color: var(--b-ink); }
.bib-pencil svg { width: 13px; height: 13px; }
.bib-ptime { font-size: 12px; font-weight: 700; color: var(--b-muted); }
/* Die drei Ablagen am Stück (A1): EINE Zeile, der helle Knopf ist der Ort,
   an dem es liegt. Groß genug für einen Finger — die Schüler-Fassung ist
   um große Ziele gebaut. */
/* B4: Stückbedarf als Werkzeug (Modulraum) */
.mr-suchen {
  margin-top: 10px; padding: 6px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.mr-suchen:hover { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.mr-suchen[disabled] { opacity: .55; cursor: default; }
.mr-treffer { margin-top: 8px; }
.mr-hinweis { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.mr-tref { width: 100%; text-align: left; cursor: pointer; }
.mr-tref:hover { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }

/* Feinschliff v0.321: Segmente, Katalogzeile, Veröffentlichen */
.bib-seg { display: flex; gap: 2px; background: #f3f2ef; border-radius: 10px; padding: 2px; }
.bib-segb { padding: 4px 11px; border-radius: 8px; font-size: 13px; color: var(--b-muted); border: none; background: none; cursor: pointer; }
.bib-segb:hover { color: var(--b-ink); }
.bib-segb.on { background: #fff; color: var(--b-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(28,27,24,.1); }
tr.bib-katrow { cursor: pointer; }
.bib-kstar { border: none; background: none; padding: 2px; color: #d5d2ca; cursor: pointer; display: inline-flex; }
.bib-kstar:hover { color: var(--b-muted); }
.bib-kstar.on { color: var(--bernstein, #e0a020); }
/* ⚠️ Auf die Höhe der Schrift daneben zentriert, nicht auf die Zellenmitte
   — der Stern stand sonst über der Zeile (Lars, 03.08.2026). */
.bib-kstar { align-items: center; vertical-align: middle; }
.bib-kstar svg { width: 15px; height: 15px; }
body.persona-teacher #bib-pop .bib-kstar svg { width: 19px; height: 19px; }
.mk-pruef { background: color-mix(in srgb, var(--accent) 11%, #fff); color: var(--accent); }

.bib-railhint { margin: 6px 8px 0; font-size: 12px; line-height: 1.45; color: var(--b-muted); }

/* v0.322: Module · Lektionen · Pakete in derselben Tabelle.
   ⚠️ Der Titel steht dort in SPALTE 1 — die Kürzungsregel weiter unten
   hängt an `:nth-child(3)` (Häkchen, Vorschau, Titel) und greift hier
   nicht. `.tt` ist dieselbe Kürzung, an der Zelle statt an der Position. */
tr.bib-row > td.tt { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Feste Kopfzeile: kein Klick, also auch kein Zeiger, der einen verspricht */
.bib-fest .bib-th { cursor: default; }
.bib-fest .bib-th:hover { color: var(--b-muted); }
/* ---------- Lehrkraft-Fassung: die Vorlage des Mockups (v0.323) ----------
   Schrift und Farbe hatte die Bibliothek vom SCHÜLER-Editor geerbt:
   Nunito auf 15 px, die Leiste in 800, VERSALIEN mit Sperrung über den
   Gruppen, 1,5-px-Kanten und das feste Systemblau. Für Kinder ist das
   richtig. Für eine Ansicht, die 83 Zeilen auf einmal zeigt, ist es zu
   laut — `docs/mockups/lehrer-bibliothek2.html` setzt dagegen Segoe UI
   auf 14 px, eine ruhige Leiste und EINE Farbe.
   ⚠️ Der Hebel ist `--blau`: fast alles Blaue im Fenster liest diese eine
   Variable. Sie auf den Kontoton zu legen färbt das ganze Fenster mit
   EINER Zeile — „die ganze Ansicht hängt an EINER Variablen" (Mockup §3);
   wechselt die Lehrkraft ihren Akzent, wechselt die Bibliothek mit.
   ⚠️ Ausnahme Live-Sheets: ihr Blau ist seit v0.176 BEDEUTUNG, nicht
   Geschmack — Punkt und Name behalten es. */
body.persona-teacher #bib-pop {
  --blau: var(--accent);
  --live: #1668b3;
  --b-ink: #23201d;
  --b-muted: #6f6862;
  --b-line: #e8e4e0;
  --gruen: #2e7d5b;
  --bernstein: #b57e12;
  --b-weich: color-mix(in srgb, var(--accent) 8%, #fff);
  --b-weicher: color-mix(in srgb, var(--accent) 4%, #fff);
  --b-fuell: #f4f2f0;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, system-ui, sans-serif;
  font-size: 14px;
}
body.persona-teacher #bib-pop .bib-liveic {
  background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent);
}
body.persona-teacher #bib-pop .bib-folder.bib-live .bib-fname { color: var(--live); font-weight: 600; }

/* Kopf und Werkzeugzeile: EINE Titelzeile mit Gewicht, alles andere leiser */
body.persona-teacher #bib-pop .bib-head { border-bottom-width: 1px; }
body.persona-teacher #bib-pop .bib-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
body.persona-teacher #bib-pop .bib-toolbar h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
/* Suchfeld gefüllt statt umrandet (Mockup `.suche`) */
body.persona-teacher #bib-pop .bib-q {
  border-color: transparent; border-radius: 10px; background: var(--b-fuell);
  font-size: 13.5px; padding: 7px 12px;
}
body.persona-teacher #bib-pop .bib-q:focus {
  border-color: transparent; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 34%, transparent);
}

/* Leiste: ohne Versalien, ohne 800er Fettung, schmaler */
body.persona-teacher #bib-pop .bib-rail { width: 206px; border-right-width: 1px; }
body.persona-teacher #bib-pop .bib-railh {
  text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--b-muted);
}
body.persona-teacher #bib-pop .bib-folder,
body.persona-teacher #bib-pop .bib-newfolder {
  font-size: 13.5px; font-weight: 500; border-radius: 9px; padding: 7px 10px;
}
body.persona-teacher #bib-pop .bib-folder.on {
  background: var(--b-weich); border-color: transparent; color: var(--accent); font-weight: 600;
}
body.persona-teacher #bib-pop .bib-folder svg { width: 17px; height: 17px; opacity: .72; }
body.persona-teacher #bib-pop .bib-folder.on svg { opacity: 1; }
body.persona-teacher #bib-pop .bib-fcount { font-weight: 500; font-variant-numeric: tabular-nums; }
body.persona-teacher #bib-pop .bib-sep { height: 1px; }

/* Liste: Trennung durch Rhythmus und Hover, nicht durch Linien */
body.persona-teacher #bib-pop .bib-th { border-bottom-width: 1px; font-weight: 600; }
body.persona-teacher #bib-pop tr.bib-row:hover > td { background: var(--b-weicher); }
body.persona-teacher #bib-pop tr.bib-row.sel > td { background: var(--b-weich); }
body.persona-teacher #bib-pop .bib-th.num,
body.persona-teacher #bib-pop tr.bib-row > td.num { font-variant-numeric: tabular-nums; }
body.persona-teacher #bib-pop .bib-tafel { border-left-width: 1px; }
/* Knöpfe gefüllt statt umrandet — die HAUPT-Aktionen behalten ihren Ton */
body.persona-teacher #bib-pop .bib-tb:not(.haupt):not(.warn):not(.an),
body.persona-teacher #bib-pop .bib-pick:not(.on) {
  border-color: transparent; background: var(--b-fuell);
  font-weight: 500; font-size: 13px; border-radius: 10px;
}
body.persona-teacher #bib-pop .bib-tb:not(.haupt):not(.warn):not(.an):hover,
body.persona-teacher #bib-pop .bib-pick:not(.on):hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--b-fuell)); border-color: transparent;
}
body.persona-teacher #bib-pop .bib-seg { background: var(--b-fuell); }

/* ---------- Lehrkraft: dichte TABELLE + Tafel (A3, v0.315) ----------
   ⚠️ Die Zeile trägt `.bib-piece` — daran hängen Rubber-Band, Ziehen und
   Auswahl, die dadurch unverändert weiterlaufen. Wer die Klasse entfernt,
   nimmt der Tabelle das ganze Verhalten. */
/* Die Lehrkraft-Fassung braucht Breite: dichte Tabelle PLUS Tafel.
   Der Schüler-Fassung bleiben die 1000 px — dort sind es große Kacheln. */
.bib-card:has(.bib-tab) { width: min(1320px, 100%); height: min(760px, calc(100vh - 52px)); }
.bib-grid.bib-liste { display: block; }
/* ⚠️ Ohne `min-width: 0` schiebt die Tabelle mit ihrer Mindestbreite die
   Tafel aus dem Fenster — die letzte Spalte war abgeschnitten. */
.bib-content { min-width: 0; }
/* ⚠️ `fixed` statt `auto`: sonst zwingt die Mindestbreite der Spalten die
   Tabelle über die Fläche hinaus, sobald die Tafel 288 px nimmt — die
   letzte Spalte lag dann unter der Tafel. Der Titel bekommt den Rest und
   wird bei Bedarf gekürzt. */
.bib-tab { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.bib-th {
  position: sticky; top: 0; z-index: 2; background: #fff; text-align: left;
  font-size: 12.5px; color: var(--b-muted); font-weight: 600; padding: 7px 10px 8px;
  border-bottom: 1px solid var(--b-line); white-space: nowrap; cursor: pointer; user-select: none;
}
.bib-th:hover { color: var(--b-ink); }
.bib-th.num { text-align: right; }
.bib-pf { opacity: 0; font-size: 10px; }
.bib-th.sort { color: var(--accent); }
.bib-th.sort .bib-pf { opacity: 1; }
/* ⚠️ Die Zeile trägt `.bib-piece` (fürs Verhalten) und erbt damit den
   KARTEN-Stil — Rahmen, Radius, Schatten, display:flex. Ohne dieses
   Zurücksetzen stapeln sich die Zellen untereinander statt nebeneinander;
   genau so sah es beim ersten Lauf aus. */
tr.bib-row {
  display: table-row; background: none; border: none; border-radius: 0;
  box-shadow: none; overflow: visible;
}
tr.bib-row.sel { box-shadow: none; border-color: transparent; }
tr.bib-row > td { display: table-cell; }
/* keine Zeilenlinien: getrennt wird durch Rhythmus und Hover */
tr.bib-row > td { padding: 4px 10px; vertical-align: middle; border: none; }
tr.bib-row:hover > td { background: #faf9f7; }
tr.bib-row.sel > td { background: color-mix(in srgb, var(--accent) 10%, #fff); }
tr.bib-row > td:first-child { border-radius: 9px 0 0 9px; }
.bib-thhk, td.bib-tdhk { text-align: center; padding-left: 4px; padding-right: 4px; }
td.bib-tdhk input, .bib-thhk input { margin: 0; cursor: pointer; accent-color: var(--accent); }
/* Notenvorschau: erste Zeile des Stücks, nachgeladen und gemerkt */
.bib-vor {
  display: block; width: 128px; height: 34px; overflow: hidden;
  border-radius: 6px; background: #fff;
}
.bib-vor svg { width: 128px; height: auto; display: block; }
.bib-vor.laedt { background: repeating-linear-gradient(180deg, transparent 0 10px, #f1efec 10px 11px); }
tr.bib-row > td:last-child { border-radius: 0 9px 9px 0; }
tr.bib-row > td.num { text-align: right; }
tr.bib-row .bib-ptitle { font-weight: 600; }
tr.bib-row > td:nth-child(3) { overflow: hidden; }
tr.bib-row > td:nth-child(3) .bib-ptitle {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.bib-tab col.c-hk { width: 34px; }
.bib-tab col.c-v { width: 136px; }
.bib-tab col.c-a { width: 92px; }
.bib-tab col.c-komp { width: 190px; }
.bib-tab col.c-abg { width: 116px; }
/* Die Art eines Moduls ist ein Wort — 190 px nahmen dem Titel den Platz. */
.bib-tab col.c-art { width: 118px; }
/* ⚠️ Der Titel UMBRICHT (v0.416). `tr.bib-row > td.tt` ist spezifischer
 * als eine Klasse allein und würde ihn sonst weiter abschneiden. */
tr.bib-row > td.bib-tdtitel { white-space: normal; overflow: visible;
  line-height: 1.3; padding-top: 7px; padding-bottom: 7px; }
.bib-tab col.c-note { width: 58px; }
.bib-tab col.c-ts { width: 92px; }
/* ⚠️ Zahlenspalten der Bestände: die Breite richtet sich nach der
   ÜBERSCHRIFT, nicht nach dem Wert — „Stunden" ist breiter als „3", und
   bei `table-layout: fixed` wird abgeschnitten statt umbrochen. */
.bib-tab col.c-n { width: 88px; }
.bib-tab col.c-n2 { width: 104px; }

/* ---------- Der Titel darf nicht verhungern (v0.510) ----------
 * ⚠️ **`table-layout: fixed` gibt der Titelspalte den REST — und der kann
 * null sein.** Gemessen am 20.08.2026 in Bildschirmkoordinaten, „Alle
 * Stücke": Titel 544 px bei 1920, 196 bei 1024, 72 bei 900, 6 bei 834,
 * **0 ab 768 abwärts**. Eine Stückliste ohne Stücknamen — der Text steht
 * im DOM und ist unsichtbar. Die Handy-Fassung (v0.384) löste das
 * längst, hing aber an `pointer: coarse` und `max-width: 760`: das iPad
 * im Hochformat ist 768 px breit und fiel durch BEIDE Bedingungen.
 * Der Zuschnitt fragt deshalb nicht mehr nach dem Gerät, sondern nach
 * dem Platz, den die Tabelle WIRKLICH hat — `@container` misst die
 * Tafelbreite, nicht das Fenster. Das ist der Unterschied, der zählt:
 * die Ordner-Leiste nimmt 206 px und wird auf dem Handy ausgeblendet,
 * eine Fensterregel rechnet sie doppelt.
 * **Die Schwelle ist abgeleitet, nicht geraten:** Summe der festen
 * Spalten + 190 px Titelboden. Wer eine Spaltenbreite ändert, rechnet
 * sie nach.
 * ⚠️ Zwei Fallen, beide schon bezahlt:
 *   1. `tr.bib-row > td { display: table-cell }` (die Regel, die den
 *      Karten-Stil der Zeile zurücksetzt) ist spezifischer als eine
 *      Klasse allein und gewinnt lautlos — die Zellenregeln brauchen
 *      `tr.bib-row >` davor.
 *   2. Bei `table-layout: fixed` räumt eine versteckte Zelle ihre Spalte
 *      NICHT; die `<col>` auf 0 zu setzen genügt ebenfalls nicht. Sobald
 *      etwas ausgeblendet wird, muss `auto` bemessen — und dann muss der
 *      Titel UMBRECHEN dürfen, sonst schiebt seine Mindestbreite die
 *      Tabelle aus der Tafel. */
.bib-gridwrap { container-type: inline-size; container-name: bibgrid; }

/* ⚠️ Jede Regel nennt IHRE Tabelle. `.bib-weit` allein träfe sonst auch
 * die Vorschau der Stückliste, sobald die Katalog-Schwelle greift — drei
 * Tabellen, drei Schwellen, aber ein gemeinsamer Klassenname. */

/* Stückliste — fest 34+136+92+116+58+92 = 528 px, Stufe 1 bei 528+190 */
@container bibgrid (max-width: 718px) {
  .bib-tab:not(.bib-kat):not(.bib-best) { table-layout: auto; }
  /* ⚠️ Unter `auto` bemisst der Inhalt die Spalten — der Titel bekäme
     nur seine Mindestbreite. `width: 100%` an der Titelzelle zieht den
     Rest zu ihr, `nowrap` an den Nebenspalten hält sie bei dem, was ihr
     Inhalt wirklich braucht (gemessen in einer Probe: 508 px Tafel →
     Titel 355, Autor 66, Ablage 71 statt Titel 136). */
  /* ⚠️ `max-width: 0` ist der Schlüssel, nicht `width: 100%`: unter
     `auto` ist die MINDESTBREITE einer Zelle ihr Inhalt, und ein
     134-Zeichen-Titel machte die Spalte 1042 px breit — die Tabelle
     ragte 933 px über die Tafel (gemessen). Mit `max-width: 0` will
     die Zelle gar nichts, `width: 100%` gibt ihr den Rest, und der
     Titel wird gekürzt statt zu schieben. */
  .bib-tab:not(.bib-kat):not(.bib-best) .bib-titelsp { width: 100%; max-width: 0; overflow: hidden; }
  .bib-tab:not(.bib-kat):not(.bib-best) .bib-neben { white-space: nowrap; }
  .bib-tab:not(.bib-kat):not(.bib-best) .bib-weit,
  .bib-tab:not(.bib-kat):not(.bib-best) tr.bib-row > td.bib-weit { display: none; }
}
/* ohne die Vorschau bleiben 392 px fest, Stufe 2 bei 392+190 */
@container bibgrid (max-width: 582px) {
  .bib-tab:not(.bib-kat):not(.bib-best) .bib-neben,
  .bib-tab:not(.bib-kat):not(.bib-best) tr.bib-row > td.bib-neben { display: none; }
}

/* ---------- Die Werkzeugzeile bricht um (v0.510) ----------
 * ⚠️ Gemessen am 20.08.2026: die Zeile braucht **616 px**; die
 * Segmentreihe „Alle · Eigene · Abgaben · Unbewertet" (283 px) ragte
 * ab 834 px Fenster über die rechte Kante des Inhalts hinaus — 42 px
 * bei 834, 108 bei 768, 434 bei 390. Dieselbe Wurzel wie beim Titel:
 * der Umbruch stand in der Handy-Regel (`pointer: coarse`), gebraucht
 * wird er nach der BREITE. Griff, Titel und Suche in eine Zeile, die
 * Segmente darunter — und die rollen seitwärts wie die Leisten sonst
 * auch.
 * ⚠️ Hier reicht eine Fensterregel: die Leiste sitzt in der Tafel, und
 * die ist so breit wie das Fenster (`min(1320px, 100%)`). Die Schwelle
 * 880 folgt aus 616 px Bedarf + 206 px Ordner-Leiste + Polsterung —
 * bei 900 px passt sie gemessen noch (640 verfügbar), bei 834 nicht
 * mehr (574). `.bib-content` bekommt bewusst KEIN `container-type`:
 * das brächte Containment über die klebende Kopfzeile und die
 * schwebende Tafel, für einen Umbruch, den die Fensterbreite genauso
 * gut beantwortet. */
@media (max-width: 880px) {
  .bib-toolbar { flex-wrap: wrap; row-gap: 6px; }
  .bib-toolbar .bib-q { flex: 1 1 140px; min-width: 0; }
  #bib-seg { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  #bib-seg::-webkit-scrollbar { display: none; }
  #bib-seg > * { flex: none; }
}

/* Katalog — fest 34+190+58+58+92 = 432, mit der Kurator-Freigabe +300 */
@container bibgrid (max-width: 922px) {
  .bib-kat { table-layout: auto; }
  /* ⚠️ Unter `auto` bemisst der Inhalt die Spalten — der Titel bekäme
     nur seine Mindestbreite. `width: 100%` an der Titelzelle zieht den
     Rest zu ihr, `nowrap` an den Nebenspalten hält sie bei dem, was ihr
     Inhalt wirklich braucht (gemessen in einer Probe: 508 px Tafel →
     Titel 355, Autor 66, Ablage 71 statt Titel 136). */
  /* ⚠️ `max-width: 0` ist der Schlüssel, nicht `width: 100%`: unter
     `auto` ist die MINDESTBREITE einer Zelle ihr Inhalt, und ein
     134-Zeichen-Titel machte die Spalte 1042 px breit — die Tabelle
     ragte 933 px über die Tafel (gemessen). Mit `max-width: 0` will
     die Zelle gar nichts, `width: 100%` gibt ihr den Rest, und der
     Titel wird gekürzt statt zu schieben. */
  .bib-kat .bib-titelsp { width: 100%; max-width: 0; overflow: hidden; }
  .bib-kat .bib-neben { white-space: nowrap; }
  .bib-kat .bib-weit,
  .bib-kat tr.bib-row > td.bib-weit { display: none; }
}
/* ⚠️ 700 statt der gerechneten 622: unter `auto` bemisst der INHALT die
   Nebenspalten, und „Thomas Arne (1710–1778)" ist 219 px breit statt der
   190 des `<col>`. Bei 660 px Tafel blieb dem Titel dadurch nur seine
   Mindestbreite (236 gemessen) und die Tabelle ragte 17 px über. Die
   Schwelle folgt dem gemessenen Inhalt, nicht der Spaltenangabe. */
@container bibgrid (max-width: 700px) {
  .bib-kat .bib-neben,
  .bib-kat tr.bib-row > td.bib-neben { display: none; }
}

/* Bestände — die breiteste ist „Module": 118+88+88+190+116+116 = 716.
 * ⚠️ Die Schwelle gilt für alle drei Bestandstabellen, also nach der
 * SCHLIMMSTEN: Lektionen (586) und Pakete (500) fallen dadurch etwas
 * früher in die Listenform, als sie müssten. Drei eigene Schwellen für
 * drei Tabellen derselben Bauart wären drei Zahlen zum Auseinanderlaufen.
 * ⚠️ Ihre Titelzelle heißt `tt` und trägt `nowrap` — unter `auto` wäre
 * ihre Mindestbreite der ganze Titel, und die Tabelle schöbe sich aus
 * der Tafel. Sie muss hier umbrechen dürfen. */
@container bibgrid (max-width: 906px) {
  .bib-best { table-layout: auto; }
  /* ⚠️ Unter `auto` bemisst der Inhalt die Spalten — der Titel bekäme
     nur seine Mindestbreite. `width: 100%` an der Titelzelle zieht den
     Rest zu ihr, `nowrap` an den Nebenspalten hält sie bei dem, was ihr
     Inhalt wirklich braucht (gemessen in einer Probe: 508 px Tafel →
     Titel 355, Autor 66, Ablage 71 statt Titel 136). */
  /* ⚠️ `max-width: 0` ist der Schlüssel, nicht `width: 100%`: unter
     `auto` ist die MINDESTBREITE einer Zelle ihr Inhalt, und ein
     134-Zeichen-Titel machte die Spalte 1042 px breit — die Tabelle
     ragte 933 px über die Tafel (gemessen). Mit `max-width: 0` will
     die Zelle gar nichts, `width: 100%` gibt ihr den Rest, und der
     Titel wird gekürzt statt zu schieben. */
  .bib-best .bib-titelsp { width: 100%; max-width: 0; overflow: hidden; }
  .bib-best .bib-neben { white-space: nowrap; }
  .bib-best .bib-weit,
  .bib-best tr.bib-row > td.bib-weit { display: none; }
  .bib-best tr.bib-row > td.tt { white-space: normal; overflow: visible; }
}
@container bibgrid (max-width: 716px) {
  .bib-best .bib-neben,
  .bib-best tr.bib-row > td.bib-neben { display: none; }
}
tr.bib-row .bib-pencil { margin-left: 6px; opacity: 0; }
tr.bib-row:hover .bib-pencil { opacity: 1; }
.bib-rsub { color: var(--b-muted); font-size: 12.5px; }
.bib-nix { color: #c6c0ba; }
.bib-mk {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.mk-eigen { background: #f3f2ef; color: var(--b-muted); }
.mk-abgabe { background: color-mix(in srgb, #e0a020 15%, #fff); color: #7d5807; }
.mk-klasse { background: color-mix(in srgb, #1f9e6a 13%, #fff); color: #1d5b42; }
.mk-mat { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }
.bib-tb.an { background: color-mix(in srgb, var(--accent) 14%, #fff); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.bib-tnote { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--b-muted); }
.bib-note {
  display: inline-block; min-width: 22px; text-align: center; padding: 1px 7px;
  border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px;
}

/* Die Tafel steht NEBEN der Liste, statt oben aufzuspringen: eine Leiste,
   die erscheint, schiebt die Zeilen unter dem Finger weg. */
.bib-tafel {
  width: 264px; flex: none; border-left: 1px solid var(--b-line);
  overflow: auto; padding: 16px 18px; background: #fff;
}
.bib-tafel h3 { margin: 0 0 3px; font-size: 16px; }
.bib-tsub { margin: 0 0 14px; color: var(--b-muted); font-size: 12.5px; }
.bib-tz { display: flex; gap: 10px; padding: 6px 0; font-size: 13px; }
.bib-tz b { min-width: 92px; font-weight: 500; color: var(--b-muted); }
.bib-takt { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.bib-tb {
  padding: 6px 12px; border-radius: 10px; border: 1px solid var(--b-line);
  background: #fff; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.bib-tb:hover { background: #f7f6f3; }
.bib-tb.haupt { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.bib-tb.warn.armed { background: #c6415f; border-color: #c6415f; color: #fff; }
.bib-tb svg { width: 14px; height: 14px; }
@media (max-width: 1100px) { .bib-tafel { display: none; } }
.bib-teilen { display: flex; gap: 4px; margin-top: 6px; }
.bib-ort { width: 30px; height: 26px; border-radius: 8px; border: 1.5px solid var(--b-line); background: #fff; color: var(--b-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.bib-ort:hover { background: #f3f3f1; color: var(--b-ink); }
.bib-ort.on { background: var(--blau); border-color: var(--blau); color: #fff; }
.bib-ort svg { width: 15px; height: 15px; }
/* Auswahl-Häkchen: nur im Auswahl-Modus sichtbar */
.bib-check { position: absolute; top: 8px; left: 8px; z-index: 3; width: 26px; height: 26px; border-radius: 9px; background: #fff; border: 2px solid var(--b-line); box-shadow: 0 2px 5px rgba(0, 0, 0, .12); display: none; align-items: center; justify-content: center; color: transparent; transition: background .12s, border-color .12s; }
.bib-card.picking .bib-check { display: flex; }
.bib-piece.sel .bib-check { background: var(--blau); border-color: var(--blau); color: #fff; }
.bib-check svg { width: 14px; height: 14px; }

/* Rubber-Band + Drag-Ghost (hängen an document.body) */
.bib-rubber { position: fixed; z-index: 95; border: 1.5px solid #1668b3; background: color-mix(in srgb, #1668b3 10%, transparent); border-radius: 6px; pointer-events: none; }
.bib-ghost { position: fixed; z-index: 96; pointer-events: none; background: #26241f; color: #fff; padding: 8px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 800; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .5); white-space: nowrap; }
body.bib-dragging, body.bib-dragging * { cursor: grabbing !important; }

/* Leerzustände (ehrlich) */
.bib-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 54px 20px; text-align: center; color: var(--b-muted); }
.bib-empty svg { width: 52px; height: 52px; color: #d9d5cc; }
.bib-empty h4 { margin: 0; font-size: 16px; font-weight: 800; color: var(--b-ink); }
.bib-empty p { margin: 0; font-size: 13.5px; font-weight: 700; }

/* Toast */
.bib-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); z-index: 97; background: #26241f; color: #fff; padding: 11px 18px; border-radius: 13px; font-size: 14px; font-weight: 800; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--b-bounce); }
.bib-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* schmalere Bildschirme */
@media (max-width: 720px) {
  #bib-pop { padding: 0; }
  .bib-card { height: 100vh; width: 100%; border-radius: 0; }
  .bib-rail { width: 158px; }
}

/* Seiten-Bereiche in der Shell (Wiki & Co.): füllen die Fläche unter
 * der Tab-Leiste; das Modul bringt sein eigenes Innen-Layout mit */
.ton-page { flex: 1; overflow-y: auto; }

/* ---------- Wiki-Tab (js/wikitab.js) ----------
 * Die Lexikon-Seite der Schüler-Shell in #ton-page (Design:
 * docs/mockups/tab-wiki.html). Kern der Designsprache: rahmende
 * Linien — weiße Karten mit sichtbarer Border, die beim Hover
 * deutlicher wird, plus Lift mit Bounce (wie die Landing).
 * Meta-Bereich tintig-ruhig; Blau NUR für den Such-Fokus. */
.wtb { max-width: 1360px; width: 100%; margin: 0 auto; padding: 26px 34px 48px; color: var(--t-ink); font-size: 15px; }
.wtb-head { margin-bottom: 18px; }
.wtb-head h1 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.wtb-head p { margin: 5px 0 0; font-size: 15px; font-weight: 600; color: var(--t-muted); }

/* Suche: die Shell-Such-Pille, Fokus = der eine blaue Systemmoment */
.wtb-search {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--t-panel);
  border: 1.5px solid var(--t-line);
  border-radius: var(--t-r);
  padding: 0 18px;
  height: 60px;
  box-shadow: var(--t-elev);
  transition: border-color .14s ease, box-shadow .14s ease;
  margin-bottom: 22px;
  color: var(--t-muted);
}
.wtb-search:focus-within { border-color: var(--blau); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blau) 20%, transparent); }
.wtb-search svg { flex: none; }
.wtb-search input { flex: 1; color: var(--t-ink); height: 100%; border: none; outline: none; background: none; font: inherit; font-size: 16px; border-radius: 0; padding: 0; }
.wtb-search input::placeholder { color: #a3a099; }
.wtb-search kbd { font-size: 12px; font-weight: 800; color: var(--t-muted); border: 1.5px solid var(--t-line); border-bottom-width: 3px; border-radius: 8px; padding: 3px 9px; background: #fff; font-family: inherit; }

/* Themen-Gruppen */
.wtb-group { margin-bottom: 30px; }
.wtb-gh { display: flex; align-items: center; gap: 9px; margin: 0 2px 13px; }
.wtb-tick { width: 9px; height: 9px; border-radius: 3px; background: color-mix(in srgb, var(--t-ink) 22%, var(--t-line)); flex: none; }
.wtb-gh h2 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--t-bgink); }
.wtb-count { font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--t-muted) 70%, #fff); }
.wtb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }

/* Artikel-Karte — knapp: Titel + eine Zeile; Hover = Linie + Lift */
.wtb-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  min-height: 92px;
  background: var(--t-panel);
  border: 1px solid var(--t-line);
  border-radius: var(--t-r);
  box-shadow: var(--t-elev);
  text-align: left;
  transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), box-shadow .16s ease, border-color .16s ease;
}
.wtb-card:hover { transform: translateY(-5px) scale(1.01); box-shadow: 0 18px 34px -12px rgba(28, 27, 24, .24); border-color: color-mix(in srgb, var(--t-ink) 22%, var(--t-line)); }
.wtb-card:active { transform: translateY(0) scale(.995); }
.wtb-card h3 { margin: 0; font-size: 16.5px; font-weight: 800; color: var(--t-ink); line-height: 1.25; }
.wtb-card p { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--t-muted); line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Leerzustand */
.wtb-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 56px 20px; color: var(--t-muted); font-weight: 600; }
.wtb-emoji { width: 66px; height: 66px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: var(--t-panel); border: 1px solid var(--t-line); box-shadow: var(--t-elev); }
.wtb-empty b { display: block; color: var(--t-ink); font-size: 17px; font-weight: 800; }
.wtb-empty span:not(.wtb-emoji) { font-size: 14.5px; }

/* Artikel-Ansicht: Lese-Spalte. 800 px sind bei 17,5 px Segoe ~101
 * Zeichen je Zeile — schon die großzügige Seite des Lesbaren, erkauft
 * durch den hohen Durchschuss (1.85). NICHT verbreitern; was mehr
 * Platz braucht, bricht AUS der Spalte aus (Regel unten). Zentriert,
 * damit der Restplatz (iPad: 1/6 hochkant, 1/3 quer) beide Seiten
 * bekommt statt nur die rechte. */
.wtb-article { max-width: 800px; margin-inline: auto; }
/* ⚠️ Der AUSBRUCH des Notensatzes aus dieser Spalte steht NICHT hier:
 * Breite und Rand setzt `renderAll` (js/wiki-diagram.js) als
 * Inline-Stil. Erst war es eine Container-Query — die lief auf Lars'
 * Firefox nicht; dann hing sie an `.wtb-body` und ging am
 * Lehrer-Wikiraum vorbei. Eine tragende Funktion gehört weder an ein
 * CSS-Feature noch an einen Klassennamen; die Oberfläche sagt es dem
 * Zeichner mit `{ ausbruch: true }`. Rahmenlos sind die Figuren
 * ohnehin (Regel bei `.wk-diag-bild`). */
.wtb-back { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 800; color: var(--t-muted); margin-bottom: 20px; }
.wtb-back:hover { color: var(--t-ink); }
.wtb-back svg { transition: transform .16s ease; }
.wtb-back:hover svg { transform: translateX(-3px); }
.wtb-article h1 { margin: 0 0 6px; font-size: 33px; font-weight: 900; letter-spacing: -.022em; line-height: 1.12; }
.wtb-lead { margin: 0 0 22px; font-size: 19.5px; font-weight: 600; line-height: 1.5; color: color-mix(in srgb, var(--t-ink) 62%, #fff); }

/* Lesetiefen-Segment (keine Klassenstufen) + ℹ-Panel */
.wtb-tiers { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.wtb-seg { display: inline-flex; background: var(--t-bar); border: 1px solid var(--t-line); border-radius: 13px; padding: 4px; gap: 2px; }
.wtb-seg button { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 800; color: var(--t-muted); transition: background .14s ease, color .14s ease, box-shadow .14s ease; }
.wtb-seg button:hover { color: var(--t-ink); }
.wtb-seg button.wtb-on { background: var(--t-panel); color: var(--t-ink); box-shadow: 0 1px 3px rgba(28, 27, 24, .13); }
.wtb-seg .wtb-dot { width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--t-muted) 45%, #fff); flex: none; }
.wtb-seg button.wtb-miss .wtb-dot { background: transparent; box-shadow: inset 0 0 0 1.4px color-mix(in srgb, var(--t-muted) 45%, #fff); }
.wtb-infobtn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--t-panel); border: 1px solid var(--t-line); color: var(--t-muted); box-shadow: var(--t-elev); transition: border-color .14s ease, color .14s ease, transform .14s ease; flex: none; }
.wtb-infobtn:hover { color: var(--t-ink); border-color: color-mix(in srgb, var(--t-ink) 22%, var(--t-line)); transform: translateY(-1px); }
.wtb-infobtn.wtb-on { color: var(--t-ink); border-color: color-mix(in srgb, var(--t-ink) 30%, var(--t-line)); }
.wtb-info { background: var(--t-panel); border: 1px solid var(--t-line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--t-elev); font-size: 14px; line-height: 1.62; color: var(--t-ink); max-width: 660px; margin-bottom: 20px; }

/* ehrlicher Hinweis bei fehlender Tiefe — tintig-ruhig, kein Blau */
.wtb-fallback { display: flex; gap: 10px; align-items: flex-start; background: #f3f3f1; border: 1px solid color-mix(in srgb, var(--t-ink) 12%, var(--t-line)); border-radius: 12px; padding: 11px 14px; margin-bottom: 20px; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--t-ink); }
.wtb-fallback svg { flex: none; margin-top: 1px; color: var(--t-muted); }

/* Fließtext: groß und luftig — Lesbarkeit ist alles */
.wtb-body { font-size: 17.5px; line-height: 1.85; color: var(--t-ink); }
.wtb-body p { margin: 0 0 1.15em; }
.wtb-body ul, .wtb-body ol { margin: 0 0 1.2em; padding-left: 1.35em; }
.wtb-body li { margin-bottom: .5em; }
.wtb-body li::marker { color: color-mix(in srgb, var(--t-muted) 70%, #fff); }
.wtb-body strong { font-weight: 800; }
.wtb-link { color: var(--t-ink); border-bottom: 2px dotted color-mix(in srgb, var(--t-ink) 42%, #fff); font-weight: 700; padding-bottom: 1px; cursor: pointer; text-decoration: none; }
.wtb-link:hover { border-bottom-color: var(--t-ink); background: color-mix(in srgb, var(--t-ink) 5%, #fff); }
.wtb-link.wtb-off { color: var(--t-muted); border-bottom-color: color-mix(in srgb, var(--t-muted) 35%, #fff); cursor: default; }
.wtb-link.wtb-off:hover { background: none; }

/* Siehe auch */
.wtb-seealso { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--t-line); }
.wtb-seealso h4 { margin: 0 0 12px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--t-bgink); }
.wtb-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.wtb-chip { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--t-panel); border: 1px solid var(--t-line); font-size: 13.5px; font-weight: 700; color: var(--t-ink); transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease; }
.wtb-chip:hover { border-color: color-mix(in srgb, var(--t-ink) 26%, var(--t-line)); transform: translateY(-2px); box-shadow: 0 6px 14px -6px rgba(28, 27, 24, .22); }
.wtb-chip.wtb-off { color: var(--t-muted); cursor: default; }
.wtb-chip.wtb-off:hover { transform: none; box-shadow: none; border-color: var(--t-line); }

@media (max-width: 940px) {
  .wtb { padding: 20px 16px 36px; }
  .wtb-article h1 { font-size: 28px; }
}

/* ---------- Wiki-Erkundung (js/wiki-erkundung.js) ----------
 * Die zweite Leseform des Artikels (Kontrakt §13; Design:
 * docs/mockups/tab-wiki-erkundung.html). Dieselbe Designsprache wie
 * der Wiki-Tab: rahmende Linien, weiße Karten, tintig-ruhig — der
 * Merkkasten folgt .wtb-fallback, kein Blau. EIN Baustein für zwei
 * Flächen: im Schüler-Tab in voller Breite, im Lexikon-Popup als
 * .erk-kompakt (einspaltig, kleinere Köpfe). */
.wtb-formnote { font-size: 13px; font-weight: 700; color: var(--t-muted); }
/* Beim Erkunden wird die Lesespalte breiter (Mockup: 1020) — die
 * Schrittkarte ist zweispaltig und die Bildspalte trägt Notensatz.
 * Kopf und Lead bleiben auf Lesebreite. */
.wtb-article.wtb-erkmode { max-width: 1020px; }
.wtb-erkmode .wtb-lead { max-width: 800px; }

/* Einladungskarte in der Nachlese-Ansicht */
.erk-invite { display: flex; align-items: center; gap: 18px; background: var(--t-panel); border: 1px solid var(--t-line); border-radius: var(--t-r); box-shadow: var(--t-elev); padding: 18px 22px; margin-bottom: 26px; max-width: 800px; transition: transform .16s var(--bounce), box-shadow .16s ease, border-color .16s ease; }
.erk-invite:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -12px rgba(28, 27, 24, .22); border-color: color-mix(in srgb, var(--t-ink) 22%, var(--t-line)); }
.erk-invite .ic { flex: none; width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--t-bar); border: 1px solid var(--t-line); color: var(--t-ink); }
.erk-invite .tx { flex: 1; }
.erk-invite .tx b { display: block; font-size: 16px; font-weight: 800; margin-bottom: 2px; }
.erk-invite .tx span { font-size: 13.5px; font-weight: 600; color: var(--t-muted); }
.erk-invite .go { flex: none; display: inline-flex; align-items: center; gap: 8px; background: var(--t-ink); color: #fff; font-size: 14px; font-weight: 800; border-radius: 999px; padding: 10px 20px; border: none; cursor: pointer; transition: transform .16s var(--bounce), box-shadow .16s ease; }
.erk-invite .go:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(28, 27, 24, .4); }

/* Fortschritt: Segmentleiste, klickbar zum Springen */
.erk-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; max-width: 800px; }
.erk-plabel { font-size: 13px; font-weight: 800; color: var(--t-muted); white-space: nowrap; letter-spacing: .02em; }
.erk-psegs { flex: 1; display: flex; gap: 5px; }
.erk-pseg { flex: 1; height: 6px; min-height: 0; border-radius: 3px; background: #e2e1dc; border: none; padding: 0; cursor: pointer; transition: background .18s ease, transform .14s ease; }
.erk-pseg:hover { transform: scaleY(1.6); }
.erk-pseg.done { background: color-mix(in srgb, var(--t-ink) 45%, var(--t-line)); }
.erk-pseg.cur { background: var(--t-ink); }

/* Schrittkarte: Text links, Bild samt Bildtitel und Hörauftrag rechts —
 * der Erklärtext steht AM Bild; Schritte ohne Diagramm laufen
 * einspaltig und schmaler. */
.erk-card { background: var(--t-panel); border: 1px solid var(--t-line); border-radius: var(--t-r); box-shadow: var(--t-elev); padding: 30px 34px 26px; margin-bottom: 18px; }
.erk-cols { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 34px; align-items: start; }
.erk-cols.solo { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
/* Gestapelt für Notensatz (der bricht in der Seitenspalte in Turmhöhe
 * um): Text auf Lesebreite, Bild volle Karte, Merksatz am Schrittende. */
.erk-cols.breit { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.erk-cols.breit .erk-lese { max-width: 680px; }
.erk-cols.breit .erk-merke { max-width: 680px; margin-top: 0; }
.erk-kopf { margin: 0 0 14px; font-size: 24px; font-weight: 900; letter-spacing: -.015em; line-height: 1.22; }
.erk-text { font-size: 16.5px; line-height: 1.78; }
.erk-text p { margin: 0 0 1em; }
.erk-text p:last-child { margin-bottom: 0; }
.erk-text ul { margin: .2em 0 0; padding-left: 1.3em; }
.erk-text li { margin-bottom: .55em; }
.erk-text li::marker { color: color-mix(in srgb, var(--t-muted) 70%, #fff); }

/* „Merk dir" — der Begriff kommt NACH der Erfahrung, deshalb steht er
 * hier und nicht in der Überschrift. Tintig wie .wtb-fallback. */
.erk-merke { margin-top: 18px; background: #f3f3f1; border: 1px solid color-mix(in srgb, var(--t-ink) 12%, var(--t-line)); border-radius: 12px; padding: 13px 16px 12px; font-size: 14.5px; line-height: 1.6; font-weight: 600; }
.erk-merke small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--t-bgink); margin-bottom: 4px; }

/* Bildspalte: die normale wk-diag-Figur bekommt hier einen Kasten;
 * der Play-Knopf des Zeichners sitzt wie überall an der Figur. */
.erk-bild .wk-diag { margin: 0; background: #fdfdfc; border: 1px solid var(--t-line); border-radius: 14px; padding: 14px 14px 10px; }
/* Eine Figur mit Wunsch-Layoutbreite (`data-breite`) schrumpft im
 * Behälter, statt ihn zu sprengen — die Skalierprüfung in renderAll
 * hängt dann „Groß ansehen" an. */
.erk-bild .wk-diag-bild svg { max-width: 100%; height: auto; }
.erk-hoeren { margin-top: 14px; font-size: 14px; line-height: 1.55; font-weight: 600; }
.erk-hoeren small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--t-bgink); margin-bottom: 3px; }

/* Navigation unter der Karte */
.erk-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.erk-btn { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 800; border-radius: 999px; padding: 11px 22px; cursor: pointer; transition: transform .16s var(--bounce), box-shadow .16s ease, border-color .16s ease, color .14s ease; }
.erk-btn.back { border: 1.5px solid var(--t-line); background: var(--t-panel); color: var(--t-muted); }
.erk-btn.back:hover { color: var(--t-ink); border-color: color-mix(in srgb, var(--t-ink) 22%, var(--t-line)); transform: translateY(-2px); }
.erk-btn.back:disabled { opacity: .35; cursor: default; }
.erk-btn.back:disabled:hover { transform: none; color: var(--t-muted); border-color: var(--t-line); }
.erk-btn.next { background: var(--t-ink); color: #fff; border: none; }
.erk-btn.next:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(28, 27, 24, .45); }
.erk-key { font-size: 12.5px; font-weight: 700; color: #b5b2aa; }

/* Fußzeile: „Auf einer Seite lesen" ↔ „Schritt für Schritt lesen" */
.erk-fuss { display: flex; justify-content: center; margin: 6px 0 40px; }
.erk-fuss.oben { margin: 0 0 14px; justify-content: flex-end; max-width: 800px; }
.erk-fusslink { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; color: var(--t-muted); padding: 7px 12px; border: none; background: none; cursor: pointer; border-radius: 999px; transition: color .14s ease, background .14s ease; }
.erk-fusslink:hover { color: var(--t-ink); background: #ecebe7; }
.erk-schluss { max-width: 800px; }

/* Enge Fläche (Lexikon-Popup): einspaltig, kleinere Köpfe */
.erk-kompakt .erk-cols { grid-template-columns: 1fr; gap: 18px; }
.erk-kompakt .erk-card { padding: 18px 18px 16px; }
.erk-kompakt .erk-kopf { font-size: 18px; }
.erk-kompakt .erk-text { font-size: 14.5px; line-height: 1.65; }
.erk-kompakt .erk-key { display: none; }

@media (max-width: 860px) {
  .erk-cols { grid-template-columns: 1fr; gap: 22px; }
  .erk-card { padding: 22px 20px 20px; }
  .erk-invite { flex-wrap: wrap; }
}

/* ============================================================
   §„Klasse-Tab" (.klt-) — der Bereich „Klasse" als Seite in
   #ton-page. Design: docs/mockups/tab-klasse.html. Meta-Bereich:
   keine eigene Bereichsfarbe (Tinte/Weiß), Blau = System + Eigenes,
   Grün = Live. Rahmende Linien + Hover-Lift (Bounce) wie die Landing.
   ============================================================ */
.klt { min-height: 100%; }
.klt-page { max-width: 1360px; width: 100%; margin: 0 auto; padding: 26px 34px 40px; display: flex; flex-direction: column; gap: 26px; }

.klt-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.klt-headmain { flex: 1; min-width: 240px; }
.klt-h1 { margin: 0; font-size: 27px; font-weight: 900; letter-spacing: -.02em; }
.klt-sub { margin: 5px 0 0; font-size: 14.5px; font-weight: 700; color: var(--t-muted); }
.klt-sub b { color: var(--t-ink); font-weight: 800; }
.klt-headside { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.klt-code { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--t-panel); border: 1.5px solid var(--t-line); box-shadow: var(--t-elev); font-size: 13.5px; font-weight: 800; color: var(--t-ink); }
.klt-code small { font-size: 11.5px; font-weight: 800; color: var(--t-muted); text-transform: uppercase; letter-spacing: .06em; }
.klt-code .dot { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--t-muted) 45%, var(--t-line)); }
.klt-why { width: 38px; height: 38px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--t-panel); border: 1.5px solid var(--t-line); box-shadow: var(--t-elev); color: var(--t-muted); font-size: 17px; font-weight: 900; font-style: italic; transition: transform .16s var(--bounce), border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.klt-why:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--blau) 40%, var(--t-line)); color: var(--blau); box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--blau) 40%, transparent); }
.klt-why.open { background: color-mix(in srgb, var(--blau) 10%, #fff); border-color: color-mix(in srgb, var(--blau) 45%, var(--t-line)); color: var(--blau); }
.klt-whypanel { margin-top: -8px; background: color-mix(in srgb, var(--blau) 5%, var(--t-panel)); border: 1px solid color-mix(in srgb, var(--blau) 22%, var(--t-line)); border-radius: var(--t-r); box-shadow: var(--t-elev); padding: 18px 22px; display: flex; gap: 15px; align-items: flex-start; }
.klt-whyicon { flex: none; width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--blau) 14%, #fff); color: var(--blau); }
.klt-whytext { font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--t-ink); }
.klt-whytext b { font-weight: 800; }
.klt-whytext p { margin: 0 0 6px; }
.klt-whytext p:last-child { margin-bottom: 0; color: var(--t-muted); }

.klt-sec { display: flex; flex-direction: column; gap: 14px; }
.klt-sechead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.klt-sectitle { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 900; letter-spacing: -.01em; }
.klt-sectitle .live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--blau); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blau) 24%, transparent); animation: tonPulse 1.5s ease-in-out infinite; }
.klt-seccount { font-size: 12.5px; font-weight: 800; color: var(--t-muted); background: color-mix(in srgb, var(--t-muted) 12%, #fff); border-radius: 999px; padding: 3px 10px; }
.klt-secflex { flex: 1; }
.klt-seg { display: inline-flex; padding: 4px; gap: 3px; background: var(--t-panel); border: 1.5px solid var(--t-line); border-radius: 13px; box-shadow: var(--t-elev); }
.klt-segbtn { padding: 6px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 800; color: var(--t-muted); transition: background .14s ease, color .14s ease; }
.klt-segbtn:hover { color: var(--t-ink); }
.klt-segbtn.active { background: color-mix(in srgb, var(--blau) 12%, #fff); color: var(--blau); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blau) 26%, transparent); }

.klt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 16px; }
.klt-card { position: relative; display: flex; flex-direction: column; background: var(--t-panel); border: 1px solid var(--t-line); border-radius: var(--t-r); overflow: hidden; box-shadow: var(--t-elev); text-align: left; cursor: pointer; transition: transform .16s var(--bounce), box-shadow .16s ease, border-color .16s ease; }
.klt-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 18px 34px -12px rgba(28, 27, 24, .26); border-color: color-mix(in srgb, var(--t-ink) 16%, var(--t-line)); }
.klt-card:active { transform: translateY(0) scale(.995); }
.klt-card.is-mine:hover { border-color: color-mix(in srgb, var(--blau) 40%, var(--t-line)); box-shadow: 0 18px 34px -12px color-mix(in srgb, var(--blau) 40%, transparent); }
.klt-card.is-live:hover { border-color: color-mix(in srgb, var(--blau) 42%, var(--t-line)); box-shadow: 0 18px 34px -12px color-mix(in srgb, var(--blau) 42%, transparent); }
.klt-prev { position: relative; height: 104px; background: radial-gradient(130% 100% at 50% -30%, rgba(28, 27, 24, .04), transparent 72%), #fbfbfa; border-bottom: 1px solid var(--t-line); overflow: hidden; }
.klt-prev::before { content: ""; position: absolute; left: 9%; right: 9%; top: 50%; height: 41px; transform: translateY(-50%); background: repeating-linear-gradient(180deg, rgba(28, 27, 24, .10) 0, rgba(28, 27, 24, .10) 1px, transparent 1px, transparent 10px); }
.klt-pulse { position: absolute; top: 11px; left: 11px; z-index: 2; width: 13px; height: 13px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gruen) 26%, transparent); animation: tonPulse 1.5s ease-in-out infinite; }
.klt-werk { position: absolute; top: 9px; left: 11px; z-index: 2; font-size: 16px; line-height: 1; }
.klt-star { position: absolute; top: 8px; right: 8px; z-index: 3; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--t-muted); background: color-mix(in srgb, #fff 82%, transparent); box-shadow: inset 0 0 0 1px var(--t-line); cursor: pointer; transition: color .14s ease, transform .14s ease, box-shadow .14s ease; }
.klt-star svg { width: 17px; height: 17px; }
.klt-star:hover { transform: scale(1.1); color: var(--bernstein); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bernstein) 40%, var(--t-line)); }
.klt-star.on { color: var(--bernstein); }
.klt-meta { padding: 11px 14px 13px; display: flex; flex-direction: column; gap: 3px; }
.klt-ttitle { font-size: 15px; font-weight: 800; color: var(--t-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.klt-tsub { font-size: 12.5px; font-weight: 700; color: var(--t-muted); display: flex; align-items: center; gap: 6px; }
.klt-tsub.mine { color: var(--blau); }
.klt-tsub.live { color: var(--gruen); }
.klt-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .01em; background: color-mix(in srgb, var(--blau) 12%, #fff); color: var(--blau); }
.klt-badge.g { background: color-mix(in srgb, var(--blau) 13%, #fff); color: var(--blau); }
.klt-grid[data-filter="mine"] .klt-card:not(.is-mine) { display: none; }
.klt-empty-filter { color: var(--t-bgink); font-size: 14px; font-weight: 600; padding: 8px 2px; }
.klt-empty-filter[hidden] { display: none; }
.klt-empty-hint { color: var(--t-bgink); font-size: 14px; font-weight: 600; padding: 8px 2px; }
.klt-blank { display: flex; align-items: center; gap: 18px; padding: 26px 28px; background: radial-gradient(120% 100% at 10% -10%, rgba(28, 27, 24, .015), transparent 60%), var(--t-panel); border: 1.5px dashed color-mix(in srgb, var(--t-ink) 14%, var(--t-line)); border-radius: var(--t-r); }
.klt-blankicon { flex: none; width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--t-muted) 12%, #fff); color: color-mix(in srgb, var(--t-muted) 60%, var(--t-ink)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--t-muted) 20%, transparent); }
/* Dieselbe Karte, aber anklickbar: der gestrichelte Rahmen sagt „hier
   ist noch nichts", der Knopf „hier kannst du etwas anfangen". */
.klt-blankbtn { width: 100%; text-align: left; cursor: pointer; font: inherit; transition: transform .16s var(--bounce), border-color .16s ease, box-shadow .16s ease; }
.klt-blankbtn:hover { transform: translateY(-3px); border-style: solid; border-color: color-mix(in srgb, var(--blau) 40%, var(--t-line)); box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--blau) 40%, transparent); }
.klt-blankbtn:hover .klt-blankicon { background: color-mix(in srgb, var(--blau) 12%, #fff); color: var(--blau); }
.klt-blankbtn:active { transform: translateY(0) scale(.995); }
.klt-blanktext { min-width: 0; }
.klt-blanktext b { display: block; font-size: 15.5px; font-weight: 800; color: var(--t-ink); margin-bottom: 3px; }
.klt-blanktext span { display: block; font-size: 13.5px; font-weight: 600; color: var(--t-muted); line-height: 1.45; }
@media (max-width: 620px) {
  .klt-page { padding: 18px 16px 30px; }
  .klt-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .klt-h1 { font-size: 23px; }
}

/* ============================================================
   §„Portfolio-Tab" (.pft-) — die Einreichungs- & Bewertungsmappe
   als Seite in #ton-page. Design: docs/mockups/tab-portfolio.html.
   Meta-Bereich: neutrale Tinte; Blau nur für „Ansehen & anhören",
   Bernstein fürs 🏆-Werk-Abzeichen. Rahmende Linien + Hover-Lift.
   ============================================================ */
.pft { min-height: 100%; }
.pft-page { max-width: 1360px; margin: 0 auto; padding: 26px 34px 72px; }
.pft-head { display: flex; align-items: center; gap: 15px; margin-bottom: 8px; }
.pft-hico { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; flex: none; background: color-mix(in srgb, var(--t-muted) 13%, #fff); color: color-mix(in srgb, var(--t-muted) 58%, var(--t-ink)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--t-muted) 20%, transparent); }
.pft-head h1 { font-size: 27px; font-weight: 900; letter-spacing: -.02em; margin: 0; }
.pft-who { margin: 2px 0 0; color: var(--t-muted); font-weight: 800; font-size: 13.5px; }
.pft-bilanz { display: flex; align-items: center; gap: 10px; margin: 0 0 26px 71px; font-size: 13.5px; font-weight: 800; color: var(--t-muted); }
.pft-bilanz b { color: var(--t-ink); font-weight: 900; }
.pft-bilanz .sep { color: color-mix(in srgb, var(--t-muted) 55%, #fff); }
.pft-blank { color: var(--t-bgink); font-size: 14.5px; font-weight: 600; padding: 20px 2px; }
.pft-mappe { display: flex; flex-direction: column; gap: 12px; }
.pft-entry { --mark: var(--t-muted); position: relative; display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 16px 20px; border-radius: 18px; background: var(--t-panel); border: 1.5px solid var(--t-line); box-shadow: var(--t-elev); cursor: pointer; transition: transform .16s var(--bounce), box-shadow .16s ease, border-color .16s ease; }
.pft-entry:hover { transform: translateY(-4px) scale(1.005); border-color: color-mix(in srgb, var(--t-ink) 20%, var(--t-line)); box-shadow: 0 20px 38px -16px rgba(28, 27, 24, .3); }
.pft-entry:active { transform: translateY(0) scale(.997); }
.pft-entry.werk { --mark: var(--bernstein); }
.pft-entry.frei { --mark: color-mix(in srgb, var(--t-muted) 70%, var(--t-ink)); }
.pft-etype { display: flex; align-items: center; justify-content: center; flex: none; width: 50px; height: 50px; border-radius: 15px; background: color-mix(in srgb, var(--mark) 14%, #fff); color: var(--mark); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--mark) 24%, transparent); }
.pft-etype svg { width: 27px; height: 27px; }
.pft-einfo { flex: 1; min-width: 0; }
.pft-etitle { display: flex; align-items: center; gap: 8px; }
.pft-etitle b { font-size: 17px; font-weight: 900; letter-spacing: -.01em; }
.pft-elock { display: inline-flex; color: color-mix(in srgb, var(--t-muted) 62%, #fff); flex: none; }
.pft-elock svg { width: 14px; height: 14px; }
.pft-emeta { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 800; color: var(--t-muted); }
.pft-emeta .tlabel { color: color-mix(in srgb, var(--mark) 78%, var(--t-ink)); }
.pft-emeta .dot { color: color-mix(in srgb, var(--t-muted) 50%, #fff); margin: 0 5px; }
.pft-estat { display: flex; align-items: center; gap: 10px; flex: none; }
.pft-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 900; letter-spacing: .01em; }
.pft-pill svg { width: 15px; height: 15px; }
.pft-pill.wait { color: var(--t-muted); background: #fff; border: 1.5px solid var(--t-line); }
.pft-pill.done { color: var(--t-ink); background: color-mix(in srgb, var(--t-ink) 8%, #fff); border: 1.5px solid color-mix(in srgb, var(--t-ink) 16%, var(--t-line)); }
.pft-pill.done svg { color: var(--gruen); }
.pft-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 10px; font-size: 16px; font-weight: 900; color: var(--t-ink); background: #fff; border: 1.5px solid color-mix(in srgb, var(--t-ink) 18%, var(--t-line)); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--t-ink) 8%, transparent); }
.pft-echev { flex: none; color: color-mix(in srgb, var(--t-muted) 55%, var(--t-panel)); transition: transform .16s ease; }
.pft-entry:hover .pft-echev { transform: translateX(3px); }

.pft-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(28, 27, 24, .34); display: none; align-items: center; justify-content: center; padding: 20px; }
.pft-scrim.on { display: flex; }
.pft-karte { width: 460px; max-width: 100%; background: var(--t-panel); border-radius: 22px; border: 1px solid var(--t-line); box-shadow: 0 24px 60px -18px rgba(28, 27, 24, .5); overflow: hidden; animation: pftPop .22s var(--bounce); }
@keyframes pftPop { from { transform: scale(.94) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.pft-karte header { display: flex; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--t-line); }
.pft-htype { display: flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; border-radius: 13px; background: color-mix(in srgb, var(--mark, var(--t-muted)) 14%, #fff); color: var(--mark, var(--t-muted)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--mark, var(--t-muted)) 24%, transparent); }
.pft-htype svg { width: 24px; height: 24px; }
.pft-hgrow { flex: 1; min-width: 0; }
.pft-karte header b { display: block; font-size: 18px; font-weight: 900; letter-spacing: -.01em; }
.pft-karte header small { display: block; font-size: 12px; font-weight: 800; color: var(--t-muted); margin-top: 1px; }
.pft-x { align-self: flex-start; font-size: 20px; color: var(--t-muted); line-height: 1; cursor: pointer; }
.pft-kbody { padding: 18px 20px 22px; }
.pft-frozen { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--t-muted); margin-bottom: 13px; }
.pft-frozen svg { width: 15px; height: 15px; color: color-mix(in srgb, var(--t-muted) 75%, #fff); }
.pft-view { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 13px; border-radius: 14px; font-size: 15.5px; font-weight: 900; color: #fff; background: var(--blau); box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--blau) 55%, transparent); cursor: pointer; transition: transform .14s var(--bounce), box-shadow .14s ease; }
.pft-view:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -8px color-mix(in srgb, var(--blau) 58%, transparent); }
.pft-view:active { transform: translateY(0); }
.pft-view svg { width: 19px; height: 19px; }
.pft-kdiv { height: 1px; background: var(--t-line); margin: 20px 0; }
.pft-loading { color: var(--t-muted); font-size: 13px; }
.pft-alabel { display: block; font-size: 11.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 12px; }
.pft-grow { display: flex; gap: 16px; align-items: flex-start; }
.pft-notebox { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 78px; padding: 12px 10px; border-radius: 16px; background: color-mix(in srgb, var(--bernstein) 7%, #fff); border: 1.5px solid color-mix(in srgb, var(--bernstein) 26%, var(--t-line)); }
.pft-notebox b { font-size: 34px; font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--t-ink); }
.pft-notebox small { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: color-mix(in srgb, var(--bernstein) 82%, var(--t-ink)); margin-top: 6px; }
.pft-gtext { flex: 1; min-width: 0; }
.pft-quote { position: relative; margin: 2px 0 0; padding-left: 15px; font-size: 14.5px; font-weight: 600; line-height: 1.5; color: color-mix(in srgb, var(--t-ink) 82%, var(--t-muted)); }
.pft-quote::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--bernstein) 40%, var(--t-line)); }
.pft-quote.pft-nocomment { color: var(--t-muted); font-style: italic; }
.pft-gmeta { display: block; margin-top: 11px; font-size: 12.5px; font-weight: 800; color: var(--t-muted); }
.pft-assess.wait { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: #fbfbfa; border: 1.5px solid var(--t-line); }
.pft-wico { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1.5px solid var(--t-line); color: var(--t-muted); }
.pft-wico svg { width: 24px; height: 24px; }
.pft-assess.wait b { display: block; font-size: 15px; font-weight: 900; }
.pft-assess.wait span { display: block; font-size: 13px; font-weight: 700; color: var(--t-muted); margin-top: 2px; }
.pft-infobtn { position: fixed; right: 20px; bottom: 20px; z-index: 55; width: 46px; height: 46px; border-radius: 50%; background: var(--t-ink); color: #fff; font-size: 22px; font-weight: 800; font-style: italic; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .5); cursor: pointer; }
.pft-infopanel { position: fixed; right: 20px; bottom: 78px; z-index: 55; width: 384px; max-width: calc(100vw - 40px); max-height: 72vh; overflow-y: auto; background: var(--t-panel); border: 1px solid var(--t-line); border-radius: 18px; box-shadow: 0 24px 60px -18px rgba(28, 27, 24, .5); padding: 18px 20px; display: none; }
.pft-infopanel.on { display: block; }
.pft-infopanel h4 { margin: 0 0 10px; font-size: 15px; font-weight: 900; }
.pft-infopanel li { font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--t-ink) 78%, #fff); line-height: 1.5; margin-bottom: 9px; }
@media (max-width: 720px) {
  .pft-page { padding: 18px 16px 72px; }
  .pft-bilanz { margin-left: 0; }
  /* ⚠️⚠️ **Der Umbruch war der Fehler, nicht die Enge.** `flex-wrap: wrap`
   * plus `margin-left` sollte die Statusmarke in eine zweite Zeile
   * setzen — aber `.pft-einfo` trägt `flex: 1; min-width: 0`, darf also
   * beliebig schrumpfen und tut das lieber, als die Marke gehen zu
   * lassen. Gemessen bei 390 px: Titelspalte **5 px** (deutsch 35), der
   * Text lief daneben über und brach nach jedem Wort um — „Mein Lied 1"
   * stand auf drei Zeilen, die Karte war 191 statt 84 px hoch (Lars,
   * 03.08.2026: „seltsame zeilenumbrüche"). ⚠️ Dieselbe Falle wie bei
   * `.ton-scroll` in der Kachelzeile: EIN schrumpffähiges Kind hebelt
   * jeden Umbruch aus.
   * Stattdessen sitzt die Marke in der ECKE (Lars: „rechts oben in die
   * abgerundete ecke … statt zentral") — aus dem Fluss genommen, also
   * ohne Anspruch auf Breite; die Zeile darunter gehört ganz dem Titel.
   * ⚠️ Der Kopfstreifen (40 px) ist der PREIS dafür und muss so hoch sein
   * wie die Marke, sonst deckt sie den Titel zu; die Karte kommt damit
   * auf 106 px. ⚠️ Gemessen unauffällig ab 720 px: im Querformat (844)
   * greift dieser Block gar nicht, dort standen Titel und Marke immer
   * schon nebeneinander. */
  .pft-entry { flex-wrap: nowrap; padding-top: 40px; }
  .pft-estat { position: absolute; top: 9px; right: 13px; margin-left: 0; }
  .pft-etitle b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Werkstatt-Tab (js/werkstatttab.js) ----------
 * Die Werkstatt-Seite der Schüler-Shell in #ton-page (Design:
 * docs/mockups/tab-werkstatt.html). ROSA = Bereichsfarbe. Rahmende
 * Linien als Kern: Hover = Lift + Border-Betonung in der Bereichsfarbe. */
/* Klavierpraxis-Seite (js/klaviertab.js): baugleich, Bernstein-Familie */
.wkt.kvt { --fam: var(--gruen); }
.kvt-coming { opacity: .62; }
.kvt-comingcard { display: flex; flex-direction: column; gap: 3px; border: 1.5px dashed var(--t-line); border-radius: 14px; padding: 14px 18px; background: #fff; }
.kvt-comingcard b { font-size: 15px; font-weight: 800; color: var(--t-ink); }
.kvt-comingcard span { font-size: 12.5px; font-weight: 700; color: var(--t-bgink); }
.wkt { --fam: var(--rosa); max-width: 1360px; width: 100%; margin: 0 auto; padding: 26px 34px 72px; color: var(--t-ink); font-size: 15px; }
.wkt-head { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; }
.wkt-hico { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; flex: none; background: color-mix(in srgb, var(--fam) 16%, #fff); color: var(--fam); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fam) 22%, transparent); }
.wkt-head h1 { font-size: 27px; font-weight: 900; letter-spacing: -.02em; margin: 0; }
.wkt-head p { margin: 2px 0 0; color: var(--t-muted); font-weight: 800; font-size: 13px; letter-spacing: .01em; }
.wkt-loaderr { padding: 40px 8px; color: var(--t-muted); font-weight: 700; }

/* „Weiter mit" — die ganze Fläche ist der Knopf */
.wkt-weiter {
  display: flex; align-items: center; gap: 22px; margin: 0 0 16px; width: 100%; text-align: left;
  padding: 22px 26px; border-radius: 22px;
  background: radial-gradient(120% 130% at 0% 0%, color-mix(in srgb, var(--fam) 13%, transparent), transparent 58%), var(--t-panel);
  border: 1.5px solid color-mix(in srgb, var(--fam) 28%, var(--t-line));
  box-shadow: var(--t-elev);
  transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), box-shadow .16s ease, border-color .16s ease;
}
.wkt-weiter:hover { transform: translateY(-4px) scale(1.008); border-color: color-mix(in srgb, var(--fam) 62%, var(--t-line)); box-shadow: 0 20px 40px -14px color-mix(in srgb, var(--fam) 52%, transparent); }
.wkt-weiter:active { transform: translateY(0) scale(.997); }
.wkt-wgrow { display: block; flex: 1; min-width: 0; }
.wkt-wbadge { display: block; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--fam); }
.wkt-wtitle { display: block; margin: 3px 0; font-size: 22px; font-weight: 900; letter-spacing: -.015em; }
.wkt-wmod { display: block; color: var(--t-muted); font-weight: 800; font-size: 13px; }
.wkt-wsegs { display: flex; gap: 5px; margin: 12px 0 0; align-items: center; }
.wkt-wsegs i { width: 26px; height: 7px; border-radius: 3.5px; background: color-mix(in srgb, var(--fam) 14%, var(--t-line)); }
.wkt-wsegs i.on { background: var(--fam); }
.wkt-wsegs small { margin-left: 6px; font-size: 12.5px; font-weight: 800; color: var(--t-muted); }
.wkt-wgo { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--fam) 12%, #fff); color: var(--fam); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fam) 22%, transparent); transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), background .16s ease; }
.wkt-weiter:hover .wkt-wgo { transform: translateX(4px); background: var(--fam); color: #fff; box-shadow: none; }

/* Assistent-Einstieg */
.wkt-wiz {
  display: flex; align-items: center; gap: 15px; width: 100%; text-align: left; margin: 0 0 30px;
  padding: 15px 20px; border-radius: 18px; background: color-mix(in srgb, var(--fam) 4%, var(--t-panel));
  border: 1.5px dashed color-mix(in srgb, var(--fam) 32%, var(--t-line));
  transition: transform .15s ease, border-color .15s ease;
}
.wkt-wiz:hover { transform: translateY(-2px); border-style: solid; border-color: color-mix(in srgb, var(--fam) 55%, var(--t-line)); }
.wkt-wizico { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; flex: none; background: color-mix(in srgb, var(--fam) 12%, #fff); color: var(--fam); }
.wkt-wiztext { flex: 1; min-width: 0; }
.wkt-wizh { display: block; font-size: 15.5px; font-weight: 900; }
.wkt-wizp { display: block; font-size: 12.5px; font-weight: 700; color: var(--t-muted); margin-top: 1px; }
.wkt-wizgo { color: color-mix(in srgb, var(--t-muted) 60%, var(--t-panel)); flex: none; transition: transform .16s ease; }
.wkt-wiz:hover .wkt-wizgo { transform: translateX(3px); color: var(--fam); }

/* Stufen-Pfad */
.wkt-stages { display: flex; flex-direction: column; gap: 10px; }
.wkt-stage { position: relative; padding-left: 40px; padding-bottom: 20px; }
.wkt-stage::before { content: ""; position: absolute; left: 14px; top: 6px; bottom: 0; width: 3px; border-radius: 2px; background: var(--t-line); }
.wkt-stage:last-child::before { bottom: auto; height: 30px; }
.wkt-stage.done::before, .wkt-stage.current::before { background: color-mix(in srgb, var(--fam) 30%, var(--t-line)); }
.wkt-node { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; z-index: 2; background: #fff; color: var(--t-muted); border: 3px solid var(--t-line); }
.wkt-stage.done .wkt-node { background: var(--fam); color: #fff; border-color: var(--fam); }
.wkt-stage.current .wkt-node { color: var(--fam); border-color: var(--fam); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fam) 18%, transparent); }
.wkt-stag { display: flex; align-items: baseline; gap: 9px; margin: 2px 0 11px; }
.wkt-stag b { font-size: 13.5px; font-weight: 900; letter-spacing: .01em; }
.wkt-stag span { font-size: 12.5px; font-weight: 800; color: var(--t-muted); }

/* Hauptmodul-Karte */
.wkt-mod { position: relative; border-radius: 20px; background: var(--t-panel); border: 1.5px solid color-mix(in srgb, var(--fam) 20%, var(--t-line)); box-shadow: var(--t-elev); transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), box-shadow .16s ease, border-color .16s ease; }
.wkt-mod:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -14px color-mix(in srgb, var(--fam) 40%, rgba(28, 27, 24, .28)); border-color: color-mix(in srgb, var(--fam) 50%, var(--t-line)); }
.wkt-modtop { display: block; width: 100%; text-align: left; padding: 18px 22px; }
.wkt-mrow { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.wkt-qbadge { font-size: 10.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--fam); background: color-mix(in srgb, var(--fam) 12%, #fff); border-radius: 20px; padding: 4px 11px; }
.wkt-mtitle { font-size: 19px; font-weight: 900; letter-spacing: -.01em; }
.wkt-count { margin-left: auto; font-size: 13px; font-weight: 900; color: var(--fam); }
.wkt-mgoal { margin: 8px 0 0; color: var(--t-muted); font-weight: 700; font-size: 13.5px; }
.wkt-mgoal b { color: color-mix(in srgb, var(--t-ink) 72%, var(--t-muted)); font-weight: 900; }
.wkt-segrow { display: flex; gap: 4px; margin-top: 12px; align-items: center; }
.wkt-segrow i { width: 24px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--fam) 13%, var(--t-line)); }
.wkt-segrow i.on { background: var(--fam); }
.wkt-chev { position: absolute; right: 20px; bottom: 18px; color: color-mix(in srgb, var(--t-muted) 55%, var(--t-panel)); transition: transform .18s ease; display: block; }
.wkt-mod.open .wkt-chev { transform: rotate(90deg); }
.wkt-lessons { display: none; margin: 0 22px 16px; }
.wkt-mod.open .wkt-lessons { display: block; }
.wkt-lesson { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 11px 14px; border-radius: 13px; margin-bottom: 6px; background: #fbfbfa; border: 1px solid var(--t-line); transition: background .12s ease, transform .12s ease, border-color .12s ease; }
.wkt-lesson:hover { background: color-mix(in srgb, var(--fam) 6%, #fff); border-color: color-mix(in srgb, var(--fam) 38%, var(--t-line)); transform: translateX(2px); }
.wkt-mark { width: 24px; height: 24px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; background: color-mix(in srgb, var(--fam) 12%, #fff); color: var(--fam); }
.wkt-lesson.done .wkt-mark { background: var(--fam); color: #fff; }
.wkt-ltext { min-width: 0; }
.wkt-lt { display: block; font-weight: 800; font-size: 14.5px; }
.wkt-lg { display: block; color: var(--t-muted); font-weight: 600; font-size: 12.5px; margin-top: 1px; }
.wkt-werkrow { background: color-mix(in srgb, var(--bernstein) 7%, #fff); border-color: color-mix(in srgb, var(--bernstein) 22%, var(--t-line)); }
.wkt-werkrow:hover { background: color-mix(in srgb, var(--bernstein) 11%, #fff); border-color: color-mix(in srgb, var(--bernstein) 44%, var(--t-line)); }
.wkt-werkrow .wkt-mark { background: color-mix(in srgb, var(--bernstein) 16%, #fff); color: var(--bernstein); }

/* Vertiefungs-Slots — ehrlicher Leerzustand */
.wkt-verts { margin-top: 12px; }
.wkt-more { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-radius: 16px; background: color-mix(in srgb, var(--fam) 4%, #fff); border: 2px dashed color-mix(in srgb, var(--fam) 26%, var(--t-line)); }
.wkt-moreico { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 11px; flex: none; background: color-mix(in srgb, var(--fam) 12%, #fff); color: var(--fam); }
.wkt-moretext b { font-size: 14px; font-weight: 900; color: color-mix(in srgb, var(--fam) 72%, var(--t-ink)); }
.wkt-moretext span { display: block; font-size: 12px; font-weight: 700; color: var(--t-muted); margin-top: 2px; }

@media (max-width: 720px) {
  .wkt { padding: 18px 16px 72px; }
  .wkt-weiter { flex-direction: column; align-items: flex-start; }
  .wkt-wgo { align-self: flex-end; }
}

/* ---------- Übungen-Tab (js/uebungentab.js) ----------
 * Die Übungen-Seite der Schüler-Shell in #ton-page (Design:
 * docs/mockups/tab-uebungen.html). GRÜN = Bereichsfarbe. Keine echte
 * Tonhöhen-Grafik hier -> die Stufenfarb-Formel kommt bewusst NICHT vor. */
.uet { --fam: var(--bernstein); max-width: 1360px; width: 100%; margin: 0 auto; padding: 20px 34px 48px; color: var(--t-ink); font-size: 15px; }
.uet-top { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.uet-hico { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 15px; flex: none; background: color-mix(in srgb, var(--fam) 16%, #fff); color: var(--fam); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fam) 22%, transparent); }
.uet-top h1 { font-size: 22px; font-weight: 900; letter-spacing: -.02em; margin: 0; }

/* „Übung starten": Karte über die ganze Breite */
.uet-start {
  position: relative; display: flex; align-items: center; gap: 20px; width: 100%; text-align: left;
  margin-top: 16px; min-height: 112px; padding: 20px 26px; border-radius: 22px; cursor: pointer;
  background: radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--fam) 13%, transparent), transparent 55%), color-mix(in srgb, var(--fam) 6%, var(--t-panel));
  border: 1.5px solid color-mix(in srgb, var(--fam) 36%, var(--t-line));
  box-shadow: var(--t-elev);
  transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), box-shadow .16s ease, border-color .16s ease;
}
.uet-start:hover { transform: translateY(-4px); border-color: var(--fam); box-shadow: 0 20px 40px -14px color-mix(in srgb, var(--fam) 52%, transparent); }
.uet-start:active { transform: translateY(0) scale(.997); }
.uet-play { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; flex: none; background: var(--fam); color: #fff; box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--fam) 66%, transparent); }
.uet-stext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.uet-slabel { font-size: 22px; font-weight: 900; letter-spacing: -.015em; color: color-mix(in srgb, var(--fam) 78%, var(--t-ink)); white-space: nowrap; }
.uet-pmeta { font-size: 12.5px; font-weight: 800; color: var(--t-muted); white-space: nowrap; }
.uet-pool { display: flex; gap: 7px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.uet-pool b { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: #fff; border: 1.5px solid color-mix(in srgb, var(--fam) 22%, var(--t-line)); }

/* Die Einheit läuft IN der Seite (Lars): die Startkarte wächst nach
 * unten zum Übungsfenster, statt ein Overlay darüberzulegen. Das
 * Übungs-DOM ist unverändert — nur sein Wirt und diese Fassung. */
.uet.uet-running .uet-start {
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  border-bottom-color: transparent; box-shadow: none;
  /* ⚠️ Läuft die Einheit, ist die Karte nicht mehr der START, sondern
   * der KOPF des Übungsfensters — und ein Kopf darf nicht 112 px hoch
   * sein. Gemessen bei 844x390: Kopfzeile 58 + Titel 46 + Karte 112 =
   * 232 px waren vergeben, bevor die Übung anfing; von ihren 531 px
   * blieben 158 im Bild, „Abgeben" lag 242 px unter der Kante. */
  min-height: 0; padding: 10px 18px; gap: 14px; cursor: default;
}
.uet.uet-running .uet-start:hover { transform: none; box-shadow: none; border-color: color-mix(in srgb, var(--fam) 36%, var(--t-line)); }
.uet.uet-running .uet-play { width: 36px; height: 36px; box-shadow: none;
  background: color-mix(in srgb, var(--fam) 16%, var(--t-panel)); color: var(--fam); }
.uet.uet-running .uet-slabel { font-size: 16px; }
.uet.uet-running .uet-pool { display: none; }

/* Im Querformat ist Höhe das knappe Gut: läuft die Einheit, gehört ihr
 * die Seite. Der Titel steht in der Reiterleiste darüber, und die
 * Kachelliste schaltet währenddessen ohnehin nichts mehr um. */
@media (max-height: 620px) {
  .uet.uet-running .uet-top,
  .uet.uet-running .uet-exrow,
  .uet.uet-running .uet-grid { display: none; }
  .uet.uet-running { padding-top: 10px; padding-bottom: 12px; }
  #ex-pop.ex-inline .ss-box { padding: 12px 14px 14px; }
}
/* Punktestand und „Nochmal anhören" bleiben am Fensterrand stehen,
 * solange die Einheit im Bild ist — sonst muss man erst ans Ende
 * rollen, um zu hören, was man gerade nicht verstanden hat. */
#ex-pop.ex-inline .ex-foot {
  position: sticky; bottom: 0; z-index: 2;
  margin: 10px -26px -18px; padding: 10px 26px 14px;
  background: var(--t-panel); border-top: 1px solid var(--t-line);
}
@media (max-height: 620px) {
  #ex-pop.ex-inline .ex-foot { margin: 8px -14px -14px; padding: 8px 14px 10px; }
}
#ex-pop.ex-inline { position: static; inset: auto; z-index: auto; background: none; display: block; }
#ex-pop.ex-inline .ss-box {
  width: auto; max-width: none; max-height: none; overflow: visible;
  padding: 16px 26px 18px;
  border: 1.5px solid color-mix(in srgb, var(--fam) 36%, var(--t-line));
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: var(--t-panel);
  box-shadow: var(--t-elev);
  animation: none;
}
#ex-pop.ex-inline .ex-x { top: 12px; right: 14px; }
.ex-hostmsg {
  margin: 0; padding: 18px 26px; border-radius: 0 0 22px 22px;
  border: 1.5px solid color-mix(in srgb, var(--fam) 36%, var(--t-line)); border-top: 0;
  background: var(--t-panel); color: var(--t-muted); font-size: 14px; font-weight: 700;
}

/* Übersicht: Überschrift + kompakte Stufen-Karte */
.uet-exrow { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.uet-exrow h3 { font-size: 15px; font-weight: 900; margin: 0; }
.uet-stufe { display: flex; align-items: center; gap: 12px; margin-left: auto; height: 48px; padding: 0 16px; border-radius: 14px; background: var(--t-panel); border: 1.5px solid var(--t-line); box-shadow: var(--t-elev); }
.uet-slbl { font-size: 13.5px; font-weight: 900; white-space: nowrap; color: var(--fam); }
.uet-track { display: flex; align-items: center; gap: 3px; }
.uet-node { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.uet-node i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--fam) 18%, var(--t-line)); font-style: normal; }
.uet-node.done i { background: var(--fam); }
.uet-node.cur { width: 24px; height: 24px; }
.uet-node.cur i { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2.5px solid var(--fam); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fam) 16%, transparent); color: var(--fam); font-weight: 900; font-size: 10.5px; display: flex; align-items: center; justify-content: center; }

/* Markierbare Übungskacheln — füllen den Pool */
.uet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.uet-ex { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; height: 96px; padding: 0 8px; border-radius: 16px; text-align: center; background: var(--t-panel); border: 1.5px solid var(--t-line); box-shadow: var(--t-elev); transition: transform .16s cubic-bezier(.34, 1.4, .5, 1), box-shadow .16s ease, border-color .16s ease; }
.uet-ex:hover { transform: translateY(-5px) scale(1.015); border-color: color-mix(in srgb, var(--fam) 46%, var(--t-line)); box-shadow: 0 20px 40px -14px color-mix(in srgb, var(--fam) 52%, transparent); }
.uet-ex:active { transform: translateY(0) scale(.995); }
.uet-exi { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; font-size: 20px; flex: none; background: color-mix(in srgb, var(--fam) 7%, #fff); border: 1.5px solid color-mix(in srgb, var(--fam) 14%, var(--t-line)); transition: border-color .16s ease; }
.uet-ename { font-size: 13.5px; font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uet-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--fam); color: #fff; font-size: 12px; font-weight: 900; opacity: 0; transform: scale(.5); transition: opacity .16s ease, transform .16s cubic-bezier(.34, 1.4, .5, 1); }
.uet-ex.sel { border-color: var(--fam); border-width: 2px; background: color-mix(in srgb, var(--fam) 5%, var(--t-panel)); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--fam) 46%, transparent); }
.uet-ex.sel .uet-check { opacity: 1; transform: scale(1); }
.uet-ex.sel .uet-exi { border-color: color-mix(in srgb, var(--fam) 40%, var(--t-line)); }

@media (max-width: 900px) {
  .uet { padding: 18px 16px 48px; }
  .uet-exrow { flex-wrap: wrap; }
  .uet-stufe { margin-left: 0; }
}
/* ⚠️ Die Reihe verschwindet erst, wenn sie den Titel quetschen würde —
 * die Schwelle ist GEMESSEN, nicht geraten: bei 844 px Fenster (812er
 * Karte) bleiben neben den elf Zeichen noch 88 px Luft, bei 768 px
 * (736er Karte) fehlen 2 px und „Übung starten" verliert sein Ende.
 * Sie bricht bewusst NICHT um: auf der Karte ist Höhe teuer, und im
 * Handy-Querformat kostet jede zweite Zeile den Blick auf die Übung. */
@media (max-width: 820px) { .uet-pool { display: none; } }

/* ---------- Schüler-Editor (js/schuelereditor.js) ----------
 * Werkzeugzeile + linke Menüspalte, NUR im Doc-Modus der Schüler-Shell
 * (body.ton-bar.se-on, persona teen). Design 1:1 aus docs/mockups/
 * Noten-Editor für Teenager/Menue-Anpassung.html. Weiße Welt, Akzente
 * aus den Logo-Farben; Blau = Editier-Theming. Alles unter body.se-on. */
body.se-on {
  --rosa: #c65089;
  --gruen: #1f9e6a;
  --bernstein: #e0a020;
  --blau: #1668b3;
  --t-ink: #26241f;
  --t-muted: #827e76;
  --t-panel: #ffffff;
  --t-line: #e9e8e4;
  --t-bar: #f3f2ef;
  --t-bgink: #827e76;
  --t-r: 18px;
  --t-elev: 0 1px 2px rgba(28, 27, 24, .05), 0 12px 26px -14px rgba(28, 27, 24, .18);
  --bounce: cubic-bezier(.34, 1.4, .5, 1);
  --se-col: 280px;
}
body.se-on { background: #fff; }
/* Die alte Kopfleiste ist abgerissen (v0.506); die FUSSZEILE lebt (die
 * eine Statuszeile + Ansichts-Wahl, nur im Noteneditor sichtbar). In
 * jedem anderen Raum der Lehrkraft ist sie AUSGEBLENDET, nicht bloß von
 * `#lz-page` (position: fixed) zugedeckt — im Fluss stehend trieb sie
 * die Seite auf Handybreite waagerecht auseinander (gemessen v0.356). */
body.lz-on:not(.se-on) footer.statusbar { display: none; }
/* …und in der SCHÜLER-Shell außerhalb des Editors ebenso (v0.506):
 * dort war sie bis dahin nur zugedeckt — der Rest des
 * teen-zugedeckt-Befunds vom 17.08.2026, dessen größerer Teil (die
 * Kopfleiste) mit dem Abriss erledigt ist. */
body.ton-has:not(.se-on) footer.statusbar { display: none; }
/* ⚠️ **Die Palette gehörte in dieselbe Liste** (nachgetragen v0.368,
 * gesehen auf Lars' Handy im Querformat): die Tablet-Regel weiter oben
 * dockt sie bei `(pointer: coarse) and (min-width: 701px)` als
 * schwebende Werkzeugleiste unten an — und ein Handy im QUERFORMAT ist
 * beides. Sie stand damit über dem Modulraum, wo es nichts zu stempeln
 * gibt (gemessen: 394 × 62 px, `position: fixed`, über der Kachelwand).
 * `#dur-bar` gehört aus demselben Grund dazu. Im Noteneditor gilt
 * `se-on`, dort bleibt beides. */
body.lz-on:not(.se-on) #palette,
body.lz-on:not(.se-on) #dur-bar { display: none !important; }
body.ton-bar.se-on { padding-top: calc(50px + var(--se-barh, 46px)); }
/* Score nach rechts, Platz für die feste Spalte */
body.se-on .main-col { margin-left: var(--se-col); }
body.se-on.se-resizing { cursor: col-resize; user-select: none; }
/* Button-Reset (die :where-Regel des Shells greift nur in #ton-shell) */
:where(.se-bar, .se-col, .se-modal, .se-toast) button {
  border: none; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: inherit; border-radius: 0; cursor: pointer;
}
.se-bar [hidden], .se-col [hidden], .se-modal [hidden] { display: none !important; }
/* ---- Werkzeugzeile ---- */
.se-bar {
  position: fixed; top: 50px; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-height: 46px; padding: 4px 16px;
  background: #fff;
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; color: var(--t-ink);
  transition: box-shadow .2s ease, background .2s ease;
}
body.se-edit .se-bar { box-shadow: inset 0 3px 0 -1px color-mix(in srgb, var(--blau) 62%, transparent); background: color-mix(in srgb, var(--blau) 3%, #fff); }
.se-grp { display: flex; align-items: center; gap: 6px; }
.se-grp + .se-grp { padding-left: 10px; border-left: 1px solid var(--t-line); }
/* ⚠️ Die Transportgruppe nicht: ihr Vorgänger (Bearbeiten) ist meist
   ausgeblendet, der Strich stand dann direkt links neben Play und
   trennte nichts (v0.421). Der Einzug bleibt — er hält den Abstand. */
.se-grp + .se-grp.se-transport { border-left: none; }
.se-tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 12px; background: var(--t-panel);
  border: 1.5px solid var(--t-line); border-radius: 11px; color: var(--t-ink);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 1px 1.5px rgba(28, 27, 24, .04);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease, color .14s ease;
}
.se-tool:hover { transform: translateY(-1.5px); border-color: color-mix(in srgb, var(--blau) 55%, var(--t-line)); box-shadow: 0 6px 14px -8px rgba(28, 27, 24, .35); }
.se-tool:active { transform: translateY(1px) scale(.96); }
.se-tool.se-icon { padding: 0; width: 36px; }
.se-tool.se-icon svg { width: 18px; height: 18px; }
/* ⚠️ Play und Stop sind QUADRATISCH wie ihre Nachbarn (36 × 36, Lars,
 * 16.08.2026). Bis v0.499 war Play 56 × 42 und Stop 40 × 36 — als
 * Betonung gedacht (02.08.2026), im Bild aber ein schiefes Rechteck
 * zwischen lauter Quadraten. Die Betonung trägt jetzt allein das
 * größere Zeichen (28 px gegen 18) und der blaue `.on`-Zustand.
 * ⚠️⚠️ **`padding: 0` ist Pflicht, sonst wird das Zeichen GEQUETSCHT**
 * (Lars, 17.08.2026): `.se-tool` gibt `0 12px`, in einem 36er Knopf
 * bleiben davon 9 px Inhalt — das 22er Dreieck schrumpfte darauf, das
 * 15er Stop-Quadrat wurde zur 9 × 15 großen Hochkant-Kapsel. Dieselbe
 * Falle wie beim `+` der Reiterleiste; Breite allein genügt nie.
 * ⚠️ **Play/Pause ist so hoch wie das Stop-Quadrat** (15 px, Lars,
 * 17.08.2026): bei 21 px erschlug das gefüllte Dreieck seinen Nachbarn.
 * Ein gefülltes Zeichen wiegt optisch schwerer als eine Umrisslinie —
 * gleich hoch heißt hier gleich groß, nicht kleiner. */
.se-play { width: 36px; height: 36px; padding: 0; color: var(--t-ink); }
.se-play svg { width: 20px; height: 20px; flex: none; }
.se-play.on { background: var(--blau); border-color: var(--blau); color: #fff; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--blau) 55%, transparent); }
.se-stop { width: 36px; padding: 0; }
.se-stop .sq { width: 15px; height: 15px; border-radius: 4.5px; background: currentColor; display: block; flex: none; }
.se-num { display: inline-flex; align-items: center; gap: 3px; height: 36px; padding: 0 8px; border: 1.5px solid var(--t-line); border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--t-muted); background: var(--t-panel); }
.se-num .se-note { font-size: 19px; line-height: 1; color: var(--t-ink); }
.se-num input { width: 40px; border: none; outline: none; background: none; font: inherit; font-weight: 800; font-size: 14px; color: var(--t-ink); text-align: center; -moz-appearance: textfield; }
.se-num input::-webkit-inner-spin-button { opacity: .35; }
.se-metrogrp { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 4px; border: 1.5px solid var(--t-line); border-radius: 11px; background: var(--t-panel); }
.se-metro { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--t-muted); transition: background .14s ease, color .14s ease; }
.se-metro:hover { background: color-mix(in srgb, var(--t-ink) 6%, #fff); color: var(--t-ink); }
.se-metro.on { background: color-mix(in srgb, var(--blau) 14%, #fff); color: var(--blau); }
.se-metro svg { width: 15px; height: 17px; }
.se-metrovol { width: 60px; accent-color: var(--blau); display: none; }
.se-metro.on ~ .se-metrovol { display: inline-block; }
.se-onlyedit { display: none; }
body.se-edit .se-onlyedit { display: flex; }
.se-raster { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1.5px solid var(--t-line); border-radius: 11px; background: var(--t-panel); font-size: 13.5px; font-weight: 700; color: var(--t-muted); user-select: none; }
.se-raster .se-rval { min-width: 30px; text-align: center; font-weight: 900; color: var(--blau); font-variant-numeric: tabular-nums; }
.se-raster input[type=range] { width: 88px; accent-color: var(--blau); }
/* Substimmen-Chips in der Editor-Leiste: gleiche Höhe wie das Raster */
.se-subpick { display: inline-flex; gap: 3px; align-items: center; }
.se-subpick button { height: 36px; min-width: 32px; padding: 0 9px; border: 1.5px solid var(--t-line); border-radius: 11px; background: var(--t-panel); font: inherit; font-size: 13.5px; font-weight: 800; color: var(--t-muted); cursor: pointer; font-variant-numeric: tabular-nums; }
.se-subpick button:hover { border-color: var(--blau); color: var(--blau); }
.se-subpick button.on { background: var(--blau); border-color: var(--blau); color: #fff; }
.se-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.se-pencil.on { background: var(--blau); border-color: var(--blau); color: #fff; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--blau) 55%, transparent); }
.se-save { border-color: var(--blau); color: var(--blau); }
.se-save:hover { background: var(--blau); color: #fff; }
.se-live { gap: 8px; }
/* ================= Lehrer-Shell: Raum-Leiste + Rahmen (lz-) ==========
 * Erwachsene Schrift für die Lehrkraft (Lars 2026-07-20): nüchterner
 * System-Stack statt der runden Schüler-Nunito, Gewichte eine Stufe
 * zurückgenommen. */
#lz-rail, #lz-page { font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
/* ⚠️ Die Leiste ist 72 px BREIT, sitzt aber hinter dem sicheren Rand:
 * im Querformat liegt links die Kamera-Aussparung. `--lzr` ist deshalb
 * „Leiste + linker sicherer Rand" und die EINE Zahl, gegen die alles
 * Feste ausgerichtet wird — wer hier 72 von Hand hinschreibt, schiebt
 * sein Element unter die Aussparung. Auf Geräten ohne Aussparung ist
 * jedes `env()` 0 und die Rechnung ergibt wieder genau 72. */
:root { --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
        --sab: env(safe-area-inset-bottom, 0px); --sat: env(safe-area-inset-top, 0px);
        --lzr: calc(72px + var(--sal)); }
body.lz-on { padding-left: var(--lzr); }
/* Noteneditor-Raum: das se-Chrome sitzt rechts der Leiste, oben ohne
 * Schüler-Tab-Zeile, und liest sich in der erwachsenen Schrift */
body.lz-on .se-bar { left: var(--lzr); top: calc(40px + var(--sat)); font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
body.lz-on .se-col { left: var(--lzr); top: calc(40px + var(--se-barh, 46px) + var(--sat)); font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
body.lz-on .se-resizer { top: calc(40px + var(--se-barh, 46px) + var(--sat)); left: calc(var(--lzr) + var(--se-col, 280px) - 7px); }
/* ⚠️ 40 px Reiter + 4 px Luft + die GEMESSENE Leiste (`--se-barh`).
   Gerechnet wurde bis v0.375 mit ihrer `min-height` (46) — die obersten
   4 px des Blattes lagen dadurch unter der Leiste (gemessen auf Tablet
   und Rechner); seit v0.513 zählt die wirkliche Höhe, s. `.se-col`. */
body.lz-on.se-on { padding-top: calc(44px + var(--se-barh, 46px) + var(--sat)); }
/* Tab-Leiste des Bestands im Lehrer-Raum: oben fest, im neuen Design */
/* ⚠️ `align-items: center`, nicht `flex-end`: seit die Reiter abgerundete
   Rechtecke sind (v0.339) und keine oben gerundeten Laschen mehr, gibt es
   nichts mehr, das an der Unterkante ansetzt — dort saß der Reiter auf dem
   Trennstrich auf (gemessen 6 px Luft oben, 1 px unten). Ein Rechteck
   gehört in die Mitte der Zeile (Lars, 02.08.2026). */
:is(body.lz-on, body.persona-free).se-on #tab-bar { position: fixed; top: var(--sat); left: var(--lzr); right: var(--sar); height: 40px; z-index: 59; display: flex; align-items: center; gap: 5px; padding: 0 12px; background: linear-gradient(180deg, #fff, #fcfbf8); border-bottom: 1px solid #e9e8e4; overflow-x: auto; font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
/* ⚠️ WIE DIE SCHÜLER-REITER (`.ton-tab`, Lars 16.08.2026): ein RUHENDER
   Reiter trägt keinen Kasten, nur Name und ✕ — den Kasten bekommt, was
   ausgewählt ist. Bis v0.499 hatte JEDER Reiter Rahmen und Füllung, und
   die Leiste sah aus wie eine Reihe gleichrangiger Knöpfe; der aktive
   war zudem blau umrandet, obwohl Blau in dieser Oberfläche die
   Systemaktion ist — ein Reiter ist keine (derselbe Grund steht bei
   `.ton-tab.active`). Wer eines von beiden ändert, sieht beim anderen
   nach. Der Rahmen bleibt durchsichtig stehen, damit beim Auswählen
   nichts um 3 px springt. */
:is(body.lz-on, body.persona-free).se-on #tab-bar .tab { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid transparent; border-radius: 11px; background: none; color: #827e76; font-size: 13px; font-weight: 600; padding: 7px 12px 8px; cursor: pointer; white-space: nowrap; max-width: 220px; transition: background .14s ease, transform .12s ease, color .14s ease; }
:is(body.lz-on, body.persona-free).se-on #tab-bar .tab:hover { background: rgba(28, 27, 24, .05); transform: translateY(-1px); color: #26241f; }
:is(body.lz-on, body.persona-free).se-on #tab-bar .tab span:first-child { overflow: hidden; text-overflow: ellipsis; }
:is(body.lz-on, body.persona-free).se-on #tab-bar .tab.active { background: #fff; color: #26241f; transform: none; box-shadow: 0 2px 6px rgba(28, 27, 24, .10), inset 0 0 0 1.5px color-mix(in srgb, #26241f 14%, transparent); }
:is(body.lz-on, body.persona-free).se-on #tab-bar .tab .close { border: 0; background: none; color: #a29c92; cursor: pointer; font: inherit; border-radius: 6px; padding: 0 4px; }
:is(body.lz-on, body.persona-free).se-on #tab-bar .tab .close:hover { background: rgba(28, 27, 24, .07); color: #26241f; }
/* ⚠️ QUADRATISCH und flex-zentriert: mit 32 × 30 und bloßem `font-size`
   saß das + weder waagerecht noch senkrecht in der Mitte — ein Knopf
   zentriert seine Beschriftung nur waagerecht, senkrecht entscheidet
   die Schriftlinie (Lars, 16.08.2026). */
/* ⚠️ **Beschriftet und DURCHGEZOGEN umrandet** (v0.502, Lars
   17.08.2026): bis v0.501 war das ein gestricheltes 30er-Kästchen mit
   nacktem „+" — gestrichelt und grau liest sich in dieser Oberfläche
   aber als „gerade nicht benutzbar", und das Zeichen allein sagt nicht,
   wozu es dient. Wort und Rahmen kommen aus demselben Befund: der
   Einstieg „neues Stück" wurde nicht gefunden. Die Breite steht nicht
   fest (`width: auto`), den Abstand zwischen Zeichen und Wort setzt
   `.ks-ib` in Geviert-Bruchteilen — hier nichts nachstellen. */
:is(body.lz-on, body.persona-free).se-on #tab-bar .tab-add { display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid #ddd9d3; background: #fff; color: #4a463f; border-radius: 11px; height: 30px; padding: 0 11px 0 9px; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .1px; line-height: 1; white-space: nowrap; cursor: pointer; flex: none; box-shadow: 0 1px 1.5px rgba(28, 27, 24, .05); transition: border-color .14s ease, color .14s ease, background .14s ease; }
:is(body.lz-on, body.persona-free).se-on #tab-bar .tab-add:hover { border-color: #1668b3; color: #1668b3; background: #f5f9fd; }
/* Lehrer-Menü v2 (Konzept lehrer-noteneditor-konzept.md): kuratierte
 * Gruppen adoptieren Bestands-Controls; innere Bestands-Sektionen
 * verlieren Karte + eigenen Kopf — der Gruppen-Kopf übernimmt. */
body.lz-on .se-col details.sec { border: 0; border-radius: 0; padding: 0; margin: 0; background: none; }
body.lz-on .se-col details.sec > summary { display: none; }
body.lz-on .se-col :is(details.sec, .se-secbody) label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: #6c675f; margin: 6px 0; }
body.lz-on .se-col :is(details.sec, .se-secbody) label.inline { flex-direction: row; align-items: center; gap: 7px; }
body.lz-on .se-col :is(details.sec, .se-secbody) select, body.lz-on .se-col :is(details.sec, .se-secbody) input[type=text], body.lz-on .se-col :is(details.sec, .se-secbody) input[type=number] { border: 1.5px solid #e9e8e4; border-radius: 9px; padding: 6px 9px; font: inherit; font-size: 13px; background: #fff; }
body.lz-on .se-col :is(details.sec, .se-secbody) button, body.lz-on .se-col .se-secbody > .group button { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 12.5px; font-weight: 600; color: #26241f; cursor: pointer; margin: 3px 4px 3px 0; }
body.lz-on .se-col :is(details.sec, .se-secbody) button:hover { border-color: #1668b3; }
body.lz-on .se-col :is(details.sec, .se-secbody) .hint { font-size: 11.5px; color: #a29c92; }
body.lz-on .se-col .se-secbody .group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
/* Ankreuz-Kästchen in Zeile, nicht gestapelt (Lars-Fix) */
body.lz-on .se-col :is(details.sec, .se-secbody) label:has(> input[type=checkbox]),
body.lz-on .se-col :is(details.sec, .se-secbody) label:has(> input[type=radio]) { flex-direction: row; align-items: center; gap: 8px; }
body.lz-on .se-col :is(details.sec, .se-secbody) input[type=checkbox], body.lz-on .se-col :is(details.sec, .se-secbody) input[type=radio] { accent-color: #1668b3; }
/* Datei-Menüpunkte + Zwischen-Überschrift (Presets) */
body.lz-on .se-col .se-grplbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #a29c92; margin: 8px 0 4px; }
/* Notenbild-Aufräumen (Lars): Takte/Zeile entfällt (Zoom deckt es ab),
 * Zoom-Regler direkt hinter dem Wort, Auto-Knopf entfällt,
 * Optimieren neben dem Größen-Regler */
body.lz-on .se-col label:has(> #cfg-mpr) { display: none; }
body.lz-on .se-col label:has(> #cfg-zoom) { flex-direction: row; align-items: center; gap: 8px; }
body.lz-on .se-col label:has(> #cfg-zoom) input[type=range] { flex: 1; min-width: 100px; }
body.lz-on .se-col #btn-autofit { display: none; }
body.lz-on .se-col label:has(> #btn-autofit) { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
body.lz-on .se-col label:has(> #btn-autofit) input[type=range] { flex: 1; min-width: 110px; }
/* Kopfzeilen-Symbole der Lehrkraft: Bibliothek + Vollbild-Präsentation */
.se-bib svg { width: 19px; height: 19px; }
.se-present { font-size: 17px; }
/* Bildschirm-Ansicht rechts unten in der Fußzeile (adoptiert) */
body.lz-on footer.statusbar .view-switch > label.inline { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: inherit; }
/* Stimmen-Zeilen im Lehrer-Menü (Lars): eng, keine Knopf-Kästen,
 * Aktivierung = Blaufärbung der Symbole */
body.lz-on .se-col #track-list .trk { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; padding: 7px 0; border-bottom: 1px solid #f0efeb; }
body.lz-on .se-col #track-list .trk:last-of-type { border-bottom: 0; }
body.lz-on .se-col #track-list .trk .grip { font-size: 10px; color: #c9c5bd; }
body.lz-on .se-col #track-list .trk input[type=checkbox] { accent-color: #1668b3; margin: 0; }
body.lz-on .se-col #track-list .trk input[type=color] { width: 20px; height: 20px; border: 0; background: none; padding: 0; }
body.lz-on .se-col #track-list .trk input.trk-name { flex: 1 1 90px; min-width: 80px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: #26241f; padding: 2px 3px; }
body.lz-on .se-col #track-list .trk input.trk-name:focus { outline: none; background: #fff; border-radius: 7px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #1668b3 40%, #e9e8e4); }
body.lz-on .se-col #track-list .trk select.instr { flex: 1 1 96px; min-width: 96px; max-width: 150px; font-size: 12px; padding: 3px 5px; border: 1px solid #eceae6; border-radius: 8px; color: #6c675f; background: #fff; }
body.lz-on .se-col #track-list .trk input.mix { width: 62px; accent-color: #1668b3; }
body.lz-on .se-col #track-list .trk button.mini { border: 0; background: none; border-radius: 6px; width: 22px; height: 22px; padding: 0; margin: 0; display: inline-flex; align-items: center; justify-content: center; color: #a29c92; cursor: pointer; }
body.lz-on .se-col #track-list .trk button.mini:hover { color: #26241f; background: rgba(28,27,24,.05); }
body.lz-on .se-col #track-list .trk button.mini.on { color: #1668b3; }
body.lz-on .se-col #track-list .trk button.mute.muted { color: #c9c5bd; opacity: 1; }
body.lz-on .se-col #track-list .trk button.mini svg { width: 15px; height: 15px; display: block; }
/* ＋ unter den Stimmen: ohne Kasten, mittig */
body.lz-on .se-col #track-list .trk-plus { display: flex !important; border: 0 !important; background: none !important; width: 100%; justify-content: center; align-items: center; color: #827e76; font-size: 18px; font-weight: 600; padding: 6px 0; margin: 2px 0 0; cursor: pointer; }
body.lz-on .se-col #track-list .trk-plus:hover { color: #1668b3; }

/* Gruppen-Verwaltung: ✕/⧉ am Kopf, Schweben, Browserfenster, ☰-Menü */
.se-gctrl { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; flex: none; }
.se-gctrl button { border: 0; background: none; color: #b3afa6; font: inherit; font-size: 12px; width: 22px; height: 22px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.se-gctrl button:hover { background: rgba(28,27,24,.06); color: #26241f; }
.se-ghidden { display: none !important; }
.se-gfloat { position: fixed; z-index: 66; width: 300px; max-height: 72vh; overflow-y: auto; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 14px; box-shadow: 0 24px 60px -18px rgba(28,27,24,.35); }
.se-gfloat > summary { cursor: grab; position: sticky; top: 0; background: #fff; z-index: 2; }
body.se-dockhint .se-col { outline: 2px dashed #1668b3; outline-offset: -3px; }
.se-oswrap { display: flex; align-items: center; gap: 6px; }
.se-osslot { flex: 1; min-width: 0; display: block; }
.se-mmwrap { position: relative; flex: none; }
/* ☰ mittig im Knopf (saß auf der Textbasislinie, wirkte tiefgestellt) */
.se-mmbtn { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 11px; width: 36px; height: 35px; font: inherit; font-size: 15px; line-height: 1; color: #6c675f; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.se-mmbtn:hover { border-color: #1668b3; color: #1668b3; }
.se-mmpop { position: absolute; left: 0; top: 40px; z-index: 67; width: 250px; background: #fff; border: 1px solid #e9e8e4; border-radius: 14px; box-shadow: 0 14px 40px -10px rgba(28,27,24,.3); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.se-mmpop[hidden] { display: none; }
.se-mmchips .chip { border: 1.5px solid #e9e8e4; border-radius: 999px; padding: 3px 9px; font-size: 12px; display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.se-mmchips .chip input { accent-color: #1668b3; margin: 0; }
.se-mmlist { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid #f0efeb; padding-top: 8px; }
.se-mmrow { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px; border-radius: 8px; cursor: pointer; }
.se-mmrow:hover { background: #f6f5f2; }
.se-mmrow input { accent-color: #1668b3; margin: 0; }
/* Kasten im eigenen Browserfenster */
body.se-popout { margin: 0 !important; padding: 10px !important; background: #fff; }
body.se-popout .se-sec { margin: 0; }
.se-gwin > summary { cursor: default; }
.se-gwin > summary .chev, .se-gwin .se-gpop { display: none; }
/* Menüspalte scrollt unsichtbar (Lars: keine vertikale Leiste) */
.se-col { scrollbar-width: none; -ms-overflow-style: none; }
.se-col::-webkit-scrollbar { width: 0; height: 0; }
/* Pinch-Geste: Browser-Zoom bleibt draußen, Schatten pausieren */
#score-scroll { touch-action: pan-x pan-y; }
body.se-pinching #score-area .page, body.se-pinching #score-area svg { box-shadow: none !important; }
/* Testmodus (persona free): Schüler-Editor als ganzes Chrome — Tab-
 * Zeile oben ohne Raum-Leiste, darunter Werkzeugleiste + Menüspalte */
body.persona-free.se-on { padding-top: calc(40px + var(--se-barh, 46px)); }
body.persona-free.se-on .se-bar { top: 40px; }
body.persona-free.se-on .se-col { top: calc(40px + var(--se-barh, 46px)); }
body.persona-free.se-on .se-resizer { top: calc(40px + var(--se-barh, 46px)); }
body.persona-free.se-on #tab-bar { left: 0; }
/* Lehrkraft: Hinweis-/Beispielkarte gehört nur in den Testeditor */
body.lz-on .welcome { display: none !important; }
/* Bibliothek-Popup (bib-) im Lehrer-Rahmen: erwachsene Schrift */
body.lz-on #bib-pop { font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
/* „Meine Musik" (Bibliothek) im Lehrer-Rahmen: erwachsene Schrift */
body.lz-on #mm-pop { font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
/* Optionen-Suche oben in der Spalte */
.se-oswrap { margin-bottom: 10px; }
/* ⚠️ Feld und Löschknopf werden von `.se-suchfeld` gekleidet — hier
 * standen die zweiten Regeln dafür, mit eigener Kante (1,1,0 schlägt
 * `.se-suchfeld input`). Sie waren die stärkere Hälfte der doppelten
 * Umrandung; `.se-oswrap` selbst ist die Zeile und bleibt. */
.se-suchfeld:focus-within { border-color: var(--blau); }
/* die Original-Trackliste behält ihr ＋ im Lehrer-Menü */
body.lz-on .se-col #track-list .trk-plus { display: flex !important; }
body.lz-on .se-lsmenu, body.lz-on .se-modal, body.lz-on .se-toast { font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
body.lz-on #cw-panel { left: 86px; }
#lz-rail { position: fixed; left: 0; top: 0; bottom: 0; width: var(--lzr); padding: var(--sat) 0 var(--sab) var(--sal); box-sizing: border-box; z-index: 56; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0; background: linear-gradient(180deg, #fff, #fcfbf9); border-right: 1px solid #e9e8e4; }
/* ⚠️ **Acht Räume passen auf einem Handy im QUERFORMAT nicht übereinander**
 * (390 px Höhe gegen 486 px Bedarf), und ohne diese beiden Zeilen macht
 * Flex daraus lautlos zwei Fehler auf einmal: die Knöpfe geben nach
 * (gemessen 34 statt 48 px — deformierte Kreise) UND der Werkzeug-Griff
 * steht trotzdem 28 px unter dem Fensterrand, also unerreichbar. Beides
 * dieselbe Bauart wie bei der Fußzeile: der Kasten gibt nach, die Kinder
 * werden gequetscht. Lieber rollen als quetschen — `flex: none` hält die
 * Größe, `overflow-y` macht alles erreichbar. */
#lz-rail { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
#lz-rail::-webkit-scrollbar { display: none; }
.lz-room { flex: none; }
.lz-room { position: relative; width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: #827e76; background: #fff; border: 1.5px solid #e9e8e4; font: inherit; cursor: pointer; transition: transform .16s cubic-bezier(.34,1.4,.5,1), border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease; }
.lz-room svg { width: 22px; height: 22px; }
.lz-room:hover { transform: translateY(-2px); color: var(--rc); border-color: color-mix(in srgb, var(--rc) 46%, #e9e8e4); box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--rc) 55%, transparent); }
.lz-room.active { color: var(--rc); background: color-mix(in srgb, var(--rc) 12%, #fff); border-color: color-mix(in srgb, var(--rc) 40%, #e9e8e4); }
.lz-room.active::before { content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); width: 5px; height: 26px; border-radius: 0 4px 4px 0; background: var(--rc); }
.lz-tip { position: absolute; left: calc(100% + 13px); top: 50%; transform: translateY(-50%) translateX(-6px); background: #26241f; color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; padding: 7px 11px; border-radius: 10px; pointer-events: none; opacity: 0; transition: opacity .14s ease, transform .14s cubic-bezier(.34,1.4,.5,1); z-index: 60; }
.lz-room:hover .lz-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
#lz-page { position: fixed; left: var(--lzr); top: 0; right: var(--sar); bottom: 0; z-index: 55; display: flex; flex-direction: column; background: #fff; color: #26241f; }
/* Werkzeuge: der Griff am FUSS der Raumleiste, bündig mit dem
   Fensterrand (Lars, 02.08.2026) — er ist da, sobald die Leiste da ist,
   und das Menü klappt nach RECHTS auf. `margin-top: auto` schiebt ihn
   nach unten, ohne dass die Leiste ihre Ausrichtung verliert.
   z-index 58: über Raum (55) und Leiste (56), aber unter den Werkzeugen
   selbst (#wb-pop 95), die sich beim Öffnen darüberlegen sollen. */
/* ⚠️ Schwebend unten RECHTS (v0.370): am Body, nicht in der Leiste —
   er ist kein Raum. `--sab`/`--sar` halten ihn über der Gestenleiste und
   neben der Kamera-Aussparung. Im Noteneditor steht dort die Fußzeile,
   deshalb rückt er dort hoch. */
/* ---- Handy: die Räume schweben unten LINKS (v0.379) ----
   Spiegelbild zu den Werkzeugen unten rechts; sichtbar nur im
   Handy-Block, weil auf breiten Schirmen die Leiste selbst steht. */
#lz-roomwrap { display: none; }
#lz-roombtn { position: relative; width: 48px; height: 48px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  color: var(--rc, #827e76); background: #fff; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--rc, #e9e8e4) 40%, #e9e8e4);
  box-shadow: 0 8px 22px -12px rgba(28, 27, 24, .5); }
#lz-roombtn svg { width: 22px; height: 22px; }
/* ⚠️ **Sie ZIEHT SICH AUF, sie klappt nicht herunter** (Lars, 03.08.2026):
   aus einem Zeichen werden acht. Die RICHTUNG folgt der knappen Achse —
   im Hochformat nach OBEN, im Querformat nach RECHTS. Mit Namen und nach
   oben brauchte sie 289 px auf einem 390 px hohen Schirm und stieß an den
   oberen Rand; als Reihe von acht Zeichen sind es 392 px auf 844 px
   Breite. Kein Rollen, kein Deckel, keine Beschriftung — die Namen stehen
   als `title` am Knopf. */
.lz-rooms-pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 58;
  display: flex; flex-direction: column; gap: 4px; padding: 6px;
  border-radius: 14px; background: color-mix(in srgb, #fff 94%, transparent);
  border: 1px solid #e6e4df; box-shadow: 0 12px 30px -14px rgba(28, 27, 24, .42);
  backdrop-filter: blur(6px); }
.lz-rooms-pop[hidden] { display: none; }
.lz-rooms-pop button { display: flex; align-items: center; justify-content: center; flex: none;
  width: 42px; height: 42px; cursor: pointer; color: #827e76;
  border: 1.5px solid transparent; background: none; border-radius: 13px; }
.lz-rooms-pop button svg { width: 21px; height: 21px; }
.lz-rooms-pop button:hover { color: var(--rc); background: color-mix(in srgb, var(--rc) 10%, transparent); }
.lz-rooms-pop button.on { color: var(--rc); background: color-mix(in srgb, var(--rc) 13%, #fff);
  border-color: color-mix(in srgb, var(--rc) 40%, #e9e8e4); }
#lz-toolwrap { position: fixed; z-index: 58;
  right: calc(14px + var(--sar)); bottom: calc(14px + var(--sab)); }
body.lz-on.se-on #lz-toolwrap { bottom: calc(46px + var(--sab)); }
body.kp-present #lz-toolwrap { display: none; }
#lz-toolbtn { position: relative; width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: #827e76; background: #fff; border: 1.5px dashed #e0ded8; cursor: pointer; transition: color .16s ease, border-color .16s ease, background .16s ease; }
#lz-toolbtn svg { width: 21px; height: 21px; }
#lz-toolbtn:hover, #lz-toolbtn[aria-expanded="true"] { color: #3d3a34; border-color: #cfccc4; background: #fbfaf8; border-style: solid; }
/* Flacher Schirm (Handy im Querformat): enger stellen, damit möglichst
   wenig zu rollen bleibt. Gerechnet wird nach der HÖHE, nicht nach der
   Ausrichtung — ein kurzes Fenster am Rechner hat dasselbe Problem. */
@media (max-height: 520px) {
  #lz-rail { gap: 6px; padding: 8px 0; }
  .lz-room, #lz-toolbtn { width: 42px; height: 42px; border-radius: 13px; }
  .lz-room svg, #lz-toolbtn svg { width: 19px; height: 19px; }
  .lz-room.active::before { height: 22px; }
}
#lz-toolbtn:hover .lz-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
.lz-tools {
  position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 58;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border-radius: 14px; background: color-mix(in srgb, #fff 94%, transparent);
  border: 1px solid #e6e4df; box-shadow: 0 12px 30px -14px rgba(28, 27, 24, .42);
  backdrop-filter: blur(6px);
  font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.lz-tools[hidden] { display: none; }
.lz-tools button { display: flex; align-items: center; gap: 9px; padding: 8px 14px 8px 10px; border: 0; border-radius: 10px; background: transparent; color: #3d3a34; font: inherit; font-size: 13.5px; font-weight: 650; white-space: nowrap; cursor: pointer; transition: background .14s ease, color .14s ease; }
.lz-tools button:hover { background: color-mix(in srgb, var(--blau, #1668b3) 10%, #fff); color: var(--blau, #1668b3); }
.lz-tools button:active { transform: translateY(1px); }
.lz-toolico { display: flex; line-height: 1; }

/* ---------- Bildschirm-Kopplung (js/bildschirm.js) ---------- */
/* ---- Bleibende Fernsteuer-Leiste (v0.420) ----
   Solange dieses Gerät einen anderen Bildschirm steuert, muss man das
   SEHEN und die Anweisungen erreichen, ohne erst ein Fenster zu öffnen.
   ⚠️ Unten MITTIG, aber im Inhaltsbereich zentriert (`--lzr` ist die
   Raum-Leiste) und über den schwebenden Griffen: unten rechts sitzen die
   Werkzeuge, unten links auf dem Handy der Raum-Griff. `z-index` unter
   `#bs-pop` (96), damit das Werkzeugfenster darüber liegt. */
.bs-leiste { position: fixed; z-index: 94; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  left: calc(var(--lzr, 0px) + 12px); right: calc(env(safe-area-inset-right, 0px) + 12px);
  margin: 0 auto; width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: 999px; background: #26241f; color: #fff;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.55); font-size: 13px; }
.bs-leiste.spiegel { background: #33507a; }
.bsl-was { display: inline-flex; align-items: center; gap: 7px; padding-left: 4px; white-space: nowrap; }
.bsl-was b { font-weight: 700; }
.bsl-code { font-family: Consolas, monospace; letter-spacing: .5px; opacity: .72; }
.bsl-cmds { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px;
  padding-left: 8px; border-left: 1px solid rgba(255,255,255,.22); }
.bsl-b { min-height: 0; width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff;
  font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.bsl-b:hover { background: rgba(255,255,255,.24); }
.bsl-aus { margin-left: 2px; background: rgba(255,120,110,.22); }
.bsl-aus:hover { background: rgba(255,120,110,.4); }
.bsl-say { font-size: 12px; opacity: .8; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsl-say.fehler { color: #ffb4ae; opacity: 1; }
/* Über den schwebenden Griffen, wo es welche gibt (Handy: Raum-Griff
   links, Werkzeuge rechts — beide rund 56 px hoch). */
@media (pointer: coarse) and (max-width: 760px), (pointer: coarse) and (max-height: 520px) {
  .bs-leiste { bottom: calc(env(safe-area-inset-bottom, 0px) + 76px); }
}
/* Beim Üben ist Vollbild — dort stört jede fremde Leiste. */
body.kp-present .bs-leiste { display: none; }
#bs-pop { position: fixed; inset: 0; z-index: 96; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(24, 22, 18, .42); backdrop-filter: blur(3px); }
.bs-box {
  width: min(460px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border-radius: 16px; padding: 20px 22px 18px;
  box-shadow: 0 30px 80px -22px rgba(24, 22, 18, .6);
  font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #26241f; font-size: 14px;
}
.bs-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.bs-kopf h3 { margin: 0; flex: 1; font-size: 17px; font-weight: 700; }
.bs-x { border: none; background: none; font-size: 22px; line-height: 1; color: #827e76; cursor: pointer; padding: 2px 6px; }
.bs-x:hover { color: #26241f; }
.bs-teil { margin-top: 16px; padding-top: 14px; border-top: 1px solid #ecebe7; }
.bs-teil h4 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; }
.bs-hint { margin: 4px 0 10px; font-size: 13px; line-height: 1.5; color: #6f6862; }
.bs-code { font-size: 34px; font-weight: 800; letter-spacing: .14em; font-variant-numeric: tabular-nums; text-align: center; margin: 6px 0 8px; }
.bs-qr { text-align: center; }
.bs-qr svg { width: 148px; height: 148px; }
.bs-row { display: flex; gap: 8px; }
.bs-row input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid #ddd9d3; font: inherit; font-size: 18px; font-weight: 700; letter-spacing: .1em; text-align: center; text-transform: uppercase; outline: none; }
.bs-row input:focus { border-color: var(--accent, #1668b3); }
.bs-btn { padding: 9px 14px; border-radius: 10px; border: 1px solid #ddd9d3; background: #fff; font: inherit; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.bs-btn:hover { background: #f7f6f3; }
.bs-btn.haupt { background: var(--accent, #1668b3); border-color: var(--accent, #1668b3); color: var(--accent-ink, #fff); font-weight: 600; }
.bs-btn.leise { border-color: transparent; color: #6f6862; padding-left: 0; }
.bs-btn.leise:hover { color: #26241f; background: none; text-decoration: underline; }
/* Die zwei Modi als Wahl, nicht als Schalter: sie schließen sich aus,
   und jeder erklärt sich in einer Zeile. */
.bs-modi { display: flex; gap: 8px; margin: 8px 0 10px; }
.bs-modus { flex: 1; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #e6e4df; background: #fff; font: inherit; cursor: pointer; }
.bs-modus b { display: block; font-size: 13.5px; }
.bs-modus span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: #6f6862; }
.bs-modus:hover { border-color: #cfccc4; }
.bs-modus.an { border-color: var(--accent, #1668b3); background: color-mix(in srgb, var(--accent, #1668b3) 7%, #fff); }
.bs-modus.an b { color: var(--accent, #1668b3); }
.bs-fern { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.bs-say { margin: 12px 0 0; min-height: 1.2em; font-size: 13px; color: #1d5b42; }
.bs-say.fehler { color: #c6415f; }

/* Zugänge neben dem Klassencode: der eine lässt beitreten, der andere
   sagt, WER beigetreten ist (v0.326). */
.lzr-zug {
  display: inline-flex; align-items: center; gap: 7px; margin-left: 8px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--t-line, #e9e8e4);
  background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer;
}
.lzr-zug:hover { border-color: var(--lza, #e0a020); color: var(--lza, #e0a020); }

/* Ein Linien-Zeichen sitzt auf der Schriftlinie, nicht daneben: ohne das
   hängen die Symbole in Knöpfen und Zeilen einen Hauch zu hoch. */
.ic { vertical-align: -.18em; flex: none; }

/* Der Live-Punkt war ⚪/🟢 als Textzeichen — auf jedem System eine andere
   Farbe und Größe. Jetzt eine Fläche: grau heißt getrennt, grün heißt
   verbunden, und der Ring pulst dabei leise. */
.wb-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c9c6c0; vertical-align: middle; flex: none; }
.wb-dot.an { background: var(--gruen, #1f9e6a); box-shadow: 0 0 0 0 color-mix(in srgb, var(--gruen, #1f9e6a) 60%, transparent); animation: wbpuls 2s ease-out infinite; }
@keyframes wbpuls { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .wb-dot.an { animation: none; } }
/* das hidden-Attribut MUSS die display:flex-Regel schlagen (sonst liegt
 * die Raum-Seite unsichtbar-weiß über dem Noteneditor — Lars' Weiß-Bug) */
#lz-page[hidden] { display: none !important; }
/* Kopfzeilenhöhe = Höhe der Editor-Werkzeugleiste (.se-bar, 46px) */
/* 40px = Höhe der Tab-Leiste im Noteneditor: beim Raumwechsel soll die
 * Kopfzeile nicht springen (Lars) */
/* ⚠️ Die Kopfzeile rückt unter die Statusleiste, der Kasten bleibt
   randlos — dasselbe Prinzip wie unten: Hintergrund bis zur Kante, Inhalt
   im sicheren Bereich. Heute ist `--sat` gleich 0; sobald Chrome den
   Ausschnitt-Modus für installierte PWAs ausliefert, steht die Zeile
   nicht plötzlich unter der Uhr. */
.lz-kopf { margin-top: var(--sat); }
.lz-kopf { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px 0 20px; background: linear-gradient(180deg, #fff, #fcfbf8); border-bottom: 1px solid #e9e8e4; }
.lz-rdot { width: 10px; height: 10px; border-radius: 50%; background: var(--lza); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lza) 13%, #fff); }
.lz-rname { font-size: 15.5px; font-weight: 800; color: color-mix(in srgb, var(--lza) 62%, var(--lzi)); }
.lz-flex { flex: 1; }
.lz-menuwrap { position: relative; }
/* ⚠️ `padding: 0` ist der Kern (v0.421): die allgemeine Knopfregel gibt
   `5px 11px`, und in einem 40er-Knopf blieben davon 18 px INHALT übrig —
   die Marke wurde also nie in ihrer angegebenen Größe gezeigt, sondern
   auf 18 × 16 heruntergerechnet (`preserveAspectRatio`). Genau das war
   „größer darf es auch sein" (Lars, 05.08.2026). */
.lz-menubtn { width: 40px; height: 40px; border: 0; background: none; border-radius: 12px; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lz-menubtn:hover { background: rgba(28, 27, 24, .035); }
/* ⚠️ EIN Regelpaar für BEIDE Shells (v0.421): in Ruhe zurückgenommen,
   beim Überfahren UND im offenen Zustand farbig. Vorher färbte sich die
   Schüler-Fassung nur beim Öffnen — dasselbe Zeichen, zwei Verhalten. */
.lz-brand, .ton-menu .ks-marke { display: block; filter: grayscale(1) opacity(.45); transition: filter .18s ease; }
.lz-menubtn:hover .lz-brand, .lz-menubtn.open .lz-brand,
.ton-menu:hover .ks-marke, .ton-menu.open .ks-marke { filter: none; }
.lz-drop { position: absolute; top: calc(100% + 4px); right: 0; width: 244px; background: #fff; border: 1px solid #e9e8e4; border-radius: 16px; box-shadow: 0 10px 34px -8px rgba(28, 27, 24, .28); padding: 8px; z-index: 58; display: flex; flex-direction: column; gap: 1px; }
.lz-drop[hidden] { display: none; }
.lz-di { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 700; color: #26241f; cursor: pointer; text-align: left; }
.lz-di:hover { background: #f3f3f1; }
.lz-dinfo { cursor: default; }
.lz-dinfo:hover { background: none; }
.lz-dinfo span { display: flex; flex-direction: column; line-height: 1.25; }
.lz-dinfo small { color: #827e76; font-weight: 700; }
.lz-dsep { height: 1px; margin: 5px 4px; background: #e9e8e4; }
.lz-dout { color: #c6415f; }
a.lz-di { text-decoration: none; }
.lz-dver { padding: 2px 11px 4px; font-size: 12px; font-weight: 700; color: #a29c92; }
.lz-dout:hover { background: color-mix(in srgb, #c6415f 9%, #fff); }
/* Kontolöschung (B3): dieselbe Warnfarbe wie das Abmelden, aber
   kleiner und magerer — sie steht darunter, weil man sie dort sucht,
   und darf ihm trotzdem nicht ähneln. */
.lz-ddel { color: #a33; font-size: 12.5px; font-weight: 500; }
.lz-ddel:hover { background: color-mix(in srgb, #a33 9%, #fff); }
/* ⚠️ Der Kasten reicht bis zur Fensterkante, der INHALT hält Abstand
   (`--sab`): so liegt der Hintergrund UNTER der Android-Gestenleiste und
   es entsteht kein weißer Streifen — wer stattdessen den Kasten
   einrückt, sieht genau den (Lars, 03.08.2026). */
/* ⚠️⚠️ **Der schwebende Werkzeug-Knopf braucht seinen Platz IM
   POLSTER** (v0.512): er ist `position: fixed`, 48 px hoch, 14 px über
   der Kante — was am Ende des Rollwegs unten rechts steht, lag unter
   ihm und ließ sich nicht darunter hervorrollen (Polster war 0). 48 +
   14 + 14 = 76. Wer die Größe des Knopfes ändert, ändert diese Zahl
   mit; sie steht bei `#lz-toolwrap` noch einmal als Hinweis. */
.lz-content { padding-bottom: calc(76px + var(--sab)); flex: 1; min-height: 0; overflow-y: auto; display: flex; align-items: center; justify-content: center; background: radial-gradient(1100px 620px at 85% -12%, color-mix(in srgb, var(--lza) 7%, transparent), transparent 60%), #fff; }
.lz-stub { max-width: 560px; padding: 40px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.lz-sicon { width: 76px; height: 76px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--lza) 12%, #fff); color: color-mix(in srgb, var(--lza) 62%, var(--lzi)); border: 1.5px solid color-mix(in srgb, var(--lza) 34%, #e9e8e4); }
.lz-sicon svg { width: 34px; height: 34px; }
.lz-stub h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.lz-stub p { margin: 0; font-size: 14.5px; font-weight: 600; color: #827e76; line-height: 1.55; }
.lz-pill { margin-top: 4px; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--lza) 13%, #fff); color: color-mix(in srgb, var(--lza) 62%, var(--lzi)); }

/* ============ Paket-Editor-Raum (pk-, ROSA — Mockup lehrer4) ============ */
.lz-content.lz-feat { display: block; align-items: stretch; justify-content: stretch; overflow-y: auto; }
.pk-root { min-height: 100%; background: radial-gradient(1100px 620px at 88% -12%, rgba(198,80,137,.07), transparent 60%), radial-gradient(900px 560px at 2% 108%, rgba(22,104,179,.04), transparent 60%); }
.pk-wrap { max-width: 1140px; margin: 0 auto; padding: 26px 34px 96px; }
.pk-flex { flex: 1; }
.pk-kicker { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #c65089; }
.pk-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600; background: #fff; color: #26241f; border: 1.5px solid #e9e8e4; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); cursor: pointer; transition: transform .16s cubic-bezier(.34,1.4,.5,1), border-color .16s ease, box-shadow .16s ease; }
.pk-btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, #26241f 16%, #e9e8e4); }
.pk-btn.prim { background: #c65089; color: #fff; border-color: transparent; box-shadow: 0 10px 22px -10px color-mix(in srgb, #c65089 70%, transparent); }
.pk-btn.prim:hover { box-shadow: 0 16px 30px -12px color-mix(in srgb, #c65089 75%, transparent); }
.pk-card2 { background: #fff; border: 1.5px solid #e9e8e4; border-radius: 18px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); }
.pk-x { border: 0; background: none; color: #a29c92; font: inherit; font-size: 13px; cursor: pointer; border-radius: 7px; padding: 2px 7px; }
.pk-x:hover { background: color-mix(in srgb, #c65089 10%, transparent); color: #26241f; }
.pk-empty { text-align: center; padding: 60px 20px; color: #827e76; }
.pk-empty b { font-size: 17px; color: #26241f; }
.pk-empty p { max-width: 440px; margin: 8px auto 0; font-size: 13.5px; line-height: 1.5; }
/* ⚠️ Die Meldung steht ÜBER dem Werkzeug-Knopf, nicht neben ihm: bei
   `bottom: 18px; right: 20px` lagen beide übereinander und „Gespeichert"
   wurde zu „Gespeic" beschnitten — in ALLEN Fenstergrößen, denn beide
   hängen am selben Eck. 76 px ist die Höhe, die der Knopf belegt. */
.pk-flash { position: fixed; bottom: calc(76px + var(--sab)); right: calc(20px + var(--sar)); background: #26241f; color: #fff; font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 10px; opacity: 0; transition: opacity .18s ease; pointer-events: none; z-index: 70; }
.pk-flash.on { opacity: 1; }
.pk-flash.err { background: #a33; }

/* Übersicht */
.pk-ovhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
/* Zwei Wege zu einem neuen Paket: von Hand und aus einem Skript. Der
   zweite steht links und ohne Füllung — er ist nicht die Vorgabe. */
.pk-ovbtns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pk-ovbtns .pk-btn { display: inline-flex; align-items: center; gap: 7px; }
.pk-h1 { font-size: 29px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 0; color: #26241f; }
.pk-ovsub { font-size: 14px; color: #827e76; margin: 6px 0 0; max-width: 56ch; }
.pk-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.pk-search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px; max-width: 460px; padding: 11px 16px; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 999px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); transition: border-color .16s ease, box-shadow .16s ease; }
.pk-search:focus-within { border-color: color-mix(in srgb, #c65089 45%, #e9e8e4); box-shadow: 0 0 0 4px color-mix(in srgb, #c65089 10%, transparent); }
.pk-search span { color: #a29c92; font-size: 14px; }
.pk-search input { flex: 1; border: none; background: transparent; outline: none; font: inherit; font-size: 14.5px; min-width: 0; }
.pk-fils { display: flex; gap: 6px; }
.pk-fil { padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; color: #827e76; border: 1.5px solid transparent; background: none; cursor: pointer; transition: background .14s ease, color .14s ease, border-color .14s ease; }
.pk-fil:hover { color: #26241f; background: #fff; }
.pk-fil.active { background: color-mix(in srgb, #c65089 12%, #fff); color: #c65089; border-color: color-mix(in srgb, #c65089 28%, transparent); }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pk-card { display: flex; flex-direction: column; text-align: left; width: 100%; font: inherit; cursor: pointer; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 18px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); overflow: hidden; padding: 0; transition: transform .18s cubic-bezier(.34,1.4,.5,1), border-color .18s ease, box-shadow .18s ease; }
.pk-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--acc, #c65089) 42%, #e9e8e4); box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--acc, #c65089) 40%, rgba(28,27,24,.3)); }
/* ---- Archivieren am Kartenrand (v0.419) ----
   ⚠️ Die Karte IST ein <button>; die Aktionen liegen als Geschwister in
   `.pk-cardwrap` DARÜBER, nicht darin — ein Knopf im Knopf ist
   ungültiges HTML. Die Hülle ist selbst Rasterzelle, die Karte füllt
   sie ganz aus. */
.pk-cardwrap { position: relative; display: block; }
.pk-cardwrap > .pk-card { height: 100%; }
.pk-acts { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; gap: 6px;
  opacity: 0; transition: opacity .14s ease, transform .18s cubic-bezier(.34,1.4,.5,1); }
/* Die Karte hebt sich beim Überfahren um 4 px — die Knöpfe müssen
   mitgehen, sonst wandern sie sichtbar auf ihr herum. */
.pk-cardwrap:hover .pk-acts, .pk-acts:focus-within { opacity: 1; transform: translateY(-4px); }
/* Im Archiv sind die beiden Knöpfe der Zweck der Ansicht — sie stehen
   dort immer, nicht erst beim Überfahren. */
.pk-cardwrap.arch .pk-acts { opacity: 1; }
.pk-act { width: 30px; height: 30px; min-height: 0; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1.4px solid #e9e8e4; border-radius: 9px; background: rgba(255,255,255,.94); backdrop-filter: blur(3px);
  color: #827e76; cursor: pointer; padding: 0; transition: background .14s ease, color .14s ease, border-color .14s ease; }
.pk-act:hover { color: #26241f; border-color: #c9c5bd; background: #fff; }
.pk-act[data-del]:hover { color: #b3261e; border-color: color-mix(in srgb, #b3261e 40%, #e9e8e4); }
/* ⚠️ Ohne Zeiger gibt es kein Überfahren: auf Tablet und Handy stehen
   die Knöpfe immer da, sonst wären sie dort unerreichbar. */
@media (hover: none), (pointer: coarse) {
  .pk-acts { opacity: 1; }
  .pk-cardwrap:hover .pk-acts { transform: none; }
}
.pk-filsep { width: 1px; align-self: stretch; margin: 4px 4px; background: #e0ddd8; }
.pk-filarch { display: inline-flex; align-items: center; gap: 6px; }
.pk-filarch b { font-weight: 700; opacity: .7; }
.pk-band { height: 8px; background: linear-gradient(90deg, var(--acc, #c65089), color-mix(in srgb, var(--acc, #c65089) 55%, #e0a020)); }
.pk-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.pk-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: #26241f; }
.pk-mtags { display: flex; flex-wrap: wrap; gap: 7px; }
.pk-mtag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, #f3f2ef 70%, #fff); color: #827e76; border: 1px solid #e9e8e4; }
.pk-cfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.pk-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.pk-status i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.pk-status.entwurf { color: color-mix(in srgb, #e0a020 62%, #26241f); }
.pk-status.entwurf i { background: #e0a020; }
.pk-status.fertig { color: #1f9e6a; }
.pk-status.fertig i { background: #1f9e6a; }
.pk-open { font-size: 13px; font-weight: 600; color: var(--acc, #c65089); }
.pk-newcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px; border: 1.6px dashed color-mix(in srgb, #c65089 40%, #e9e8e4); border-radius: 18px; background: color-mix(in srgb, #c65089 4%, #fff); color: #c65089; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; transition: transform .18s cubic-bezier(.34,1.4,.5,1), background .16s ease, border-color .16s ease; }
.pk-newcard span { font-size: 26px; line-height: 1; }
.pk-newcard:hover { transform: translateY(-4px); background: color-mix(in srgb, #c65089 9%, #fff); border-color: #c65089; }

/* Editor-Kopf */
.pk-edtop { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.pk-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #827e76; min-width: 0; }
.pk-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; color: #827e76; background: none; border: 0; cursor: pointer; transition: background .14s ease, color .14s ease; }
.pk-back:hover { background: color-mix(in srgb, #c65089 9%, #fff); color: #c65089; }
.pk-crumb .sep { color: #d5d2cb; }
.pk-crumb .here { color: #26241f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch; }
.pk-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pk-hinttoggle { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 13px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; color: #827e76; background: #fff; border: 1.5px solid #e9e8e4; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); cursor: pointer; transition: color .14s ease, border-color .14s ease; }
.pk-hinttoggle .sw { position: relative; width: 32px; height: 18px; border-radius: 999px; background: color-mix(in srgb, #827e76 30%, #fff); transition: background .16s ease; flex: none; }
.pk-hinttoggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(28,27,24,.3); transition: transform .16s cubic-bezier(.34,1.4,.5,1); }
.pk-hinttoggle.on { color: #8f3a62; border-color: color-mix(in srgb, #c65089 34%, #e9e8e4); }
.pk-hinttoggle.on .sw { background: #c65089; }
.pk-hinttoggle.on .sw::after { transform: translateX(14px); }
.pk-sttoggle { display: inline-flex; padding: 4px; gap: 3px; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 13px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); }
.pk-sttoggle button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 600; color: #827e76; background: none; border: 0; cursor: pointer; transition: background .14s ease, color .14s ease; }
.pk-sttoggle button i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .55; display: block; }
.pk-sttoggle button:hover { color: #26241f; }
.pk-sttoggle button.active[data-status="entwurf"] { background: color-mix(in srgb, #e0a020 14%, #fff); color: color-mix(in srgb, #e0a020 62%, #26241f); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #e0a020 30%, transparent); }
.pk-sttoggle button.active[data-status="fertig"] { background: color-mix(in srgb, #1f9e6a 12%, #fff); color: #1f9e6a; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #1f9e6a 28%, transparent); }
.pk-sttoggle button.active i { opacity: 1; }

/* Meta-Kopf */
.pk-metahead { padding: 22px 24px; margin-bottom: 18px; }
.pk-edtitel { display: block; width: 100%; border: none; background: transparent; font: inherit; font-size: 25px; font-weight: 700; letter-spacing: -.02em; color: #26241f; padding: 4px 8px; margin: 0 0 4px -8px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .14s ease, background .14s ease; }
.pk-edtitel:hover { box-shadow: inset 0 0 0 1.5px #e9e8e4; }
.pk-edtitel:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #c65089 45%, #e9e8e4); }
.pk-metarow { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; }
.pk-metafield { display: flex; flex-direction: column; gap: 5px; min-width: 0; max-width: 100%; }
.pk-metafield .val { max-width: 100%; box-sizing: border-box; }
.pk-metafield label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #827e76; }
.pk-metafield .val { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 10px; padding: 7px 12px; font: inherit; font-size: 14px; font-weight: 500; transition: border-color .14s ease, box-shadow .14s ease; }
.pk-metafield .val:hover { border-color: color-mix(in srgb, #26241f 16%, #e9e8e4); }
.pk-metafield .val:focus { outline: none; border-color: color-mix(in srgb, #c65089 45%, #e9e8e4); box-shadow: 0 0 0 3px color-mix(in srgb, #c65089 10%, transparent); }

/* Sektionen */
.pk-sec { margin-bottom: 26px; }
.pk-sech { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; }
.pk-sech h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; margin: 0; color: #26241f; }
.pk-count { font-size: 12px; font-weight: 600; color: #827e76; background: color-mix(in srgb, #f3f2ef 70%, #fff); border: 1px solid #e9e8e4; border-radius: 999px; padding: 2px 9px; }

/* Denkanstoß-Hinweis: sanft, kollegial, NIE rot */
.pk-hint { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 13px; background: color-mix(in srgb, #c65089 5%, #fff); border: 1.5px dashed color-mix(in srgb, #c65089 28%, #e9e8e4); font-size: 13.5px; line-height: 1.5; color: color-mix(in srgb, #26241f 82%, #c65089); margin: 10px 0 4px; }
.pk-hint > span:first-child { flex: none; font-size: 15px; line-height: 1.35; }

/* Analysen: Wortmarken untereinander, Klick = Volltext (Lars) */
.pk-anas { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pk-ana { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 11px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: #827e76; cursor: pointer; display: flex; align-items: baseline; gap: 9px; }
.pk-ana:hover { border-color: #c65089; color: #26241f; }
.pk-ana.filled { color: #26241f; border-color: color-mix(in srgb, #c65089 36%, #e9e8e4); background: color-mix(in srgb, #c65089 5%, #fff); }
.pk-ana small { font-size: 11px; font-weight: 600; color: #a29c92; }
.pk-anaplus { border-style: dashed; }
.pk-anaov, .pk-exportov { position: fixed; inset: 0; z-index: 68; background: rgba(28, 27, 24, .35); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 24px 20px; }
.pk-anaov[hidden], .pk-exportov[hidden] { display: none; }
.pk-anacard { width: min(1400px, 100%); max-height: 88vh; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(28,27,24,.5); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.pk-anahead { display: flex; align-items: center; gap: 10px; font-size: 15px; }
#pk-anatext { width: 100%; box-sizing: border-box; min-height: 55vh; border: 1.5px solid #e9e8e4; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 14.5px; line-height: 1.6; resize: vertical; }
#pk-anatext:focus { outline: none; border-color: #c65089; }

/* Lernziele: W-K-W in EINER Karte */
.pk-lzwrap { padding: 20px 22px; }
.pk-lzgrp { margin-bottom: 18px; }
.pk-lzgrp:last-of-type { margin-bottom: 0; }
.pk-glab { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #827e76; margin: 0 0 9px; }
.pk-glab small { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: #b3afa6; }
.pk-lzlist { display: flex; flex-direction: column; gap: 8px; }
.pk-lz { display: flex; align-items: center; gap: 11px; padding: 8px 13px; border-radius: 12px; background: color-mix(in srgb, #f3f2ef 40%, #fff); border: 1.5px solid #e9e8e4; transition: border-color .16s ease, background .16s ease; }
.pk-lz:hover, .pk-lz:focus-within { border-color: color-mix(in srgb, #c65089 34%, #e9e8e4); background: #fff; }
.pk-lztag { flex: none; font-size: 12px; font-weight: 700; color: #fff; background: #c65089; border-radius: 8px; padding: 3px 8px; min-width: 40px; text-align: center; }
.pk-lz input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14px; line-height: 1.45; padding: 2px; }
.pk-lz input:focus { outline: none; }
.pk-denkmark .pk-lztag { outline: 2px dotted color-mix(in srgb, #c65089 50%, #fff); outline-offset: 2px; }
.pk-lzempty { padding: 10px 13px; border-radius: 12px; border: 1.5px dashed #e9e8e4; font-size: 13px; color: #827e76; background: color-mix(in srgb, #f3f2ef 25%, #fff); }
.pk-lzfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pk-lzadd { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600; color: #c65089; padding: 7px 12px; border-radius: 10px; border: 1.5px dashed color-mix(in srgb, #c65089 34%, #e9e8e4); background: none; cursor: pointer; transition: background .14s ease; }
.pk-lzadd:hover { background: color-mix(in srgb, #c65089 8%, #fff); }
.pk-optoggle { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600; color: #827e76; padding: 7px 12px; border-radius: 10px; background: none; border: 0; cursor: pointer; transition: background .14s ease, color .14s ease; }
.pk-optoggle:hover, .pk-optoggle.open { color: #c65089; background: color-mix(in srgb, #c65089 8%, #fff); }
.pk-lzdraft { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.pk-lzdraft[hidden] { display: none; }
.pk-lzdraft select { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; font-weight: 600; color: #26241f; }
.pk-lzdraft input { flex: 1; min-width: 0; border: 1.5px solid color-mix(in srgb, #c65089 40%, #e9e8e4); background: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px; }
.pk-lzdraft input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, #c65089 10%, transparent); }
.pk-lzok { flex: none; padding: 8px 14px; border-radius: 10px; background: #c65089; color: #fff; font: inherit; font-size: 13px; font-weight: 600; border: 0; cursor: pointer; }
.pk-ops { margin-top: 12px; padding: 14px 16px; border-radius: 13px; background: color-mix(in srgb, #f3f2ef 45%, #fff); border: 1.5px solid #e9e8e4; }
.pk-ops[hidden] { display: none; }
.pk-opnote { margin: 0 0 11px; font-size: 12.5px; color: #827e76; line-height: 1.5; }
.pk-oprow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pk-oprow:last-child { margin-bottom: 0; }
.pk-afb { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #827e76; min-width: 92px; }
.pk-op { padding: 4px 11px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600; background: #fff; border: 1.5px solid #e9e8e4; color: #26241f; cursor: pointer; transition: border-color .13s ease, color .13s ease, transform .13s ease; }
.pk-op:hover { border-color: color-mix(in srgb, #c65089 50%, #e9e8e4); color: #c65089; transform: translateY(-1px); }

/* Stunden als Akkordeon */
.pk-lesson { border: 1.5px solid #e9e8e4; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); margin-bottom: 14px; overflow: hidden; transition: border-color .16s ease; }
.pk-lesson.open { border-color: color-mix(in srgb, #c65089 40%, #e9e8e4); }
.pk-lhead { display: flex; align-items: center; gap: 14px; padding: 15px 18px; width: 100%; cursor: pointer; transition: background .14s ease; }
.pk-lhead:hover { background: color-mix(in srgb, #c65089 5%, #fff); }
.pk-lnum { flex: none; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; background: color-mix(in srgb, #c65089 12%, #fff); color: #c65089; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #c65089 26%, transparent); }
.pk-lesson.open .pk-lnum { background: #c65089; color: #fff; box-shadow: none; }
.pk-lmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pk-sttitel { width: 100%; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: #26241f; padding: 2px 4px; margin-left: -4px; border-radius: 7px; }
.pk-sttitel:hover { background: rgba(28,27,24,.03); }
.pk-sttitel:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #c65089 40%, #e9e8e4); }
.pk-lsub { font-size: 12.5px; color: #827e76; }
.pk-lsub i { font-style: normal; color: #d5d2cb; }
.pk-lchev { flex: none; color: #827e76; font-size: 17px; font-weight: 600; transition: transform .2s ease, color .2s ease; }
.pk-lesson.open .pk-lchev { transform: rotate(90deg); color: #c65089; }
.pk-lbody { display: none; border-top: 1px solid #e9e8e4; padding: 20px 18px 18px; background: color-mix(in srgb, #f3f2ef 28%, #fff); }
.pk-lesson.open .pk-lbody { display: block; }
.pk-flowh { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; flex-wrap: wrap; }
.pk-flowh h3 { font-size: 14.5px; font-weight: 700; margin: 0; color: #26241f; }
.pk-agg { font-size: 12px; font-weight: 600; color: #c65089; background: color-mix(in srgb, #c65089 10%, #fff); border: 1px solid color-mix(in srgb, #c65089 26%, transparent); border-radius: 999px; padding: 3px 10px; }
.pk-agg.n { color: #827e76; background: color-mix(in srgb, #f3f2ef 70%, #fff); border-color: #e9e8e4; display: inline-flex; align-items: center; gap: 4px; }
.pk-agg.n input { width: 44px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: #26241f; text-align: center; border-bottom: 1px solid #d5d2cb; }
.pk-agg.n input:focus { outline: none; border-bottom-color: #c65089; }

/* Schritt-Karten: Grip · linke Spalte · Lehren/Lernen */
.pk-step { display: grid; grid-template-columns: 26px 132px 1fr; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 15px; margin-bottom: 12px; transition: border-color .16s ease, box-shadow .16s ease; }
.pk-step:hover { border-color: color-mix(in srgb, #c65089 40%, #e9e8e4); box-shadow: 0 12px 28px -16px color-mix(in srgb, #c65089 42%, rgba(28,27,24,.25)); }
.pk-sgrip { display: flex; align-items: flex-start; justify-content: center; padding-top: 16px; background: color-mix(in srgb, #f3f2ef 55%, #fff); border-right: 1px solid #e9e8e4; border-radius: 14px 0 0 14px; color: #d5d2cb; }
.pk-step:hover .pk-sgrip { color: #c65089; }
.pk-sleft { padding: 14px 12px; border-right: 1px solid #e9e8e4; display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, #f3f2ef 24%, #fff); }
.pk-sleft label { display: flex; flex-direction: column; gap: 3px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #827e76; }
.pk-sleft input { width: 100%; box-sizing: border-box; border: 1.5px solid #e9e8e4; background: #fff; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; font-weight: 600; color: #26241f; }
.pk-sleft input[data-f="zeit"] { text-align: center; }
.pk-sleft input:focus { outline: none; border-color: color-mix(in srgb, #c65089 45%, #e9e8e4); }
.pk-sozial { display: flex; flex-wrap: wrap; gap: 4px; }
.pk-soz { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 8px; padding: 3px 7px; font: inherit; font-size: 11px; font-weight: 700; color: #827e76; cursor: pointer; }
.pk-soz.on { background: color-mix(in srgb, #1668b3 9%, #fff); border-color: color-mix(in srgb, #1668b3 40%, #e9e8e4); color: #1668b3; }
.pk-sbody { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pk-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pk-lanelab { display: flex; align-items: baseline; gap: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: color-mix(in srgb, #c65089 70%, #26241f); margin-bottom: 6px; }
.pk-lanelab.g { color: color-mix(in srgb, #1f9e6a 70%, #26241f); }
.pk-lanelab small { font-size: 10px; font-weight: 500; color: #b3afa6; text-transform: none; letter-spacing: 0; }
.pk-lane { width: 100%; box-sizing: border-box; border: 1.5px solid #e9e8e4; border-radius: 11px; background: color-mix(in srgb, #f3f2ef 30%, #fff); padding: 11px 13px; font: inherit; font-size: 13.5px; line-height: 1.55; color: #26241f; resize: vertical; transition: border-color .16s ease, background .16s ease; }
.pk-lane:hover { border-color: color-mix(in srgb, #c65089 30%, #e9e8e4); background: #fff; }
.pk-lane:focus { outline: none; border-color: color-mix(in srgb, #c65089 45%, #e9e8e4); background: #fff; }
.pk-lane.lernen { background: color-mix(in srgb, #1f9e6a 5%, #fff); }
.pk-lane.lernen:hover, .pk-lane.lernen:focus { border-color: color-mix(in srgb, #1f9e6a 30%, #e9e8e4); background: #fff; }
.pk-sfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid #e9e8e4; margin-top: 2px; padding-top: 12px; }
.pk-footlab { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #827e76; }
.pk-matinp { flex: 1; min-width: 120px; border: 1.5px solid #e9e8e4; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; color: color-mix(in srgb, #1668b3 70%, #26241f); background: color-mix(in srgb, #1668b3 5%, #fff); }
.pk-matinp:focus { outline: none; border-color: color-mix(in srgb, #1668b3 40%, #e9e8e4); background: #fff; }
.pk-slz { display: flex; flex-wrap: wrap; gap: 4px; }
.pk-slzchip { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 8px; padding: 4px 9px; font: inherit; font-size: 11.5px; font-weight: 700; color: #a29c92; cursor: pointer; }
.pk-slzchip.on { border-color: color-mix(in srgb, #c65089 28%, transparent); background: color-mix(in srgb, #c65089 10%, #fff); color: #c65089; }
.pk-addstep, .pk-addlesson { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border-radius: 13px; border: 1.6px dashed color-mix(in srgb, #c65089 36%, #e9e8e4); background: color-mix(in srgb, #c65089 4%, #fff); color: #c65089; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .14s ease, transform .14s cubic-bezier(.34,1.4,.5,1), border-color .14s ease; }
.pk-addstep:hover, .pk-addlesson:hover { background: color-mix(in srgb, #c65089 9%, #fff); transform: translateY(-2px); border-color: #c65089; }
.pk-addlesson { margin-top: 4px; padding: 15px; }

/* Export-Dialog */
.pk-dialog { width: 660px; max-width: 100%; max-height: 88vh; overflow-y: auto; background: #fff; border: 1px solid #e9e8e4; border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(28,27,24,.5); padding: 24px 26px 20px; animation: pkdlg .22s cubic-bezier(.34,1.4,.5,1); }
@keyframes pkdlg { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.pk-dlghead { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.pk-dlghead h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 3px; color: #26241f; }
.pk-dlghead p { margin: 0; font-size: 13.5px; color: #827e76; }
.pk-dlghead .pk-x { margin-left: auto; }
.pk-dlgsec { margin-bottom: 18px; }
.pk-dlglab { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #827e76; margin: 0 0 9px; }
.pk-choice { position: relative; display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 13px; border: 1.5px solid #e9e8e4; background: #fff; font: inherit; cursor: pointer; transition: border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.pk-choice + .pk-choice { margin-top: 8px; }
.pk-choice:hover { border-color: color-mix(in srgb, #c65089 36%, #e9e8e4); }
.pk-choice.off { opacity: .55; cursor: default; }
.pk-choice.off:hover { border-color: #e9e8e4; }
.pk-choice .rd { flex: none; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, #827e76 55%, #e9e8e4); margin-top: 2px; transition: border-color .14s ease, box-shadow .14s ease; }
.pk-choice.sel { border-color: color-mix(in srgb, #c65089 55%, #e9e8e4); background: color-mix(in srgb, #c65089 4%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, #c65089 22%, transparent); }
.pk-choice.sel .rd { border-color: #c65089; box-shadow: inset 0 0 0 4.5px #c65089; }
.pk-choice .ct { flex: 1; min-width: 0; }
.pk-choice .ct b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; color: #26241f; }
.pk-choice .ct span { display: block; font-size: 12.5px; color: #827e76; line-height: 1.45; }
.pk-badge { flex: none; align-self: center; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; }
.pk-badge.b-s { background: color-mix(in srgb, #1f9e6a 12%, #fff); color: #1f9e6a; }
.pk-badge.b-l { background: color-mix(in srgb, #1668b3 11%, #fff); color: color-mix(in srgb, #1668b3 75%, #26241f); }
.pk-badge.b-v { background: color-mix(in srgb, #e0a020 15%, #fff); color: color-mix(in srgb, #e0a020 60%, #26241f); }
.pk-tplrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pk-tpl { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px; border: 1.5px solid #e9e8e4; background: #fff; text-align: left; }
.pk-tpl.sel { border-color: color-mix(in srgb, #c65089 55%, #e9e8e4); background: color-mix(in srgb, #c65089 4%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, #c65089 22%, transparent); }
.pk-tpl .prev { flex: none; width: 44px; height: 58px; border-radius: 6px; background: #fff; border: 1px solid #e9e8e4; box-shadow: 0 2px 6px rgba(28,27,24,.1); display: flex; flex-direction: column; gap: 3px; padding: 5px; }
.pk-tpl .prev .ph { height: 7px; border-radius: 3px; background: linear-gradient(90deg, #c65089, #e0a020); }
.pk-tpl .prev .pl { height: 3px; border-radius: 2px; background: #e9e8e4; }
.pk-tpl .prev .pl.s { width: 65%; }
.pk-tpl .ct b { display: block; font-size: 13.5px; font-weight: 600; color: #26241f; }
.pk-tpl .ct span { display: block; font-size: 12px; color: #827e76; margin-top: 1px; }
.pk-tpl.ghost { border-style: dashed; color: #827e76; background: color-mix(in srgb, #f3f2ef 35%, #fff); opacity: .68; justify-content: center; flex-direction: column; gap: 5px; text-align: center; }
.pk-tpl.ghost .plus { font-size: 19px; line-height: 1; }
.pk-tpl.ghost b { font-size: 13px; font-weight: 600; display: block; }
.pk-tpl.ghost span span { font-size: 11.5px; display: block; }
.pk-ghostnote { margin: 8px 2px 0; font-size: 12px; color: #a29c92; }
.pk-dlgfoot { display: flex; align-items: center; gap: 12px; border-top: 1px solid #e9e8e4; margin-top: 4px; padding-top: 15px; }
.pk-dlgsum { flex: 1; font-size: 12.5px; font-weight: 500; color: #827e76; line-height: 1.4; }
.pk-dlgsum b { color: #26241f; font-weight: 600; }

@media (max-width: 900px) {
  .pk-step { grid-template-columns: 24px 104px 1fr; }
  .pk-duo { grid-template-columns: 1fr; }
  .pk-tplrow { grid-template-columns: 1fr; }
  .pk-wrap { padding: 20px 18px 80px; }
}

/* ============ Unterrichtsmodus-Raum (ur-, GRÜN — Mockup lehrer6) ============ */
.ur-root { min-height: 100%; display: flex; flex-direction: column; background: radial-gradient(1100px 620px at 85% -12%, rgba(31,158,106,.06), transparent 60%); }
/* im Lauf: der Raum ist bildschirmhoch, die BAHN scrollt (nicht der
 * Raum-Container — sonst greift die Lese-Linien-Logik ins Leere).
 * Doppelklassig, um .lz-content.lz-feat (display:block) zu schlagen. */
.lz-content.lz-feat.ur-laufmodus { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ur-wrap { max-width: 920px; width: 100%; margin: 0 auto; padding: 44px 32px 48px; }
.ur-h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: #26241f; }
.ur-subp { margin: 0 0 26px; font-size: 14.5px; color: #827e76; line-height: 1.5; }
.ur-empty { text-align: center; color: #827e76; padding: 50px 16px; font-size: 13.5px; }
.ur-empty b { display: block; font-size: 16px; color: #26241f; margin-bottom: 6px; }
.ur-flex { flex: 1; }

/* Stunden-Karten */
.ur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; }
/* S0: Nachbereiten ohne die Stunde noch einmal abzuspielen. Der Knopf
   sitzt UNTER der Karte, nicht darin — eine Karte ist ein Knopf, und
   ein Knopf im Knopf schluckt den Klick der Karte. */
.ur-slot { display: flex; flex-direction: column; gap: 6px; }
.ur-slot .ur-card { flex: 1; }
.ur-nachbtn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #e9e8e4; border-radius: 999px; background: transparent; color: #56524b;
  font: inherit; font-size: 12.5px; padding: 4px 12px; cursor: pointer; }
.ur-nachbtn:hover { border-color: #1f9e6a; color: #1f9e6a; background: color-mix(in srgb, #1f9e6a 7%, #fff); }
.ur-nachwrap { max-width: 1000px; }
.ur-nachwrap .ur-back { margin-bottom: 12px; }
.ur-nachwrap .ur-schritt { opacity: 1; transform: none; }
.ur-card { text-align: left; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 16px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 5px; font: inherit; cursor: pointer; transition: transform .16s cubic-bezier(.34,1.4,.5,1), border-color .16s ease, box-shadow .16s ease; }
.ur-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, #1f9e6a 45%, #e9e8e4); box-shadow: 0 18px 36px -14px color-mix(in srgb, #1f9e6a 40%, transparent); }
.ur-card.soon { opacity: .6; cursor: default; }
.ur-card.soon:hover { transform: none; border-color: #e9e8e4; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); }
.ur-toprow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ur-badge { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, #1f9e6a 13%, #fff); color: #14603f; }
.ur-card.soon .ur-badge { background: #f0efec; color: #827e76; }
/* Die drei Zustaende einer Stunde (v0.455). ⚠️ Die Farbe folgt der
   AUSSAGE, nicht einer Ampel: bereit = gruen wie „los", Entwurf = grau
   wie „noch nicht so weit", gehalten = ruhiges Blau — es ist keine
   Warnung, sondern eine Tatsache ueber die Vergangenheit. */
.ur-badge.b-entwurf  { background: #f0efec; color: #827e76; }
.ur-badge.b-gehalten { background: color-mix(in srgb, #3b6ea5 13%, #fff); color: #2b527c; }
.ur-card.z-gehalten  { opacity: .82; }
.ur-card.z-gehalten:hover { opacity: 1; }
/* Die Aktionen unter der Karte: „Nachbereiten" und, nur bei gehalten,
   „zuruecknehmen". Sie liegen NEBEN der Karte, damit sie deren Klick
   nicht fressen. */
.ur-cardakt { display: flex; flex-wrap: wrap; gap: 6px; }
.ur-undo:hover { border-color: #b4472e; color: #b4472e;
  background: color-mix(in srgb, #b4472e 7%, #fff); }
/* Gliederung nach Klasse, wie im Paketeditor */
.ur-grp { margin: 0 0 26px; }
.ur-grphead { display: flex; align-items: center; gap: 9px; margin: 0 0 11px; }
.ur-grphead h2 { font-size: 15px; margin: 0; }
.ur-grpn { font-size: 12px; color: var(--t-muted); background: #f4f3f0;
  border-radius: 999px; padding: 1px 8px; }
.ur-name { font-size: 17.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: #26241f; }
.ur-meta { font-size: 13px; color: #827e76; }
.ur-foot { margin-top: 12px; display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: #14603f; }
.ur-foot i { font-style: normal; }
.ur-card.soon .ur-foot { color: #827e76; }
.ur-note { margin-top: 22px; display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border: 1px dashed #d5d2cb; border-radius: 14px; font-size: 13px; color: #827e76; line-height: 1.5; max-width: 620px; }

/* Lauf: Phasenleiste (Segmente ∝ Soll + Zähler/Hinweis/Rest) */
.ur-lauf { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ur-phasen { padding: 14px 26px 10px; border-bottom: 1px solid #e9e8e4; background: linear-gradient(180deg, #fff, #fcfbf8); }
.ur-segs { display: flex; gap: 5px; max-width: 1100px; margin: 0 auto; }
.ur-seg { position: relative; height: 30px; border-radius: 9px; border: 1px solid #e9e8e4; background: #fbfbfa; overflow: hidden; cursor: pointer; transition: border-color .15s ease; min-width: 34px; padding: 0; }
.ur-seg:hover { border-color: color-mix(in srgb, #1f9e6a 45%, #e9e8e4); }
.ur-seg .ur-fill { position: absolute; inset: 0; width: 0; display: block; background: color-mix(in srgb, #1f9e6a 22%, #fff); transition: width .8s linear; }
.ur-seg.done .ur-fill { background: color-mix(in srgb, #1f9e6a 30%, #fff); }
.ur-seg.cur { border-color: color-mix(in srgb, #1f9e6a 55%, #e9e8e4); box-shadow: 0 0 0 3px color-mix(in srgb, #1f9e6a 14%, transparent); }
.ur-slbl { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 100%; padding: 0 9px; font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.ur-slbl b { font-weight: 600; color: #26241f; overflow: hidden; text-overflow: ellipsis; }
.ur-slbl span { font-weight: 600; color: #827e76; font-variant-numeric: tabular-nums; }
.ur-seg.done .ur-slbl b, .ur-seg.done .ur-slbl span { color: #14603f; }
.ur-unter { display: flex; align-items: center; gap: 12px; margin: 7px auto 0; max-width: 1100px; font-size: 12.5px; color: #827e76; }
.ur-back { border: 1.5px solid #e9e8e4; background: #fff; color: #827e76; border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: color .14s ease, border-color .14s ease; }
.ur-back:hover { color: #14603f; border-color: color-mix(in srgb, #1f9e6a 45%, #e9e8e4); }
.ur-count { font-weight: 600; color: #26241f; font-variant-numeric: tabular-nums; }
.ur-uflex { flex: 1; }
.ur-uhint { font-size: 12px; color: #b3afa6; }
.ur-uhint kbd { font: inherit; font-weight: 600; color: #827e76; background: #f4f3f0; border: 1px solid #e9e8e4; border-radius: 5px; padding: 0 5px; }
.ur-rest { font-variant-numeric: tabular-nums; }
.ur-rest b { font-weight: 600; color: #26241f; }

/* Bahn + Schritt-Karten (Zustand hängt an der Scroll-Position) */
.ur-bahn { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 26px 26vh; scroll-behavior: smooth; }
.ur-schritt { max-width: 1060px; margin: 0 auto 20px; background: #fff; border: 1.5px solid #e9e8e4; border-left: 5px solid #e9e8e4; border-radius: 16px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); padding: 22px 26px 24px; scroll-margin-top: 14px; opacity: .68; filter: saturate(.9); transition: opacity .3s ease, border-color .3s ease, box-shadow .3s ease, filter .3s ease; }
.ur-schritt:hover { opacity: 1; filter: none; }
.ur-schritt.cur { opacity: 1; filter: none; border-left-color: #1f9e6a; box-shadow: 0 2px 4px rgba(28,27,24,.05), 0 20px 44px -18px color-mix(in srgb, #1f9e6a 38%, rgba(28,27,24,.25)); }
.ur-schritt.done { opacity: .42; filter: none; }
.ur-schritt.done:hover { opacity: 1; }
.ur-skopf { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ur-phase { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #14603f; }
.ur-phase .n { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 7px; background: #1f9e6a; color: #fff; font-size: 12.5px; font-weight: 600; }
.ur-schritt:not(.cur) .ur-phase .n { background: color-mix(in srgb, #1f9e6a 55%, #fff); }
.ur-soz { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, #1668b3 8%, #fff); color: #1668b3; border: 1px solid color-mix(in srgb, #1668b3 24%, #e9e8e4); }
.ur-lz { font-size: 11px; font-weight: 800; color: #c65089; background: color-mix(in srgb, #c65089 10%, #fff); border-radius: 7px; padding: 2px 8px; }

/* Uhr: läuft nur auf der aktuellen Karte; vergangene tragen ✓ + Ist */
.ur-clock { display: inline-flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; font-size: 13px; color: #827e76; }
.ur-clock b { font-weight: 600; color: #26241f; }
.ur-clock .d { align-self: center; width: 7px; height: 7px; border-radius: 50%; background: #1f9e6a; display: inline-block; animation: urPulse 1.8s ease-in-out infinite; }
@keyframes urPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.ur-clock.ueber b { color: #b0741c; }
.ur-clock.ueber .d { background: #b0741c; }
.ur-live { display: inline-flex; align-items: baseline; gap: 6px; }
.ur-schritt:not(.cur) .ur-live { display: none; }
.ur-schritt.done .ur-clock { display: none; }
.ur-donechip { display: none; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: color-mix(in srgb, #1f9e6a 13%, #fff); color: #14603f; }
.ur-schritt.done .ur-donechip { display: inline-flex; }

.ur-scols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 26px; align-items: start; }
.ur-saylead { margin: 0 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #b3afa6; }
.ur-say { margin: 0; font-size: clamp(19px, 2vw, 25px); line-height: 1.35; font-weight: 600; letter-spacing: -.012em; color: color-mix(in srgb, #1f9e6a 55%, #26241f); }
.ur-seite { display: flex; flex-direction: column; gap: 14px; }
/* Fehlläufe (12.8): klein unter dem Impuls — bewusst leiser als alles
   andere auf der Karte; wer sie braucht, sucht sie gerade. */
.ur-fehll { margin-top: 14px; padding-top: 8px; border-top: 1px dashed #e9e8e4; }
.ur-fllead { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #b3afa6; margin-bottom: 4px; }
.ur-flist { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; color: #6d6a63; }
.ur-flist em { font-style: normal; font-weight: 600; color: #4d4a44; }
.ur-ascard { background: #fbfbfa; border: 1px solid #e9e8e4; border-radius: 13px; padding: 13px 16px; }
.ur-aslead { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #b3afa6; margin-bottom: 8px; }
.ur-ans { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ur-ans li { position: relative; padding-left: 20px; font-size: 13.5px; font-weight: 600; color: #26241f; line-height: 1.4; }
.ur-ans li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid color-mix(in srgb, #1f9e6a 55%, #e9e8e4); }
.ur-ansnone { font-size: 13px; font-style: italic; color: #b3afa6; }
.ur-asmat { font-size: 13px; color: #4b473f; line-height: 1.5; }
.ur-matnote { font-size: 12.5px; color: #827e76; line-height: 1.5; }
.ur-ende { height: 10vh; }

/* Reflexion — die letzte Karte der Bahn, privat, ruhig */
.ur-reflex { padding: 30px 32px 32px; }
.ur-rfhead { margin-bottom: 24px; }
.ur-rfdone { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #14603f; margin-bottom: 10px; }
.ur-rfh1 { margin: 0 0 8px; font-size: 25px; font-weight: 700; letter-spacing: -.02em; color: #26241f; }
.ur-rfsub { margin: 0; font-size: 14.5px; color: #827e76; line-height: 1.55; max-width: 560px; }
.ur-privat { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #f4f3f0; color: #26241f; border: 1px solid #e9e8e4; }
.ur-rgrid2 { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; align-items: start; }
.ur-rfcard { background: #fbfbfa; border: 1px solid #e9e8e4; border-radius: 16px; padding: 18px 20px; }
.ur-rflab { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #827e76; margin-bottom: 10px; }
.ur-rfhint { font-size: 12.5px; color: #b3afa6; font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: auto; }
.ur-zeittab table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ur-zeittab th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #b3afa6; padding: 0 6px 7px 0; border-bottom: 1px solid #e9e8e4; }
.ur-zeittab th.num, .ur-zeittab td.num { text-align: right; }
.ur-zeittab td { padding: 7px 6px 7px 0; font-size: 13px; border-bottom: 1px solid #f2f1ee; vertical-align: baseline; }
.ur-zeittab td.nm { color: #26241f; font-weight: 600; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ur-zeittab td.num { color: #827e76; }
.ur-zeittab td.delta { text-align: right; font-weight: 600; }
.ur-zeittab td.delta.ueber { color: #b0741c; }
.ur-zeittab td.delta.unter { color: #14603f; }
.ur-zeittab tr.sum td { border-bottom: none; padding-top: 10px; font-weight: 700; color: #26241f; }
.ur-ztnote { margin: 10px 0 0; font-size: 12.5px; color: #827e76; line-height: 1.5; }
.ur-rfield { display: flex; flex-direction: column; gap: 6px; margin-top: 15px; font-size: 13px; font-weight: 600; color: #26241f; }
.ur-rfcard .ur-rfield:first-child { margin-top: 0; }
.ur-rfield small { font-weight: 400; color: #b3afa6; margin-left: 2px; }
.ur-rfield textarea, .ur-rfield input { font: inherit; font-size: 14px; font-weight: 400; color: #26241f; line-height: 1.5; border: 1.5px solid #e9e8e4; border-radius: 11px; padding: 10px 13px; background: #fff; resize: vertical; min-height: 66px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.ur-rfield input { min-height: 0; }
.ur-rfield textarea:focus, .ur-rfield input:focus { border-color: color-mix(in srgb, #1f9e6a 50%, #e9e8e4); box-shadow: 0 0 0 3px color-mix(in srgb, #1f9e6a 12%, transparent); }
.ur-rfield textarea::placeholder, .ur-rfield input::placeholder { color: #b3afa6; }
.ur-rfoot { margin-top: 22px; display: flex; align-items: center; gap: 14px; }
.ur-primary { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 13px; font: inherit; font-size: 15px; font-weight: 600; background: #1f9e6a; color: #fff; border: 0; cursor: pointer; box-shadow: 0 14px 28px -12px color-mix(in srgb, #1f9e6a 70%, transparent); transition: transform .14s cubic-bezier(.34,1.4,.5,1), box-shadow .14s ease; }
.ur-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px color-mix(in srgb, #1f9e6a 75%, transparent); }
.ur-skip { font: inherit; font-size: 13.5px; font-weight: 600; color: #827e76; padding: 8px 6px; background: none; border: 0; cursor: pointer; }
.ur-skip:hover { color: #26241f; }

@media (max-width: 860px) {
  /* ⚠️ Die Nachbereitung ist der EINE Ort, an den man nach der Stunde mit
     dem Telefon geht (S0, sprachrueckmeldung-konzept.md §7). Entscheidend
     ist die Schriftgröße: unter 16 px zoomt iOS beim Antippen in das Feld
     hinein, und die halbe Seite ist fort. Diktiert wird dann mit der
     Systemtastatur — dafür braucht es nichts weiter.
     ⚠️ Und die Regel gehört HIERHIN, nicht in den 700-px-Block weiter
     oben: der steht VOR `.ur-rfield textarea`, und bei gleicher
     Spezifität gewinnt die spätere Regel. Dort verlor sie lautlos
     (gemessen: 14 px statt 16). */
  .ur-rfield textarea, .ur-rfield input { font-size: 16px; }
  .ur-rfield textarea { min-height: 96px; }
  .ur-nachwrap { padding-bottom: 90px; }
  .ur-scols { grid-template-columns: 1fr; gap: 18px; }
  .ur-rgrid2 { grid-template-columns: 1fr; }
  .ur-slbl b { display: none; }
  .ur-uhint { display: none; }
  .ur-wrap { padding: 24px 18px 40px; }
}

/* ============ Wiki-Raum (wr-, ruhige Tinte) ============ */
.wr-root { min-height: 100%; }
.wr-wrap { max-width: 1500px; margin: 0 auto; padding: 18px 26px 60px; }
.wr-wrap.wr-lese { max-width: 860px; }
/* umbricht wie `.mr-head`; das Suchfeld gibt bei 200 px auf, dann
   fällt „＋ Artikel" in die zweite Zeile statt aus dem Fenster */
.wr-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.wr-top #wr-q { flex: 1; min-width: 200px; max-width: 420px; border: 1.5px solid #e9e8e4; border-radius: 11px; padding: 9px 13px; font: inherit; font-size: 14px; }
.wr-top #wr-q:focus { outline: none; border-color: #6e6a62; }
.wr-flex { flex: 1; }
.wr-primary { border: 1.5px solid #6e6a62; background: #6e6a62; color: #fff; border-radius: 11px; padding: 9px 15px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.wr-ghost { border: 1.5px solid #e9e8e4; background: #fff; color: #26241f; border-radius: 11px; padding: 8px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wr-ghost:hover { border-color: #6e6a62; }
.wr-grp { margin-bottom: 18px; }
.wr-grp > b { display: block; font-size: 12px; font-weight: 800; color: #827e76; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 8px; }
.wr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.wr-card { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 13px; padding: 12px 14px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: transform .15s cubic-bezier(.34,1.4,.5,1), border-color .14s ease; }
.wr-card:hover { transform: translateY(-2px); border-color: #6e6a62; }
.wr-ctitel { font-size: 14.5px; font-weight: 700; color: #26241f; }
.wr-ckurz { font-size: 12.5px; color: #827e76; line-height: 1.45; }
.wr-mark { font-style: normal; font-size: 10.5px; font-weight: 800; color: #6e6a62; background: #f0efeb; border-radius: 6px; padding: 1px 6px; vertical-align: 2px; }
.wr-titel { margin: 4px 0 4px; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.wr-kurz { margin: 0 0 12px; font-size: 15px; color: #6c675f; line-height: 1.5; }
.wr-stufen { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid #e9e8e4; padding-bottom: 10px; margin-bottom: 14px; }
/* ⚠️ Die Leiste hat KEIN Rollfeld — was nicht passt, wird lautlos
   abgeschnitten. Gemessen bei 390 px: 338 sichtbar, 484 gebraucht;
   „Sachanalyse (für Lehrkräfte)" ragte 13 px hinaus, „Diese Fassung
   bearbeiten" 120 — der Knopf war praktisch weg. Sie bricht deshalb um,
   und der Spacer `.wr-flex` erzwingt den Umbruch VOR dem Bearbeiten-
   Knopf: er nimmt eine ganze Zeile, statt als 1-px-Rest zwischen den
   Stufen zu hängen. (Dieselbe Antwort wie bei der Fußzeile in v0.513 —
   ein Knopf, der aus dem Fenster läuft, ist kein Knopf.) */
@media (max-width: 900px) {
  .wr-stufen { flex-wrap: wrap; row-gap: 8px; }
  .wr-stufen .wr-flex { flex-basis: 100%; height: 0; }
  .wr-stufen .wr-stsep { display: none; }
}
.wr-stufen [data-st] { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 12.5px; font-weight: 700; color: #6c675f; cursor: pointer; }
.wr-stufen [data-st].on { background: #6e6a62; border-color: #6e6a62; color: #fff; }
/* Die Sachanalyse steht in derselben Zeile, ist aber KEINE Stufe:
 * abgesetzt durch einen Trenner und in der Kontofarbe statt im Grau
 * der Bänder — sonst läse sie sich als „vierte Klassenstufe". */
.wr-stsep { width: 1px; align-self: stretch; margin: 2px 6px; background: #e9e8e4; }
.wr-stufen [data-st].wr-stsach { display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 34%, #e9e8e4); }
.wr-stufen [data-st].wr-stsach.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Der Grundschulreiter teilt das Aussehen der Sachanalyse (`wr-stsach`)
   — dieselbe Sorte Fassung, dieselbe Grenze `o.lehrer`. */
.wr-stufen [data-st].wr-stdid { font-style: italic; }
.wr-artikel.wr-sachan { font-size: 14px; }
.wr-stufen [data-st].leer { opacity: .5; }
.wr-artikel { font-size: 15.5px; line-height: 1.65; color: #26241f; }
.wr-artikel p { margin: 0 0 10px; }
.wr-artikel ul, .wr-artikel ol { margin: 0 0 10px; padding-left: 22px; }
.wr-link { color: #26241f; text-decoration: underline dotted #a29c92; cursor: pointer; }
.wr-link:hover { text-decoration-style: solid; }
.wr-link.wr-off { text-decoration: none; color: #827e76; cursor: default; }
.wr-leer { color: #827e76; font-size: 13.5px; padding: 16px 4px; }
.wr-siehe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; border-top: 1px solid #f0efeb; padding-top: 12px; }
.wr-chip { border: 1.5px solid #e9e8e4; background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wr-chip:hover { border-color: #6e6a62; }
.wr-editov { position: fixed; inset: 0; z-index: 68; background: rgba(28, 27, 24, .3); display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; }
.wr-editov[hidden] { display: none; }
.wr-editcard { width: min(1400px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 24px 60px -18px rgba(28,27,24,.4); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.wr-edithead { display: flex; align-items: center; gap: 10px; font-size: 15px; }
/* „Ins Repo" — bewusst als UMRANDETER Nachbar des vollen „Fertig":
   der seltene, gewichtigere Weg soll nicht wie der Standard aussehen. */
.wr-repoknopf {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--accent); background: none; color: var(--accent);
  border-radius: 11px; padding: 8px 13px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.wr-repoknopf:hover { background: var(--accent-soft); }
.wr-repoknopf:disabled { opacity: .5; cursor: default; }
.wr-editcard input { border: 1.5px solid #e9e8e4; border-radius: 10px; padding: 8px 11px; font: inherit; font-size: 14px; }
.wr-editcard input:focus, .wr-editcard textarea:focus { outline: none; border-color: #6e6a62; }
#wr-etext { width: 100%; box-sizing: border-box; min-height: 52vh; border: 1.5px solid #e9e8e4; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 14.5px; line-height: 1.6; resize: vertical; }
.wr-hint { margin: 0; font-size: 12px; color: #a29c92; }

/* ============ Lehrerzimmer-Raum (lzr-, BERNSTEIN Akzent — Mockup lehrer5) ============ */
.lzr-root { min-height: 100%; background: radial-gradient(1100px 620px at 85% -12%, rgba(224,160,32,.07), transparent 60%); }
.lzr-wrap { max-width: 1500px; margin: 0 auto; padding: 26px 36px 64px; display: flex; flex-direction: column; gap: 22px; }
.lzr-h1 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.02em; color: #26241f; }
.lzr-sub { margin: 5px 0 0; font-size: 14.5px; color: #827e76; line-height: 1.5; }
.lzr-sub b { color: #26241f; font-weight: 600; }
.lzr-vhead { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.lzr-vhead > div { flex: 1; min-width: 240px; }
.lzr-emojibtn { background: none; border: 0; font: inherit; cursor: pointer; padding: 0 2px; border-radius: 9px; }
.lzr-emojibtn:hover { background: rgba(28,27,24,.05); }
/* Auswahlmenü für das Klassen-Zeichen (statt prompt) */
.lzr-emojiwrap { position: relative; }
.lzr-pop.lzr-emojipop { left: 0; top: 46px; width: 330px; max-width: min(330px, 88vw); }
.lzr-emojigrid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; }
.lzr-emojiopt { border: 0; background: none; font-size: 21px; line-height: 1; padding: 5px 0; border-radius: 9px; cursor: pointer; }
.lzr-emojiopt:hover { background: #f1f0ed; }
.lzr-emojiopt.on { background: color-mix(in srgb, #e0a020 18%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #e0a020 45%, #e9e8e4); }
.lzr-codechip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1.5px solid #e9e8e4; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); font-size: 13.5px; font-weight: 700; color: #26241f; letter-spacing: .05em; margin-top: 3px; }
/* Die Klassenstufe sitzt neben dem Klassencode: der eine sagt, wer
   beitreten darf, die andere, in welchem Band die Klasse liest — und ob
   im Wiki der Grundschulfilter erscheint. */
.lzr-stufe { display: inline-flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.lzr-stufe > small { font-size: 10.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--t-muted); }
.lzr-stufe select { min-height: 34px; font-size: 13px; }
.lzr-codechip small { font-size: 10.5px; font-weight: 600; color: #827e76; text-transform: uppercase; letter-spacing: .07em; }
.lzr-sec { display: flex; flex-direction: column; gap: 12px; }
.lzr-sechead { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.lzr-sectitle { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; color: #26241f; }
.lzr-pill { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: color-mix(in srgb, #e0a020 13%, #fff); color: #8a6410; }
.lzr-pill.mut { background: color-mix(in srgb, #827e76 12%, #fff); color: #827e76; }
.lzr-pill.gr { background: color-mix(in srgb, #1f9e6a 12%, #fff); color: #1f9e6a; }
/* ⚠️⚠️ **Zwei Spalten als SATZSPALTEN, nicht als Gitter** (v0.512).
   Als Gitter teilten sich die Abschnitte ZEILEN: der kurze Posteingang
   links endete bei 280 px, „Mein Raum" darunter begann erst bei 583 —
   weil rechts „Meine Klassen" mit vier Klassenkarten so hoch war.
   Gemessen bei 1366 px: **303 px Loch** in der linken Spalte, und es
   wächst mit jeder Klasse. `columns` kennt keine Zeilen; die Blöcke
   fließen und die Höhen gleichen sich von selbst aus.
   ⚠️ `break-inside: avoid` ist Pflicht — ohne sie zerschneidet der
   Umbruch einen Abschnitt mitten in der Klassenliste.
   ⚠️ Der Abstand nach unten muss am ABSCHNITT hängen (`margin`), nicht
   als `gap` an der Spalte: in Satzspalten gibt es kein `gap` zwischen
   Zeilen, weil es keine Zeilen gibt.
   ⚠️ Die Zahl der Abschnitte ist NICHT fest — der Stundenspiegel
   erscheint nur mit Paketen. Jede Lösung, die je Spalte feste Kinder
   annimmt, bricht daran. */
.lzr-cols { columns: 2; column-gap: 26px; }
.lzr-cols > .lzr-sec { break-inside: avoid; margin-bottom: 26px; }
@media (max-width: 1020px) { .lzr-cols { columns: 1; } }
.lzr-card2 { background: #fff; border: 1.5px solid #e9e8e4; border-radius: 18px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); padding: 16px 18px; }
.lzr-empty { color: #827e76; font-size: 13.5px; padding: 12px 4px; }
/* Posteingang */
.lzr-inlist { display: flex; flex-direction: column; gap: 10px; }
.lzr-inrow { display: flex; align-items: center; gap: 14px; padding: 11px 14px; width: 100%; text-align: left; font: inherit; cursor: pointer; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 15px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); transition: border-color .16s ease, box-shadow .16s ease, transform .16s cubic-bezier(.34,1.4,.5,1); }
.lzr-inrow:hover { transform: translateY(-2px); border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); box-shadow: 0 14px 26px -14px color-mix(in srgb, #e0a020 40%, transparent); }
.lzr-prev { flex: none; width: 68px; height: 46px; border-radius: 10px; position: relative; overflow: hidden; background: radial-gradient(120% 100% at 50% -30%, rgba(28,27,24,.05), transparent 72%), #fbfbfa; border: 1px solid #e9e8e4; }
.lzr-prev::before { content: ""; position: absolute; left: 12%; right: 12%; top: 50%; height: 18px; transform: translateY(-50%); background: repeating-linear-gradient(180deg, rgba(28,27,24,.12) 0, rgba(28,27,24,.12) 1px, transparent 1px, transparent 5px); }
.lzr-prev span { position: absolute; left: 18%; top: 38%; font-size: 13px; color: rgba(28,27,24,.5); letter-spacing: 4px; }
.lzr-prev .ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: rgba(28,27,24,.42); }
.lzr-inmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lzr-intitle { font-size: 14.5px; font-weight: 700; color: #26241f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lzr-inmeta { font-size: 12.5px; color: #827e76; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 2px; }
.lzr-author { display: inline-flex; align-items: center; gap: 5px; color: #26241f; font-weight: 500; }
.lzr-av { width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--kc, #1668b3) 16%, #fff); color: var(--kc, #1668b3); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.lzr-classtag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--kc, #827e76) 13%, #fff); color: color-mix(in srgb, var(--kc, #827e76) 75%, #222); }
.lzr-chev { flex: none; color: #a29c92; font-size: 17px; font-weight: 600; justify-self: end; transition: color .14s ease, transform .14s ease; }
.lzr-inrow:hover .lzr-chev, .lzr-row:hover .lzr-chev { color: #8a6410; transform: translateX(2px); }
.lzr-blank { display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: #fff; border: 1.5px dashed #d5d2cb; border-radius: 18px; }
.lzr-bi { flex: none; width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: color-mix(in srgb, #e0a020 13%, #fff); }
.lzr-blank b { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.lzr-blank div > span { display: block; font-size: 13px; color: #827e76; line-height: 1.45; }
/* ⚠️ `:not(.lzr-bi)` ist der Kern (v0.420): diese Regel ist SPEZIFISCHER
   als `.lzr-bi` (0,1,1 gegen 0,1,0) und steht später — sie hat dessen
   `display: flex` überschrieben, und das Zeichen saß dadurch oben links
   in seiner 42er-Kachel statt in der Mitte (gemessen: Versatz 0/0).
   Dieselbe Falle wie bei `tr.bib-row > td` in der Bibliothek. */
.lzr-blank > span:not(.lzr-bi) { display: block; font-size: 13px; color: #827e76; line-height: 1.45; }

/* Gehaltene Stunden */
.lzr-secflex { flex: 1; }
.lzr-mini { border: 1.5px solid #e9e8e4; background: #fff; color: #3d3a34; border-radius: 10px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; transition: border-color .14s ease, color .14s ease; }
.lzr-mini:hover { border-color: color-mix(in srgb, var(--blau, #1668b3) 45%, #e9e8e4); color: var(--blau, #1668b3); }
.lzr-stdhint { font-size: 12.5px; color: #827e76; margin: 2px 0 12px; }
/* Stundenspiegel: derselbe Satz wie die übrigen Abschnitte des
   Lehrerzimmers — er ist eine Auskunft, kein eigenes Werkzeug. */
.lzr-spzeit { margin-bottom: 14px; }
.lzr-spblock { margin: 0 0 14px; display: flex; flex-direction: column; gap: 7px; }
.lzr-splab { font-size: 12.5px; font-weight: 700; color: #56524b; }
.lzr-splab small { font-weight: 400; color: #827e76; }
.lzr-spmods { display: flex; flex-wrap: wrap; gap: 6px; }
.lzr-spmod { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px;
  border: 1px solid #e9e8e4; border-radius: 999px; font-size: 12.5px; color: #56524b; }
.lzr-spmod i { font-style: normal; }
.lzr-spmod b { color: #26241f; }
.lzr-spmod small { color: #a29c92; }
/* ⚠️ Nur die belastbaren (ab drei Einsätzen) bekommen Kontur — sonst
   sähe eine einzelne Stunde aus wie ein Erfahrungswert. */
.lzr-spmod.fest { border-color: color-mix(in srgb, #e0a020 45%, #e9e8e4); background: color-mix(in srgb, #e0a020 7%, #fff); }
.lzr-spnie { font-size: 12.5px; color: #827e76; margin: 0; }

/* ---------- Kompetenzstand (N1) ----------
   Sieben Zeilen mit Balken, jede aufklappbar — 98 Kompetenzen am Stück
   wären eine Wand, und eine frische Klasse hätte 91 offene Zeilen. Der
   Balken zählt nur, was der Bestand hergibt; was kein Modul abdeckt,
   steht blass daneben und färbt den Balken nicht. */
.lzr-stcard { display: flex; flex-direction: column; gap: 4px; }
.lzr-stnenner { margin: 0 0 8px; font-size: 12.5px; color: #827e76; }
.lzr-stdim { border-radius: 12px; }
.lzr-stdim.auf { background: #fcfbfa; }
.lzr-stdimh { display: flex; align-items: center; gap: 13px; width: 100%;
  border: 0; background: none; font: inherit; text-align: left; cursor: pointer;
  padding: 7px 9px; border-radius: 12px; }
.lzr-stdimh:hover { background: color-mix(in srgb, #e0a020 5%, #fff); }
.lzr-stdim.auf .lzr-stdimh { font-weight: 700; }
.lzr-stlist { padding: 0 9px 9px; display: flex; flex-direction: column; }
.lzr-strow { display: flex; align-items: center; gap: 9px; min-height: 32px;
  padding: 3px 5px; border-bottom: 1px solid color-mix(in srgb, #e9e8e4 60%, #fff); }
.lzr-strow:last-child { border-bottom: none; }
/* Der Punkt trägt den Zustand: gefüllt = unterrichtet, offen = Aufgabe,
   blass = im Bestand gar nicht vorhanden. */
.lzr-stdot { flex: none; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid #cfcbc4; background: #fff; }
.lzr-strow.hat .lzr-stdot { border-color: #1f9e6a; background: #1f9e6a; }
.lzr-strow.ohne .lzr-stdot { border-style: dashed; border-color: #d8d4cd; }
.lzr-sttitel { flex: 1; min-width: 0; font-size: 13px; color: #26241f;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lzr-strow.ohne .lzr-sttitel { color: #a29c92; }
.lzr-strow.hand .lzr-sttitel { font-style: italic; }
.lzr-sthand { font-style: normal; font-size: 10.5px; font-weight: 700; margin-left: 7px;
  padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, #1668b3 12%, #fff); color: #1668b3; }
.lzr-stq, .lzr-sttraeger, .lzr-stohne { flex: none; font-size: 11.5px; color: #827e76;
  display: flex; align-items: center; gap: 6px; max-width: 46%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lzr-stq em { font-style: normal; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.lzr-stq i { font-style: normal; color: #a29c92; flex: none; }
.lzr-stq i::before { content: '· '; }
.lzr-stohne { color: #b8b3ab; font-style: italic; }
/* „hat getragen" als Ziffer, nicht als Sternchen: es ist eine Auskunft,
   keine Note. Grau, solange die Frage nach der Stunde offen blieb. */
.lzr-stg { flex: none; width: 17px; height: 17px; border-radius: 50%; font-size: 10.5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, #827e76 12%, #fff); color: #827e76; }
.lzr-stg.g3, .lzr-stg.g4 { background: color-mix(in srgb, #1f9e6a 15%, #fff); color: #167a52; }
.lzr-stg.g1 { background: color-mix(in srgb, #c65089 14%, #fff); color: #a33d6d; }
.lzr-stbtn { flex: none; width: 24px; height: 24px; min-height: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: #a29c92; border-radius: 7px; cursor: pointer; }
.lzr-stbtn:hover { background: color-mix(in srgb, #e0a020 12%, #fff); color: #26241f; }
.lzr-stfuss { margin: 9px 2px 0; font-size: 12px; color: #a29c92; }
.lzr-pill.act { border: 0; font-family: inherit; cursor: pointer;
  background: color-mix(in srgb, #1668b3 12%, #fff); color: #1668b3; }

/* ---------- Klassenprofil (N2) ----------
   Zwei Dreifachwahlen je Zeile, und die Trennung muss man SEHEN: links
   die Beobachtung, rechts das Urteil. Dazwischen Luft, keine Linie —
   sie gehören zusammen, sie sind nur nicht dasselbe. */
.lzr-prcard { display: flex; flex-direction: column; }
.lzr-prhead, .lzr-prrow { display: grid;
  grid-template-columns: minmax(120px, 1fr) 150px 150px 108px 132px;
  align-items: center; gap: 12px; }
.lzr-prhead { font-size: 10.5px; font-weight: 700; color: #a29c92;
  text-transform: uppercase; letter-spacing: .06em; padding: 0 5px 5px; }
.lzr-prgrp { margin-bottom: 10px; }
.lzr-prgrp > b { display: block; font-size: 12px; color: #56524b; padding: 7px 5px 3px; }
.lzr-prrow { min-height: 34px; padding: 2px 5px;
  border-bottom: 1px solid color-mix(in srgb, #e9e8e4 60%, #fff); }
.lzr-prgrp .lzr-prrow:last-child { border-bottom: none; }
.lzr-prname { font-size: 13px; color: #26241f; display: flex;
  align-items: baseline; gap: 7px; min-width: 0; }
.lzr-prname small { font-size: 10.5px; color: #b8b3ab; flex: none; }
.lzr-prseg { display: inline-flex; border: 1.5px solid #e9e8e4; border-radius: 9px;
  overflow: hidden; background: #fff; }
.lzr-prw { flex: 1; min-height: 0; padding: 4px 2px; border: 0; background: none;
  font: inherit; font-size: 11.5px; color: #827e76; cursor: pointer;
  border-right: 1px solid color-mix(in srgb, #e9e8e4 70%, #fff); }
.lzr-prw:last-child { border-right: 0; }
.lzr-prw:hover { background: color-mix(in srgb, #e0a020 8%, #fff); }
.lzr-prw.on { background: color-mix(in srgb, #26241f 8%, #fff); color: #26241f; font-weight: 700; }
/* ⚠️ Die FOLGE ist der Punkt der Tabelle: „üben" hebt sich ab, weil es
   die Richtung ist, die ein einachsiges Profil nie hervorbrächte. */
.lzr-prfolge { display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: #827e76; }
.lzr-prrow.ueben .lzr-prfolge { color: #1668b3; }
.lzr-prrow.tragen .lzr-prfolge { color: #167a52; }
.lzr-prrow.seltener .lzr-prfolge { color: #a29c92; }
/* Das Alter des Urteils, nicht seine Belege: es steht bei der Folge und
   in ruhiger Tinte — eine Auskunft, keine Warnung. */
/* ⚠️ `nowrap`: die Spalte ist schmal, und „vor 150 Tg." brach sonst in
   drei Zeilen um und zog die ganze Zeile auseinander. */
.lzr-pralt { font-style: normal; font-weight: 500; font-size: 10.5px; color: #a29c92;
  white-space: nowrap; }
.lzr-prbel { font-size: 11px; color: #827e76; text-align: right; }
.lzr-prbel.vorl { font-style: italic; }
.lzr-prbel.duenn { color: #cfcbc4; }
/* „genannt" steht VOR den gerechneten Zahlen und in anderer Farbe — es
   ist eine andere Art von Beleg, kein weiterer Messwert. */
.lzr-prgen { font-weight: 700; color: #1668b3; margin-right: 7px;
  background: color-mix(in srgb, #1668b3 10%, #fff); border-radius: 999px; padding: 1px 7px; }
.vz-prnote b { color: #26241f; font-weight: 700; }
/* Die Herkunft der vorbelegten Ziele — und was der BESTAND sperrt.
   ⚠️ Kein fester Einzug: `.vz-zeile` ist flex ohne Label-Spalte, eine
   geratene Zahl stünde bei jeder Textlänge woanders. */
.vz-zielnote { margin: 2px 0 6px; line-height: 1.5; }
.vz-zielnote b { color: #26241f; font-weight: 700; }

/* ---------- Skript-Import (js/skriptimport.js) ----------
   Die Abnahme ist der Gegenstand, nicht der Modellaufruf: links die
   Vorlage, rechts das Ergebnis, und was daran GERATEN ist, steht als
   solches da. */
#si-pop { position: fixed; inset: 0; z-index: 94; background: rgba(20,26,40,.45);
  display: flex; align-items: center; justify-content: center; }
.si-box { width: min(1180px, 96vw); max-height: 92vh; overflow-y: auto;
  font-family: system-ui, 'Segoe UI', Roboto, sans-serif; }
.si-eingabe { width: min(720px, 94vw); }
.si-sub { font-size: 13px; color: #827e76; margin: 2px 0 12px; }
#si-text { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px;
  line-height: 1.5; padding: 12px 14px; border: 1.5px solid #e9e8e4; border-radius: 12px; resize: vertical; }
#si-text.drop { border-color: #1f9e6a; background: color-mix(in srgb, #1f9e6a 6%, #fff); }
.si-zeile { display: flex; gap: 12px; align-items: flex-end; margin: 10px 0 4px; flex-wrap: wrap; }
.si-zeile label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: #56524b; flex: 1; min-width: 190px; }
.si-zeile input { font: inherit; font-size: 13px; padding: 7px 10px; border: 1.5px solid #e9e8e4; border-radius: 9px; }
.si-datei { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px;
  border: 1.5px solid #e9e8e4; border-radius: 9px; background: none; padding: 7px 12px; cursor: pointer; }
/* Die Frage vor der Kamera (lehrer-shell.js). ⚠️ z-index über der
   Raum-Leiste (98, s. `lz-tools-on`) — sie wird aus deren Menü geöffnet. */
#lz-scanfrage { position: fixed; inset: 0; z-index: 99; background: rgba(20,26,40,.45);
  display: flex; align-items: center; justify-content: center; }
.lz-sfbox { width: min(420px, 92vw); font-family: system-ui, 'Segoe UI', Roboto, sans-serif; }
.lz-sfsub { font-size: 13px; color: #827e76; margin: 2px 0 14px; }
/* Zwei große Ziele: am Handy wird mit dem Daumen getroffen, nicht gezielt. */
.lz-sfwahl { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; width: 100%;
  text-align: left; font: inherit; background: none; cursor: pointer; margin-bottom: 10px;
  border: 1.5px solid #e9e8e4; border-radius: 12px; padding: 13px 15px; }
.lz-sfwahl:hover { border-color: var(--accent, #c65089); background: #fbfaf8; }
.lz-sfico { grid-row: 1 / 3; align-self: center; color: var(--accent, #c65089); display: flex; }
.lz-sfwahl b { font-size: 15px; color: #26241f; }
.lz-sfwahl small { font-size: 12.5px; color: #827e76; }
.si-formate { font-size: 12px; color: #a29c92; margin: 2px 0 0; }
/* Was gesendet wird, in Zahlen — und die dritte ist die, die Zeit und
   Kontingent kostet, deshalb hebt sie sich ab. */
.si-teil { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; min-height: 0; }
.si-teil:empty { margin-top: 0; }
.si-tz { font-size: 12px; color: #827e76; background: #f5f3ef; border-radius: 999px; padding: 3px 11px; }
.si-tz.stark { color: #26241f; font-weight: 700; background: color-mix(in srgb, #1f9e6a 13%, #fff); }
.si-tstueck { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #56524b; cursor: pointer; }
.si-hinweis.err { color: #b3261e; background: color-mix(in srgb, #b3261e 9%, #fff); }
/* Der Halt ist kein Fortschritt-Knopf mehr — er soll nicht einladen. */
.si-haltbtn { background: #eef2f8; color: #2a2a33; }
.si-warn { font-size: 12.5px; color: #7a5a12; background: color-mix(in srgb, #e0a020 12%, #fff);
  border-radius: 9px; padding: 8px 11px; display: flex; align-items: center; gap: 7px; margin: 12px 0 0; }
/* ---- Ausgestaltungsgrad: eine segmentierte Wahl, keine Chips ----
 * Die drei Stufen schließen einander aus — dieselbe Begründung wie bei
 * der segmentierten Steuerung der Bibliothek. Sie steht unter dem
 * Textfeld: erst der Text, dann die Frage, was er ist. */
.si-grad { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin: 10px 0 0; }
.si-gradlab { font-size: 12.5px; color: #56524b; margin-right: 10px; }
.si-gradbtn { font: inherit; font-size: 12.5px; padding: 6px 13px; min-height: 0;
  border: 1.5px solid #e9e8e4; border-right-width: 0; background: #fff; color: #56524b;
  cursor: pointer; }
.si-gradbtn:first-of-type { border-radius: 9px 0 0 9px; }
.si-gradbtn:last-of-type { border-radius: 0 9px 9px 0; border-right-width: 1.5px; }
.si-gradbtn.an { background: color-mix(in srgb, var(--accent) 12%, #fff);
  border-color: color-mix(in srgb, var(--accent) 45%, #e9e8e4); color: #26241f; font-weight: 600; }
/* ⚠️ Der rechte Rand des Vorgängers wird von der aktiven Kante verdeckt —
 * ohne das steht neben einer betonten Fläche eine blasse Doppellinie. */
.si-gradbtn.an + .si-gradbtn { border-left-color: color-mix(in srgb, var(--accent) 45%, #e9e8e4); }
.si-gradinfo { font-size: 12px; color: #7a5a12; margin: 7px 0 0; min-height: 0; display: none; }
.si-gradinfo.an { display: block; }
.si-hinw-offen { font-size: 12.5px; color: #7a5a12;
  background: color-mix(in srgb, #e0a020 12%, #fff); border-radius: 9px;
  padding: 8px 11px; display: flex; align-items: center; gap: 7px; margin: 0 0 12px; }
/* ---- Modulvorschlag am Schritt (Plan §10) ----
 * Er sitzt UNTER dem Schritt und blass: der Schritt ist die Sache, der
 * Verweis ein Angebot. Angenommen bekommt er den Akzentton — dann ist er
 * es, was in die Stunde geht. */
.si-modul { margin: 8px 0 0; padding: 7px 10px; border: 1.5px dashed #e0ddd6;
  border-radius: 10px; background: #fbfaf8; }
.si-modul.an { border-style: solid; background: color-mix(in srgb, var(--accent) 8%, #fff);
  border-color: color-mix(in srgb, var(--accent) 45%, #e9e8e4); }
.si-modulwahl { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.si-modultitel { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #26241f; }
.si-modulmin { font-size: 12px; color: #a29c92; margin-left: auto; }
.si-modulwarum { font-size: 12px; color: #56524b; font-style: italic; margin: 4px 0 0 26px; }
.si-modulhint { font-size: 11.5px; color: #a29c92; margin: 3px 0 0 26px; }
.si-modul.an .si-modulhint { color: #7a5a12; }
.si-status { font-size: 12.5px; color: #56524b; min-height: 20px; margin-top: 8px; }
.si-status.err { color: #b3261e; font-weight: 600; }
.si-spin { display: inline-block; width: 11px; height: 11px; border: 2px solid #e9e8e4;
  border-top-color: #1f9e6a; border-radius: 50%; animation: si-dreh .8s linear infinite; }
@keyframes si-dreh { to { transform: rotate(360deg); } }

.si-hinweise { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.si-hinweis { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: #7a5a12; background: color-mix(in srgb, #e0a020 12%, #fff); border-radius: 999px; padding: 4px 12px; }
.si-duo { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 18px; align-items: start; }
.si-lab { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #a29c92; margin-bottom: 7px; display: flex; align-items: center; gap: 10px; }
.si-lab small { text-transform: none; letter-spacing: 0; font-weight: 400; color: #a29c92; }
.si-lab input { flex: 1; font: inherit; font-size: 13.5px; font-weight: 600; text-transform: none;
  letter-spacing: 0; color: #26241f; border: 1.5px solid #e9e8e4; border-radius: 9px; padding: 5px 9px; }
.si-quelle { max-height: 62vh; overflow-y: auto; font-size: 12.5px; line-height: 1.5; color: #56524b;
  background: #fbfaf8; border: 1px solid #e9e8e4; border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; }
.si-quelle p { margin: 0 0 10px; border-radius: 6px; transition: background .2s ease; }
.si-quelle p.hell { background: color-mix(in srgb, #e0a020 22%, #fff); box-shadow: 0 0 0 6px color-mix(in srgb, #e0a020 22%, #fff); }
.si-schritt { border: 1.5px solid #e9e8e4; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; cursor: default; }
.si-skopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.si-phase { flex: 1; min-width: 120px; font: inherit; font-size: 13px; font-weight: 700;
  border: 0; border-bottom: 1.5px solid #e9e8e4; padding: 3px 2px; background: none; }
.si-zeit { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; }
.si-zeit input { width: 48px; font: inherit; font-size: 12.5px; text-align: right;
  border: 1.5px solid #e9e8e4; border-radius: 7px; padding: 3px 5px; }
/* ⚠️ Der Unterschied, den die Messung verlangt: eine gelesene Zahl stand
   im Skript, eine geratene hat das Modell verteilt — und sie schwankt
   zwischen Läufen. Wer das nicht sieht, hält sie für eine Planung. */
.si-zeit.geraten input { border-color: color-mix(in srgb, #e0a020 55%, #e9e8e4);
  background: color-mix(in srgb, #e0a020 9%, #fff); }
.si-zeit i { font-style: normal; font-size: 11px; color: #7a5a12; }
.si-soz { display: inline-flex; gap: 3px; }
.si-sozb { font: inherit; font-size: 11.5px; border: 1px solid #e9e8e4; background: none;
  border-radius: 999px; padding: 2px 9px; cursor: pointer; color: #827e76; }
.si-sozb.on { background: #1668b3; border-color: #1668b3; color: #fff; font-weight: 600; }
.si-marke { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: color-mix(in srgb, #e0a020 16%, #fff); color: #7a5a12; }
.si-marke.weich { background: none; color: #827e76; border: 1px solid #e9e8e4; font-weight: 600; }
.si-weg { border: 0; background: none; color: #a29c92; cursor: pointer; padding: 2px; }
.si-weg:hover { color: #b3261e; }
.si-scols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.si-slab { font-size: 11.5px; font-weight: 700; color: #56524b; margin-bottom: 4px; }
.si-slab.g { color: #1f9e6a; }
.si-slab.klein { margin-top: 8px; font-size: 11px; opacity: .85; }
.si-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px;
  font-size: 12.5px; line-height: 1.4; color: #26241f; }
.si-liste .si-wort q { quotes: '\201E' '\201C'; font-weight: 600; }
:lang(en) .si-liste .si-wort q { quotes: '\201C' '\201D'; }
.si-liste .si-tat { font-size: .92em; color: #56524b; }
.si-liste .si-tat::before { content: '·'; margin-right: 6px; color: #a29c92; }
.si-erw li { color: #56524b; font-style: italic; }
.si-mat { font-size: 11.5px; color: #827e76; margin-top: 8px; }
/* Mehrere Stunden: jede bekommt ihren Kopf mit Titel und Dauer — bei
   einer einzelnen bleibt der Kopf schlicht (kein „Stunde 1"). */
.si-stunde + .si-stunde { margin-top: 18px; padding-top: 14px; border-top: 1.5px dashed #e9e8e4; }
.si-sthead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.si-stnr { font-size: 11.5px; font-weight: 700; color: #a29c92; white-space: nowrap; }
.si-sttitel { flex: 1; font: inherit; font-size: 13.5px; font-weight: 700; color: #26241f;
  border: 1.5px solid #e9e8e4; border-radius: 9px; padding: 5px 9px; }
.si-stdauer { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; color: #827e76; }
.si-stdauer input { width: 52px; font: inherit; font-size: 12.5px; text-align: right;
  border: 1.5px solid #e9e8e4; border-radius: 7px; padding: 4px 5px; }
.si-nstd { font-size: 11.5px; font-weight: 400; text-transform: none; letter-spacing: 0;
  color: #7a5a12; background: color-mix(in srgb, #e0a020 14%, #fff); border-radius: 999px; padding: 2px 10px; }
.si-lzblock, .si-fehlt { margin-top: 16px; }
.si-lz { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.si-lzgrp { display: inline-flex; gap: 2px; }
.si-grpb { font: inherit; font-size: 11px; border: 1px solid #e9e8e4; background: none;
  border-radius: 6px; padding: 2px 6px; cursor: pointer; color: #827e76; }
.si-grpb.on { background: #c65089; border-color: #c65089; color: #fff; font-weight: 700; }
.si-lztext { flex: 1; font: inherit; font-size: 12.5px; border: 1.5px solid #e9e8e4;
  border-radius: 8px; padding: 5px 9px; }
.si-herk { font-size: 11px; color: #827e76; white-space: nowrap; }
.si-herk.neu { color: #7a5a12; font-weight: 700; }
.si-fzeile { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px;
  background: #fbfaf8; border: 1px solid #e9e8e4; border-radius: 10px; padding: 8px 11px; margin-bottom: 6px; }
.si-fzeile p { margin: 0; flex: 1; color: #56524b; white-space: pre-wrap; }
.si-doch { font: inherit; font-size: 12px; border: 1px solid #e9e8e4; border-radius: 999px;
  background: none; padding: 3px 11px; cursor: pointer; white-space: nowrap; }
.si-doch:hover { border-color: #1f9e6a; color: #1f9e6a; }
.si-kosten { font-size: 12px; color: #a29c92; margin-left: 12px; }
.pk-import { margin-left: 8px; }
@media (max-width: 860px) {
  .si-duo, .si-scols { grid-template-columns: 1fr; }
  .si-quelle { max-height: 30vh; }
}

/* ---------- Formatpräzisierung I−1 (skript-import-plan.md §2.2) ----
   Eine Zeile = ein Stichpunkt; eine Zeile in „…" ist Wortlaut. Was
   gesagt wird, steht groß, was getan wird, klein daneben — im
   laufenden Unterricht ist das der Unterschied zwischen ablesbar und
   nachlesbar. */
.ur-zeilen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ur-zeilen li { line-height: 1.35; }
/* ⚠️ Die Anführungszeichen kommen aus der Sprache, nicht aus dem Text:
   `i18n.js` setzt `documentElement.lang`, also stehen sie deutsch „so"
   und englisch “so”. Ein gerades " wäre in beiden Sprachen falsch. */
.ur-zeilen .ur-wort q { font-weight: 600; quotes: '\201E' '\201C'; }
:lang(en) .ur-zeilen .ur-wort q { quotes: '\201C' '\201D'; }
.ur-zeilen .ur-tat { font-size: 0.82em; color: #56524b; font-weight: 400; }
.ur-zeilen .ur-tat::before { content: '·'; margin-right: 7px; color: #a29c92; }
.ur-erw li { color: #56524b; font-style: italic; }
/* Marken am Schrittkopf: Reserve ist eine Aussage über die Zeit,
   dehnbar nur eine Bemerkung — deshalb die zweite blasser. */
.ur-marke { font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 1px 8px;
  border-radius: 999px; background: color-mix(in srgb, #e0a020 16%, #fff);
  color: #7a5a12; border: 1px solid color-mix(in srgb, #e0a020 34%, transparent); }
.ur-marke.weich { background: none; color: #827e76; border-color: #e9e8e4; font-weight: 600; }
.pk-marken { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.pk-mark { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #56524b; }
.pk-mark input { margin: 0; }
.pk-lanelab.klein { margin-top: 7px; font-size: 11.5px; opacity: .85; }
.me-lane.klein { margin-top: 7px; font-size: 11.5px; opacity: .85; }
/* ⚠️ Die Richtwert-Spalte ist breiter als die 64 px der Kinder-Matrix
   und bricht nicht um — „Richtwert 15 %" stand sonst zweizeilig. */
.lzr-spblock .lzr-aggnum { width: 92px; white-space: nowrap; }
.lzr-std { margin-bottom: 12px; }
.lzr-stdhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.lzr-stdhead b { font-size: 15px; font-weight: 800; color: #26241f; }
.lzr-stdnr { font-size: 13px; color: #56524b; }
.lzr-stddat { margin-left: auto; font-size: 12.5px; font-weight: 650; color: #827e76; }
.lzr-stdzeit { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #56524b; margin-bottom: 8px; }
.lzr-stdzeit b { color: #26241f; }
/* Die Abweichung ist eine AUSKUNFT, keine Note: erst jenseits von 15 %
   bekommt sie Farbe, und auch dann eine ruhige. */
.lzr-stdab { color: #827e76; }
.lzr-stdab.warn { color: #a8621a; font-weight: 700; }
.lzr-stdmods { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
.lzr-stdmod { font-size: 12px; border: 1px solid #e9e8e4; border-radius: 999px; padding: 3px 10px; color: #56524b; }
.lzr-stdmod i { font-style: normal; font-weight: 700; color: #26241f; margin-right: 6px; }
.lzr-stdtext { font-size: 13px; color: #3d3a34; line-height: 1.5; margin-top: 7px; white-space: pre-wrap; }
.lzr-stdtext small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #a29c92; margin-bottom: 2px; }

/* Live & Blätter — Symbole als Linien-SVG (Design-Leitbild Fassung 3) */
/* Vier Abschnitte untereinander brauchen Luft: `.lzr-sec` setzt nur den
   Abstand INNERHALB einer Sektion, sonst klebt die nächste Überschrift
   an den Karten darüber. */
#lzr-body > .lzr-sec + .lzr-sec { margin-top: 26px; }
.lzr-lvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.lzr-lvcard { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 14px; font: inherit; cursor: pointer; transition: transform .16s var(--bounce), border-color .16s ease, box-shadow .16s ease; }
.lzr-lvcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--blau, #1668b3) 42%, #e9e8e4); box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--blau, #1668b3) 42%, transparent); }
.lzr-lvcard:active { transform: translateY(0) scale(.995); }
.lzr-lvcard[disabled] { cursor: default; opacity: .55; }
.lzr-lvico { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #f6f5f2; color: #56524b; }
.lzr-lvico svg { width: 20px; height: 20px; }
.lzr-lvcard:hover .lzr-lvico { background: color-mix(in srgb, var(--blau, #1668b3) 10%, #fff); color: var(--blau, #1668b3); }
.lzr-lvtext { min-width: 0; }
.lzr-lvtext b { display: block; font-size: 14px; font-weight: 700; color: #26241f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lzr-lvtext small { display: block; font-size: 12.5px; color: #827e76; }
.lzr-lvleer { font-size: 13px; color: #827e76; margin: 2px 0 0; }

/* Klassen-Karten */
.lzr-kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lzr-kcard { text-align: left; width: 100%; font: inherit; cursor: pointer; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 18px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); padding: 15px 16px; display: flex; flex-direction: column; gap: 12px; transition: transform .16s cubic-bezier(.34,1.4,.5,1), border-color .16s ease, box-shadow .16s ease; }
.lzr-kcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); box-shadow: 0 18px 32px -16px color-mix(in srgb, #e0a020 40%, transparent); }
.lzr-kctop { display: flex; align-items: center; gap: 12px; }
.lzr-kemoji { flex: none; width: 44px; height: 44px; border-radius: 13px; font-size: 21px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--kc, #827e76) 15%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--kc, #827e76) 36%, transparent); }
.lzr-kmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lzr-kmain b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.lzr-ksub { font-size: 12.5px; color: #827e76; margin-top: 1px; }
.lzr-kwait { flex: none; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: color-mix(in srgb, #e0a020 13%, #fff); color: #8a6410; }
.lzr-kwait.zero { background: color-mix(in srgb, #1f9e6a 12%, #fff); color: #1f9e6a; font-size: 15px; }
.lzr-kfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 1px solid color-mix(in srgb, #e9e8e4 75%, #fff); }
.lzr-code { font-size: 12px; font-weight: 500; color: #827e76; letter-spacing: .04em; }
.lzr-code b { color: #26241f; font-weight: 700; }
/* Der Klassencode ist anklickbar (kopiert) — er muss danach aussehen,
 * auch auf der Klassenkarte, die selbst ein Knopf ist. */
.lzr-copy { cursor: copy; display: inline-flex; align-items: center; gap: 5px; border-radius: 8px; }
.lzr-copy .ic { opacity: 0; transition: opacity .14s ease; flex: none; }
.lzr-copy:hover .ic, .lzr-copy:focus-visible .ic { opacity: .7; }
/* ⚠️ Fingerziel: 21 px gemessen, einen Punkt unter der Untergrenze von
   22 (s. „Fingerziele" in style.css). Die negativen Ränder halten die
   Zeile, das Ziel wächst. */
.lzr-code.lzr-copy { padding: 2px 6px; margin: -2px -6px; min-height: 26px; }
@media (pointer: coarse) { .lzr-code.lzr-copy { min-height: 34px; margin: -6px -6px; } }
.lzr-code.lzr-copy:hover { background: rgba(28, 27, 24, .06); }
.lzr-codechip.lzr-copy:hover { border-color: var(--accent); }
.lzr-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lzr-kact { font-size: 12.5px; font-weight: 600; color: #8a6410; }
.lzr-addcard { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 112px; border: 1.5px dashed #d5d2cb; border-radius: 18px; background: none; color: #827e76; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color .16s ease, color .16s ease, transform .16s cubic-bezier(.34,1.4,.5,1), background .16s ease; }
.lzr-addcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); color: #8a6410; background: color-mix(in srgb, #e0a020 5%, #fff); }
.lzr-addcard span { font-size: 20px; }

/* Klassen-Ansicht: Kopf + Abschnitts-Schalter */
.lzr-backrow { display: flex; align-items: center; gap: 10px; }
.lzr-back { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 10px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600; color: #827e76; border: 1.5px solid #e9e8e4; background: #fff; cursor: pointer; transition: transform .14s cubic-bezier(.34,1.4,.5,1), border-color .14s ease, color .14s ease; }
.lzr-back:hover { transform: translateY(-2px); color: #8a6410; border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); }
.lzr-inboxlink { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; color: #8a6410; background: color-mix(in srgb, #e0a020 13%, #fff); border: 1.5px solid color-mix(in srgb, #e0a020 34%, #e9e8e4); cursor: pointer; transition: transform .14s cubic-bezier(.34,1.4,.5,1), box-shadow .14s ease; }
.lzr-inboxlink:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -9px color-mix(in srgb, #e0a020 55%, transparent); }
.lzr-segrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lzr-segbtn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 600; color: #827e76; border: 1.5px solid transparent; background: none; cursor: pointer; transition: background .14s ease, color .14s ease, border-color .16s ease, transform .12s ease; }
.lzr-segbtn:hover { background: rgba(28,27,24,.035); color: #26241f; transform: translateY(-1px); }
.lzr-segbtn.on { background: #fff; color: #26241f; font-weight: 700; border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); box-shadow: 0 2px 7px rgba(28,27,24,.08), inset 0 0 0 1px color-mix(in srgb, #e0a020 12%, transparent); }

/* Lernweg-Timeline */
.lzr-legend { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12.5px; font-weight: 500; color: #827e76; }
.lzr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lzr-legend i { width: 13px; height: 13px; border-radius: 4px; display: block; }
.lzr-legend i.done { background: color-mix(in srgb, #1f9e6a 30%, #fff); border: 1.5px solid color-mix(in srgb, #1f9e6a 55%, #fff); }
.lzr-legend i.act { background: color-mix(in srgb, #e0a020 40%, #fff); border: 1.5px solid color-mix(in srgb, #e0a020 70%, #fff); }
.lzr-legend i.plan { background: #fff; border: 1.5px dashed #c9c5bd; }
/* Die Zeitleiste rollt waagerecht (Lars): sechs Monate plus Label-Spalte
 * brauchen eine Mindestbreite — darunter schrumpfen die Balken so weit,
 * dass ihre Beschriftung abgeschnitten wird. Die Label-Spalte bleibt
 * beim Rollen stehen, sonst weiß man nicht mehr, welche Zeile man sieht. */
.lzr-tlcard { overflow-x: auto; overscroll-behavior-x: contain; }
.lzr-tlin { position: relative; padding-top: 26px; --tlleft: 236px; min-width: calc(var(--tlleft) + 660px); }
.lzr-tlcard .lzr-tllabel { position: sticky; left: 0; z-index: 3; background: #fff; }
/* Gruppenüberschriften ebenso — sie stehen sonst beim Rollen halb
 * außerhalb des Sichtfensters */
.lzr-tlcard .lzr-tlgrp { position: sticky; left: 0; width: max-content; background: #fff; padding-right: 10px; }
.lzr-tlmon { position: absolute; left: var(--tlleft); right: 0; top: 0; height: 20px; display: flex; }
.lzr-tlmon span { flex: 1; font-size: 11.5px; font-weight: 600; color: #a29c92; text-transform: uppercase; letter-spacing: .06em; }
.lzr-tlgrid { position: absolute; left: var(--tlleft); right: 0; top: 22px; bottom: 0; pointer-events: none; }
.lzr-tlgrid i { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, #e9e8e4 80%, #fff); }
.lzr-heute { position: absolute; top: -20px; bottom: 0; width: 2px; border-radius: 2px; background: color-mix(in srgb, #e0a020 65%, #fff); }
.lzr-heute b { position: absolute; top: -1px; left: 50%; transform: translate(-50%, -100%); font-size: 10.5px; font-weight: 700; color: #8a6410; background: color-mix(in srgb, #e0a020 13%, #fff); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.lzr-tlgrp { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 10px 0 6px; }
.lzr-tlgrp b { font-size: 11px; font-weight: 800; color: #a29c92; text-transform: uppercase; letter-spacing: .08em; }
.lzr-tlgrp span { font-size: 11.5px; color: #a29c92; }
.lzr-tlrow { position: relative; display: flex; align-items: center; min-height: 42px; }
.lzr-tllabel { flex: none; width: var(--tlleft); padding-right: 16px; box-sizing: border-box; font-size: 13px; font-weight: 600; line-height: 1.3; display: flex; align-items: flex-start; gap: 8px; color: #26241f; }
.lzr-zdot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; }
.lzr-tllabel small { font-size: 11.5px; font-weight: 500; color: #827e76; }
.lzr-tltrack { position: relative; flex: 1; height: 42px; }
.lzr-bar { position: absolute; top: 7px; height: 28px; border-radius: 9px; display: flex; align-items: center; gap: 7px; padding: 0 10px; font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; cursor: pointer; transition: transform .14s cubic-bezier(.34,1.4,.5,1), box-shadow .14s ease; }
.lzr-bar:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -8px rgba(28,27,24,.3); }
.lzr-bar.fertig { background: color-mix(in srgb, #1f9e6a 14%, #fff); border: 1.5px solid color-mix(in srgb, #1f9e6a 38%, #e9e8e4); color: #14603f; }
.lzr-bar.aktiv { background: color-mix(in srgb, #e0a020 20%, #fff); border: 1.5px solid color-mix(in srgb, #e0a020 52%, #e9e8e4); color: #8a6410; font-weight: 700; }
.lzr-bar.geplant { background: #fff; border: 1.5px dashed #c9c5bd; color: #827e76; }
.lzr-bar.ziel { box-shadow: inset 3px 0 0 var(--zc, transparent); padding-left: 12px; }
.lzr-bar.ziel:hover { box-shadow: inset 3px 0 0 var(--zc, transparent), 0 8px 16px -8px rgba(28,27,24,.3); }
.lzr-tlsep { height: 1px; background: color-mix(in srgb, #e9e8e4 70%, #fff); margin-left: var(--tlleft); }
.lzr-tldivider { height: 1.5px; background: color-mix(in srgb, #26241f 9%, #e9e8e4); margin: 8px 0; border-radius: 2px; }
.lzr-addrow { position: relative; display: flex; align-items: center; min-height: 36px; padding-left: var(--tlleft); }
.lzr-add { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 11px; font: inherit; font-size: 13px; font-weight: 600; color: #827e76; border: 1.5px dashed #d5d2cb; background: #fff; cursor: pointer; transition: transform .14s cubic-bezier(.34,1.4,.5,1), border-color .14s ease, color .14s ease, background .14s ease; }
.lzr-add:hover { transform: translateY(-2px); border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); color: #8a6410; background: color-mix(in srgb, #e0a020 5%, #fff); }
.lzr-add span { font-size: 15px; font-weight: 700; }
.lzr-pop { position: absolute; left: var(--tlleft); top: calc(100% + 8px); width: 400px; max-width: min(400px, 82vw); z-index: 45; background: #fff; border: 1px solid #e9e8e4; border-radius: 16px; box-shadow: 0 14px 40px -10px rgba(28,27,24,.3), 0 3px 8px rgba(28,27,24,.08); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.lzr-pop[hidden] { display: none; }
.lzr-poph { font-size: 11px; font-weight: 700; color: #a29c92; text-transform: uppercase; letter-spacing: .07em; padding: 2px 4px 0; }
.lzr-poplist { display: flex; flex-direction: column; gap: 2px; max-height: 250px; overflow-y: auto; }
.lzr-popitem { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 10px; width: 100%; font: inherit; font-size: 13.5px; font-weight: 500; text-align: left; background: none; border: 0; cursor: pointer; color: #26241f; }
.lzr-popitem:hover { background: #f4f3f1; }
.lzr-pdot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.lzr-popitem > span { flex: 1; min-width: 0; }
.lzr-popitem small { flex: none; font-size: 11px; font-weight: 600; color: #a29c92; }
.lzr-poprow { display: flex; gap: 7px; }
.lzr-popfree { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 11px; border: 1.5px solid #e9e8e4; background: #fbfbfa; color: #26241f; font: inherit; font-size: 13.5px; }
.lzr-popfree:focus { outline: none; border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, #e0a020 14%, transparent); }
.lzr-popgo { flex: none; padding: 8px 14px; border-radius: 11px; font: inherit; font-size: 13px; font-weight: 700; background: color-mix(in srgb, #e0a020 13%, #fff); color: #8a6410; border: 1.5px solid color-mix(in srgb, #e0a020 34%, #e9e8e4); cursor: pointer; }

/* Abgeschlossen-Chronik */
.lzr-donelist { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 8px; }
.lzr-donerow { display: flex; align-items: baseline; gap: 11px; padding: 8px 4px; border-bottom: 1px solid color-mix(in srgb, #e9e8e4 70%, #fff); font-size: 13.5px; color: #26241f; }
.lzr-donerow:last-child { border-bottom: none; }
.lzr-dk { flex: none; width: 20px; text-align: center; font-weight: 700; color: #1f9e6a; }
.lzr-dt { flex: 1; min-width: 0; }
.lzr-dkind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #a29c92; margin-right: 7px; }
.lzr-dd { flex: none; font-size: 12.5px; color: #827e76; font-variant-numeric: tabular-nums; }

/* Kinder: Aggregat + Matrix */
.lzr-agg { display: flex; flex-direction: column; gap: 11px; }
.lzr-aggrow { display: flex; align-items: center; gap: 13px; }
.lzr-agglabel { flex: none; width: 285px; font-size: 13.5px; font-weight: 500; color: #26241f; }
.lzr-agglabel b { font-weight: 700; }
.lzr-aggbar { display: block; flex: 1; height: 12px; border-radius: 999px; background: color-mix(in srgb, #e9e8e4 65%, #fff); overflow: hidden; }
.lzr-aggbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, #e0a020 55%, #fff), #e0a020); }
.lzr-aggnum { flex: none; width: 64px; font-size: 12.5px; font-weight: 600; color: #827e76; text-align: right; }
.lzr-matrixwrap { overflow-x: auto; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 18px; box-shadow: 0 1px 2px rgba(28,27,24,.05), 0 12px 26px -14px rgba(28,27,24,.18); }
.lzr-matrix { min-width: 640px; }
.lzr-mxhead, .lzr-row { display: grid; grid-template-columns: minmax(150px, 1fr) 140px 110px 110px 32px; align-items: center; gap: 8px; padding: 0 14px; }
.lzr-mxhead { height: 38px; font-size: 11px; font-weight: 700; color: #a29c92; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1.5px solid #e9e8e4; background: #fcfbfa; border-radius: 16px 16px 0 0; }
.lzr-row { width: 100%; min-height: 46px; border-bottom: 1px solid color-mix(in srgb, #e9e8e4 75%, #fff); cursor: pointer; transition: background .13s ease; }
.lzr-row:last-child { border-bottom: none; }
.lzr-row:hover { background: color-mix(in srgb, #e0a020 4.5%, #fff); }
.lzr-name { font-size: 14px; font-weight: 700; color: #26241f; display: flex; align-items: center; gap: 8px; overflow: hidden; letter-spacing: -.01em; }
.lzr-noteind { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #a29c92; opacity: 0; }
.lzr-noteind.has { opacity: .85; background: #8a6410; }
.lzr-skala { display: inline-flex; align-items: center; gap: 4px; }
.lzr-sdot { width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid #d9d5cf; background: #fff; padding: 0; cursor: pointer; transition: background .13s ease, border-color .13s ease, transform .13s cubic-bezier(.34,1.4,.5,1); }
.lzr-sdot:hover { transform: scale(1.14); border-color: color-mix(in srgb, #e0a020 45%, #e9e8e4); }
.lzr-sdot.on { background: #e0a020; border-color: #e0a020; }
.lzr-skala.big .lzr-sdot { width: 24px; height: 24px; }
.lzr-wchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid #e9e8e4; background: #fff; color: #827e76; justify-self: start; white-space: nowrap; }
.lzr-wchip b { font-weight: 700; color: #1f9e6a; }
.lzr-works { font-size: 12.5px; font-weight: 600; color: #8a6410; }
.lzr-none { color: #c9c5bd; font-size: 12.5px; }

/* Popups (Kind + Einreichung) */
.lzr-ov, .ur-ov { position: fixed; inset: 0; z-index: 70; background: rgba(28, 27, 24, .38); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 28px 18px; }
.ur-ov[hidden] { display: none; }
.lzr-ov[hidden] { display: none; }
.lzr-modal, .ur-modal { width: 100%; background: #fff; border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(28,27,24,.5); display: flex; flex-direction: column; max-height: min(86vh, 820px); overflow: hidden; animation: lzrmodal .24s cubic-bezier(.34,1.4,.5,1); }

/* ---------- Schülernotiz-Routing (N4) ----------
   Die Abnahme ist der Gegenstand, nicht der Fund: links der Satz, wie
   er dasteht, rechts das Kind. Was nur ÄHNLICH heißt, ist blass und
   ohne Haken — der Fund ist eine Frage, keine Behauptung. */
.ur-nrmodal { max-width: 760px; font-family: system-ui, 'Segoe UI', Roboto, sans-serif; }
.ur-nrhead { padding: 20px 24px 12px; border-bottom: 1.5px solid #e9e8e4; }
.ur-nrhead b { font-size: 17px; color: #26241f; }
.ur-nrhead p { margin: 5px 0 0; font-size: 13px; color: #827e76; }
.ur-nrlist { overflow-y: auto; padding: 6px 14px 12px; }
.ur-nrblock { padding: 11px 10px; border-bottom: 1px solid color-mix(in srgb, #e9e8e4 65%, #fff); }
.ur-nrblock:last-child { border-bottom: none; }
.ur-nrsatz { margin: 0 0 7px; font-size: 13.5px; color: #26241f; line-height: 1.45; }
.ur-nrziele { display: flex; flex-wrap: wrap; gap: 7px; }
.ur-nrziel { display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: #167a52; border: 1.5px solid transparent;
  background: color-mix(in srgb, #1f9e6a 9%, #fff); border-radius: 999px; padding: 4px 12px 4px 8px; }
.ur-nrziel input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: #1f9e6a; }
.ur-nrziel i { font-style: normal; font-size: 10.5px; font-weight: 600; color: #a3620f;
  background: color-mix(in srgb, #e0a020 18%, #fff); border-radius: 999px; padding: 1px 7px; }
/* Was nur ÄHNLICH klingt, ist blass und ohne Haken — eine Frage, keine
   Behauptung. */
.ur-nrziel.unsicher { color: #827e76; background: #fcfbfa; border-color: #e9e8e4; }
.ur-nrziel.unsicher input { accent-color: #a29c92; }
.ur-nrfoot { display: flex; align-items: center; gap: 10px; padding: 14px 24px 18px;
  border-top: 1.5px solid #e9e8e4; }
.ur-nrhint { flex: 1; font-size: 12px; color: #a29c92; }
/* Kodierung ins Klassenprofil (N5): der BELEG steht unter dem Merkmal,
   nicht daneben — er ist der Grund, aus dem die Lehrkraft zustimmt. */
.ur-rmrow { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.ur-rmbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 0;
  padding: 7px 13px; border: 1.5px solid #e9e8e4; background: #fff; border-radius: 999px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: #56524b; cursor: pointer; }
.ur-rmbtn:hover { border-color: #1f9e6a; color: #167a52; }
.ur-rmbtn[disabled] { opacity: .5; cursor: default; }
.ur-rmhint { font-size: 11.5px; color: #a29c92; }
.ur-rmblock { display: flex; flex-direction: column; gap: 5px; }
.ur-rmziel { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.ur-rmziel input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: #1f9e6a; }
.ur-rmname { font-size: 13.5px; font-weight: 700; color: #26241f; }
.ur-rmwert { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px;
  background: color-mix(in srgb, #827e76 11%, #fff); color: #56524b; }
.ur-rmwert.w1 { background: color-mix(in srgb, #1f9e6a 13%, #fff); color: #167a52; }
.ur-rmwert.w-1 { background: color-mix(in srgb, #c65089 13%, #fff); color: #a33d6d; }
.ur-rmbeleg { margin: 0 0 0 25px; font-size: 12.5px; color: #827e76; font-style: italic; }
.ur-rmrest { margin: 10px; padding: 11px 13px; border-radius: 12px; background: #fcfbfa; }
.ur-rmrest b { display: block; font-size: 11.5px; font-weight: 700; color: #827e76;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.ur-rmrest p { margin: 0 0 3px; font-size: 12.5px; color: #a29c92; }
/* ⚠️ Auf dem Handy fällt der Hinweis: gemessen bei 390 px brach er auf
   vier Zeilen um und drückte die beiden Knöpfe auf drei — der Fuß war
   111 px hoch. Dass ohne Haken nichts passiert, zeigen die Haken
   selbst. */
@media (max-width: 700px) {
  .ur-nrhint { display: none; }
  .ur-nrfoot { padding: 12px 16px 16px; justify-content: flex-end; }
  .ur-nrmodal { max-height: min(80vh, 700px); }
}
@keyframes lzrmodal { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.lzr-modal-kid { max-width: 680px; }
.lzr-modal-sub { max-width: 760px; }
.lzr-mohead { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px 0; }
.lzr-moheadmain { flex: 1; min-width: 0; }
.lzr-motitle { font-size: 19px; font-weight: 800; letter-spacing: -.015em; color: #26241f; }
.lzr-mosub { font-size: 13px; color: #827e76; margin-top: 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.lzr-x { flex: none; width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #827e76; background: none; border: 0; font: inherit; font-size: 15px; cursor: pointer; transition: background .13s ease, color .13s ease; }
.lzr-x:hover { background: rgba(28,27,24,.05); color: #26241f; }
.lzr-mobody { padding: 14px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.lzr-mofoot { display: flex; align-items: center; gap: 10px; padding: 0 20px 18px; }
.lzr-fx { flex: 1; }
.lzr-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; border: 0; transition: transform .14s cubic-bezier(.34,1.4,.5,1), box-shadow .14s ease; }
.lzr-btn:hover { transform: translateY(-2px); }
.lzr-btn.prim { background: #e0a020; color: #fff; box-shadow: 0 10px 22px -9px color-mix(in srgb, #e0a020 70%, transparent); }
.lzr-btn.sec { background: #fff; color: #26241f; border: 1.5px solid #e9e8e4; }
/* Der zurueckhaltende Löschknopf (B3): sichtbar, aber nicht einladend —
   er steht links, abseits der beiden Knöpfe, die man wirklich drückt. */
.lzr-btn.warn { background: #fff; color: #a33; border: 1.5px solid #edd; font-weight: 600; }
.lzr-btn.warn:hover { border-color: #a33; background: #fff5f5; }
.lzr-btn.sec:hover { border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); }
.lzr-hint { font-size: 11.5px; color: #a29c92; }
.lzr-noterow { position: relative; }
.lzr-kidnote { width: 100%; box-sizing: border-box; min-height: 170px; resize: vertical; padding: 12px 14px 12px 36px; border-radius: 14px; border: 1.5px solid #e9e8e4; background: #fffdf8; color: #26241f; font: inherit; font-size: 14px; line-height: 1.55; }
.lzr-kidnote:focus { outline: none; border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); box-shadow: 0 0 0 3px color-mix(in srgb, #e0a020 13%, transparent); }
.lzr-notelock { position: absolute; left: 12px; top: 12px; font-size: 12px; opacity: .55; pointer-events: none; }
.lzr-kidcols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lzr-kidbox { border: 1px solid #e9e8e4; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; background: #fcfbfa; align-items: flex-start; }
.lzr-kidboxh { font-size: 11px; font-weight: 700; color: #a29c92; text-transform: uppercase; letter-spacing: .07em; }
.lzr-workchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 500; color: #26241f; border: 1px solid #e9e8e4; background: #fff; cursor: pointer; text-align: left; transition: border-color .13s ease, transform .13s cubic-bezier(.34,1.4,.5,1); }
.lzr-workchip:hover { border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); transform: translateY(-1px); }
.lzr-workchip span { font-size: 11px; color: #8a6410; }
.lzr-none2 { font-size: 12.5px; color: #a29c92; }
.lzr-subprev { flex: none; height: 190px; border-radius: 14px; position: relative; overflow: hidden; background: radial-gradient(140% 120% at 50% -40%, rgba(28,27,24,.05), transparent 70%), #fbfaf8; border: 1px solid #e9e8e4; display: flex; align-items: center; justify-content: center; }
.lzr-subprev i { position: absolute; left: 7%; right: 7%; top: 50%; height: 56px; transform: translateY(-50%); background: repeating-linear-gradient(180deg, rgba(28,27,24,.14) 0, rgba(28,27,24,.14) 1.5px, transparent 1.5px, transparent 14px); }
.lzr-subprev > span { position: relative; font-size: 30px; letter-spacing: 14px; color: rgba(28,27,24,.55); }
.lzr-subplay { position: absolute; right: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; background: #26241f; color: #fff; border: 0; cursor: pointer; box-shadow: 0 10px 22px -8px rgba(28,27,24,.55); transition: transform .14s cubic-bezier(.34,1.4,.5,1); }
.lzr-subplay:hover { transform: translateY(-2px); }
.lzr-raterow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lzr-rateh { font-size: 12.5px; font-weight: 600; color: #827e76; margin-right: 3px; }
.lzr-rate { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; color: #827e76; border: 1.5px solid #e9e8e4; background: #fff; cursor: pointer; transition: border-color .14s ease, color .14s ease, background .14s ease, transform .13s cubic-bezier(.34,1.4,.5,1); }
.lzr-rate:hover { transform: translateY(-1px); border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); }
.lzr-rate.on { background: color-mix(in srgb, #e0a020 13%, #fff); color: #8a6410; border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); font-weight: 700; }
.lzr-subcomment { width: 100%; box-sizing: border-box; min-height: 84px; resize: vertical; padding: 11px 13px; border-radius: 13px; border: 1.5px solid #e9e8e4; background: #fbfbfa; color: #26241f; font: inherit; font-size: 14px; line-height: 1.5; }
.lzr-subcomment:focus { outline: none; border-color: color-mix(in srgb, #e0a020 34%, #e9e8e4); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, #e0a020 13%, transparent); }

/* Toast */
.lzr-toast { position: fixed; left: calc(50% + 36px); bottom: 26px; transform: translateX(-50%) translateY(20px); background: #26241f; color: #fff; font-size: 14px; font-weight: 600; padding: 12px 20px; border-radius: 13px; box-shadow: 0 18px 40px -12px rgba(28,27,24,.5); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s cubic-bezier(.34,1.4,.5,1); z-index: 90; display: flex; align-items: center; gap: 9px; font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.lzr-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.lzr-toast b { color: color-mix(in srgb, #1f9e6a 70%, #fff); font-weight: 700; }

/* (Die einspaltige Fassung steht jetzt bei `.lzr-cols` selbst — v0.512.) */
@media (max-width: 900px) {
  .lzr-wrap { padding: 20px 16px 48px; }
  .lzr-tlin { --tlleft: 150px; }
  .lzr-tllabel { font-size: 12px; }
  .lzr-pop { left: 0; }
  .lzr-agglabel { width: auto; flex: 1; }
  .lzr-kidcols { grid-template-columns: 1fr; }
  /* ⚠️ Die Herkunft bekommt eine EIGENE Zeile. Gemessen bei 390 px:
     der Titel — das Einzige, worum es in der Zeile geht — bekam 98 px,
     die Herkunft daneben 134. `flex-wrap` allein bricht nichts um,
     solange ein Kind `min-width: 0` trägt: es schrumpft lieber
     (dieselbe Falle wie `.pft-einfo` und `.ton-scroll`, v0.391).
     Deshalb `flex-basis: 100%`. */
  /* Das Profil ist am Rechner eine Tabelle mit fünf Spalten; die
     brauchen zusammen 660 px. Auf dem Handy drei Zeilen: Name, dann
     die beiden Wahlen nebeneinander (sie gehören zusammen und müssen
     vergleichbar bleiben), dann Folge und Belege. */
  .lzr-prhead { display: none; }
  .lzr-prrow { grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 8px 5px; }
  .lzr-prname { grid-column: 1 / -1; }
  .lzr-prbel { text-align: right; }
  .lzr-strow { flex-wrap: wrap; padding-bottom: 6px; }
  .lzr-stq, .lzr-sttraeger, .lzr-stohne { flex: 0 0 100%; max-width: none;
    order: 3; padding-left: 18px; }
  .lzr-stbtn { order: 2; }
  .lzr-stdimh { gap: 9px; }
}

/* Bibliothek: Live-Sheets-Rubrik (blau) */
.bib-liveic { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 22%, transparent); flex: none; }
.bib-folder.bib-live .bib-fname { color: var(--blau); font-weight: 800; }
.bib-lshead { grid-column: 1 / -1; font-size: 12.5px; font-weight: 800; color: var(--t-muted); margin: 6px 2px 0; }
.bib-lscard .bib-prev { display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--blau) 8%, #fff); }
.bib-lspulse { width: 14px; height: 14px; border-radius: 50%; background: var(--blau); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blau) 22%, transparent); animation: tonPulse 1.5s ease-in-out infinite; }
.bib-lsdel { border: 0; background: none; font: inherit; font-size: 13px; color: var(--t-muted); cursor: pointer; border-radius: 7px; padding: 2px 6px; }
.bib-lsdel:hover { background: color-mix(in srgb, var(--blau) 12%, transparent); color: var(--t-ink); }
/* Live-Sheet-Dropdown (blau): Teilen-Wege + Einladungen, widerrufbar */
.se-lsmenu { position: fixed; z-index: 74; width: min(320px, calc(100vw - 20px)); background: var(--t-panel, #fff); border: 1.5px solid color-mix(in srgb, var(--blau) 26%, var(--t-line)); border-radius: 16px; box-shadow: 0 22px 44px -14px rgba(22, 60, 110, .35); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.se-lshead { display: flex; align-items: center; gap: 9px; padding: 4px 6px 8px; font-size: 15px; color: var(--t-ink); border-bottom: 1px solid color-mix(in srgb, var(--blau) 14%, var(--t-line)); margin-bottom: 4px; }
.se-lshead .lp { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--t-ink) 30%, var(--t-line)); flex: none; }
.se-lshead .lp.on { background: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 24%, transparent); animation: sePulse 1.4s ease-in-out infinite; }
.se-lshint { margin: 2px 6px 6px; font-size: 12.5px; font-weight: 600; color: var(--t-muted); }
.se-lsrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; border-radius: 10px; padding: 9px 8px; font: inherit; font-size: 14px; color: var(--t-ink); cursor: pointer; }
.se-lsrow:hover { background: color-mix(in srgb, var(--blau) 9%, transparent); }
.se-lsrow b { display: block; font-size: 13.5px; font-weight: 800; }
.se-lsrow small { display: block; font-size: 11.5px; font-weight: 600; color: var(--t-muted); }
/* Suche (Personen/Gruppen/Klassen) + Vorschläge */
.se-lssearch { padding: 2px 4px 4px; position: relative; }
.se-lssearch input { width: 100%; box-sizing: border-box; border: 1.5px solid var(--t-line); border-radius: 10px; padding: 8px 11px; font: inherit; font-size: 13.5px; }
.se-lssearch input:focus { outline: none; border-color: var(--blau); }
.se-lssearch #se-ls-sug { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.se-lssugrow { border: 0; background: color-mix(in srgb, var(--blau) 7%, transparent); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13px; font-weight: 700; color: var(--t-ink); text-align: left; cursor: pointer; }
.se-lssugrow:hover { background: color-mix(in srgb, var(--blau) 14%, transparent); }
/* Zugriffsliste */
.se-lsacc { display: flex; flex-direction: column; padding: 2px 2px 6px; }
.se-lsaccrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13.5px; color: var(--t-ink); border-radius: 9px; }
.se-lsaccrow:hover { background: color-mix(in srgb, var(--blau) 6%, transparent); }
.se-lsaccrow .se-lswho { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-lsaccrow small { font-size: 11.5px; font-weight: 700; color: var(--t-muted); }
.se-lsaccrow.own small { color: var(--blau); }
.se-lsaccrow button { border: 0; background: none; font: inherit; font-size: 13px; color: var(--t-muted); cursor: pointer; border-radius: 7px; padding: 2px 6px; }
.se-lsaccrow button:hover { background: color-mix(in srgb, var(--blau) 12%, transparent); color: var(--t-ink); }
/* Allgemeiner Zugriff: Privat / Betrachter / Bearbeiter */
.se-lsgen { border-top: 1px solid color-mix(in srgb, var(--blau) 14%, var(--t-line)); padding: 8px 4px 2px; }
.se-lsgen > b { display: block; font-size: 12px; font-weight: 800; color: var(--t-muted); padding: 0 4px 6px; }
.se-lsseg { display: flex; gap: 4px; background: color-mix(in srgb, var(--blau) 7%, transparent); border-radius: 11px; padding: 3px; }
.se-lsseg button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 7px 4px; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--t-muted); cursor: pointer; }
.se-lsseg button.on { background: var(--blau); color: #fff; box-shadow: 0 3px 8px -3px color-mix(in srgb, var(--blau) 60%, transparent); }
.se-live .lp { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--t-ink) 42%, var(--t-line)); flex: none; }
.se-live.is-live { background: var(--blau); border-color: var(--blau); color: #fff; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--blau) 55%, transparent); }
.se-live.is-live .lp { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); animation: sePulse 1.1s ease-in-out infinite; }
@keyframes sePulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---- linke Menüspalte ---- */
/* ⚠️⚠️ **Der Einzug des Blattes folgt der GEMESSENEN Höhe der
 * Werkzeugleiste** (`--se-barh`, gesetzt von einem ResizeObserver in
 * schuelereditor.js, Rückfall 46 px). Bis v0.512 stand hier die Zahl
 * 96 = 50 (Lage der Leiste) + 46 (ihre Mindesthöhe) — sobald die Leiste
 * UMBRACH, wuchs sie auf 90 px und die obersten 22–26 px des Notenblatts
 * lagen darunter (gemessen 20.08.2026: iPad hochkant 768 UND quer 1024,
 * in BEIDEN Shells; verdeckt war der Blattkopf mit Titel und Tempo).
 * Der alte Weg — „sie darf nicht umbrechen, lieber seitwärts rollen" —
 * gilt weiter für das HANDY, wo die Höhe teuer ist; auf dem Tablet ist
 * eine zweite Zeile billiger als eine Leiste, deren rechte Hälfte
 * (Speichern, PDF) hinter dem Rand liegt. Wer hier eine feste Zahl
 * einträgt, holt den Fehler zurück. */
.se-col {
  position: fixed; top: calc(50px + var(--se-barh, 46px)); left: 0; bottom: 0; width: var(--se-col); z-index: 60;
  overflow-y: auto; padding: 16px 12px 40px 16px;
  background: #fff;
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; color: var(--t-ink); font-size: 15px;
}
.se-resizer { position: fixed; top: calc(50px + var(--se-barh, 46px)); bottom: 30px; left: calc(var(--se-col, 280px) - 7px); width: 14px; cursor: col-resize; z-index: 61; touch-action: none; }
.se-resizer::after { content: ""; position: absolute; left: 5px; top: 50%; width: 4px; height: 44px; transform: translateY(-50%); border-radius: 2px; background: transparent; transition: background .14s ease; }
.se-resizer:hover::after, body.se-resizing .se-resizer::after { background: color-mix(in srgb, var(--blau) 55%, transparent); }
.se-sec { background: var(--t-panel); border: 1.5px solid var(--t-line); border-radius: 14px; box-shadow: var(--t-elev); margin-bottom: 12px; overflow: hidden; transition: border-color .14s ease; }
.se-sec:hover { border-color: color-mix(in srgb, var(--blau) 50%, var(--t-line)); }
/* ⚠️ `user-select: none`: der Kopf ist der GRIFF, an dem der Kasten aus
   der Spalte gezogen wird (wireFloatDrag) — markierbarer Text darin
   färbt beim Ziehen die halbe Seite ein (Lars, 16.08.2026). */
.se-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 12px 14px; font-size: 13.5px; font-weight: 900; color: var(--t-ink); user-select: none; -webkit-user-select: none; }
.se-sec > summary::-webkit-details-marker { display: none; }
.se-sec > summary .chev { margin-left: auto; color: var(--t-muted); transition: transform .18s ease; font-size: 12px; }
.se-sec[open] > summary .chev { transform: rotate(90deg); }
.se-sec .sdot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.se-secbody { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 11px; }
.se-fld { display: flex; flex-direction: column; gap: 5px; }
.se-fld > span { font-size: 12px; font-weight: 800; color: var(--t-muted); }
.se-fld select, .se-harmony select { height: 34px; }
.se-secbody select { height: 34px; border: 1.5px solid var(--t-line); border-radius: 10px; background: #fff; font: inherit; font-size: 13px; font-weight: 700; color: var(--t-ink); padding: 0 9px; outline: none; transition: border-color .14s ease, box-shadow .14s ease; }
.se-secbody select:focus { border-color: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 18%, transparent); }
.se-fld input[type=range] { width: 100%; accent-color: var(--blau); }
.se-chk { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: var(--t-ink); cursor: pointer; }
.se-chk input { width: 17px; height: 17px; accent-color: var(--blau); flex: none; }
.se-optbtn { width: 100%; padding: 7px 10px; border: 1.5px solid color-mix(in srgb, var(--blau) 40%, var(--t-line)); border-radius: 10px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 800; color: color-mix(in srgb, var(--blau) 68%, var(--t-ink)); transition: border-color .14s ease, transform .14s ease; }
.se-optbtn:hover { border-color: var(--blau); transform: translateY(-1px); }
.se-addvoice { width: 100%; margin-top: 5px; padding: 7px; border: 1.5px dashed color-mix(in srgb, var(--blau) 40%, var(--t-line)); border-radius: 10px; background: none; font: inherit; font-size: 12px; font-weight: 800; color: color-mix(in srgb, var(--blau) 65%, var(--t-ink)); transition: border-color .14s ease; }
.se-addvoice:hover { border-style: solid; border-color: var(--blau); }

/* adoptierte Stimmen-Liste an die weiße Welt anpassen */
body.se-on .se-col #track-list { display: flex; flex-direction: column; gap: 2px; }
/* ⚠️⚠️ **Eine Stimmenzeile hat ELF Bedienelemente und die Spalte ist
 * 222 px breit.** Bis v0.512 stand hier `display: flex` ohne Umbruch;
 * die Grundregel `.track-list .trk` schneidet mit `overflow: hidden` ab
 * („a narrow sidebar must never paint over the score"). Gemessen am
 * 20.08.2026: Inhalt 423 px in 222 px — von 41 Bedienelementen waren
 * **20 unerreichbar**, und zwar bei JEDER Fenstergröße, nicht erst auf
 * dem Tablet: solo, stumm, Begleitstimme, Sperre und Löschen fehlten in
 * allen vier Stimmen, der Name las sich als „So", „Al", „Te", „Ba".
 * Nicht abgeschnitten, sondern FORT — wer nicht misst, hält die Zeile
 * für vollständig.
 * ⚠️ Der Lehrer-Editor macht es seit jeher richtig (`body.lz-on .se-col
 * #track-list .trk`, flex-wrap + Grundbreiten); hier steht dasselbe für
 * die Schüler-Spalte. Wer eine der beiden ändert, sieht bei der anderen
 * nach — es ist DIESELBE Liste, nur zweimal eingekleidet. */
body.se-on .se-col #track-list .trk { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 7px 0; font-size: 12.5px; color: var(--t-ink); }
body.se-on .se-col #track-list .trk input.trk-name { flex: 1 1 90px; min-width: 80px; }
body.se-on .se-col #track-list .trk select.instr { flex: 1 1 96px; min-width: 96px; max-width: 150px; }
body.se-on .se-col #track-list .trk input.mix { flex: 1 1 62px; min-width: 62px; }
/* ⚠️ **Das ZIEL ist nicht das BILD** (Regel aus v0.511): der Knopf
 * wächst auf Fingergröße, das Zeichen darin bleibt 15 px. */
body.se-on .se-col #track-list .trk button.mini { width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
body.se-on .se-col #track-list .trk button.mini svg { width: 15px; height: 15px; display: block; }
body.se-on .se-col #track-list .trk input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--blau); }
body.se-on .se-col #track-list .trk input[type=color] { width: 26px; height: 24px; padding: 0; }
@media (pointer: coarse) {
  body.se-on .se-col #track-list .trk button.mini { width: 32px; height: 32px; }
  body.se-on .se-col #track-list .trk input[type=checkbox] { width: 22px; height: 22px; }
  body.se-on .se-col #track-list .trk input[type=color] { width: 30px; height: 28px; }
  /* ⚠️ Beim SCHIEBEREGLER ist das Ziel der GRIFF, nicht die Schiene
     (Regel aus v0.511). Die Schiene bleibt schmal, der Kasten wird
     hoch — daran wächst der Griff mit. */
  body.se-on .se-col #track-list .trk input.mix { height: 26px; }
}
body.se-on .se-col #track-list .trk .grip { color: var(--t-muted); cursor: grab; }
body.se-on .se-col #track-list .trk-plus { display: none; }
body.se-on .se-col #track-list select { height: 30px; border: 1px solid var(--t-line); border-radius: 7px; background: #fff; font: inherit; font-size: 11.5px; color: var(--t-muted); padding: 0 6px; }
body.se-on .se-col #track-list input[type=range] { accent-color: var(--blau); }
body.se-on .se-col #track-list .hint { color: var(--t-muted); font-size: 12px; }

/* Harmonik: gesperrt / frei */
.se-harm { border-style: dashed; }
.se-harm .se-earn { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 900; color: var(--gruen); }
.se-harm .se-earn svg { width: 13px; height: 13px; }
.se-harm .se-lockbadge { margin-left: auto; display: none; align-items: center; color: var(--t-bgink); }
.se-harm .se-lockbadge svg { width: 14px; height: 14px; }
.se-harm .se-locknote { display: none; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--blau) 6%, #fff); border: 1px dashed color-mix(in srgb, var(--blau) 26%, var(--t-line)); font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--blau) 72%, var(--t-ink)); line-height: 1.4; }
.se-harm .se-locknote svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--blau); }
.se-harm.locked .se-earn { display: none; }
.se-harm.locked .se-lockbadge { display: inline-flex; }
.se-harm.locked .se-locknote { display: flex; }
#se-begleit-hint { margin: 2px 0 0; padding: 8px 11px; border-radius: 10px; background: color-mix(in srgb, var(--bernstein) 7%, #fff); border: 1px dashed color-mix(in srgb, var(--bernstein) 32%, var(--t-line)); font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--bernstein) 55%, var(--t-ink)); line-height: 1.4; }
#se-begleit-hint[hidden] { display: none; }
.se-harm.locked .se-fld, .se-harm.locked .se-checkbtn, .se-harm.locked .se-hints { display: none; }
.se-harm.locked > summary { color: var(--t-muted); cursor: default; }
.se-checkbtn { width: 100%; margin-top: 2px; padding: 8px 10px; border: 1.5px solid color-mix(in srgb, var(--rosa) 45%, var(--t-line)); border-radius: 10px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 800; color: color-mix(in srgb, var(--rosa) 70%, var(--t-ink)); transition: border-color .14s ease, transform .14s ease; }
.se-checkbtn:hover { border-color: var(--rosa); transform: translateY(-1px); }
.se-hints { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.se-hintrow { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.45; background: color-mix(in srgb, var(--bernstein) 9%, #fff); border: 1px solid color-mix(in srgb, var(--bernstein) 34%, var(--t-line)); border-radius: 9px; padding: 6px 8px; }
.se-hintrow.info { background: color-mix(in srgb, var(--blau) 6%, #fff); border-color: color-mix(in srgb, var(--blau) 26%, var(--t-line)); }
.se-hintrow span { flex: 1; }
/* Hinweis mit Fundstelle: anklickbar (springt hin und markiert) */
.se-hintrow.se-hintgo { cursor: pointer; }
.se-hintrow.se-hintgo:hover { border-color: color-mix(in srgb, var(--bernstein) 62%, var(--t-line)); background: color-mix(in srgb, var(--bernstein) 15%, #fff); }
.se-hintrow.se-hintgo.info:hover { border-color: color-mix(in srgb, var(--blau) 48%, var(--t-line)); background: color-mix(in srgb, var(--blau) 11%, #fff); }
.se-hintbook, .se-hintbell { flex: none; border: none; background: none; padding: 0 2px; font-size: 13px; cursor: pointer; }
.se-hintok { margin: 2px 2px 0; font-size: 11px; color: var(--t-muted); }

/* ---- Blattkopf über dem Score ---- */
/* Meta-Bearbeitung direkt am Blatt: das SVG trägt data-meta, das
 * Overlay legt sich exakt darüber */
body.se-on [data-meta] { cursor: text; }
body.se-on [data-meta]:hover { fill: var(--blau); }
.se-metaov { position: fixed; z-index: 70; display: flex; flex-direction: column; gap: 5px; padding: 7px; background: #fff; border: 1.5px solid var(--blau); border-radius: 10px; box-shadow: 0 10px 26px rgba(28, 27, 24, .2); }
.se-metaov input { font: inherit; font-size: 14px; font-weight: 700; color: var(--t-ink); border: 1px solid var(--t-line); border-radius: 7px; padding: 5px 8px; outline: none; background: #fff; }
.se-metaov input:focus { border-color: color-mix(in srgb, var(--blau) 55%, var(--t-line)); }

/* Radiergummi: einfacher Kreis — Knopf und Cursor */
.se-eraser.on { background: color-mix(in srgb, var(--blau) 12%, #fff); box-shadow: inset 0 0 0 1.5px var(--blau); color: var(--blau); }
body.se-on #score-scroll.erasing, body.se-on #score-scroll.erasing *,
body.se-on #score-scroll.erase-mode, body.se-on #score-scroll.erase-mode * { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><circle cx="12" cy="12" r="9" fill="none" stroke="black" stroke-width="2"/></svg>') 12 12, auto !important; }

/* alte Dauer-Zeile und Beige-Reste verschwinden aus der Schüler-Welt */
body.se-on #dur-bar { display: none !important; }
body.se-on #score-scroll { background: #fff; }
body.se-on #score-area .page svg { box-shadow: 0 3px 18px rgba(28, 27, 24, .13), 0 1px 3px rgba(28, 27, 24, .07); border-radius: 3px; }
body.se-on .statusbar { border-top: none; background: #fff; padding-left: calc(var(--se-col, 280px) + 16px); }
/* Radiergummi-Knopf nur bei Touch-Eingabe */
@media (hover: hover) and (pointer: fine) { .se-touchonly { display: none !important; } }
/* Tablet-Ergonomie: Verschiebe-Griff der Palette unten */
body.se-on #ctx-menu { z-index: 94; }
body.se-on #score-area { -webkit-touch-callout: none; }

/* Stempel-Palette in der Schüler-Welt: schwebendes Fenster, Griff als
 * schlichter Balken UNTEN (Tablet-Ergonomie; Basis-⠿ wird umgestylt) */
/* Palette in der Schüler-Welt: HORIZONTAL, frei beweglich am Balken-
 * Anker (links), oben ablegen dockt sie in die Werkzeugzeile */
body.se-on #palette { z-index: 70; flex-direction: row; align-items: stretch; }
body.se-on #palette .pal-grip { display: block; order: 0; font-size: 0; width: 13px; height: auto; align-self: stretch; margin: 2px 4px 2px 0; border-radius: 7px; background: var(--t-line); cursor: grab; }
body.se-on #palette .pal-grip:hover, body.se-on #palette.se-paldrag .pal-grip { background: color-mix(in srgb, var(--blau) 30%, var(--t-line)); }
body.se-on #palette.se-paldrag { opacity: .88; }
body.se-on.se-paldock-hint .se-bar { box-shadow: inset 0 -3px 0 var(--gruen); }
/* angedockt: die Palette IST Teil der Werkzeugzeile */
body.se-on .se-bar #palette { position: static !important; transform: none !important; display: flex; box-shadow: none; border: none; background: none; padding: 0; gap: 4px; }
body.se-on .se-bar #palette .pal-grip { margin: 4px 2px; }

/* ---- Speichern-Dialog (Bibliothek-Design) ---- */
.se-modal { position: fixed; inset: 0; z-index: 85; display: none; align-items: center; justify-content: center; padding: 26px; background: rgba(24, 22, 18, .46); backdrop-filter: blur(3px); font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; }
.se-modal.on { display: flex; }
.se-savecard { width: min(720px, 100%); height: min(480px, calc(100vh - 52px)); background: var(--t-panel); border: 1.5px solid var(--t-line); border-radius: var(--t-r); box-shadow: 0 34px 90px -26px rgba(24, 22, 18, .62), 0 6px 18px rgba(24, 22, 18, .18); display: flex; flex-direction: column; overflow: hidden; }
.se-schead { display: flex; align-items: center; gap: 13px; padding: 15px 18px 15px 22px; border-bottom: 1.5px solid var(--t-line); }
.se-schead-ic { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; background: color-mix(in srgb, var(--blau) 14%, #fff); color: var(--blau); flex: none; }
.se-schead-ic svg { width: 22px; height: 22px; }
.se-schead h2 { margin: 0; flex: 1; font-size: 19px; font-weight: 900; letter-spacing: -.015em; color: var(--t-ink); }
.se-scx { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; color: var(--t-muted); font-size: 21px; line-height: 1; flex: none; }
.se-scx:hover { background: #f3f3f1; color: var(--t-ink); }
.se-scbody { flex: 1; display: flex; min-height: 0; }
.se-scrail { width: 210px; flex: none; border-right: 1.5px solid var(--t-line); background: #fcfcfb; display: flex; flex-direction: column; padding: 12px; gap: 2px; overflow-y: auto; }
.se-folder { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid transparent; font-size: 14px; font-weight: 800; color: var(--t-ink); width: 100%; text-align: left; transition: background .12s ease, border-color .12s ease; }
.se-folder:hover { background: #f2f1ee; border-color: color-mix(in srgb, var(--t-ink) 14%, transparent); }
.se-folder.on { background: color-mix(in srgb, var(--blau) 11%, #fff); border-color: color-mix(in srgb, var(--blau) 40%, transparent); }
.se-folder svg { width: 18px; height: 18px; flex: none; color: color-mix(in srgb, var(--t-muted) 70%, var(--t-ink)); }
.se-folder.on svg { color: var(--blau); }
.se-folder .f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-sccontent { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 20px; }
.se-scfield { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.se-scfield label { font-size: 12px; font-weight: 800; color: var(--t-muted); }
.se-scfield input { height: 44px; border: 1.5px solid var(--t-line); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; font-weight: 800; color: var(--t-ink); padding: 0 14px; outline: none; transition: border-color .14s ease, box-shadow .14s ease; }
.se-scfield input:focus { border-color: var(--blau); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blau) 16%, transparent); }
.se-sctarget { font-size: 13px; font-weight: 700; color: var(--t-muted); margin: 0 0 auto; }
.se-sctarget b { color: var(--blau); font-weight: 900; }
.se-scerr { margin: 0; font-size: 12.5px; font-weight: 700; color: #b3261e; min-height: 16px; }
.se-scactions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; border-top: 1.5px solid var(--t-line); }
.se-btn-ghost { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--t-line); font-weight: 800; font-size: 14px; color: var(--t-ink); transition: background .12s, border-color .12s; }
.se-btn-ghost:hover { background: #f6f5f2; border-color: color-mix(in srgb, var(--t-ink) 22%, var(--t-line)); }
.se-btn-primary { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 12px; background: var(--gruen); color: #fff; font-weight: 900; font-size: 14px; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--gruen) 55%, transparent); transition: transform .12s var(--bounce); }
.se-btn-primary:hover { transform: translateY(-1.5px); }

/* ---- Toast ---- */
/* spielbare Klaviatur-Leiste des Warte-Modus (Touch → inject) */
#kp-kbd-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 87; height: 128px; width: min(94vw, calc(var(--kp-w) * 46px)); background: #fff; border: 1.5px solid #e9e8e4; border-radius: 14px; box-shadow: 0 14px 34px -10px rgba(28, 27, 24, .25); padding: 7px; }
#kp-kbd-bar[hidden] { display: none; }
#kp-kbd-bar .kp-key { position: absolute; top: 7px; bottom: 7px; margin: 0; padding: 0; border: 1px solid #c9c7c2; background: #fff; cursor: pointer; touch-action: none; }
#kp-kbd-bar .kp-white { left: calc(7px + var(--kp-i) * ((100% - 14px) / var(--kp-w))); width: calc((100% - 14px) / var(--kp-w)); border-radius: 0 0 6px 6px; z-index: 1; }
#kp-kbd-bar .kp-white i { position: absolute; left: 0; right: 0; bottom: 4px; font-style: normal; font-size: 10px; font-weight: 800; color: #827e76; text-align: center; pointer-events: none; }
#kp-kbd-bar .kp-black { left: calc(7px + var(--kp-i) * ((100% - 14px) / var(--kp-w)) - ((100% - 14px) / var(--kp-w)) * 0.32); width: calc(((100% - 14px) / var(--kp-w)) * 0.64); height: 58%; bottom: auto; background: #26241f; border-color: #26241f; border-radius: 0 0 5px 5px; z-index: 2; }
#kp-kbd-bar .kp-key.kp-exp { box-shadow: inset 0 0 0 2.5px #1f9e6a; }
#kp-kbd-bar .kp-black.kp-exp { box-shadow: inset 0 0 0 2.5px #6fdcae; }
#kp-kbd-bar .kp-key.kp-got { background: color-mix(in srgb, #1f9e6a 30%, #fff); }
#kp-kbd-bar .kp-black.kp-got { background: color-mix(in srgb, #1f9e6a 55%, #26241f); }
#kp-kbd-bar .kp-key.kp-press { background: #e4e2de; }
#kp-kbd-bar .kp-black.kp-press { background: #4a463f; }

/* Pille und Klaviatur stapeln sich, statt sich zu überlappen */
/* Lektions-Vollbild: die Klaviatur nimmt die ganze Fensterbreite ein
   (wichtig ohne physisches Klavier, v. a. am Tablet) */
body.kp-present #kp-kbd-bar { left: 0; right: 0; bottom: 0; transform: none; width: auto; max-width: none; height: 180px; border-radius: 16px 16px 0 0; border-left: none; border-right: none; border-bottom: none; box-shadow: 0 -10px 30px -12px rgba(28, 27, 24, .25); }

/* Fall-Modus: die Lane über der Klaviatur — eine gekippte Treppe */
#kp-lane { position: fixed; left: 0; right: 0; z-index: 86; overflow: hidden; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,0), rgba(31,158,106,.05)); }
#kp-lane::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, #1f9e6a 55%, transparent); box-shadow: 0 0 12px color-mix(in srgb, #1f9e6a 55%, transparent); }
.kp-tile { position: absolute; top: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; border-radius: 9px; color: #fff; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; font-size: 16px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.35); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35), 0 2px 8px rgba(28,27,24,.18); will-change: transform; transition: opacity .3s ease; }
.kp-tile.kp-tnear { box-shadow: inset 0 0 0 2.5px rgba(255,255,255,.75), 0 2px 14px rgba(28,27,24,.28); }
.kp-tile.kp-thit { filter: brightness(1.28) saturate(1.15); box-shadow: inset 0 0 0 2.5px rgba(255, 255, 255, .9), 0 0 18px rgba(31, 158, 106, .45); }
.kp-tile.kp-tok { filter: brightness(1.08) saturate(.75); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); opacity: .85; }
.kp-tile.kp-tmiss { opacity: .25; filter: grayscale(.8); }

/* Übe-Pille v2: großer Start/Stopp links, Modus ist nur AUSWAHL */
.kp-ic { border: none; background: none; font: inherit; font-size: 15px; cursor: pointer; padding: 2px 5px; border-radius: 7px; color: #827e76; }
.kp-ic:hover { background: rgba(0, 0, 0, .05); color: #26241f; }
.kp-ic.on { color: #1f9e6a; background: color-mix(in srgb, #1f9e6a 12%, #fff); }
.kp-modesel { border: none; background: none; font: inherit; font-size: 12px; font-weight: 800; color: #827e76; padding: 3px 9px; border-radius: 7px; cursor: pointer; }
.kp-modesel.on { background: #fff; color: #1f9e6a; box-shadow: inset 0 0 0 1.5px #1f9e6a; }
.kp-modesel svg, .kp-loop svg { width: 17px; height: 17px; display: block; }
.kp-ic svg { width: 17px; height: 17px; display: block; }
.kp-modesel { padding: 5px 10px; }

/* Countdown: ein paar Sekunden Vorbereitung vor dem Losspielen */
#kp-count { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 96; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; font-size: 120px; font-weight: 900; color: #1f9e6a; text-shadow: 0 6px 30px rgba(31, 158, 106, .35); pointer-events: none; }
#kp-count.pop { animation: kpPop .65s ease; }
@keyframes kpPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 100% { opacity: .9; transform: translate(-50%, -50%) scale(1); } }

/* Fall-Modus: das Blatt tritt komplett ab — ein Modus, eine Ansicht */
body.kp-fall #score-scroll { visibility: hidden; }
.kp-hit-ok { opacity: .75; }

/* ---- Übe-HUD (fall-modus.html): Ränder statt Pille ---- */
#kp-pill { position: fixed; inset: 0; z-index: 88; pointer-events: none; display: block; padding: 0; background: none; border: none; box-shadow: none; transform: none; left: 0; bottom: 0; }
#kp-pill > * { pointer-events: auto; }
#kp-close { position: absolute; top: 64px; left: 16px; width: 44px; height: 44px; border: 1.5px solid #e9e8e4; border-radius: 12px; background: rgba(255, 255, 255, .92); font: inherit; font-size: 17px; color: #827e76; cursor: pointer; }
#kp-close:hover { color: #26241f; border-color: #c9c7c2; }
#kp-score { position: absolute; top: 64px; right: 16px; text-align: right; background: rgba(255, 255, 255, .92); border: 1.5px solid #e9e8e4; border-radius: 14px; padding: 8px 14px; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; }
#kp-score b { display: block; font-size: 26px; font-weight: 900; color: #1f9e6a; line-height: 1.1; }
#kp-score span { font-size: 11.5px; font-weight: 700; color: #827e76; }
#kp-hint { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: flex; align-items: baseline; gap: 10px; background: rgba(255, 255, 255, .92); border: 1.5px solid #e9e8e4; border-radius: 14px; padding: 8px 16px; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; }
#kp-hint b { font-size: 21px; font-weight: 900; color: #26241f; }
#kp-hint span { font-size: 12px; font-weight: 700; color: #827e76; }
#kp-hint[hidden], #kp-score[hidden], #kp-result[hidden] { display: none; }
.kp-rail { position: absolute; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; padding: 8px; background: rgba(255, 255, 255, .88); border: 1.5px solid #e9e8e4; border-radius: 16px; }
.kp-rail-l { left: 12px; }
.kp-rail-r { right: 12px; }
.kp-rail button { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border: 1.5px solid #e9e8e4; border-radius: 12px; background: #fff; font: inherit; font-size: 13px; font-weight: 800; color: #827e76; cursor: pointer; transition: transform .16s cubic-bezier(.34,1.4,.5,1), border-color .14s ease, color .14s ease; }
.kp-rail button:hover { transform: translateY(-2px); border-color: #1f9e6a; color: #26241f; }
.kp-rail button.on { background: #1f9e6a; border-color: #1f9e6a; color: #fff; }
.kp-rail button.locked { opacity: .45; pointer-events: none; }
.kp-rail button.locked.on { opacity: 1; pointer-events: none; }
.kp-rail .kp-modesel svg, .kp-rail .kp-loop svg, .kp-rail .kp-ic svg { width: 22px; height: 22px; }
#kp-result { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .55); }
.kp-resbox { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; border: 2px solid #1f9e6a; border-radius: 20px; padding: 26px 44px; box-shadow: 0 24px 60px -20px rgba(28, 27, 24, .35); font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; }
.kp-resbox b { font-size: 52px; font-weight: 900; color: #1f9e6a; line-height: 1; }
.kp-resbox > span { font-size: 13.5px; font-weight: 700; color: #827e76; }
.kp-noecht { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: #e0a020; }
.kp-fallsp { margin-top: 10px; }
.kp-resrow { display: flex; gap: 10px; margin-top: 12px; }
.kp-resrow button { border: 1.5px solid #e9e8e4; border-radius: 12px; background: #fff; font: inherit; font-size: 14.5px; font-weight: 800; color: #26241f; padding: 10px 18px; cursor: pointer; }
.kp-resrow button:hover { border-color: #1f9e6a; }
.kp-resbox.fail { border-color: #e0a020; }
.kp-resbox.fail b { color: #e0a020; }
.kp-resrow .kp-primary { background: #1f9e6a; border-color: #1f9e6a; color: #fff; }
.lp-nextbox.fail b { color: #e0a020; }
/* iPad: die Klaviatur ist kein Bild — nichts markieren, kein Callout */
#kp-kbd-bar, #kp-kbd-bar * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#kp-kbd-bar .kp-key { touch-action: none; }
.kp-flash { position: absolute; bottom: -34px; width: 68px; height: 68px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(31, 158, 106, .55) 45%, transparent 70%); animation: kpFlash .45s ease-out forwards; }
@keyframes kpFlash { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }

/* Lektions-Player (js/lektionsplayer.js): Präsentationsmodus */
body.kp-present #ton-shell, body.kp-present .se-bar, body.kp-present .se-col,
body.kp-present .se-resizer, body.kp-present .statusbar, body.kp-present #dur-bar { display: none !important; }
/* Üben ist VOLLBILD (Lars): auch die Raum-Leiste, die Tab-Leiste und das
 * Marken-Menü gehen — sonst lag der ✕-Knopf der Übung mitten auf der
 * linken Leiste und sah aus wie einer ihrer Räume */
body.kp-present #lz-rail, body.kp-present #tab-bar,
body.kp-present #se-globalmenu, body.kp-present #free-hint { display: none !important; }
body.kp-present.lz-on { padding-left: 0 !important; }
/* die schwebenden Übe-Leisten liegen ÜBER dem Blatt — ohne diesen
 * Einzug verschwände der Anfang des Stücks hinter der linken */
body.kp-present #score-scroll { padding-left: 84px; padding-right: 84px; }
body.kp-present { padding-top: 52px !important; background: #fff; }
/* Üben ist kein Editieren: Stempel-Palette weg, Blatt nicht anfassbar.
 * ⚠️ Diese Zeile trägt seit v0.340 echtes Gewicht: die Palette hing bis
 * dahin am Bearbeiten-Modus und war beim Üben schon deshalb fort. Jetzt
 * steht sie immer — in Spalte und Leiste verschwände sie mit deren
 * Regeln, SCHWEBEND hängt sie im <main> und nur diese Zeile nimmt sie
 * weg. Wer sie streicht, hat die Stempel über dem Übeblatt. */
body.kp-present #palette, body.kp-present #volta-plus, body.kp-present #ctx-menu { display: none !important; }
body.kp-present #score-area { pointer-events: none; }
body.kp-present .main-col { margin-left: 0 !important; }
#lp-strip { position: fixed; top: 0; left: 0; right: 0; height: 52px; z-index: 89; display: flex; align-items: center; gap: 16px; padding: 0 18px; background: #fff; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; color: #26241f; }
#lp-strip b { font-size: 16px; font-weight: 900; }
#lp-strip .lp-dots { display: flex; gap: 5px; }
#lp-strip .lp-dots i { width: 9px; height: 9px; border-radius: 50%; background: #e9e8e4; }
#lp-strip .lp-dots i.cur { background: #e0a020; }
#lp-strip .lp-dots i.done { background: #1f9e6a; }
#lp-strip .lp-flex { flex: 1; }
#lp-strip button { border: none; background: none; font: inherit; font-size: 17px; color: #827e76; cursor: pointer; padding: 6px 11px; border-radius: 9px; }
#lp-strip button:hover { color: #26241f; background: rgba(0, 0, 0, .05); }
#lp-card { position: fixed; inset: 52px 0 0 0; z-index: 88; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .95); padding: 22px; overflow-y: auto; }
#lp-card[hidden] { display: none; }
#lp-card.lp-top { align-items: flex-start; background: transparent; pointer-events: none; }
#lp-card.lp-top .lp-box { pointer-events: auto; box-shadow: 0 14px 34px -10px rgba(28, 27, 24, .28); }
.lp-box { max-width: 760px; width: 100%; background: #fff; border: 1.5px solid #e9e8e4; border-radius: 18px; padding: 30px 34px; box-shadow: 0 18px 44px -14px rgba(28, 27, 24, .18); font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; font-size: 17px; line-height: 1.75; color: #26241f; }
.lp-box p { margin: 0 0 14px; }
.lp-box.lp-slim { max-width: 620px; padding: 20px 24px; font-size: 15px; }
.lp-big { display: block; width: 100%; margin-top: 14px; padding: 16px; border: none; border-radius: 14px; background: #1f9e6a; color: #fff; font: inherit; font-size: 18px; font-weight: 900; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(31, 158, 106, .5); transition: transform .16s cubic-bezier(.34, 1.4, .5, 1); }
.lp-big:hover { transform: translateY(-2px); }
.lp-mini { margin-top: 10px; border: 1.5px solid #e9e8e4; background: #fff; border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 800; color: #26241f; cursor: pointer; }
.lp-mini:hover { border-color: #26241f; }
.lp-fin { font-size: 19px; text-align: center; }
#lp-next { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; }
#lp-next[hidden] { display: none; }
.lp-nextbox { display: flex; flex-direction: column; gap: 10px; align-items: center; background: #fff; border: 2px solid #1f9e6a; border-radius: 16px; padding: 14px 22px; box-shadow: 0 16px 40px -12px rgba(28, 27, 24, .3); color: #26241f; }
.lp-nextbox b { font-size: 17px; }
.lp-row { display: flex; gap: 10px; align-items: center; }
.lp-row .lp-big { width: auto; margin-top: 0; padding: 12px 26px; }
.lp-row .lp-mini { margin-top: 0; }

/* Warte-Modus (js/klavierpraxis.js): die Übe-Pille unten mittig */
.se-warte.on { background: color-mix(in srgb, #1f9e6a 12%, #fff); box-shadow: inset 0 0 0 1.5px #1f9e6a; color: #1f9e6a; }

.se-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); z-index: 92; background: var(--t-ink); color: #fff; padding: 11px 18px; border-radius: 13px; font-size: 14px; font-weight: 800; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--bounce); display: flex; align-items: center; gap: 9px; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; }
.se-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.se-toast svg { width: 17px; height: 17px; }

@media (max-width: 760px) {
  body.se-on .main-col { margin-left: 0; }
  .se-col { display: none; }
  /* ⚠️⚠️ Die Fußzeile war hier VERGESSEN: `body.se-on .statusbar` rückt
   * sie um die Breite der Seitenspalte ein (`--se-col`, Vorgabe 280+16) —
   * und die Spalte gibt es hier gar nicht. Auf 390 px blieben 94 px für
   * alles; die beiden Auswahlfelder fielen auf 12 px (unbedienbar) und
   * die Seite lief auf 421 px. ⚠️ Die Regel MUSS hierher, nicht in den
   * 700er Block weiter oben: dort verliert sie bei gleicher Spezifität
   * lautlos gegen die spätere Grundregel — genau die Falle, die schon
   * die 16-px-Felder der Nachbereitung gekostet hat (v0.361). */
  body.se-on .statusbar { padding-left: 14px; }
}

/* ---------- Ein HANDY, in beiden Lagen ----------
 * ⚠️⚠️ **Zwei Entscheidungen von Lars standen längst im Code und feuerten
 * im Querformat nicht** — beide prüfen die BREITE, und ein Handy quer ist
 * 844 px breit: „kein Notensatz auf Smartphone-Größe" (M4, 2026-07-16,
 * `max-width: 700px`) und die Optionsspalte (`max-width: 760px`). Deshalb
 * bekam das Blatt auf Lars' Gerät nur 33 % des Schirms — die Spalte allein
 * nahm 280 px, also 30 % der Breite (gemessen 03.08.2026).
 * Die Bedingung fragt deshalb nach dem GERÄT, nicht nach einer Kante:
 * grober Zeiger UND (schmal ODER flach). Ein Tablet quer hat über 520 px
 * Höhe und ist nicht gemeint, ein Handy quer schon.
 * ⚠️ Der Block muss NACH den Grundregeln stehen, die er überschreibt —
 * bei gleicher Spezifität gewinnt die spätere. */
@media (pointer: coarse) and (max-width: 760px),
       (pointer: coarse) and (max-height: 520px) {
  /* Bearbeiten fällt weg, Wiedergabe bleibt: `se-onlyedit` trägt die
     Editier-Gruppen der Leiste ohnehin schon, der Stift steht daneben.
     Play, Tempo, Metronom, Vollbild, Bibliothek und Speichern bleiben —
     „Editor nur zum Abspielen" (Lars, 03.08.2026). */
  #palette, #dur-bar,
  #se-pencil, .se-onlyedit { display: none !important; }
  /* Die Optionsspalte ist auf dem Handy kein Seitenstreifen, sondern ein
     Drittel der Breite. Sie hat ihren Weg über das ☰-Menü. */
  .se-col, .se-resizer { display: none !important; }
  body.se-on .main-col { margin-left: 0 !important; }
  body.se-on .statusbar { padding-left: 14px; }

  /* ⚠️ **Die Fußzeile SCHWEBT, statt zu verschwinden** (Lars: „erstmal die
   * Fußzeile"). Sie ganz zu entfernen ginge nicht ohne Verlust: `#status`
   * ist die EINE Statuszeile der App — acht Dateien schreiben hinein, und
   * ohne sie wären Fehlermeldungen beim Öffnen, Scannen und Speichern
   * unsichtbar. Und `#vs-page`/`#vs-orient` gehören NICHT bloß zum Druck:
   * sie ändern das Bild am Schirm (`refitAfterPageChange`), im
   * Export-Dialog gibt es sie gar nicht. Aus dem Fluss genommen kostet die
   * Zeile 0 px Höhe, verliert nichts und deckt nur den untersten Blattrand
   * — den man wegrollen kann, weil `#score-scroll` unten Luft bekommt. */
  /* ⚠️ Im Hochformat brach die Zeile zweizeilig um (gemessen 68 px) und
     verdeckte dabei den Werkzeug-Griff: der Lehrkraft-Fußzeile bleiben
     dort 318 px, und die Ansichts-Wahl trägt VIER Elemente (277 px), weil
     `schuelereditor.js` den Bildschirm-Zoom hineinzieht. Für `#status`
     blieb nichts übrig — also genau das, wofür die Zeile da ist.
     Rangfolge auf dem Handy: Meldungen > Zoom > Seiten/Fortlaufend >
     Papiergeometrie. Die letzten beiden fallen; sie ändern zwar auch das
     Bild am Schirm, aber wo nicht mehr gesetzt wird, wird auch nicht mehr
     paginiert. Die Versionsnummer steht im Marken-Menü — `#app-version`
     bleibt als ELEMENT, weil `versionText()` sie dort ausliest. */
  /* ⚠️ Und dieselbe Falle ein drittes Mal: v0.356 nahm „Problem melden"
     und „Über · Impressum" auf dem Handy aus der Fußzeile (sie stehen im
     Marken-Menü) — an der BREITE festgemacht, also im Querformat wieder da.
     Hier gehören sie mit hinein. */
  .statusbar #feedback-link, .statusbar #about-link,
  .statusbar #app-version { display: none; }
  /* ⚠️ Und das WORT „Ansicht" vor dem Zoom-Feld fällt mit (v0.421): das
     Feld sagt „Seite einpassen" bzw. „100 %", der Name daneben sagt
     nichts dazu — auf 318 px ist das der teuerste stumme Text der Zeile
     (Lars, 05.08.2026). Das `<label>` bleibt und behält seinen Klickweg
     aufs Feld; nur seine Beschriftung geht. */
  .statusbar .view-switch > label.inline > span[data-i18n="view"] { display: none; }
  .statusbar { gap: 9px; }
  .statusbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 57;
    background: color-mix(in srgb, var(--panel, #fff) 90%, transparent);
    backdrop-filter: blur(7px);
    padding-bottom: calc(5px + var(--sab));
  }
  body.lz-on .statusbar { left: var(--lzr); }
  /* ⚠️ Ohne diese Luft läge die letzte Notenzeile dauerhaft unter der
     Leiste; mit ihr lässt sie sich darunter hervorrollen. Sie kostet
     keinen Platz — nur Rollweg. */
  #score-scroll { padding-bottom: 40px; }
  /* Der schwebende Werkzeug-Griff weicht der schwebenden Zeile aus. */
  body.lz-on.se-on #lz-toolwrap { bottom: calc(52px + var(--sab)); }

  /* ---- Die Reiter stapeln sich (Lars, 03.08.2026) ----
   * ⚠️ Die Reiterzeile kostet eine ganze ZEILE (40 px, 10 % der Höhe im
   * Querformat) für etwas, das auf 390 px ohnehin zum Rollfeld wird.
   * Der Zähler tritt an ihre Stelle — links, wo die Reiter standen; das
   * Marken-Menü bleibt rechts. Beide sind fest, deshalb bekommt die
   * Werkzeugzeile links und rechts Luft, damit nichts darunter liegt. */
  /* ⚠️ **Die senkrechte Leiste fällt** (Lars, 03.08.2026): 72 px sind auf
   * 390 px Breite 18,5 %, und im Querformat passten acht Räume ohnehin
   * nicht übereinander. `--lzr` wird damit zum reinen sicheren Rand —
   * alles Feste, das daran hängt (Raum, Reiter, Werkzeugzeile, Fußzeile),
   * rückt von selbst nach links. */
  #lz-rail { display: none !important; }
  :root { --lzr: var(--sal); }
  body.lz-on { padding-left: var(--sal); }
  #lz-roomwrap { display: block; position: fixed; z-index: 58;
    left: calc(14px + var(--sal)); bottom: calc(14px + var(--sab)); }
  body.lz-on.se-on #lz-roomwrap { bottom: calc(52px + var(--sab)); }
  body.kp-present #lz-roomwrap { display: none; }
  /* Querformat: nach RECHTS aufziehen — dort ist der Platz, oben nicht. */
  @media (orientation: landscape) {
    .lz-rooms-pop { flex-direction: row; left: calc(100% + 8px); bottom: 0; }
  }
  /* ---- Bibliothek: die Orte-Leiste wird eine SCHUBLADE ----
   * ⚠️ Sie nimmt im Hochformat 206 von 390 px — 53 % der Breite für eine
   * Liste, die man einmal je Sitzung braucht (gemessen 03.08.2026, Lars).
   * Dasselbe Prinzip wie bei den Räumen: gerufen statt angedockt. Nur die
   * FORM ist eine andere — hier stehen benannte Ordner mit Zählern, die
   * kein Zeichen ersetzt, also eine Schublade statt einer Zeichenreihe. */
  .bib-railbtn { display: inline-flex; }
  /* ⚠️ **Die Tabelle wird eine LISTE** — das steht seit v0.510 NICHT mehr
   * hier, sondern bei den `@container`-Regeln der Tabelle (`.bib-tab`,
   * Suchwort „Der Titel darf nicht verhungern"). Grund: die Bedingung
   * hier fragt nach dem GERÄT, und der Titel verhungert nach der
   * BREITE — das iPad im Hochformat (768 px, grober Zeiger) fiel durch
   * beide Bedingungen und zeigte eine Stückliste ohne Stücknamen.
   * Was die Tabelle betrifft, gehört an den Platz, den sie hat; was das
   * Handy betrifft, bleibt hier. */
  /* ⚠️ „Auswählen" stand bei x=666 in einem 390er Fenster — also außerhalb
   * des Bildes, und wirkte deshalb funktionslos. In der Tabelle sind die
   * Häkchen ohnehin immer da; der Knopf ist dort ein zweiter Weg zu
   * nichts. */
  #bib-pick { display: none; }
  /* ⚠️ Rechts Platz für das schwebende Marken-Menü, sonst läge das Ende
     der ersten Zeile darunter. Das ist das EINZIGE am Umbruch, was
     wirklich vom Gerät abhängt — der Umbruch selbst hängt am Platz und
     steht deshalb seit v0.510 in seiner eigenen Breitenregel
     (Suchwort „Die Werkzeugzeile bricht um"). */
  .bib-toolbar { padding: 8px 10px; padding-right: 52px; }
  /* Der Abstand zwischen Kopfzeile und erster Zeile war für die Maus
     gerechnet — auf dem Handy ist Höhe der knappe Platz. */
  .bib-gridwrap { padding: 6px 10px 10px; }
  .bib-th { padding-top: 6px; padding-bottom: 6px; }
  /* ⚠️ Zum dritten Mal dieselbe Regel: `button { min-height: 40px }` machte
     aus dem Umbenennen-Stift ein 40-px-Kind und trieb die Zeile auf 48 px
     — der Haken stand dadurch über dem Titel statt daneben. */
  .bib-pencil { min-height: 0; height: 24px; width: 24px; }
  tr.bib-row > td { padding: 3px 10px; }

  /* ⚠️⚠️ **Die Tafel war auf dem Handy GANZ fort** (`@media (max-width:
   * 1100px) { display: none }`) — und mit ihr seit v0.384 der einzige Weg,
   * ein Stück in einen Ordner zu verschieben. Sie kommt zurück, aber als
   * BLATT VON UNTEN: neben der Liste ist auf 390 px kein Platz, und ihr
   * Zweck (die Zeilen nicht unter dem Finger wegschieben) gilt dort
   * genauso. */
  #bib-tafel { display: block; position: absolute; left: 0; right: 0; bottom: 0;
    width: auto; max-height: 62%; z-index: 7;
    border-left: none; border-top: 1px solid var(--b-line);
    border-radius: 15px 15px 0 0;
    /* ⚠️ Unten so viel Luft, dass die letzte Knopfreihe über dem
       schwebenden Raum-Griff endet (14 + 48) — sonst liegt er darauf. */
    padding: 14px 16px calc(66px + var(--sab));
    box-shadow: 0 -12px 32px -14px rgba(28, 27, 24, .45); }
  #bib-tafel[hidden] { display: none; }
  /* ⚠️ Querformat: die Tafel steht RECHTS, nicht unten — dort ist die
     Höhe knapp und die Breite da, dieselbe Abwägung wie beim Raum-Menü
     (Lars, 03.08.2026). */
  @media (orientation: landscape) {
    #bib-tafel { left: auto; top: 0; bottom: 0; width: min(300px, 42vw);
      max-height: none; border-top: none; border-left: 1px solid var(--b-line);
      border-radius: 0; padding: 14px 16px calc(14px + var(--sab));
      box-shadow: -12px 0 32px -16px rgba(28, 27, 24, .45); }
  }
  /* ---- Hochformat: die drei Hauptaktionen als Zeichenreihe unten ----
   * ⚠️ Sie sitzen ZWISCHEN den beiden schwebenden Griffen (Raum links,
   * Werkzeuge rechts) und sind mittig — dieselbe Zeile, dieselbe Höhe.
   * Aus „Favoriten" wird ein Stern, aus „Löschen" ein Papierkorb; der
   * Name bleibt als `title`. ⚠️ Groß genug: 46 px Ziel, 22 px Zeichen. */
  /* ---- Öffnen und Stern in die ECKE der Tafel, oben rechts ----
   * ⚠️ Ohne Rahmen und ohne Beschriftung, nur die Zeichen (Lars,
   * 03.08.2026) — sie sind Aufsätze auf der Überschrift, keine
   * Knopfreihe. Gilt in beiden Lagen; das Löschen geht seinen eigenen
   * Weg, weil es das einzige ist, das man nicht zurücknehmen kann. */
  #bib-tafel { position: absolute; }
  #bib-tafel .bib-thaupt { position: absolute; top: 10px; right: 12px;
    margin: 0; gap: 2px; z-index: 2; }
  /* ⚠️ `min-height: 0` — die Fingerregel machte im Hochformat 34 × 40
     daraus, zum vierten Mal in dieser Runde. */
  #bib-tafel .bib-thaupt .bib-tb { width: 34px; height: 34px; min-height: 0; padding: 0;
    justify-content: center; border: none; background: none; }
  #bib-tafel .bib-thaupt .bib-tb svg { width: 22px; height: 22px; }
  #bib-tafel .bib-thaupt .bib-tb span { display: none; }
  #bib-tafel .bib-thaupt .bib-tb.haupt { color: var(--accent); }
  /* Damit die Überschrift nicht unter die beiden läuft. */
  #bib-tafel h3 { padding-right: 76px; }
  /* ---- Der Papierkorb: ein QUADRAT wie Raum- und Werkzeug-Griff ----
   * ⚠️ Gleiche Größe, gleiche Höhe, in derselben Reihe — er ist das
   * dritte schwebende Ding am unteren Rand, nicht eine Knopfreihe für
   * sich. */
  #bib-tafel .bib-tdel { position: fixed; z-index: 59; margin: 0;
    left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--sab)); }
  #bib-tafel .bib-tdel .bib-tb { width: 48px; height: 48px; min-height: 0; padding: 0;
    justify-content: center; border-radius: 15px;
    border: 1.5px solid color-mix(in srgb, #c6415f 40%, #e9e8e4);
    background: #fff; color: #c6415f;
    box-shadow: 0 8px 22px -12px rgba(28, 27, 24, .5); }
  #bib-tafel .bib-tdel .bib-tb svg { width: 22px; height: 22px; }
  #bib-tafel .bib-tdel .bib-tb span { display: none; }
  @media (orientation: portrait) {
    #bib-tafel { padding-bottom: calc(72px + var(--sab)); }
  }
  /* ⚠️ **Katalog-Favoriten sind KARTEN und blieben es** — die Liste der
   * Lehrkraft (`pieceTable`) betrifft nur die eigenen Stücke, gemerkte
   * Katalogstücke kommen daneben als `katCard` (Lars, 03.08.2026: „sind
   * immer noch riesig"). Auf dem Handy legen sie sich flach: der
   * Vorschaublock wird zum Sternfeld links, der Rest steht daneben. */
  #bib-grid .bib-kat { display: flex; align-items: center; gap: 10px;
    height: auto; padding: 6px 10px; border-radius: 10px;
    border: none; border-bottom: 1px solid var(--b-line); box-shadow: none; }
  #bib-grid .bib-kat:hover { transform: none; box-shadow: none; }
  #bib-grid .bib-kat .bib-prev { height: auto; width: 34px; flex: none;
    background: none; border: none; }
  #bib-grid .bib-kat .bib-prev::before { display: none; }
  #bib-grid .bib-kat .bib-star { position: static; width: 30px; height: 30px; }
  #bib-grid .bib-kat .bib-meta { flex: 1; min-width: 0; padding: 0; }
  #bib-grid .bib-kat .bib-ptitle { font-size: 14px; }

  /* Komponisten und Tags eingeklappt: zwei lange Chip-Reihen nahmen mehr
     als die halbe Höhe. */
  #bib-kfmehr:not([open]) { padding-bottom: 2px; }
  .bib-kfmehr summary { cursor: pointer; font-size: 12.5px; color: var(--b-muted);
    padding: 5px 2px; list-style: none; }
  .bib-kfmehr summary::-webkit-details-marker { display: none; }
  .bib-kfmehr summary::before { content: "▸ "; }
  .bib-kfmehr[open] summary::before { content: "▾ "; }
  .bib-body { position: relative; }
  .bib-rail { position: absolute; left: 0; top: 0; bottom: 0; z-index: 6;
    width: min(240px, 78vw); transform: translateX(-101%);
    transition: transform .2s ease; box-shadow: 6px 0 24px -12px rgba(28,27,24,.5); }
  body.bib-rail-on .bib-rail { transform: none; }
  /* Vorhang: er macht sichtbar, dass die Liste ÜBER dem Bestand liegt —
     und fängt den Tipp daneben ab, ohne dass die Liste ihn braucht. */
  body.bib-rail-on .bib-content::before { content: ""; position: absolute; inset: 0;
    z-index: 5; background: rgba(20,26,40,.28); }
  /* ⚠️ **Die Raum-Kopfzeile fällt** (Lars, 03.08.2026): 40 px für einen
   * Namen, den der Griff unten links ohnehin führt — im Noteneditor gibt
   * es sie längst nicht. ⚠️ ABER sie trägt das Marken-Menü (Sprache,
   * Hilfe, Impressum, Abmelden); das darf nicht mitfallen. Deshalb bleibt
   * der Kasten, verliert Grund und Platz und schrumpft auf das Menü —
   * schwebend oben rechts, genau dort, wo `#se-globalmenu` im Editor
   * sitzt. Ein Ort für dieselbe Sache. */
  .lz-kopf { position: absolute; top: var(--sat); right: 0; left: auto; width: auto;
    height: 40px; z-index: 62; background: none; border: none; padding: 0 8px; }
  .lz-rdot, .lz-kopf .lz-rname, .lz-kopf .lz-flex { display: none; }
  #tab-bar { display: none !important; }
  /* ⚠️ Zähler und Liste gehören NUR dorthin, wo es Reiter gibt: in den
     Noteneditor (`se-on`). In den anderen Räumen der Lehrkraft stand ein
     „0" über dem Inhalt und die Liste blieb beim Raumwechsel stehen. */
  body.lz-on:not(.se-on) #tab-mini,
  body.lz-on:not(.se-on) #tab-pop { display: none !important; }
  #tab-mini {
    display: flex; align-items: center; justify-content: center;
    position: fixed; z-index: 61; top: calc(3px + var(--sat)); left: calc(8px + var(--sal));
    /* QUADRAT, wie die Knöpfe daneben (Lars, 03.08.2026) — nicht ein
       Rechteck, das mit der Ziffernzahl wächst. ⚠️ `min-height` muss mit:
       die Fingerregel `button, select { min-height: 40px }` (max-width 700)
       gilt sonst auch hier und macht im Hochformat 36 × 40 daraus —
       dieselbe Falle wie bei den Zahlenfeld-Pfeilchen. */
    width: 36px; height: 36px; min-height: 0; padding: 0;
    font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
    border: 1.5px solid var(--line, #e9e8e4); border-radius: 11px;
    background: var(--panel, #fff); color: inherit;
  }
  body.lz-on #tab-mini { left: calc(var(--lzr) + 8px); }
  #tab-pop { display: flex; top: calc(44px + var(--sat)); left: calc(8px + var(--sal)); }
  body.lz-on #tab-pop { left: calc(var(--lzr) + 8px); }
  /* ⚠️⚠️ **Die Zeile ENDET vor den festen Elementen, sie polstert nicht
   * bloß.** Mit `padding` blieb die Rollfläche unter Zähler und Marke,
   * und die Knöpfe wanderten beim Rollen sichtbar darunter hindurch
   * (Lars, 03.08.2026). `left`/`right` machen den Rollkasten physisch
   * schmaler — dort KANN nichts mehr durch. Die Maße: Zähler 8 + 36 + 6,
   * Marke 14 + 40 + 4. */
  .se-bar { top: var(--sat) !important;
    left: calc(var(--lzr) + 50px) !important;
    right: calc(var(--sar) + 58px) !important; }
  body.lz-on.se-on { padding-top: calc(var(--se-barh, 46px) + var(--sat)); }

  /* ⚠️⚠️ **Die Schüler-Shell behält ihre EIGENE Reiterzeile** (`.ton-tabs`,
   * 40 px) — die gestapelten Reiter von v0.378 lösen `#tab-bar` ab, nicht
   * sie. Die Regel darüber schob die Werkzeugzeile auf `top: 0`, also
   * genau unter diese Zeile: im Schüler-Editor war vom Abspielknopf
   * nichts mehr zu sehen (Lars, 03.08.2026; gemessen `.ton-tabs` t=0 h=40
   * UND `.se-bar` t=0 h=46). Sie beginnt hier unter der Zeile, und weil
   * die Shell die Reiter selbst führt, braucht die Leiste weder links
   * noch rechts eine Aussparung — die volle Breite gehört ihr.
   * ⚠️ Ohne `var(--sat)`: die Schüler-Shell rechnet nirgends mit sicheren
   * Rändern, `.ton-tabs` steht auf 0. Eine Leiste, die als einzige den
   * Rand mitzählt, risse eine Lücke unter die Reiterzeile. */
  body.ton-has .se-bar { top: 40px !important;
    left: var(--sal) !important; right: var(--sar) !important; }
  /* Zähler und Liste sind das Gegenstück zu `#tab-bar` — und das ist in
     der Schüler-Shell ausgeblendet (`body.ton-has #tab-bar`). Sie lagen
     bisher nur zufällig hinter `#ton-shell` und wären bei jeder Änderung
     an der Stapelung aufgetaucht. */
  body.ton-has #tab-mini, body.ton-has #tab-pop { display: none !important; }

  /* ---- Die Werkzeugzeile, enger (Lars, 03.08.2026) ----
   * ⚠️ **Der Play-Knopf allein trieb die Höhe**: 56 × 42 px, während
   * Stop 40 × 36 und das Metronom 30 × 30 misst — die Leiste ist so hoch
   * wie ihr höchstes Kind, also 50 statt 42. Seit v0.500 ist er auch am
   * Rechner 36 × 36; hier bleibt nur das kleinere Zeichen. */
  .se-play svg { width: 18px; height: 18px; }
  /* Ränder: 16 px links und 4 px oben waren für die Maus gedacht. Den
     Platz für Zähler und Marke schaffen `left`/`right` oben, nicht das
     Polster — sonst rollte der Inhalt darunter hindurch. */
  /* ⚠️ Und sie darf NICHT umbrechen: im Hochformat wurden aus einer Zeile
     drei (gemessen 102 px), und der Einzug des Blattes kann einer
     wechselnden Höhe nicht folgen — das Blatt lag dann unter der Leiste.
     Seitwärts rollen wie die Raum-Leiste: lieber rollen als stapeln. */
  .se-bar { padding: 3px 8px; gap: 8px; min-height: 0;
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; }
  .se-bar::-webkit-scrollbar { display: none; }
  .se-bar .se-grp, .se-bar .se-actions { flex: none; }
  /* ⚠️ Der Einzug folgt hier wie überall der GEMESSENEN Leiste
     (`--se-barh`; quer 42, hoch 46 — das Rollfeld misst ein Haar mehr);
     die Reiterzeile ist fort. Bis v0.512 stand die 46 fest im Text. */
  /* ⚠️ Die Pfeilchen am Tempofeld sind auf dem Handy nicht zu treffen
     (`KS.spinnerize` baut sie 10 px hoch). Das Feld bleibt ein Zahlenfeld
     — die Zifferntastatur kommt vom `type="number"`, nicht von den
     Pfeilen. */
  .se-num .num-spin, #se-tempo::-webkit-inner-spin-button,
  #se-tempo::-webkit-outer-spin-button { display: none !important; }
  #se-tempo { -moz-appearance: textfield; appearance: textfield; }
}

/* ⚠️ Die Regel, die Papierformat und Lage im Hochformat ausblendete, ist
 * seit v0.376 GEGENSTANDSLOS: aus zwei Auswahlfeldern (138 px) wurde ein
 * Knopf mit Menü (40 px), und damit passt die ganze Ansichts-Wahl auch in
 * die 318 px, die der Lehrkraft im Hochformat bleiben. */

/* ---- Raumprofil im Lehrerzimmer (Modul-Kontrakt §4.6/§4.7) ---- */
.lzr-rsub { margin: 2px 0 10px; font-size: 12.5px; color: var(--t-muted); }
.lzr-rgrp { margin: 8px 0; }
.lzr-rgrp > b { display: block; font-size: 11.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--t-muted); margin-bottom: 5px; }
.lzr-rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.lzr-rchip {
  border: 1px solid var(--t-line); background: transparent; color: inherit;
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
}
.lzr-rchip:hover { border-color: var(--accent); }
.lzr-rchip.on {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff);
}

/* ---- Erfahrungsdaten ausleiten (Rückkanal §7) ----
   Die Knöpfe sind bewusst RUHIG (Umriss, keine Akzentfläche): das
   Ausleiten ist die seltenste Handlung des Raums und soll nicht wie
   sein Hauptzweck aussehen. `.lzr-rsub` darüber trägt den Satz, der
   sagt, was hinausgeht — er ist der eigentliche Inhalt des Abschnitts
   und steht deshalb VOR den Knöpfen, nicht als Fußnote darunter. */
.lzr-dbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.lzr-dbtn {
  border: 1px solid var(--t-line); background: transparent; color: inherit;
  border-radius: 8px; padding: 7px 12px; font-size: 12.5px; cursor: pointer;
}
.lzr-dbtn:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Modul-Raum (js/modulraum.js) ----
   Kartenwand wie der Paket-Editor, aber ohne Wertung: keine Ampeln,
   keine Sterne (Kontrakt §8). Ungeprüftes ist blass, nicht versteckt. */
.mr-root { height: 100%; overflow: auto; }
.mr-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 26px 60px; }
/* ⚠️ Die Kopfzeile eines Raums UMBRICHT (seit v0.512) — dieselbe
   Bauform wie `.lzr-vhead`, die es seit jeher richtig macht: der
   Titelblock nimmt den Platz und gibt bei 240 px auf, die Handlungen
   rutschen in eine zweite Zeile. Ohne sie stand „＋ Neues Modul" auf
   390 px bei l=321 r=390 — bündig mit der Fensterkante, also
   abgeschnitten, und die WICHTIGSTE Handlung des Raums war nicht
   auslösbar. Wer eine neue Raum-Kopfzeile baut, baut sie so. */
.mr-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.mr-head > div:first-child { flex: 1; min-width: 240px; }
.mr-h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.mr-sub { margin: 4px 0 0; color: var(--t-muted); font-size: 13.5px; }
.mr-zahl { margin-left: auto; color: var(--t-muted); font-size: 13px; white-space: nowrap; }
.mr-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.mr-search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--t-line);
  border-radius: 999px; padding: 5px 12px; flex: 1 1 240px; }
.mr-search input { border: 0; background: none; outline: none; color: inherit; font: inherit; width: 100%; }
.mr-tools select { border: 1px solid var(--t-line); border-radius: 999px; padding: 5px 10px;
  background: transparent; color: inherit; font: inherit; }
.mr-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--t-muted); }
.mr-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.mr-card {
  display: flex; flex-direction: column; gap: 5px; text-align: left; cursor: pointer;
  border: 1px solid var(--t-line); border-radius: 12px; padding: 12px 14px;
  background: transparent; color: inherit; font: inherit;
}
.mr-card:hover { border-color: #7a5fbf; }
.mr-card.blass { opacity: .62; }
.mr-card.blass:hover { opacity: 1; }
.mr-ctop { display: flex; align-items: baseline; gap: 8px; }
.mr-titel { font-weight: 650; font-size: 14.5px; }
.mr-min { margin-left: auto; color: var(--t-muted); font-size: 12.5px; }
.mr-kurz { font-size: 12.8px; color: var(--t-muted); line-height: 1.4; }
.mr-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mr-tag { font-size: 11px; border: 1px solid var(--t-line); border-radius: 999px; padding: 1px 8px; }
.mr-tag.art { border-color: #7a5fbf; color: #7a5fbf; }
.mr-tag.mut { color: var(--t-muted); }
.mr-ungeprueft { font-size: 11px; font-style: italic; color: var(--t-muted); }
.mr-sec2 { margin-top: 26px; }
.mr-sechead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px;
  padding-top: 12px; border-top: 1px solid var(--t-line); }
.mr-sechead > b { font-size: 14px; }
.mr-sechead > span { font-size: 12.5px; color: var(--t-muted); }
.mr-leer { color: var(--t-muted); font-size: 13.5px; }

/* Einzelansicht */
.mr-back { border: 0; background: none; color: var(--t-muted); font: inherit;
  cursor: pointer; padding: 0 0 10px; }
.mr-back:hover { color: var(--accent); }
.mr-hinweis { border: 1px dashed var(--t-line); border-radius: 10px; padding: 9px 13px;
  margin: 10px 0; font-size: 13px; color: var(--t-muted); }
.mr-meta { display: grid; gap: 3px; margin: 12px 0; }
.mr-z { display: flex; gap: 10px; font-size: 13.2px; align-items: baseline; }
.mr-z > b { flex: 0 0 148px; font-weight: 600; color: var(--t-muted); font-size: 12.2px; }
.mr-sec { margin: 22px 0; }
.mr-sec > h2 { font-size: 14.5px; margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
.mr-summe { font-weight: 400; font-size: 12.5px; color: var(--t-muted); }
.mr-flies { font-size: 13.4px; line-height: 1.55; margin: 0; }
.mr-lz { display: flex; gap: 9px; margin: 6px 0; font-size: 13.2px; line-height: 1.5; }
.mr-grp { flex: 0 0 24px; height: 20px; border-radius: 6px; background: #7a5fbf;
  color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.mr-komp { display: block; font-size: 11.5px; color: var(--t-muted); font-style: normal; margin-top: 2px; }
.mr-schritt { border-left: 2px solid var(--t-line); padding: 7px 0 7px 12px; margin: 8px 0; }
.mr-schritt.res { opacity: .65; }
.mr-ref { border-left-color: #7a5fbf; font-size: 13.2px; }
.mr-ref > span { display: block; color: var(--t-muted); font-size: 12.4px; }
.mr-shead { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.mr-zeit { font-weight: 700; font-size: 12.5px; color: #7a5fbf; }
.mr-phase { font-size: 12.8px; font-weight: 600; }
.mr-soz, .mr-trenn { font-size: 11px; color: var(--t-muted); border: 1px solid var(--t-line);
  border-radius: 999px; padding: 0 7px; }
.mr-sp { font-size: 13px; line-height: 1.5; margin: 2px 0; }
.mr-sp > b { font-size: 11.5px; color: var(--t-muted); margin-right: 6px; font-weight: 600; }
/* Fehlläufe (12.8): gedämpft — die Sparte ist zum Überspringen da,
   solange die Stunde läuft, und zum Finden, wenn sie stockt. */
.mr-fehll { color: var(--t-muted); }
.mr-fehll .mr-fl { display: block; padding-left: 14px; }
.mr-fehll .mr-fl em { font-style: normal; font-weight: 600; }
.mr-fehll .mr-fl em::after { content: ' —'; font-weight: 400; }
.mr-vorschlag { margin-top: 8px; }

/* ---- Modulverweise im Verlaufsplan (js/paketeditor.js) ----
   Eine Karte, die das Modul NENNT statt es zu kopieren; die Schritte
   stehen aufklappbar darunter und sind dort nicht editierbar — geändert
   wird am Modul, abgewichen über `abweichung`. */
.pk-addrow { display: flex; gap: 8px; flex-wrap: wrap; }
.pk-addstep.mod { border-color: #7a5fbf; color: #7a5fbf; }
.pk-modref { border: 1px solid var(--t-line); border-left: 3px solid #7a5fbf;
  border-radius: 10px; margin: 8px 0; overflow: hidden; }
.pk-modref.fehlt { border-left-color: #c62828; }
.pk-mhead { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.pk-mhead:hover { background: color-mix(in srgb, #7a5fbf 6%, transparent); }
.pk-mico { color: #7a5fbf; font-size: 15px; }
.pk-mmain { min-width: 0; flex: 1 1 auto; }
.pk-mtitel { display: block; font-weight: 640; font-size: 13.6px; }
.pk-mung { font-style: italic; font-weight: 400; font-size: 11.5px; color: var(--t-muted); }
.pk-msub { display: block; font-size: 12.2px; color: var(--t-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-mzeit { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--t-muted); }
.pk-mzeit input { width: 54px; }
.pk-mchev { color: var(--t-muted); transition: transform .15s; }
.pk-modref.open .pk-mchev { transform: rotate(90deg); }
.pk-mneu { font-size: 12.2px; padding: 5px 12px; color: var(--t-muted);
  border-top: 1px dashed var(--t-line); }
.pk-mlink { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.pk-mbody { display: none; padding: 2px 12px 10px 34px; }
.pk-modref.open .pk-mbody { display: block; }
.pk-mstep { display: flex; gap: 9px; font-size: 12.6px; padding: 3px 0; align-items: baseline; }
.pk-mzt { flex: 0 0 30px; color: #7a5fbf; font-weight: 700; }
.pk-mph { flex: 0 0 108px; font-weight: 600; }
.pk-mimp { color: var(--t-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Auswahl-Dialog */
.pk-mwahl { max-width: 880px; width: 92vw; }
.pk-mwrest { font-size: 12.5px; color: var(--t-muted); }
.pk-mwtools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.pk-mwtools input[type=text] { flex: 1 1 200px; border: 1px solid var(--t-line);
  border-radius: 999px; padding: 5px 12px; background: transparent; color: inherit; font: inherit; }
.pk-mwtools label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.8px; color: var(--t-muted); }
.pk-mwhint { font-size: 12.2px; color: var(--t-muted); font-style: italic; }
.pk-mwgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  max-height: 46vh; overflow: auto; }
.pk-mwcard { display: block; text-align: left; border: 1px solid var(--t-line); border-radius: 10px;
  padding: 9px 12px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.pk-mwcard:hover { border-color: #7a5fbf; }
.pk-mwcard.blass { opacity: .6; }
.pk-mwcard.blass:hover { opacity: 1; }
.pk-mwmin { float: right; color: var(--t-muted); font-size: 12px; }
.pk-mwkurz { display: block; font-size: 12.2px; color: var(--t-muted); margin-top: 3px; }
.pk-mwsec { margin: 14px 0 6px; padding-top: 10px; border-top: 1px solid var(--t-line); font-size: 13px; }
.pk-mwlade { color: var(--t-muted); font-size: 13px; }
/* Klassenprofil in der Modulwahl: die Zeile sagt, wonach geordnet wurde,
   die Marke an der Karte, warum DIESES Modul dort steht (D4). Die Marke
   trägt die Farbe der Richtung — üben ist keine Warnung, sondern ein
   Auftrag, deshalb dieselbe ruhige Tinte wie „trägt". */
.pk-mwprnote { margin: 8px 0 2px; font-size: 12.4px; color: var(--t-muted); line-height: 1.5; }
.pk-mwprnote b { color: inherit; font-weight: 600; }
.pk-mwpr { display: block; margin-top: 6px; font-size: 11.8px; font-weight: 600;
  color: var(--t-muted); }
/* Die Gegenstimme steht als zweite Marke darunter, leiser: sie erklärt,
   warum das Etikett darüber nicht die ganze Wahrheit ist (D8). */
.pk-mwpr + .pk-mwpr { margin-top: 2px; font-weight: 500; opacity: .8; }
.pk-mwpr.p-tragen, .pk-mwpr.p-mitnehmen { color: #2f7d5c; }
.pk-mwpr.p-ueben { color: #7a5fbf; }
.pk-mwpr.p-seltener { color: var(--t-muted); font-weight: 500; }
.pk-mwpr.voll { font-weight: 500; font-style: italic; }

/* ---- Medien am Schritt (js/medien.js) ---- */
.pk-medien { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pk-medchip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px;
  border: 1px solid var(--t-line); border-radius: 999px; padding: 2px 4px 2px 9px; }
.pk-medx { border: 0; background: none; color: var(--t-muted); cursor: pointer; font-size: 11px; padding: 0 3px; }
.pk-medadd { border: 1px dashed var(--t-line); background: none; color: var(--t-muted);
  border-radius: 999px; padding: 2px 9px; font-size: 11.5px; cursor: pointer; }
.pk-medadd:hover { border-color: var(--accent); color: var(--accent); }
.pk-medlink { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pk-medlink input { flex: 1 1 200px; border: 1px solid var(--t-line); border-radius: 8px;
  padding: 6px 10px; background: transparent; color: inherit; font: inherit; }
.ur-medien { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ur-medbtn { border: 1px solid var(--t-line); border-radius: 999px; padding: 5px 13px;
  background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.ur-medbtn:hover { border-color: var(--accent); color: var(--accent); }
/* Öffnen und Verteilen sind ZWEI Handlungen, aber EIN Gegenstand: die
   beiden Knöpfe sitzen als Paar in einer Pille, getrennt nur durch die
   Fuge. Zwei freistehende Pillen ließen offen, welcher QR zu welchem
   Medium gehört, sobald ein Schritt drei davon trägt. */
.ur-medpaar { display: inline-flex; }
.ur-medpaar .ur-medbtn { border-radius: 999px 0 0 999px; border-right: none; }
.ur-qrbtn { border: 1px solid var(--t-line); border-radius: 0 999px 999px 0;
  padding: 5px 10px 5px 8px; background: transparent; color: inherit; font: inherit;
  font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; }
.ur-qrbtn:hover { border-color: var(--accent); color: var(--accent); }
.ur-qrbtn[disabled] { opacity: .55; cursor: default; }
/* ⚠️ Der Nachbar muss MITfärben, sonst leuchtet eine halbe Pille. */
.ur-medpaar:hover .ur-medbtn, .ur-medpaar:hover .ur-qrbtn { border-color: var(--accent); }

/* ---- Rückkanal: die eine Frage nach der Stunde (Kontrakt §7) ---- */
.ur-mfrage { margin-bottom: 14px; }
.ur-mfz { display: flex; align-items: center; gap: 10px; margin: 5px 0; font-size: 13.2px; }
.ur-mfz > span:first-child { flex: 1 1 auto; }
.ur-skala4 { display: inline-flex; gap: 3px; }
.ur-sdot { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--t-line);
  background: transparent; color: var(--t-muted); font: inherit; font-size: 12px; cursor: pointer; }
.ur-sdot.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }

/* Formularfelder brauchen eine sichtbare Kante: der Modul-Editor ist
   die formularlastigste Ansicht der App, und --t-line allein
   verschwindet dort fast. */
.me-root { --me-kante: color-mix(in srgb, currentColor 22%, transparent); }
.me-sleft input, .me-sbody textarea, .me-sfoot input[type=text],
.me-grid input, .me-grid select, .me-lz input[type=text], .me-ana, .me-ovcard > input {
  border-color: var(--me-kante) !important;
}

/* ---- Modul-Editor (js/moduleditor.js) ----
   Bewusst die Formensprache des Paketeditors: ein Modul-Baustein IST
   ein Schritt dort, also soll die Karte nicht zweimal gelernt werden. */
.me-root { height: 100%; overflow: auto; }
.me-wrap { max-width: 980px; margin: 0 auto; padding: 20px 26px 80px; }
.me-flex { flex: 1 1 auto; }
.me-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.me-back { border: 0; background: none; color: var(--t-muted); font: inherit; cursor: pointer; padding: 0; }
.me-back:hover { color: var(--accent); }
.me-btn { border: 1px solid var(--t-line); border-radius: 999px; padding: 5px 14px;
  background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.me-btn.prim { background: #7a5fbf; border-color: #7a5fbf; color: #fff; }
.me-hinweis { border: 1px dashed var(--t-line); border-radius: 10px; padding: 9px 13px;
  font-size: 12.8px; color: var(--t-muted); margin-bottom: 12px; }
.me-titel { width: 100%; border: 0; border-bottom: 2px solid var(--t-line); background: none;
  color: inherit; font: 700 24px/1.25 inherit; padding: 4px 0; margin-bottom: 6px; }
.me-kurz { width: 100%; border: 0; border-bottom: 1px solid var(--t-line); background: none;
  color: var(--t-muted); font: inherit; font-size: 14px; padding: 4px 0; margin-bottom: 18px; }
.me-titel:focus, .me-kurz:focus { outline: none; border-bottom-color: #7a5fbf; }
.me-sec { margin: 22px 0; }
.me-sec > h2 { font-size: 14.5px; margin: 0 0 9px; display: flex; align-items: baseline; gap: 8px; }
.me-summe { font-weight: 400; font-size: 12.5px; color: var(--t-muted); }
.me-note { font-size: 12.5px; color: var(--t-muted); margin: 0 0 8px; }
.me-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.me-grid label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--t-muted); }
.me-grid input, .me-grid select { border: 1px solid var(--t-line); border-radius: 8px;
  padding: 4px 8px; background: transparent; color: inherit; font: inherit; font-size: 13px; }
.me-grid input[type=number] { width: 62px; }
.me-krow { display: flex; gap: 10px; align-items: flex-start; margin: 7px 0; }
.me-lab { flex: 0 0 128px; font-size: 12px; color: var(--t-muted); padding-top: 4px; }
.me-chip { border: 1px solid var(--t-line); background: transparent; color: inherit;
  border-radius: 999px; padding: 3px 11px; font-size: 12.3px; cursor: pointer; margin: 0 3px 3px 0; }
.me-chip.on { background: #7a5fbf; border-color: #7a5fbf; color: #fff; }
.me-kchips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.me-kchip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.2px;
  border: 1px solid var(--t-line); border-radius: 999px; padding: 2px 4px 2px 10px; }
.me-kchip button { border: 0; background: none; color: var(--t-muted); cursor: pointer; padding: 0 3px; }
.me-kadd { border: 1px dashed var(--t-line); background: none; color: var(--t-muted);
  border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.me-kadd:hover { border-color: #7a5fbf; color: #7a5fbf; }
.me-lz { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.me-lz input[type=text] { flex: 1 1 auto; border: 1px solid var(--t-line); border-radius: 8px;
  padding: 6px 10px; background: transparent; color: inherit; font: inherit; font-size: 13.2px; }
.me-grp { display: inline-flex; gap: 2px; }
.me-gb { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--t-line);
  background: transparent; color: var(--t-muted); font: inherit; font-size: 11.5px; cursor: pointer; }
.me-gb.on { background: #7a5fbf; border-color: #7a5fbf; color: #fff; }
.me-add { border: 1px dashed var(--t-line); background: none; color: var(--t-muted);
  border-radius: 10px; padding: 7px 0; width: 100%; cursor: pointer; font: inherit; font-size: 13px; }
.me-add:hover { border-color: #7a5fbf; color: #7a5fbf; }
.me-step { border: 1px solid var(--t-line); border-left: 3px solid #7a5fbf; border-radius: 10px;
  padding: 10px 12px; margin: 8px 0; display: flex; gap: 14px; flex-wrap: wrap; }
.me-ref { align-items: center; gap: 8px; }
.me-refi { color: #7a5fbf; }
.me-sleft { display: flex; flex-direction: column; gap: 7px; flex: 0 0 168px; }
.me-sleft label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--t-muted); }
.me-sleft input { border: 1px solid var(--t-line); border-radius: 7px; padding: 4px 8px;
  background: transparent; color: inherit; font: inherit; font-size: 13px; }
.me-soz { display: flex; gap: 2px; }
.me-sozb { border: 1px solid var(--t-line); background: transparent; color: var(--t-muted);
  border-radius: 6px; padding: 2px 5px; font-size: 11px; cursor: pointer; }
.me-sozb.on { background: #7a5fbf; border-color: #7a5fbf; color: #fff; }
.me-sbody { flex: 1 1 380px; min-width: 0; }
.me-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me-lane { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 3px; }
.me-lane.g { color: #1f9e6a; }
.me-sbody textarea { width: 100%; min-height: 62px; border: 1px solid var(--t-line);
  border-radius: 8px; padding: 6px 9px; background: transparent; color: inherit;
  font: inherit; font-size: 13px; resize: vertical; }
.me-sfoot { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 8px; }
.me-sfoot input[type=text] { flex: 1 1 140px; border: 1px solid var(--t-line); border-radius: 7px;
  padding: 4px 8px; background: transparent; color: inherit; font: inherit; font-size: 12.5px; }
.me-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--t-muted); }
.me-x { border: 0; background: none; color: var(--t-muted); cursor: pointer; font-size: 13px; }
.me-x:hover { color: #c62828; }
.me-ana { width: 100%; border: 1px solid var(--t-line); border-radius: 10px; padding: 9px 12px;
  background: transparent; color: inherit; font: inherit; font-size: 13.3px; line-height: 1.5; resize: vertical; }
/* Der Prüflauf: unten, meldend, nie rot als Ampel oben */
.me-pruef { border: 1px solid var(--t-line); border-radius: 10px; padding: 10px 14px;
  margin-top: 22px; font-size: 13px; color: var(--t-muted); }
.me-pruef.ok { color: #1f9e6a; }
.me-pruef.hart { border-color: color-mix(in srgb, #c62828 40%, var(--t-line)); }
.me-pruef ul { margin: 6px 0 0 18px; padding: 0; }
.me-pruef li { margin: 3px 0; }
/* Kompetenz-Wähler */
.me-ov { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: grid;
  place-items: center; z-index: 60; padding: 20px; }
/* `display: grid` schlägt sonst das hidden-Attribut — die Fläche läge
   dauerhaft über der Seite */
.me-ov[hidden] { display: none; }
.me-ovcard { background: var(--chrome, #fff); color: var(--chrome-ink, inherit);
  border-radius: 14px; padding: 16px 18px; width: min(680px, 94vw); max-height: 80vh;
  display: flex; flex-direction: column; gap: 10px; }
.me-ovhead { display: flex; align-items: center; gap: 10px; }
.me-ovcard > input { border: 1px solid var(--t-line); border-radius: 999px; padding: 6px 14px;
  background: transparent; color: inherit; font: inherit; }
.me-klist { overflow: auto; display: grid; gap: 5px; }
.me-kitem { text-align: left; border: 1px solid var(--t-line); border-radius: 9px;
  padding: 7px 11px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.me-kitem:hover { border-color: #7a5fbf; }
.me-kitem > b { display: block; font-size: 13.2px; }
.me-kitem > span { display: block; font-size: 11.2px; color: var(--t-muted); }
.me-kitem > i { display: block; font-size: 12.2px; color: var(--t-muted); font-style: normal; margin-top: 2px; }
/* Modul-Raum: Neu-Knopf und Kopfzeile der Einzelansicht */
.mr-neu { margin-left: 10px; border: 1px solid #7a5fbf; color: #7a5fbf; background: transparent;
  border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.mr-lesehead { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.mr-flex { flex: 1 1 auto; }
.mr-btn { border: 1px solid var(--t-line); border-radius: 999px; padding: 4px 13px;
  background: transparent; color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.mr-btn:hover { border-color: #7a5fbf; color: #7a5fbf; }
.mr-mark { font-size: 12px; font-style: normal; color: #7a5fbf; font-weight: 400; }

/* ---- Vorschlagsassistenz (js/modulraum.js) ----
   Zwei bis drei Wege NEBENEINANDER, keine Empfehlung, kein Score. */
.vz-form { border: 1px solid var(--t-line); border-radius: 12px; padding: 14px 16px; margin: 14px 0 20px; }
.vz-zeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0; }
.vz-lab { font-size: 12px; color: var(--t-muted); }
.vz-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1 1 300px; }
.vz-zeile input[type=number] { width: 68px; border: 1px solid var(--t-line); border-radius: 8px;
  padding: 4px 8px; background: transparent; color: inherit; font: inherit; }
.vz-chips select { border: 1px dashed var(--t-line); border-radius: 999px; padding: 3px 10px;
  background: transparent; color: var(--t-muted); font: inherit; font-size: 12.5px; }
.vz-note { font-size: 12.2px; color: var(--t-muted); margin: 6px 0 0; }
.vz-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  /* ein einzelner Weg soll nicht über die ganze Breite laufen */
  max-width: 1100px; }
.vz-grid:has(> .vz-karte:only-child) { grid-template-columns: minmax(290px, 520px); }
.vz-eng { font-size: 12.5px; color: var(--t-muted); margin: 10px 0 0; max-width: 520px; }
/* Fehlender Zwischenstand (knuepftAn, E). Kein Fehlerrot: es ist eine
   AUSKUNFT, keine Fehlfunktion — und `ohne` sagt, wie die Stunde
   trotzdem geht. Deshalb der ruhige Rahmen und der Quereinstieg
   abgesetzt darunter. */
.vz-anschluss { margin: 14px 0 0; max-width: 620px; border: 1px solid var(--t-line);
  border-left: 3px solid var(--t-muted); border-radius: 10px; padding: 10px 13px;
  background: color-mix(in srgb, var(--t-muted) 5%, transparent); }
.vz-anschluss > b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.vz-anschluss-z { font-size: 12.5px; margin: 7px 0 0; line-height: 1.45; }
.vz-anschluss-was { color: var(--t-muted); font-style: italic; }
.vz-anschluss-ohne { display: block; margin-top: 4px; }
.vz-karte { border: 1px solid var(--t-line); border-radius: 12px; padding: 13px 15px;
  display: flex; flex-direction: column; gap: 8px; }
.vz-kopf { display: flex; align-items: baseline; gap: 8px; }
.vz-min { margin-left: auto; font-size: 12.5px; color: var(--t-muted); }
.vz-balken { height: 5px; border-radius: 3px; background: var(--t-line); overflow: hidden; }
.vz-balken > i { display: block; height: 100%; background: #7a5fbf; }
/* Stundenverlauf: vier Abschnitte, Breite = Zeitanteil. Ein leerer
 * Abschnitt bleibt SICHTBAR leer (gestrichelt) — er ist die Auskunft. */
.vz-verlauf { display: flex; gap: 3px; margin: 8px 0 2px; }
/* ⚠️ `min-width: max-content`: die Breite folgt dem ZEITANTEIL, aber
 * nie unter die Beschriftung — mit `min-width: 0` stand am schmalen
 * Rand „Ankomm…" und „Absc…", und ein Abschnitt, den man nicht lesen
 * kann, sagt nichts (im Bild gefunden, wie schon bei den Treffern in K3). */
.vz-vphase { min-width: max-content; display: flex; flex-direction: column; gap: 1px;
  padding: 5px 8px; border-radius: 8px;
  background: color-mix(in srgb, #7a5fbf 11%, transparent);
  border: 1px solid color-mix(in srgb, #7a5fbf 22%, transparent); }
.vz-vphase b { font-size: 10.5px; font-weight: 700; color: #4a3d6b; white-space: nowrap; }
.vz-vphase small { font-size: 10px; color: #827e76; }
.vz-vphase.leer { background: none; border-style: dashed; border-color: var(--t-line); }
.vz-vphase.leer b { color: #a29c92; }
.vz-luecke { margin-top: 4px; font-size: 11.5px; color: #9a6b1f; }
.vz-liste { list-style: none; margin: 0; padding: 0; }
.vz-liste li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding: 3px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--t-line) 55%, transparent); }
.vz-liste li.blass { opacity: .62; }
/* Umbau (12.11): eine Zwischenzeile OHNE Trennlinie und eingerückt wie
   die Modulzeit — sie ist kein Modul, sondern was zwischen zweien
   passiert. Gedämpft, weil sie eine Nebenkosten-Auskunft ist. */
.vz-umbauzeile { border-bottom: none !important; font-size: 12px; color: var(--t-muted);
  gap: 5px !important; padding: 4px 0 1px !important; align-items: center !important; }
.vz-umbauzeile svg { opacity: .75; }
.vz-umbau { font-style: normal; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: color-mix(in srgb, #7a5fbf 14%, transparent); color: #7a5fbf; font-size: 11.5px; }
.vz-zeit { flex: 0 0 30px; color: #7a5fbf; font-weight: 700; font-size: 12px; }
.vz-mtitel { flex: 1 1 auto; }
.vz-art { font-size: 11px; color: var(--t-muted); }
.vz-fuss { font-size: 12px; color: var(--t-muted); display: grid; gap: 3px; }
.vz-offen { color: color-mix(in srgb, #c62828 65%, var(--t-muted)); }
.vz-ung { font-style: italic; }
.vz-take { margin-top: auto; }
.mr-btn.prim { background: #7a5fbf; border-color: #7a5fbf; color: #fff; }

/* ---- Lektionen: Raum (js/kursraum.js) + Editor (js/lektionseditor.js) ----
   Farbe kommt aus der Raumrolle (--lza), nicht aus einer festen Zahl —
   der Raum färbt sich, die Bausteine folgen. Fassung 3 des
   Design-Leitbilds: kein Papier, Linien statt gefüllter Zeichen. */
.kr-root { height: 100%; overflow: auto; }
.kr-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 26px 60px; }
/* umbricht wie `.mr-head` — „＋ Neuer Kurs" lag auf 390 px bei
   l=308 r=424, also 34 px außerhalb des Fensters */
.kr-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.kr-head > div:first-child { flex: 1; min-width: 240px; }
.kr-h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.kr-sub { margin: 4px 0 0; color: var(--t-muted); font-size: 13.5px; }
.kr-weg, .le-weg { margin-left: auto; align-self: center; font-size: 12px; white-space: nowrap;
  border: 1px solid var(--t-line); border-radius: 999px; padding: 3px 11px; color: var(--t-muted); }
.kr-weg-repo, .le-weg-repo { border-color: var(--lza, #1898a8); color: var(--lza, #1898a8); }
.kr-weg-keiner, .le-weg-keiner { font-style: italic; }
.kr-neu { border: 1px solid var(--lza, #1898a8); color: var(--lza, #1898a8); background: transparent;
  border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; cursor: pointer;
  align-self: center; white-space: nowrap; }
.kr-neu:disabled { opacity: .45; cursor: default; }
.kr-hinweis { border: 1px dashed var(--t-line); border-radius: 10px; padding: 9px 13px;
  font-size: 13px; color: var(--t-muted); margin: 0 0 18px; }
.kr-grp { margin-bottom: 26px; }
.kr-ghead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--t-line); padding-bottom: 5px; }
.kr-ghead > b { font-size: 14px; }
.kr-ghead > span { font-size: 12.5px; color: var(--t-muted); }
.kr-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.kr-card { display: flex; flex-direction: column; gap: 5px; text-align: left; cursor: pointer;
  border: 1px solid var(--t-line); border-radius: 12px; padding: 12px 14px;
  background: var(--chrome); color: inherit; font: inherit; }
.kr-card:hover { border-color: var(--lza, #1898a8); }
.kr-ctop { display: flex; align-items: baseline; gap: 8px; }
.kr-titel { font-weight: 650; font-size: 14.5px; }
/* ⚠️ **Das Kürzel schrumpft NICHT** (v0.512): als gewöhnliches
   Flex-Kind gab es nach, sobald der Titel zwei Zeilen brauchte — aus
   `m5` wurde `m..` („Vom Dreiklang zum vierstimmigen Satz", Lars).
   Ein Kürzel aus zwei Zeichen mit Auslassungspunkten abzukürzen spart
   nichts und nimmt die einzige Auskunft; nachgeben soll der TITEL, und
   der bricht ohnehin um. `max-width` bleibt als Schutz gegen ein
   ungewöhnlich langes Kürzel stehen. */
.kr-id { flex: none; margin-left: auto; color: var(--t-muted); font-size: 12px; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42%; }
.kr-kurz { font-size: 12.8px; color: var(--t-muted); line-height: 1.4; }
.kr-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.kr-tag { font-size: 11px; border: 1px solid var(--t-line); border-radius: 999px; padding: 1px 8px; }
.kr-tag.mut { color: var(--t-muted); }
.kr-tag.eigen { border-color: var(--lza, #1898a8); color: var(--lza, #1898a8); }
.kr-leer, .le-leer { color: var(--t-muted); font-size: 13.5px; margin: 4px 0; }

.le-root { height: 100%; overflow: auto; }
.le-wrap { max-width: 1000px; margin: 0 auto; padding: 20px 26px 90px; }
.le-flex { flex: 1 1 auto; }
.le-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.le-back { border: 0; background: none; color: var(--t-muted); font: inherit; cursor: pointer; padding: 0; }
.le-back:hover { color: var(--lza, #1898a8); }
.le-btn { border: 1px solid var(--t-line); border-radius: 999px; padding: 5px 14px;
  background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.le-btn.prim { background: var(--lza, #1898a8); border-color: var(--lza, #1898a8); color: #fff; }
.le-btn:disabled { opacity: .45; cursor: default; }
.le-titel { width: 100%; border: 0; border-bottom: 2px solid var(--t-line); background: none;
  color: inherit; font: inherit; font-size: 23px; font-weight: 700; padding: 4px 0; }
.le-kurz2 { width: 100%; border: 0; border-bottom: 1px solid var(--t-line); background: none;
  color: var(--t-muted); font: inherit; font-size: 14px; padding: 4px 0; margin-top: 4px; }
.le-titel:focus, .le-kurz2:focus { outline: none; border-bottom-color: var(--lza, #1898a8); }
.le-sec { margin: 24px 0; }
.le-sec > h2 { font-size: 14.5px; margin: 0 0 9px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--t-line); padding-bottom: 5px; }
.le-zahl { font-weight: 400; font-size: 12.5px; color: var(--t-muted); }
.le-note { font-size: 12.5px; color: var(--t-muted); margin: 0 0 8px; }
.le-warn { font-size: 12.5px; color: #b4452a; margin: 6px 0 0; }
.le-grid { display: flex; flex-wrap: wrap; gap: 14px; }

.le-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px;
  color: var(--t-muted); margin: 8px 0; }
.le-f > span { font-size: 11.5px; }
.le-f input, .le-f textarea, .le-f select, .le-crow input, .le-crow select,
.le-lrow input, .le-qrow input, .le-akt input, .le-preset select {
  border: 1px solid var(--t-line); border-radius: 8px; padding: 5px 9px;
  background: var(--chrome); color: var(--t-ink); font: inherit; font-size: 13.2px; }
.le-f textarea { resize: vertical; line-height: 1.5; }
.le-f input:focus, .le-f textarea:focus { outline: 2px solid var(--lza, #1898a8); outline-offset: -1px; }
.le-f input:disabled { opacity: .6; }
.le-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.le-vin { position: relative; display: flex; align-items: center; gap: 6px; }
.le-vin input { flex: 1 1 auto; min-width: 0; }
.le-tot { color: #b4452a; display: inline-flex; flex: none; }

.le-mini { border: 1px solid var(--t-line); border-radius: 999px; padding: 2px 10px;
  background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.le-mini:hover { border-color: var(--lza, #1898a8); color: var(--lza, #1898a8); }
.le-x { border: 0; background: none; color: var(--t-muted); font: inherit; font-size: 13px;
  cursor: pointer; padding: 2px 5px; line-height: 1; }
.le-x:hover { color: #b4452a; }
.le-add { display: block; width: 100%; margin: 10px 0 0; border: 1px dashed var(--t-line);
  border-radius: 10px; padding: 7px; background: transparent; color: var(--t-muted);
  font: inherit; font-size: 13px; cursor: pointer; }
.le-add:hover { border-color: var(--lza, #1898a8); color: var(--lza, #1898a8); }
.le-lrow, .le-qrow { display: flex; gap: 6px; align-items: center; margin: 5px 0; }
.le-lrow input { flex: 1 1 auto; }
.le-qrow input { flex: 1 1 0; min-width: 0; }

.le-lek { border: 1px solid var(--t-line); border-radius: 12px; margin: 8px 0;
  background: var(--chrome); overflow: hidden; }
.le-lek.auf { border-color: var(--lza, #1898a8); }
.le-lhead { display: flex; align-items: center; gap: 9px; padding: 9px 12px; cursor: pointer; }
.le-lhead > b { font-size: 14px; font-weight: 650; }
.le-lnum, .le-snum { flex: none; width: 21px; height: 21px; border-radius: 999px;
  border: 1px solid var(--t-line); display: inline-flex; align-items: center;
  justify-content: center; font-size: 11.5px; color: var(--t-muted); }
.le-lek.auf .le-lnum { border-color: var(--lza, #1898a8); color: var(--lza, #1898a8); }
.le-lmeta, .le-lid { font-size: 11.5px; color: var(--t-muted); }
.le-lid { font-variant-numeric: tabular-nums; }
.le-lbody { padding: 4px 14px 14px; border-top: 1px solid var(--t-line); }

.le-step { border: 1px solid var(--t-line); border-radius: 10px; margin: 9px 0; }
.le-shead { display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-bottom: 1px solid var(--t-line); }
.le-shead select { border: 1px solid var(--t-line); border-radius: 999px; padding: 3px 9px;
  background: transparent; color: inherit; font: inherit; font-size: 12.5px; }
.le-sbody { padding: 2px 12px 12px; }

.le-preset, .le-check { border-top: 1px dashed var(--t-line); margin-top: 10px; padding-top: 9px; }
.le-preset { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.le-plab { font-size: 11.5px; color: var(--t-muted); }
.le-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--t-muted); }
.le-crow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.le-crow input { flex: 1 1 140px; min-width: 0; }
.le-crow input.le-kurz { flex: 0 0 74px; }
.le-aus > span { display: flex; flex-wrap: wrap; gap: 4px; }
.le-chip { border: 1px solid var(--t-line); border-radius: 999px; padding: 1px 9px;
  background: transparent; color: var(--t-muted); font: inherit; font-size: 11px; cursor: pointer; }
.le-chip.on { border-color: var(--lza, #1898a8); color: var(--lza, #1898a8); }

.le-akk { margin-top: 10px; }
.le-akkhead { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.le-akt { width: 100%; border-collapse: collapse; margin-top: 6px; }
.le-akt th { font-size: 11px; color: var(--t-muted); font-weight: 600; text-align: left;
  padding: 0 4px 3px; }
.le-akt td { padding: 2px 4px; }
.le-akt input { width: 100%; box-sizing: border-box; }
/* Takt, Zz, Stufe, Funktion tragen kurze Werte („1", „I", „T") — ohne
   feste Breiten reißt die Tafel auseinander und die Töne stehen verloren */
.le-akt td:nth-child(-n+2) { width: 62px; }
.le-akt td:nth-child(3), .le-akt td:nth-child(4) { width: 96px; }
.le-akt td:last-child { width: 30px; }

.le-vlist { display: grid; gap: 4px; }
.le-vrow { display: flex; align-items: center; gap: 9px; padding: 5px 10px;
  border: 1px solid var(--t-line); border-radius: 9px; font-size: 13px; }
.le-vrow.tot { border-color: #b4452a; }
.le-vname { font-variant-numeric: tabular-nums; }
.le-vherk { margin-left: auto; font-size: 11.5px; color: var(--t-muted); }

/* ---- Bibliotheks-Raum (js/bibliotheksraum.js) ----
   Der Raum baut nichts nach: bibliothek.js und katalog.js hängen ihre
   FERTIGEN Fenster hier ein (setHost). Diese Regeln nehmen ihnen nur
   den Overlay-Charakter — Vorhang, Rand und Schlagschatten. */
.br-root { height: 100%; overflow: hidden; }
.br-wrap { height: 100%; display: flex; flex-direction: column; }
.br-flaeche { flex: 1 1 auto; min-height: 0; position: relative; overflow: auto; }
.br-leer { color: var(--t-muted); font-size: 13.5px; padding: 26px; }

/* eingehängte Bibliothek: aus dem Vorhang in die Fläche */
#bib-pop.bib-inline { position: static; inset: auto; z-index: auto; padding: 0;
  background: none; backdrop-filter: none; display: block; height: 100%; }
#bib-pop.bib-inline .bib-card { width: 100%; height: 100%; border: 0; border-radius: 0;
  box-shadow: none; animation: none; }
/* ⚠️ Die Kopfzeile gehört dem POPUP und fällt im Raum GANZ weg
   (v0.326): dort sagt die Raumleiste, wo man ist, geschlossen wird ein
   Raum nicht, und das Suchfeld ist in die Werkzeugzeile gewandert.
   Dadurch beginnt die Liste der Orte bündig unter der Raum-Kopfzeile —
   genau das, was vorher eine leere Leiste verhinderte (Lars). */
#bib-pop.bib-inline .bib-head { display: none; }

/* Meldezeilen mit Zeichen (v0.282): Whiteboard, Cowork, Video-Sync.
   Rot bleibt Rot — die einzige Farbrolle, die das Leitbild als Ausnahme
   führt, weil ein Fehler als Fehler erkennbar sein muss. */
#wb-status.fehler, #cw-status.fehler, #vs-status.fehler { color: #b4452a; }
#wb-status .ic, #cw-status .ic, #vs-status .ic { vertical-align: -.2em; }
.lx-leerband { font-style: normal; font-size: 10.5px; opacity: .6; margin-left: 5px; }

/* ---- Lehrer-Editor: drei Reiter in der Spalte (v0.283) ----
   Palette · Stimmen · Einstellungen. Vorher war die Spalte eine
   einzige lange Rolle; man kam beim Stempeln nie ohne Scrollen an die
   Stimmen. Orientierung ist MuseScore. */
.se-tabs { display: flex; gap: 2px; margin: 0 0 12px; border-bottom: 1.5px solid var(--t-line); }
.se-tab { flex: 1 1 0; min-width: 0; padding: 9px 4px 10px; margin-bottom: -1.5px; border: 0;
  border-bottom: 2px solid transparent; background: none; color: var(--t-muted); font: inherit;
  font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; transition: color .14s ease, border-color .14s ease; }
.se-tab:hover { color: var(--blau); }
.se-tab.on { color: var(--blau); border-bottom-color: var(--blau); }
.se-pane[hidden] { display: none; }
/* Beim Suchen sind alle Flächen offen — die Reiterleiste sagt es */
.se-col.se-suche .se-tabs { opacity: .45; }

/* Eine Gruppe, die allein in ihrem Reiter steht, trägt ihren Namen
   schon oben — der Kopf schrumpft auf seine Bedienelemente. */
.se-sec.se-solo > summary { padding: 6px 10px 4px; }
.se-sec.se-solo > summary .sdot { display: none; }

/* Die Palette in der Spalte: eine Wand aus Zielen, nicht eine Reihe */
.se-palslot { display: block; }
#palette.se-palcol { position: static; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; transform: none; padding: 2px 0 0; margin: 0;
  border: 0; box-shadow: none; background: none; }
#palette.se-palcol .pal-h { display: block; grid-column: 1 / -1; margin: 8px 0 0;
  font-size: 11px; font-weight: 800; color: var(--t-muted); letter-spacing: .02em; }
#palette.se-palcol .pal-h:first-of-type { margin-top: 0; }
#palette.se-palcol button { width: auto; height: 42px; border: 1.5px solid var(--t-line);
  border-radius: 10px; background: #fff; font-size: 17px; color: var(--t-ink);
  display: flex; align-items: center; justify-content: center; }
#palette.se-palcol button:hover { border-color: var(--blau); color: var(--blau); }
#palette.se-palcol button.on { border-color: var(--blau); background: color-mix(in srgb, var(--blau) 12%, #fff); }
/* Der Griff bleibt: an ihm zieht man die Palette heraus */
body.se-on #palette.se-palcol .pal-grip { grid-column: 1 / -1; width: auto; height: 5px;
  align-self: auto; margin: 0 0 6px; border-radius: 3px; }
.pal-h { display: none; }
.se-palnote { font-size: 12px; color: var(--t-muted); line-height: 1.5; margin: 0 0 10px; }
.se-palnote button { border: 1.5px solid var(--blau); border-radius: 999px; padding: 3px 11px;
  background: none; color: var(--blau); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.se-palhint { font-size: 11.5px; color: var(--t-muted); line-height: 1.5; margin: 14px 0 0; }
.se-mmrow > small { margin-left: auto; font-size: 10.5px; color: var(--t-muted); font-weight: 700; }

/* Einfärbungs-Widget im Lehrer-Editor (js/editor-optionen.js) */
.eo-hlrow { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.eo-hlrow > span:nth-child(2) { flex: 1 1 auto; }
.eo-hladd { display: flex; gap: 5px; align-items: center; margin-top: 8px; }
.eo-hladd select { flex: 1 1 0; min-width: 0; border: 1.5px solid var(--t-line); border-radius: 8px;
  padding: 4px 6px; background: #fff; font: inherit; font-size: 12.5px; }
.eo-hladd button { flex: none; border: 1.5px solid var(--t-line); border-radius: 8px; width: 30px;
  height: 30px; background: #fff; font: inherit; cursor: pointer; }
.eo-hladd button:hover { border-color: var(--blau); color: var(--blau); }
.eo-wz { display: flex; align-items: center; justify-content: center; gap: 7px; }
.eo-scope { display: flex; gap: 8px; }
.eo-scope > label { flex: 1 1 0; min-width: 0; }

/* Suchfeld der Editor-Spalte (v0.289) — vorher stand es in der
   Optionsspalte und wurde adoptiert; die gibt es nicht mehr. */
.se-suchfeld { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0;
  border: 1.5px solid var(--t-line); border-radius: 11px; padding: 6px 10px; background: #fff; }
.se-suchfeld > .ic { color: var(--t-muted); flex: none; }
.se-suchfeld input { flex: 1; min-width: 0; border: 0; outline: none; background: none;
  font: inherit; font-size: 13px; color: var(--t-ink); }
.se-suchfeld button { border: 0; background: none; color: var(--t-muted); cursor: pointer;
  display: inline-flex; padding: 2px; }
.se-suchfeld button:hover { color: var(--blau); }
.se-mmchips .chip { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 2px; }

/* ---------- Rhythmus (js/rhythmus.js) ---------- */
.rh-svg { display: block; margin: 8px auto 4px; max-width: 100%; }
.rh-takt { stroke: var(--ink, #1a1a2b); stroke-width: 1.6; opacity: .55; }
.rh-gl { fill: var(--ink, #1a1a2b); stroke: none; }
.rh-kopf { fill: var(--ink, #1a1a2b); }
.rh-kopf.hohl { fill: none; stroke: var(--ink, #1a1a2b); stroke-width: 1.6; }
.rh-hals, .rh-balken { stroke: var(--ink, #1a1a2b); stroke-width: 1.7; }
.rh-balken { stroke-width: 4.5; stroke-linecap: butt; }
.rh-fahne { fill: none; stroke: var(--ink, #1a1a2b); stroke-width: 1.7; }
.rh-punkt { fill: var(--ink, #1a1a2b); }
.rh-box { fill: rgba(31, 158, 106, .16); stroke: rgba(31, 158, 106, .5); stroke-width: 1.2; }
.rh-silbe { font: 700 13px/1 inherit; fill: var(--ink, #1a1a2b); }
/* Treffer/Fehler wandern auf die Gruppe, nicht auf einzelne Formen */
.rh-wert.hit .rh-gl, .rh-wert.hit .rh-kopf, .rh-wert.hit .rh-box { fill: #2e9e44; }
.rh-wert.hit .rh-box { stroke: #2e9e44; }
.rh-wert.miss .rh-gl, .rh-wert.miss .rh-kopf, .rh-wert.miss .rh-box { fill: #d05252; }
.rh-wert.miss .rh-box { stroke: #d05252; }
.ex-rhybild { margin: 4px 0 2px; }
.ex-rhycount { text-align: center; font-size: 30px; font-weight: 800; min-height: 34px; color: var(--accent, #1f9e6a); }
.ex-tap-neben { opacity: .6; font-size: 14px; padding: 8px 12px; }
/* Tondiktat, Stufe 1: den Rhythmus legen */
/* ⚠️ EIN Takt als Fläche, nicht eine Reihe fester Kästchen: die Werte
   sind so breit, wie sie lang sind, und der Rest bleibt offen. Deshalb
   kein `flex-wrap` — der Takt ist eine Zeile. */
.ex-lege { display: flex; gap: 4px; margin: 10px auto 6px; max-width: 560px; }
.ex-offen { flex: 1; border-style: dashed; opacity: .55; min-width: 0; }
.ex-slot {
  min-width: 0; padding: 11px 4px; border-radius: 9px; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed rgba(0, 0, 0, .22); background: none; color: var(--muted, #7a7a7a);
  cursor: default;
}
.ex-slot.voll {
  border-style: solid; border-color: rgba(31, 158, 106, .55);
  background: rgba(31, 158, 106, .14); color: var(--ink, #1a1a2b); cursor: pointer;
}
/* Der Block, der beim Vorführen der Lösung gerade klingt. Kein
   Aufblitzen, sondern ein Halten: er leuchtet, solange sein Wert dauert
   — die Dauer steht ja in seiner Breite, und beides zusammen ist die
   Auskunft (Tondiktat, hörbare Korrektur seit v0.515). */
.ex-slot.voll.ex-klingt {
  border-color: rgba(31, 158, 106, .95);
  background: rgba(31, 158, 106, .42);
  box-shadow: 0 0 0 3px rgba(31, 158, 106, .18);
}
.ex-vorrat { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 10px; }
.ex-chip {
  min-width: 60px; padding: 12px 12px; border-radius: 9px; font-weight: 700; font-size: 16px;
  border: 1px solid var(--line, #ddd); background: #f4f6fa; cursor: pointer;
}
.ex-chip:hover { background: #e6ecf5; }
/* Fehlersuche: die Taktfläche liegt AUF dem Streifen und wandert mit */
/* Der Gleiter bleibt im FLUSS (nur relativ), sonst fällt die Box auf
   null Höhe und der Streifen verschwindet — er ist der einzige Inhalt.
   Relativ genügt: die Taktflächen brauchen ihn nur als Bezugsrahmen. */
.ex-stripslide { position: relative; will-change: transform; }
.ex-mtag {
  position: absolute; top: 2px; height: 16px; padding: 0;
  font: 700 10px/16px inherit; text-align: center; color: var(--muted, #7a7a7a);
  border: 1px solid rgba(0, 0, 0, .12); border-bottom: none;
  border-radius: 5px 5px 0 0; background: rgba(255, 255, 255, .72);
  cursor: pointer;
}
.ex-mtag:hover { background: #fff; color: var(--ink, #1a1a2b); }
.ex-mtag.now { border-color: var(--accent, #1f9e6a); color: var(--accent, #1f9e6a); }
.ex-mtag.picked { background: var(--accent, #1f9e6a); border-color: var(--accent, #1f9e6a); color: #fff; }
.ex-mtag.was-wrong { background: #d05252; border-color: #d05252; color: #fff; }
.ex-mtag.was-wrong.ok { background: #2e9e44; border-color: #2e9e44; }
/* Melodienquiz: ausbessern statt raten */
.ex-fixrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.ex-fix {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 6px; border-radius: 10px; border: 1.5px solid transparent;
  touch-action: none;
}
.ex-fix.fok { border-color: var(--accent, #1f9e6a); background: rgba(31, 158, 106, .08); }
.ex-fix.geaendert { background: rgba(224, 160, 32, .16); border-color: rgba(224, 160, 32, .55); }
.ex-fixarr {
  border: none; background: none; cursor: pointer; padding: 2px 10px;
  font-size: 12px; color: var(--muted, #7a7a7a); line-height: 1;
}
.ex-fixarr:hover { color: var(--ink, #1a1a2b); }
.ex-fixz { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.ex-fixz b { font-size: 13px; font-weight: 800; }
.ex-fixz .hsign { display: block; }
/* Noteneingabe-Fläche (js/noteneingabe.js) */
.ne-flaeche { max-width: 560px; margin: 8px auto; cursor: crosshair; }
.ne-flaeche svg { display: block; }
.ex-ueb { display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 10px; border-radius: 9px; background: rgba(0,0,0,.05); }
.ex-ueb b { font-size: 17px; font-weight: 800; }
.ex-ueb i { font-size: 11.5px; font-style: normal; color: var(--muted, #7a7a7a); }
/* Der Rahmen schneidet die Seite auf das System zu, OHNE das
   Koordinatensystem des SVG anzutasten — nur so trifft die
   Trefferrechnung weiterhin. */
.ne-rahmen { position: relative; overflow: hidden; width: 100%; }
/* Das „＋" hinter dem letzten Takt hängt an `fullBands` und meint im
   Editor „noch eine Taktreihe" — in einer Übungsfläche gibt es nichts
   anzuhängen, also weg damit. */
.ne-flaeche [data-addbars] { display: none; }


/* ---------- Zeichen + Beschriftung als EINE Einheit (KS.icon.mit) ----------
   Der Abstand ist knapp unter einem halben Geviert: weit genug, dass
   nichts klebt, eng genug, dass beides als ein Ding gelesen wird. Das
   Zeichen sitzt auf Versalhöhe und erbt die Farbe des Textes. */
.ks-ib { display: inline-flex; align-items: center; gap: 0.42em; vertical-align: -0.1em; }
.ks-ib .ic { flex: none; width: 1.15em; height: 1.15em; }
.ks-ib-t { min-width: 0; }

/* ================================================================
   Arbeitsmaterial (js/material.js) — die Blätter zu einem Modul.
   Alles hier ist auf PAPIER hin gebaut: Das Fenster ist die Vorschau
   des Ausdrucks, nicht eine eigene Ansicht. Deshalb weißer Grund und
   schwarze Tinte auch im dunklen Thema — ein Blatt, das am Bildschirm
   hell wirkt und aus dem Drucker dunkel kommt, ist zweimal falsch.
   ================================================================ */
#mt-pop {
  position: fixed; inset: 0; z-index: 2600; display: none;
  background: rgba(0, 0, 0, .55); padding: 24px 16px; overflow: auto;
}
#mt-pop.open { display: block; }
#mt-pop .mt-box {
  max-width: 820px; margin: 0 auto; background: var(--card, #fff);
  border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  overflow: hidden;
}
#mt-pop .mt-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--line, #d8d8d8); background: var(--card, #fff);
  position: sticky; top: 0; z-index: 2;
}
#mt-pop .mt-titel { flex: 1; min-width: 0; font-weight: 600; color: var(--fg); }
#mt-pop .mt-art {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 999px;
  background: var(--accent, #16688f); color: #fff; vertical-align: 1px;
}
#mt-pop .mt-fuer {
  font-size: 12px; font-weight: 500; color: var(--muted, #6b6b6b);
  border: 1px solid var(--line, #d8d8d8); border-radius: 999px; padding: 1px 7px;
}
#mt-pop .mt-akt { display: flex; gap: 6px; flex: none; }
#mt-pop .mt-btn {
  border: 1px solid var(--line, #d8d8d8); background: var(--card, #fff);
  color: var(--fg); border-radius: 7px; padding: 5px 12px; cursor: pointer;
  font: inherit; font-size: 13px;
}
#mt-pop .mt-btn:hover { background: var(--hover, #eee); }
#mt-pop .mt-x { padding: 5px 9px; }

/* Das Blatt selbst — A4-Proportion, feste Tinte.
 * ⚠️⚠️ NICHT auf `#mt-pop` einschränken (seit v0.456). Die FOLIE
 * (`tafelbildSvg`, Vorschlag F) trägt dieselbe Klasse, liegt aber in
 * einem `foreignObject` außerhalb des Fensters — mit der alten
 * Einschränkung bekam sie nur Browser-Vorgaben: h2 21 px statt 15,5,
 * Absatzabstand 14 statt 8 (gemessen). „Eine Quelle, zwei Ausgänge"
 * stimmte damit nur für den INHALT, während der Satz auseinanderlief —
 * genau die Drift, gegen die F gebaut wurde. Wer hier eine Regel
 * ergänzt, ergänzt sie für BEIDE Ausgänge; das ist der Zweck. */
.mt-blatt {
  background: #fff; color: #111; padding: 26px 30px 34px;
  font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14.5px; line-height: 1.55;
}
/* ⚠️ Der Blattfuß gehört zum AUSDRUCK und muss deshalb mitgedruckt
 * werden — er steht innerhalb von `.mt-blatt`, das `body.mt-drucken`
 * als einziges stehen lässt. `break-inside: avoid`, damit er nicht auf
 * zwei Seiten zerfällt. */
.mt-fuss { margin-top: 22px; padding-top: 8px; border-top: 1px solid #ccc;
  font-size: 10.5px; line-height: 1.45; color: #555; break-inside: avoid; }
.mt-fuss b { display: block; font-size: 10.5px; margin-bottom: 2px; color: #333; }
.mt-blatt .mt-h1 { font-size: 20px; margin: 0 0 16px; font-weight: 700; }
.mt-blatt h2 { font-size: 15.5px; margin: 22px 0 8px; font-weight: 700; }
.mt-blatt h3 { font-size: 14.5px; margin: 16px 0 6px; font-weight: 600; }
.mt-blatt p { margin: 8px 0; }
.mt-blatt ul, .mt-blatt ol { margin: 8px 0 8px 22px; }
.mt-blatt li { margin: 3px 0; }
.mt-blatt hr { border: 0; border-top: 1px solid #ccc; margin: 18px 0; }
/* ZITAT (Materialkontrakt §3.2, seit v0.456): eine Äußerung im Wortlaut.
   Abgesetzt und kursiv — es soll als fremde Stimme lesbar sein, nicht
   als Hervorhebung des Blattes. */
.mt-blatt blockquote { margin: 12px 0; padding: 2px 0 2px 14px;
  border-left: 3px solid #bbb; font-style: italic; color: #333; }
#mt-pop .mt-diff {
  margin-top: 20px; padding: 10px 12px; border-left: 3px solid #999;
  background: #f5f5f5; font-size: 13.5px;
}

/* Felder — Platz zum Schreiben (Kontrakt §5). Die Linien sind
   GEZEICHNET, nicht Unterstriche: nur so stimmt der Abstand beim
   Drucken, und ein Fünfliniensystem sieht aus wie eines. */
.mt-feld { margin: 14px 0 22px; }
.mt-feldlbl { font-size: 12.5px; color: #555; margin-bottom: 3px; }
.mt-zeile { position: relative; margin: 0 0 8px; }
.mt-zeile .mt-linie { display: block; border-bottom: 1px solid #333; }
/* ⚠️ Ein Fünfliniensystem ist EIN System mit vier gleichen Zwischen-
   räumen, nicht fünf gestapelte Ränder. `space-between` über eine feste
   Höhe verteilt die fünf Linien exakt — und der Abstand ZWISCHEN zwei
   Systemen muss größer sein als der zwischen zwei Linien, sonst liest
   sich ein Blatt mit vier Systemen wie ein Liniengewirr. */
.mt-zeile-notenzeile {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 48px; margin-bottom: 38px;
}
.mt-zeile-notenzeile .mt-linie { height: 0; border-bottom-color: #222; }
.mt-zeile-dolinie .mt-linie,
.mt-zeile-rhythmuszeile .mt-linie { height: 34px; }
/* Die do-Marke der dolinie (Werkbank-Befund 12.4): links VOR der Linie,
   Grundlinie knapp über der Linie — wie der do-Schriftzug des
   Notenbilds, nur in Druckschwarz. Die Linie beginnt erst nach der
   Marke (padding), damit „do" frei steht wie ein Schlüssel. */
.mt-zeile-dolinie { padding-left: 26px; }
.mt-zeile-dolinie .mt-do {
  position: absolute; left: 2px; bottom: -1px;
  font-size: 13px; font-weight: 700; line-height: 1; color: #222;
}
.mt-zeile-silbenzeile .mt-linie { height: 26px; border-bottom-style: dashed; }
.mt-zeile-textzeile .mt-linie { height: 26px; }
.mt-kasten {
  border: 1px solid #333; border-radius: 3px; height: 62px; margin-bottom: 10px;
}

/* Karten — ein Schnittbogen. Die Schnittlinien sind gestrichelt und
   liegen AUF der Kante, damit man an ihnen schneidet und nicht daneben. */
.mt-karten {
  display: grid; grid-template-columns: repeat(var(--mt-sp, 3), 1fr);
  gap: 0; margin: 14px 0 18px;
}
.mt-karten.mt-schnitt { border: 1px dashed #666; }
.mt-karte {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 86px; padding: 8px 6px; text-align: center;
}
.mt-karten.mt-schnitt .mt-karte { border: 1px dashed #666; margin: -0.5px; }
/* `ausrichtung: "links"` (Werkbank-Befund 12.7): Fallkarten mit
   Absätzen lesen sich zentriert schlecht — der Block bleibt gemeinsam
   eingemittet, nur der TEXT wird linksbündig. */
.mt-karten.mt-links .mt-karte { align-items: flex-start; text-align: left; }
.mt-ktext { font-size: 13px; line-height: 1.3; }
.mt-kwert { display: block; line-height: 0; }
.mt-zeichen .mt-gl { fill: #111; stroke: none; }

/* Diagramme — dieselbe Hülle wie im Wiki, damit ein Blatt und ein
   Artikel dasselbe Bild gleich zeigen. */
.mt-diag { margin: 14px 0; padding: 0; }
.mt-diag .mt-diag-bild:not(:empty) { margin: 0 0 4px; }
.mt-diag .wkd { display: inline-block; vertical-align: top; }
.mt-diag > figcaption { font-size: 12.5px; color: #555; }

/* Drucken: nur das Blatt, ohne Fensterrahmen. */
body.mt-drucken > *:not(#mt-pop) { display: none !important; }
@media print {
  body.mt-drucken #mt-pop {
    position: static; display: block; background: #fff; padding: 0; overflow: visible;
  }
  body.mt-drucken #mt-pop .mt-box {
    max-width: none; margin: 0; box-shadow: none; border-radius: 0;
  }
  body.mt-drucken #mt-pop .mt-head { display: none; }
  body.mt-drucken #mt-pop .mt-blatt { padding: 0; }
  .mt-karte { break-inside: avoid; }
  .mt-feld, .mt-diag { break-inside: avoid; }
}

/* Blätter am Modul (Modulraum) und am Schritt (Unterrichtsraum) */
.mr-blaetter { display: flex; flex-direction: column; gap: 6px; }
.mr-blatt {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--card); color: var(--fg);
  border-radius: 8px; padding: 8px 11px; cursor: pointer; font: inherit;
}
.mr-blatt:hover { background: var(--hover); border-color: var(--accent); }
.mr-blatt .ic { flex: none; color: var(--accent); }
.mr-bt { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; }
.mr-bm { flex: none; font-size: 12px; color: var(--muted); }
.ur-medien.ur-mat { margin-top: 6px; }
.ur-medbtn.ur-fehlt { opacity: .55; text-decoration: line-through; cursor: not-allowed; }

/* ---------- Paketeditor: Klassengruppen (K1b, v0.331) ----------
   Ein Paket ist eine DURCHFÜHRUNG, also werden es viele. Die Übersicht
   gruppiert deshalb nach Klasse statt zu filtern — vier Klassen mit je
   fünf Paketen sind vier Gruppen, nicht zwanzig Karten; und der Stand
   je Gruppe macht den Rückstand sichtbar, wenn eine Klasse gerafft
   werden muss. */
.pk-grp { margin: 0 0 26px; }
.pk-grphead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.pk-grphead h2 { margin: 0; font-size: 16px; font-weight: 700; color: #26241f; }
.pk-grpn { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #f2f0ec; color: #6b665e; font-size: 12px; font-weight: 700; }
/* ⚠️ Der Stand steht NEBEN seiner Überschrift, nicht am Fensterrand:
   mit `margin-left: auto` riss ein kurzer Text („noch nicht gehalten")
   quer über die ganze Breite von seiner Klasse weg. */
.pk-grpstand { font-size: 12.5px; color: #6b665e; }
.pk-grpstand.mut { color: #a29c92; font-style: italic; }
.pk-grpstand i { font-style: normal; color: #c9c4bb; margin: 0 2px; }
/* ⚠️ Kastanie fest wie `.pk-newcard`, NICHT `var(--accent)`: der
   Paketeditor ist nicht akzentgesteuert (`--accent` ist dort das
   globale Blau), und zwei Knöpfe für dieselbe Handlung dürfen nicht
   verschiedene Farben haben. */
.pk-grpneu { margin-left: auto; width: 26px; height: 26px; flex: none; display: flex; align-items: center; justify-content: center; border: 1.4px dashed color-mix(in srgb, #c65089 42%, #e0ddd8); border-radius: 9px; background: none; color: #c65089; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; transition: background .14s ease, border-color .14s ease; }
.pk-grpneu:hover { background: color-mix(in srgb, #c65089 9%, #fff); border-style: solid; }

/* Übernehmen für eine Parallelklasse + Herkunft der Kopie */
.pk-vorlagerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 13px; border-top: 1px solid #f0eeea; }
.pk-herkunft { font-size: 12.5px; color: #6b665e; }
.pk-klwrap { position: relative; margin-left: auto; }
.pk-klpop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 13px; background: #fff; border: 1px solid #e6e4df; box-shadow: 0 14px 34px -14px rgba(28,27,24,.45); }
.pk-klpop[hidden] { display: none; }
.pk-klpop button { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 0; border-radius: 9px; background: none; color: #3d3a34; font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer; }
.pk-klpop button:hover { background: color-mix(in srgb, #c65089 10%, #fff); color: #c65089; }
.pk-klleer { margin: 4px 8px; font-size: 12.5px; color: #a29c92; }

/* ---------- Paketeditor: Besetzung eines Modulverweises (K2, v0.332) ----
   Das Modul nennt seinen `stueckbedarf`, die Besetzung nennt das Stück
   fuer DIESE Klasse. Die Plaetze stehen im aufgeklappten Block, ihr
   Stand als Chip in der Kopfzeile — ein offener Platz muss auch bei
   zugeklapptem Block sichtbar offen sein. */
.pk-beschip { flex: none; padding: 3px 9px; border-radius: 9px; background: #f3f1ed; color: #a29c92; font-size: 12px; font-weight: 650; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px dashed #ddd9d2; }
.pk-beschip.voll { background: color-mix(in srgb, #1f9e6a 11%, #fff); color: #147951; border: 1px solid color-mix(in srgb, #1f9e6a 26%, #fff); }
.pk-besetzung { margin: 0 0 10px; padding: 11px 13px; border-radius: 12px; background: color-mix(in srgb, #c65089 4%, #fbfaf8); border: 1px solid #eceae5; }
.pk-beshead { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #6b665e; }
.pk-besbedarf { margin: 4px 0 9px; font-size: 12.5px; line-height: 1.5; color: #827e76; }
.pk-bplatz { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.pk-bnum { flex: none; width: 15px; text-align: center; font-size: 11.5px; font-weight: 700; color: #a29c92; }
.pk-blabel { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: #26241f; }
.pk-blabel i { font-style: normal; font-size: 11.5px; color: #a29c92; }
.pk-bplatz.alt .pk-blabel { color: #a29c92; text-decoration: line-through; }
/* K6: von der App gesetzt. Die Marke ist LEISE — der Platz ist voll und
   soll es aussehen; sie sagt nur, dass hier niemand entschieden hat. */
.pk-bauto { margin-left: 2px; padding: 1px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #3b6ea5) 12%, transparent);
  color: color-mix(in srgb, var(--accent, #3b6ea5) 78%, #26241f); font-size: 11px !important; }
.pk-bwahl { padding: 5px 11px; border: 1.3px dashed color-mix(in srgb, #c65089 38%, #ddd9d2); border-radius: 9px; background: none; color: #c65089; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.pk-bwahl:hover { background: color-mix(in srgb, #c65089 8%, #fff); border-style: solid; }
.pk-mwbedarf { margin: 0 0 4px; padding: 9px 12px; border-radius: 10px; background: #f7f6f3; font-size: 13px; line-height: 1.55; color: #6b665e; }

/* ⚠️ Der Waehler hat seit K2 bis zu DREI Listen (Klassenmaterial,
   eigene Stuecke, Beispiele). Jede trug 46vh, der Dialog deckelt bei
   88vh und hatte selbst keinen Ueberlauf — drei Listen haetten sich
   gegenseitig aus der Karte geschoben. */
.pk-mwahl { overflow-y: auto; }
.pk-mwahl .pk-mwgrid { max-height: 34vh; }

/* K3: das Angebot im Stueckwaehler — Modulvorschlag, dann die Treffer
   an Bedarf UND Klassenstufe, dann die freien Listen. */
.pk-mwvor { margin: 2px 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.55; color: #4a463f; }
.pk-mwvor li { margin: 3px 0; }
.pk-mwvor b { font-weight: 650; }
.pk-mwnosuch { margin: 4px 0 6px; font-size: 12.8px; line-height: 1.55; color: #827e76; font-style: italic; }
.pk-mwsec i { font-style: normal; font-weight: 400; color: #a29c92; }
.pk-mwcard span { display: block; margin-top: 2px; font-size: 11.8px; font-weight: 400; color: #827e76; }
/* Die Trefferliste schrumpft nicht mit — siehe Kommentar in paketeditor.js */
.pk-mwahl .pk-mwtreffer { flex: none; max-height: none; overflow: visible; }

/* K5: Vergleich mit der Parallelklasse — Kompetenz-Differenz und
   Planunterschiede. Uebernommen wird je Zeile, nie von selbst. */
.pk-vgl { max-width: 980px; width: 94vw; overflow-y: auto; }
.pk-vglsub { margin: 3px 0 8px; font-size: 13px; line-height: 1.55; color: #6b665e; }
.pk-vgllist { margin: 0 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.6; color: #4a463f; }
.pk-vgllist li { margin: 3px 0; }
.pk-vgllist span { display: block; font-size: 11.8px; color: #a29c92; }
.pk-vgltab { display: flex; flex-direction: column; gap: 4px; }
.pk-vglrow { display: grid; grid-template-columns: minmax(150px, 1.5fr) 1fr 18px 1fr auto;
  align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #fbfaf8;
  border: 1px solid #eceae5; font-size: 13px; }
.pk-vglwo { display: flex; flex-direction: column; min-width: 0; }
.pk-vglwo b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-vglwo i { font-style: normal; font-size: 11.5px; color: #a29c92; }
.pk-vglmein { color: #a29c92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-vglfremd { color: #26241f; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-vglpfeil { text-align: center; color: #c9c4bb; }
.pk-klpop button i { font-style: normal; color: #a29c92; font-weight: 400; }

/* ⚠️ Der Griff der Raum-Leiste wurde von jedem Editor-Menue verdeckt —
   und ein hoeherer z-index am MENUE half nicht: `#lz-rail` ist
   `position: fixed` mit `z-index: 56` und bildet damit einen
   STAPELKONTEXT; alles darin bleibt auf 56, auch mit 9999. Angehoben
   wird deshalb die LEISTE, und nur solange ihr Menue offen ist. */
/* ⚠️ Seit v0.370 GEGENSTANDSLOS: der Griff hängt am Body und steckt
   nicht mehr im Stapelkontext der Leiste (`#lz-rail`, fixed, z-index 56),
   der jedes `z-index` darin auf 56 deckelte. Die Zeile bleibt als
   Merkposten stehen, weil der Befund selbst weiter gilt. */
/* body.lz-tools-on #lz-rail { z-index: 98; } */
/* ⚠️ Und der eigene Tooltip muss weichen: nach dem Klick bleibt der
   Zeiger auf dem Griff, und „Werkzeuge fuer die Stunde" legte sich
   genau ueber den dritten Eintrag des Menues. */
body.lz-tools-on #lz-toolbtn .lz-tip { display: none; }
/* ⚠️⚠️ **Bei offenem Marken-Menü tritt der Werkzeug-Knopf zurück.**
   `.lz-drop` trägt zwar `z-index: 58` wie `#lz-toolwrap` — aber sie
   liegt IN `#lz-page` (fixed, z-index 55), und das ist ein
   STAPELKONTEXT: die 58 gelten nur darin, nach außen zählt die 55. Der
   Knopf am Body gewinnt deshalb immer und lag im Querformat mitten im
   Menü neben „Abmelden". Ihn wegzunehmen ist der ehrlichere Weg als
   Stapelkontext-Chirurgie: wer das Marken-Menü öffnet, greift gerade
   nicht nach den Werkzeugen. (Dieselbe Falle wie 2026 bei `#lz-rail`,
   siehe die auskommentierte Zeile darüber.) */
body.lz-menu-on #lz-toolwrap { display: none; }

/* ---------- Katalog-Ort: Filterzeile (v0.337) ----------
   Aus dem „Stoebern"-Popup uebernommen: Typ, Stufe, „nur meine",
   Komponisten- und Etiketten-Chips, dazu die beiden Kuratorenwerkzeuge.
   Sie steht NUR im Katalog-Ort und ist sonst leer. */
.bib-katfilter { padding: 0 18px 10px; display: flex; flex-direction: column; gap: 7px; }
.bib-katfilter[hidden] { display: none; }
.bib-kfrow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.bib-kfrow select { border: 1px solid var(--b-line); border-radius: 8px; padding: 5px 9px;
  font: inherit; font-size: 13px; background: #fff; color: inherit; }
.bib-kfchk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--b-muted); }
.bib-kfchips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bib-kfhead { font-size: 12px; font-weight: 700; color: var(--b-muted); margin-right: 2px; }
.bib-kfchip { border: 1px solid var(--b-line); border-radius: 999px; padding: 3px 10px;
  background: #fff; color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.bib-kfchip:hover { border-color: var(--blau); color: var(--blau); }
.bib-kfchip.on { background: var(--blau); border-color: var(--blau); color: #fff; }
.bib-kfchip.mut { color: var(--b-muted); border-style: dashed; }

/* ---- Kuratorenwerkzeuge (docs/kuratorrolle-konzept.md) ----
   ⚠️ Sie sehen ANDERS aus als die übrigen Werkzeuge des Modulraums:
   was hier geschieht, gilt für alle. Ein Block, der sich nicht
   unterscheidet, lädt zum Versehen ein. */
.mr-kurator { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 12px 0; padding: 10px 14px; border: 1px solid #c9a227; border-radius: 10px;
  background: color-mix(in srgb, #c9a227 8%, var(--paper)); font-size: 13px; }
.mr-kurator > b { display: inline-flex; align-items: center; gap: 6px; color: #8a6d0b; }
.mr-kubtns { display: flex; flex-wrap: wrap; gap: 6px; }
.mr-kurator .mr-btn { font-size: 12.5px; padding: 3px 10px; }
.mr-kuweg { opacity: .75; }
.mr-kunote { color: var(--t-muted); font-size: 12.2px; }
.mr-hinweis.mr-zurueck { border-color: #b4451f; color: #8c3517; }
/* Die Beschaffungsliste (K2): sie beschreibt den BESTAND, nicht die
   Arbeit der Lehrkraft — deshalb ruhig und ohne Alarmfarbe. */
.mr-luecken { margin: 10px 0 18px; padding: 12px 14px; border: 1px solid var(--t-line);
  border-radius: 10px; font-size: 13px; }
.mr-luecken > b { display: inline-flex; align-items: center; gap: 6px; }
.mr-luecken p { margin: 4px 0 8px; color: var(--t-muted); font-size: 12.4px; }
.mr-luecken ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mr-lksperrt { display: inline-block; min-width: 26px; font-weight: 700; color: #8a6d0b; }
/* Der Kurator-Knopf im Lektionseditor: dieselbe Tinte wie der Block am
   Modul — was hier geschieht, gilt für alle. */
.le-btn.le-kurator { border-color: #c9a227; color: #8a6d0b; }
.le-btn.le-kurator:hover { background: color-mix(in srgb, #c9a227 12%, var(--paper)); }
/* Einreichen (K6) — an einem Modul, das nur der Lehrkraft gehört. Ruhig:
   es ist ein Angebot, keine Aufforderung. */
.mr-einreich { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 10px 0; padding: 9px 14px; border: 1px dashed var(--t-line);
  border-radius: 10px; font-size: 12.6px; color: var(--t-muted); }
/* Die Sichtungsliste steht ganz oben: sie ist Arbeit, die auf jemanden
   wartet, kein Bestandsteil. */
.mr-sichtung { margin: 10px 0 16px; padding: 12px 14px; border: 1px solid #c9a227;
  border-radius: 10px; background: color-mix(in srgb, #c9a227 8%, var(--paper)); }
.mr-sichtung > b { display: inline-flex; align-items: center; gap: 6px; color: #8a6d0b; }
.mr-srow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px;
  font-size: 13px; }
.mr-stitel { font-weight: 600; }
.mr-sart, .mr-sns { color: var(--t-muted); font-size: 12.2px; }
.mr-srow .mr-btn { font-size: 12.5px; padding: 3px 10px; }
/* Freigabe im Katalog (K3): zwei Knöpfe in der Zeile, weil es dort keine
   Tafel gibt — der Katalog gehört niemandem, es wird nichts markiert. */
.bib-tdrev { white-space: nowrap; text-align: right; }
.bib-tdrev .bib-tb { font-size: 12px; padding: 2px 8px; margin-left: 4px; }
/* Wartet etwas, sagt es das Häkchen — sonst findet die Warteschlange
   niemand, der nicht weiß, dass es sie gibt. */
.bib-kfchk.bib-kfwartet { color: #8a6d0b; font-weight: 600; }
.bib-kfchk.bib-kfwartet b { display: inline-block; min-width: 18px; padding: 0 5px;
  border-radius: 999px; background: #c9a227; color: #fff; font-size: 11.5px; text-align: center; }
/* ⚠️ Die Breite ist GEMESSEN, nicht geschätzt, und sie musste zweimal
   wachsen: „Freigeben"+„Zurückgeben" brauchen 197 px, mit
   „Korrigieren" sind es 291 — und `table-layout: fixed` schneidet
   nicht ab, der letzte Knopf ragte 87 px in die Nachbarzelle. */
.bib-tab col.c-rev { width: 300px; }
/* Korrekturformular im Katalog (K3): eine eigene Zeile IN der Tabelle,
   damit die Nachbarn sichtbar bleiben, mit denen man gerade vergleicht.
   ⚠️⚠️ Das Bibliotheksfenster hat einen EIGENEN Variablensatz
   (`--b-line`, `--b-muted`, gesetzt an `#bib-pop`) — `--t-line`,
   `--t-muted` und `--paper` sind hier NICHT definiert. Wer sie hier
   benutzt, schreibt eine ungültige Deklaration, und die fällt
   stillschweigend auf den Anfangswert zurück: gemessen wurde aus
   `border: 1px solid var(--t-line)` ein `border: none`, die
   Eingabefelder hatten keinen Rahmen. */
.bib-kedrow > td { padding: 0 !important; background: color-mix(in srgb, #c9a227 6%, #fff); }
.bib-kedit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  padding: 10px 14px; }
.bib-kedit label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px;
  color: var(--b-muted); }
.bib-kedit input, .bib-kedit select { border: 1px solid var(--b-line); border-radius: 7px;
  padding: 4px 8px; background: #fff; color: inherit; font: inherit; font-size: 13px; }
.bib-kedit input { min-width: 200px; }
/* ⚠️ KEIN dehnender Zwischenraum: bei 1180 px Breite riss er 600 px
   zwischen Felder und Knöpfe, und die Zeile zerfiel in zwei Hälften. */
.bib-kedflex { flex: 0 0 8px; }
.bib-keddel { color: #b4451f; border-color: #e0b3a3; }
.bib-mk.mk-dopp { background: #f3e4c0; color: #8a6d0b; }
.bib-tdrev .bib-kedbtn { margin-left: 4px; }

/* ---------- Fingerziele: die 22-px-Untergrenze (v0.511) ----------
 * ⚠️⚠️ **Die Fingerregel des Hauses erreichte das TABLET nie.**
 * `button, select { min-height: 40px }` steht unter `max-width: 700px`
 * — das ist das Handy. Das Unterrichtsgerät ist ein iPad mit 768 px
 * und fiel durch; gemessen am 20.08.2026 blieben dort die
 * Auswahlkästchen der Bibliothek bei 13 × 13, das Schließkreuz am
 * Reiter bei 14 × 14, die Zeilen des Export-Dialogs bei 16 px Höhe.
 * Dieselbe Falle wie bei der Bibliothekstabelle in v0.510, nur
 * andersherum: nach dem PLATZ fragt man für das Layout, nach dem
 * ZEIGER für die Fingergröße. Hier zählt der Zeiger.
 *
 * ⚠️ Das ZIEL ist nicht das Bild. Ein Kästchen darf 16 px groß
 * aussehen, wenn die anfassbare Fläche 26 px misst — dafür sind die
 * Umschläge und die negativen Ränder da. Und wo sich ein Ziel
 * nicht groß genug machen LÄSST (die ▲▼ am Zahlenfeld, eingesperrt in
 * eine 27 px hohe Kapsel), fällt es am groben Zeiger weg, statt als
 * größeres Nichtziel stehenzubleiben.
 *
 * ⚠️ `min-height: 0` ist an jedem kleinen Knopf Pflicht — sonst
 * gewinnt auf dem Handy die 40er-Grundregel und macht aus 22 × 22 ein
 * 22 × 40 (dieselbe Falle wie bei `.num-spin` und `#tab-mini`). */

/* Schließkreuz am Reiter des Noteneditors: 14 × 14 gemessen. Die
   negativen Ränder halten die Reiterhöhe, wie es `.ton-x` seit jeher
   vormacht — der Reiter wächst nicht, das Ziel schon. */
.tab button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  min-height: 0;
  padding: 0;
  margin: -3px -5px -3px 0;
}
@media (pointer: coarse) {
  .tab button { width: 30px; height: 30px; margin: -7px -9px -7px -2px; }
}

/* Export-Dialog: die Zeilen waren 16–19 px hoch, der Umschlag ist das
   Ziel (Beschriftung mittreffen ist gewollt — das Kästchen allein
   bleibt 13 px, der Umschlag trägt es). */
#export-dialog .exp-row label { min-height: 26px; }
@media (pointer: coarse) {
  #export-dialog .exp-row label { min-height: 34px; }
}

/* Bibliothek: das Auswahlkästchen einer Zeile sitzt in einem
   Umschlag, der die ganze Zellenbreite trägt (`.bib-hk`, gebaut in
   bibliothek.js). Sichtbar bleibt ein 15er Kästchen. */
.bib-hk {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px; min-height: 26px;
  margin: -4px -6px;
  cursor: pointer;
}
.bib-hk input { width: 15px; height: 15px; margin: 0; }
@media (pointer: coarse) {
  .bib-hk { min-width: 34px; min-height: 34px; margin: -6px -8px; }
  .bib-hk input { width: 18px; height: 18px; }
}

/* ---------- `.mini2` am Finger: 21 px sind kein Ziel (v0.521) ----------
 * ⚠️⚠️ **Zum vierten Mal dieselbe Falle wie in v0.511.** Die
 * Fingerregel des Hauses — `button, select { min-height: 40px }` —
 * steht unter `max-width: 700px`, also am HANDY IM HOCHFORMAT. Überall
 * sonst blieb die Haus-Kleinschaltfläche bei ihren 19–21 px:
 * gemessen am 21.08.2026 mit grobem Zeiger bei 768 × 1024 (iPad),
 * 1024 × 768 und 844 × 390 (Handy quer) — `#lg-check` 138 × 20,
 * `#lx-back` 83 × 20, `#kurs-lx` 153 × 20, `#wz-next` 63 × 20,
 * `#cw-stop` 78 × 19, `#ex-replay` 126 × 21.
 *
 * ⚠️ Der Entscheid vom 20.08.2026 lautete „ja, aber ERST MESSEN: je
 * Stelle prüfen, ob ihre Zeile umbrechen kann". Nachgemessen an 25
 * Schaltflächen in acht Zeilentypen (`.ex-foot`, `.vs-row`, `.lg-kann`,
 * `.kk-ab`, `.ex-quizrow`, `.wb-nav`, `#lx-body`, `<h3>`) — KEINE davon
 * bricht um (alle `flex` ohne `flex-wrap`). Das ist folgenlos, weil die
 * Regel NUR SENKRECHT wirkt: die Polsterung bleibt unangetastet, und
 * gemessen änderte sich keine einzige Breite (83 → 83, 123 → 123,
 * 138 → 138, 153 → 153). Die Zeilen werden 14 px höher, der
 * Seitenüberlauf blieb überall 0.
 *
 * ⚠️ `(min-width: 701px)` ist das GEGENSTÜCK zur Handyregel, kein
 * zweites Maß: unter 701 px gelten schon 40 px, und ein `.mini2`
 * (Klasse) schlüge dort ein `button` (Element) und würde sie auf 34
 * VERKLEINERN. Das Handy im QUERFORMAT ist 844 px breit und fällt
 * deshalb hierher — richtig so, dort war es ebenfalls 20 px.
 *
 * ⚠️ `#wb-pop header button.mini2` (v0.514) bleibt bestehen: dort sind
 * es die Haupthandlungen der Lehrkraft, und die brauchen zusätzlich
 * ihre 40 px BREITE plus die Polsterung. */
@media (pointer: coarse) and (min-width: 701px) {
  button.mini2 { min-height: 34px; min-width: 40px; }
}

/* Die ▲▼ am Zahlenfeld sind 14 × 10 — und hier hilft weder Umschlag
   noch Vergrößern. ⚠️⚠️ **Sie MÜSSEN in die Kapsel passen**, und die
   ist 27 px hoch (`#se-tempo`, nachgemessen): zwei fingergroße Pfeile
   wären 44 px und stünden über und unter dem Feld — genau der Befund
   von Lars vom 02.08.2026, den `min-height: 0` schon einmal beheben
   musste. Zweimal 13 px wiederum ist kein Fingerziel, sondern nur ein
   größeres Nichtziel.
   Der Entscheid vom 03.08.2026 gilt deshalb für den FINGER, nicht bloß
   für das Handy: sie fallen weg. Die Zifferntastatur kommt vom
   `type="number"`, nicht von ihnen, und getippt wird die Zahl ohnehin.
   Am feinen Zeiger bleiben sie — dort sind 14 × 10 ein taugliches
   Mausziel und der schnellste Weg für ±1. */
@media (pointer: coarse) {
  .num-spin { display: none; }
}

/* Fußzeile des Noteneditors: „Problem melden" und „Über · Impressum"
   sind 14 px hohe Textzeilen, die Ansichts-Wahl 18–20 px. Am groben
   Zeiger bekommen sie 26 px — die Zeile wächst dadurch von 30 auf
   36 px. ⚠️ NUR am groben Zeiger: die Breiten der Fußzeile sind auf
   318 px im Hochformat gerechnet (s. infra.md), und mit der Maus ist
   eine Textzeile ein taugliches Ziel. Ihre Höhe ist ein Zugeständnis
   an den Finger, kein besseres Bild. */
@media (pointer: coarse) {
  .statusbar a, .statusbar button, .statusbar select {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
  }
}

/* ---------- Die Nachfragen des Hauses (js/dialoge.js, v0.512) ----------
   Erben die Grundregeln von `dialog` und geben nur dem Feld und der
   Warnfarbe eine Fassung. ⚠️ Die Schrift kommt NICHT von selbst mit:
   ein `<dialog>` hängt am Body, nicht am Raum — in den Lehrer-Räumen
   steht sonst die Kinderschrift der Schüleroberfläche. */
.ks-frage {
  font-family: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--t-ink);
  background: var(--t-panel);
  border-color: var(--t-line);
  border-radius: 16px;
}
.ks-frage h3 { font-size: 15.5px; font-weight: 700; }
.ks-frage .hint { color: var(--t-muted); font-size: 13px; margin: 0 0 4px; line-height: 1.45; }
.ks-frage-feld {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--t-line);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14.5px;
  background: #fff;
  color: inherit;
}
.ks-frage-feld:focus { outline: none; border-color: var(--blau, #1668b3); }
.ks-frage menu button { min-height: 34px; padding: 6px 14px; border-radius: 10px; }
/* Mehrfachwahl (KS.wahl): die Wege stehen untereinander und tragen je
   einen ganzen Satz — nebeneinander wären es Spalten Kleingedrucktes. */
.ks-wahl { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.ks-wahl-weg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--t-line);
  border-radius: 10px;
  background: var(--t-panel);
  color: inherit;
  cursor: pointer;
}
.ks-wahl-weg b { font-size: 14px; font-weight: 600; }
.ks-wahl-weg small { color: var(--t-muted); font-size: 12.5px; line-height: 1.4; }
.ks-wahl-weg:hover { border-color: var(--blau, #1668b3); }
.ks-wahl-weg:focus-visible { outline: 2px solid var(--blau, #1668b3); outline-offset: 1px; }
.ks-wahl-warn { border-color: #a33; }
.ks-wahl-warn b { color: #a33; }
.ks-wahl-warn:hover { border-color: #a33; background: #fff5f5; }
/* ⚠️ Die haftende Knopfzeile (Grundregel `dialog menu`) bringt eine
   Trennkante und die Themenfarbe mit. Die Nachfrage des Hauses ist immer
   kurz — sie rollt nie, also trennt die Kante dort nichts; und ihre
   Fläche ist die weiße `--t-panel`, nicht die des Themas. */
.ks-frage menu { background: var(--t-panel, #fff); border-top: 0; }
.ks-frage-warn { background: #a33; border-color: #a33; color: #fff; }

/* ---------- Texteditor (v0.545, js/textedit.js) ----------
   Die Fläche IST der Artikel: sie erbt die Leseklasse der Umgebung
   (`.lx-text` im Lexikon, `.wr-artikel` im Lehrer-Wikiraum) und bekommt
   hier nur den Rahmen, den ein Eingabefeld braucht. Wer sie umfärbt,
   nimmt ihr genau das, wofür sie gebaut ist. */
.te-wrap { display: flex; flex-direction: column; gap: 6px; }
.te-bar {
  display: flex; flex-wrap: wrap; gap: 3px;
  padding: 3px; border-radius: 10px;
  background: var(--t-bar, #f3f2ef);
  position: sticky; top: 0; z-index: 2;
}
.te-w {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  /* ⚠️ `padding: 0` gehört zum Zeichen im Knopf: die allgemeine
     Knopfregel gibt 5px/11px, davon blieben hier 8 px Inhalt und das
     Zeichen würde heruntergerechnet. */
  padding: 0;
  border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--t-barink, #6e6a62); cursor: pointer;
}
.te-w:hover { background: var(--panel, #fff); color: var(--ink); }
.te-w.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.te-flaeche {
  min-height: 220px; max-height: 52vh; overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r, 14px);
  background: var(--panel, #fff); color: var(--ink);
}
.te-flaeche:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-glow); }
/* Der Platzhalter steht nur, solange NICHTS im Text steht — gemessen
   am serialisierten Text, nicht an `:empty`: contentEditable hält immer
   mindestens einen leeren Absatz, und der ist nie `:empty`. */
.te-flaeche.te-leer::before {
  content: attr(data-platzhalter);
  color: var(--t-muted); pointer-events: none; display: block;
}
.te-flaeche .wk-h { margin: 14px 0 4px; font-size: 15px; }
.te-flaeche .lx-link, .te-flaeche .wr-link, .te-flaeche .wtb-link { cursor: text; }

/* Diagramme sind unteilbare Blöcke: verschieben oder herausnehmen,
   sonst nichts (Entscheid Lars, 25.08.2026). Ihre Leiste erscheint beim
   Überfahren — dauerhaft sichtbar zerschnitte sie den Lesefluss. */
.te-flaeche figure.wk-diag { position: relative; outline: 1px dashed var(--line); border-radius: 8px; }
.te-flaeche figure.wk-diag:hover { outline-color: var(--accent-line); }
/* Die Leiste reitet auf der OBEREN Rahmenkante statt in der Ecke der
   Zeichnung: Diagramme tragen ihre Marken oft genau oben rechts
   („hier Luft holen"), und eine Leiste darüber verdeckte sie. Der Platz
   über der Kante ist frei — `.wk-diag` bringt 12 px Außenabstand mit,
   die Fläche 10 px Polster, zusammen mehr als die halbe Leistenhöhe. */
.te-figbar {
  position: absolute; top: 0; right: 10px; transform: translateY(-55%);
  display: flex; gap: 2px; opacity: 0;
  padding: 2px; border-radius: 8px;
  background: var(--chrome, #fff); border: 1px solid var(--line);
  box-shadow: var(--t-elev);
  transition: opacity .12s;
}
.te-flaeche figure.wk-diag:hover .te-figbar,
.te-figbar:focus-within { opacity: 1; }
.te-figbar button {
  width: 26px; height: 26px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: none;
  color: var(--t-barink, #6e6a62); cursor: pointer;
}
.te-figbar button:hover { background: var(--t-bar); color: var(--ink); }

/* Die Bildunterschrift als editierbare Insel in der unteilbaren Figur
   (nur mit `diag`, s. textedit.js). Sie sieht aus wie die gedruckte
   Unterschrift und zeigt erst am Cursor, dass sie beschreibbar ist. */
.te-flaeche .te-bu { display: inline-block; min-width: 80px; border-radius: 4px; }
.te-flaeche .te-bu:hover { background: var(--accent-soft); cursor: text; }
.te-flaeche .te-bu:focus { outline: 1px solid var(--accent-line); background: var(--accent-soft); }
.te-flaeche .te-bu:empty::before {
  content: attr(data-ph);
  color: var(--t-muted); font-style: italic;
}

/* Sichtung: Diagramm-Änderungen eines Vorschlags, alt neben neu.
   Die Zeichnungen kommen in Naturgröße und schrumpfen in der Zelle —
   das Popup ist 560 px, zwei Spalten teilen sich den Platz. */
.lx-sicht-diag { margin: 6px 0; }
.lx-dgzeile { margin: 4px 0 2px; }
.lx-dgpaar { display: flex; gap: 8px; flex-wrap: wrap; }
.lx-dgpaar > div { flex: 1 1 220px; min-width: 0; }
.lx-dgpaar > div > span { display: block; margin-bottom: 2px; }
.lx-dgpaar svg { max-width: 100%; height: auto; }

/* Marken-Modus am Notenbild (nur mit `diag`): die Köpfe werden
   anklickbar, die Leiste unter der Figur hält die vorhandenen Marken
   als Chips — Klick-Treffsicherheit auf gezeichneten Marken wäre
   Glückssache, die Liste ist ehrlich. */
.te-flaeche figure.te-markmode { outline: 1px solid var(--accent-line); }
.te-flaeche figure.te-markmode [data-uid] { cursor: pointer; }
.te-flaeche figure.te-markmode [data-uid]:hover { opacity: .5; }
.te-figbar button.on { background: var(--accent-soft); color: var(--accent); }
.te-markleiste {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  margin: 4px 6px 6px; padding-top: 4px;
  border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--t-muted);
}
.te-markhint { margin-right: 2px; }
.te-markwarte { color: var(--accent); font-weight: 600; }
.te-markchip {
  padding: 2px 8px; border: 1px solid var(--t-line); border-radius: 999px;
  background: var(--t-paper, #fff); color: var(--t-ink);
  font-size: 12px; cursor: pointer;
}
.te-markchip:hover { border-color: var(--accent-line); background: var(--accent-soft); }

/* Die Verweis-Wahl: getippt wird der TITEL, gespeichert die Kennung —
   eine Artikelkennung weiß keine Lehrkraft auswendig. */
.te-vw input[type="search"] {
  width: 100%; min-height: 38px; padding: 6px 10px;
  border: 1px solid var(--t-line); border-radius: 10px;
  font: inherit; font-size: 14px; background: var(--t-paper, #fff); color: var(--t-ink);
}
.te-vw input[type="search"]:focus { outline: none; border-color: var(--blau, #1668b3); }
.te-vwliste { max-height: 46vh; overflow-y: auto; margin: 6px 0 2px; }
.te-vwtreffer {
  display: block; width: 100%; text-align: left;
  padding: 7px 10px; margin: 0 0 3px;
  border: 1px solid var(--t-line); border-radius: 10px;
  background: var(--t-paper, #fff); color: var(--t-ink); cursor: pointer;
}
.te-vwtreffer:hover { border-color: var(--blau, #1668b3); }
.te-vwtreffer b { display: block; font-size: 14px; }
.te-vwtreffer small { color: var(--t-muted); font-size: 12px; }
