/* Senatola – Stil der Website. Farben als Variablen, dunkler Modus unten. */

:root {
  --grund: #f6f2ea;
  --flaeche: #fffcf6;
  --flaeche-2: #f0eadf;
  --text: #22292b;
  --leise: #5f6b6b;
  --rand: #e2d9ca;
  --akzent: #2c6e67;
  --akzent-stark: #1f544e;
  --akzent-hell: #e1eeea;
  --sen: #9a4a24;
  --gut: #2f7a4b;
  --gut-hell: #e2f1e6;
  --falsch: #b23b2a;
  --falsch-hell: #f8e3de;
  --schatten: 0 1px 2px rgb(60 45 20 / 6%), 0 4px 16px rgb(60 45 20 / 6%);
  --rund: 14px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-titel: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #151a1b;
    --flaeche: #1d2426;
    --flaeche-2: #252e30;
    --text: #e8e4dc;
    --leise: #9ba8a7;
    --rand: #313c3e;
    --akzent: #6cbcb2;
    --akzent-stark: #8fd3ca;
    --akzent-hell: #20393a;
    --sen: #eda67c;
    --gut: #73c58f;
    --gut-hell: #1d3626;
    --falsch: #f08d7c;
    --falsch-hell: #3d2420;
    --schatten: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 17px/1.6 var(--schrift);
  overflow-x: hidden;
}

a { color: var(--akzent); text-underline-offset: 3px; }
a:hover { color: var(--akzent-stark); }

code {
  font: 0.88em ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: var(--flaeche-2);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

/* ---------- Kopf und Menü */

.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--grund) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rand);
}

.kopf-innen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.marke {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 1.3rem var(--schrift-titel);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

/* Logo: zwei Abschnitte (Silbe) im Kopf, vier (Se-na-to-la) als Wasserzeichen.
   Die Formen erzeugt werkzeuge/logo.py. */
.logo-1 { fill: var(--akzent); }
.logo-2 { fill: var(--sen); }

.marke-zeichen { display: block; line-height: 0; }
.marke-zeichen svg { display: block; height: 22px; width: auto; }

.wasserzeichen {
  position: fixed;
  z-index: -1;
  right: -7vw;
  bottom: -3vw;
  width: min(78vw, 980px);
  opacity: 0.06;
  pointer-events: none;
  transform: rotate(-8deg);
}
.wasserzeichen svg { display: block; width: 100%; height: auto; }

@media print {
  .wasserzeichen { display: none; }
}

.menue {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.menue::-webkit-scrollbar { display: none; }
/* Lässt sich das Menü seitlich scrollen, blendet der Rand aus (Klassen setzt senatola.js) */
.menue.mehr-rechts { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.menue.mehr-links { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.menue.mehr-links.mehr-rechts { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }

.menue a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--leise);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.95rem;
}
.menue a:hover { color: var(--text); background: var(--flaeche-2); }
.menue a[aria-current] { color: var(--akzent-stark); background: var(--akzent-hell); font-weight: 600; }

/* Sprachumschalter DE | EN rechts im Kopf */
.menue { min-width: 0; }
.sprachwahl {
  display: flex;
  flex-shrink: 0;
  margin-left: auto;
  border: 1px solid var(--rand);
  border-radius: 999px;
  overflow: hidden;
}
.sprachwahl a {
  padding: 4px 10px;
  color: var(--leise);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.sprachwahl a + a { border-left: 1px solid var(--rand); }
.sprachwahl a:hover { color: var(--text); background: var(--flaeche-2); }
.sprachwahl a[aria-current] { color: var(--akzent-stark); background: var(--akzent-hell); }

/* Unter 1020 px passt das Menü nicht mehr neben Marke und Umschalter: Es rutscht in eine eigene Zeile */
@media (max-width: 1020px) {
  .kopf-innen { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; padding-bottom: 6px; }
  .menue { grid-column: 1 / -1; margin: 0 -16px; padding: 0 16px; }
  .sprachwahl { grid-row: 1; grid-column: 2; }
}

/* ---------- Inhalt */

.inhalt {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}
.inhalt.breit { max-width: 1100px; }

h1, h2, h3 { font-family: var(--schrift-titel); line-height: 1.25; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0.2em 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; margin: 2.2em 0 0.6em; padding-top: 0.2em; scroll-margin-top: 90px; }
h3 { font-size: 1.2rem; margin: 1.8em 0 0.5em; scroll-margin-top: 90px; }

p, ul { margin: 0 0 1em; }
ul { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
li::marker { color: var(--akzent); }

.einleitung { font-size: 1.2rem; color: var(--leise); }

em.sen {
  color: var(--sen);
  font-style: italic;
  font-weight: 500;
}
em.sen.hoerbar { cursor: pointer; border-radius: 4px; }
em.sen.hoerbar:hover, em.sen.hoerbar:focus-visible { background: color-mix(in srgb, var(--sen) 14%, transparent); outline: none; }

blockquote {
  margin: 1.5em 0;
  padding: 18px 22px;
  background: var(--flaeche);
  border-left: 4px solid var(--akzent);
  border-radius: 0 var(--rund) var(--rund) 0;
  box-shadow: var(--schatten);
  font-size: 1.1rem;
}

.tabelle {
  overflow-x: auto;
  margin: 0 0 1.4em;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--rund);
}
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 14px; vertical-align: top; }
th { font-weight: 600; color: var(--leise); font-size: 0.85rem; background: var(--flaeche-2); }
tbody tr + tr td { border-top: 1px solid var(--rand); }

/* Inhaltsverzeichnis einer Seite */
.kapitel {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--rund);
  padding: 14px 20px;
  margin-bottom: 2em;
}
.kapitel p { margin: 0 0 6px; font-weight: 600; font-size: 0.85rem; color: var(--leise); }
.kapitel ol { margin: 0; padding-left: 1.3em; columns: 2 240px; column-gap: 32px; }
.kapitel li { margin: 0 0 4px; break-inside: avoid; }

/* Karten auf der Startseite */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.karte {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--rund);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.karte strong { font-family: var(--schrift-titel); font-size: 1.15rem; color: var(--akzent-stark); }
.karte span { color: var(--leise); font-size: 0.92rem; }
.karte:hover { transform: translateY(-2px); box-shadow: var(--schatten); border-color: var(--akzent); color: var(--text); }

/* Alphabet */
.alphabet { display: flex; flex-wrap: wrap; gap: 6px; margin: 1em 0 1.4em; }
.alphabet span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 46px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 10px;
  font: 600 1.35rem var(--schrift-titel);
}
.alphabet .vokal { background: var(--akzent-hell); border-color: transparent; color: var(--akzent-stark); }
.alphabet .ziffer { border-color: var(--akzent); }
.alphabet .stelle { border-style: dashed; border-color: var(--akzent); }

/* Silbentafel */
.silbentafel { display: grid; grid-template-columns: 34px repeat(5, minmax(0, 1fr)); gap: 4px; margin-bottom: 0.6em; }
.silbentafel .kopfzelle { display: grid; place-items: center; font-weight: 600; color: var(--leise); font-size: 0.85rem; }
.silbe {
  appearance: none;
  border: 1px solid var(--rand);
  background: var(--flaeche);
  color: var(--leise);
  border-radius: 8px;
  padding: 5px 2px;
  font: 1rem var(--schrift);
  cursor: pointer;
  min-width: 0;
  line-height: 1.2;
}
.silbe small { display: block; font-size: 0.68rem; color: inherit; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.silbe.kurzwort { background: var(--akzent-hell); color: var(--akzent-stark); border-color: transparent; font-weight: 600; }
.silbe.vorsilbe { background: color-mix(in srgb, var(--sen) 14%, transparent); color: var(--sen); border-color: transparent; font-weight: 600; }
.silbe.gemieden { opacity: 0.45; text-decoration: line-through; }
.silbe:hover, .silbe:focus-visible { outline: 2px solid var(--akzent); outline-offset: -1px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; color: var(--leise); margin-bottom: 1.4em; }
.legende span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--flaeche); border: 1px solid var(--rand); }
.legende .l-kurz::before { background: var(--akzent-hell); border-color: transparent; }
.legende .l-vor::before { background: color-mix(in srgb, var(--sen) 20%, transparent); border-color: transparent; }

/* ---------- Gemeinsame Bedienelemente */

.feld, .auswahl {
  font: inherit;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 9px 12px;
  min-width: 0;
}
.feld:focus, .auswahl:focus { outline: 2px solid var(--akzent); outline-offset: 1px; border-color: transparent; }

.knopf {
  font: 600 0.95rem var(--schrift);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  background: var(--akzent);
  color: var(--flaeche);
  cursor: pointer;
}
.knopf:hover { background: var(--akzent-stark); }
.knopf:focus-visible, .antwort:focus-visible, .hoeren:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.knopf.leise { background: var(--flaeche-2); color: var(--text); }
.knopf.leise:hover { background: var(--rand); }

.hoeren {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--rand);
  background: var(--flaeche);
  color: var(--akzent);
  cursor: pointer;
  vertical-align: middle;
  flex: none;
}
.hoeren:hover { background: var(--akzent-hell); }
.hoeren svg { width: 18px; height: 18px; }

.betonung { font-size: 0.95rem; color: var(--leise); letter-spacing: 0.02em; }
.betonung b { color: var(--text); }

.karte-box {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--rund);
  box-shadow: var(--schatten);
  padding: 22px;
  margin-bottom: 1.4em;
}

/* ---------- Zahlen-Rechner */

.rechner-eingabe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rechner-eingabe .feld { flex: 1 1 220px; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.rechner-eingabe label.schalter { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; color: var(--leise); cursor: pointer; }
.rechner-ergebnis { margin-top: 18px; }
.rechner-ergebnis .gross { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rechner-ergebnis .gross em.sen { font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.3; }
.rechner-ergebnis .meldung { color: var(--leise); }
.rechner-ergebnis h3 { font-size: 1rem; font-family: var(--schrift); color: var(--leise); margin: 1.4em 0 0.4em; }
.rechner-ergebnis .tabelle { margin: 0; }
.formen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.formen div { background: var(--flaeche-2); border-radius: 10px; padding: 8px 12px; }
.formen small { display: block; color: var(--leise); font-size: 0.8rem; }
.beispiele-zahl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.beispiele-zahl button { font: 0.85rem var(--schrift); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rand); background: transparent; color: var(--leise); cursor: pointer; }
.beispiele-zahl button:hover { color: var(--akzent-stark); border-color: var(--akzent); }

/* ---------- Wörterbuch */

.wb-filter {
  position: sticky;
  top: 57px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 0;
  background: var(--grund);
}
@media (max-width: 700px) {
  .wb-filter { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wb-filter .feld { grid-column: 1 / -1; }
  .wb-filter .auswahl { font-size: 0.85rem; padding: 8px 6px; }
}
.wb-anzahl { color: var(--leise); font-size: 0.9rem; margin: 4px 0 10px; }

.wb-liste { display: flex; flex-direction: column; gap: 6px; }
.wb-eintrag { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; }
.wb-eintrag[open] { box-shadow: var(--schatten); border-color: var(--akzent); }
.wb-eintrag summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}
.wb-eintrag summary::-webkit-details-marker { display: none; }
.wb-eintrag summary em.sen { font-size: 1.08rem; overflow-wrap: anywhere; }
.wb-de { overflow-wrap: anywhere; }
.chip { font-size: 0.75rem; padding: 2px 9px; border-radius: 999px; background: var(--flaeche-2); color: var(--leise); white-space: nowrap; }
.chip.Nomen { background: color-mix(in srgb, #3b82c4 16%, transparent); }
.chip.Verb { background: color-mix(in srgb, #c4513b 16%, transparent); }
.chip.Adjektiv { background: color-mix(in srgb, #3b9c5c 18%, transparent); }
.chip.Adverb { background: color-mix(in srgb, #a07a1c 20%, transparent); }
.chip.Mengenwort { background: color-mix(in srgb, #7a4fc4 16%, transparent); }
.chip.Kurzwort { background: var(--akzent-hell); color: var(--akzent-stark); }
@media (max-width: 560px) {
  .wb-eintrag summary { grid-template-columns: 1fr auto; }
  .wb-eintrag summary .wb-de { grid-column: 1 / -1; grid-row: 2; margin-top: -6px; color: var(--leise); }
}
.wb-details { padding: 4px 16px 14px; border-top: 1px solid var(--rand); font-size: 0.95rem; }
.wb-details dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0 0; }
.wb-details dt { color: var(--leise); }
.wb-details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .wb-details dl { grid-template-columns: 1fr; gap: 0; }
  .wb-details dd { margin-bottom: 8px; }
}
.baustein { color: var(--leise); }
.wb-leer { color: var(--leise); padding: 24px 0; text-align: center; }
.wb-mehr { margin: 14px auto 0; display: block; }

/* ---------- Beispielsätze */

.bs-steuerung { display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.bs-themen { display: flex; flex-wrap: wrap; gap: 6px; }
.thema-knopf {
  font: 0.88rem var(--schrift);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--rand);
  background: var(--flaeche);
  color: var(--leise);
  cursor: pointer;
}
.thema-knopf:hover { border-color: var(--akzent); color: var(--text); }
.thema-knopf[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: var(--flaeche); }
.thema-knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.bs-optionen { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.bs-optionen .feld { flex: 1 1 240px; }
.schalter { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; color: var(--leise); cursor: pointer; }
.schalter input { accent-color: var(--akzent); width: 16px; height: 16px; }

.bs-liste { display: flex; flex-direction: column; gap: 10px; }
.bs-thema { font-size: 1.3rem; margin: 1.4em 0 0.2em; }
.bs-liste > .bs-thema:first-child { margin-top: 0.4em; }
.bs-karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--rund);
  padding: 14px 18px;
  scroll-margin-top: 90px;
}
.bs-karte.markiert { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.bs-satz { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.bs-sen { margin: 0; font-size: 1.2rem; line-height: 1.7; color: var(--sen); font-style: italic; font-weight: 500; }
.bs-woertlich { margin: 2px 0 0; color: var(--leise); font-size: 0.88rem; }
.bs-deutsch { margin: 6px 0 0; font-weight: 600; }
.bs-original { margin: 6px 0 0; font-weight: 600; }
.bs-original + .bs-deutsch { font-weight: 400; color: var(--leise); }
.bs-hinweis { margin: 8px 0 0; font-size: 0.88rem; color: var(--leise); padding-left: 10px; border-left: 3px solid var(--akzent-hell); }
.bs-aufdecken { display: none; margin-top: 8px; font-size: 0.85rem; padding: 6px 14px; }
.ohne-woertlich .bs-woertlich { display: none; }
.ueben .bs-karte:not(.aufgedeckt) .bs-original,
.ueben .bs-karte:not(.aufgedeckt) .bs-deutsch,
.ueben .bs-karte:not(.aufgedeckt) .bs-woertlich,
.ueben .bs-karte:not(.aufgedeckt) .bs-hinweis { display: none; }
.ueben .bs-karte:not(.aufgedeckt) .bs-aufdecken { display: inline-block; }

.wortlink {
  position: relative;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--sen) 55%, transparent);
}
.wortlink.fremd { border-bottom-style: none; }
.wortlink:hover, .wortlink:focus-visible { color: var(--akzent-stark); border-bottom: 1px solid currentColor; outline: none; }
.wortlink[data-glosse]:hover::after, .wortlink[data-glosse]:focus-visible::after, .wortlink.zeigt-glosse::after {
  content: attr(data-glosse);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--grund);
  font: 500 0.8rem var(--schrift);
  font-style: normal;
  pointer-events: none;
  z-index: 3;
}

/* Lesetexte */
.tx-titel { margin: 1em 0 0.3em; }
.tx-angabe { color: var(--leise); font-size: 0.9rem; margin: 0 0 0.4em; }
.tx-ganz { margin: 14px 0 0; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rund); padding: 12px 18px; }
.tx-ganz summary { cursor: pointer; font-weight: 600; color: var(--akzent-stark); }
.tx-ganz .bs-sen { margin-top: 10px; font-size: 1.1rem; }
.tx-ganz-de { margin: 12px 0 0; color: var(--leise); }
.ueben .tx-ganz-de { display: none; }
.tx-zwischen { font-family: var(--schrift); font-size: 1rem; color: var(--leise); margin: 1.6em 0 0.6em; }
.tx-abschnitt { margin: 0 0 4px; font-size: 0.78rem; font-weight: 600; color: var(--akzent); text-transform: uppercase; letter-spacing: 0.05em; }
.tx-anmerkungen { margin-top: 8px; font-size: 0.88rem; color: var(--leise); }
.tx-anmerkungen summary { cursor: pointer; color: var(--akzent); width: fit-content; }
.tx-anmerkungen ul { margin: 6px 0 0; }
.ueben .bs-karte:not(.aufgedeckt) .tx-anmerkungen { display: none; }

/* Beispiele im Wörterbuch */
.wb-beispiele { list-style: none; padding: 0; margin: 0; }
.wb-beispiele li { margin-bottom: 6px; }
.wb-beispiele small { display: block; color: var(--leise); }

/* ---------- Üben (auch das Quiz der Lektionen) */

.quiz-einstellungen { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.quiz-einstellungen label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--leise); flex: 1 1 200px; }
.quiz-karte { text-align: center; padding: 28px 22px; }
.quiz-richtung { font-size: 0.85rem; color: var(--leise); margin: 0 0 10px; }
.quiz-frage { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 3.2rem; margin-bottom: 4px; }
.quiz-frage .wort { font: 600 clamp(1.7rem, 6vw, 2.4rem)/1.2 var(--schrift-titel); overflow-wrap: anywhere; }
.quiz-frage em.sen { font-weight: 600; }
.quiz-frage .wort.satz { font-size: clamp(1.25rem, 4vw, 1.6rem); line-height: 1.35; }
.quiz-hinweis { color: var(--leise); font-size: 0.9rem; min-height: 1.5em; margin: 0 0 18px; }
.quiz-antworten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .quiz-antworten { grid-template-columns: 1fr; } }
.antwort {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font: 1.05rem var(--schrift);
  color: var(--text);
  background: var(--flaeche);
  border: 1.5px solid var(--rand);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  min-width: 0;
  overflow-wrap: anywhere;
}
.antwort:hover:not(:disabled) { border-color: var(--akzent); background: var(--akzent-hell); }
.antwort .taste { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--flaeche-2); font-size: 0.8rem; font-weight: 600; color: var(--leise); }
.antwort:disabled { cursor: default; }
.antwort.richtig { border-color: var(--gut); background: var(--gut-hell); }
.antwort.richtig .taste { background: var(--gut); color: var(--flaeche); }
.antwort.falsch { border-color: var(--falsch); background: var(--falsch-hell); }
.antwort.falsch .taste { background: var(--falsch); color: var(--flaeche); }
.antwort.blass { opacity: 0.55; }
.quiz-auswertung { margin-top: 18px; min-height: 2.5em; }
.quiz-auswertung .ergebnis { font-weight: 600; margin: 0 0 6px; }
.quiz-auswertung .ergebnis.gut { color: var(--gut); }
.quiz-auswertung .ergebnis.falsch { color: var(--falsch); }
.quiz-auswertung .bildung { color: var(--leise); font-size: 0.95rem; margin: 0 0 14px; }

/* ---------- Lernen: Lektionen */

.lk-stand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.lk-balken { display: flex; gap: 3px; width: 100%; }
.lk-balken span { flex: 1; height: 10px; border-radius: 3px; background: var(--flaeche-2); border: 1px solid var(--rand); }
.lk-balken .ohne { background: var(--gut); border-color: var(--gut); }
.lk-balken .mit { background: var(--sen); border-color: var(--sen); }
.lk-zahlen { margin: 0; color: var(--leise); font-size: 0.92rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.lk-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--flaeche-2); border: 1px solid var(--rand); margin-left: 8px; }
.lk-punkt:first-child { margin-left: 0; }
.lk-punkt.ohne { background: var(--gut); border-color: var(--gut); }
.lk-punkt.mit { background: var(--sen); border-color: var(--sen); }
.lk-stand .ergebnis.gut { color: var(--gut); font-weight: 600; margin: 0; }
a.knopf { display: inline-block; text-decoration: none; color: var(--flaeche); }
a.knopf:hover { color: var(--flaeche); }
.knopf.klein { padding: 5px 12px; font-size: 0.82rem; }

.lk-teil-titel { font-size: 1.3rem; margin: 1.6em 0 0.6em; }
.lk-liste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lk-liste li { margin: 0; }
.lk-karte {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--rund);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.lk-karte:hover { transform: translateY(-1px); box-shadow: var(--schatten); border-color: var(--akzent); color: var(--text); }
.lk-karte:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.lk-nr {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 600;
  background: var(--flaeche-2);
  color: var(--leise);
}
.lk-karte.ohne .lk-nr { background: var(--gut); color: var(--flaeche); }
.lk-karte.mit .lk-nr { background: var(--sen); color: var(--flaeche); }
.lk-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lk-text strong { font-family: var(--schrift-titel); font-size: 1.08rem; color: var(--akzent-stark); }
.lk-text > span { color: var(--leise); font-size: 0.9rem; }
/* Noch nicht gemacht: ausgegraut, aber anklickbar */
.lk-karte.offen { background: transparent; border-style: dashed; }
.lk-karte.offen .lk-text { opacity: 0.68; }
.lk-karte.offen:hover .lk-text { opacity: 1; }

.lk-status { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--flaeche-2); color: var(--leise); }
.lk-status.ohne { background: var(--gut-hell); color: var(--gut); }
.lk-status.mit { background: color-mix(in srgb, var(--sen) 15%, transparent); color: var(--sen); }
@media (max-width: 560px) {
  .lk-karte { grid-template-columns: auto minmax(0, 1fr); }
  .lk-karte .lk-status { grid-column: 2; justify-self: start; }
}
.lk-zuruecksetzen { margin-top: 2em; text-align: center; }

/* Eine Lektion */
.lk-zurueck { margin: 0 0 6px; font-size: 0.95rem; }
.lk-kopf h2 { margin: 0.1em 0 0.3em; padding-top: 0; }
.lk-teil { margin: 0; color: var(--leise); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.lk-ziel { color: var(--leise); margin: 0 0 10px; }
.lk-kopf .lk-status { display: inline-block; margin: 0 0 18px; }
.lk-schritte {
  position: sticky;
  top: 57px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 18px;
  background: var(--grund);
}
@media (max-width: 700px) { .lk-schritte { position: static; } }
.lk-schritte a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--rand);
  background: var(--flaeche);
  color: var(--leise);
  text-decoration: none;
  font-size: 0.92rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.lk-schritte a span { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--flaeche-2); font-size: 0.78rem; font-weight: 600; }
.lk-schritte a:hover { border-color: var(--akzent); color: var(--text); }
.lk-schritte a[aria-current] { background: var(--akzent); border-color: var(--akzent); color: var(--flaeche); font-weight: 600; }
.lk-schritte a[aria-current] span { background: var(--flaeche); color: var(--akzent-stark); }
@media (max-width: 480px) {
  .lk-schritte a { flex-direction: column; gap: 2px; font-size: 0.78rem; padding: 6px 2px; }
}
.lk-regeln h3:first-child { margin-top: 0.4em; }
.lk-weiter { margin: 2em 0 0; text-align: right; }

.lk-hilfe { color: var(--leise); font-size: 0.9rem; }
.lk-woerter { list-style: none; padding: 0; margin: 0 0 1em; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rund); }
.lk-woerter li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 4px 16px;
  align-items: baseline;
  padding: 9px 16px;
  margin: 0;
}
.lk-woerter li + li { border-top: 1px solid var(--rand); }
.lk-wort em.sen { font-size: 1.08rem; overflow-wrap: anywhere; }
.lk-de small { display: block; color: var(--leise); font-size: 0.82rem; }
@media (max-width: 560px) {
  .lk-woerter li { grid-template-columns: minmax(0, 1fr) auto; }
  .lk-woerter .lk-de { grid-column: 1 / -1; }
}
.lk-karten-start { margin: 0; }
.lk-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lk-knoepfe.mitte { justify-content: center; margin-top: 14px; }
.lk-kartei { text-align: center; }
.lk-kartei-kopf { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; color: var(--leise); font-size: 0.85rem; margin-bottom: 18px; }
.lk-kartei .quiz-frage .wort { font: 600 clamp(1.5rem, 5vw, 2.1rem)/1.25 var(--schrift-titel); overflow-wrap: anywhere; }
.lk-rueckseite { margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--rand); }
.lk-optionen { margin-bottom: 12px; }

/* Quiz einer Lektion */
.lk-quiz { text-align: left; }
.lk-quiz-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--leise); font-size: 0.85rem; margin-bottom: 14px; }
.lk-quiz-punkte { display: flex; gap: 4px; flex-wrap: wrap; }
.lk-quiz-punkte i { width: 9px; height: 9px; border-radius: 50%; background: var(--flaeche-2); border: 1px solid var(--rand); }
.lk-quiz-punkte i.fertig { background: var(--akzent); border-color: var(--akzent); }
.lk-quiz-punkte i.jetzt { border: 2px solid var(--akzent); }
.lk-frage { font: 600 1.25rem/1.4 var(--schrift-titel); margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.lk-zusatz { font-size: 1.15rem; margin: 0 0 6px; }
.lk-quiz .quiz-antworten { margin-top: 16px; }
.lk-quiz .quiz-auswertung { text-align: center; }
.lk-quiz .quiz-auswertung .bildung { text-align: left; max-width: 60ch; margin: 0 auto 14px; }
.lk-quiz .ergebnis { font-weight: 600; font-size: 1.1rem; }
.lk-quiz .ergebnis.gut { color: var(--gut); }
.lk-quiz .ergebnis.falsch { color: var(--falsch); }
.lk-quiz .bildung { color: var(--leise); }
.lk-ende { text-align: center; }
.lk-ende-zeichen { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 12px; border-radius: 50%; font: 700 2rem var(--schrift); color: var(--flaeche); }
.lk-ende-zeichen.ohne { background: var(--gut); }
.lk-ende-zeichen.mit { background: var(--sen); }
.lk-zurueck-unten { margin: 16px 0 0; font-size: 0.92rem; }
.lk-zurueck-unten + .lk-zurueck-unten { margin-top: 6px; }
.lk-aus { color: var(--leise); font-size: 0.82rem; margin: 0 0 12px; }

/* Abschlussquiz eines Teils: wie eine Lektionskarte, mit Akzent links */
.lk-karte.lk-teilquiz { border-left: 4px solid var(--akzent); }
.lk-karte.lk-teilquiz.offen { border-left-style: solid; }
.lk-karte.lk-teilquiz .lk-nr { background: var(--akzent-hell); color: var(--akzent-stark); }
.lk-karte.lk-teilquiz.ohne .lk-nr { background: var(--gut); color: var(--flaeche); }
.lk-karte.lk-teilquiz.mit .lk-nr { background: var(--sen); color: var(--flaeche); }

.quiz-leer { color: var(--leise); margin: 0; }

/* ---------- Fuß */

.fuss { border-top: 1px solid var(--rand); color: var(--leise); font-size: 0.82rem; }
.fuss a { color: inherit; }
.hinweis-schwebend { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; max-width: min(520px, calc(100% - 32px));
  margin: 0; padding: 10px 14px; border-radius: 8px; background: var(--text, #22292B); color: var(--grund, #F6F2EA); font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); }
.hinweis-schwebend[hidden] { display: none; }
.fuss p { max-width: 1100px; margin: 0 auto; padding: 18px 16px 28px; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
