:root {
  --bg: #f6f7f9; --flaeche: #ffffff; --flaeche2: #eef1f5; --text: #1d2330; --leise: #5d6677;
  --linie: #dde2ea; --akzent: #2563eb; --akzent-weich: #e3ecff;
  --gruen: #15803d; --gruen-weich: #dcfce7; --gelb: #a16207; --gelb-weich: #fef3c7;
  --rot: #b91c1c; --rot-weich: #fee2e2; --lila: #6d28d9; --lila-weich: #ede9fe;
  --code: #f1f3f7; --schatten: 0 1px 3px rgba(20,30,50,.08), 0 4px 16px rgba(20,30,50,.05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151c; --flaeche: #1a2029; --flaeche2: #222a35; --text: #e5e9f0; --leise: #9aa4b5;
    --linie: #2e3744; --akzent: #6ea1ff; --akzent-weich: #1c2a45;
    --gruen: #4ade80; --gruen-weich: #12301f; --gelb: #fbbf24; --gelb-weich: #3a2c0c;
    --rot: #f87171; --rot-weich: #3d1717; --lila: #a78bfa; --lila-weich: #2a2145;
    --code: #151a22; --schatten: none;
  }
}
:root[data-theme="dark"] {
  --bg: #11151c; --flaeche: #1a2029; --flaeche2: #222a35; --text: #e5e9f0; --leise: #9aa4b5;
  --linie: #2e3744; --akzent: #6ea1ff; --akzent-weich: #1c2a45;
  --gruen: #4ade80; --gruen-weich: #12301f; --gelb: #fbbf24; --gelb-weich: #3a2c0c;
  --rot: #f87171; --rot-weich: #3d1717; --lila: #a78bfa; --lila-weich: #2a2145;
  --code: #151a22; --schatten: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--akzent); }
h1, h2, h3, h4 { line-height: 1.25; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; }
:not(pre) > code { background: var(--code); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--code); border: 1px solid var(--linie); padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
button, .knopf { font: inherit; cursor: pointer; border: 1px solid var(--linie); background: var(--flaeche);
  color: var(--text); padding: 8px 14px; border-radius: 8px; text-decoration: none; display: inline-block; }
.knopf.primaer, button.primaer { background: var(--akzent); color: #fff; border-color: var(--akzent); }
:root[data-theme="dark"] .knopf.primaer, :root[data-theme="dark"] button.primaer { color: #0b1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .knopf.primaer,
  :root:not([data-theme="light"]) button.primaer { color: #0b1220; } }
input, select { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 8px; padding: 8px 10px; }

/* Kopfzeile */
.kopf { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.logo { font-weight: 700; text-decoration: none; color: var(--text); }
.kopf nav { display: flex; gap: 4px; }
.kopf nav a { text-decoration: none; color: var(--leise); padding: 6px 10px; border-radius: 6px; }
.kopf nav a.aktiv, .kopf nav a:hover { background: var(--akzent-weich); color: var(--akzent); }
.suchfeld { flex: 1; min-width: 140px; max-width: 320px; }
.suchfeld input { width: 100%; padding: 6px 10px; }
.ich { margin-left: auto; color: var(--leise); font-size: .9em; display: flex; align-items: center; gap: 6px; }
.ich span { color: var(--text); font-weight: 600; }
#thema { padding: 2px 8px; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.hinweis { background: var(--rot-weich); color: var(--rot); padding: 10px 14px; border-radius: 8px; }
.leise { color: var(--leise); }
.karte-box { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 18px 20px;
  box-shadow: var(--schatten); }
.raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Login */
.login { max-width: 380px; margin: 10vh auto; }
.login h1 { margin-top: 0; }
.login label { display: block; margin: 12px 0 4px; font-weight: 600; }
.login select, .login input { width: 100%; }
.login button { width: 100%; margin-top: 18px; }

/* Übersicht */
.begruessung { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; }
.begruessung h1 { margin: 0; }
.zahl { font-size: 2em; font-weight: 700; line-height: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.kpis .karte-box { padding: 14px 16px; }
.balken { height: 8px; background: var(--flaeche2); border-radius: 4px; overflow: hidden; display: flex; }
.balken span { display: block; height: 100%; }
.b1 { background: var(--rot); } .b2 { background: var(--gelb); } .b3 { background: #d4a72c; }
.b4 { background: #65a30d; } .b5 { background: var(--gruen); }
.kap-karte h3 { margin: 4px 0 2px; font-size: 1.05em; }
.kap-karte .aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.kap-karte .aktionen .knopf { padding: 6px 10px; font-size: .9em; }
.legende { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8em; color: var(--leise); margin-top: 6px; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
table.gruppe { width: 100%; border-collapse: collapse; }
table.gruppe td, table.gruppe th { padding: 8px 6px; border-bottom: 1px solid var(--linie); text-align: left; }
table.gruppe td.bar { width: 40%; }

/* Skript */
.skript-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; }
.inhaltsverz { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto;
  font-size: .88em; padding-right: 6px; }
.inhaltsverz ul { list-style: none; padding-left: 0; margin: 0; }
.inhaltsverz ul ul { padding-left: 12px; }
.inhaltsverz a { display: block; padding: 3px 8px; border-radius: 6px; color: var(--leise); text-decoration: none; }
.inhaltsverz a:hover, .inhaltsverz a.aktiv { background: var(--akzent-weich); color: var(--akzent); }
.inhaltsverz details summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
article.skript { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px;
  padding: 8px 32px 32px; box-shadow: var(--schatten); }
article.skript h1 { font-size: 1.8em; }
article.skript h2 { margin-top: 2em; padding-top: .4em; border-top: 1px solid var(--linie); }
article.skript h2, article.skript h3 { scroll-margin-top: 76px; }
article.skript :target { animation: blink 1.8s ease-out; border-radius: 6px; }
@keyframes blink { 0% { background: var(--gelb-weich); } 100% { background: transparent; } }
article.skript table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .92em; display: block; overflow-x: auto; }
article.skript th, article.skript td { border: 1px solid var(--linie); padding: 6px 10px; vertical-align: top; text-align: left; }
article.skript th { background: var(--flaeche2); }
.admonition { border-left: 4px solid var(--akzent); background: var(--akzent-weich); padding: 2px 16px 4px;
  border-radius: 0 8px 8px 0; margin: 1.2em 0; }
.admonition-title { font-weight: 700; margin: 10px 0 4px; }
.admonition-title::before { margin-right: 6px; }
.admonition.merke { border-color: var(--gruen); background: var(--gruen-weich); }
.admonition.merke .admonition-title::before { content: "💡"; }
.admonition.beispiel { border-color: var(--akzent); }
.admonition.beispiel .admonition-title::before { content: "🏠"; }
.admonition.achtung { border-color: var(--rot); background: var(--rot-weich); }
.admonition.achtung .admonition-title::before { content: "⚠️"; }
.admonition.frage { border-color: var(--lila); background: var(--lila-weich); }
.admonition.frage .admonition-title::before { content: "❓"; }
.admonition.rechnen { border-color: var(--gelb); background: var(--gelb-weich); }
.admonition.rechnen .admonition-title::before { content: "🧮"; }
.admonition.info .admonition-title::before { content: "ℹ️"; }
figure.folie { margin: 1.4em 0; text-align: center; }
figure.folie img { max-width: 100%; max-height: 420px; border: 1px solid var(--linie); border-radius: 8px; cursor: zoom-in; background: #fff; }
figure.folie figcaption { font-size: .85em; color: var(--leise); margin-top: 4px; }
.quelle { background: var(--flaeche2); padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.kap-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.skript-kopf { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }

/* Lightbox */
#lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.85); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 88vh; background: #fff; border-radius: 6px; }
#lightbox p { color: #eee; margin: 10px 0 0; }

/* Lernen */
.lernen { max-width: 760px; margin: 0 auto; }
.lern-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lern-kopf h1 { margin: 0; font-size: 1.3em; }
.fortschritt { height: 6px; background: var(--flaeche2); border-radius: 3px; margin: 12px 0 20px; overflow: hidden; }
.fortschritt span { display: block; height: 100%; background: var(--akzent); transition: width .3s; }
.lernkarte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; box-shadow: var(--schatten);
  padding: 22px 26px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .8em; }
.marke { background: var(--flaeche2); color: var(--leise); padding: 2px 8px; border-radius: 99px; }
.marke.typ-rechnen { background: var(--gelb-weich); color: var(--gelb); }
.marke.typ-vergleich { background: var(--lila-weich); color: var(--lila); }
.marke.typ-zuordnen { background: var(--akzent-weich); color: var(--akzent); }
.frage { font-size: 1.25em; font-weight: 600; margin: 14px 0 6px; }
.antwort { white-space: pre-line; border-top: 1px dashed var(--linie); margin-top: 16px; padding-top: 14px; }
.kurz { margin-top: 18px; background: var(--gruen-weich); border-left: 4px solid var(--gruen); border-radius: 0 10px 10px 0;
  padding: 12px 16px; }
.kurz h3 { margin: 0 0 4px; font-size: .95em; color: var(--gruen); }
.kurz p { margin: 0 0 10px; }
.vertiefen { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.vertiefen a { font-weight: 600; }
.vertiefen .folie-link img { height: 64px; border: 1px solid var(--linie); border-radius: 6px; vertical-align: middle; background: #fff; }
.bewertung { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.bewertung button { padding: 12px 6px; font-weight: 600; }
.bewertung small { display: block; font-weight: 400; font-size: .75em; color: var(--leise); }
.bewertung .w0 { border-color: var(--rot); color: var(--rot); background: var(--rot-weich); }
.bewertung .w1 { border-color: var(--gelb); color: var(--gelb); background: var(--gelb-weich); }
.bewertung .w2 { border-color: var(--gruen); color: var(--gruen); background: var(--gruen-weich); }
.aufdecken { width: 100%; margin-top: 18px; padding: 12px; }
.tasten { text-align: center; font-size: .8em; color: var(--leise); margin-top: 12px; }
kbd { background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 4px; padding: 0 5px; font-size: .9em; }
.ergebnis { text-align: center; }
.ergebnis .zahlen { display: flex; justify-content: center; gap: 28px; margin: 16px 0; }
.modus-wahl { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.modus-wahl label { cursor: pointer; }
.modus-wahl input { position: absolute; opacity: 0; }
.modus-wahl .karte-box { height: 100%; }
.modus-wahl input:checked + .karte-box { border-color: var(--akzent); outline: 2px solid var(--akzent); }
.modus-wahl input:focus-visible + .karte-box { outline: 2px dashed var(--akzent); }
.formzeile { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin: 20px 0; }
.formzeile label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9em; }

/* Suche, Karten-Liste, Folien */
.treffer { margin: 0 0 14px; }
.treffer h3 { margin: 0 0 2px; font-size: 1em; }
.treffer p { margin: 0; color: var(--leise); font-size: .9em; }
mark { background: var(--gelb-weich); color: inherit; padding: 0 2px; border-radius: 3px; }
.kartenliste details { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.kartenliste summary { cursor: pointer; font-weight: 600; }
.kartenliste .antwort { white-space: pre-line; }
.folien-raster { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.folien-raster figure { margin: 0; }
.folien-raster img { width: 100%; border: 1px solid var(--linie); border-radius: 8px; background: #fff; cursor: zoom-in; }
.folien-raster figcaption { font-size: .8em; color: var(--leise); text-align: center; }
.reiter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.reiter a { text-decoration: none; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--linie); color: var(--leise); }
.reiter a.aktiv { background: var(--akzent); border-color: var(--akzent); color: #fff; }

@media (max-width: 860px) {
  .skript-layout { grid-template-columns: 1fr; }
  .inhaltsverz { position: static; max-height: none; }
  .inhaltsverz details:not([open]) ul { display: none; }
  article.skript { padding: 4px 16px 20px; }
  main { padding: 16px 16px 48px; }
  .kopf { gap: 8px 12px; padding: 8px 16px; }
  .kopf nav { order: 3; width: 100%; overflow-x: auto; }
  .suchfeld { order: 4; max-width: none; }
  .lernkarte { padding: 18px 16px; }
  .bewertung button { padding: 10px 4px; }
}
@media (hover: none) { .bewertung small, .tasten, .aufdecken small { display: none; } }

/* ---------- Handy-Optimierungen ---------- */
.tabbar, .inhalt-knopf { display: none; }
.skript-layout > * { min-width: 0; }
select { max-width: 100%; }
.suche-seite { display: flex; gap: 8px; margin-bottom: 18px; }
.suche-seite input { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  html { scroll-padding-top: 12px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.fokus { padding-bottom: env(safe-area-inset-bottom); }
  .kopf { position: static; flex-wrap: nowrap; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
  .kopf nav, .suchfeld { display: none; }
  .ich { font-size: .85em; white-space: nowrap; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--flaeche);
    border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom); }
  body.fokus .tabbar { display: none; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px;
    font-size: .7em; color: var(--leise); text-decoration: none; }
  .tabbar a span { font-size: 1.5em; line-height: 1.1; filter: grayscale(1); opacity: .7; }
  .tabbar a.aktiv { color: var(--akzent); font-weight: 600; }
  .tabbar a.aktiv span { filter: none; opacity: 1; }
  h1 { font-size: 1.55em; }
  article.skript h1 { font-size: 1.5em; }
  article.skript h2 { font-size: 1.3em; scroll-margin-top: 12px; }
  article.skript h3 { scroll-margin-top: 12px; }
  article.skript { padding: 4px 14px 18px; border-radius: 10px; }
  .admonition { padding: 2px 12px 4px; margin-left: -4px; margin-right: -4px; }
  pre { font-size: .8em; }
  /* breite Tabellen: in sich scrollen, erste Spalte bleibt stehen */
  article.skript table { font-size: .85em; }
  article.skript table th:first-child, article.skript table td:first-child { position: sticky; left: 0; z-index: 1;
    background: var(--flaeche); box-shadow: 1px 0 0 var(--linie); }
  article.skript table th:first-child { background: var(--flaeche2); }
  article.skript th, article.skript td { padding: 6px 8px; min-width: 7.5em; }
  /* Inhaltsverzeichnis als Panel */
  .inhalt-knopf { display: block; position: fixed; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 25;
    border-radius: 99px; padding: 10px 16px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.22);
    background: var(--akzent); color: #fff; border: 0; }
  .inhaltsverz { display: none; }
  .inhaltsverz.offen { display: block; position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: 78vh; height: 78dvh; z-index: 30; max-height: none;
    background: var(--flaeche); border-top: 1px solid var(--linie); border-radius: 16px 16px 0 0; padding: 14px 12px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom)); overflow-y: auto; box-shadow: 0 -10px 40px rgba(0,0,0,.3); font-size: .95em; }
  .inhaltsverz.offen details summary { pointer-events: none; list-style: none; font-size: 1.1em; }
  .inhaltsverz a { padding: 8px 10px; }
  /* Lernen: Bewertung bleibt unten sichtbar */
  .lernen h1 { font-size: 1.1em; }
  .fortschritt { margin: 8px 0 12px; }
  .lernkarte { padding: 16px 16px 0; border-radius: 14px; }
  .lernkarte.ergebnis { padding-bottom: 18px; }
  .frage { font-size: 1.12em; margin-top: 10px; }
  .kurz { padding: 10px 12px; }
  .aufdecken { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); margin-bottom: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
  .bewertung { position: sticky; bottom: 0; background: var(--flaeche); margin: 14px -16px 0; padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linie); border-radius: 0 0 14px 14px; gap: 8px; }
  .bewertung button { padding: 12px 4px; font-size: .92em; }
  .formzeile { flex-direction: column; align-items: stretch; }
  .formzeile button { padding: 12px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis .zahl { font-size: 1.6em; }
  .begruessung .knopf { width: 100%; text-align: center; padding: 12px; }
  .folien-raster { grid-template-columns: 1fr 1fr; gap: 10px; }
  .reiter { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .reiter a { white-space: nowrap; }
  table.gruppe { font-size: .88em; }
  table.gruppe th:nth-child(4), table.gruppe td:nth-child(4) { display: none; }
  #lightbox { padding: 8px; }
}
@media (max-width: 860px) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .inhalt-knopf { color: #0b1220; } }
:root[data-theme="dark"] .inhalt-knopf { color: #0b1220; }
.formzeile label { min-width: 0; max-width: 100%; }
.formzeile select { width: 100%; min-width: 0; }
@media (min-width: 861px) { .formzeile select[name="kapitel"] { width: 420px; } }

.toc-schatten, .toc-zu { display: none; }
@media (max-width: 860px) {
  .toc-schatten.offen { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(0,0,0,.45); }
  .inhaltsverz.offen .toc-zu { display: block; position: absolute; top: 10px; right: 12px; padding: 4px 12px; font-size: 1.1em; }
  .inhaltsverz.offen { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* Abkürzungen: unterstrichen, Erklärung beim Antippen/Überfahren */
article.skript abbr[title] { text-decoration: underline dotted var(--leise); text-underline-offset: 3px; cursor: help; }
#abk-blase { position: absolute; z-index: 60; max-width: min(340px, calc(100vw - 32px)); background: var(--text); color: var(--bg);
  padding: 8px 12px; border-radius: 8px; font-size: .88em; line-height: 1.4; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
#abk-blase[hidden] { display: none; }
#abk-blase b { display: block; margin-bottom: 2px; }
.admonition.vertiefung { border-color: var(--lila); background: var(--flaeche2); }
.admonition.vertiefung .admonition-title::before { content: "🔍"; }

/* Multiple-Choice-Tests */
.mc-optionen { display: grid; gap: 10px; margin: 16px 0 4px; }
.mc-option { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 12px 14px;
  border-radius: 10px; border: 2px solid var(--linie); background: var(--flaeche); line-height: 1.4; }
.mc-option:hover:not(:disabled) { border-color: var(--akzent); }
.mc-taste { flex: none; width: 1.7em; height: 1.7em; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--linie); border-radius: 50%; font-size: .85em; color: var(--leise); }
.mc-option.mehrfach .mc-taste { border-radius: 5px; }
.mc-option.gewaehlt { border-color: var(--akzent); background: var(--akzent-weich); }
.mc-option.gewaehlt .mc-taste { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.mc-option:disabled { cursor: default; color: var(--text); }
.mc-option.soll { border-color: var(--gruen); background: var(--gruen-weich); }
.mc-option.soll .mc-taste { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.mc-option.falsch { border-color: var(--rot); background: var(--rot-weich); }
.mc-option.falsch .mc-taste { background: var(--rot); border-color: var(--rot); color: #fff; }
.mc-option.aus { opacity: .55; }
.mc-urteil { font-weight: 700; margin: 14px 0 0; }
.mc-urteil.ok { color: var(--gruen); } .mc-urteil.nok { color: var(--rot); }
.mc-aktion { display: flex; justify-content: flex-end; margin: 16px 0 18px; }
.mc-aktion button { min-width: 180px; padding: 12px 18px; font-weight: 600; }
.mc-aktion button:disabled { opacity: .45; cursor: not-allowed; }
.mc-aktion small { font-weight: 400; opacity: .75; }
.aktionen-mitte { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.mc-liste { text-align: left; }
.mc-liste h2 { font-size: 1.15em; margin-top: 28px; }
.mc-auswertung { border-left: 4px solid var(--rot); background: var(--flaeche2); border-radius: 0 10px 10px 0; padding: 4px 14px 12px; margin: 12px 0; }
.mc-auswertung.ok { border-color: var(--gruen); }
.mc-afrage { font-weight: 600; }
.mc-auswertung li.soll { color: var(--gruen); } .mc-auswertung li.falsch { color: var(--rot); }
.formzeile .haken { font-weight: 600; }
.formzeile .haken span { display: flex; gap: 6px; align-items: center; }
.formzeile .haken small { font-weight: 400; }
.skript-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .mc-aktion { position: sticky; bottom: 0; background: var(--flaeche); margin: 14px -16px 0; padding: 10px 12px;
    border-top: 1px solid var(--linie); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .mc-aktion button { width: 100%; }
  .mc-aktion small { display: none; }
}
.marke.art-mc { background: var(--lila-weich); color: var(--lila); }
.marke.art-karte { background: var(--gruen-weich); color: var(--gruen); }
.marke[hidden] { display: none; }
#e-mc { margin: 4px 0 10px; font-size: 1.05em; }
.marke.art-erg { background: var(--gelb-weich); color: var(--gelb); }

/* Demo-Modus */
.demo-marke { background: var(--akzent); color: #fff; border-radius: 6px; padding: 1px 8px; font-size: .85em; font-weight: 600; }
.demo-hinweis { background: var(--flaeche2); border: 1px solid var(--linie); padding: 10px 14px; border-radius: 8px; }
.demo-box { margin-top: 16px; }
.demo-box button { width: 100%; }
.kap-karte.gesperrt { opacity: .6; }
.demo-schloss { text-align: center; margin: 24px 0; }
