/* Pult im Browser – Designsystem „Pult“ (Pflaume & Apricot, Systemschrift, 4er-Raster).
   Schrift: 34 · 22 · 17 · 15 · 13 · 12. Radien: Kästchen 9, Knopf 14 (klein 10), Karte 16, Fläche 24. */
:root {
  --ground: #F2F2F7; --card: #FFFFFF; --sidebar: #F6F6F8; --ink: #1C1C1E; --muted: #6B6B73; --line: #E3E3E8;
  --marke: #4A2B5E; --marke-text: #4A2B5E; --marke-soft: #F1EBF4; --on-marke: #FFFFFF; --on-marke-muted: #DCCDE5;
  --akzent: #F2A65A; --on-akzent: #3A1F00; --akzent-soft: #FDEEDF; --akzent-ink: #9A4E0A;
  --ok-bg: #DFF3E5; --ok-ink: #157A3B; --warn-bg: #FBE6E2; --warn-ink: #B5321C;
  --deutsch-bg: #FBE4E6; --deutsch-ink: #B42335; --mathe-bg: #E3EBFD; --mathe-ink: #1D4ED8; --englisch-bg: #DDF1F4; --englisch-ink: #0E6A80;
  --sach-bg: #DFF3E5; --sach-ink: #157A3B; --kunst-bg: #F6E4F7; --kunst-ink: #9A1AA6; --sport-bg: #F7EDD9; --sport-ink: #8F5200;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px;
  color-scheme: light dark;
  --vb-akzent: var(--marke); --vb-sanft: var(--marke-soft); --vb-flaeche: var(--marke);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --ground: #000000; --card: #1C1C1E; --sidebar: #161618; --ink: #F2F2F7; --muted: #A1A1A8; --line: #38383C;
    --marke: #5A3672; --marke-text: #C9A6DB; --marke-soft: #2E2236; --akzent-soft: #3A2A1A; --akzent-ink: #F2B577;
    --ok-bg: #12301E; --ok-ink: #6FD498; --warn-bg: #3A1A16; --warn-ink: #FF8A75;
    --deutsch-bg: #3A1A20; --deutsch-ink: #FF8E9B; --mathe-bg: #18264A; --mathe-ink: #8FB0FF; --englisch-bg: #0F2E34; --englisch-ink: #6FD0E2;
    --sach-bg: #12301E; --sach-ink: #6FD498; --kunst-bg: #351A38; --kunst-ink: #E58BEF; --sport-bg: #33270F; --sport-ink: #F0B860;
  }
}
:root[data-thema="dunkel"] {
  --ground: #000000; --card: #1C1C1E; --sidebar: #161618; --ink: #F2F2F7; --muted: #A1A1A8; --line: #38383C;
  --marke: #5A3672; --marke-text: #C9A6DB; --marke-soft: #2E2236; --akzent-soft: #3A2A1A; --akzent-ink: #F2B577;
  --ok-bg: #12301E; --ok-ink: #6FD498; --warn-bg: #3A1A16; --warn-ink: #FF8A75;
  --deutsch-bg: #3A1A20; --deutsch-ink: #FF8E9B; --mathe-bg: #18264A; --mathe-ink: #8FB0FF; --englisch-bg: #0F2E34; --englisch-ink: #6FD0E2;
  --sach-bg: #12301E; --sach-ink: #6FD498; --kunst-bg: #351A38; --kunst-ink: #E58BEF; --sport-bg: #33270F; --sport-ink: #F0B860;
  color-scheme: dark;
}
:root[data-thema="hell"] { color-scheme: light; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif; background: var(--ground); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--marke-text); text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--marke-text); outline-offset: 2px; }

/* Rahmen */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.seite { align-self: start; background: var(--sidebar); border-right: 1px solid var(--line); padding: var(--s4) 10px; height: 100vh; position: sticky; top: 0; overflow-y: auto; display: flex; flex-direction: column; }
.marke { display: flex; align-items: center; gap: 10px; padding: 0 var(--s2) var(--s4); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.l-flaeche { fill: #EADFF2; } .l-pult { fill: #4A2B5E; } .l-buch { fill: var(--akzent); } .l-ruecken { stroke: #FFFFFF; stroke-width: 1.6; fill: none; }
.abschnitt { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: var(--s2) var(--s2) var(--s1); }
.nav { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 4px var(--s2); border-radius: 8px; color: var(--ink); font-size: 14px; }
.nav a:hover { background: var(--line); }
.nav a.aktiv { background: var(--marke-soft); color: var(--marke-text); font-weight: 600; }
.nav .zahl { margin-left: auto; font-size: 12px; color: var(--muted); }
.konto-unten { margin-top: auto; padding-top: var(--s4); }
.powered { font-size: 12px; color: var(--muted); padding: var(--s2) var(--s2) 0; margin: 0; }
.inhalt { padding: var(--s6) var(--s8) var(--s8); min-width: 0; max-width: 1180px; }
.oben-mobil { display: none; }
.hinweis-band { background: var(--akzent-soft); color: var(--akzent-ink); border-radius: 12px; padding: var(--s2) var(--s3); margin-bottom: var(--s4); font-size: 13px; font-weight: 600; }
.hinweis-band a { color: inherit; text-decoration: underline; }

/* Typo */
.kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 2px; }
h1 { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 17px; line-height: 22px; font-weight: 600; margin: 0 0 var(--s3); }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 var(--s2); }
.unterzeile { color: var(--muted); font-size: 15px; margin: var(--s1) 0 0; max-width: 640px; }
.abschnitt-titel { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 4px var(--s2); }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.abschnitt-kopf .abschnitt-titel { margin-bottom: 0; }
.leise { color: var(--muted); } .klein { font-size: 13px; }
.leer { color: var(--muted); padding: var(--s8) 0; text-align: center; } .leer.gross { font-size: 17px; }

/* Karten und Listen */
.karte { background: var(--card); border-radius: 16px; padding: var(--s4) var(--s4); margin-bottom: var(--s4); display: block; color: var(--ink); }
.karte p { margin: 0 0 var(--s2); }
.liste { background: var(--card); border-radius: 16px; overflow: hidden; margin-bottom: var(--s4); }
.liste.flach { background: none; border-radius: 0; margin: 0 0 var(--s3); }
.zeile { display: flex; align-items: center; gap: var(--s3); min-height: 54px; padding: var(--s2) 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.liste .zeile:last-child, .liste.flach .zeile:last-child { border-bottom: 0; }
.liste.flach .zeile { padding-left: 0; padding-right: 0; }
a.zeile:hover { background: var(--ground); }
.zeile.vorbei .zeile-titel { color: var(--muted); }
.zeile.offen { flex-wrap: wrap; } .zeile.offen > .zeile { width: 100%; padding: 0; border: 0; }
.zeile-text { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.zeile-titel { font-size: 15px; font-weight: 600; }
.zeile-info { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile-info.mehrzeilig { white-space: pre-line; }
.zeile-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s3); }
.kaestchen { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--marke-soft); color: var(--marke-text); }
.kaestchen.klein { width: 20px; height: 20px; flex-basis: 20px; border-radius: 6px; font-size: 11px; }
.f-marke { background: var(--marke-soft); color: var(--marke-text); }
.f-deutsch { background: var(--deutsch-bg); color: var(--deutsch-ink); } .f-mathe { background: var(--mathe-bg); color: var(--mathe-ink); }
.f-englisch { background: var(--englisch-bg); color: var(--englisch-ink); } .f-sach { background: var(--sach-bg); color: var(--sach-ink); }
.f-kunst { background: var(--kunst-bg); color: var(--kunst-ink); } .f-sport { background: var(--sport-bg); color: var(--sport-ink); }
.f-akzent { background: var(--akzent-soft); color: var(--akzent-ink); } .f-ok { background: var(--ok-bg); color: var(--ok-ink); }
.kapsel { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 9px; flex: 0 0 auto; white-space: nowrap; }
.kapsel.ok { background: var(--ok-bg); color: var(--ok-ink); } .kapsel.akzent { background: var(--akzent); color: var(--on-akzent); }
.kapsel.marke { background: var(--marke); color: var(--on-marke); } .kapsel.marke-sanft { background: var(--marke-soft); color: var(--marke-text); }
.kuerzel-kreis { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 16px; background: var(--marke-soft); color: var(--marke-text); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.leer-kreis { background: none; border: 1.5px dashed var(--line); color: var(--muted); }
.chip { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 9px; } .chip.ok { background: var(--ok-bg); color: var(--ok-ink); } .chip.warn { background: var(--warn-bg); color: var(--warn-ink); }

/* Knöpfe und Felder */
.knoepfe { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.knoepfe.trenner { border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s3); }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--marke-soft); color: var(--marke-text); font-size: 15px; font-weight: 600; text-decoration: none; }
.knopf:hover { filter: brightness(0.97); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf.haupt { background: var(--marke); color: var(--on-marke); }
.knopf.klein { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.knopf.gefahr { background: var(--warn-bg); color: var(--warn-ink); }
.knopf.weiss { background: #FFFFFF; color: #4A2B5E; flex: 1 1 0; }
.knopf.durch { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; flex: 1 1 0; }
.pille { border: 0; background: var(--card); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px; font-weight: 600; min-height: 36px; }
.feld { display: flex; flex-direction: column; gap: var(--s1); margin-bottom: var(--s3); min-width: 0; }
.feld-titel { font-size: 13px; font-weight: 600; }
.feld-hinweis { font-size: 12px; color: var(--muted); }
.eingabe { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 10px 12px; font-size: 15px; }
textarea.eingabe { resize: vertical; line-height: 1.4; }
.eingabe.kurz { max-width: 96px; }
.eingabe:focus { outline: 2px solid var(--marke-text); outline-offset: 0; border-color: transparent; }
.schalter-zeile { display: flex; gap: var(--s2); align-items: center; font-size: 14px; margin: 0 0 var(--s3); cursor: pointer; }
.schalter-zeile input { width: 20px; height: 20px; accent-color: var(--marke); margin: 0; flex: 0 0 auto; }
.fehler-text { color: var(--warn-ink); font-size: 13px; margin: 0 0 var(--s2); min-height: 0; }
.fehler-text:empty { display: none; }
.raster-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 var(--s3); }
.formular h2 { margin-bottom: var(--s3); }
.schmal { max-width: 640px; }
.code-gross { font: 600 22px/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; background: var(--marke-soft); color: var(--marke-text); border-radius: 12px; padding: var(--s3) var(--s4); word-break: break-all; }
.datenschutz { display: flex; align-items: center; gap: var(--s2); font-size: 12px; color: var(--muted); margin: 0 4px var(--s4); }
.schluessel-text { font: 600 15px ui-monospace, Menlo, monospace; letter-spacing: .05em; }

/* Heute */
.heute-raster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s6); align-items: start; }
.gleich { background: var(--marke); color: var(--on-marke); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.gleich p { margin: 0; }
.gleich-kopf { display: flex; justify-content: space-between; align-items: center; }
.etikett-hell { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-marke-muted); }
.kapsel-hell { font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.14); border-radius: 999px; padding: 4px 10px; }
.gleich .gross { font-size: 22px; line-height: 28px; font-weight: 700; }
.gleich .hell { color: var(--on-marke-muted); }
.wo-waren-wir { background: rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; line-height: 1.35; }
.notiz-formular { background: var(--card); color: var(--ink); border-radius: 14px; padding: var(--s4); }
.karte:not(.gleich) .notiz-formular { padding: 0; }

/* Klassen */
.raster-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); margin-bottom: var(--s6); align-items: stretch; }
.raster-karten .karte { margin: 0; height: 100%; }
.klassen-karte:hover { box-shadow: 0 0 0 2px var(--marke-soft) inset; }
.klassen-karte h2 { margin-bottom: 2px; }
.zwei-spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.neu-zeile { flex-wrap: wrap; }
.neu-felder { display: flex; gap: var(--s2); flex: 1 1 280px; min-width: 0; }
.neu-felder .eingabe { min-height: 38px; padding: 6px 10px; flex: 1 1 0; min-width: 0; }
.neu-felder .eingabe.kurz { flex: 0 0 76px; }
.neu-felder.breit { width: 100%; flex-basis: 100%; }

/* Stundenplan */
.segment { display: inline-flex; background: var(--card); border-radius: 10px; padding: 2px; }
.segment button { border: 0; background: none; border-radius: 8px; min-height: 32px; padding: 0 14px; font-size: 13px; cursor: pointer; color: var(--muted); }
.segment button.an { background: var(--marke); color: var(--on-marke); font-weight: 600; }
.plan-box { overflow-x: auto; background: var(--card); border-radius: 16px; margin-bottom: var(--s6); }
.plan { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; }
.plan th, .plan td { border-bottom: 1px solid var(--line); vertical-align: top; padding: 6px; }
.plan thead th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 6px; }
.plan tbody th { width: 64px; text-align: left; font-weight: 600; }
.plan .nr { display: block; font-size: 15px; } .plan .zeit { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.plan td { height: 64px; position: relative; }
.plan td.auf { background: var(--marke-soft); }
.stunde { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; border-radius: 9px; padding: 6px 8px; margin-bottom: 4px; cursor: pointer; text-align: left; min-height: 44px; }
.stunde-titel { font-size: 14px; font-weight: 700; } .stunde-info { font-size: 12px; opacity: .85; }
.zelle-plus { width: 100%; min-height: 28px; border: 1.5px dashed transparent; background: none; border-radius: 9px; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; }
.plan td:hover .zelle-plus, .zelle-plus:focus-visible { opacity: 1; border-color: var(--line); }
.plan td:not(:has(.stunde)) .zelle-plus { min-height: 52px; }
.raster-zeiten { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s3); }
.raster-zeile { display: grid; grid-template-columns: 28px 1fr 12px 1fr; gap: var(--s2); align-items: center; }
.raster-zeile .eingabe { min-height: 38px; padding: 6px 10px; }

/* Reiter einer Klasse */
.reiter { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin: 0 0 var(--s4); overflow-x: auto; }
.reiter a { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter a.an { color: var(--marke-text); border-bottom-color: var(--marke-text); }
.rund { width: 34px; height: 34px; border-radius: 17px; border: 0; background: var(--marke-soft); color: var(--marke-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; flex: 0 0 auto; }
.rund:disabled { opacity: .4; cursor: default; } .rund.mini { width: 22px; height: 22px; background: none; color: var(--muted); vertical-align: middle; }
.knopf.akzent-sanft { background: var(--akzent-soft); color: var(--akzent-ink); }
.knopf.aufnahme { background: var(--warn-bg); color: var(--warn-ink); }

/* Sprachnotiz und Beobachtungen */
.sprach-block { background: var(--marke-soft); border-radius: 12px; padding: var(--s3); margin-bottom: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.beob-vorschlag:empty { display: none; }
.beob-zeile { display: grid; grid-template-columns: 20px 32px minmax(80px, 140px) 1fr; gap: var(--s2); align-items: center; margin-top: var(--s2); }
.beob-zeile input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--marke); }
.beob-zeile .eingabe { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.beob-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beob-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ablauf { margin: var(--s2) 0 var(--s3); padding-left: 22px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.ablauf .vorbei { color: var(--muted); text-decoration: line-through; } .ablauf .jetzt { font-weight: 700; color: var(--marke-text); }

/* Notenbuch und Korrektur */
.notentabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.notentabelle th, .notentabelle td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; }
.notentabelle thead th { font-size: 12px; font-weight: 600; color: var(--muted); vertical-align: bottom; }
.notentabelle thead a { color: var(--marke-text); font-weight: 700; display: flex; flex-direction: column; }
.notentabelle .zeit { font-weight: 400; color: var(--muted); font-size: 11px; display: block; }
.notentabelle tbody th { font-weight: 600; display: flex; align-items: center; gap: var(--s2); }
.notentabelle .note { text-align: center; font-variant-numeric: tabular-nums; } .notentabelle .schnitt { font-weight: 700; }
.kuerzel-kreis.klein { width: 26px; height: 26px; flex-basis: 26px; font-size: 10px; }
.korrektur .eingabe { min-height: 34px; padding: 4px 8px; font-size: 14px; }
.korrektur .eingabe.zahl { width: 58px; text-align: center; font-variant-numeric: tabular-nums; }
.korrektur td:last-child .eingabe { min-width: 160px; }
.korrektur-raster { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s4); align-items: start; }
.spiegel-balken { display: flex; gap: 6px; align-items: flex-end; height: 100px; margin-bottom: var(--s2); }
.spiegel-spalte { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; }
.spiegel-saeule { width: 100%; max-width: 26px; background: var(--marke); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.spiegel-zahl, .spiegel-note { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.zeugnis-form { width: 100%; padding: var(--s2) 0 var(--s2); }

/* Archiv */
.krumen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; margin: -12px 0 var(--s3); }
.krumen a { padding: 2px 6px; border-radius: 6px; } .krumen .trenn { color: var(--muted); }
.werkzeug { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.eingabe.suche { width: 220px; min-height: 34px; padding: 4px 10px; font-size: 14px; }
.auswahl-leiste { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; background: var(--marke-soft); border-radius: 12px; padding: 8px 12px; margin-bottom: var(--s3); }
.archiv-spalten { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.baum { background: var(--card); border-radius: 16px; padding: var(--s2) 6px; position: sticky; top: var(--s4); max-height: calc(100vh - 32px); overflow-y: auto; }
.baum .nav { margin: 0; } .baum .nav a { font-size: 13px; min-height: 30px; }
.baum .nav a span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ziel { outline: 2px solid var(--akzent) !important; outline-offset: -2px; background: var(--akzent-soft) !important; }
.ablage { min-height: 300px; border-radius: 16px; transition: background .15s; }
.archiv.drueber .ablage { background: var(--akzent-soft); box-shadow: 0 0 0 2px var(--akzent) inset; }
.leer-ablage { border: 2px dashed var(--line); display: flex; align-items: center; justify-content: center; }
.ablage-hinweis { text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s8); max-width: 420px; }
.ablage-hinweis p { margin: 0; } .ablage-hinweis .zeile-titel { color: var(--ink); }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.kachel { background: var(--card); border-radius: 14px; padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 4px; cursor: default; position: relative; user-select: none; outline: none; }
.kachel:focus-visible { box-shadow: 0 0 0 2px var(--marke-text); }
.kachel.gewaehlt, .zeile.gewaehlt { background: var(--marke-soft); box-shadow: 0 0 0 2px var(--marke-text) inset; }
.kachel-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachel-info { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachel .pruef { position: absolute; top: 12px; right: 12px; font-size: 11px; padding: 2px 7px; }
.bild-knopf { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; width: 100%; border-radius: 10px; }
.bild-knopf.klein { width: 44px; flex: 0 0 44px; }
.vorschau { aspect-ratio: 4 / 3; width: 100%; border-radius: 10px; background: var(--ground); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 0; color: var(--marke-text); }
.bild-knopf.klein .vorschau { aspect-ratio: 1; }
.vorschau img { width: 100%; height: 100%; object-fit: cover; }
.vorschau .typ { font-size: 13px; font-weight: 800; letter-spacing: .04em; padding: 4px 8px; border-radius: 6px; background: var(--card); color: var(--muted); }
.bild-knopf.klein .vorschau .typ { font-size: 9px; padding: 2px 4px; }
.ordner-bild { cursor: pointer; background: var(--marke-soft); }
.typ-arbeitsblatt .typ { color: var(--mathe-ink); } .typ-test .typ { color: var(--deutsch-ink); } .typ-loesung .typ { color: var(--sach-ink); }
.typ-praesentation .typ { color: var(--akzent-ink); } .typ-bild .typ, .typ-video .typ { color: var(--kunst-ink); }
.vorschau.gross { width: 280px; max-width: 80vw; }
.dialog { border: 0; border-radius: 20px; padding: var(--s6); width: min(520px, 92vw); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dialog::backdrop { background: rgba(0, 0, 0, .35); }
.dialog-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s3); } .dialog-kopf h2 { margin: 0; }
.wahl { display: flex; flex-direction: column; gap: var(--s2); margin: var(--s3) 0 var(--s4); }
.wahl-zeile { display: flex; gap: var(--s3); align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.wahl-zeile:has(input:checked) { border-color: var(--marke-text); background: var(--marke-soft); }
.wahl-zeile input { margin-top: 3px; accent-color: var(--marke); } .wahl-zeile > span { display: flex; flex-direction: column; gap: 2px; }
.wahl-zeile .zeile-info { white-space: normal; }
.ordner-wahl { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; margin-bottom: var(--s4); }
.ordner-zeile { display: flex; gap: var(--s2); align-items: center; width: 100%; border: 0; background: none; text-align: left; min-height: 38px; font-size: 14px; color: var(--ink); cursor: pointer; border-bottom: 1px solid var(--line); }
.ordner-zeile.an { background: var(--marke-soft); color: var(--marke-text); font-weight: 600; } .ordner-zeile:disabled { opacity: .35; cursor: default; }
.hochlade-karte { position: fixed; right: 24px; bottom: 24px; width: 320px; background: var(--card); border-radius: 16px; padding: var(--s4); box-shadow: 0 12px 40px rgba(0, 0, 0, .2); z-index: 45; display: flex; flex-direction: column; gap: var(--s2); }
.hochlade-karte p { margin: 0; }
.balken { height: 6px; border-radius: 3px; background: var(--marke-soft); overflow: hidden; } .balken span { display: block; height: 100%; width: 0; background: var(--marke); transition: width .2s; }
.vorschau-ebene { position: fixed; inset: 0; background: rgba(12, 10, 16, .92); z-index: 60; display: flex; flex-direction: column; color: #FFFFFF; outline: none; }
.vorschau-kopf { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 12px 20px; }
.vorschau-kopf h2 { margin: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vorschau-kopf .rund { background: rgba(255, 255, 255, .14); color: #FFFFFF; }
.vorschau-koerper { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 280px; min-height: 0; }
.buehne { display: flex; align-items: center; justify-content: center; padding: var(--s4); min-height: 0; }
.buehne img, .buehne video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.buehne iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: #FFFFFF; }
.buehne .leer { color: rgba(255, 255, 255, .7); }
.text-vorschau { background: #FFFFFF; color: #1C1C1E; width: 100%; height: 100%; overflow: auto; margin: 0; padding: var(--s4); border-radius: 8px; font: 13px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; }
.keine-vorschau { display: flex; flex-direction: column; align-items: center; gap: var(--s3); text-align: center; max-width: 360px; }
.keine-vorschau .leise { color: rgba(255, 255, 255, .7); }
.vorschau-info { background: var(--card); color: var(--ink); padding: var(--s4); overflow-y: auto; }

@media (max-width: 860px) {
  .archiv-spalten, .korrektur-raster, .vorschau-koerper { grid-template-columns: 1fr; }
  .baum { display: none; }
  .kacheln { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .vorschau-info { max-height: 40vh; }
  .eingabe.suche { width: 100%; }
}

/* Meldung */
.meldung { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 50; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.meldung.fehler { background: var(--warn-ink); color: #FFFFFF; }

/* Schmal (iPhone) */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .seite { display: none; position: fixed; inset: 0 30% 0 0; z-index: 40; height: 100%; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .seite.offen { display: flex; }
  .inhalt { padding: var(--s4); }
  .oben-mobil { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s4); }
  .heute-raster, .zwei-spalten { grid-template-columns: 1fr; gap: var(--s4); }
  h1 { font-size: 28px; line-height: 34px; }
  .neu-felder { flex-wrap: wrap; } .neu-felder .eingabe { flex: 1 1 120px; }
}
@media print {
  .seite, .oben-mobil, .knoepfe, .schalter-zeile, .feld, .hinweis-band { display: none !important; }
  .layout { display: block; } .inhalt { padding: 0; }
}
