/* Schrift: Montserrat (SIL Open Font License, liegt in assets/fonts – kein Google-Server) */
@font-face { font-family: 'Montserrat'; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-800-normal.woff2) format('woff2'); }
/* Materialkiste */
:root {
  --text: #1f2933;
  --leise: #616e7c;
  --hinter: #f5f3ee;
  --karte: #ffffff;
  --linie: #e4e0d6;
  --haupt: #2b3fd1;
  --haupt-dunkel: #1f2fa8;
  --navy: #082a49;
  --gold: #f2b705;
  --titel: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ok: #2b8a3e;
  --warn: #e67700;
  --gefahr: #c92a2a;
  --rund: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--hinter); color: var(--text); line-height: 1.45; font-size: 17px; }
a { color: var(--haupt); }
[hidden] { display: none !important; }
main { max-width: 1040px; margin: 0 auto; padding: 20px 16px 48px; }
main.schmal { max-width: 640px; }
.mitte { text-align: center; }
.klein, small { color: var(--leise); font-size: .85em; font-weight: normal; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; }
h1, h2 { line-height: 1.2; font-family: var(--titel); font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.wortmarke { font-family: var(--titel); font-weight: 800; color: var(--navy); letter-spacing: -.01em; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .35em;
  padding: .6em 1.1em; border: 2px solid var(--haupt); border-radius: 10px;
  background: var(--haupt); color: #fff; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.knopf:hover { background: var(--haupt-dunkel); border-color: var(--haupt-dunkel); }
.knopf:focus-visible, input:focus-visible, select:focus-visible, .kachel:focus-visible, .klasse-knopf:focus-visible { outline: 3px solid #fab005; outline-offset: 2px; }
.knopf.hell { background: #fff; color: var(--haupt); }
.knopf.hell:hover { background: #eef4ff; }
.knopf.gefahr { background: #fff; color: var(--gefahr); border-color: #f1b5b5; }
.knopf.gefahr:hover { background: #fff0f0; }
.knopf.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.knopf.klein { padding: .35em .7em; font-size: .85rem; border-radius: 8px; }
.knopf.gross { padding: .8em 1.6em; font-size: 1.05rem; }
.knopf:disabled { opacity: .6; cursor: wait; }
.link-knopf { background: none; border: 0; padding: 0; font: inherit; color: var(--haupt); cursor: pointer; text-decoration: underline; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ================= Schüler-Ansicht ================= */
.schueler { font-size: 19px; }
.kopfzeile { background: #fff; border-bottom: 3px solid var(--linie); padding: 14px 16px; text-align: center; position: relative; }
.kopfzeile h1 { margin: 0; font-size: 1.6rem; }
.zurueck { display: inline-block; margin-bottom: 6px; font-weight: 600; text-decoration: none; font-size: 1rem; }
.auftrag { text-align: center; font-size: 1.3rem; font-weight: 600; margin: 18px 0; }
.klassen { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; max-width: 720px; margin: 0 auto; }
.klasse-knopf {
  display: flex; align-items: center; justify-content: center; min-height: 96px;
  background: #fff; border: 3px solid var(--linie); border-radius: var(--rund);
  font-size: 2rem; font-weight: 800; color: var(--text); text-decoration: none;
  box-shadow: 0 3px 0 var(--linie);
}
.klasse-knopf:hover { border-color: var(--haupt); color: var(--haupt); }
.klasse-knopf.fuer-alle { font-size: 1.3rem; }
.code-eingabe { margin: 40px auto 0; max-width: 420px; text-align: center; color: var(--leise); }
.code-eingabe form { display: flex; gap: 8px; margin-top: 8px; }
.code-eingabe input { flex: 1; font-size: 1.2rem; padding: .5em .7em; border: 2px solid var(--linie); border-radius: 10px; text-transform: lowercase; letter-spacing: .1em; }
.fusszeile { text-align: center; padding: 20px; font-size: .85rem; color: var(--leise); }
.fusszeile a { color: var(--leise); }

.fach-sprung { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 18px; }
.fach-sprung a { display: inline-flex; align-items: center; gap: .4em; padding: .4em .9em; border-radius: 999px; background: #fff; border: 2px solid var(--farbe); color: var(--text); font-weight: 600; text-decoration: none; font-size: 1rem; }
.fach { margin-bottom: 28px; }
.fach h2 { display: flex; align-items: center; gap: .4em; font-size: 1.4rem; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 4px solid var(--farbe); }
.fach-sym { font-size: 1.3em; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.kachel {
  display: flex; align-items: center; gap: 14px; padding: 16px; min-height: 84px;
  background: #fff; border: 2px solid var(--linie); border-left: 10px solid var(--farbe); border-radius: var(--rund);
  color: var(--text); text-decoration: none; box-shadow: 0 2px 0 var(--linie);
}
.kachel:hover { border-color: var(--farbe); }
.kachel-sym { font-size: 2.2rem; line-height: 1; }
.kachel-text { flex: 1; display: flex; flex-direction: column; }
.kachel-text strong { font-size: 1.15rem; }
.kachel-text small { font-size: .9rem; }
.pfeil { font-size: 2rem; color: var(--farbe); font-weight: 700; }
.hinweis-gross { text-align: center; padding: 40px 10px; }
.emoji-gross { font-size: 4rem; }

/* ================= Lehrer-Bereich ================= */
.admin-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; background: var(--navy); color: #fff; border-bottom: 4px solid var(--gold); }
.admin-kopf .marke { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.2rem; }
.admin-kopf .marke .wortmarke { color: #fff; }
.marke-zeichen { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 9px; padding: 3px; }
.admin-kopf .marke small { color: #b6c4d6; }
.admin-kopf nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.admin-kopf nav a, .admin-kopf .link-knopf { color: #d9e2ec; text-decoration: none; font-size: .95rem; }
.admin-kopf nav a:hover, .admin-kopf .link-knopf:hover { color: #fff; text-decoration: underline; }
.admin-kopf form { margin: 0; }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: 20px 22px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.karte h1 { margin-top: 0; font-size: 1.5rem; }
.karte h2 { margin: 0 0 12px; font-size: 1.2rem; }
details.karte > summary { cursor: pointer; list-style: none; }
details.karte > summary::-webkit-details-marker { display: none; }
details.karte > summary h2 { display: inline; margin: 0; }
details.karte > summary::after { content: '▾'; float: right; color: var(--leise); }
details.karte[open] > summary { margin-bottom: 14px; }
details.neu { border: 2px solid #bcd2f7; background: #f7faff; }

label { display: block; margin: 12px 0; font-weight: 600; font-size: .95rem; }
label small { font-weight: normal; }
input[type=text], input:not([type]), input[type=url], input[type=password], input[type=search], select {
  display: block; width: 100%; margin-top: 4px; padding: .6em .75em; font: inherit; font-size: 1rem;
  border: 1.5px solid #cbd2d9; border-radius: 9px; background: #fff; color: var(--text);
}
label.haken { display: flex; align-items: center; gap: .55em; font-weight: normal; }
label.haken input { width: 1.2em; height: 1.2em; margin: 0; }
.zwei, .drei { display: grid; gap: 0 14px; }
.zwei { grid-template-columns: 1fr 1fr; }
.drei { grid-template-columns: 1.2fr .8fr 1.2fr; }
@media (max-width: 640px) { .zwei, .drei { grid-template-columns: 1fr; } }

.umschalter { display: inline-flex; background: #e4ebf5; border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 6px; }
.umschalter label { margin: 0; padding: .45em .9em; border-radius: 7px; cursor: pointer; font-weight: 600; }
.umschalter input { position: absolute; opacity: 0; pointer-events: none; }
.umschalter label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: var(--haupt); }

.ablage { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2.5px dashed #9fb8e0; border-radius: var(--rund); background: #fff; text-align: center; cursor: pointer; }
.ablage.ziehen { background: #e7f0ff; border-color: var(--haupt); }
.ablage input[type=file] { margin-top: 6px; font-size: .95rem; max-width: 100%; }
.auswahl { margin: 0; padding-left: 1.2em; font-size: .9rem; color: var(--leise); }

.meldung { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; background: #ebfbee; color: #1b5e20; border: 1px solid #b2f2bb; }
.meldung.fehler { background: #fff0f0; color: #a51111; border-color: #ffc9c9; }
.meldung.warnung { background: #fff9db; color: #8a5a00; border-color: #ffe066; }

.klassen-liste { display: flex; flex-wrap: wrap; gap: 10px; }
.klassen-eintrag { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; background: var(--hinter); border-radius: 10px; }
.klassen-eintrag strong { min-width: 2.5em; font-size: 1.1rem; }

.filter { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.filter input, .filter select { margin: 0; }
@media (max-width: 760px) { .filter { grid-template-columns: 1fr 1fr; } .filter input { grid-column: 1 / -1; } }
.sammel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: var(--hinter); border-radius: 10px; margin-bottom: 8px; }
.sammel label { margin: 0 6px 0 0; }
#anzahl-gewaehlt { color: var(--leise); font-size: .9rem; margin-right: auto; }

.material-liste { list-style: none; margin: 0; padding: 0; }
.material { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid var(--linie); border-left: 5px solid var(--farbe); scroll-margin-top: 20px; }
.material:target { background: #fffbe6; }
.material > input[type=checkbox] { width: 1.2em; height: 1.2em; flex: none; }
.material .sym { font-size: 1.7rem; flex: none; }
.material .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.material .info strong { font-size: 1.02rem; }
.material .kurzlink { color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material.versteckt { background: repeating-linear-gradient(-45deg, #fafafa, #fafafa 8px, #f3f3f3 8px, #f3f3f3 16px); }
.material.versteckt .info strong, .material.versteckt .sym { opacity: .55; }
.marke-versteckt { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; background: #868e96; color: #fff; padding: 1px 6px; border-radius: 4px; vertical-align: middle; }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: none; max-width: 380px; }
.aktionen form { margin: 0; }
@media (max-width: 760px) { .material { flex-wrap: wrap; } .aktionen { max-width: none; width: 100%; justify-content: flex-start; padding-left: 2.6em; } }

dialog#qr-dialog { border: 0; border-radius: 18px; padding: 22px; width: min(440px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); text-align: center; }
dialog::backdrop { background: rgba(15, 23, 42, .55); }
.qr-kopf { display: flex; align-items: flex-start; gap: 10px; }
.qr-kopf h2 { flex: 1; margin: 0; font-size: 1.2rem; text-align: left; }
.schliessen { background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--leise); }
.qr-gross { margin: 12px auto; width: 280px; max-width: 100%; }
.qr-gross svg, .qr svg { display: block; width: 100%; height: auto; }
#qr-url { display: block; word-break: break-all; color: var(--leise); }
dialog .knopfreihe { justify-content: center; }

/* ================= Druck ================= */
.druck { background: #e9ecef; }
.druck-leiste { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 20px; background: var(--navy); color: #fff; }
.druck-leiste strong { margin-right: auto; }
.umschalter-klein { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.umschalter-klein a { color: #d9e2ec; padding: 4px 10px; border-radius: 6px; text-decoration: none; border: 1px solid #52606d; }
.umschalter-klein a.aktiv { background: #fff; color: #1f2933; }
.blatt { width: 210mm; margin: 20px auto; padding: 10mm; background: #fff; display: grid; gap: 6mm; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.gross .blatt { grid-template-columns: 1fr 1fr; }
.klein .blatt { grid-template-columns: 1fr 1fr 1fr; gap: 5mm; }
.qr-karte { border: 2px dashed #adb5bd; border-radius: 10px; padding: 4mm; display: flex; flex-direction: column; align-items: center; text-align: center; break-inside: avoid; page-break-inside: avoid; border-top: 6mm solid var(--farbe); }
.qr-karte-kopf { display: flex; align-items: center; gap: 2mm; font-size: 15pt; line-height: 1.15; font-family: var(--titel); color: var(--navy); }
.qr-karte-kopf .sym { font-size: 20pt; }
.qr-karte-unter { font-size: 10pt; color: #495057; margin-top: 1mm; }
.qr-karte .qr { width: 50mm; margin: 3mm auto; }
.qr-karte-fuss { font-size: 12pt; font-weight: 700; }
.qr-karte-fuss span { font-weight: normal; margin-left: 2mm; }
.qr-karte-url { font-size: 7.5pt; color: #868e96; word-break: break-all; margin-top: 1mm; }
.klein .qr-karte { padding: 3mm; border-top-width: 4mm; }
.klein .qr-karte-kopf { font-size: 11pt; }
.klein .qr-karte-kopf .sym { font-size: 14pt; }
.klein .qr-karte-unter { font-size: 8pt; }
.klein .qr-karte .qr { width: 36mm; margin: 2mm auto; }
.klein .qr-karte-fuss { font-size: 9.5pt; }
.plakat .blatt { grid-template-columns: 1fr; }
.plakat .qr-karte { border: 0; border-top: 14mm solid var(--farbe); padding: 12mm 10mm; }
.plakat .qr-karte-kopf { font-size: 44pt; font-weight: 800; }
.plakat .qr-karte-kopf .sym { font-size: 44pt; }
.plakat .qr-karte-unter { font-size: 20pt; margin-top: 4mm; }
.plakat .qr-karte .qr { width: 140mm; margin: 8mm auto; }
.plakat .qr-karte-fuss { font-size: 26pt; }
.plakat .qr-karte-url { font-size: 13pt; }

@media print {
  @page { size: A4; margin: 10mm; }
  body, .druck { background: #fff; }
  .nicht-drucken { display: none !important; }
  .blatt { margin: 0; padding: 0; box-shadow: none; width: auto; }
  .qr-karte { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ================= Startseite (Anmeldung) ================= */
.start { background: linear-gradient(160deg, var(--navy) 0%, #12407a 55%, #2b3fd1 100%); min-height: 100vh; }
.start .fusszeile, .start .fusszeile a { color: #c9d6ea; }
.start-mitte { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; max-width: none; }
.start-karte { width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 34px 32px 30px; text-align: center; box-shadow: 0 24px 60px rgba(4, 16, 40, .35); border-top: 6px solid var(--gold); }
.start-karte h1 { margin: 10px 0 20px; font-size: 2.4rem; }
.start-karte form { text-align: left; }
.logo { display: block; }
.start-logo { width: 150px; height: 150px; object-fit: contain; margin: 0 auto; }
.knopf.breit { width: 100%; margin-top: 6px; }
.start-mitte .fusszeile a { color: var(--leise); }
.schueler .start-mitte { min-height: 80vh; }
.logo-feld { display: flex; gap: 16px; align-items: center; margin: 8px 0; }
.logo-vorschau { width: 72px; height: 72px; object-fit: contain; flex: none; border-radius: 12px; }
.logo-feld label { margin: 6px 0; }

/* ---------- Lehrer-Bereich: Kacheln nach Fach ---------- */
#liste.karte { background: transparent; border: 0; box-shadow: none; padding: 0; }
#liste > h2 { font-size: 1.35rem; margin: 6px 0 12px; }
#liste .filter, #liste .sammel { background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: 10px; }
.admin-sprung { justify-content: flex-start; margin: 14px 0 6px; }
.admin-sprung small { color: var(--leise); font-weight: 600; }
.admin-fach { margin-top: 22px; scroll-margin-top: 16px; }
.admin-kacheln { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.m-kachel {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 2px solid var(--linie); border-left: 10px solid var(--farbe);
  border-radius: var(--rund); box-shadow: 0 2px 0 var(--linie); scroll-margin-top: 20px;
}
.m-kachel:hover { border-color: var(--farbe); }
.m-kachel:target { box-shadow: 0 0 0 4px #ffe066; }
.m-wahl { position: absolute; top: 8px; right: 8px; margin: 0; padding: 6px; cursor: pointer; line-height: 0; }
.m-wahl input { width: 1.25em; height: 1.25em; margin: 0; cursor: pointer; }
.m-oben { display: flex; align-items: center; gap: 14px; padding: 16px 44px 8px 16px; color: var(--text); text-decoration: none; }
.m-oben .kachel-sym { font-size: 2.3rem; }
.m-oben strong { font-size: 1.08rem; line-height: 1.25; }
.m-oben small { font-size: .88rem; }
.m-oben:hover strong { text-decoration: underline; }
.m-marken { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 16px 10px; font-size: .8rem; color: var(--leise); }
.m-marken > span + span:not(.marke-versteckt)::before { content: '·'; margin-right: 6px; }
.m-marken .marke-klasse + span::before, .m-marken .marke-versteckt + span::before { content: none !important; }
.marke-klasse { background: var(--farbe); color: var(--schrift, #fff); font-weight: 700; padding: 2px 9px; border-radius: 999px; font-size: .78rem; }
.m-aktionen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding: 10px 12px; border-top: 1px dashed var(--linie); background: #fbfaf7; border-radius: 0 0 calc(var(--rund) - 2px) 0; }
.m-aktionen form { margin: 0; }
.m-aktionen .knopf { min-height: 34px; }
.m-kachel.versteckt { background: repeating-linear-gradient(-45deg, #fafafa, #fafafa 8px, #f2f2f2 8px, #f2f2f2 16px); border-left-style: dashed; }
.m-kachel.versteckt .m-oben { opacity: .6; }
.m-kachel:has(.m-wahl input:checked) { border-color: var(--haupt); box-shadow: 0 0 0 3px #bcd2f7; }
.material.m-kachel { align-items: stretch; gap: 0; padding: 0; border-bottom: 2px solid var(--linie); }
.material.m-kachel:hover { border-color: var(--farbe); }
.material.m-kachel:hover { border-left-color: var(--farbe); }
.m-kachel:has(.m-wahl input:checked) { border-color: var(--haupt) var(--haupt) var(--haupt) var(--farbe); }

/* Fach-Icons aus Canva */
.fach-icon { width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: -0.25em; display: inline-block; }
.fach h2 .fach-icon { width: 1.6em; height: 1.6em; }
.fach-sprung .fach-icon { width: 1.3em; height: 1.3em; }

/* ================= Vollbild- und Dunkelmodus-Knöpfe ================= */
.ansicht-knoepfe { display: inline-flex; gap: 6px; align-items: center; }
.ansicht-knopf {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1.5px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08);
  color: #fff; cursor: pointer; padding: 0;
}
.ansicht-knopf:hover { background: rgba(255,255,255,.2); border-color: #fff; }
.ansicht-knopf:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ansicht-knopf svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ansicht-knopf .i-klein, .ansicht-knopf .i-sonne { display: none; }
.ansicht-knopf.ist-an .i-klein, .ansicht-knopf.ist-an .i-sonne { display: block; }
.ansicht-knopf.ist-an .i-voll, .ansicht-knopf.ist-an .i-mond { display: none; }
.ansicht-knopf[data-dunkel].ist-an { color: var(--gold); }
.ansicht-ecke { position: fixed; top: 14px; right: 14px; z-index: 5; }

/* ================= Dunkelmodus ================= */
:root[data-theme=dark] {
  color-scheme: dark;
  --text: #e6ebf2;
  --leise: #9fadc0;
  --hinter: #0e1726;
  --karte: #172235;
  --linie: #2a3a52;
  --navy: #dbe6f5;
  --haupt: #5b6cf0;
  --haupt-dunkel: #7a88f5;
}
:root[data-theme=dark] body { background: var(--hinter); color: var(--text); }
:root[data-theme=dark] a { color: #9fb2ff; }
:root[data-theme=dark] .admin-kopf, :root[data-theme=dark] .druck-leiste { background: #07111f; }
:root[data-theme=dark] .marke-zeichen { background: #fff; }
:root[data-theme=dark] .start { background: linear-gradient(160deg, #050c18 0%, #0b1d38 60%, #17246b 100%); }
:root[data-theme=dark] .start-karte,
:root[data-theme=dark] .karte,
:root[data-theme=dark] .kachel,
:root[data-theme=dark] .klasse-knopf,
:root[data-theme=dark] .m-kachel,
:root[data-theme=dark] #liste .filter,
:root[data-theme=dark] #liste .sammel,
:root[data-theme=dark] .fach-sprung a,
:root[data-theme=dark] .kopfzeile,
:root[data-theme=dark] .ablage,
:root[data-theme=dark] dialog#qr-dialog { background: var(--karte); color: var(--text); border-color: var(--linie); }
:root[data-theme=dark] .start-karte { border-top-color: var(--gold); }
:root[data-theme=dark] .m-kachel, :root[data-theme=dark] .kachel { border-left-color: var(--farbe); box-shadow: 0 2px 0 #0a1220; }
:root[data-theme=dark] .m-oben, :root[data-theme=dark] .kachel { color: var(--text); }
:root[data-theme=dark] .m-aktionen { background: #121c2d; border-top-color: var(--linie); }
:root[data-theme=dark] details.neu { background: #15213a; border-color: #2f4170; }
:root[data-theme=dark] input:not([type=checkbox]):not([type=radio]):not([type=file]),
:root[data-theme=dark] select { background: #0f1828; color: var(--text); border-color: #34476a; }
:root[data-theme=dark] input::placeholder { color: #71839c; }
:root[data-theme=dark] .knopf.hell { background: transparent; color: #b8c4ff; border-color: #5b6cf0; }
:root[data-theme=dark] .knopf.hell:hover { background: #1d2a4a; }
:root[data-theme=dark] .knopf.gefahr { background: transparent; color: #ff8a8a; border-color: #7a3535; }
:root[data-theme=dark] .knopf.gefahr:hover { background: #2a1717; }
:root[data-theme=dark] .umschalter { background: #0f1828; }
:root[data-theme=dark] .umschalter label:has(input:checked) { background: var(--karte); color: #b8c4ff; }
:root[data-theme=dark] .klassen-eintrag { background: #0f1828; }
:root[data-theme=dark] .m-kachel.versteckt { background: repeating-linear-gradient(-45deg, #172235, #172235 8px, #1c2940 8px, #1c2940 16px); }
:root[data-theme=dark] .meldung { background: #10301a; color: #b2f2bb; border-color: #2b6a3a; }
:root[data-theme=dark] .meldung.fehler { background: #3a1414; color: #ffc9c9; border-color: #7a2d2d; }
:root[data-theme=dark] .meldung.warnung { background: #3a2f0a; color: #ffe8a3; border-color: #7a6320; }
:root[data-theme=dark] .fach h2 { color: var(--text); }
:root[data-theme=dark] .fach-icon { filter: drop-shadow(0 0 1px rgba(255,255,255,.35)); }
:root[data-theme=dark] .start-logo, :root[data-theme=dark] .logo-vorschau { background: #fff; border-radius: 22px; padding: 8px; }
:root[data-theme=dark] .druck { background: #0e1726; }
:root[data-theme=dark] .admin-kopf nav a { color: #d9e2ec; }
@media print { :root[data-theme=dark] body { background: #fff; color: #000; } }

.wortmarke .strich { color: var(--gold); }
.marke-zeichen { background: #fff; }
